React Native TSS SDK
Access the API references for publicly exported classes and their respective methods.
The library exports three classes:
The main class performs and manages all the TSS functionality.
P1Tss
The two helper classes are (
P1PartyKeys
andKeyshareP1
) are input or output ofP1Tss
methods.
P1Tss
methods
P1Tss
methodsKey generation
static async keygen(
base64SessionId: string,
p1Keys: P1PartyKeys,
apiUrl: string
): Promise<KeyshareP1>
Performs key generation with TSS server node
Accepts
base64SessionId
keygen session id in encode base64 stringAccepts
p1Keys
key pair of the partyAccepts
apiUrl
of the TSS server node
Signature
static async signParty(
base64SessionId: string,
keyshareP1: KeyshareP1,
p1Keys: P1PartyKeys,
base64MessageHash: string,
chainPath: string = 'm',
apiUrl: string
): Promise<string>;
Generate signature
Accepts
base64SessionId
sign session id in encode base64 stringAccepts
keyshareP1
key share of the party instanceAccepts
p1Keys
key pair of the party instanceAccepts
base64MessageHash
hash of the message to be signed in encode base64 stringAccepts
chainPath
of the key to be used for signingAccepts
apiUrl
of the TSS server node
Key refresh
static async refreshKeygen(
base64SessionId: string,
p1Keys: P1PartyKeys,
keyshare: KeyshareP1,
apiUrl: string
): Promise<KeyshareP1>;
Performs key refresh with TSS server node
Accepts
base64SessionId
key-refresh session id in encode base64 stringAccepts
p1Keys
key pair of theP1PartyKeys
instanceAccepts
keyshare
keyshare of theKeyshareP1
instanceAccepts
apiUrl
of the TSS server node
P1PartyKeys
methods
P1PartyKeys
methodsCreate a new key pair
static async create(): Promise<P1PartyKeys>;
Create a new key pair
Get base64 string representation of the key pair
async toBase64String(): Promise<string>;
Create a key pair from base64 string
static async fromBase64String(base64Keys: string): Promise<P1PartyKeys>
Get the bytes representation of the key pair
async toBytes(): Promise<Uint8Array>;
Create a key pair from bytes
static async fromBytes(bytes: Uint8Array): Promise<P1PartyKeys>;
Accepts
bytes
of the key pair
Get the signing public key of the key pair
async extractPk(): Promise<string>;
Get
async messageSign(base64Message: string): Promise<string>;
Message content in base64 encode string
KeyshareP1
methods
KeyshareP1
methodsGet public key of the key share
async getPublicKey(): Promise<string>;
Get key id of the key share
async getKeyId(): Promise<string>
Get base64 string representation of the key share
async toBase64String(): Promise<string>;
Create a key share from base64 string
static async fromBase64String(base64Keyshare: string): Promise<KeyshareP1>;
Accepts
base64Keyshare
of the key share
Get the bytes representation of the key share
async toBytes(): Promise<Uint8Array>;
Create a key share from bytes
static async fromBytes(bytes: Uint8Array): Promise<KeyshareP1>;
Accepts
bytes
of the key share
Last updated