UNPKG

@gear-js/api

Version:

A JavaScript library that provides functionality to connect GEAR Component APIs.

25 lines (24 loc) 1.27 kB
import { KeyringPair, KeyringPair$Json } from '@polkadot/keyring/types'; import { Keypair } from '@polkadot/util-crypto/types'; export declare class GearKeyring { private static unlock; static fromSuri(suri: string, name?: string, ss58Format?: number): Promise<KeyringPair>; static fromKeyPair(pair: Keypair, name?: string, ss58Format?: number): KeyringPair; static fromJson(keypairJson: KeyringPair$Json | string, passphrase?: string, ss58Format?: number): KeyringPair; static fromSeed(seed: Uint8Array | string, name?: string, ss58Format?: number): Promise<KeyringPair>; static fromMnemonic(mnemonic: string, name?: string, ss58Format?: number): Promise<KeyringPair>; static toJson(keyring: KeyringPair, passphrase?: string): KeyringPair$Json; static create(name: string, passphrase?: string, ss58Format?: number): Promise<{ keyring: KeyringPair; mnemonic: string; seed: string; json: KeyringPair$Json; }>; static generateMnemonic(): string; static generateSeed(mnemonic?: string): { seed: `0x${string}`; mnemonic: string; }; static sign(keyring: KeyringPair, message: string): Uint8Array<ArrayBufferLike>; static checkPublicKey(publicKey: string): boolean; }