Skip to main content

Function: signChainDtoPersonalSign()

GalaChain core SDK 1.0.0-rc.8


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

Function: signChainDtoPersonalSign()

signChainDtoPersonalSign(privateKey, data): string

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

Signs a GalaChain personal-sign scheme DTO from the exact string a dApp sent through gala_signChainDto (wallet signChainDtoPersonalSign). See resolvePersonalSignChainDtoPayload for what is signed and what is refused; the signature recovers, under the chain's getPayloadToSign, to this key for the DTO the dApp submits with its prefix, and equals a personal_sign of the bare body when that prefix is the EIP-191 header of the bare body's byte length.

Parameters​

privateKey​

PrivateKeyInput

data​

string

Returns​

string

Throws​

GalaSDKError (PERSONAL_SIGN_*, see resolvePersonalSignChainDtoPayload) before any signing when the input is refused.