@tangany/waas
Version:
node.js SDK for Tangany Wallet as a Service API
68 lines (67 loc) • 1.81 kB
TypeScript
import { INodeStatus } from "./common";
import { TransactionStatus } from "../types/common";
import { IWalletBalance } from "./wallet";
/**
* Represents the transaction status response for the Bitcoin network
*/
export interface IBitcoinTransaction {
status: TransactionStatus;
confirmations: number | null;
blockHash: string | null;
blockNr: number | null;
receivedTime: string | null;
totalInput: string | null;
totalOutput: string | null;
fees: string | null;
}
/**
* Represents a Bitcoin transaction estimation
*/
export interface IBitcoinTransactionEstimation {
fee: string;
feeRate: number;
}
/**
* Represents the API response that is returned once a Bitcoin transaction is sent through a synchronous endpoint.
*/
export interface IBitcoinTransactionSentResponse {
hash: string;
}
/**
* Represents the transaction status after a sweep operation
*/
export interface IBitcoinSweepResult extends Pick<IBitcoinTransaction, "status" | "blockNr"> {
hash: string | null;
}
/**
* Represents the output of an asynchronous request for Bitcoin transactions
*/
export interface IAsyncBitcoinTransactionOutput {
hash: string;
blockNr: number | null;
status: string;
}
/**
* Represents information about a Bitcoin wallet
*/
export interface IBtcWalletBalance extends IWalletBalance {
utxo: number;
}
export interface IBtcRecipient {
to?: string;
wallet?: string;
amount?: string;
}
export interface IBtcStatus extends INodeStatus<IBtcNodeInfo> {
}
interface IBtcNodeInfo {
version: number | null;
protocolversion: number | null;
blocks: number | null;
timeoffset: number | null;
connections: number | null;
difficulty: number | null;
testnet: boolean | null;
relayfee: number | null;
}
export {};