Skip to content

NEARViewingKeyStorage

SIP Protocol API Reference v0.7.4


SIP Protocol API Reference / NEARViewingKeyStorage

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:18645

Interface for viewing key storage providers

save(key): Promise<`0x${string}`>

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:18651

Store a viewing key

NEARViewingKey

The viewing key to store

Promise<`0x${string}`>

Promise resolving to the key’s hash (for identification)


load(hash): Promise<NEARViewingKey | null>

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:18657

Retrieve a viewing key by its hash

`0x${string}`

The viewing key hash

Promise<NEARViewingKey | null>

Promise resolving to the key or null if not found


list(): Promise<NEARViewingKey[]>

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:18662

List all stored viewing keys

Promise<NEARViewingKey[]>

Promise resolving to array of keys


delete(hash): Promise<boolean>

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:18668

Delete a viewing key by its hash

`0x${string}`

The viewing key hash

Promise<boolean>

Promise resolving to true if deleted, false if not found