Options
All
  • Public
  • Public/Protected
  • All
Menu

Leap Keychain

Index

Type Aliases

AminoMsg: { type: string; value: any }

Type declaration

  • type: string
  • value: any
ChainInfo: { addressPrefix: string; coinType: string; key: string }

Type declaration

  • addressPrefix: string
  • coinType: string
  • key: string
Coin: { amount: string; denom: string }

Type declaration

  • amount: string
  • denom: string
CreateWalletParams: { addressIndex: number; chainInfos: ChainInfo[]; colorIndex: number; mnemonic: string; name: string; password: string; type: "create" | "import" }

Type declaration

  • addressIndex: number
  • chainInfos: ChainInfo[]
  • colorIndex: number
  • mnemonic: string
  • name: string
  • password: string
  • type: "create" | "import"
IChildKey: { privateKey: Uint8Array | null; publicKey: Uint8Array | null; sign: any }

Type declaration

  • privateKey: Uint8Array | null
  • publicKey: Uint8Array | null
  • sign:function
    • sign(hash: Uint8Array): Uint8Array
IHDKey: { privateKey: Uint8Array | null; publicKey: Uint8Array | null; derive: any }

Type declaration

Key<T>: { addressIndex: number; addresses: Record<T, string>; cipher: string; colorIndex: number; id: string; name: string; pubKeys?: Record<T, string>; walletType: WALLETTYPE }

Type Parameters

  • T extends string

Type declaration

  • addressIndex: number
  • addresses: Record<T, string>
  • cipher: string
  • colorIndex: number
  • id: string
  • name: string
  • Optional pubKeys?: Record<T, string>
  • walletType: WALLETTYPE
Keystore<T>: Record<string, Key<T>>

Type Parameters

  • T extends string

LeapSigner: EthWallet | Wallet | PvtKeyWallet
Pubkey: { type: string; value: any }

Type declaration

  • Readonly type: string
  • Readonly value: any
SignDoc: { accountNumber: string; authInfoBytes: Uint8Array; bodyBytes: Uint8Array; chainId: string }

Type declaration

  • accountNumber: string
  • authInfoBytes: Uint8Array
  • bodyBytes: Uint8Array
  • chainId: string
StdFee: { amount: readonly Coin[]; gas: string; granter?: string }

Type declaration

  • Readonly amount: readonly Coin[]
  • Readonly gas: string
  • Optional Readonly granter?: string
StdSignDoc: { account_number: string; chain_id: string; fee: StdFee; memo: string; msgs: readonly AminoMsg[]; sequence: string }

Type declaration

  • Readonly account_number: string
  • Readonly chain_id: string
  • Readonly fee: StdFee
  • Readonly memo: string
  • Readonly msgs: readonly AminoMsg[]
  • Readonly sequence: string
StdSignature: { pub_key: Pubkey; signature: string }

Type declaration

  • Readonly pub_key: Pubkey
  • Readonly signature: string
WalletOptions: { addressPrefix: string; paths: string[]; pubKeyBech32Address?: boolean }

Type declaration

  • addressPrefix: string
  • paths: string[]
  • Optional pubKeyBech32Address?: boolean

Variables

ACTIVE_WALLET: "active-wallet" = 'active-wallet'
ENCRYPTED_ACTIVE_WALLET: "encrypted-active-wallet" = 'encrypted-active-wallet'
ENCRYPTED_KEYCHAIN: "encrypted-keystore" = 'encrypted-keystore'
KEYCHAIN: "keystore" = 'keystore'
bip32Token: Token<IBip32> = ...
bip39Token: Token<IBip39> = ...
ripemd160Token: Token<ripemd160> = ...
secp256k1Token: Token<typeof Secp256k1> = ...
sha256Token: Token<sha256> = ...

Functions

  • decrypt(transitmessage: string, pass: string, iterations?: number): string
  • encodeSecp256k1Pubkey(pubkey: Uint8Array): Pubkey
  • encodeSecp256k1Signature(pubkey: Uint8Array, signature: Uint8Array): StdSignature
  • encrypt(msg: string, pass: string, iterations?: number): string
  • fromHex(hexstring: string): Uint8Array
  • initCrypto(): void
  • pubkeyToAddress(prefix: string, publicKey: Uint8Array): string
  • Parameters

    • prefix: string
    • publicKey: Uint8Array

    Returns string

  • serializeSignDoc(signDoc: SignDoc): Uint8Array
  • serializeStdSignDoc(signDoc: StdSignDoc): Uint8Array
  • setSecp256k1(secp256k1: typeof Secp256k1): void
  • setsha256(sha256: sha256): void
  • sortObject(obj: any): any