## Index

### References

- ucan

### Enumerations

- KeyType

### Functions

- didToPublicKey
- exchange
- ownRoot
- publicKeyToDid
- root
- verifySignedData
- write

## References

### ucan

Renames and re-exports write

## Functions

### didToPublicKey

- didToPublicKey(did: string): { publicKey: string; type: KeyType }

- - Defined in did/transformers.ts:32

  Convert a DID (did:key) to a base64 public key.

  #### Parameters

  - ##### did: string

  #### Returns { publicKey: string; type: KeyType }

  - ##### publicKey: string

  - ##### type: KeyType

### exchange

- exchange(): Promise<string>

- - Defined in did/local.ts:9

  Create a DID based on the exchange key-pair.

  #### Returns Promise<string>

### ownRoot

- ownRoot(): Promise<string>

- - Defined in did/getters.ts:34

  Get a user's own root write-key DID.

  #### Returns Promise<string>

### publicKeyToDid

- publicKeyToDid(publicKey: string, type: KeyType): string

- - Defined in did/transformers.ts:11

  Convert a base64 public key to a DID (did:key).

  #### Parameters

  - ##### publicKey: string

  - ##### type: KeyType

  #### Returns string

### root

- root(username: string): Promise<string>

- - Defined in did/getters.ts:16

  Get the root write-key DID for a user. Stored at `_did.${username}.${endpoints.user}`

  #### Parameters

  - ##### username: string

  #### Returns Promise<string>

### verifySignedData

- verifySignedData(__namedParameters: { charSize?: number; data: string; did: string; signature: string }): Promise<boolean>

- - Defined in did/validation.ts:10

  Verify the signature of some data (string, ArrayBuffer or Uint8Array), given a DID.

  #### Parameters

  - ##### __namedParameters: { charSize?: number; data: string; did: string; signature: string }

    - ##### Optional charSize?: number

    - ##### data: string

    - ##### did: string

    - ##### signature: string

  #### Returns Promise<boolean>

### write

- write(): Promise<string>

- - Defined in did/local.ts:27

  Create a DID based on the write key-pair.

  #### Returns Promise<string>

Generated using TypeDoc