function · Browser and Node

# resolveDidKey

Resolves an Ed25519 did:key locally and derives its X25519 public key without network access.

`@toip-tools/trust-core` · [View source](https://github.com/yourbuddyconner/toip-tools/blob/main/packages/trust-core/src/identity.ts#L52)

Import:

```ts
import { resolveDidKey } from "@toip-tools/trust-core";
```

## Declaration

Signature:

```ts
resolveDidKey(did: string): {
    signingKey: Uint8Array;
    encryptionKey: Uint8Array;
};
```

### Parameters

**`did` (required)**

`string`

The 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

- **`signingKey` (required)**: `Uint8Array<ArrayBufferLike>`
- **`encryptionKey` (required)**: `Uint8Array<ArrayBufferLike>`

## Throws

If the identifier cannot be decoded or does not name an Ed25519 did:key.

[Usage guide](https://toip.tools/toolkit/trust-core/#usage) · [Error handling](https://toip.tools/toolkit/trust-core/#errors) · [All exports](https://toip.tools/toolkit/trust-core/api/)

---

This is the Markdown version of https://toip.tools/toolkit/trust-core/api/resolveDidKey/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
