@vultisig/core-chain 1.1.0 → 1.2.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/CHANGELOG.md +74 -0
- package/dist/amount/toChainAmount.d.ts +6 -1
- package/dist/amount/toChainAmount.d.ts.map +1 -1
- package/dist/amount/toChainAmount.js +88 -0
- package/dist/amount/toChainAmount.js.map +1 -1
- package/dist/chains/cosmos/qbtc/claim/BtcAddressType.d.ts +7 -0
- package/dist/chains/cosmos/qbtc/claim/BtcAddressType.d.ts.map +1 -0
- package/dist/chains/cosmos/qbtc/claim/BtcAddressType.js +9 -0
- package/dist/chains/cosmos/qbtc/claim/BtcAddressType.js.map +1 -0
- package/dist/chains/cosmos/qbtc/claim/ClaimableUtxo.d.ts +8 -0
- package/dist/chains/cosmos/qbtc/claim/ClaimableUtxo.d.ts.map +1 -0
- package/dist/chains/cosmos/qbtc/claim/ClaimableUtxo.js +2 -0
- package/dist/chains/cosmos/qbtc/claim/ClaimableUtxo.js.map +1 -0
- package/dist/chains/cosmos/qbtc/claim/broadcastClaimTx.d.ts +25 -0
- package/dist/chains/cosmos/qbtc/claim/broadcastClaimTx.d.ts.map +1 -0
- package/dist/chains/cosmos/qbtc/claim/broadcastClaimTx.js +43 -0
- package/dist/chains/cosmos/qbtc/claim/broadcastClaimTx.js.map +1 -0
- package/dist/chains/cosmos/qbtc/claim/buildClaimTx.d.ts +26 -0
- package/dist/chains/cosmos/qbtc/claim/buildClaimTx.d.ts.map +1 -0
- package/dist/chains/cosmos/qbtc/claim/buildClaimTx.js +57 -0
- package/dist/chains/cosmos/qbtc/claim/buildClaimTx.js.map +1 -0
- package/dist/chains/cosmos/qbtc/claim/computeClaimHashes.d.ts +49 -0
- package/dist/chains/cosmos/qbtc/claim/computeClaimHashes.d.ts.map +1 -0
- package/dist/chains/cosmos/qbtc/claim/computeClaimHashes.js +85 -0
- package/dist/chains/cosmos/qbtc/claim/computeClaimHashes.js.map +1 -0
- package/dist/chains/cosmos/qbtc/claim/detectBtcAddressType.d.ts +14 -0
- package/dist/chains/cosmos/qbtc/claim/detectBtcAddressType.d.ts.map +1 -0
- package/dist/chains/cosmos/qbtc/claim/detectBtcAddressType.js +31 -0
- package/dist/chains/cosmos/qbtc/claim/detectBtcAddressType.js.map +1 -0
- package/dist/chains/cosmos/qbtc/claim/getClaimWithProofDisabled.d.ts +3 -0
- package/dist/chains/cosmos/qbtc/claim/getClaimWithProofDisabled.d.ts.map +1 -0
- package/dist/chains/cosmos/qbtc/claim/getClaimWithProofDisabled.js +13 -0
- package/dist/chains/cosmos/qbtc/claim/getClaimWithProofDisabled.js.map +1 -0
- package/dist/chains/cosmos/qbtc/claim/getClaimableUtxos.d.ts +14 -0
- package/dist/chains/cosmos/qbtc/claim/getClaimableUtxos.d.ts.map +1 -0
- package/dist/chains/cosmos/qbtc/claim/getClaimableUtxos.js +22 -0
- package/dist/chains/cosmos/qbtc/claim/getClaimableUtxos.js.map +1 -0
- package/dist/chains/cosmos/qbtc/claim/proofService.d.ts +50 -0
- package/dist/chains/cosmos/qbtc/claim/proofService.d.ts.map +1 -0
- package/dist/chains/cosmos/qbtc/claim/proofService.js +71 -0
- package/dist/chains/cosmos/qbtc/claim/proofService.js.map +1 -0
- package/dist/chains/cosmos/thor/kujira-merge/kujiraCoinsOnThorChain.js +1 -1
- package/dist/chains/cosmos/thor/lp/halts.d.ts +56 -0
- package/dist/chains/cosmos/thor/lp/halts.d.ts.map +1 -0
- package/dist/chains/cosmos/thor/lp/halts.js +95 -0
- package/dist/chains/cosmos/thor/lp/halts.js.map +1 -0
- package/dist/chains/cosmos/thor/lp/index.d.ts +34 -11
- package/dist/chains/cosmos/thor/lp/index.d.ts.map +1 -1
- package/dist/chains/cosmos/thor/lp/index.js +9 -15
- package/dist/chains/cosmos/thor/lp/index.js.map +1 -1
- package/dist/chains/cosmos/thor/lp/lockup.d.ts +47 -0
- package/dist/chains/cosmos/thor/lp/lockup.d.ts.map +1 -0
- package/dist/chains/cosmos/thor/lp/lockup.js +56 -0
- package/dist/chains/cosmos/thor/lp/lockup.js.map +1 -0
- package/dist/chains/cosmos/thor/lp/lpChainMap.d.ts +25 -0
- package/dist/chains/cosmos/thor/lp/lpChainMap.d.ts.map +1 -0
- package/dist/chains/cosmos/thor/lp/lpChainMap.js +30 -0
- package/dist/chains/cosmos/thor/lp/lpChainMap.js.map +1 -0
- package/dist/chains/cosmos/thor/lp/math.d.ts +129 -0
- package/dist/chains/cosmos/thor/lp/math.d.ts.map +1 -0
- package/dist/chains/cosmos/thor/lp/math.js +227 -0
- package/dist/chains/cosmos/thor/lp/math.js.map +1 -0
- package/dist/chains/cosmos/thor/lp/memberPool.d.ts +4 -0
- package/dist/chains/cosmos/thor/lp/memberPool.d.ts.map +1 -0
- package/dist/chains/cosmos/thor/lp/memberPool.js +24 -0
- package/dist/chains/cosmos/thor/lp/memberPool.js.map +1 -0
- package/dist/chains/cosmos/thor/lp/memo.d.ts +38 -17
- package/dist/chains/cosmos/thor/lp/memo.d.ts.map +1 -1
- package/dist/chains/cosmos/thor/lp/memo.js +40 -16
- package/dist/chains/cosmos/thor/lp/memo.js.map +1 -1
- package/dist/chains/cosmos/thor/lp/pairing.d.ts +30 -0
- package/dist/chains/cosmos/thor/lp/pairing.d.ts.map +1 -0
- package/dist/chains/cosmos/thor/lp/pairing.js +44 -0
- package/dist/chains/cosmos/thor/lp/pairing.js.map +1 -0
- package/dist/chains/cosmos/thor/lp/payload.d.ts +30 -10
- package/dist/chains/cosmos/thor/lp/payload.d.ts.map +1 -1
- package/dist/chains/cosmos/thor/lp/payload.js +30 -18
- package/dist/chains/cosmos/thor/lp/payload.js.map +1 -1
- package/dist/chains/cosmos/thor/lp/position.d.ts +15 -22
- package/dist/chains/cosmos/thor/lp/position.d.ts.map +1 -1
- package/dist/chains/cosmos/thor/lp/position.js +82 -35
- package/dist/chains/cosmos/thor/lp/position.js.map +1 -1
- package/dist/chains/cosmos/thor/lp/positions.d.ts +15 -0
- package/dist/chains/cosmos/thor/lp/positions.d.ts.map +1 -0
- package/dist/chains/cosmos/thor/lp/positions.js +47 -0
- package/dist/chains/cosmos/thor/lp/positions.js.map +1 -0
- package/dist/chains/cosmos/thor/lp/types.d.ts +45 -0
- package/dist/chains/cosmos/thor/lp/types.d.ts.map +1 -0
- package/dist/chains/cosmos/thor/lp/types.js +2 -0
- package/dist/chains/cosmos/thor/lp/types.js.map +1 -0
- package/dist/chains/cosmos/thor/lp/validation.d.ts +32 -7
- package/dist/chains/cosmos/thor/lp/validation.d.ts.map +1 -1
- package/dist/chains/cosmos/thor/lp/validation.js +76 -11
- package/dist/chains/cosmos/thor/lp/validation.js.map +1 -1
- package/dist/chains/evm/tx/fee/tw/getEvmTwFeeFields.js +1 -1
- package/dist/chains/utxo/tx/buildSignBitcoinFromPsbt.d.ts +21 -0
- package/dist/chains/utxo/tx/buildSignBitcoinFromPsbt.d.ts.map +1 -0
- package/dist/chains/utxo/tx/buildSignBitcoinFromPsbt.js +182 -0
- package/dist/chains/utxo/tx/buildSignBitcoinFromPsbt.js.map +1 -0
- package/dist/coin/chainFeeCoin.js +1 -1
- package/dist/coin/coins.js +1 -1
- package/dist/coin/find/index.js +2 -2
- package/dist/coin/knownTokens/cosmos.js +1 -1
- package/dist/coin/knownTokens/utils.js +1 -1
- package/dist/publicKey/address/cardano.js +1 -1
- package/dist/publicKey/address/cardano.js.map +1 -1
- package/dist/publicKey/address/deriveQbtcAddress.js +2 -2
- package/dist/publicKey/address/deriveQbtcAddress.js.map +1 -1
- package/dist/scripts/printKnownTokens.js +1 -1
- package/dist/swap/quote/findSwapQuote.d.ts +1 -1
- package/dist/swap/quote/findSwapQuote.js +1 -1
- package/dist/tx/broadcast/resolvers/evm.d.ts.map +1 -1
- package/dist/tx/broadcast/resolvers/evm.js +1 -1
- package/dist/tx/broadcast/resolvers/evm.js.map +1 -1
- package/dist/tx/broadcast/resolvers/ton.js +1 -1
- package/dist/tx/broadcast/resolvers/ton.js.map +1 -1
- package/dist/tx/hash/resolvers/cardano.js +1 -1
- package/dist/tx/hash/resolvers/cardano.js.map +1 -1
- package/package.json +91 -6
- package/dist/chains/cosmos/thor/lp/affiliate.d.ts +0 -16
- package/dist/chains/cosmos/thor/lp/affiliate.d.ts.map +0 -1
- package/dist/chains/cosmos/thor/lp/affiliate.js +0 -16
- package/dist/chains/cosmos/thor/lp/affiliate.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/chain/chains/cosmos/thor/lp/validation.ts"],"names":[],"mappings":"AAcA
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/chain/chains/cosmos/thor/lp/validation.ts"],"names":[],"mappings":"AAcA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,KAAG,MAQhD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,QAAa,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAsBxE,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,qBAAqB,GAAU,MAAM,MAAM,KAAG,OAAO,CAAC,IAAI,CAiCtE,CAAA"}
|
|
@@ -10,26 +10,91 @@ const extractPoolStatus = (raw) => {
|
|
|
10
10
|
return undefined;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Build the mimir flag key THORChain uses to pause LP deposits for a
|
|
14
|
+
* single pool. Format: `PAUSELPDEPOSIT-{CHAIN}-{ASSET_PLUS_CONTRACT}`.
|
|
14
15
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
16
|
+
* Examples:
|
|
17
|
+
* BTC.BTC → PAUSELPDEPOSIT-BTC-BTC
|
|
18
|
+
* DOGE.DOGE → PAUSELPDEPOSIT-DOGE-DOGE
|
|
19
|
+
* ETH.USDC-0XA0B... → PAUSELPDEPOSIT-ETH-USDC-0XA0B...
|
|
18
20
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
21
|
+
* Note: `CHAIN.ASSET` splits on the FIRST `.`; the rest (including any
|
|
22
|
+
* `-CONTRACT` suffix) is the asset portion, which is appended with a
|
|
23
|
+
* single `-` separator.
|
|
24
|
+
*/
|
|
25
|
+
export const poolPauseMimirKey = (pool) => {
|
|
26
|
+
const dotIdx = pool.indexOf('.');
|
|
27
|
+
if (dotIdx <= 0 || dotIdx >= pool.length - 1) {
|
|
28
|
+
throw new Error(`poolPauseMimirKey: invalid pool id ${pool}`);
|
|
29
|
+
}
|
|
30
|
+
const chain = pool.slice(0, dotIdx);
|
|
31
|
+
const asset = pool.slice(dotIdx + 1);
|
|
32
|
+
return `PAUSELPDEPOSIT-${chain}-${asset}`;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Fetch the raw thornode mimir map. Returns an object with flag keys as
|
|
36
|
+
* numbers. Used to check per-pool LP deposit pauses (PAUSELPDEPOSIT-*),
|
|
37
|
+
* liquidity lockup (LIQUIDITYLOCKUPBLOCKS), etc.
|
|
38
|
+
*/
|
|
39
|
+
export const getThorchainMimir = async () => {
|
|
40
|
+
const url = `${cosmosRpcUrl[Chain.THORChain]}/thorchain/mimir`;
|
|
41
|
+
const raw = await queryUrl(url);
|
|
42
|
+
if (!raw || typeof raw !== 'object') {
|
|
43
|
+
throw new Error(`getThorchainMimir: unexpected response shape from ${url}`);
|
|
44
|
+
}
|
|
45
|
+
// thornode /thorchain/mimir returns numeric values, but the JSON could
|
|
46
|
+
// deserialize as number or numeric string depending on the upstream
|
|
47
|
+
// proxy. Normalize to number, drop entries we can't coerce — downstream
|
|
48
|
+
// callers do `typeof v === 'number' && v > 0` checks anyway, and a NaN
|
|
49
|
+
// would silently defeat those.
|
|
50
|
+
const out = {};
|
|
51
|
+
for (const [k, v] of Object.entries(raw)) {
|
|
52
|
+
if (typeof v === 'number' && Number.isFinite(v)) {
|
|
53
|
+
out[k] = v;
|
|
54
|
+
}
|
|
55
|
+
else if (typeof v === 'string' && /^-?\d+$/.test(v)) {
|
|
56
|
+
out[k] = Number(v);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return out;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Verify a THORChain pool is currently depositable. Checks TWO layers:
|
|
63
|
+
*
|
|
64
|
+
* 1. **Thornode pool status** — `/thorchain/pool/{asset}.status` must be
|
|
65
|
+
* `Available`. Catches staged / suspended pools.
|
|
66
|
+
* 2. **Mimir per-pool pause flag** — `PAUSELPDEPOSIT-{chain}-{asset}`
|
|
67
|
+
* must not be set. Catches the case where the pool is listed as
|
|
68
|
+
* available BUT the THORChain handler rejects LP adds for it via
|
|
69
|
+
* mimir (what happened to BTC.BTC on 2026-04-10: pool.status was
|
|
70
|
+
* `Available`, deposits silently accepted into mempool, handler
|
|
71
|
+
* rejected at execution with "deposits are paused for asset
|
|
72
|
+
* (btc.btc): internal error"). Without the mimir check, the user
|
|
73
|
+
* signs a tx that is guaranteed to fail on-chain.
|
|
74
|
+
*
|
|
75
|
+
* Use this as the fail-fast gate before building an LP add payload.
|
|
22
76
|
*/
|
|
23
77
|
export const assertPoolDepositable = async (pool) => {
|
|
24
78
|
assertValidPoolId(pool);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const
|
|
79
|
+
// Run both checks in parallel — they hit different endpoints so there
|
|
80
|
+
// is no reason to serialize them.
|
|
81
|
+
const [poolRaw, mimir] = await Promise.all([
|
|
82
|
+
queryUrl(`${cosmosRpcUrl[Chain.THORChain]}/thorchain/pool/${encodeURIComponent(pool)}`),
|
|
83
|
+
getThorchainMimir(),
|
|
84
|
+
]);
|
|
85
|
+
// Check 1: thornode pool.status
|
|
86
|
+
const status = extractPoolStatus(poolRaw);
|
|
28
87
|
if (status === undefined) {
|
|
29
|
-
throw new Error(`assertPoolDepositable: pool ${pool} response from
|
|
88
|
+
throw new Error(`assertPoolDepositable: pool ${pool} response from thornode did not include a string \`status\` field`);
|
|
30
89
|
}
|
|
31
90
|
if (status !== 'Available') {
|
|
32
91
|
throw new Error(`assertPoolDepositable: pool ${pool} status is ${status}, must be Available for LP add`);
|
|
33
92
|
}
|
|
93
|
+
// Check 2: mimir per-pool PAUSELPDEPOSIT flag
|
|
94
|
+
const pauseKey = poolPauseMimirKey(pool);
|
|
95
|
+
const pauseValue = mimir[pauseKey];
|
|
96
|
+
if (typeof pauseValue === 'number' && pauseValue > 0) {
|
|
97
|
+
throw new Error(`assertPoolDepositable: pool ${pool} has LP deposits paused on-chain via mimir ${pauseKey}=${pauseValue}. THORChain validators have disabled new adds for this pool; any tx would be rejected at handler execution time.`);
|
|
98
|
+
}
|
|
34
99
|
};
|
|
35
100
|
//# sourceMappingURL=validation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../../../../../../packages/core/chain/chains/cosmos/thor/lp/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAA;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAA;AAE7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAE3C,MAAM,iBAAiB,GAAG,CAAC,GAAY,EAAsB,EAAE;IAC7D,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,QAAQ,IAAI,GAAG,EAAE,CAAC;QACtD,MAAM,MAAM,GAAI,GAA2B,CAAC,MAAM,CAAA;QAClD,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAA;IACxD,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA;AAED
|
|
1
|
+
{"version":3,"file":"validation.js","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,EAAE;KACpB,CAAC,CAAA;IAEF,gCAAgC;IAChC,MAAM,MAAM,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAA;IACzC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CACb,+BAA+B,IAAI,mEAAmE,CACvG,CAAA;IACH,CAAC;IACD,IAAI,MAAM,KAAK,WAAW,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CACb,+BAA+B,IAAI,cAAc,MAAM,gCAAgC,CACxF,CAAA;IACH,CAAC;IAED,8CAA8C;IAC9C,MAAM,QAAQ,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACxC,MAAM,UAAU,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAA;IAClC,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,UAAU,GAAG,CAAC,EAAE,CAAC;QACrD,MAAM,IAAI,KAAK,CACb,+BAA+B,IAAI,8CAA8C,QAAQ,IAAI,UAAU,kHAAkH,CAC1N,CAAA;IACH,CAAC;AACH,CAAC,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { match } from '@vultisig/lib-utils/match';
|
|
2
2
|
import { TW } from '@trustwallet/wallet-core';
|
|
3
3
|
import { toEvmTwAmount } from '../../tw/toEvmTwAmount.js';
|
|
4
|
-
import { evmChainTxFeeFormat } from '
|
|
4
|
+
import { evmChainTxFeeFormat } from '../index.js';
|
|
5
5
|
export const getEvmTwFeeFields = ({ chain, maxFeePerGasWei, priorityFee, gasLimit, }) => {
|
|
6
6
|
const feeFormat = evmChainTxFeeFormat[chain];
|
|
7
7
|
return match(feeFormat, {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SignBitcoin } from '@vultisig/core-mpc/types/vultisig/keysign/v1/wasm_execute_contract_payload_pb';
|
|
2
|
+
import { Network, Psbt } from 'bitcoinjs-lib';
|
|
3
|
+
type BuildSignBitcoinFromPsbtInput = {
|
|
4
|
+
psbt: Psbt;
|
|
5
|
+
senderAddress: string;
|
|
6
|
+
/** Bitcoin network for address decoding. Defaults to mainnet. */
|
|
7
|
+
network?: Network;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Decompose a BIP-174 PSBT into a structured SignBitcoin proto message.
|
|
11
|
+
* Co-signing devices can verify every input/output and compute exact sighashes
|
|
12
|
+
* from these fields without receiving an opaque blob.
|
|
13
|
+
*
|
|
14
|
+
* Currently supports P2WPKH and P2SH-P2WPKH inputs only.
|
|
15
|
+
* P2TR (Taproot/BIP-341) requires a different sighash algorithm and is planned for follow-up.
|
|
16
|
+
* P2PKH (legacy) requires legacy sighash (not BIP-143).
|
|
17
|
+
* See https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki
|
|
18
|
+
*/
|
|
19
|
+
export declare const buildSignBitcoinFromPsbt: ({ psbt, senderAddress, network, }: BuildSignBitcoinFromPsbtInput) => SignBitcoin;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=buildSignBitcoinFromPsbt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildSignBitcoinFromPsbt.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/chain/chains/utxo/tx/buildSignBitcoinFromPsbt.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,WAAW,EAEZ,MAAM,+EAA+E,CAAA;AACtF,OAAO,EAEL,OAAO,EAGP,IAAI,EAGL,MAAM,eAAe,CAAA;AAsEtB,KAAK,6BAA6B,GAAG;IACnC,IAAI,EAAE,IAAI,CAAA;IACV,aAAa,EAAE,MAAM,CAAA;IACrB,iEAAiE;IACjE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB,GAAI,mCAItC,6BAA6B,KAAG,WA4IlC,CAAA"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { create } from '@bufbuild/protobuf';
|
|
2
|
+
import { BitcoinInputSchema, BitcoinOutputSchema, SignBitcoinSchema, } from '@vultisig/core-mpc/types/vultisig/keysign/v1/wasm_execute_contract_payload_pb';
|
|
3
|
+
import { address as btcAddress, networks, opcodes, script as bscript, Transaction, } from 'bitcoinjs-lib';
|
|
4
|
+
/**
|
|
5
|
+
* Detect the script type from a scriptPubKey buffer.
|
|
6
|
+
* See https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki
|
|
7
|
+
*/
|
|
8
|
+
const detectScriptType = (scriptPubKey, redeemScript) => {
|
|
9
|
+
// P2WPKH: OP_0 PUSH_20 <20-byte-hash> (22 bytes)
|
|
10
|
+
if (scriptPubKey.length === 22 && scriptPubKey[0] === 0x00 && scriptPubKey[1] === 0x14) {
|
|
11
|
+
return 'p2wpkh';
|
|
12
|
+
}
|
|
13
|
+
// P2PKH: OP_DUP OP_HASH160 PUSH_20 <20-byte-hash> OP_EQUALVERIFY OP_CHECKSIG (25 bytes)
|
|
14
|
+
if (scriptPubKey.length === 25 &&
|
|
15
|
+
scriptPubKey[0] === 0x76 &&
|
|
16
|
+
scriptPubKey[1] === 0xa9 &&
|
|
17
|
+
scriptPubKey[2] === 0x14 &&
|
|
18
|
+
scriptPubKey[23] === 0x88 &&
|
|
19
|
+
scriptPubKey[24] === 0xac) {
|
|
20
|
+
return 'p2pkh';
|
|
21
|
+
}
|
|
22
|
+
// P2TR: OP_1 PUSH_32 <32-byte-key> (34 bytes)
|
|
23
|
+
if (scriptPubKey.length === 34 && scriptPubKey[0] === 0x51 && scriptPubKey[1] === 0x20) {
|
|
24
|
+
return 'p2tr';
|
|
25
|
+
}
|
|
26
|
+
// P2WSH: OP_0 PUSH_32 <32-byte-hash> (34 bytes)
|
|
27
|
+
if (scriptPubKey.length === 34 && scriptPubKey[0] === 0x00 && scriptPubKey[1] === 0x20) {
|
|
28
|
+
return 'p2wsh';
|
|
29
|
+
}
|
|
30
|
+
// P2SH-P2WPKH: only when redeemScript is a valid P2WPKH witness program
|
|
31
|
+
const redeem = redeemScript ? Buffer.from(redeemScript) : undefined;
|
|
32
|
+
if (scriptPubKey.length === 23 &&
|
|
33
|
+
scriptPubKey[0] === 0xa9 &&
|
|
34
|
+
scriptPubKey[1] === 0x14 &&
|
|
35
|
+
scriptPubKey[22] === 0x87 &&
|
|
36
|
+
redeem?.length === 22 &&
|
|
37
|
+
redeem[0] === 0x00 &&
|
|
38
|
+
redeem[1] === 0x14) {
|
|
39
|
+
return 'p2sh-p2wpkh';
|
|
40
|
+
}
|
|
41
|
+
return 'unknown';
|
|
42
|
+
};
|
|
43
|
+
/** Script types that computePreSigningHashes can produce sighashes for. */
|
|
44
|
+
const SUPPORTED_SCRIPT_TYPES = new Set(['p2wpkh', 'p2sh-p2wpkh']);
|
|
45
|
+
const isOpReturn = (script) => {
|
|
46
|
+
const chunks = bscript.decompile(script);
|
|
47
|
+
return chunks !== null && chunks[0] === opcodes.OP_RETURN;
|
|
48
|
+
};
|
|
49
|
+
const getOpReturnHex = (script) => {
|
|
50
|
+
const chunks = bscript.decompile(script);
|
|
51
|
+
if (!chunks || chunks[0] !== opcodes.OP_RETURN)
|
|
52
|
+
return undefined;
|
|
53
|
+
const dataChunks = chunks
|
|
54
|
+
.slice(1)
|
|
55
|
+
.filter((chunk) => Buffer.isBuffer(chunk));
|
|
56
|
+
if (dataChunks.length === 0)
|
|
57
|
+
return undefined;
|
|
58
|
+
return Buffer.concat(dataChunks).toString('hex');
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Decompose a BIP-174 PSBT into a structured SignBitcoin proto message.
|
|
62
|
+
* Co-signing devices can verify every input/output and compute exact sighashes
|
|
63
|
+
* from these fields without receiving an opaque blob.
|
|
64
|
+
*
|
|
65
|
+
* Currently supports P2WPKH and P2SH-P2WPKH inputs only.
|
|
66
|
+
* P2TR (Taproot/BIP-341) requires a different sighash algorithm and is planned for follow-up.
|
|
67
|
+
* P2PKH (legacy) requires legacy sighash (not BIP-143).
|
|
68
|
+
* See https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki
|
|
69
|
+
*/
|
|
70
|
+
export const buildSignBitcoinFromPsbt = ({ psbt, senderAddress, network = networks.bitcoin, }) => {
|
|
71
|
+
// Compute anyInputHasBip32 once (not per-input) for O(n) ownership detection
|
|
72
|
+
const anyInputHasBip32 = psbt.data.inputs.some(inp => (inp.bip32Derivation && inp.bip32Derivation.length > 0) ||
|
|
73
|
+
(inp.tapBip32Derivation &&
|
|
74
|
+
inp.tapBip32Derivation.length > 0));
|
|
75
|
+
const inputs = psbt.txInputs.map((txInput, i) => {
|
|
76
|
+
const inputData = psbt.data.inputs[i];
|
|
77
|
+
// Prefer witnessUtxo; fall back to nonWitnessUtxo (full prev tx)
|
|
78
|
+
let scriptPubKey;
|
|
79
|
+
let inputValue;
|
|
80
|
+
if (inputData.witnessUtxo) {
|
|
81
|
+
scriptPubKey = Buffer.from(inputData.witnessUtxo.script);
|
|
82
|
+
inputValue = BigInt(inputData.witnessUtxo.value);
|
|
83
|
+
// Fee snipe mitigation: cross-validate against nonWitnessUtxo if present.
|
|
84
|
+
// A malicious PSBT can lie about witnessUtxo.value; BIP-143 commits to it
|
|
85
|
+
// in the sighash, causing excess fees if the actual UTXO is worth more.
|
|
86
|
+
// See https://blog.trezor.io/details-of-the-multisig-change-address-issue-and-its-mitigation-6370ad73ed2a
|
|
87
|
+
if (inputData.nonWitnessUtxo) {
|
|
88
|
+
const prevTx = Transaction.fromBuffer(Buffer.from(inputData.nonWitnessUtxo));
|
|
89
|
+
// BIP-174: verify nonWitnessUtxo txid matches the input's prevout hash
|
|
90
|
+
const prevTxId = prevTx.getId();
|
|
91
|
+
const expectedTxId = Buffer.from(txInput.hash).reverse().toString('hex');
|
|
92
|
+
if (prevTxId !== expectedTxId) {
|
|
93
|
+
throw new Error(`Input #${i}: nonWitnessUtxo txid (${prevTxId.slice(0, 16)}...) does not match ` +
|
|
94
|
+
`input prevout (${expectedTxId.slice(0, 16)}...)`);
|
|
95
|
+
}
|
|
96
|
+
const prevOutput = prevTx.outs[txInput.index];
|
|
97
|
+
if (prevOutput && BigInt(prevOutput.value) !== inputValue) {
|
|
98
|
+
throw new Error(`Input #${i}: witnessUtxo value (${inputValue}) does not match ` +
|
|
99
|
+
`nonWitnessUtxo value (${prevOutput.value}) - possible fee snipe`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
else if (inputData.nonWitnessUtxo) {
|
|
104
|
+
const prevTx = Transaction.fromBuffer(Buffer.from(inputData.nonWitnessUtxo));
|
|
105
|
+
const prevOutput = prevTx.outs[txInput.index];
|
|
106
|
+
if (!prevOutput) {
|
|
107
|
+
throw new Error(`Input #${i}: nonWitnessUtxo has no output at index ${txInput.index}`);
|
|
108
|
+
}
|
|
109
|
+
scriptPubKey = Buffer.from(prevOutput.script);
|
|
110
|
+
inputValue = BigInt(prevOutput.value);
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
throw new Error(`Input #${i} missing both witnessUtxo and nonWitnessUtxo`);
|
|
114
|
+
}
|
|
115
|
+
if (inputValue < 0n) {
|
|
116
|
+
throw new Error(`Input #${i}: negative amount (${inputValue})`);
|
|
117
|
+
}
|
|
118
|
+
const scriptType = detectScriptType(scriptPubKey, inputData.redeemScript);
|
|
119
|
+
// Fail early for unsupported script types rather than at sighash time.
|
|
120
|
+
// This gives a clearer error at decomposition time.
|
|
121
|
+
const hasBip32 = (inputData.bip32Derivation && inputData.bip32Derivation.length > 0) ||
|
|
122
|
+
(inputData.tapBip32Derivation &&
|
|
123
|
+
inputData.tapBip32Derivation.length > 0);
|
|
124
|
+
const isOurs = anyInputHasBip32 ? !!hasBip32 : true;
|
|
125
|
+
if (isOurs && !SUPPORTED_SCRIPT_TYPES.has(scriptType)) {
|
|
126
|
+
const hints = {
|
|
127
|
+
p2tr: 'P2TR (Taproot) requires BIP-341 sighash. See https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki',
|
|
128
|
+
p2pkh: 'P2PKH (legacy) requires legacy sighash, not BIP-143.',
|
|
129
|
+
p2wsh: 'P2WSH requires BIP-143 with the full witnessScript as scriptCode.',
|
|
130
|
+
unknown: `Unrecognized scriptPubKey: ${scriptPubKey.toString('hex')}`,
|
|
131
|
+
};
|
|
132
|
+
throw new Error(`Input #${i}: unsupported script type '${scriptType}' for signing. ${hints[scriptType] ?? ''}`);
|
|
133
|
+
}
|
|
134
|
+
const sighashType = inputData.sighashType ?? 1; // SIGHASH_ALL
|
|
135
|
+
const redeemScript = inputData.redeemScript
|
|
136
|
+
? Buffer.from(inputData.redeemScript).toString('hex')
|
|
137
|
+
: undefined;
|
|
138
|
+
return create(BitcoinInputSchema, {
|
|
139
|
+
hash: Buffer.from(txInput.hash).reverse().toString('hex'),
|
|
140
|
+
index: txInput.index,
|
|
141
|
+
amount: inputValue,
|
|
142
|
+
scriptPubKey: scriptPubKey.toString('hex'),
|
|
143
|
+
scriptType,
|
|
144
|
+
sighashType,
|
|
145
|
+
isOurs,
|
|
146
|
+
redeemScript,
|
|
147
|
+
sequence: txInput.sequence,
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
const outputs = psbt.txOutputs.map((txOutput, outputIndex) => {
|
|
151
|
+
const script = Buffer.from(txOutput.script);
|
|
152
|
+
const opReturn = isOpReturn(script);
|
|
153
|
+
let outputAddress = '';
|
|
154
|
+
if (!opReturn) {
|
|
155
|
+
try {
|
|
156
|
+
outputAddress = btcAddress.fromOutputScript(txOutput.script, network);
|
|
157
|
+
}
|
|
158
|
+
catch {
|
|
159
|
+
// Non-standard output - address stays empty
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
// Change detection: Vultisig uses a single address per UTXO chain (no HD change
|
|
163
|
+
// derivation), so address comparison is the primary signal. BIP32 derivation on
|
|
164
|
+
// outputs is NOT used alone because a malicious dApp could inject derivation paths
|
|
165
|
+
// on attacker outputs to disguise them as change. Address match is unforgeable
|
|
166
|
+
// since only the vault owner knows the private key for that address.
|
|
167
|
+
return create(BitcoinOutputSchema, {
|
|
168
|
+
amount: BigInt(txOutput.value),
|
|
169
|
+
address: outputAddress,
|
|
170
|
+
opReturnData: opReturn ? getOpReturnHex(script) : undefined,
|
|
171
|
+
scriptPubKey: script.toString('hex'),
|
|
172
|
+
isChange: outputAddress !== '' && outputAddress === senderAddress,
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
return create(SignBitcoinSchema, {
|
|
176
|
+
version: psbt.version,
|
|
177
|
+
locktime: psbt.locktime,
|
|
178
|
+
inputs,
|
|
179
|
+
outputs,
|
|
180
|
+
});
|
|
181
|
+
};
|
|
182
|
+
//# sourceMappingURL=buildSignBitcoinFromPsbt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildSignBitcoinFromPsbt.js","sourceRoot":"","sources":["../../../../../../../packages/core/chain/chains/utxo/tx/buildSignBitcoinFromPsbt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EAEnB,iBAAiB,GAClB,MAAM,+EAA+E,CAAA;AACtF,OAAO,EACL,OAAO,IAAI,UAAU,EAErB,QAAQ,EACR,OAAO,EAEP,MAAM,IAAI,OAAO,EACjB,WAAW,GACZ,MAAM,eAAe,CAAA;AAKtB;;;GAGG;AACH,MAAM,gBAAgB,GAAG,CACvB,YAAoB,EACpB,YAAyB,EACb,EAAE;IACd,iDAAiD;IACjD,IAAI,YAAY,CAAC,MAAM,KAAK,EAAE,IAAI,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QACvF,OAAO,QAAQ,CAAA;IACjB,CAAC;IACD,wFAAwF;IACxF,IACE,YAAY,CAAC,MAAM,KAAK,EAAE;QAC1B,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI;QACxB,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI;QACxB,YAA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AAU,CAAC,MAAM,CAAC,CAAA;QAEnC,IAAI,aAAa,GAAG,EAAE,CAAA;QACtB,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,IAAI,CAAC;gBACH,aAAa,GAAG,UAAU,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;YACvE,CAAC;YAAC,MAAM,CAAC;gBACP,4CAA4C;YAC9C,CAAC;QACH,CAAC;QAED,gFAAgF;QAChF,gFAAgF;QAChF,mFAAmF;QACnF,+EAA+E;QAC/E,qEAAqE;QACrE,OAAO,MAAM,CAAC,mBAAmB,EAAE;YACjC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;YAC9B,OAAO,EAAE,aAAa;YACtB,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS;YAC3D,YAAY,EAAE,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;YACpC,QAAQ,EAAE,aAAa,KAAK,EAAE,IAAI,aAAa,KAAK,aAAa;SAClE,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,OAAO,MAAM,CAAC,iBAAiB,EAAE;QAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,MAAM;QACN,OAAO;KACR,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Chain, EthereumL2Chain } from '@vultisig/core-chain/Chain';
|
|
2
2
|
import { recordMap } from '@vultisig/lib-utils/record/recordMap';
|
|
3
|
-
import { kujiraCoinsMigratedToThorChainMetadata } from '../chains/cosmos/thor/kujira-merge.js';
|
|
3
|
+
import { kujiraCoinsMigratedToThorChainMetadata } from '../chains/cosmos/thor/kujira-merge/index.js';
|
|
4
4
|
const ether = {
|
|
5
5
|
ticker: 'ETH',
|
|
6
6
|
logo: 'eth',
|
package/dist/coin/coins.js
CHANGED
package/dist/coin/find/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import { isOneOf } from '@vultisig/lib-utils/array/isOneOf';
|
|
|
3
3
|
import { coinFinderChainKinds, } from './CoinFinderChainKind.js';
|
|
4
4
|
import { findCardanoCoins } from './resolvers/cardano.js';
|
|
5
5
|
import { findCosmosCoins } from './resolvers/cosmos.js';
|
|
6
|
-
import { findEvmCoins } from './resolvers/evm.js';
|
|
7
|
-
import { findSolanaCoins } from './resolvers/solana.js';
|
|
6
|
+
import { findEvmCoins } from './resolvers/evm/index.js';
|
|
7
|
+
import { findSolanaCoins } from './resolvers/solana/index.js';
|
|
8
8
|
const resolvers = {
|
|
9
9
|
cosmos: findCosmosCoins,
|
|
10
10
|
evm: findEvmCoins,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Chain } from '../../Chain.js';
|
|
2
|
-
import { kujiraCoinsMigratedToThorChainMetadata } from '../../chains/cosmos/thor/kujira-merge.js';
|
|
2
|
+
import { kujiraCoinsMigratedToThorChainMetadata } from '../../chains/cosmos/thor/kujira-merge/index.js';
|
|
3
3
|
import { kujiraCoinsOnThorChain } from '../../chains/cosmos/thor/kujira-merge/kujiraCoinsOnThorChain.js';
|
|
4
4
|
import { yieldBearingThorChainTokens } from '../../chains/cosmos/thor/yield-bearing-tokens/yAssetsOnThorChain.js';
|
|
5
5
|
export const knownCosmosTokens = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { blake2b } from '@noble/hashes/
|
|
1
|
+
import { blake2b } from '@noble/hashes/blake2b';
|
|
2
2
|
export const deriveCardanoAddress = ({ publicKey, walletCore }) => {
|
|
3
3
|
const extendedKeyData = publicKey.data();
|
|
4
4
|
const spendingKeyData = extendedKeyData.slice(0, 32);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cardano.js","sourceRoot":"","sources":["../../../../../../packages/core/chain/publicKey/address/cardano.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"cardano.js","sourceRoot":"","sources":["../../../../../../packages/core/chain/publicKey/address/cardano.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAW/C,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EAAE,SAAS,EAAE,UAAU,EAAS,EAAE,EAAE;IACvE,MAAM,eAAe,GAAG,SAAS,CAAC,IAAI,EAAE,CAAA;IACxC,MAAM,eAAe,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IAEpD,MAAM,IAAI,GAAG,OAAO,CAAC,eAAe,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAA;IAEpD,MAAM,WAAW,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAA;IACtC,WAAW,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;IACrB,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;IAExB,OAAO,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;AACtD,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { toBech32 } from '@cosmjs/encoding';
|
|
2
|
-
import { ripemd160 } from '@noble/hashes/
|
|
3
|
-
import { sha256 } from '@noble/hashes/
|
|
2
|
+
import { ripemd160 } from '@noble/hashes/ripemd160';
|
|
3
|
+
import { sha256 } from '@noble/hashes/sha256';
|
|
4
4
|
const qbtcBech32Prefix = 'qbtc';
|
|
5
5
|
/** Derives a QBTC address from an MLDSA public key using Bech32(RIPEMD160(SHA256(pubkey))). */
|
|
6
6
|
export const deriveQbtcAddress = (mldsaPublicKeyHex) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deriveQbtcAddress.js","sourceRoot":"","sources":["../../../../../../packages/core/chain/publicKey/address/deriveQbtcAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"deriveQbtcAddress.js","sourceRoot":"","sources":["../../../../../../packages/core/chain/publicKey/address/deriveQbtcAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAE7C,MAAM,gBAAgB,GAAG,MAAM,CAAA;AAE/B,+FAA+F;AAC/F,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,iBAAyB,EAAU,EAAE;IACrE,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAA;IACzD,MAAM,IAAI,GAAG,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAA;IAC3C,OAAO,QAAQ,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAA;AACzC,CAAC,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { recordMap } from '@vultisig/lib-utils/record/recordMap';
|
|
2
2
|
import { sortRecordKeysAlphabetically } from '@vultisig/lib-utils/record/sortRecordKeysAlphabetically';
|
|
3
3
|
import { execSync } from 'child_process';
|
|
4
|
-
import { knownTokens } from '../coin/knownTokens.js';
|
|
4
|
+
import { knownTokens } from '../coin/knownTokens/index.js';
|
|
5
5
|
const main = () => {
|
|
6
6
|
const sorted = sortRecordKeysAlphabetically(recordMap(knownTokens, tokens => [...tokens].sort((a, b) => a.ticker.localeCompare(b.ticker))));
|
|
7
7
|
const output = JSON.stringify(sorted, null, 2);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AccountCoin } from '@vultisig/core-chain/coin/AccountCoin';
|
|
2
2
|
import { TransferDirection } from '@vultisig/lib-utils/TransferDirection';
|
|
3
|
-
import { VultDiscountTier } from '../affiliate.js';
|
|
3
|
+
import { VultDiscountTier } from '../affiliate/index.js';
|
|
4
4
|
import { SwapQuote } from './SwapQuote.js';
|
|
5
5
|
export type FindSwapQuoteInput = Record<TransferDirection, AccountCoin> & {
|
|
6
6
|
amount: bigint;
|
|
@@ -12,7 +12,7 @@ import { asyncFallbackChain } from '@vultisig/lib-utils/promise/asyncFallbackCha
|
|
|
12
12
|
import { pick } from '@vultisig/lib-utils/record/pick';
|
|
13
13
|
import { Chain } from '../../Chain.js';
|
|
14
14
|
import { isChainOfKind } from '../../ChainKind.js';
|
|
15
|
-
import { getSwapAffiliateBps } from '../affiliate.js';
|
|
15
|
+
import { getSwapAffiliateBps } from '../affiliate/index.js';
|
|
16
16
|
import { getKyberSwapQuote } from '../general/kyber/api/quote.js';
|
|
17
17
|
import { kyberSwapEnabledChains } from '../general/kyber/chains.js';
|
|
18
18
|
import { getNativeSwapQuote } from '../native/api/getNativeSwapQuote.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/chain/tx/broadcast/resolvers/evm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAMrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEjD,eAAO,MAAM,cAAc,EAAE,mBAAmB,CAAC,QAAQ,
|
|
1
|
+
{"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/chain/tx/broadcast/resolvers/evm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAMrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEjD,eAAO,MAAM,cAAc,EAAE,mBAAmB,CAAC,QAAQ,CAyBxD,CAAA"}
|
|
@@ -8,7 +8,7 @@ export const broadcastEvmTx = async ({ chain, tx, }) => {
|
|
|
8
8
|
serializedTransaction: ensureHexPrefix(Buffer.from(tx.encoded).toString('hex')),
|
|
9
9
|
}));
|
|
10
10
|
if (error &&
|
|
11
|
-
!isInError(error, 'already known', 'transaction
|
|
11
|
+
!isInError(error, 'already known', 'transaction already exists', 'tx already in mempool')) {
|
|
12
12
|
throw error;
|
|
13
13
|
}
|
|
14
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evm.js","sourceRoot":"","sources":["../../../../../../../packages/core/chain/tx/broadcast/resolvers/evm.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAA;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAA;AAIzE,MAAM,CAAC,MAAM,cAAc,GAAkC,KAAK,EAAE,EAClE,KAAK,EACL,EAAE,GACH,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,CAAA;IAElC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,OAAO,CAC7B,MAAM,CAAC,kBAAkB,CAAC;QACxB,qBAAqB,EAAE,eAAe,CACpC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CACxC;KACF,CAAC,CACH,CAAA;IAED,IACE,KAAK;QACL,CAAC,SAAS,CACR,KAAK,EACL,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"evm.js","sourceRoot":"","sources":["../../../../../../../packages/core/chain/tx/broadcast/resolvers/evm.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAA;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAA;AAIzE,MAAM,CAAC,MAAM,cAAc,GAAkC,KAAK,EAAE,EAClE,KAAK,EACL,EAAE,GACH,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,CAAA;IAElC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,OAAO,CAC7B,MAAM,CAAC,kBAAkB,CAAC;QACxB,qBAAqB,EAAE,eAAe,CACpC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CACxC;KACF,CAAC,CACH,CAAA;IAED,IACE,KAAK;QACL,CAAC,SAAS,CACR,KAAK,EACL,eAAe,EACf,4BAA4B,EAC5B,uBAAuB,CACxB,EACD,CAAC;QACD,MAAM,KAAK,CAAA;IACb,CAAC;AACH,CAAC,CAAA"}
|
|
@@ -7,7 +7,7 @@ export const broadcastTonTx = async ({ tx, }) => {
|
|
|
7
7
|
const { error } = await attempt(queryUrl(url, {
|
|
8
8
|
body: { boc: tx.encoded },
|
|
9
9
|
}));
|
|
10
|
-
if (error && !isInError(error, 'duplicate message')) {
|
|
10
|
+
if (error && !isInError(error, 'duplicate message', 'duplicate msg_seqno')) {
|
|
11
11
|
throw error;
|
|
12
12
|
}
|
|
13
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ton.js","sourceRoot":"","sources":["../../../../../../../packages/core/chain/tx/broadcast/resolvers/ton.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAA;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAA;AAI7D,MAAM,CAAC,MAAM,cAAc,GAAwC,KAAK,EAAE,EACxE,EAAE,GACH,EAAE,EAAE;IACH,MAAM,GAAG,GAAG,GAAG,UAAU,2BAA2B,CAAA;IAEpD,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,OAAO,CAC7B,QAAQ,CAA+B,GAAG,EAAE;QAC1C,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,OAAO,EAAE;KAC1B,CAAC,CACH,CAAA;IAED,IAAI,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,mBAAmB,CAAC,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"ton.js","sourceRoot":"","sources":["../../../../../../../packages/core/chain/tx/broadcast/resolvers/ton.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAA;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAA;AAI7D,MAAM,CAAC,MAAM,cAAc,GAAwC,KAAK,EAAE,EACxE,EAAE,GACH,EAAE,EAAE;IACH,MAAM,GAAG,GAAG,GAAG,UAAU,2BAA2B,CAAA;IAEpD,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,OAAO,CAC7B,QAAQ,CAA+B,GAAG,EAAE;QAC1C,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,OAAO,EAAE;KAC1B,CAAC,CACH,CAAA;IAED,IAAI,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,CAAC,EAAE,CAAC;QAC3E,MAAM,KAAK,CAAA;IACb,CAAC;AACH,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cardano.js","sourceRoot":"","sources":["../../../../../../../packages/core/chain/tx/hash/resolvers/cardano.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"cardano.js","sourceRoot":"","sources":["../../../../../../../packages/core/chain/tx/hash/resolvers/cardano.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAIvC,MAAM,CAAC,MAAM,gBAAgB,GAAuC,EAAE,CAAC,EAAE;IACvE,6DAA6D;IAC7D,oDAAoD;IACpD,IAAI,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClC,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC7C,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,CAAA;IAClC,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;IACnC,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAA;IAE/C,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC5C,CAAC,CAAA"}
|