Skip to main content

Interface: AccountContract

account.AccountContract

An account contract instance. Knows its artifact, deployment arguments, how to create transaction execution requests out of function calls, and how to authorize actions.

Methods

getAuthWitnessProvider

getAuthWitnessProvider(address): AuthWitnessProvider

Returns the auth witness provider for the given address.

Parameters

NameTypeDescription
addressCompleteAddressAddress for which to create auth witnesses.

Returns

AuthWitnessProvider


getContractArtifact

getContractArtifact(): ContractArtifact

Returns the artifact of this account contract.

Returns

ContractArtifact


getDeploymentArgs

getDeploymentArgs(): undefined | any[]

Returns the deployment arguments for this instance, or undefined if this contract does not require deployment.

Returns

undefined | any[]


getInterface

getInterface(address, nodeInfo): AccountInterface

Returns the account interface for this account contract given a deployment at the provided address. The account interface is responsible for assembling tx requests given requested function calls, and for creating signed auth witnesses given action identifiers (message hashes).

Parameters

NameTypeDescription
addressCompleteAddressAddress where this account contract is deployed.
nodeInfoNodeInfoInfo on the chain where it is deployed.

Returns

AccountInterface

An account interface instance for creating tx requests and authorizing actions.