UNPKG

@desig/web3

Version:

Desig: The Blockchain-Agnostic Multisig Solution

43 lines (42 loc) 1.1 kB
import { Curve } from '@desig/supported-chains'; import { ec } from './utils'; export type WalletThreshold = { t: number; n: number; index: string; }; export interface WalletAdapter { readonly curve: Curve; readonly ec: (typeof ec)[Curve]; share: Uint8Array; getThreshold: () => WalletThreshold; getSecretKey: () => string; getShare: () => Uint8Array; } export interface MultisigWalletAdapter extends WalletAdapter { masterkey: Uint8Array; id: Uint8Array; index: Uint8Array; t: Uint8Array; n: Uint8Array; } export declare class DesigKeypair implements MultisigWalletAdapter { readonly curve: Curve; readonly ec: (typeof ec)[Curve]; masterkey: Uint8Array; share: Uint8Array; id: Uint8Array; index: Uint8Array; t: Uint8Array; n: Uint8Array; constructor(secretKey: string); private _parseShareString; getThreshold: () => { index: string; t: number; n: number; }; getShare: () => Uint8Array; getSecretKey: () => string; proactivate: (zero: Uint8Array) => Uint8Array; }