import { AddressLike, BlockTag, Contract, Overrides, Provider, Signer, TransactionReceipt } from 'ethers'; import { address, MetaSignature } from './helpers.js'; /** * A class that can be used to interact with the ERC1056 contract on behalf of a local controller key-pair */ export declare class EthrDidController { private contract; private readonly signer?; private readonly address; readonly did: string; private readonly legacyNonce; /** * Creates an EthrDidController instance. * * @param identifier - required - a `did:ethr` string or a publicKeyHex or an ethereum address * @param signer - optional - a Signer that represents the current controller key (owner) of the identifier. If a * 'signer' is not provided, then a 'contract' with an attached signer can be used. * @param contract - optional - a Contract instance representing a ERC1056 contract. At least one of `contract`, * `provider`, or `rpcUrl` is required * @param chainNameOrId - optional - the network name or chainID, defaults to 'mainnet' * @param provider - optional - a web3 Provider. At least one of `contract`, `provider`, or `rpcUrl` is required * @param rpcUrl - optional - a JSON-RPC URL that can be used to connect to an ethereum network. At least one of * `contract`, `provider`, or `rpcUrl` is required * @param registry - optional - The ERC1056 registry address. Only used with 'provider' or 'rpcUrl' * @param legacyNonce - optional - If the legacy nonce tracking method should be accounted for. If lesser version of * did-ethr-registry contract v1.0.0 is used then this should be true. */ constructor(identifier: string | address, contract?: Contract, signer?: Signer, chainNameOrId?: string, provider?: Provider, rpcUrl?: string, registry?: string, legacyNonce?: boolean); /** * @returns the encoded attribute value in hex or utf8 bytes * @param attrValue - the attribute value to encode (e.g. service endpoint, public key, etc.) * * @remarks The incoming attribute value may be a hex encoded key, or an utf8 encoded string (like service endpoints) **/ encodeAttributeValue(attrValue: string | `0x${string}`): Uint8Array | `0x${string}`; getOwner(address: address, blockTag?: BlockTag): Promise; attachContract(controller?: AddressLike): Promise; changeOwner(newOwner: address, options?: Overrides): Promise; createChangeOwnerHash(newOwner: address): Promise; changeOwnerSigned(newOwner: address, metaSignature: MetaSignature, options?: Overrides): Promise; addDelegate(delegateType: string, delegateAddress: address, exp: number, options?: Overrides): Promise; createAddDelegateHash(delegateType: string, delegateAddress: address, exp: number): Promise; addDelegateSigned(delegateType: string, delegateAddress: address, exp: number, metaSignature: MetaSignature, options?: Overrides): Promise; revokeDelegate(delegateType: string, delegateAddress: address, options?: Overrides): Promise; createRevokeDelegateHash(delegateType: string, delegateAddress: address): Promise; revokeDelegateSigned(delegateType: string, delegateAddress: address, metaSignature: MetaSignature, options?: Overrides): Promise; setAttribute(attrName: string, attrValue: string, exp: number, options?: Overrides): Promise; createSetAttributeHash(attrName: string, attrValue: string, exp: number): Promise; setAttributeSigned(attrName: string, attrValue: string, exp: number, metaSignature: MetaSignature, options?: Overrides): Promise; revokeAttribute(attrName: string, attrValue: string, options?: Overrides): Promise; createRevokeAttributeHash(attrName: string, attrValue: string): Promise; /** * The legacy version of the ethr-did-registry contract tracks the nonce as a property of the original owner, and not * as a property of the signer (current owner). That's why we need to differentiate between deployments here, or * otherwise our signature will be computed wrong resulting in a failed TX. * * Not only that, but the nonce is loaded differently for [set/revoke]AttributeSigned methods. */ private getPaddedNonceCompatibility; revokeAttributeSigned(attrName: string, attrValue: string, metaSignature: MetaSignature, options?: Overrides): Promise; } //# sourceMappingURL=controller.d.ts.map