import { Extensible, JsonWebKey, VerificationMethod } from 'did-resolver'; export declare const identifierMatcher: RegExp; export declare const nullAddress = "0x0000000000000000000000000000000000000000"; export declare const MESSAGE_PREFIX = "0x1900"; export type address = string; export type uint256 = bigint; export type bytes32 = string; export type bytes = string; export interface ERC1056Event { identity: address; previousChange: uint256; validTo?: bigint; _eventName: string; blockNumber: number; } export interface DIDOwnerChanged extends ERC1056Event { owner: address; } export interface DIDAttributeChanged extends ERC1056Event { name: bytes32; value: bytes; validTo: uint256; } export interface DIDDelegateChanged extends ERC1056Event { delegateType: bytes32; delegate: address; validTo: uint256; } export declare const VMTypes: { readonly EcdsaSecp256k1VerificationKey2019: "EcdsaSecp256k1VerificationKey2019"; readonly EcdsaSecp256k1RecoveryMethod2020: "EcdsaSecp256k1RecoveryMethod2020"; readonly Ed25519VerificationKey2020: "Ed25519VerificationKey2020"; readonly X25519KeyAgreementKey2020: "X25519KeyAgreementKey2020"; readonly Multikey: "Multikey"; }; export type VMTypes = (typeof VMTypes)[keyof typeof VMTypes]; export declare const eventNames: { readonly DIDOwnerChanged: "DIDOwnerChanged"; readonly DIDAttributeChanged: "DIDAttributeChanged"; readonly DIDDelegateChanged: "DIDDelegateChanged"; }; export type eventNames = (typeof eventNames)[keyof typeof eventNames]; /** * Verification Method definitions that allow extra properties */ export type ExtendedVerificationMethod = VerificationMethod & Extensible; /** * Interface for transporting v, r, s signature parameters used in meta transactions */ export interface MetaSignature { sigV: number; sigR: bytes32; sigS: bytes32; } /** * Maps the `` token from a `did/pub//...` attribute name * to the canonical verification method type for that algorithm. * * This is the primary lookup. If the algorithm is not found here the verbatim * string `` is used. */ export declare const algoToVMType: Record; export declare function strip0x(input: string): string; export declare function bytes32toString(input: bytes32 | Uint8Array): string | null; export declare function stringToBytes32(str: string): string; export declare function interpretIdentifier(identifier: string): { address: string; publicKey?: string; network?: string; }; export declare const Errors: { /** * The resolver has failed to construct the DID document. * This can be caused by a network issue, a wrong registry address or malformed logs while parsing the registry * history. Please inspect the `DIDResolutionMetadata.message` to debug further. */ readonly notFound: "notFound"; /** * The resolver does not know how to resolve the given DID. Most likely it is not a `did:ethr`. */ readonly invalidDid: "invalidDid"; /** * The resolver is misconfigured or is being asked to resolve a `DID` anchored on an unknown network */ readonly unknownNetwork: "unknownNetwork"; /** * The resolver does not support the 'accept' format requested with `DIDResolutionOptions` */ readonly unsupportedFormat: "unsupportedFormat"; }; export type Errors = (typeof Errors)[keyof typeof Errors]; /** * Returns true when the argument is defined and not null. * Usable as array.filter(isDefined) * @param arg */ export declare function isDefined(arg: T): arg is Exclude; /** * Multicodec varint prefixes for known key types. * Used to construct publicKeyMultibase values per the Multikey spec. */ export declare const multicodecPrefixes: Partial>; /** * Encodes raw key bytes (hex string with or without 0x prefix) as a multibase base58btc string. * If a multicodec prefix is provided it is prepended before encoding. * If no prefix is provided the bytes are encoded as-is (for Multikey, where the prefix is * already present in the on-chain value). */ export declare function toMultibase(hexValue: string, prefix?: Uint8Array): string; /** * Decompresses a 33-byte secp256k1 public key (hex, with or without 0x prefix) and * returns a JWK object suitable for use as `publicKeyJwk` in a DID document. */ export declare function compressedSecp256k1ToJwk(hex: string): JsonWebKey; //# sourceMappingURL=helpers.d.ts.map