Skip to main content

EdDSA Keyshare Object

Keyshare class represents a EdDSA Keyshare from the Native Module. This class hold memory pointer to the keyshare in the native module and handle various useful operations on the keyshare.

Note: Most methods in this class are asynchronous and return a promise. Due to React-Native native module bridge.

Import

import eddsa from '@silencelaboratories/schnorr-sdk';

// Then you can use it as
eddsa.Keyshare;

Accessors

keyIdBase64

Get Signature

get keyIdBase64(): string

Get the keyId of the keyshare in Base64 format

Returns

string

Base64 encoded string of the keyId


keyIdBase64Url

Get Signature

get keyIdBase64Url(): string

Get the keyId of the keyshare in Base64Url format

Returns

string

Base64Url encoded string of the keyId


keyIdHex

Get Signature

get keyIdHex(): string

Get the keyId of the keyshare in Hex format

Returns

string

Hex encoded string of the keyId


publicKeyBase64

Get Signature

get publicKeyBase64(): string

Get the public key of the keyshare in Base64 format

Returns

string

Base64 encoded string of the public key


publicKeyHex

Get Signature

get publicKeyHex(): string

Get the public key of the keyshare in Hex format

Returns

string

Hex encoded string of the public key

Methods

free()

free(): Promise<true>

Free the keyshare from memory

Returns

Promise<true>

A promise that resolves when the keyshare is freed


getServerPublicPoint()

getServerPublicPoint(): Promise<string>

Returns

Promise<string>

Ingore


toBase64()

toBase64(): Promise<string>

Get the keyshare in base64 format

Returns

Promise<string>

A promise containing the base64 encoded string of the keyshare


fromBase64()

static fromBase64(keyshareBase64): Promise<Keyshare>

Create a Keyshare instance from a base64 encoded string

Parameters

keyshareBase64: string

base64 encoded string of the keyshare

Returns

Promise<Keyshare>

A promise containing the Keyshare instance