@swapkit/toolboxes 4.3.10 → 4.13.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/LICENSE +246 -0
- package/dist/src/aptos/index.cjs +1 -0
- package/dist/src/aptos/index.js +1 -0
- package/dist/src/cardano/index.cjs +1 -4
- package/dist/src/cardano/index.js +1 -4
- package/dist/src/cosmos/index.cjs +1 -4
- package/dist/src/cosmos/index.js +1 -4
- package/dist/src/evm/index.cjs +1 -4
- package/dist/src/evm/index.js +1 -4
- package/dist/src/index.cjs +1 -5
- package/dist/src/index.js +1 -5
- package/dist/src/near/index.cjs +1 -4
- package/dist/src/near/index.js +1 -4
- package/dist/src/radix/index.cjs +1 -4
- package/dist/src/radix/index.js +1 -4
- package/dist/src/ripple/index.cjs +1 -4
- package/dist/src/ripple/index.js +1 -4
- package/dist/src/solana/index.cjs +1 -4
- package/dist/src/solana/index.js +1 -4
- package/dist/src/starknet/index.cjs +1 -0
- package/dist/src/starknet/index.js +1 -0
- package/dist/src/stellar/index.cjs +1 -0
- package/dist/src/stellar/index.js +1 -0
- package/dist/src/substrate/index.cjs +1 -4
- package/dist/src/substrate/index.js +1 -4
- package/dist/src/sui/index.cjs +1 -4
- package/dist/src/sui/index.js +1 -4
- package/dist/src/ton/index.cjs +1 -4
- package/dist/src/ton/index.js +1 -4
- package/dist/src/tron/index.cjs +1 -4
- package/dist/src/tron/index.js +1 -4
- package/dist/src/utxo/index.cjs +1 -5
- package/dist/src/utxo/index.js +1 -5
- package/dist/types/aptos/index.d.ts +3 -0
- package/dist/types/aptos/index.d.ts.map +1 -0
- package/dist/types/aptos/toolbox.d.ts +21 -0
- package/dist/types/aptos/toolbox.d.ts.map +1 -0
- package/dist/types/aptos/types.d.ts +27 -0
- package/dist/types/aptos/types.d.ts.map +1 -0
- package/dist/types/cardano/toolbox.d.ts +19 -22
- package/dist/types/cardano/toolbox.d.ts.map +1 -1
- package/dist/types/cardano/types.d.ts +8 -3
- package/dist/types/cardano/types.d.ts.map +1 -1
- package/dist/types/cosmos/thorchainUtils/addressFormat.d.ts.map +1 -1
- package/dist/types/cosmos/thorchainUtils/messages.d.ts +3 -3
- package/dist/types/cosmos/thorchainUtils/messages.d.ts.map +1 -1
- package/dist/types/cosmos/toolbox/cosmos.d.ts +11 -9
- package/dist/types/cosmos/toolbox/cosmos.d.ts.map +1 -1
- package/dist/types/cosmos/toolbox/thorchain.d.ts +6 -51
- package/dist/types/cosmos/toolbox/thorchain.d.ts.map +1 -1
- package/dist/types/cosmos/types.d.ts +2 -2
- package/dist/types/cosmos/types.d.ts.map +1 -1
- package/dist/types/evm/helpers.d.ts +34 -1
- package/dist/types/evm/helpers.d.ts.map +1 -1
- package/dist/types/evm/toolbox/baseEVMToolbox.d.ts +14 -7
- package/dist/types/evm/toolbox/baseEVMToolbox.d.ts.map +1 -1
- package/dist/types/evm/toolbox/evm.d.ts +236 -96
- package/dist/types/evm/toolbox/evm.d.ts.map +1 -1
- package/dist/types/evm/toolbox/index.d.ts +3 -2
- package/dist/types/evm/toolbox/index.d.ts.map +1 -1
- package/dist/types/evm/toolbox/op.d.ts +13 -8
- package/dist/types/evm/toolbox/op.d.ts.map +1 -1
- package/dist/types/evm/types.d.ts +49 -27
- package/dist/types/evm/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +31 -25
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/near/helpers/core.d.ts +1 -1
- package/dist/types/near/helpers/core.d.ts.map +1 -1
- package/dist/types/near/index.d.ts +1 -1
- package/dist/types/near/index.d.ts.map +1 -1
- package/dist/types/near/toolbox.d.ts +13 -10
- package/dist/types/near/toolbox.d.ts.map +1 -1
- package/dist/types/near/types/index.d.ts +4 -0
- package/dist/types/near/types/index.d.ts.map +1 -0
- package/dist/types/near/types/toolbox.d.ts +2 -0
- package/dist/types/near/types/toolbox.d.ts.map +1 -1
- package/dist/types/radix/index.d.ts +7 -7
- package/dist/types/radix/index.d.ts.map +1 -1
- package/dist/types/ripple/currency.d.ts +5 -0
- package/dist/types/ripple/currency.d.ts.map +1 -0
- package/dist/types/ripple/index.d.ts +60 -17
- package/dist/types/ripple/index.d.ts.map +1 -1
- package/dist/types/ripple/tokens.d.ts +15 -0
- package/dist/types/ripple/tokens.d.ts.map +1 -0
- package/dist/types/solana/index.d.ts +1 -1
- package/dist/types/solana/index.d.ts.map +1 -1
- package/dist/types/solana/toolbox.d.ts +12 -10
- package/dist/types/solana/toolbox.d.ts.map +1 -1
- package/dist/types/starknet/index.d.ts +5 -0
- package/dist/types/starknet/index.d.ts.map +1 -0
- package/dist/types/starknet/toolbox.d.ts +34 -0
- package/dist/types/starknet/toolbox.d.ts.map +1 -0
- package/dist/types/starknet/types.d.ts +26 -0
- package/dist/types/starknet/types.d.ts.map +1 -0
- package/dist/types/stellar/index.d.ts +3 -0
- package/dist/types/stellar/index.d.ts.map +1 -0
- package/dist/types/stellar/toolbox.d.ts +21 -0
- package/dist/types/stellar/toolbox.d.ts.map +1 -0
- package/dist/types/stellar/types.d.ts +10 -0
- package/dist/types/stellar/types.d.ts.map +1 -0
- package/dist/types/substrate/balance.d.ts +3 -3
- package/dist/types/substrate/balance.d.ts.map +1 -1
- package/dist/types/substrate/substrate.d.ts +22 -97
- package/dist/types/substrate/substrate.d.ts.map +1 -1
- package/dist/types/substrate/types.d.ts +2 -2
- package/dist/types/substrate/types.d.ts.map +1 -1
- package/dist/types/sui/toolbox.d.ts +17 -8
- package/dist/types/sui/toolbox.d.ts.map +1 -1
- package/dist/types/sui/types.d.ts +11 -3
- package/dist/types/sui/types.d.ts.map +1 -1
- package/dist/types/ton/toolbox.d.ts +23 -13
- package/dist/types/ton/toolbox.d.ts.map +1 -1
- package/dist/types/ton/types.d.ts +9 -8
- package/dist/types/ton/types.d.ts.map +1 -1
- package/dist/types/tron/helpers/proto.d.ts +9 -0
- package/dist/types/tron/helpers/proto.d.ts.map +1 -0
- package/dist/types/tron/helpers/trongrid.d.ts +43 -3
- package/dist/types/tron/helpers/trongrid.d.ts.map +1 -1
- package/dist/types/tron/helpers/utils.d.ts +17 -0
- package/dist/types/tron/helpers/utils.d.ts.map +1 -0
- package/dist/types/tron/index.d.ts +4 -5
- package/dist/types/tron/index.d.ts.map +1 -1
- package/dist/types/tron/toolbox.d.ts +20 -18
- package/dist/types/tron/toolbox.d.ts.map +1 -1
- package/dist/types/tron/types.d.ts +31 -57
- package/dist/types/tron/types.d.ts.map +1 -1
- package/dist/types/types.d.ts +6 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utxo/hdWallet.d.ts +33 -0
- package/dist/types/utxo/hdWallet.d.ts.map +1 -0
- package/dist/types/utxo/helpers/api.d.ts +49 -1
- package/dist/types/utxo/helpers/api.d.ts.map +1 -1
- package/dist/types/utxo/helpers/bchaddrjs.d.ts.map +1 -1
- package/dist/types/utxo/helpers/cashaddr.d.ts +13 -0
- package/dist/types/utxo/helpers/cashaddr.d.ts.map +1 -0
- package/dist/types/utxo/helpers/coinselect.d.ts +9 -5
- package/dist/types/utxo/helpers/coinselect.d.ts.map +1 -1
- package/dist/types/utxo/helpers/txSize.d.ts +4 -3
- package/dist/types/utxo/helpers/txSize.d.ts.map +1 -1
- package/dist/types/utxo/index.d.ts +2 -1
- package/dist/types/utxo/index.d.ts.map +1 -1
- package/dist/types/utxo/toolbox/bitcoinCash.d.ts +75 -15
- package/dist/types/utxo/toolbox/bitcoinCash.d.ts.map +1 -1
- package/dist/types/utxo/toolbox/index.d.ts +6 -5
- package/dist/types/utxo/toolbox/index.d.ts.map +1 -1
- package/dist/types/utxo/toolbox/params.d.ts +8 -16
- package/dist/types/utxo/toolbox/params.d.ts.map +1 -1
- package/dist/types/utxo/toolbox/utxo.d.ts +135 -46
- package/dist/types/utxo/toolbox/utxo.d.ts.map +1 -1
- package/dist/types/utxo/toolbox/validators.d.ts +1 -1
- package/dist/types/utxo/toolbox/validators.d.ts.map +1 -1
- package/dist/types/utxo/toolbox/zcash.d.ts +63 -10
- package/dist/types/utxo/toolbox/zcash.d.ts.map +1 -1
- package/dist/types/utxo/types.d.ts +78 -15
- package/dist/types/utxo/types.d.ts.map +1 -1
- package/package.json +43 -53
- package/dist/src/cardano/index.cjs.map +0 -11
- package/dist/src/cardano/index.js.map +0 -11
- package/dist/src/cosmos/index.cjs.map +0 -20
- package/dist/src/cosmos/index.js.map +0 -20
- package/dist/src/evm/index.cjs.map +0 -20
- package/dist/src/evm/index.js.map +0 -20
- package/dist/src/index.cjs.map +0 -67
- package/dist/src/index.js.map +0 -67
- package/dist/src/near/index.cjs.map +0 -16
- package/dist/src/near/index.js.map +0 -16
- package/dist/src/radix/index.cjs.map +0 -10
- package/dist/src/radix/index.js.map +0 -10
- package/dist/src/ripple/index.cjs.map +0 -10
- package/dist/src/ripple/index.js.map +0 -10
- package/dist/src/solana/index.cjs.map +0 -11
- package/dist/src/solana/index.js.map +0 -11
- package/dist/src/substrate/index.cjs.map +0 -13
- package/dist/src/substrate/index.js.map +0 -13
- package/dist/src/sui/index.cjs.map +0 -11
- package/dist/src/sui/index.js.map +0 -11
- package/dist/src/ton/index.cjs.map +0 -11
- package/dist/src/ton/index.js.map +0 -11
- package/dist/src/tron/index.cjs.map +0 -13
- package/dist/src/tron/index.js.map +0 -13
- package/dist/src/utxo/index.cjs.map +0 -21
- package/dist/src/utxo/index.js.map +0 -21
- package/dist/types/tron/helpers/trc20.abi.d.ts +0 -156
- package/dist/types/tron/helpers/trc20.abi.d.ts.map +0 -1
- package/src/__tests__/address-validation-all-chains.test.ts +0 -162
- package/src/__tests__/addressValidator.test.ts +0 -162
- package/src/cardano/__tests__/toolbox.test.ts +0 -48
- package/src/cardano/index.ts +0 -2
- package/src/cardano/toolbox.ts +0 -168
- package/src/cardano/types.ts +0 -10
- package/src/cosmos/__tests__/toolbox.test.ts +0 -95
- package/src/cosmos/index.ts +0 -4
- package/src/cosmos/thorchainUtils/addressFormat.ts +0 -22
- package/src/cosmos/thorchainUtils/index.ts +0 -4
- package/src/cosmos/thorchainUtils/messages.ts +0 -212
- package/src/cosmos/thorchainUtils/registry.ts +0 -43
- package/src/cosmos/thorchainUtils/types/MsgCompiled.ts +0 -2800
- package/src/cosmos/thorchainUtils/types/client-types.ts +0 -54
- package/src/cosmos/thorchainUtils/types/index.ts +0 -1
- package/src/cosmos/toolbox/cosmos.ts +0 -350
- package/src/cosmos/toolbox/index.ts +0 -35
- package/src/cosmos/toolbox/thorchain.ts +0 -249
- package/src/cosmos/types.ts +0 -48
- package/src/cosmos/util.ts +0 -214
- package/src/evm/__tests__/address-validation.test.ts +0 -84
- package/src/evm/__tests__/ethereum.test.ts +0 -137
- package/src/evm/__tests__/signMessage.test.ts +0 -60
- package/src/evm/api.ts +0 -10
- package/src/evm/contracts/eth/multicall.ts +0 -165
- package/src/evm/contracts/op/gasOracle.ts +0 -145
- package/src/evm/helpers.ts +0 -71
- package/src/evm/index.ts +0 -4
- package/src/evm/toolbox/baseEVMToolbox.ts +0 -698
- package/src/evm/toolbox/evm.ts +0 -66
- package/src/evm/toolbox/index.ts +0 -44
- package/src/evm/toolbox/op.ts +0 -143
- package/src/evm/types.ts +0 -146
- package/src/index.ts +0 -260
- package/src/near/__tests__/core.test.ts +0 -70
- package/src/near/helpers/core.ts +0 -85
- package/src/near/helpers/gasEstimation.ts +0 -96
- package/src/near/helpers/nep141.ts +0 -50
- package/src/near/index.ts +0 -21
- package/src/near/toolbox.ts +0 -421
- package/src/near/types/contract.ts +0 -32
- package/src/near/types/nep141.ts +0 -34
- package/src/near/types/toolbox.ts +0 -55
- package/src/near/types.ts +0 -44
- package/src/radix/index.ts +0 -138
- package/src/ripple/index.ts +0 -179
- package/src/solana/index.ts +0 -36
- package/src/solana/toolbox.ts +0 -409
- package/src/substrate/balance.ts +0 -88
- package/src/substrate/index.ts +0 -2
- package/src/substrate/substrate.ts +0 -281
- package/src/substrate/types.ts +0 -115
- package/src/sui/__tests__/toolbox.test.ts +0 -86
- package/src/sui/index.ts +0 -2
- package/src/sui/toolbox.ts +0 -166
- package/src/sui/types.ts +0 -11
- package/src/ton/__tests__/toolbox.test.ts +0 -67
- package/src/ton/index.ts +0 -2
- package/src/ton/toolbox.ts +0 -136
- package/src/ton/types.ts +0 -13
- package/src/tron/__tests__/toolbox.test.ts +0 -221
- package/src/tron/helpers/trc20.abi.ts +0 -107
- package/src/tron/helpers/trongrid.ts +0 -53
- package/src/tron/index.ts +0 -21
- package/src/tron/toolbox.ts +0 -585
- package/src/tron/types.ts +0 -83
- package/src/types.ts +0 -28
- package/src/utils.ts +0 -34
- package/src/utxo/__tests__/zcash-integration.test.ts +0 -97
- package/src/utxo/helpers/api.ts +0 -471
- package/src/utxo/helpers/bchaddrjs.ts +0 -166
- package/src/utxo/helpers/coinselect.ts +0 -92
- package/src/utxo/helpers/index.ts +0 -4
- package/src/utxo/helpers/txSize.ts +0 -137
- package/src/utxo/index.ts +0 -6
- package/src/utxo/toolbox/bitcoinCash.ts +0 -243
- package/src/utxo/toolbox/index.ts +0 -59
- package/src/utxo/toolbox/params.ts +0 -18
- package/src/utxo/toolbox/utxo.ts +0 -439
- package/src/utxo/toolbox/validators.ts +0 -36
- package/src/utxo/toolbox/zcash.ts +0 -242
- package/src/utxo/types.ts +0 -39
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bchaddrjs.d.ts","sourceRoot":"","sources":["../../../../src/utxo/helpers/bchaddrjs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bchaddrjs.d.ts","sourceRoot":"","sources":["../../../../src/utxo/helpers/bchaddrjs.ts"],"names":[],"mappings":"AAaA,aAAK,WAAW;IACd,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAmBD,iBAAS,cAAc,CAAC,KAAK,EAAE,GAAG,WAOjC;AAED,iBAAS,oBAAoB,CAAC,OAAO,EAAE,MAAM,eAE5C;AAED,iBAAS,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAMhD;AAED,iBAAS,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAG9C;AA6GD,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type CashAddrTypeStr = "P2PKH" | "P2SH";
|
|
2
|
+
declare function encode(prefix: string, type: CashAddrTypeStr, hash: Uint8Array): string;
|
|
3
|
+
declare function decode(address: string): {
|
|
4
|
+
hash: Uint8Array;
|
|
5
|
+
prefix: string;
|
|
6
|
+
type: CashAddrTypeStr;
|
|
7
|
+
};
|
|
8
|
+
export declare const cashaddr: {
|
|
9
|
+
decode: typeof decode;
|
|
10
|
+
encode: typeof encode;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=cashaddr.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cashaddr.d.ts","sourceRoot":"","sources":["../../../../src/utxo/helpers/cashaddr.ts"],"names":[],"mappings":"AAEA,KAAK,eAAe,GAAG,OAAO,GAAG,MAAM,CAAC;AAKxC,iBAAS,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,CAE/E;AAED,iBAAS,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,eAAe,CAAA;CAAE,CAK5F;AAED,eAAO,MAAM,QAAQ;;;CAAqB,CAAC"}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { type UTXOChain } from "@swapkit/helpers";
|
|
2
|
-
import type { TargetOutput,
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import type { TargetOutput, UTXOSizeInput } from "../types";
|
|
3
|
+
type AccumulativeParams<T extends UTXOSizeInput> = {
|
|
4
|
+
inputs: T[];
|
|
5
5
|
outputs: TargetOutput[];
|
|
6
|
+
feeRate: number;
|
|
6
7
|
chain: UTXOChain;
|
|
7
8
|
changeAddress?: string;
|
|
8
|
-
}
|
|
9
|
+
};
|
|
10
|
+
export declare function getDustThreshold(chain: UTXOChain): 100000 | 550 | 5500 | 546;
|
|
11
|
+
export declare function accumulative<T extends UTXOSizeInput>({ inputs, outputs, feeRate, chain, changeAddress, }: AccumulativeParams<T>): {
|
|
9
12
|
fee: number;
|
|
10
|
-
inputs:
|
|
13
|
+
inputs: T[];
|
|
11
14
|
outputs: TargetOutput[];
|
|
12
15
|
} | {
|
|
13
16
|
fee: number;
|
|
14
17
|
inputs?: undefined;
|
|
15
18
|
outputs?: undefined;
|
|
16
19
|
};
|
|
20
|
+
export {};
|
|
17
21
|
//# sourceMappingURL=coinselect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coinselect.d.ts","sourceRoot":"","sources":["../../../../src/utxo/helpers/coinselect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"coinselect.d.ts","sourceRoot":"","sources":["../../../../src/utxo/helpers/coinselect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAWvE,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE5D,KAAK,kBAAkB,CAAC,CAAC,SAAS,aAAa,IAAI;IACjD,MAAM,EAAE,CAAC,EAAE,CAAC;IACZ,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,SAAS,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,6BAehD;AAED,wBAAgB,YAAY,CAAC,CAAC,SAAS,aAAa,EAAE,EACpD,MAAM,EACN,OAAO,EACP,OAAW,EACX,KAAqB,EACrB,aAAkB,GACnB,EAAE,kBAAkB,CAAC,CAAC,CAAC;;;;;;;;EA0DvB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TargetOutput, UTXOCalculateTxSizeParams, UTXOInputWithScriptType, UTXOType } from "../types";
|
|
1
|
+
import type { TargetOutput, UTXOCalculateTxSizeParams, UTXOInputWithScriptType, UTXOSizeInput, UTXOType } from "../types";
|
|
2
2
|
/**
|
|
3
3
|
* Minimum transaction fee
|
|
4
4
|
* 1000 satoshi/kB (similar to current `minrelaytxfee`)
|
|
@@ -6,8 +6,9 @@ import type { TargetOutput, UTXOCalculateTxSizeParams, UTXOInputWithScriptType,
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const MIN_TX_FEE = 1000;
|
|
8
8
|
export declare const TX_OVERHEAD: number;
|
|
9
|
+
export declare const SEGWIT_MARKER_FLAG_WEIGHT = 2;
|
|
9
10
|
export declare const OP_RETURN_OVERHEAD: number;
|
|
10
|
-
export declare function compileMemo(memo: string):
|
|
11
|
+
export declare function compileMemo(memo: string): Uint8Array;
|
|
11
12
|
export declare enum UTXOScriptType {
|
|
12
13
|
P2PKH = "P2PKH",// legacy
|
|
13
14
|
P2WPKH = "P2WPKH"
|
|
@@ -16,6 +17,6 @@ export declare const InputSizes: Record<UTXOScriptType, number>;
|
|
|
16
17
|
export declare const OutputSizes: Record<UTXOScriptType, number>;
|
|
17
18
|
export declare const getScriptTypeForAddress: (address: string) => UTXOScriptType;
|
|
18
19
|
export declare const calculateTxSize: ({ inputs, outputs, feeRate }: UTXOCalculateTxSizeParams) => number;
|
|
19
|
-
export declare const getInputSize: (input: UTXOInputWithScriptType | UTXOType) => number;
|
|
20
|
+
export declare const getInputSize: (input: UTXOInputWithScriptType | UTXOType | UTXOSizeInput) => number;
|
|
20
21
|
export declare const getOutputSize: (output: TargetOutput, scriptType?: UTXOScriptType) => number;
|
|
21
22
|
//# sourceMappingURL=txSize.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"txSize.d.ts","sourceRoot":"","sources":["../../../../src/utxo/helpers/txSize.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"txSize.d.ts","sourceRoot":"","sources":["../../../../src/utxo/helpers/txSize.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EACZ,yBAAyB,EACzB,uBAAuB,EACvB,aAAa,EACb,QAAQ,EACT,MAAM,UAAU,CAAC;AAElB;;;;GAIG;AACH,eAAO,MAAM,UAAU,OAAO,CAAC;AAC/B,eAAO,MAAM,WAAW,QAAgB,CAAC;AACzC,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAC3C,eAAO,MAAM,kBAAkB,QAAY,CAAC;AAI5C,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAGpD;AAED,oBAAY,cAAc;IACxB,KAAK,UAAU,CAAE,SAAS;IAE1B,MAAM,WAAW;CAElB;AAED,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAIrD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAItD,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,SAAS,MAAM,mBA+DtD,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,8BAA8B,yBAAyB,WAsBtF,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,OAAO,uBAAuB,GAAG,QAAQ,GAAG,aAAa,WAQrF,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,QAAQ,YAAY,EAAE,aAAa,cAAc,WAY9E,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
export * from "./hdWallet";
|
|
1
2
|
export * from "./helpers";
|
|
2
3
|
export * from "./toolbox";
|
|
3
4
|
export * from "./toolbox/bitcoinCash";
|
|
4
|
-
export
|
|
5
|
+
export { addInputsAndOutputs, addressFromKeysGetter, createUTXOToolbox, getNetworkForChain, getUTXOAddressValidator, nonSegwitChains, validateUtxoAddress, } from "./toolbox/utxo";
|
|
5
6
|
export * from "./toolbox/zcash";
|
|
6
7
|
export * from "./types";
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utxo/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC;AACtC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utxo/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC;AACtC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,EACvB,eAAe,EACf,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Chain, type DerivationPathArray, FeeOption } from "@swapkit/helpers";
|
|
2
|
-
import {
|
|
2
|
+
import { Transaction } from "@swapkit/utxo-signer";
|
|
3
3
|
import { accumulative } from "../helpers";
|
|
4
|
-
import type {
|
|
4
|
+
import type { TargetOutput, UTXOBuildTxParams, UTXOTransferParams, UTXOType } from "../types";
|
|
5
5
|
import type { UtxoToolboxParams } from "./params";
|
|
6
|
-
import {
|
|
6
|
+
import { stripPrefix, validateBchAddress } from "./validators";
|
|
7
7
|
export declare function stripToCashAddress(address: string): string;
|
|
8
8
|
export declare function createBCHToolbox<T extends typeof Chain.BitcoinCash>(toolboxParams: UtxoToolboxParams[T] | {
|
|
9
9
|
phrase?: string;
|
|
10
10
|
derivationPath?: DerivationPathArray;
|
|
11
11
|
index?: number;
|
|
12
|
-
}):
|
|
12
|
+
}): {
|
|
13
13
|
broadcastTx: (txHash: string) => Promise<string>;
|
|
14
14
|
buildTx: typeof buildTx;
|
|
15
15
|
createTransaction: typeof createTransaction;
|
|
@@ -24,14 +24,30 @@ export declare function createBCHToolbox<T extends typeof Chain.BitcoinCash>(too
|
|
|
24
24
|
stripPrefix: typeof stripPrefix;
|
|
25
25
|
stripToCashAddress: typeof stripToCashAddress;
|
|
26
26
|
transfer: ({ recipient, assetValue, feeOptionKey, ...rest }: UTXOTransferParams) => Promise<string>;
|
|
27
|
-
validateAddress: typeof
|
|
27
|
+
validateAddress: typeof validateBchAddress;
|
|
28
28
|
accumulative: typeof accumulative;
|
|
29
|
+
bumpFee: ({ txid, newFeeRate, recipient, memo }: import("..").RBFTransactionParams) => Promise<{
|
|
30
|
+
newFee: number;
|
|
31
|
+
originalFee: number;
|
|
32
|
+
txid: string;
|
|
33
|
+
}>;
|
|
29
34
|
calculateTxSize: ({ inputs, outputs, feeRate }: import("..").UTXOCalculateTxSizeParams) => number;
|
|
30
35
|
createKeysForPath: (params: {
|
|
31
36
|
wif?: string;
|
|
32
37
|
phrase?: string;
|
|
33
38
|
derivationPath?: string;
|
|
34
|
-
}) =>
|
|
39
|
+
}) => {
|
|
40
|
+
privateKey: import("@swapkit/utxo-signer/utils").Bytes;
|
|
41
|
+
publicKey: Uint8Array<ArrayBufferLike>;
|
|
42
|
+
};
|
|
43
|
+
createReplacementTransaction: ({ txid, newFeeRate, recipient, memo, }: import("..").RBFTransactionParams) => Promise<import("./utxo").ReplacementTransactionResult>;
|
|
44
|
+
deriveAddressAtIndex: ({ index, change }: import("..").DeriveAddressParams) => {
|
|
45
|
+
address: string;
|
|
46
|
+
change: boolean;
|
|
47
|
+
index: number;
|
|
48
|
+
pubkey: string;
|
|
49
|
+
} | undefined;
|
|
50
|
+
derivePrivateKeyAtIndex: ({ index, change }: import("..").DeriveAddressParams) => Uint8Array<ArrayBufferLike> | undefined;
|
|
35
51
|
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
36
52
|
from: string;
|
|
37
53
|
memo?: string;
|
|
@@ -48,32 +64,76 @@ export declare function createBCHToolbox<T extends typeof Chain.BitcoinCash>(too
|
|
|
48
64
|
feeRate?: number;
|
|
49
65
|
fetchTxHex?: boolean;
|
|
50
66
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
67
|
+
getExtendedPublicKey: () => string | undefined;
|
|
51
68
|
getInputsOutputsFee: ({ assetValue, feeOptionKey, feeRate, memo, sender, recipient, }: Omit<UTXOBuildTxParams, "feeRate"> & {
|
|
52
69
|
feeOptionKey?: FeeOption;
|
|
53
70
|
feeRate?: number;
|
|
54
71
|
}) => Promise<{
|
|
55
72
|
fee: number;
|
|
56
|
-
inputs:
|
|
73
|
+
inputs: {
|
|
74
|
+
address: string;
|
|
75
|
+
hash: string;
|
|
76
|
+
index: number;
|
|
77
|
+
txHex: string | undefined;
|
|
78
|
+
value: number;
|
|
79
|
+
witnessUtxo: {
|
|
80
|
+
script: Buffer<ArrayBuffer>;
|
|
81
|
+
value: number;
|
|
82
|
+
};
|
|
83
|
+
}[];
|
|
57
84
|
outputs: TargetOutput[];
|
|
58
85
|
} | {
|
|
59
86
|
fee: number;
|
|
60
87
|
inputs?: undefined;
|
|
61
88
|
outputs?: undefined;
|
|
62
89
|
}>;
|
|
90
|
+
getNetworkForChain: () => import("@swapkit/utxo-signer").BTCNetwork;
|
|
63
91
|
getPrivateKeyFromMnemonic: (params: {
|
|
64
92
|
phrase: string;
|
|
65
93
|
derivationPath: string;
|
|
66
94
|
}) => string;
|
|
67
|
-
|
|
95
|
+
isRBFEnabled: (txid: string) => Promise<import("./utxo").RBFStatusResult>;
|
|
96
|
+
keys: {
|
|
97
|
+
privateKey: import("@swapkit/utxo-signer/utils").Bytes;
|
|
98
|
+
publicKey: Uint8Array<ArrayBufferLike>;
|
|
99
|
+
} | undefined;
|
|
100
|
+
resolveDerivationIndex: ({ address, gapLimit }: import("..").ResolveDerivationParams) => {
|
|
101
|
+
change: boolean;
|
|
102
|
+
index: number;
|
|
103
|
+
} | undefined;
|
|
104
|
+
signAndBroadcastTransaction: (tx: InstanceType<typeof Transaction>) => Promise<string>;
|
|
105
|
+
signTransactionWithMultipleKeys: ({ tx, inputDerivations, }: {
|
|
106
|
+
tx: InstanceType<typeof Transaction>;
|
|
107
|
+
inputDerivations: import("..").InputDerivation[];
|
|
108
|
+
}) => Transaction;
|
|
109
|
+
transferFromMultipleAddresses: ({ utxos, recipient, assetValue, memo, feeRate, feeOptionKey, changeAddress, }: {
|
|
110
|
+
utxos: import("..").UTXOForMultiAddressTransfer[];
|
|
111
|
+
recipient: string;
|
|
112
|
+
assetValue: import("@swapkit/helpers").AssetValue;
|
|
113
|
+
memo?: string;
|
|
114
|
+
feeRate?: number;
|
|
115
|
+
feeOptionKey?: FeeOption;
|
|
116
|
+
changeAddress?: string;
|
|
117
|
+
}) => Promise<string>;
|
|
118
|
+
};
|
|
68
119
|
declare function createTransaction({ assetValue, recipient, memo, feeRate, sender }: UTXOBuildTxParams): Promise<{
|
|
69
|
-
|
|
70
|
-
|
|
120
|
+
inputs: UTXOType[];
|
|
121
|
+
tx: Transaction;
|
|
122
|
+
utxos: {
|
|
123
|
+
address: string;
|
|
124
|
+
hash: string;
|
|
125
|
+
index: number;
|
|
126
|
+
txHex: string | undefined;
|
|
127
|
+
value: number;
|
|
128
|
+
witnessUtxo: {
|
|
129
|
+
script: Buffer<ArrayBuffer>;
|
|
130
|
+
value: number;
|
|
131
|
+
};
|
|
132
|
+
}[];
|
|
71
133
|
}>;
|
|
72
|
-
declare function buildTx({ assetValue, recipient, memo, feeRate, sender
|
|
73
|
-
setSigHashType?: boolean;
|
|
74
|
-
}): Promise<{
|
|
134
|
+
declare function buildTx({ assetValue, recipient, memo, feeRate, sender }: UTXOBuildTxParams): Promise<{
|
|
75
135
|
inputs: UTXOType[];
|
|
76
|
-
|
|
136
|
+
tx: Transaction;
|
|
77
137
|
utxos: {
|
|
78
138
|
address: string;
|
|
79
139
|
hash: string;
|
|
@@ -87,7 +147,7 @@ declare function buildTx({ assetValue, recipient, memo, feeRate, sender, setSigH
|
|
|
87
147
|
}[];
|
|
88
148
|
}>;
|
|
89
149
|
declare function getAddressFromKeys(keys: {
|
|
90
|
-
|
|
150
|
+
publicKey: Uint8Array;
|
|
91
151
|
}): string;
|
|
92
152
|
export {};
|
|
93
153
|
//# sourceMappingURL=bitcoinCash.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bitcoinCash.d.ts","sourceRoot":"","sources":["../../../../src/utxo/toolbox/bitcoinCash.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bitcoinCash.d.ts","sourceRoot":"","sources":["../../../../src/utxo/toolbox/bitcoinCash.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,EAEL,KAAK,mBAAmB,EAExB,SAAS,EAIV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAOL,WAAW,EACZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,YAAY,EAA2D,MAAM,YAAY,CAAC;AACnG,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC9F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAI/D,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,UAEjD;AA6BD,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,OAAO,KAAK,CAAC,WAAW,EACjE,aAAa,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,mBAAmB,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE;;;;;;0BAsB5E,MAAM;;;;;;;;iEA4EtC,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;YA6EkwE,CAAC;eAAqB,CAAC;oBAA0B,CAAC;kBAA2B,CAAC;;;;;;YAAowC,CAAC;oBAA0B,CAAC;eAAwB,CAAC;kBAAwB,CAAC;;;;oBAA/+D,CAAC;eAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAvI/tD;AAED,iBAAe,iBAAiB,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,iBAAiB;;;;;;;;;;;;;;GAwCnG;AAiCD,iBAAe,OAAO,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,iBAAiB;YA2CvD,QAAQ,EAAE;;;;;;;;;;;;;GAC5C;AAED,iBAAS,kBAAkB,CAAC,IAAI,EAAE;IAAE,SAAS,EAAE,UAAU,CAAA;CAAE,UAa1D"}
|
|
@@ -3,9 +3,9 @@ import { createBCHToolbox } from "./bitcoinCash";
|
|
|
3
3
|
import type { UtxoToolboxParams } from "./params";
|
|
4
4
|
import { createUTXOToolbox } from "./utxo";
|
|
5
5
|
import { createZcashToolbox } from "./zcash";
|
|
6
|
-
type BCHToolbox =
|
|
7
|
-
type CommonUTXOToolbox =
|
|
8
|
-
type ZcashToolbox =
|
|
6
|
+
type BCHToolbox = ReturnType<typeof createBCHToolbox>;
|
|
7
|
+
type CommonUTXOToolbox = ReturnType<typeof createUTXOToolbox<Exclude<UTXOChain, typeof Chain.BitcoinCash | typeof Chain.Zcash>>>;
|
|
8
|
+
type ZcashToolbox = ReturnType<typeof createZcashToolbox>;
|
|
9
9
|
export type UTXOToolboxes = {
|
|
10
10
|
[Chain.BitcoinCash]: BCHToolbox;
|
|
11
11
|
[Chain.Bitcoin]: CommonUTXOToolbox;
|
|
@@ -21,8 +21,9 @@ export declare function getUtxoToolbox<T extends keyof UTXOToolboxes>(chain: T,
|
|
|
21
21
|
phrase?: string;
|
|
22
22
|
derivationPath?: DerivationPathArray;
|
|
23
23
|
index?: number;
|
|
24
|
-
}):
|
|
24
|
+
}): UTXOToolboxes[T];
|
|
25
|
+
export { type CreateHDWalletHelpersParams, createHDWalletHelpers } from "../hdWallet";
|
|
25
26
|
export { stripToCashAddress } from "./bitcoinCash";
|
|
26
27
|
export * from "./params";
|
|
27
|
-
export {
|
|
28
|
+
export { stripPrefix, validateBchAddress, validateZcashAddress } from "./validators";
|
|
28
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utxo/toolbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,mBAAmB,EAAgB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,KAAK,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utxo/toolbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,mBAAmB,EAAgB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAA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AE,WAAW,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1,32 +1,24 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Internal type definitions for UTXO toolbox parameters.
|
|
3
|
-
* These are not exported from the package to avoid leaking third-party library types.
|
|
4
|
-
*/
|
|
5
|
-
import type { ZcashPsbt } from "@bitgo/utxo-lib/dist/src/bitgo";
|
|
6
1
|
import { Chain, type ChainSigner } from "@swapkit/helpers";
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
export type UTXOSigner = ChainSigner<any, any>;
|
|
3
|
+
export type ZcashSigner = ChainSigner<any, any>;
|
|
9
4
|
export type UtxoToolboxParams = {
|
|
10
5
|
[Chain.BitcoinCash]: {
|
|
11
|
-
signer
|
|
12
|
-
builder: TransactionBuilderType;
|
|
13
|
-
utxos: UTXOType[];
|
|
14
|
-
}, TransactionType>;
|
|
6
|
+
signer?: UTXOSigner;
|
|
15
7
|
};
|
|
16
8
|
[Chain.Bitcoin]: {
|
|
17
|
-
signer
|
|
9
|
+
signer?: UTXOSigner;
|
|
18
10
|
};
|
|
19
11
|
[Chain.Dogecoin]: {
|
|
20
|
-
signer
|
|
12
|
+
signer?: UTXOSigner;
|
|
21
13
|
};
|
|
22
14
|
[Chain.Litecoin]: {
|
|
23
|
-
signer
|
|
15
|
+
signer?: UTXOSigner;
|
|
24
16
|
};
|
|
25
17
|
[Chain.Dash]: {
|
|
26
|
-
signer
|
|
18
|
+
signer?: UTXOSigner;
|
|
27
19
|
};
|
|
28
20
|
[Chain.Zcash]: {
|
|
29
|
-
signer?:
|
|
21
|
+
signer?: ZcashSigner;
|
|
30
22
|
};
|
|
31
23
|
};
|
|
32
24
|
//# sourceMappingURL=params.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"params.d.ts","sourceRoot":"","sources":["../../../../src/utxo/toolbox/params.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"params.d.ts","sourceRoot":"","sources":["../../../../src/utxo/toolbox/params.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE3D,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAC/C,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAEhD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,UAAU,CAAA;KAAE,CAAC;IAC7C,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,UAAU,CAAA;KAAE,CAAC;IACzC,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,UAAU,CAAA;KAAE,CAAC;IAC1C,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,UAAU,CAAA;KAAE,CAAC;IAC1C,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,UAAU,CAAA;KAAE,CAAC;IACtC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,CAAC;CACzC,CAAC"}
|
|
@@ -1,46 +1,132 @@
|
|
|
1
|
-
import { AssetValue,
|
|
2
|
-
import {
|
|
3
|
-
import type { ECPairInterface } from "ecpair";
|
|
1
|
+
import { AssetValue, type DerivationPathArray, FeeOption, type UTXOChain } from "@swapkit/helpers";
|
|
2
|
+
import { type BTCNetwork, Transaction } from "@swapkit/utxo-signer";
|
|
4
3
|
import { accumulative } from "../helpers";
|
|
5
|
-
import type {
|
|
4
|
+
import type { DeriveAddressParams, InputDerivation, RBFTransactionParams, ResolveDerivationParams, TargetOutput, UTXOBuildTxParams, UTXOForMultiAddressTransfer, UTXOTransferParams, UTXOType } from "../types";
|
|
6
5
|
import type { UtxoToolboxParams } from "./params";
|
|
7
6
|
export declare const nonSegwitChains: UTXOChain[];
|
|
8
|
-
export declare
|
|
7
|
+
export declare const rbfSupportedChains: UTXOChain[];
|
|
8
|
+
export declare function validateUtxoAddress({ address, chain }: {
|
|
9
|
+
address: string;
|
|
10
|
+
chain: UTXOChain;
|
|
11
|
+
}): boolean;
|
|
12
|
+
export declare function getNetworkForChain(chain: UTXOChain): BTCNetwork;
|
|
13
|
+
export declare function createKeysForPath({ phrase, derivationPath, chain, wif, seed, }: {
|
|
14
|
+
phrase?: string;
|
|
15
|
+
derivationPath?: string;
|
|
16
|
+
chain: UTXOChain;
|
|
17
|
+
wif?: string;
|
|
18
|
+
seed?: Uint8Array;
|
|
19
|
+
}): {
|
|
20
|
+
privateKey: import("@swapkit/utxo-signer/utils").Bytes;
|
|
21
|
+
publicKey: Uint8Array<ArrayBufferLike>;
|
|
22
|
+
};
|
|
23
|
+
export declare function addInputsAndOutputs({ inputs, outputs, chain, tx, sender, compiledMemo, enableRBF, }: {
|
|
9
24
|
inputs: UTXOType[];
|
|
10
25
|
outputs: TargetOutput[];
|
|
11
26
|
chain: UTXOChain;
|
|
12
|
-
|
|
27
|
+
tx: InstanceType<typeof Transaction>;
|
|
13
28
|
sender: string;
|
|
14
|
-
compiledMemo:
|
|
29
|
+
compiledMemo: Uint8Array | null;
|
|
30
|
+
enableRBF?: boolean;
|
|
15
31
|
}): {
|
|
16
32
|
inputs: UTXOType[];
|
|
17
|
-
|
|
33
|
+
tx: Transaction;
|
|
18
34
|
};
|
|
19
|
-
declare function createTransaction({ assetValue, recipient, memo, feeRate, sender, fetchTxHex, }: UTXOBuildTxParams): Promise<{
|
|
20
|
-
psbt: Psbt;
|
|
21
|
-
utxos: UTXOType[];
|
|
35
|
+
declare function createTransaction({ assetValue, recipient, memo, feeRate, sender, fetchTxHex, enableRBF, }: UTXOBuildTxParams): Promise<{
|
|
22
36
|
inputs: UTXOType[];
|
|
37
|
+
tx: Transaction;
|
|
38
|
+
utxos: {
|
|
39
|
+
address: string;
|
|
40
|
+
hash: string;
|
|
41
|
+
index: number;
|
|
42
|
+
txHex: string | undefined;
|
|
43
|
+
value: number;
|
|
44
|
+
witnessUtxo: {
|
|
45
|
+
script: Buffer<ArrayBuffer>;
|
|
46
|
+
value: number;
|
|
47
|
+
};
|
|
48
|
+
}[];
|
|
23
49
|
}>;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
})
|
|
50
|
+
declare function getInputsOutputsFee({ assetValue, feeOptionKey, feeRate, memo, sender, recipient, }: Omit<UTXOBuildTxParams, "feeRate"> & {
|
|
51
|
+
feeOptionKey?: FeeOption;
|
|
52
|
+
feeRate?: number;
|
|
53
|
+
}): Promise<{
|
|
54
|
+
fee: number;
|
|
55
|
+
inputs: {
|
|
56
|
+
address: string;
|
|
57
|
+
hash: string;
|
|
58
|
+
index: number;
|
|
59
|
+
txHex: string | undefined;
|
|
60
|
+
value: number;
|
|
61
|
+
witnessUtxo: {
|
|
62
|
+
script: Buffer<ArrayBuffer>;
|
|
63
|
+
value: number;
|
|
64
|
+
};
|
|
65
|
+
}[];
|
|
66
|
+
outputs: TargetOutput[];
|
|
67
|
+
} | {
|
|
68
|
+
fee: number;
|
|
69
|
+
inputs?: undefined;
|
|
70
|
+
outputs?: undefined;
|
|
71
|
+
}>;
|
|
72
|
+
export declare function getUTXOAddressValidator(chain: UTXOChain): (address: string) => boolean;
|
|
73
|
+
export declare function addressFromKeysGetter(chain: UTXOChain): (keys: {
|
|
74
|
+
publicKey: Uint8Array;
|
|
75
|
+
}) => string;
|
|
76
|
+
export type RBFStatusResult = {
|
|
77
|
+
supported: false;
|
|
78
|
+
reason: string;
|
|
79
|
+
} | {
|
|
80
|
+
supported: true;
|
|
81
|
+
enabled: boolean;
|
|
82
|
+
confirmed: boolean;
|
|
83
|
+
canReplace: boolean;
|
|
84
|
+
fee: number;
|
|
85
|
+
sequences: number[];
|
|
86
|
+
};
|
|
87
|
+
export type ReplacementTransactionResult = {
|
|
88
|
+
tx: InstanceType<typeof Transaction>;
|
|
89
|
+
originalFee: number;
|
|
90
|
+
newFee: number;
|
|
91
|
+
feeDelta: number;
|
|
92
|
+
};
|
|
93
|
+
export type BumpFeeResult = {
|
|
94
|
+
txid: string;
|
|
95
|
+
originalFee: number;
|
|
96
|
+
newFee: number;
|
|
97
|
+
};
|
|
28
98
|
export declare function createUTXOToolbox<T extends UTXOChain>({ chain, ...toolboxParams }: (UtxoToolboxParams[T] | {
|
|
29
99
|
phrase?: string;
|
|
30
100
|
derivationPath?: DerivationPathArray;
|
|
31
101
|
index?: number;
|
|
32
102
|
}) & {
|
|
33
103
|
chain: T;
|
|
34
|
-
}):
|
|
104
|
+
}): {
|
|
35
105
|
accumulative: typeof accumulative;
|
|
36
106
|
broadcastTx: (txHash: string) => Promise<string>;
|
|
107
|
+
bumpFee: ({ txid, newFeeRate, recipient, memo }: RBFTransactionParams) => Promise<{
|
|
108
|
+
newFee: number;
|
|
109
|
+
originalFee: number;
|
|
110
|
+
txid: string;
|
|
111
|
+
}>;
|
|
37
112
|
calculateTxSize: ({ inputs, outputs, feeRate }: import("..").UTXOCalculateTxSizeParams) => number;
|
|
38
113
|
createKeysForPath: (params: {
|
|
39
114
|
wif?: string;
|
|
40
115
|
phrase?: string;
|
|
41
116
|
derivationPath?: string;
|
|
42
|
-
}) =>
|
|
117
|
+
}) => {
|
|
118
|
+
privateKey: import("@swapkit/utxo-signer/utils").Bytes;
|
|
119
|
+
publicKey: Uint8Array<ArrayBufferLike>;
|
|
120
|
+
};
|
|
121
|
+
createReplacementTransaction: ({ txid, newFeeRate, recipient, memo, }: RBFTransactionParams) => Promise<ReplacementTransactionResult>;
|
|
43
122
|
createTransaction: typeof createTransaction;
|
|
123
|
+
deriveAddressAtIndex: ({ index, change }: DeriveAddressParams) => {
|
|
124
|
+
address: string;
|
|
125
|
+
change: boolean;
|
|
126
|
+
index: number;
|
|
127
|
+
pubkey: string;
|
|
128
|
+
} | undefined;
|
|
129
|
+
derivePrivateKeyAtIndex: ({ index, change }: DeriveAddressParams) => Uint8Array<ArrayBufferLike> | undefined;
|
|
44
130
|
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
45
131
|
from: string;
|
|
46
132
|
memo?: string;
|
|
@@ -57,47 +143,50 @@ export declare function createUTXOToolbox<T extends UTXOChain>({ chain, ...toolb
|
|
|
57
143
|
feeRate?: number;
|
|
58
144
|
fetchTxHex?: boolean;
|
|
59
145
|
}) => Promise<AssetValue>;
|
|
60
|
-
getAddress: () => Promise<string | undefined>;
|
|
61
|
-
getAddressFromKeys: (keys:
|
|
146
|
+
getAddress: () => string | Promise<string> | Promise<undefined>;
|
|
147
|
+
getAddressFromKeys: (keys: {
|
|
148
|
+
publicKey: Uint8Array;
|
|
149
|
+
}) => string;
|
|
62
150
|
getBalance: (address: string, scamFilter?: boolean) => Promise<AssetValue[]>;
|
|
151
|
+
getExtendedPublicKey: () => string | undefined;
|
|
63
152
|
getFeeRates: () => Promise<{
|
|
64
153
|
average: number;
|
|
65
154
|
fast: number;
|
|
66
155
|
fastest: number;
|
|
67
156
|
}>;
|
|
68
157
|
getInputsOutputsFee: typeof getInputsOutputsFee;
|
|
158
|
+
getNetworkForChain: () => BTCNetwork;
|
|
69
159
|
getPrivateKeyFromMnemonic: (params: {
|
|
70
160
|
phrase: string;
|
|
71
161
|
derivationPath: string;
|
|
72
162
|
}) => string;
|
|
73
|
-
|
|
163
|
+
isRBFEnabled: (txid: string) => Promise<RBFStatusResult>;
|
|
164
|
+
keys: {
|
|
165
|
+
privateKey: import("@swapkit/utxo-signer/utils").Bytes;
|
|
166
|
+
publicKey: Uint8Array<ArrayBufferLike>;
|
|
167
|
+
} | undefined;
|
|
168
|
+
resolveDerivationIndex: ({ address, gapLimit }: ResolveDerivationParams) => {
|
|
169
|
+
change: boolean;
|
|
170
|
+
index: number;
|
|
171
|
+
} | undefined;
|
|
172
|
+
signAndBroadcastTransaction: (tx: InstanceType<typeof Transaction>) => Promise<string>;
|
|
173
|
+
signTransactionWithMultipleKeys: ({ tx, inputDerivations, }: {
|
|
174
|
+
tx: InstanceType<typeof Transaction>;
|
|
175
|
+
inputDerivations: InputDerivation[];
|
|
176
|
+
}) => Transaction;
|
|
177
|
+
transfer: ({ memo, recipient, feeOptionKey, feeRate, assetValue, enableRBF, }: UTXOTransferParams & {
|
|
178
|
+
enableRBF?: boolean;
|
|
179
|
+
}) => Promise<string>;
|
|
180
|
+
transferFromMultipleAddresses: ({ utxos, recipient, assetValue, memo, feeRate, feeOptionKey, changeAddress, }: {
|
|
181
|
+
utxos: UTXOForMultiAddressTransfer[];
|
|
182
|
+
recipient: string;
|
|
183
|
+
assetValue: AssetValue;
|
|
184
|
+
memo?: string;
|
|
185
|
+
feeRate?: number;
|
|
186
|
+
feeOptionKey?: FeeOption;
|
|
187
|
+
changeAddress?: string;
|
|
188
|
+
}) => Promise<string>;
|
|
74
189
|
validateAddress: (address: string) => boolean;
|
|
75
|
-
}>;
|
|
76
|
-
declare function getInputsOutputsFee({ assetValue, feeOptionKey, feeRate, memo, sender, recipient, }: Omit<UTXOBuildTxParams, "feeRate"> & {
|
|
77
|
-
feeOptionKey?: FeeOption;
|
|
78
|
-
feeRate?: number;
|
|
79
|
-
}): Promise<{
|
|
80
|
-
fee: number;
|
|
81
|
-
inputs: (UTXOType | import("..").UTXOInputWithScriptType)[];
|
|
82
|
-
outputs: TargetOutput[];
|
|
83
|
-
} | {
|
|
84
|
-
fee: number;
|
|
85
|
-
inputs?: undefined;
|
|
86
|
-
outputs?: undefined;
|
|
87
|
-
}>;
|
|
88
|
-
type CreateKeysForPathReturnType = {
|
|
89
|
-
[Chain.BitcoinCash]: BchECPair;
|
|
90
|
-
[Chain.Bitcoin]: ECPairInterface;
|
|
91
|
-
[Chain.Dash]: ECPairInterface;
|
|
92
|
-
[Chain.Dogecoin]: ECPairInterface;
|
|
93
|
-
[Chain.Litecoin]: ECPairInterface;
|
|
94
|
-
[Chain.Zcash]: ECPairInterface;
|
|
95
190
|
};
|
|
96
|
-
export declare function getCreateKeysForPath<T extends keyof CreateKeysForPathReturnType>(chain: T): Promise<(params: {
|
|
97
|
-
wif?: string;
|
|
98
|
-
phrase?: string;
|
|
99
|
-
derivationPath?: string;
|
|
100
|
-
}) => CreateKeysForPathReturnType[T]>;
|
|
101
|
-
export declare function addressFromKeysGetter(chain: UTXOChain): (keys: ECPairInterface | BchECPair) => string;
|
|
102
191
|
export {};
|
|
103
192
|
//# sourceMappingURL=utxo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utxo.d.ts","sourceRoot":"","sources":["../../../../src/utxo/toolbox/utxo.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utxo.d.ts","sourceRoot":"","sources":["../../../../src/utxo/toolbox/utxo.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,UAAU,EAIV,KAAK,mBAAmB,EAExB,SAAS,EAIT,KAAK,SAAS,EAIf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAGL,KAAK,UAAU,EASf,WAAW,EAEZ,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EACL,YAAY,EAQb,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EACpB,uBAAuB,EACvB,YAAY,EACZ,iBAAiB,EACjB,2BAA2B,EAC3B,kBAAkB,EAClB,QAAQ,EACT,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGlD,eAAO,MAAM,eAAe,EAAE,SAAS,EAAiE,CAAC;AACzG,eAAO,MAAM,kBAAkB,EAAE,SAAS,EAAoB,CAAC;AAE/D,wBAAgB,mBAAmB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KA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VxB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare function stripPrefix(address: string): string;
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function validateBchAddress(address: string): boolean;
|
|
3
3
|
export declare function validateZcashAddress(address: string): boolean;
|
|
4
4
|
//# sourceMappingURL=validators.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../../src/utxo/toolbox/validators.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../../src/utxo/toolbox/validators.ts"],"names":[],"mappings":"AAGA,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,UAE1C;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,WAGjD;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAgB7D"}
|