NEARViewingKeyStorage
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / NEARViewingKeyStorage
Interface: NEARViewingKeyStorage
Section titled “Interface: NEARViewingKeyStorage”Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:18645
Interface for viewing key storage providers
Methods
Section titled “Methods”save()
Section titled “save()”save(
key):Promise<`0x${string}`>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:18651
Store a viewing key
Parameters
Section titled “Parameters”The viewing key to store
Returns
Section titled “Returns”Promise<`0x${string}`>
Promise resolving to the key’s hash (for identification)
load()
Section titled “load()”load(
hash):Promise<NEARViewingKey|null>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:18657
Retrieve a viewing key by its hash
Parameters
Section titled “Parameters”`0x${string}`
The viewing key hash
Returns
Section titled “Returns”Promise<NEARViewingKey | null>
Promise resolving to the key or null if not found
list()
Section titled “list()”list():
Promise<NEARViewingKey[]>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:18662
List all stored viewing keys
Returns
Section titled “Returns”Promise<NEARViewingKey[]>
Promise resolving to array of keys
delete()
Section titled “delete()”delete(
hash):Promise<boolean>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:18668
Delete a viewing key by its hash
Parameters
Section titled “Parameters”`0x${string}`
The viewing key hash
Returns
Section titled “Returns”Promise<boolean>
Promise resolving to true if deleted, false if not found