UNPKG

@berrywallet/core

Version:

Berrywallet main Core for work with common cryptocurrencies like Bitcoin, Ethereum, Dash, Litecoin

94 lines (93 loc) 2.12 kB
import { Coin, Wallet } from '../../'; export declare type Network = { info: { version: number; protocolversion: number; blocks: number; timeoffset: number; connections: number; proxy: string; difficulty: number; testnet: false; relayfee: number; errors: string; network: string; }; }; export declare type Input = { txid: string; vout: number; sequence: number; n: number; addr: string; valueSat: number; value: number; doubleSpentTxID?: string; scriptSig?: { asm: string; hex: string; }; witness: string[]; }; export declare type Output = { value: string; n: number; scriptPubKey: { hex: string; asm: string; addresses: string[]; type: string; }; spentTxId?: string; spentIndex?: number; spentHeight?: number; }; export declare type Transaction = { txid: string; version: number; locktime: number; vin: Input[]; vout: Output[]; blockhash: string; blockheight: number; confirmations: number; time: number; blocktime: number; valueOut: number; size: number; valueIn: number; fees: number; }; export declare type AddressInfo = { addrStr: string; balance: number; balanceSat: number; totalReceived: number; totalReceivedSat: number; totalSent: number; totalSentSat: number; unconfirmedBalance: number; unconfirmedBalanceSat: number; unconfirmedTxApperances: number; txApperances: number; transactions: string[]; }; export declare type Block = { hash: string; size: number; height: number; version: number; merkleroot: string; tx: string[]; time: number; nonce: number; bits: string; difficulty: number; chainwork: string; confirmations: number; previousblockhash: string; reward: number; isMainChain: true; poolInfo: any; }; export declare function toWalletTx(tx: Transaction, coin: Coin.CoinInterface): Wallet.Entity.BIPTransaction;