Appearance
DIDRegistryContract
DIDRegistryContract
extends ethers.Contract and provides an interface for interacting with a decentralized identity (DID) registry smart contract.
Creating Instances
new DIDRegistryContract( target: string
, contractRunner: Signer | Provider )
Creates a new instance of DIDRegistryContract
connected to the specified contract address, using the provided signer or provider for interactions.
Properties
didRegistryContract.target ⇒
string
The target to connect to. This can be an address, ENS name, or any Addressable, such as another contract.didRegistryContract.contractRunner ⇒
Signer | Provider
The Signer or Provider used for interacting with the contract.
To query or retrieve blockchain details, use the
Provider
, while for executing transactions, use theSigner
.
Methods
didRegistryContract.prepareTxData ( methodName: string
, args: any[]
, signerAddress: string
) ⇒ Promise< TxData
>
Prepares the transaction data for invoking a method on the contract by generating the required data.
didRegistryContract.resolveDid ( did: string
) ⇒ Promise< any
>
Resolves a DID and returns the corresponding DID document.
didRegistryContract.resolveDidWithAttributes ( identity: string
, did: string
) ⇒ Promise< any
>
Resolves a DID with additional attributes by fetching and processing attribute events for a given identity.
Note: The
DIDRegistryContract
class also allows interaction with the deployed DID Registry Contract's functions. For more details, refer to the DID Registry Artifact.