snapcap
API ReferenceFunctions

idbPut

Function: idbPut()

function idbPut(
   sandbox: Sandbox, 
   dbName: string, 
   storeName: string, 
   key: string, 
value: unknown): Promise<void>;

Defined in: storage/idb-utils.ts:196

Write value into the given Sandbox's IndexedDB at (dbName, storeName, key).

Parameters

ParameterTypeDescription
sandboxSandboxThe Sandbox whose IDB shim handles the write.
dbNamestringIndexedDB database name.
storeNamestringObject store name within the database. Created on first use if absent.
keystringRecord key within the object store.
valueunknownAny structured-cloneable value.

Returns

Promise<void>

Example

await idbPut(sandbox, "snapcap", "fidelius", "identity", { pub, priv });

See

On this page