@ducatus/ducatus-wallet-service-rev
Version:
A service for Mutisig HD Bitcoin Wallets
173 lines • 4.59 kB
TypeScript
import { TxProposalLegacy } from './txproposal_legacy';
declare enum SwapStatusesEnum {
WaitingForValidation = "WAITING_FOR_VALIDATION",
InsufficientAmount = "INSUFFICIENT_AMOUNT",
WaitingFor_Relay = "WAITING_FOR_RELAY",
InsufficientTokenBalance = "INSUFFICIENT_TOKEN_BALANCE",
InsufficientBalance = "INSUFFICIENT_BALANCE",
Pending = "PENDING",
Success = "SUCCESS",
Revert = "REVERT",
Fail = "FAIL",
WaitingForReturn = "WAITING_FOR_RETURN",
PendingReturn = "PENDING_RETURN",
Return = "RETURN"
}
export interface IStatusHistory {
status: SwapStatusesEnum;
date: string;
}
export interface ISwapTx {
txid: string;
status: SwapStatusesEnum;
convertedFrom: 'DUC' | 'DUCX' | 'ETH' | 'BTC';
convertedFromAmount: string;
convertedTo: 'DUC' | 'DUCX' | 'WDUCX';
convertedToAmount: string;
sentFrom: string;
sentTo: string;
statusHistory: IStatusHistory[];
}
export interface ITxProposal {
type: string;
creatorName: string;
createdOn: number;
txid: string;
id: string;
walletId: string;
creatorId: string;
coin: string;
network: string;
message: string;
payProUrl: string;
from: string;
changeAddress: string;
inputs: any[];
outputs: Array<{
amount: number;
address: string;
toAddress?: string;
message?: string;
data?: string;
gasLimit?: number;
script?: string;
}>;
outputOrder: number;
walletM: number;
walletN: number;
requiredSignatures: number;
requiredRejections: number;
status: string;
actions: [];
feeLevel: number;
feePerKb: number;
excludeUnconfirmedUtxos: boolean;
addressType: string;
customData: any;
amount: string;
fee: number;
version: number;
broadcastedOn: number;
inputPaths: string;
proposalSignature: string;
proposalSignaturePubKey: string;
proposalSignaturePubKeySig: string;
lowFees: boolean;
nonce?: number;
gasPrice?: number;
gasLimit?: number;
data?: string;
tokenAddress?: string;
destinationTag?: string;
invoiceID?: string;
wDucxAddress?: string;
swap?: ISwapTx;
}
export declare class TxProposal {
type: string;
creatorName: string;
createdOn: number;
id: string;
txid: string;
walletId: string;
creatorId: string;
coin: string;
network: string;
message: string;
payProUrl: string;
from: string;
changeAddress: any;
inputs: any[];
outputs: Array<{
amount: number;
address?: string;
toAddress?: string;
message?: string;
data?: string;
gasLimit?: number;
script?: string;
satoshis?: number;
}>;
outputOrder: number[];
walletM: number;
walletN: number;
requiredSignatures: number;
requiredRejections: number;
status: string;
actions: any[];
feeLevel: number;
feePerKb: number;
excludeUnconfirmedUtxos: boolean;
addressType: string;
customData: any;
amount: string | number;
fee: number;
version: number;
broadcastedOn: number;
inputPaths: string | any[];
proposalSignature: string;
proposalSignaturePubKey: string;
proposalSignaturePubKeySig: string;
raw?: Array<string> | string;
nonce?: number;
gasPrice?: number;
gasLimit?: number;
data?: string;
tokenAddress?: string;
tokenId?: string;
destinationTag?: string;
invoiceID?: string;
wDucxAddress?: string;
swap?: ISwapTx;
static create(opts: any): TxProposal;
static fromObj(obj: any): TxProposalLegacy | TxProposal;
toObject(): any;
setInputs(inputs: any): void;
_updateStatus(): void;
_buildTx(): any;
_getCurrentSignatures(): {
signatures: any;
xpub: any;
}[];
getBitcoreTx(): any;
getRawTx(): any;
getEstimatedSizeForSingleInput(): number;
getEstimatedSize(): number;
getEstimatedFee(): number;
estimateFee(): void;
getTotalAmount(): number;
getActors(): any[];
getApprovers(): any[];
getActionBy(copayerId: any): any;
addAction(copayerId: any, type: any, comment: any, signatures?: any, xpub?: any): void;
sign(copayerId: any, signatures: any, xpub: any): boolean;
reject(copayerId: any, reason: any): void;
isTemporary(): boolean;
isPending(): boolean;
isAccepted(): boolean;
isRejected(): boolean;
isBroadcasted(): boolean;
setBroadcasted(): void;
}
export {};
//# sourceMappingURL=txproposal.d.ts.map