near-api-js - v7.4.0
    Preparing search index...

    Type Alias AccountContractView

    AccountContractView:
        | { local: CryptoHash }
        | { global_hash: CryptoHash }
        | { global_account_id: AccountId }

    RPC view of a non-empty [AccountContract]. The AccountContract::None variant is represented externally as a JSON null via Option, so this enum only carries the three "contract is present" cases. Serializes as an externally-tagged object:

    • Local(hash) → {"local": "<CryptoHash>"}
    • GlobalHash(hash) → {"global_hash": "<CryptoHash>"}
    • GlobalAccountId(id) → {"global_account_id": "<AccountId>"}

    Mirrors [AccountContract] 1:1 (minus None) so consumers can preserve the distinction between a global-by-hash and global-by-account contract without descending into a nested identifier.