@swapkit/wallet-hardware 4.7.0 → 4.8.1
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/chunk-3yr76n9s.js +5 -0
- package/dist/chunk-3yr76n9s.js.map +10 -0
- package/dist/chunk-3zf2pqfd.js +4 -0
- package/dist/chunk-3zf2pqfd.js.map +10 -0
- package/dist/{chunk-e5bb5ftj.js → chunk-9tg9jj9j.js} +3 -3
- package/dist/{chunk-e5bb5ftj.js.map → chunk-9tg9jj9j.js.map} +1 -1
- package/dist/chunk-mrsfcest.js +4 -0
- package/dist/chunk-mrsfcest.js.map +10 -0
- package/dist/{chunk-25q3rr1d.js → chunk-n05bv2n5.js} +3 -3
- package/dist/{chunk-25q3rr1d.js.map → chunk-n05bv2n5.js.map} +1 -1
- package/dist/chunk-px09mwnt.js +4 -0
- package/dist/chunk-px09mwnt.js.map +10 -0
- package/dist/{chunk-w5xy6rdj.js → chunk-vwv6z2mk.js} +2 -2
- package/dist/chunk-x85da57j.js +4 -0
- package/dist/chunk-x85da57j.js.map +10 -0
- package/dist/chunk-y3yvq1zt.js +4 -0
- package/dist/chunk-y3yvq1zt.js.map +10 -0
- package/dist/keepkey/index.cjs +2 -2
- package/dist/keepkey/index.cjs.map +3 -3
- package/dist/keepkey/index.js +2 -2
- package/dist/keepkey/index.js.map +3 -3
- package/dist/ledger/index.cjs +3 -3
- package/dist/ledger/index.cjs.map +5 -6
- package/dist/ledger/index.js +3 -3
- package/dist/ledger/index.js.map +5 -6
- package/dist/trezor/index.cjs +2 -2
- package/dist/trezor/index.cjs.map +3 -3
- package/dist/trezor/index.js +2 -2
- package/dist/trezor/index.js.map +3 -3
- package/dist/types/keepkey/chains/utxo.d.ts +5 -341
- package/dist/types/keepkey/chains/utxo.d.ts.map +1 -1
- package/dist/types/ledger/clients/thorchain/lib.d.ts.map +1 -1
- package/dist/types/ledger/clients/utxo-legacy-adapter.d.ts +31 -0
- package/dist/types/ledger/clients/utxo-legacy-adapter.d.ts.map +1 -0
- package/dist/types/ledger/clients/utxo-psbt.d.ts +15 -0
- package/dist/types/ledger/clients/utxo-psbt.d.ts.map +1 -0
- package/dist/types/ledger/index.d.ts.map +1 -1
- package/dist/types/trezor/index.d.ts.map +1 -1
- package/package.json +7 -9
- /package/dist/{chunk-w5xy6rdj.js.map → chunk-vwv6z2mk.js.map} +0 -0
|
@@ -1,348 +1,12 @@
|
|
|
1
1
|
import type { KeepKeySdk } from "@keepkey/keepkey-sdk";
|
|
2
|
-
import { Chain, type DerivationPathArray,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
addressNList: number[];
|
|
7
|
-
scriptType: string;
|
|
8
|
-
amount: string;
|
|
9
|
-
vout: number;
|
|
10
|
-
txid: string;
|
|
11
|
-
hex: string;
|
|
12
|
-
}
|
|
2
|
+
import { Chain, type DerivationPathArray, type UTXOChain } from "@swapkit/helpers";
|
|
3
|
+
type KeepKeyUTXOWalletMethods = Record<string, unknown> & {
|
|
4
|
+
address: string;
|
|
5
|
+
};
|
|
13
6
|
export declare function utxoWalletMethods({ sdk, chain, derivationPath, }: {
|
|
14
7
|
sdk: KeepKeySdk;
|
|
15
8
|
chain: Exclude<UTXOChain, typeof Chain.Zcash>;
|
|
16
9
|
derivationPath?: DerivationPathArray;
|
|
17
|
-
}): Promise<
|
|
18
|
-
address: string;
|
|
19
|
-
deriveAddressAtIndex: ({ index, change }: {
|
|
20
|
-
index: number;
|
|
21
|
-
change?: boolean;
|
|
22
|
-
}) => Promise<{
|
|
23
|
-
address: any;
|
|
24
|
-
change: boolean;
|
|
25
|
-
index: number;
|
|
26
|
-
pubkey: string;
|
|
27
|
-
} | undefined>;
|
|
28
|
-
getExtendedPublicKey: () => Promise<{
|
|
29
|
-
path: string;
|
|
30
|
-
xpub: string;
|
|
31
|
-
}>;
|
|
32
|
-
signTransaction: (tx: Transaction, inputs: KeepKeyInputObject[], memo?: string) => Promise<string>;
|
|
33
|
-
signTransactionWithMultipleInputs: (tx: Transaction, inputs: Array<{
|
|
34
|
-
hash: string;
|
|
35
|
-
index: number;
|
|
36
|
-
value: number;
|
|
37
|
-
txHex?: string;
|
|
38
|
-
derivationIndex: number;
|
|
39
|
-
isChange: boolean;
|
|
40
|
-
}>, memo?: string) => Promise<string>;
|
|
41
|
-
transfer: ({ recipient, feeOptionKey, feeRate, memo, ...rest }: GenericTransferParams) => Promise<string>;
|
|
42
|
-
transferFromMultipleAddresses: ({ utxos, recipient, assetValue, memo, feeRate, feeOptionKey, }: {
|
|
43
|
-
utxos: Array<{
|
|
44
|
-
hash: string;
|
|
45
|
-
index: number;
|
|
46
|
-
value: number;
|
|
47
|
-
txHex?: string;
|
|
48
|
-
derivationIndex: number;
|
|
49
|
-
isChange: boolean;
|
|
50
|
-
address: string;
|
|
51
|
-
}>;
|
|
52
|
-
recipient: string;
|
|
53
|
-
assetValue: {
|
|
54
|
-
getBaseValue: (unit: string) => number;
|
|
55
|
-
chain: string;
|
|
56
|
-
};
|
|
57
|
-
memo?: string;
|
|
58
|
-
feeRate?: number;
|
|
59
|
-
feeOptionKey?: (typeof FeeOption)[keyof typeof FeeOption];
|
|
60
|
-
}) => Promise<string>;
|
|
61
|
-
deriveAddresses: (params: {
|
|
62
|
-
count: number;
|
|
63
|
-
startIndex?: number;
|
|
64
|
-
change?: boolean;
|
|
65
|
-
}) => Promise<import("@swapkit/toolboxes/utxo").DerivedAddress[]>;
|
|
66
|
-
getAggregatedBalance: (gapLimit?: number) => Promise<import("@swapkit/toolboxes/utxo").AggregatedBalanceResult>;
|
|
67
|
-
getAggregatedUtxos: (gapLimit?: number) => Promise<import("@swapkit/toolboxes/utxo").UTXOForMultiAddressTransfer[]>;
|
|
68
|
-
scanForAddresses: (params?: {
|
|
69
|
-
gapLimit?: number;
|
|
70
|
-
change?: boolean;
|
|
71
|
-
}) => Promise<import("@swapkit/toolboxes/utxo").DerivedAddress[]>;
|
|
72
|
-
accumulative: typeof import("@swapkit/toolboxes/utxo").accumulative;
|
|
73
|
-
broadcastTx: (txHash: string) => Promise<string>;
|
|
74
|
-
bumpFee: ({ txid, newFeeRate, recipient, memo }: import("@swapkit/toolboxes/utxo").RBFTransactionParams) => Promise<{
|
|
75
|
-
newFee: number;
|
|
76
|
-
originalFee: number;
|
|
77
|
-
txid: string;
|
|
78
|
-
}>;
|
|
79
|
-
calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo").UTXOCalculateTxSizeParams) => number;
|
|
80
|
-
createKeysForPath: (params: {
|
|
81
|
-
wif?: string;
|
|
82
|
-
phrase?: string;
|
|
83
|
-
derivationPath?: string;
|
|
84
|
-
}) => {
|
|
85
|
-
privateKey: import("@swapkit/utxo-signer/utils").Bytes;
|
|
86
|
-
publicKey: Uint8Array<ArrayBufferLike>;
|
|
87
|
-
};
|
|
88
|
-
createReplacementTransaction: ({ txid, newFeeRate, recipient, memo, }: import("@swapkit/toolboxes/utxo").RBFTransactionParams) => Promise<import("node_modules/@swapkit/toolboxes/dist/types/utxo/toolbox/utxo").ReplacementTransactionResult>;
|
|
89
|
-
createTransaction: ({ assetValue, recipient, memo, feeRate, sender, fetchTxHex, enableRBF, }: import("@swapkit/toolboxes/utxo").UTXOBuildTxParams) => Promise<{
|
|
90
|
-
inputs: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
91
|
-
tx: Transaction;
|
|
92
|
-
utxos: {
|
|
93
|
-
address: string;
|
|
94
|
-
hash: string;
|
|
95
|
-
index: number;
|
|
96
|
-
txHex: string | undefined;
|
|
97
|
-
value: number;
|
|
98
|
-
witnessUtxo: {
|
|
99
|
-
script: Buffer<ArrayBuffer>;
|
|
100
|
-
value: number;
|
|
101
|
-
};
|
|
102
|
-
}[];
|
|
103
|
-
}>;
|
|
104
|
-
derivePrivateKeyAtIndex: ({ index, change }: import("@swapkit/toolboxes/utxo").DeriveAddressParams) => Uint8Array<ArrayBufferLike> | undefined;
|
|
105
|
-
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
106
|
-
from: string;
|
|
107
|
-
memo?: string;
|
|
108
|
-
feeRate?: number;
|
|
109
|
-
feeOptionKey?: FeeOption;
|
|
110
|
-
recipients?: number | import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
111
|
-
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
112
|
-
estimateTransactionFee: (params: {
|
|
113
|
-
assetValue: import("@swapkit/helpers").AssetValue;
|
|
114
|
-
recipient: string;
|
|
115
|
-
sender: string;
|
|
116
|
-
memo?: string;
|
|
117
|
-
feeOptionKey?: FeeOption;
|
|
118
|
-
feeRate?: number;
|
|
119
|
-
fetchTxHex?: boolean;
|
|
120
|
-
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
121
|
-
getAddress: () => string | Promise<string> | Promise<undefined>;
|
|
122
|
-
getAddressFromKeys: (keys: {
|
|
123
|
-
publicKey: Uint8Array;
|
|
124
|
-
}) => string;
|
|
125
|
-
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
126
|
-
getFeeRates: () => Promise<{
|
|
127
|
-
average: number;
|
|
128
|
-
fast: number;
|
|
129
|
-
fastest: number;
|
|
130
|
-
}>;
|
|
131
|
-
getInputsOutputsFee: ({ assetValue, feeOptionKey, feeRate, memo, sender, recipient, }: Omit<import("@swapkit/toolboxes/utxo").UTXOBuildTxParams, "feeRate"> & {
|
|
132
|
-
feeOptionKey?: FeeOption;
|
|
133
|
-
feeRate?: number;
|
|
134
|
-
}) => Promise<{
|
|
135
|
-
fee: number;
|
|
136
|
-
inputs: {
|
|
137
|
-
address: string;
|
|
138
|
-
hash: string;
|
|
139
|
-
index: number;
|
|
140
|
-
txHex: string | undefined;
|
|
141
|
-
value: number;
|
|
142
|
-
witnessUtxo: {
|
|
143
|
-
script: Buffer<ArrayBuffer>;
|
|
144
|
-
value: number;
|
|
145
|
-
};
|
|
146
|
-
}[];
|
|
147
|
-
outputs: import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
148
|
-
} | {
|
|
149
|
-
fee: number;
|
|
150
|
-
inputs?: undefined;
|
|
151
|
-
outputs?: undefined;
|
|
152
|
-
}>;
|
|
153
|
-
getNetworkForChain: () => import("@swapkit/utxo-signer").BTCNetwork;
|
|
154
|
-
getPrivateKeyFromMnemonic: (params: {
|
|
155
|
-
phrase: string;
|
|
156
|
-
derivationPath: string;
|
|
157
|
-
}) => string;
|
|
158
|
-
isRBFEnabled: (txid: string) => Promise<import("node_modules/@swapkit/toolboxes/dist/types/utxo/toolbox/utxo").RBFStatusResult>;
|
|
159
|
-
keys: {
|
|
160
|
-
privateKey: import("@swapkit/utxo-signer/utils").Bytes;
|
|
161
|
-
publicKey: Uint8Array<ArrayBufferLike>;
|
|
162
|
-
} | undefined;
|
|
163
|
-
resolveDerivationIndex: ({ address, gapLimit }: import("@swapkit/toolboxes/utxo").ResolveDerivationParams) => {
|
|
164
|
-
change: boolean;
|
|
165
|
-
index: number;
|
|
166
|
-
} | undefined;
|
|
167
|
-
signAndBroadcastTransaction: (tx: InstanceType<typeof Transaction>) => Promise<string>;
|
|
168
|
-
signTransactionWithMultipleKeys: ({ tx, inputDerivations, }: {
|
|
169
|
-
tx: InstanceType<typeof Transaction>;
|
|
170
|
-
inputDerivations: import("@swapkit/toolboxes/utxo").InputDerivation[];
|
|
171
|
-
}) => Transaction;
|
|
172
|
-
validateAddress: (address: string) => boolean;
|
|
173
|
-
} | {
|
|
174
|
-
address: string;
|
|
175
|
-
deriveAddressAtIndex: ({ index, change }: {
|
|
176
|
-
index: number;
|
|
177
|
-
change?: boolean;
|
|
178
|
-
}) => Promise<{
|
|
179
|
-
address: any;
|
|
180
|
-
change: boolean;
|
|
181
|
-
index: number;
|
|
182
|
-
pubkey: string;
|
|
183
|
-
} | undefined>;
|
|
184
|
-
getExtendedPublicKey: () => Promise<{
|
|
185
|
-
path: string;
|
|
186
|
-
xpub: string;
|
|
187
|
-
}>;
|
|
188
|
-
signTransaction: (tx: Transaction, inputs: KeepKeyInputObject[], memo?: string) => Promise<string>;
|
|
189
|
-
signTransactionWithMultipleInputs: (tx: Transaction, inputs: Array<{
|
|
190
|
-
hash: string;
|
|
191
|
-
index: number;
|
|
192
|
-
value: number;
|
|
193
|
-
txHex?: string;
|
|
194
|
-
derivationIndex: number;
|
|
195
|
-
isChange: boolean;
|
|
196
|
-
}>, memo?: string) => Promise<string>;
|
|
197
|
-
transfer: ({ recipient, feeOptionKey, feeRate, memo, ...rest }: GenericTransferParams) => Promise<string>;
|
|
198
|
-
transferFromMultipleAddresses: ({ utxos, recipient, assetValue, memo, feeRate, feeOptionKey, }: {
|
|
199
|
-
utxos: Array<{
|
|
200
|
-
hash: string;
|
|
201
|
-
index: number;
|
|
202
|
-
value: number;
|
|
203
|
-
txHex?: string;
|
|
204
|
-
derivationIndex: number;
|
|
205
|
-
isChange: boolean;
|
|
206
|
-
address: string;
|
|
207
|
-
}>;
|
|
208
|
-
recipient: string;
|
|
209
|
-
assetValue: {
|
|
210
|
-
getBaseValue: (unit: string) => number;
|
|
211
|
-
chain: string;
|
|
212
|
-
};
|
|
213
|
-
memo?: string;
|
|
214
|
-
feeRate?: number;
|
|
215
|
-
feeOptionKey?: (typeof FeeOption)[keyof typeof FeeOption];
|
|
216
|
-
}) => Promise<string>;
|
|
217
|
-
deriveAddresses: (params: {
|
|
218
|
-
count: number;
|
|
219
|
-
startIndex?: number;
|
|
220
|
-
change?: boolean;
|
|
221
|
-
}) => Promise<import("@swapkit/toolboxes/utxo").DerivedAddress[]>;
|
|
222
|
-
getAggregatedBalance: (gapLimit?: number) => Promise<import("@swapkit/toolboxes/utxo").AggregatedBalanceResult>;
|
|
223
|
-
getAggregatedUtxos: (gapLimit?: number) => Promise<import("@swapkit/toolboxes/utxo").UTXOForMultiAddressTransfer[]>;
|
|
224
|
-
scanForAddresses: (params?: {
|
|
225
|
-
gapLimit?: number;
|
|
226
|
-
change?: boolean;
|
|
227
|
-
}) => Promise<import("@swapkit/toolboxes/utxo").DerivedAddress[]>;
|
|
228
|
-
broadcastTx: (txHash: string) => Promise<string>;
|
|
229
|
-
buildTx: ({ assetValue, recipient, memo, feeRate, sender }: import("@swapkit/toolboxes/utxo").UTXOBuildTxParams) => Promise<{
|
|
230
|
-
inputs: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
231
|
-
tx: Transaction;
|
|
232
|
-
utxos: {
|
|
233
|
-
address: string;
|
|
234
|
-
hash: string;
|
|
235
|
-
index: number;
|
|
236
|
-
txHex: string | undefined;
|
|
237
|
-
value: number;
|
|
238
|
-
witnessUtxo: {
|
|
239
|
-
script: Buffer<ArrayBuffer>;
|
|
240
|
-
value: number;
|
|
241
|
-
};
|
|
242
|
-
}[];
|
|
243
|
-
}>;
|
|
244
|
-
createTransaction: ({ assetValue, recipient, memo, feeRate, sender }: import("@swapkit/toolboxes/utxo").UTXOBuildTxParams) => Promise<{
|
|
245
|
-
inputs: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
246
|
-
tx: Transaction;
|
|
247
|
-
utxos: {
|
|
248
|
-
address: string;
|
|
249
|
-
hash: string;
|
|
250
|
-
index: number;
|
|
251
|
-
txHex: string | undefined;
|
|
252
|
-
value: number;
|
|
253
|
-
witnessUtxo: {
|
|
254
|
-
script: Buffer<ArrayBuffer>;
|
|
255
|
-
value: number;
|
|
256
|
-
};
|
|
257
|
-
}[];
|
|
258
|
-
}>;
|
|
259
|
-
getAddress: () => Promise<string | undefined>;
|
|
260
|
-
getAddressFromKeys: (keys: {
|
|
261
|
-
publicKey: Uint8Array;
|
|
262
|
-
}) => string;
|
|
263
|
-
getBalance: (address: string, _scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
264
|
-
getFeeRates: () => Promise<{
|
|
265
|
-
average: number;
|
|
266
|
-
fast: number;
|
|
267
|
-
fastest: number;
|
|
268
|
-
}>;
|
|
269
|
-
stripPrefix: typeof import("@swapkit/toolboxes/utxo").stripPrefix;
|
|
270
|
-
stripToCashAddress: typeof stripToCashAddress;
|
|
271
|
-
validateAddress: typeof import("@swapkit/toolboxes/utxo").validateBchAddress;
|
|
272
|
-
accumulative: typeof import("@swapkit/toolboxes/utxo").accumulative;
|
|
273
|
-
bumpFee: ({ txid, newFeeRate, recipient, memo }: import("@swapkit/toolboxes/utxo").RBFTransactionParams) => Promise<{
|
|
274
|
-
newFee: number;
|
|
275
|
-
originalFee: number;
|
|
276
|
-
txid: string;
|
|
277
|
-
}>;
|
|
278
|
-
calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo").UTXOCalculateTxSizeParams) => number;
|
|
279
|
-
createKeysForPath: (params: {
|
|
280
|
-
wif?: string;
|
|
281
|
-
phrase?: string;
|
|
282
|
-
derivationPath?: string;
|
|
283
|
-
}) => {
|
|
284
|
-
privateKey: import("@swapkit/utxo-signer/utils").Bytes;
|
|
285
|
-
publicKey: Uint8Array<ArrayBufferLike>;
|
|
286
|
-
};
|
|
287
|
-
createReplacementTransaction: ({ txid, newFeeRate, recipient, memo, }: import("@swapkit/toolboxes/utxo").RBFTransactionParams) => Promise<import("node_modules/@swapkit/toolboxes/dist/types/utxo/toolbox/utxo").ReplacementTransactionResult>;
|
|
288
|
-
derivePrivateKeyAtIndex: ({ index, change }: import("@swapkit/toolboxes/utxo").DeriveAddressParams) => Uint8Array<ArrayBufferLike> | undefined;
|
|
289
|
-
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
290
|
-
from: string;
|
|
291
|
-
memo?: string;
|
|
292
|
-
feeRate?: number;
|
|
293
|
-
feeOptionKey?: FeeOption;
|
|
294
|
-
recipients?: number | import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
295
|
-
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
296
|
-
estimateTransactionFee: (params: {
|
|
297
|
-
assetValue: import("@swapkit/helpers").AssetValue;
|
|
298
|
-
recipient: string;
|
|
299
|
-
sender: string;
|
|
300
|
-
memo?: string;
|
|
301
|
-
feeOptionKey?: FeeOption;
|
|
302
|
-
feeRate?: number;
|
|
303
|
-
fetchTxHex?: boolean;
|
|
304
|
-
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
305
|
-
getInputsOutputsFee: ({ assetValue, feeOptionKey, feeRate, memo, sender, recipient, }: Omit<import("@swapkit/toolboxes/utxo").UTXOBuildTxParams, "feeRate"> & {
|
|
306
|
-
feeOptionKey?: FeeOption;
|
|
307
|
-
feeRate?: number;
|
|
308
|
-
}) => Promise<{
|
|
309
|
-
fee: number;
|
|
310
|
-
inputs: {
|
|
311
|
-
address: string;
|
|
312
|
-
hash: string;
|
|
313
|
-
index: number;
|
|
314
|
-
txHex: string | undefined;
|
|
315
|
-
value: number;
|
|
316
|
-
witnessUtxo: {
|
|
317
|
-
script: Buffer<ArrayBuffer>;
|
|
318
|
-
value: number;
|
|
319
|
-
};
|
|
320
|
-
}[];
|
|
321
|
-
outputs: import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
322
|
-
} | {
|
|
323
|
-
fee: number;
|
|
324
|
-
inputs?: undefined;
|
|
325
|
-
outputs?: undefined;
|
|
326
|
-
}>;
|
|
327
|
-
getNetworkForChain: () => import("@swapkit/utxo-signer").BTCNetwork;
|
|
328
|
-
getPrivateKeyFromMnemonic: (params: {
|
|
329
|
-
phrase: string;
|
|
330
|
-
derivationPath: string;
|
|
331
|
-
}) => string;
|
|
332
|
-
isRBFEnabled: (txid: string) => Promise<import("node_modules/@swapkit/toolboxes/dist/types/utxo/toolbox/utxo").RBFStatusResult>;
|
|
333
|
-
keys: {
|
|
334
|
-
privateKey: import("@swapkit/utxo-signer/utils").Bytes;
|
|
335
|
-
publicKey: Uint8Array<ArrayBufferLike>;
|
|
336
|
-
} | undefined;
|
|
337
|
-
resolveDerivationIndex: ({ address, gapLimit }: import("@swapkit/toolboxes/utxo").ResolveDerivationParams) => {
|
|
338
|
-
change: boolean;
|
|
339
|
-
index: number;
|
|
340
|
-
} | undefined;
|
|
341
|
-
signAndBroadcastTransaction: (tx: InstanceType<typeof Transaction>) => Promise<string>;
|
|
342
|
-
signTransactionWithMultipleKeys: ({ tx, inputDerivations, }: {
|
|
343
|
-
tx: InstanceType<typeof Transaction>;
|
|
344
|
-
inputDerivations: import("@swapkit/toolboxes/utxo").InputDerivation[];
|
|
345
|
-
}) => Transaction;
|
|
346
|
-
}>;
|
|
10
|
+
}): Promise<KeepKeyUTXOWalletMethods>;
|
|
347
11
|
export {};
|
|
348
12
|
//# sourceMappingURL=utxo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utxo.d.ts","sourceRoot":"","sources":["../../../../src/keepkey/chains/utxo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,KAAK,EAEL,KAAK,mBAAmB,
|
|
1
|
+
{"version":3,"file":"utxo.d.ts","sourceRoot":"","sources":["../../../../src/keepkey/chains/utxo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,KAAK,EAEL,KAAK,mBAAmB,EAKxB,KAAK,SAAS,EACf,MAAM,kBAAkB,CAAC;AAwB1B,KAAK,wBAAwB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9E,wBAAsB,iBAAiB,CAAC,EACtC,GAAG,EACH,KAAK,EACL,cAAc,GACf,EAAE;IACD,GAAG,EAAE,UAAU,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC,SAAS,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC;IAC9C,cAAc,CAAC,EAAE,mBAAmB,CAAC;CACtC,GAAG,OAAO,CAAC,wBAAwB,CAAC,CA+TpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../../../../src/ledger/clients/thorchain/lib.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AAuBpD,qBAAa,YAAY;IACvB,SAAS,EAAE,SAAS,CAAC;IACrB,eAAe,EAAE,GAAG,CAAC;gBAET,SAAS,EAAE,GAAG;IAQ1B,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM;IAUzB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE;IAiB5B,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM;IAiB5C,UAAU;IAShB,OAAO;
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../../../../src/ledger/clients/thorchain/lib.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AAuBpD,qBAAa,YAAY;IACvB,SAAS,EAAE,SAAS,CAAC;IACrB,eAAe,EAAE,GAAG,CAAC;gBAET,SAAS,EAAE,GAAG;IAQ1B,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM;IAUzB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE;IAiB5B,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM;IAiB5C,UAAU;IAShB,OAAO;IAyCP,UAAU;IA6CJ,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE;IAmBxB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,UAAQ;IA4B3E,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM;IAIhD,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,SAAiB;IAWlF,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAiB;;;;;CAqBpE"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { UTXOChain } from "@swapkit/helpers";
|
|
2
|
+
import type { UTXOType } from "@swapkit/toolboxes/utxo";
|
|
3
|
+
import type { Transaction } from "@swapkit/utxo-signer";
|
|
4
|
+
/**
|
|
5
|
+
* Extract per-input metadata from a V3 PSBT in the shape the legacy
|
|
6
|
+
* `@ledgerhq/hw-app-btc.createPaymentTransaction` adapter expects.
|
|
7
|
+
*
|
|
8
|
+
* For segwit inputs the SwapKit V3 API populates `witnessUtxo`; for legacy
|
|
9
|
+
* (BCH/DOGE/DASH) it populates `nonWitnessUtxo` with the full prior-tx bytes.
|
|
10
|
+
* We re-encode the parsed `nonWitnessUtxo` back to hex via `RawTx.encode` so
|
|
11
|
+
* `btcApp.splitTransaction(hex)` can consume it.
|
|
12
|
+
*
|
|
13
|
+
* Single-address account assumption: all inputs share our derivation path.
|
|
14
|
+
*/
|
|
15
|
+
export declare function extractInputsFromPsbt(tx: Transaction): Promise<UTXOType[]>;
|
|
16
|
+
/**
|
|
17
|
+
* Build a toolbox-compatible signer from the existing legacy Ledger UTXO
|
|
18
|
+
* client. The toolbox synthesizes `signAndBroadcastTransaction` on top of
|
|
19
|
+
* `signer.signTransaction(tx) → Transaction`.
|
|
20
|
+
*/
|
|
21
|
+
export declare function createLegacyPsbtSigner({ legacyClient, chain: _chain, address, }: {
|
|
22
|
+
legacyClient: {
|
|
23
|
+
signTransaction: (tx: Transaction, inputUtxos: UTXOType[]) => Promise<string>;
|
|
24
|
+
};
|
|
25
|
+
chain: UTXOChain;
|
|
26
|
+
address: string;
|
|
27
|
+
}): {
|
|
28
|
+
getAddress: () => Promise<string>;
|
|
29
|
+
signTransaction: (tx: Transaction) => Promise<Transaction>;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=utxo-legacy-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utxo-legacy-adapter.d.ts","sourceRoot":"","sources":["../../../../src/ledger/clients/utxo-legacy-adapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD;;;;;;;;;;GAUG;AACH,wBAAsB,qBAAqB,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CA0BhF;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,YAAY,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,GACR,EAAE;IACD,YAAY,EAAE;QAAE,eAAe,EAAE,CAAC,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;KAAE,CAAC;IAChG,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;;0BAG+B,WAAW,KAAG,OAAO,CAAC,WAAW,CAAC;EAUjE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type DerivationPathArray } from "@swapkit/helpers";
|
|
2
|
+
import type { Transaction } from "@swapkit/utxo-signer";
|
|
3
|
+
export declare const BitcoinPsbtLedger: (derivationPathArray?: DerivationPathArray | string) => {
|
|
4
|
+
connect: () => Promise<void>;
|
|
5
|
+
getAddress: () => Promise<string>;
|
|
6
|
+
getExtendedPublicKey: (path?: string) => Promise<string>;
|
|
7
|
+
signTransaction: (tx: Transaction) => Promise<Transaction>;
|
|
8
|
+
};
|
|
9
|
+
export declare const LitecoinPsbtLedger: (derivationPathArray?: DerivationPathArray | string) => {
|
|
10
|
+
connect: () => Promise<void>;
|
|
11
|
+
getAddress: () => Promise<string>;
|
|
12
|
+
getExtendedPublicKey: (path?: string) => Promise<string>;
|
|
13
|
+
signTransaction: (tx: Transaction) => Promise<Transaction>;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=utxo-psbt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utxo-psbt.d.ts","sourceRoot":"","sources":["../../../../src/ledger/clients/utxo-psbt.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,mBAAmB,EAA4D,MAAM,kBAAkB,CAAC;AACtH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AA4IxD,eAAO,MAAM,iBAAiB,yBAlFE,mBAAmB,GAAG,MAAM;;;;0BAyD1B,WAAW,KAAG,OAAO,CAAC,WAAW,CAAC;CAyBK,CAAC;AAC1E,eAAO,MAAM,kBAAkB,yBAnFC,mBAAmB,GAAG,MAAM;;;;0BAyD1B,WAAW,KAAG,OAAO,CAAC,WAAW,CAAC;CA0BO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ledger/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EAYN,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ledger/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EAYN,MAAM,kBAAkB,CAAC;AAkB1B,eAAO,MAAM,YAAY;;;;;;;;CAoEvB,CAAC;AAEH,eAAO,MAAM,uBAAuB,mYAAyC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/trezor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAUN,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/trezor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAUN,MAAM,kBAAkB,CAAC;AAgwB1B,eAAO,MAAM,YAAY;;;;;;;;CAiEvB,CAAC;AAEH,eAAO,MAAM,uBAAuB,6SAAyC,CAAC"}
|
package/package.json
CHANGED
|
@@ -22,12 +22,13 @@
|
|
|
22
22
|
"@near-js/transactions": "~2.5.0",
|
|
23
23
|
"@scure/base": "2.0.0",
|
|
24
24
|
"@swapkit/helpers": "^4.13.0",
|
|
25
|
-
"@swapkit/
|
|
26
|
-
"@swapkit/toolboxes": "^4.14.5",
|
|
25
|
+
"@swapkit/toolboxes": "^4.15.0",
|
|
27
26
|
"@swapkit/utxo-signer": "^2.1.1",
|
|
27
|
+
"@swapkit/wallet-core": "^4.2.0",
|
|
28
28
|
"@trezor/connect-web": "~9.6.4",
|
|
29
29
|
"cosmjs-types": "~0.10.1",
|
|
30
30
|
"ethers": "^6.14.0",
|
|
31
|
+
"ledger-bitcoin": "~0.3.0",
|
|
31
32
|
"ripple-binary-codec": "2.5.1",
|
|
32
33
|
"ts-pattern": "^5.9.0",
|
|
33
34
|
"xrpl": "~4.4.2"
|
|
@@ -57,6 +58,7 @@
|
|
|
57
58
|
"@trezor/connect-web": "9.6.4",
|
|
58
59
|
"cosmjs-types": "0.10.1",
|
|
59
60
|
"ethers": "6.16.0",
|
|
61
|
+
"ledger-bitcoin": "0.3.0",
|
|
60
62
|
"ripple-binary-codec": "2.5.1",
|
|
61
63
|
"ts-pattern": "^5.9.0",
|
|
62
64
|
"xrpl": "4.4.2"
|
|
@@ -87,15 +89,11 @@
|
|
|
87
89
|
"types": "./dist/types/trezor/index.d.ts"
|
|
88
90
|
}
|
|
89
91
|
},
|
|
90
|
-
"files": [
|
|
91
|
-
"dist/"
|
|
92
|
-
],
|
|
92
|
+
"files": ["dist/"],
|
|
93
93
|
"homepage": "https://github.com/swapkit/wallets",
|
|
94
94
|
"license": "SEE LICENSE IN LICENSE",
|
|
95
95
|
"name": "@swapkit/wallet-hardware",
|
|
96
|
-
"publishConfig": {
|
|
97
|
-
"access": "public"
|
|
98
|
-
},
|
|
96
|
+
"publishConfig": { "access": "public" },
|
|
99
97
|
"repository": {
|
|
100
98
|
"directory": "packages/wallet-hardware",
|
|
101
99
|
"type": "git",
|
|
@@ -109,5 +107,5 @@
|
|
|
109
107
|
"type-check:go": "tsgo"
|
|
110
108
|
},
|
|
111
109
|
"type": "module",
|
|
112
|
-
"version": "4.
|
|
110
|
+
"version": "4.8.1"
|
|
113
111
|
}
|
|
File without changes
|