UNPKG

@azpool/chia-client

Version:

TypeScript client for Chia node peer RPC interface

37 lines (36 loc) 2.18 kB
import { ChiaOptions, RpcClient } from "./RpcClient"; import { CertPath } from "./types/CertPath"; import { AddKeyResponse, LoginResponse, SyncStatusResponse, TransactionResponse } from "./types/Wallet/RpcResponse"; import { Transaction } from "./types/Wallet/Transaction"; import { WalletBalance } from "./types/Wallet/WalletBalance"; import { WalletInfo } from "./types/Wallet/WalletInfo"; declare class Wallet extends RpcClient { constructor(options?: Partial<ChiaOptions> & CertPath); logIn(fingerprint: number): Promise<LoginResponse>; logInAndRestore(fingerprint: number, filePath: string): Promise<LoginResponse>; logInAndSkip(fingerprint: number): Promise<LoginResponse>; getPublicKeys(): Promise<string[]>; getPrivateKey(fingerprint: number): Promise<string[]>; generateMnemonic(): Promise<string[]>; addKey(mnemonic: string[], type?: string): Promise<AddKeyResponse>; deleteKey(fingerprint: number): Promise<{}>; deleteAllKeys(): Promise<{}>; getSyncStatus(): Promise<boolean>; getSyncStatusV2(): Promise<SyncStatusResponse>; getHeightInfo(): Promise<number>; farmBlock(address: string): Promise<{}>; getWallets(): Promise<WalletInfo[]>; getWalletBalance(walletId: string): Promise<WalletBalance>; getTransaction(walletId: string, transactionId: string): Promise<Transaction>; getTransactionV2(walletId: string, transactionId: string): Promise<TransactionResponse>; getTransactions(walletId: string, start: number, end: number): Promise<Transaction[]>; getNextAddress(walletId: string): Promise<string>; sendTransaction(walletId: string, amount: number, address: string, fee: number): Promise<Transaction>; sendTransactionV2(walletId: string, amount: number, address: string, fee: number): Promise<TransactionResponse>; sendTransactionMultiV2(walletId: string, additions: any[], fee: number): Promise<TransactionResponse>; createBackup(filePath: string): Promise<{}>; addressToPuzzleHash(address: string): string; puzzleHashToAddress(puzzleHash: string): string; getCoinInfo(parentCoinInfo: string, puzzleHash: string, amount: number): string; } export { Wallet };