Skip to main content

Function: withPrivateKey()

GalaChain core SDK 1.0.0-rc.8


GalaChain core SDK 1.0.0-rc.8 / index / withPrivateKey

Function: withPrivateKey()

withPrivateKey<T>(privateKey, action): T

Defined in: packages/gala-core-sdk/dist/index.d.ts:1601

Runs action with a private normalized copy of the key, zeroed afterwards (also when action throws). Bytes given by the caller are copied, never modified: the caller owns them.

Type Parameters​

T​

T

Parameters​

privateKey​

PrivateKeyInput

action​

(key) => T

Returns​

T