@teleportdao/bitcoin 2.0.4 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bitcoin-interface-ordinal.d.ts +108 -108
- package/dist/bitcoin-interface-ordinal.js +140 -140
- package/dist/bitcoin-interface-teleswap.d.ts +101 -101
- package/dist/bitcoin-interface-teleswap.d.ts.map +1 -1
- package/dist/bitcoin-interface-teleswap.js +176 -165
- package/dist/bitcoin-interface-teleswap.js.map +1 -1
- package/dist/bitcoin-interface-utils.d.ts +20 -20
- package/dist/bitcoin-interface-utils.js +45 -45
- package/dist/bitcoin-interface-wallet.d.ts +28 -28
- package/dist/bitcoin-interface-wallet.js +125 -125
- package/dist/bitcoin-interface.d.ts +66 -66
- package/dist/bitcoin-interface.js +119 -119
- package/dist/bitcoin-utils.d.ts +96 -96
- package/dist/bitcoin-utils.js +514 -514
- package/dist/bitcoin-wallet-base.d.ts +111 -111
- package/dist/bitcoin-wallet-base.js +258 -258
- package/dist/helper/brc20-helper.d.ts +42 -42
- package/dist/helper/brc20-helper.js +127 -127
- package/dist/helper/index.d.ts +3 -3
- package/dist/helper/index.js +29 -29
- package/dist/helper/ordinal-helper.d.ts +12 -12
- package/dist/helper/ordinal-helper.js +129 -129
- package/dist/helper/teleswap-helper.d.ts +95 -95
- package/dist/helper/teleswap-helper.js +186 -186
- package/dist/index.d.ts +12 -12
- package/dist/index.js +41 -41
- package/dist/ordinal-wallet.d.ts +495 -495
- package/dist/ordinal-wallet.js +386 -386
- package/dist/sign/index.d.ts +1 -1
- package/dist/sign/index.js +8 -8
- package/dist/sign/sign-transaction.d.ts +12 -12
- package/dist/sign/sign-transaction.js +82 -82
- package/dist/teleswap-wallet.d.ts +45 -45
- package/dist/teleswap-wallet.js +68 -68
- package/dist/transaction-builder/bitcoin-transaction-builder.d.ts +9 -9
- package/dist/transaction-builder/bitcoin-transaction-builder.js +54 -54
- package/dist/transaction-builder/index.d.ts +3 -3
- package/dist/transaction-builder/index.js +19 -19
- package/dist/transaction-builder/ordinal-transaction-builder.d.ts +63 -63
- package/dist/transaction-builder/ordinal-transaction-builder.js +125 -125
- package/dist/transaction-builder/transaction-builder.d.ts +223 -223
- package/dist/transaction-builder/transaction-builder.js +447 -447
- package/dist/type.d.ts +61 -61
- package/dist/type.js +2 -2
- package/dist/utils/networks.d.ts +5 -5
- package/dist/utils/networks.js +53 -53
- package/dist/utils/tools.d.ts +18 -18
- package/dist/utils/tools.js +74 -74
- package/package.json +4 -4
- package/src/bitcoin-interface-ordinal.ts +185 -185
- package/src/bitcoin-interface-teleswap.ts +251 -237
- package/src/bitcoin-interface-utils.ts +60 -60
- package/src/bitcoin-interface-wallet.ts +114 -114
- package/src/bitcoin-interface.ts +156 -156
- package/src/bitcoin-utils.ts +591 -591
- package/src/bitcoin-wallet-base.ts +344 -344
- package/src/helper/brc20-helper.ts +179 -179
- package/src/helper/ordinal-helper.ts +118 -118
- package/src/index.ts +15 -15
- package/src/ordinal-wallet.ts +659 -659
- package/src/sign/index.ts +1 -1
- package/src/sign/sign-transaction.ts +108 -108
- package/src/teleswap-wallet.ts +133 -133
- package/src/transaction-builder/bitcoin-transaction-builder.ts +26 -26
- package/src/transaction-builder/index.ts +3 -3
- package/src/transaction-builder/ordinal-transaction-builder.ts +139 -139
- package/src/transaction-builder/transaction-builder.ts +690 -690
- package/src/type.ts +74 -74
- package/src/utils/networks.ts +33 -33
- package/src/utils/tools.ts +92 -92
- package/tsconfig.json +9 -9
- package/webpack.config.js +16 -16
- package/.tmp/block-parser.ts +0 -58
- package/.tmp/check.ts +0 -101
- package/.tmp/ordinal-helper.ts +0 -133
- package/.tmp/ordinal.ts +0 -25
- package/.tmp/psbt/sign-transaction.ts +0 -121
- package/.tmp/rbf.ts +0 -45
|
@@ -1,224 +1,224 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import * as bitcoin from "bitcoinjs-lib";
|
|
3
|
-
export declare const componentBytes: {
|
|
4
|
-
bytePerInput: {
|
|
5
|
-
p2pkh: number;
|
|
6
|
-
p2wpkh: number;
|
|
7
|
-
"p2sh-p2wpkh": number;
|
|
8
|
-
p2tr: number;
|
|
9
|
-
default: number;
|
|
10
|
-
};
|
|
11
|
-
baseTxBytes: number;
|
|
12
|
-
bytePerOutput: {
|
|
13
|
-
p2pkh: number;
|
|
14
|
-
p2wpkh: number;
|
|
15
|
-
p2sh: number;
|
|
16
|
-
p2tr: number;
|
|
17
|
-
default: number;
|
|
18
|
-
max: number;
|
|
19
|
-
};
|
|
20
|
-
scriptExtraBytes: {
|
|
21
|
-
lessThan255: number;
|
|
22
|
-
moreThan255: number;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
export declare const DUST = 1000;
|
|
26
|
-
export type Utxo = {
|
|
27
|
-
hash: string;
|
|
28
|
-
value: number;
|
|
29
|
-
index: number;
|
|
30
|
-
};
|
|
31
|
-
export type SignerInfo = {
|
|
32
|
-
address: string;
|
|
33
|
-
publicKey: string;
|
|
34
|
-
addressType: string;
|
|
35
|
-
derivationPath?: string;
|
|
36
|
-
masterFingerprint?: string;
|
|
37
|
-
includeHex?: boolean;
|
|
38
|
-
};
|
|
39
|
-
export type ExtendedUtxo = {
|
|
40
|
-
signerInfo: SignerInfo;
|
|
41
|
-
hash: string;
|
|
42
|
-
value: number;
|
|
43
|
-
index: number;
|
|
44
|
-
};
|
|
45
|
-
export type TargetAddress = {
|
|
46
|
-
address: string;
|
|
47
|
-
value: number;
|
|
48
|
-
};
|
|
49
|
-
export type TargetScript = {
|
|
50
|
-
script: Buffer;
|
|
51
|
-
value: number;
|
|
52
|
-
};
|
|
53
|
-
export type Target = TargetAddress | TargetScript;
|
|
54
|
-
export type ChangeTarget = TargetAddress & {
|
|
55
|
-
bip32Derivation?: {
|
|
56
|
-
path: string;
|
|
57
|
-
pubkey: Buffer;
|
|
58
|
-
masterFingerprint: Buffer;
|
|
59
|
-
}[];
|
|
60
|
-
};
|
|
61
|
-
export type BitcoinJSInputInfo = ExtendedUtxo & {
|
|
62
|
-
bip32Derivation?: {
|
|
63
|
-
path: string;
|
|
64
|
-
pubkey: Buffer;
|
|
65
|
-
masterFingerprint: Buffer;
|
|
66
|
-
}[];
|
|
67
|
-
nonWitnessUtxo?: Buffer;
|
|
68
|
-
witnessUtxo?: {
|
|
69
|
-
script: Buffer;
|
|
70
|
-
value: number;
|
|
71
|
-
};
|
|
72
|
-
redeemScript?: Buffer;
|
|
73
|
-
tapInternalKey?: Buffer;
|
|
74
|
-
};
|
|
75
|
-
export type ExtendedUnsignedTransaction = {
|
|
76
|
-
unsignedTransaction: string;
|
|
77
|
-
outputs: Target[];
|
|
78
|
-
inputs: {
|
|
79
|
-
hash: string;
|
|
80
|
-
value: number;
|
|
81
|
-
index: number;
|
|
82
|
-
signerInfo: SignerInfo;
|
|
83
|
-
}[];
|
|
84
|
-
fee: number;
|
|
85
|
-
change: TargetAddress | undefined;
|
|
86
|
-
};
|
|
87
|
-
export declare class BaseTransactionBuilder {
|
|
88
|
-
testnet: boolean;
|
|
89
|
-
network: bitcoin.Network;
|
|
90
|
-
maximumNumberOfOutputsInTransaction: number;
|
|
91
|
-
feeMin: number;
|
|
92
|
-
dustLimit: number;
|
|
93
|
-
constructor({ network, testnet, feeMin, dustLimit, maximumNumberOfOutputsInTransaction, }: {
|
|
94
|
-
network: bitcoin.Network;
|
|
95
|
-
testnet: boolean;
|
|
96
|
-
feeMin?: number;
|
|
97
|
-
dustLimit?: number;
|
|
98
|
-
maximumNumberOfOutputsInTransaction?: number;
|
|
99
|
-
});
|
|
100
|
-
_getTransactionHex(transactionId: string): Promise<string>;
|
|
101
|
-
createAddressObject(input: {
|
|
102
|
-
addressType: string;
|
|
103
|
-
publicKey: Buffer;
|
|
104
|
-
}): bitcoin.payments.Payment;
|
|
105
|
-
validateAddress(address: string): boolean;
|
|
106
|
-
getOpReturnTarget(dataHex: string): {
|
|
107
|
-
script: Buffer;
|
|
108
|
-
value: number;
|
|
109
|
-
};
|
|
110
|
-
calculateTxSize(inputTypes: string[], outputs: {
|
|
111
|
-
script?: Buffer;
|
|
112
|
-
address?: string;
|
|
113
|
-
value: number;
|
|
114
|
-
}[], changeAddressType?: string): number;
|
|
115
|
-
helperHandleInputsAndOutputs({ targets, extendedUtxo, feeRate, changeObject, selectType, }: {
|
|
116
|
-
extendedUtxo: ExtendedUtxo[];
|
|
117
|
-
targets: Target[];
|
|
118
|
-
feeRate: number;
|
|
119
|
-
changeObject?: {
|
|
120
|
-
address: string;
|
|
121
|
-
publicKey?: string;
|
|
122
|
-
addressType?: string;
|
|
123
|
-
derivationPath?: string;
|
|
124
|
-
masterFingerprint?: string;
|
|
125
|
-
};
|
|
126
|
-
selectType?: "normal" | "accumulative" | "full" | "inOrder";
|
|
127
|
-
}): {
|
|
128
|
-
inputs: ExtendedUtxo[];
|
|
129
|
-
fee: number;
|
|
130
|
-
outputs: Target[];
|
|
131
|
-
change: ChangeTarget | undefined;
|
|
132
|
-
};
|
|
133
|
-
filterAndConvertTxDataToStandardFormat({ extendedUtxo, targets, changeObject, feeRate, selectType, }: {
|
|
134
|
-
extendedUtxo: ExtendedUtxo[];
|
|
135
|
-
targets: Target[];
|
|
136
|
-
feeRate: number;
|
|
137
|
-
changeObject?: {
|
|
138
|
-
address: string;
|
|
139
|
-
publicKey?: string;
|
|
140
|
-
addressType?: string;
|
|
141
|
-
derivationPath?: string;
|
|
142
|
-
masterFingerprint?: string;
|
|
143
|
-
};
|
|
144
|
-
selectType?: "normal" | "accumulative" | "full" | "inOrder";
|
|
145
|
-
}): Promise<{
|
|
146
|
-
inputs: (ExtendedUtxo & {
|
|
147
|
-
bip32Derivation?: {
|
|
148
|
-
path: string;
|
|
149
|
-
pubkey: Buffer;
|
|
150
|
-
masterFingerprint: Buffer;
|
|
151
|
-
}[] | undefined;
|
|
152
|
-
nonWitnessUtxo?: Buffer | undefined;
|
|
153
|
-
witnessUtxo?: {
|
|
154
|
-
script: Buffer;
|
|
155
|
-
value: number;
|
|
156
|
-
} | undefined;
|
|
157
|
-
redeemScript?: Buffer | undefined;
|
|
158
|
-
tapInternalKey?: Buffer | undefined;
|
|
159
|
-
} & {
|
|
160
|
-
signerInfo: SignerInfo;
|
|
161
|
-
})[];
|
|
162
|
-
outputs: Target[];
|
|
163
|
-
change: ChangeTarget | undefined;
|
|
164
|
-
fee: number;
|
|
165
|
-
feeRate: number;
|
|
166
|
-
}>;
|
|
167
|
-
convertExtendedUtxoToInputs(baseInputs?: ExtendedUtxo[]): Promise<(ExtendedUtxo & {
|
|
168
|
-
bip32Derivation?: {
|
|
169
|
-
path: string;
|
|
170
|
-
pubkey: Buffer;
|
|
171
|
-
masterFingerprint: Buffer;
|
|
172
|
-
}[] | undefined;
|
|
173
|
-
nonWitnessUtxo?: Buffer | undefined;
|
|
174
|
-
witnessUtxo?: {
|
|
175
|
-
script: Buffer;
|
|
176
|
-
value: number;
|
|
177
|
-
} | undefined;
|
|
178
|
-
redeemScript?: Buffer | undefined;
|
|
179
|
-
tapInternalKey?: Buffer | undefined;
|
|
180
|
-
} & {
|
|
181
|
-
signerInfo: SignerInfo;
|
|
182
|
-
})[]>;
|
|
183
|
-
createUnsignedTransaction({ inputs, outputs, change, fee, feeRate, }: {
|
|
184
|
-
inputs: BitcoinJSInputInfo[];
|
|
185
|
-
outputs: Target[];
|
|
186
|
-
change?: ChangeTarget;
|
|
187
|
-
fee: number;
|
|
188
|
-
feeRate: number;
|
|
189
|
-
}): {
|
|
190
|
-
unsignedTransaction: string;
|
|
191
|
-
outputs: Target[];
|
|
192
|
-
inputs: {
|
|
193
|
-
hash: string;
|
|
194
|
-
value: number;
|
|
195
|
-
index: number;
|
|
196
|
-
signerInfo: SignerInfo;
|
|
197
|
-
}[];
|
|
198
|
-
fee: number;
|
|
199
|
-
change: ChangeTarget | undefined;
|
|
200
|
-
possibleTxId: string | undefined;
|
|
201
|
-
};
|
|
202
|
-
processUnsignedTransaction({ extendedUtxo, targets, changeAddress, fullAmount, feeRate, selectType, }: {
|
|
203
|
-
extendedUtxo: ExtendedUtxo[];
|
|
204
|
-
targets: Target[];
|
|
205
|
-
feeRate: number;
|
|
206
|
-
changeAddress?: string | SignerInfo;
|
|
207
|
-
fullAmount?: boolean;
|
|
208
|
-
selectType?: "normal" | "accumulative" | "full" | "inOrder";
|
|
209
|
-
}): Promise<{
|
|
210
|
-
unsignedTransaction: string;
|
|
211
|
-
outputs: Target[];
|
|
212
|
-
inputs: {
|
|
213
|
-
hash: string;
|
|
214
|
-
value: number;
|
|
215
|
-
index: number;
|
|
216
|
-
signerInfo: SignerInfo;
|
|
217
|
-
}[];
|
|
218
|
-
fee: number;
|
|
219
|
-
change: ChangeTarget | undefined;
|
|
220
|
-
possibleTxId: string | undefined;
|
|
221
|
-
}>;
|
|
222
|
-
getUnsignedPsbtTxId(unsignedPsbt: string): string;
|
|
223
|
-
}
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import * as bitcoin from "bitcoinjs-lib";
|
|
3
|
+
export declare const componentBytes: {
|
|
4
|
+
bytePerInput: {
|
|
5
|
+
p2pkh: number;
|
|
6
|
+
p2wpkh: number;
|
|
7
|
+
"p2sh-p2wpkh": number;
|
|
8
|
+
p2tr: number;
|
|
9
|
+
default: number;
|
|
10
|
+
};
|
|
11
|
+
baseTxBytes: number;
|
|
12
|
+
bytePerOutput: {
|
|
13
|
+
p2pkh: number;
|
|
14
|
+
p2wpkh: number;
|
|
15
|
+
p2sh: number;
|
|
16
|
+
p2tr: number;
|
|
17
|
+
default: number;
|
|
18
|
+
max: number;
|
|
19
|
+
};
|
|
20
|
+
scriptExtraBytes: {
|
|
21
|
+
lessThan255: number;
|
|
22
|
+
moreThan255: number;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare const DUST = 1000;
|
|
26
|
+
export type Utxo = {
|
|
27
|
+
hash: string;
|
|
28
|
+
value: number;
|
|
29
|
+
index: number;
|
|
30
|
+
};
|
|
31
|
+
export type SignerInfo = {
|
|
32
|
+
address: string;
|
|
33
|
+
publicKey: string;
|
|
34
|
+
addressType: string;
|
|
35
|
+
derivationPath?: string;
|
|
36
|
+
masterFingerprint?: string;
|
|
37
|
+
includeHex?: boolean;
|
|
38
|
+
};
|
|
39
|
+
export type ExtendedUtxo = {
|
|
40
|
+
signerInfo: SignerInfo;
|
|
41
|
+
hash: string;
|
|
42
|
+
value: number;
|
|
43
|
+
index: number;
|
|
44
|
+
};
|
|
45
|
+
export type TargetAddress = {
|
|
46
|
+
address: string;
|
|
47
|
+
value: number;
|
|
48
|
+
};
|
|
49
|
+
export type TargetScript = {
|
|
50
|
+
script: Buffer;
|
|
51
|
+
value: number;
|
|
52
|
+
};
|
|
53
|
+
export type Target = TargetAddress | TargetScript;
|
|
54
|
+
export type ChangeTarget = TargetAddress & {
|
|
55
|
+
bip32Derivation?: {
|
|
56
|
+
path: string;
|
|
57
|
+
pubkey: Buffer;
|
|
58
|
+
masterFingerprint: Buffer;
|
|
59
|
+
}[];
|
|
60
|
+
};
|
|
61
|
+
export type BitcoinJSInputInfo = ExtendedUtxo & {
|
|
62
|
+
bip32Derivation?: {
|
|
63
|
+
path: string;
|
|
64
|
+
pubkey: Buffer;
|
|
65
|
+
masterFingerprint: Buffer;
|
|
66
|
+
}[];
|
|
67
|
+
nonWitnessUtxo?: Buffer;
|
|
68
|
+
witnessUtxo?: {
|
|
69
|
+
script: Buffer;
|
|
70
|
+
value: number;
|
|
71
|
+
};
|
|
72
|
+
redeemScript?: Buffer;
|
|
73
|
+
tapInternalKey?: Buffer;
|
|
74
|
+
};
|
|
75
|
+
export type ExtendedUnsignedTransaction = {
|
|
76
|
+
unsignedTransaction: string;
|
|
77
|
+
outputs: Target[];
|
|
78
|
+
inputs: {
|
|
79
|
+
hash: string;
|
|
80
|
+
value: number;
|
|
81
|
+
index: number;
|
|
82
|
+
signerInfo: SignerInfo;
|
|
83
|
+
}[];
|
|
84
|
+
fee: number;
|
|
85
|
+
change: TargetAddress | undefined;
|
|
86
|
+
};
|
|
87
|
+
export declare class BaseTransactionBuilder {
|
|
88
|
+
testnet: boolean;
|
|
89
|
+
network: bitcoin.Network;
|
|
90
|
+
maximumNumberOfOutputsInTransaction: number;
|
|
91
|
+
feeMin: number;
|
|
92
|
+
dustLimit: number;
|
|
93
|
+
constructor({ network, testnet, feeMin, dustLimit, maximumNumberOfOutputsInTransaction, }: {
|
|
94
|
+
network: bitcoin.Network;
|
|
95
|
+
testnet: boolean;
|
|
96
|
+
feeMin?: number;
|
|
97
|
+
dustLimit?: number;
|
|
98
|
+
maximumNumberOfOutputsInTransaction?: number;
|
|
99
|
+
});
|
|
100
|
+
_getTransactionHex(transactionId: string): Promise<string>;
|
|
101
|
+
createAddressObject(input: {
|
|
102
|
+
addressType: string;
|
|
103
|
+
publicKey: Buffer;
|
|
104
|
+
}): bitcoin.payments.Payment;
|
|
105
|
+
validateAddress(address: string): boolean;
|
|
106
|
+
getOpReturnTarget(dataHex: string): {
|
|
107
|
+
script: Buffer;
|
|
108
|
+
value: number;
|
|
109
|
+
};
|
|
110
|
+
calculateTxSize(inputTypes: string[], outputs: {
|
|
111
|
+
script?: Buffer;
|
|
112
|
+
address?: string;
|
|
113
|
+
value: number;
|
|
114
|
+
}[], changeAddressType?: string): number;
|
|
115
|
+
helperHandleInputsAndOutputs({ targets, extendedUtxo, feeRate, changeObject, selectType, }: {
|
|
116
|
+
extendedUtxo: ExtendedUtxo[];
|
|
117
|
+
targets: Target[];
|
|
118
|
+
feeRate: number;
|
|
119
|
+
changeObject?: {
|
|
120
|
+
address: string;
|
|
121
|
+
publicKey?: string;
|
|
122
|
+
addressType?: string;
|
|
123
|
+
derivationPath?: string;
|
|
124
|
+
masterFingerprint?: string;
|
|
125
|
+
};
|
|
126
|
+
selectType?: "normal" | "accumulative" | "full" | "inOrder";
|
|
127
|
+
}): {
|
|
128
|
+
inputs: ExtendedUtxo[];
|
|
129
|
+
fee: number;
|
|
130
|
+
outputs: Target[];
|
|
131
|
+
change: ChangeTarget | undefined;
|
|
132
|
+
};
|
|
133
|
+
filterAndConvertTxDataToStandardFormat({ extendedUtxo, targets, changeObject, feeRate, selectType, }: {
|
|
134
|
+
extendedUtxo: ExtendedUtxo[];
|
|
135
|
+
targets: Target[];
|
|
136
|
+
feeRate: number;
|
|
137
|
+
changeObject?: {
|
|
138
|
+
address: string;
|
|
139
|
+
publicKey?: string;
|
|
140
|
+
addressType?: string;
|
|
141
|
+
derivationPath?: string;
|
|
142
|
+
masterFingerprint?: string;
|
|
143
|
+
};
|
|
144
|
+
selectType?: "normal" | "accumulative" | "full" | "inOrder";
|
|
145
|
+
}): Promise<{
|
|
146
|
+
inputs: (ExtendedUtxo & {
|
|
147
|
+
bip32Derivation?: {
|
|
148
|
+
path: string;
|
|
149
|
+
pubkey: Buffer;
|
|
150
|
+
masterFingerprint: Buffer;
|
|
151
|
+
}[] | undefined;
|
|
152
|
+
nonWitnessUtxo?: Buffer | undefined;
|
|
153
|
+
witnessUtxo?: {
|
|
154
|
+
script: Buffer;
|
|
155
|
+
value: number;
|
|
156
|
+
} | undefined;
|
|
157
|
+
redeemScript?: Buffer | undefined;
|
|
158
|
+
tapInternalKey?: Buffer | undefined;
|
|
159
|
+
} & {
|
|
160
|
+
signerInfo: SignerInfo;
|
|
161
|
+
})[];
|
|
162
|
+
outputs: Target[];
|
|
163
|
+
change: ChangeTarget | undefined;
|
|
164
|
+
fee: number;
|
|
165
|
+
feeRate: number;
|
|
166
|
+
}>;
|
|
167
|
+
convertExtendedUtxoToInputs(baseInputs?: ExtendedUtxo[]): Promise<(ExtendedUtxo & {
|
|
168
|
+
bip32Derivation?: {
|
|
169
|
+
path: string;
|
|
170
|
+
pubkey: Buffer;
|
|
171
|
+
masterFingerprint: Buffer;
|
|
172
|
+
}[] | undefined;
|
|
173
|
+
nonWitnessUtxo?: Buffer | undefined;
|
|
174
|
+
witnessUtxo?: {
|
|
175
|
+
script: Buffer;
|
|
176
|
+
value: number;
|
|
177
|
+
} | undefined;
|
|
178
|
+
redeemScript?: Buffer | undefined;
|
|
179
|
+
tapInternalKey?: Buffer | undefined;
|
|
180
|
+
} & {
|
|
181
|
+
signerInfo: SignerInfo;
|
|
182
|
+
})[]>;
|
|
183
|
+
createUnsignedTransaction({ inputs, outputs, change, fee, feeRate, }: {
|
|
184
|
+
inputs: BitcoinJSInputInfo[];
|
|
185
|
+
outputs: Target[];
|
|
186
|
+
change?: ChangeTarget;
|
|
187
|
+
fee: number;
|
|
188
|
+
feeRate: number;
|
|
189
|
+
}): {
|
|
190
|
+
unsignedTransaction: string;
|
|
191
|
+
outputs: Target[];
|
|
192
|
+
inputs: {
|
|
193
|
+
hash: string;
|
|
194
|
+
value: number;
|
|
195
|
+
index: number;
|
|
196
|
+
signerInfo: SignerInfo;
|
|
197
|
+
}[];
|
|
198
|
+
fee: number;
|
|
199
|
+
change: ChangeTarget | undefined;
|
|
200
|
+
possibleTxId: string | undefined;
|
|
201
|
+
};
|
|
202
|
+
processUnsignedTransaction({ extendedUtxo, targets, changeAddress, fullAmount, feeRate, selectType, }: {
|
|
203
|
+
extendedUtxo: ExtendedUtxo[];
|
|
204
|
+
targets: Target[];
|
|
205
|
+
feeRate: number;
|
|
206
|
+
changeAddress?: string | SignerInfo;
|
|
207
|
+
fullAmount?: boolean;
|
|
208
|
+
selectType?: "normal" | "accumulative" | "full" | "inOrder";
|
|
209
|
+
}): Promise<{
|
|
210
|
+
unsignedTransaction: string;
|
|
211
|
+
outputs: Target[];
|
|
212
|
+
inputs: {
|
|
213
|
+
hash: string;
|
|
214
|
+
value: number;
|
|
215
|
+
index: number;
|
|
216
|
+
signerInfo: SignerInfo;
|
|
217
|
+
}[];
|
|
218
|
+
fee: number;
|
|
219
|
+
change: ChangeTarget | undefined;
|
|
220
|
+
possibleTxId: string | undefined;
|
|
221
|
+
}>;
|
|
222
|
+
getUnsignedPsbtTxId(unsignedPsbt: string): string;
|
|
223
|
+
}
|
|
224
224
|
//# sourceMappingURL=transaction-builder.d.ts.map
|