Skip to content

Latest commit

 

History

History
45 lines (26 loc) · 870 Bytes

JsonSigner.md

File metadata and controls

45 lines (26 loc) · 870 Bytes

@cere-ddc-sdk/ddc / JsonSigner

Class: JsonSigner

Signer that uses a JSON object to create a keypair.

Example

const accountDataJson = {}; // Exported from Cere Wallet or other wallets
const jsonSigner = new JsonSigner(accountDataJson, { passphrase: '1234' });
const signature = await jsonSigner.sign('data');

console.log(signature);

Hierarchy

Methods

isSigner

isSigner(signer): signer is Signer

Checks if an object is a signer.

Parameters

Name Type Description
signer unknown The object to check.

Returns

signer is Signer

A boolean indicating whether the object is a signer.

Inherited from

KeyringSigner.isSigner