@secux/app-btc
Version:
SecuX Hardware Wallet BTC API
63 lines (59 loc) • 1.91 kB
TypeScript
/*!
Copyright 2022 SecuX Technology Inc
Copyright Chen Wei-En
Copyright Wu Tsung-Yu
Licensed under the Apache License, Version 2.0 (the License);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an AS IS BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/// <reference types="node" />
/// <reference types="node" />
import { Psbt } from "bip174";
import { PsbtGlobal, PsbtInput, PsbtOutput, TransactionFromBuffer } from "bip174/src/lib/interfaces";
import { BigNumber } from "bignumber.js";
export declare class Psbtv2 extends Psbt {
static fromBuffer<T extends typeof Psbt>(this: T, buffer: Buffer, txFromBuffer: TransactionFromBuffer): InstanceType<T>;
}
export interface PsbtGlobalv2 extends PsbtGlobal {
txVersion?: number;
fallbackLocktime?: number;
txModifiable?: boolean;
version?: number;
}
export interface PsbtInputv2 extends PsbtInput {
prevTXID?: string;
prevOutputIndex?: number;
tapKeySig?: Buffer;
tapScriptSigs: {
[scriptkey: string]: Buffer;
};
tapScripts: {
[script: string]: Set<string>;
};
tapBip32Paths: {
[xonly: string]: {
leafHashs: Set<string>;
Bip32Derivation: Buffer;
};
};
tapInternalKey?: Buffer;
tapMarkleRoot?: string;
}
export interface PsbtOutputv2 extends PsbtOutput {
amount?: BigNumber;
script?: Buffer;
tapInternalKey?: Buffer;
tapTree?: Buffer;
tapBip32Paths: {
[xonly: string]: {
leafHashs: Set<string>;
Bip32Derivation: Buffer;
};
};
}