function · Browser and Node
resolveDidKey
Resolves an Ed25519 did:key locally and derives its X25519 public key without network access.
@toip-tools/trust-coreView sourceimport { resolveDidKey } from "@toip-tools/trust-core";
Declaration
resolveDidKey(did: string): {
signingKey: Uint8Array;
encryptionKey: Uint8Array;
};
Parameters
didrequiredstringThe Ed25519 did:key identifier to decode.
Returns
{ signingKey: Uint8Array; encryptionKey: Uint8Array; }Public keys for verifying signatures and encrypting to this identity.
Returned object
The returned object exposes these properties and methods.
Properties
signingKeyrequiredUint8Array<ArrayBufferLike>encryptionKeyrequiredUint8Array<ArrayBufferLike>
Throws
If the identifier cannot be decoded or does not name an Ed25519 did:key.