@vultisig/core-mpc 1.12.1 → 1.14.0
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 +165 -0
- package/dist/chains/cosmos/qbtc/QBTCHelper.js +4 -3
- package/dist/chains/cosmos/qbtc/QBTCHelper.js.map +1 -1
- package/dist/chains/cosmos/qbtc/QBTCTx.js +1 -1
- package/dist/chains/cosmos/qbtc/QBTCTx.js.map +1 -1
- package/dist/keysign/chainSpecific/resolvers/cosmos/index.d.ts.map +1 -1
- package/dist/keysign/chainSpecific/resolvers/cosmos/index.js +71 -10
- package/dist/keysign/chainSpecific/resolvers/cosmos/index.js.map +1 -1
- package/dist/keysign/chainSpecific/resolvers/sui/index.d.ts.map +1 -1
- package/dist/keysign/chainSpecific/resolvers/sui/index.js +62 -64
- package/dist/keysign/chainSpecific/resolvers/sui/index.js.map +1 -1
- package/dist/keysign/chainSpecific/resolvers/sui/refine.d.ts.map +1 -1
- package/dist/keysign/chainSpecific/resolvers/sui/refine.js +14 -4
- package/dist/keysign/chainSpecific/resolvers/sui/refine.js.map +1 -1
- package/dist/keysign/chainSpecific/resolvers/tron/energyPrice.d.ts +4 -3
- package/dist/keysign/chainSpecific/resolvers/tron/energyPrice.d.ts.map +1 -1
- package/dist/keysign/chainSpecific/resolvers/tron/energyPrice.js +11 -5
- package/dist/keysign/chainSpecific/resolvers/tron/energyPrice.js.map +1 -1
- package/dist/keysign/chainSpecific/resolvers/tron/fee.d.ts +11 -0
- package/dist/keysign/chainSpecific/resolvers/tron/fee.d.ts.map +1 -1
- package/dist/keysign/chainSpecific/resolvers/tron/fee.js +43 -19
- package/dist/keysign/chainSpecific/resolvers/tron/fee.js.map +1 -1
- package/dist/keysign/fee/resolvers/cosmos.d.ts +5 -3
- package/dist/keysign/fee/resolvers/cosmos.d.ts.map +1 -1
- package/dist/keysign/fee/resolvers/cosmos.js +8 -21
- package/dist/keysign/fee/resolvers/cosmos.js.map +1 -1
- package/dist/keysign/fee/resolvers/tron.d.ts.map +1 -1
- package/dist/keysign/fee/resolvers/tron.js +11 -2
- package/dist/keysign/fee/resolvers/tron.js.map +1 -1
- package/dist/keysign/signingInputs/resolvers/cosmos/index.d.ts.map +1 -1
- package/dist/keysign/signingInputs/resolvers/cosmos/index.js +30 -17
- package/dist/keysign/signingInputs/resolvers/cosmos/index.js.map +1 -1
- package/dist/keysign/swap/buildLimitSwapKeysignPayload.d.ts +86 -0
- package/dist/keysign/swap/buildLimitSwapKeysignPayload.d.ts.map +1 -0
- package/dist/keysign/swap/buildLimitSwapKeysignPayload.js +178 -0
- package/dist/keysign/swap/buildLimitSwapKeysignPayload.js.map +1 -0
- package/dist/keysign/swap/getKeysignLimitSwapOrder.d.ts +41 -0
- package/dist/keysign/swap/getKeysignLimitSwapOrder.d.ts.map +1 -0
- package/dist/keysign/swap/getKeysignLimitSwapOrder.js +50 -0
- package/dist/keysign/swap/getKeysignLimitSwapOrder.js.map +1 -0
- package/package.json +14 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,170 @@
|
|
|
1
1
|
# @vultisig/core-mpc
|
|
2
2
|
|
|
3
|
+
## 1.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1614](https://github.com/vultisig/vultisig-sdk/pull/1614) [`bb5b62c`](https://github.com/vultisig/vultisig-sdk/commit/bb5b62c60ca298d0aa98614e8c2b01eeef0d8bdb) Thanks [@Ehsan-saradar](https://github.com/Ehsan-saradar)! - Let joining devices review a THORChain limit order instead of approving it as a generic send.
|
|
8
|
+
|
|
9
|
+
The limit-order builder attaches a swap payload only for ERC20 sources, so RUNE and native-gas-asset orders reached a co-signer as a transfer to an opaque address with an opaque memo — no buy asset, payout destination, or minimum received.
|
|
10
|
+
|
|
11
|
+
`getKeysignLimitSwapOrder` decodes those terms from `keysignPayload.memo`, which is present on every source branch. Reading the memo also makes the review trustworthy rather than merely present: the memo is the exact string THORChain executes, so terms derived from it cannot disagree with what gets signed, whereas a display field supplied by the initiating device can.
|
|
12
|
+
|
|
13
|
+
`parseLimitSwapMemo` is the underlying decoder, and `assertLimitSwapMemo` now delegates to it so the grammar has one implementation.
|
|
14
|
+
|
|
15
|
+
`buildLimitSwapKeysignPayload` now derives the ERC20 branch's `toAmountDecimal` from the memo's LIM rather than from the caller's `expectedToAmount`. That argument is now an optional cross-check: supplying a value that disagrees with the memo throws, which catches a caller that rescaled the LIM into the target coin's own decimals — a mistake that signs a correct order while showing a co-signer a wrong figure.
|
|
16
|
+
|
|
17
|
+
- [#1583](https://github.com/vultisig/vultisig-sdk/pull/1583) [`028b3ce`](https://github.com/vultisig/vultisig-sdk/commit/028b3cec5e56e5ab41de5eeb66f6837af9e1dd27) Thanks [@Toby1009](https://github.com/Toby1009)! - Move every Sui read, simulation and broadcast off JSON-RPC.
|
|
18
|
+
|
|
19
|
+
Sui is retiring JSON-RPC: shutdown on Foundation mainnet full nodes began the
|
|
20
|
+
week of 2026-07-27 and full decommission (code removal) lands mid-October 2026,
|
|
21
|
+
after which no provider can serve it. This is a scheduled migration ahead of
|
|
22
|
+
that date, NOT a fix for a live outage — as of 2026-07-27 both
|
|
23
|
+
`sui-rpc.publicnode.com` and `fullnode.mainnet.sui.io` still answer JSON-RPC.
|
|
24
|
+
|
|
25
|
+
- `getSuiClient()` now returns a `SuiGrpcClient` pointed at
|
|
26
|
+
`https://fullnode.mainnet.sui.io:443` (gRPC-web over HTTPS).
|
|
27
|
+
- React Native uses `SuiGraphQLClient` against
|
|
28
|
+
`https://graphql.mainnet.sui.io/graphql` instead: grpc-web needs
|
|
29
|
+
`Response.body` streaming, which Hermes' fetch does not provide. Both clients
|
|
30
|
+
implement the same unified transport interface, so callsites are identical.
|
|
31
|
+
- Balance, coin metadata, coin listing, tx hash, tx status, broadcast and
|
|
32
|
+
keysign gas refinement moved to `getBalance` / `getCoinMetadata` / `listCoins`
|
|
33
|
+
/ `simulateTransaction` / `getTransaction` / `executeTransaction`.
|
|
34
|
+
- The dependency-free `@vultisig/sdk` balance tools (`getSuiBalance`,
|
|
35
|
+
`getSuiTokenBalance`, `getSuiAllBalances`) now POST Sui GraphQL and follow the
|
|
36
|
+
paginated `balances` connection to completion, returning `tokens_unavailable`
|
|
37
|
+
rather than a silently truncated portfolio.
|
|
38
|
+
|
|
39
|
+
Broadcast-error classification follows the transport. A gRPC failure carries the
|
|
40
|
+
grpc-status NAME in `code` (not a JSON-RPC number) and a percent-encoded message,
|
|
41
|
+
so both classifiers were re-pointed:
|
|
42
|
+
|
|
43
|
+
- `isTransientBroadcastError` retries `UNAVAILABLE` / `DEADLINE_EXCEEDED` /
|
|
44
|
+
`RESOURCE_EXHAUSTED` and decodes the message before pattern-matching. A
|
|
45
|
+
grpc-web response is HTTP 200 with the real status in the trailer, so the
|
|
46
|
+
existing 5xx branch never saw a busy or restarting node.
|
|
47
|
+
- The CLI's permanent-vs-retryable gate matches `INVALID_ARGUMENT` instead of
|
|
48
|
+
the numeric `-32002`. Left unchanged, that gate would have gone dead and every
|
|
49
|
+
permanent Sui rejection would have been re-broadcast as if transient.
|
|
50
|
+
|
|
51
|
+
Breaking for direct consumers: `assertSuiTxSucceeded` now takes the unified
|
|
52
|
+
client's transaction result (`{ $kind, Transaction | FailedTransaction }`)
|
|
53
|
+
instead of a JSON-RPC effects object.
|
|
54
|
+
|
|
55
|
+
### Patch Changes
|
|
56
|
+
|
|
57
|
+
- [#1555](https://github.com/vultisig/vultisig-sdk/pull/1555) [`70f4583`](https://github.com/vultisig/vultisig-sdk/commit/70f4583a359f988460633b44046bf5811c9c0f74) Thanks [@Ehsan-saradar](https://github.com/Ehsan-saradar)! - fix(cosmos): sign `CosmosSpecific.gas` verbatim so co-signing matches iOS/Android
|
|
58
|
+
|
|
59
|
+
`CosmosSpecific.gas` (proto field 3) is the fee AMOUNT — commondata#93 documents
|
|
60
|
+
it as such and every other client signs it verbatim. The signing-inputs and
|
|
61
|
+
fee-display resolvers were instead re-deriving it as
|
|
62
|
+
`ceil(gas × relayedGasLimit / staticGasLimit)`, and doubling it for IBC
|
|
63
|
+
transfers. That silently redefined a shared wire field in one client: on a
|
|
64
|
+
TerraClassic LUNC send with a simulated gas limit of 321,979 the extension
|
|
65
|
+
signed a 21.465267 LUNC fee while the iOS co-signer signed the payload's
|
|
66
|
+
20 LUNC, the SignDocs diverged, and the MPC keysign never completed.
|
|
67
|
+
|
|
68
|
+
Both read paths now use `gas` as-is and only resolve the gas LIMIT from field 7.
|
|
69
|
+
Fee headroom moved to the initiator, which prices `gas` against the limit it
|
|
70
|
+
relays — matching iOS `CosmosGasPricedFee.scaled` and Android
|
|
71
|
+
`TerraClassicTax.baseGas`. The COSMOS-02 IBC source-leg headroom is preserved by
|
|
72
|
+
relaying the widened limit in `gas_limit` instead of applying a multiplier that
|
|
73
|
+
no other client can reproduce.
|
|
74
|
+
|
|
75
|
+
`resolveCosmosGasFee` is replaced by `resolveCosmosGasLimit` (limit resolution)
|
|
76
|
+
and `scaleCosmosFeeAmount` (initiator-only pricing).
|
|
77
|
+
|
|
78
|
+
- [#1467](https://github.com/vultisig/vultisig-sdk/pull/1467) [`6142529`](https://github.com/vultisig/vultisig-sdk/commit/6142529abc39bb548be8b1f32453f0207584c4e2) Thanks [@rcoderdev](https://github.com/rcoderdev)! - Fail Sui transaction construction when gas-budget re-pricing cannot cover the
|
|
79
|
+
final selected coin set instead of returning a known under-priced baseline.
|
|
80
|
+
|
|
81
|
+
- [#1555](https://github.com/vultisig/vultisig-sdk/pull/1555) [`70f4583`](https://github.com/vultisig/vultisig-sdk/commit/70f4583a359f988460633b44046bf5811c9c0f74) Thanks [@Ehsan-saradar](https://github.com/Ehsan-saradar)! - fix(terraclassic): price the LUNC fee from the chain's gas price and add the burn tax explicitly
|
|
82
|
+
|
|
83
|
+
`cosmosGasRecord[TerraClassic]` was a hand-tuned flat 20 LUNC (itself already
|
|
84
|
+
lowered from 100 LUNC). Terra Classic's actual `uluna` gas price is 28.325
|
|
85
|
+
uluna/gas, so a send at the static 300k limit costs 8,497,500 uluna — the flat
|
|
86
|
+
constant overcharged every send by ~2.35× before any gas-limit scaling.
|
|
87
|
+
|
|
88
|
+
It was also implicitly absorbing the `x/tax` burn tax (0.5% of the transfer),
|
|
89
|
+
which scales with the amount while a flat constant does not. So it overcharged
|
|
90
|
+
small sends and under-covered anything above ~2,300 LUNC, where 0.5% outgrows
|
|
91
|
+
the slack.
|
|
92
|
+
|
|
93
|
+
Both halves are now explicit:
|
|
94
|
+
|
|
95
|
+
- `cosmosGasRecord[TerraClassic]` = `8_497_500n` (`300_000 × 28.325`), matching
|
|
96
|
+
iOS `TerraClassicTax.ulunaBaseGas` and Android `ULUNA_BASE_GAS`. It still
|
|
97
|
+
scales with a relayed `gas_limit`.
|
|
98
|
+
- The initiator adds `applyTerraClassicBurnTax(amount, rate)` to `gas` for
|
|
99
|
+
native LUNC sends, after the gas scaling — the tax tracks the transfer
|
|
100
|
+
amount, not the gas limit.
|
|
101
|
+
|
|
102
|
+
Adds `getTerraClassicBurnTaxRate`, which reads `x/tax` `burn_tax_rate` (live
|
|
103
|
+
0.5%) and fails closed to 0.5% on any LCD error. This is a different tax from
|
|
104
|
+
the existing `x/treasury` `tax_rate`, which governance has held at 0 since the
|
|
105
|
+
UST collapse and which exempts `uluna` — reading it for a LUNC send always
|
|
106
|
+
returned 0. `applyTerraClassicBurnTax` is separate from `applyTerraClassicTax`
|
|
107
|
+
for the same reason: the burn tax exempts nothing and is uncapped.
|
|
108
|
+
|
|
109
|
+
A 300 LUNC send at a simulated 321,979 gas limit now costs 10.620056 LUNC
|
|
110
|
+
(9.120056 gas + 1.5 tax) instead of 21.465267.
|
|
111
|
+
|
|
112
|
+
- [#1591](https://github.com/vultisig/vultisig-sdk/pull/1591) [`e76ba9b`](https://github.com/vultisig/vultisig-sdk/commit/e76ba9ba78ec52f30f3678ef4acc933ef5712cdc) Thanks [@Ehsan-saradar](https://github.com/Ehsan-saradar)! - fix(thorchain): don't append the bank denom to a native-token swap deposit symbol
|
|
113
|
+
|
|
114
|
+
A swap sourced from a THORChain-native token (TCY, RUJI) encoded its
|
|
115
|
+
`MsgDeposit` asset as `` `${ticker}-${contractAddress}` `` — and for these coins
|
|
116
|
+
`contractAddress` IS the bank denom, so the deposit went out as `TCY-tcy`
|
|
117
|
+
instead of `TCY`. iOS (`thorchain.swift` `getSwapPreSignedInputData`) and
|
|
118
|
+
Android (`ThorchainSwapHelper`) both encode the bare ticker.
|
|
119
|
+
|
|
120
|
+
Because the symbol is part of the signed pre-image, this moved the hash: a
|
|
121
|
+
co-signing joiner rebuilds the payload locally and polls the relay with
|
|
122
|
+
`messageId = getMessageHash(message)`, so it asked for a `message_id` the
|
|
123
|
+
initiator never uploaded and failed with
|
|
124
|
+
`404 Timed out while waiting for setup message`. Reported in
|
|
125
|
+
vultisig/vultisig-windows#4464 as a TCY -> RUNE swap that fails whenever the
|
|
126
|
+
extension co-signs and succeeds against an Apple co-signer.
|
|
127
|
+
|
|
128
|
+
The `TICKER-CONTRACT` form is now gated on `secured`, which is the case it was
|
|
129
|
+
written for (vultisig-sdk `5a8aacdeb`): a secured-asset withdrawal, where the
|
|
130
|
+
auxiliary coin is the L1 token being pulled off THORChain and the contract
|
|
131
|
+
address genuinely belongs in the symbol (`USDC` + `0xa0b8…` ->
|
|
132
|
+
`USDC-0XA0B8…`, matching THORNode's `ETH.USDC-0XA0B8…`). Both sides of that
|
|
133
|
+
gate are now covered by tests; RUNE, secured assets, and non-swap deposits
|
|
134
|
+
(bond/merge/stake) were never affected.
|
|
135
|
+
|
|
136
|
+
- [#1471](https://github.com/vultisig/vultisig-sdk/pull/1471) [`89410fb`](https://github.com/vultisig/vultisig-sdk/commit/89410fbb0abf3ad05919fb38d1abc74a5acf9a6b) Thanks [@gomesalexandre](https://github.com/gomesalexandre)! - Fix Tron TRC-20 transfers going OUT_OF_ENERGY. `getTrc20TransferFee` trusted `energy_used`/`energy_penalty` defaulting to 0 on unsuccessful `triggerconstantcontract` response shapes (empty body, indexing lag, or reverts, including live responses with `result.result === true` plus a revert message), silently producing a `feeLimit` of 0 downstream. It now rejects unsuccessful and non-positive estimates. The serialized `feeLimit` ceiling is based on the full simulated energy before staked-energy subtraction, padded by `+50%`, and capped at 100 TRX so concurrent staked-energy use during the 10-60s MPC ceremony cannot reduce the ceiling to zero. The user-displayed/max-send fee remains the unpadded expected burn after current staked energy is applied. The 280 sun/energy fallback (stale 2023 governance default) is also corrected to the live TronGrid value of 100 sun/energy and documented for unreachable, missing, or invalid chain-parameter responses.
|
|
137
|
+
|
|
138
|
+
- Updated dependencies [[`4b14790`](https://github.com/vultisig/vultisig-sdk/commit/4b14790fb5f0fa5b9a58f6fe5575ad4c2bab3867), [`70f4583`](https://github.com/vultisig/vultisig-sdk/commit/70f4583a359f988460633b44046bf5811c9c0f74), [`bb5b62c`](https://github.com/vultisig/vultisig-sdk/commit/bb5b62c60ca298d0aa98614e8c2b01eeef0d8bdb), [`d7fd8fd`](https://github.com/vultisig/vultisig-sdk/commit/d7fd8fd891d2bb9f007b3feff5b31cc961bae497), [`028b3ce`](https://github.com/vultisig/vultisig-sdk/commit/028b3cec5e56e5ab41de5eeb66f6837af9e1dd27), [`70f4583`](https://github.com/vultisig/vultisig-sdk/commit/70f4583a359f988460633b44046bf5811c9c0f74)]:
|
|
139
|
+
- @vultisig/core-chain@2.29.0
|
|
140
|
+
|
|
141
|
+
## 1.13.0
|
|
142
|
+
|
|
143
|
+
### Minor Changes
|
|
144
|
+
|
|
145
|
+
- [#1518](https://github.com/vultisig/vultisig-sdk/pull/1518) [`aa47b4a`](https://github.com/vultisig/vultisig-sdk/commit/aa47b4a03c7391d13c738cba68b13a1526d1c502) Thanks [@Ehsan-saradar](https://github.com/Ehsan-saradar)! - Add `buildLimitSwapKeysignPayload`, the step that turns a THORChain `=<` limit-order memo into a signable transaction.
|
|
146
|
+
|
|
147
|
+
`buildLimitSwapMemo` produced the memo and `getThorchainMemoAsset` the asset notation, but nothing carried either into a `KeysignPayload` — limit orders could be composed and never placed. This builder branches on the source asset, mirroring iOS `LimitSwapPayloadAssembler`:
|
|
148
|
+
|
|
149
|
+
- **Native RUNE** — `MsgDeposit` on THORChain itself; no inbound vault, `toAddress` carries the signer's own address as the placeholder the Cosmos signer ignores.
|
|
150
|
+
- **Native gas asset** — transfer to the live Asgard inbound vault with the memo in tx `data` / `OP_RETURN`, no swap payload.
|
|
151
|
+
- **ERC20** — the router's `depositWithExpiry` call plus an `approve` when allowance is short, both in one ceremony. A token source signed without a swap payload would fall through to a plain ERC-20 transfer, dropping the memo and stranding the tokens on the router.
|
|
152
|
+
|
|
153
|
+
Every gate fails closed: the `EnableAdvSwapQueue` mimir is re-checked at sign time (it can flip while the user sits on Verify, and a `=<` order on a network with the queue off can execute as an unprotected market swap), the memo must actually be a limit memo, RUNE deposits are blocked on THORChain's global trading pause — including when the inbound list is unverifiable, since RUNE bypasses the per-chain halt filter entirely — and external sources must resolve a live, non-halted inbound whose address is then used as the destination.
|
|
154
|
+
|
|
155
|
+
Also exports `getAdvancedSwapQueueEnabled` (the mimir gate), `findLimitSwapInbound` / `shouldBlockRuneDeposit` (pure inbound selection), and `assertLimitSwapMemo`.
|
|
156
|
+
|
|
157
|
+
`assertValidThorchainDepositMemo` is deliberately unchanged: it guards the standalone `prepareThorchainMsgDepositTxFromKeys` tool and is not on the keysign-payload path, so excluding swap-shaped memos there stays correct.
|
|
158
|
+
|
|
159
|
+
No EVM gas-limit override is applied. iOS pins a native-EVM limit deposit to 120000 to match its own market path, but here both paths put the memo on `keysignPayload.memo` and neither sets a general swap payload, so both already floor at `deriveEvmGasLimit`'s 600000 data-tx limit. Forcing 120000 would make the limit path diverge from the market path and risk under-gassing.
|
|
160
|
+
|
|
161
|
+
### Patch Changes
|
|
162
|
+
|
|
163
|
+
- [#1419](https://github.com/vultisig/vultisig-sdk/pull/1419) [`1292e83`](https://github.com/vultisig/vultisig-sdk/commit/1292e83b1d370eff35ecd95b94e83689b724ca36) Thanks [@rcoderdev](https://github.com/rcoderdev)! - Reject secured-asset signing payloads whose chain prefix is not in the canonical native-swap registry.
|
|
164
|
+
|
|
165
|
+
- Updated dependencies [[`1292e83`](https://github.com/vultisig/vultisig-sdk/commit/1292e83b1d370eff35ecd95b94e83689b724ca36), [`aa47b4a`](https://github.com/vultisig/vultisig-sdk/commit/aa47b4a03c7391d13c738cba68b13a1526d1c502), [`b8d0639`](https://github.com/vultisig/vultisig-sdk/commit/b8d063904673890f0a956a56f6474d678ceaba3c), [`32e5d36`](https://github.com/vultisig/vultisig-sdk/commit/32e5d369ae4723299a6cb8f694da1782dbf207c2)]:
|
|
166
|
+
- @vultisig/core-chain@2.28.0
|
|
167
|
+
|
|
3
168
|
## 1.12.1
|
|
4
169
|
|
|
5
170
|
### Patch Changes
|
|
@@ -88,9 +88,10 @@ const buildTxComponents = ({ keysignPayload, cosmosSpecific }) => {
|
|
|
88
88
|
// buildQBTCAuthInfo's 300_000n default, so this is a no-op when the caller doesn't set field 7.
|
|
89
89
|
// gasLimit is part of the SignDoc, so every co-signing device MUST derive it identically - keeping
|
|
90
90
|
// the same field-7-or-default rule the WalletCore cosmos path uses keeps QBTC co-signers in lockstep.
|
|
91
|
-
// NOTE: only the LIMIT tracks field 7. The fee AMOUNT below stays flat (== cosmosSpecific.gas)
|
|
92
|
-
//
|
|
93
|
-
//
|
|
91
|
+
// NOTE: only the LIMIT tracks field 7. The fee AMOUNT below stays flat (== cosmosSpecific.gas), which
|
|
92
|
+
// is now also what the standard-cosmos path does: the initiator prices `gas` for the limit it relays
|
|
93
|
+
// and every co-signer signs it verbatim. Its fee-display resolver returns the same raw gas, so
|
|
94
|
+
// shown == signed with no drift.
|
|
94
95
|
gasLimit: cosmosSpecific.gasLimit,
|
|
95
96
|
fee: {
|
|
96
97
|
denom,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QBTCHelper.js","sourceRoot":"","sources":["../../../../../../../packages/core/mpc/chains/cosmos/qbtc/QBTCHelper.ts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,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAA;IAChF,CAAC;IAED,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA;IACxC,MAAM,MAAM,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAA;IAC1C,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CACb,8BAA8B,KAAK,CAAC,CAAC,CAAC,uBAAuB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACxG,CAAA;IACH,CAAC;IACD,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;IAEnC,OAAO,WAAW,CAAC,WAAW,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,WAAW,CAAC,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAA;AACtG,CAAC,CAAA"}
|
|
@@ -14,7 +14,7 @@ export const buildQBTCAuthInfo = ({ pubKeyData, sequence, gasLimit, fee }) => {
|
|
|
14
14
|
// Proto field 7 is `optional uint64`: an unset limit arrives as `undefined`, but a producer could
|
|
15
15
|
// also relay a nonsensical 0n (or negative). Both must fall back to the static default - NOT flow
|
|
16
16
|
// through as-is, because `protoVarint(2, 0n)` elides the field entirely (proto3 default-elision),
|
|
17
|
-
// which would omit gas_limit and sign an invalid zero-gas tx. Mirrors
|
|
17
|
+
// which would omit gas_limit and sign an invalid zero-gas tx. Mirrors resolveCosmosGasLimit's
|
|
18
18
|
// `relayedGasLimit && relayedGasLimit > 0n` guard so QBTC and standard cosmos treat 0/unset alike.
|
|
19
19
|
const effectiveGasLimit = gasLimit && gasLimit > 0n ? gasLimit : defaultGasLimit;
|
|
20
20
|
const feeBytes = concatBytes(feeCoin, protoVarint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AAC,CAAC,CAAA;IACrB,kGAAkG;IAClG,kGAAkG;IAClG,kGAAkG;IAClG,8FAA8F;IAC9F,mGAAmG;IACnG,MAAM,iBAAiB,GAAG,QAAQ,IAAI,QAAQ,GAAG,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAA;IAChF,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAA;IAExE,OAAO,WAAW,CAAC,UAAU,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,UAAU,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAA;AACxE,CAAC,CAAA;AAOD,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,EAC7C,SAAS,EACT,aAAa,EACb,aAAa,EACb,OAAO,GAAG,WAAW,GACe,EAAE,EAAE,CACxC,WAAW,CACT,UAAU,CAAC,CAAC,EAAE,SAAS,CAAC,EACxB,UAAU,CAAC,CAAC,EAAE,aAAa,CAAC,EAC5B,WAAW,CAAC,CAAC,EAAE,OAAO,CAAC,EACvB,WAAW,CAAC,CAAC,EAAE,aAAa,CAAC,CAC9B,CAAA;AAMH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAuB,EAAc,EAAE,CACzG,WAAW,CAAC,UAAU,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,UAAU,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/mpc/keysign/chainSpecific/resolvers/cosmos/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/mpc/keysign/chainSpecific/resolvers/cosmos/index.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AA0BzD,eAAO,MAAM,sBAAsB,EAAE,wBAAwB,CAAC,gBAAgB,CA0I7E,CAAA"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { create } from '@bufbuild/protobuf';
|
|
2
2
|
import { Chain } from '@vultisig/core-chain/Chain';
|
|
3
3
|
import { getCosmosAccountInfo } from '@vultisig/core-chain/chains/cosmos/account/getCosmosAccountInfo';
|
|
4
|
+
import { getCosmosGasLimit } from '@vultisig/core-chain/chains/cosmos/cosmosGasLimitRecord';
|
|
4
5
|
import { getCosmosFeeAmount } from '@vultisig/core-chain/chains/cosmos/gas';
|
|
5
|
-
import {
|
|
6
|
+
import { IBC_GAS_MULTIPLIER, scaleCosmosFeeAmount } from '@vultisig/core-chain/chains/cosmos/resolveCosmosGasLimit';
|
|
7
|
+
import { applyTerraClassicBurnTax, applyTerraClassicTax, getTerraClassicBurnTaxRate, getTerraClassicTaxCap, getTerraClassicTaxRate, } from '@vultisig/core-chain/chains/cosmos/terraClassicTax';
|
|
6
8
|
import { isFeeCoin } from '@vultisig/core-chain/coin/utils/isFeeCoin';
|
|
7
9
|
import { CosmosSpecificSchema, TransactionType, } from '@vultisig/core-mpc/types/vultisig/keysign/v1/blockchain_specific_pb';
|
|
8
10
|
import { getKeysignCoin } from '../../../utils/getKeysignCoin.js';
|
|
@@ -52,13 +54,12 @@ export const getCosmosChainSpecific = async ({ keysignPayload, walletCore, trans
|
|
|
52
54
|
}
|
|
53
55
|
// Initiator-side dynamic gas: simulate a native send via
|
|
54
56
|
// `/cosmos/tx/v1beta1/simulate` and relay the padded gas limit to co-signers
|
|
55
|
-
// in `CosmosSpecific.gas_limit`.
|
|
56
|
-
//
|
|
57
|
-
//
|
|
58
|
-
//
|
|
59
|
-
//
|
|
60
|
-
//
|
|
61
|
-
// error returns undefined and the field stays unset.
|
|
57
|
+
// in `CosmosSpecific.gas_limit`. Every co-signer signs the relayed limit when
|
|
58
|
+
// it is present and > 0, otherwise every device falls back to the static
|
|
59
|
+
// per-chain gas limit. Only native bank sends are simulated — the simulate tx
|
|
60
|
+
// models a `MsgSend`, so token/IBC/contract/staking txs (non-UNSPECIFIED
|
|
61
|
+
// transactionType, or a relayed dapp signData) keep the static limit. Fails
|
|
62
|
+
// closed: any simulation error returns undefined and the field stays unset.
|
|
62
63
|
// Optional chaining is deliberate: this gate runs at initiator build time on
|
|
63
64
|
// payloads that can be shaped by external callers (dapp / inpage-provider),
|
|
64
65
|
// and it sits outside the fail-closed estimator below — a payload missing the
|
|
@@ -71,7 +72,7 @@ export const getCosmosChainSpecific = async ({ keysignPayload, walletCore, trans
|
|
|
71
72
|
!!keysignPayload.toAddress &&
|
|
72
73
|
/^[0-9]+$/.test(keysignPayload.toAmount) &&
|
|
73
74
|
BigInt(keysignPayload.toAmount) > 0n;
|
|
74
|
-
const
|
|
75
|
+
const simulatedGasLimit = isNativeSend
|
|
75
76
|
? await estimateCosmosGasLimit({
|
|
76
77
|
walletCore,
|
|
77
78
|
keysignPayload,
|
|
@@ -79,11 +80,71 @@ export const getCosmosChainSpecific = async ({ keysignPayload, walletCore, trans
|
|
|
79
80
|
sequence: sequenceBigInt,
|
|
80
81
|
})
|
|
81
82
|
: undefined;
|
|
83
|
+
// COSMOS-02: an IBC `MsgTransfer` does more work on the source leg than the
|
|
84
|
+
// flat per-chain limit (calibrated for `MsgSend`) budgets for, so widen it.
|
|
85
|
+
// This has to be relayed in `gas_limit` rather than applied when signing:
|
|
86
|
+
// there is no proto field for a multiplier, so a read-side one could not be
|
|
87
|
+
// reproduced by iOS / Android and would diverge the SignDoc.
|
|
88
|
+
const staticGasLimit = getCosmosGasLimit(coin);
|
|
89
|
+
const ibcGasLimit = transactionType === TransactionType.IBC_TRANSFER ? staticGasLimit * IBC_GAS_MULTIPLIER : undefined;
|
|
90
|
+
const gasLimit = simulatedGasLimit ?? ibcGasLimit;
|
|
91
|
+
// `gas` is the fee AMOUNT every co-signer signs verbatim, so it must already
|
|
92
|
+
// be priced for the limit we relay — chains that charge `gasLimit × price`
|
|
93
|
+
// (Terra Classic, dYdX) would otherwise underpay the ante handler at a
|
|
94
|
+
// widened limit. Scaling here, on the one device that builds the payload, is
|
|
95
|
+
// what iOS (`CosmosGasPricedFee.scaled`) and Android
|
|
96
|
+
// (`TerraClassicTax.baseGas`) do.
|
|
97
|
+
//
|
|
98
|
+
// Widening only. A simulated limit BELOW the static one is the common case
|
|
99
|
+
// (a plain MsgSend burns well under the calibrated limit), and the static
|
|
100
|
+
// amounts are acceptance floors — Osmosis's is fetched from its live txfees
|
|
101
|
+
// module, Akash's is a fixed minimum — not per-gas rates that may be scaled
|
|
102
|
+
// down. Shrinking them would risk "insufficient fee" for no benefit.
|
|
103
|
+
// Terra Classic charges a proportional burn tax (`x/tax`, currently 0.5%) on
|
|
104
|
+
// a `MsgSend`. It is a REVERSE CHARGE: pre-pay it in the fee and the
|
|
105
|
+
// recipient receives the full stated amount; omit it and the chain deducts it
|
|
106
|
+
// from the transfer instead, so the recipient gets 0.5% less than the amount
|
|
107
|
+
// the user typed. Both are accepted on-chain — this is a "who bears the tax"
|
|
108
|
+
// choice, not a validity one. Pre-paying is what iOS and Android do, and it
|
|
109
|
+
// keeps "You're sending N LUNC" literally true.
|
|
110
|
+
//
|
|
111
|
+
// Scoped to plain native-LUNC sends, deliberately:
|
|
112
|
+
// - IBC `MsgTransfer` is taxable too, but every observed columbus-5 IBC
|
|
113
|
+
// transfer pays gas only and lets the chain deduct from the amount, as do
|
|
114
|
+
// iOS and Android. Pre-paying here would diverge from both for no
|
|
115
|
+
// validity gain.
|
|
116
|
+
// - Relayed `signDirect` / `signAmino` never reach this value: the signing
|
|
117
|
+
// resolver returns the dapp-supplied fee verbatim, so touching `gas`
|
|
118
|
+
// would move only the DISPLAYED fee and reintroduce shown != signed.
|
|
119
|
+
// - Non-fee coins pay the fee in `uluna` while the tax accrues in the send
|
|
120
|
+
// denom; folding them into one amount would mix denoms.
|
|
121
|
+
//
|
|
122
|
+
// USTC (`uusd`) is untouched here — its tax rides in `ibcDenomTraces.baseDenom`
|
|
123
|
+
// as a separate fee coin (see `computeUstcBurnTaxAmount`).
|
|
124
|
+
const isTerraClassicLuncSend = coin.chain === Chain.TerraClassic && isNativeSend;
|
|
125
|
+
// Independent lookups — run them concurrently rather than paying two
|
|
126
|
+
// sequential LCD round-trips while the user waits on the Verify screen.
|
|
127
|
+
// `getTerraClassicBurnTaxRate` fails closed rather than rejecting, so this
|
|
128
|
+
// cannot turn an LCD blip into a failed payload build.
|
|
129
|
+
const [staticFeeAmount, burnTaxRate] = await Promise.all([
|
|
130
|
+
getCosmosFeeAmount(coin),
|
|
131
|
+
isTerraClassicLuncSend ? getTerraClassicBurnTaxRate() : Promise.resolve(0n),
|
|
132
|
+
]);
|
|
133
|
+
const gasFeeAmount = gasLimit && gasLimit > staticGasLimit
|
|
134
|
+
? scaleCosmosFeeAmount({
|
|
135
|
+
feeAmount: staticFeeAmount,
|
|
136
|
+
fromGasLimit: staticGasLimit,
|
|
137
|
+
toGasLimit: gasLimit,
|
|
138
|
+
})
|
|
139
|
+
: staticFeeAmount;
|
|
140
|
+
// Added AFTER the gas scaling: the tax is proportional to the transfer
|
|
141
|
+
// amount, not to the gas limit, so scaling it would be wrong.
|
|
142
|
+
const gas = gasFeeAmount + applyTerraClassicBurnTax(BigInt(keysignPayload.toAmount), burnTaxRate);
|
|
82
143
|
return create(CosmosSpecificSchema, {
|
|
83
144
|
accountNumber: BigInt(accountNumber),
|
|
84
145
|
sequence: sequenceBigInt,
|
|
85
146
|
transactionType,
|
|
86
|
-
gas
|
|
147
|
+
gas,
|
|
87
148
|
gasLimit,
|
|
88
149
|
ibcDenomTraces: {
|
|
89
150
|
latestBlock: timeoutTimestamp ? `${latestBlock.split('_')[0]}_${timeoutTimestamp}` : latestBlock,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRo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,EAAE,cAAc,EAAE,WAAW,EAAE,GAAG,MAAM,oBAAoB,CAAC,IAAI,CAAC,CAAA;IAEvF,yEAAyE;IACzE,wEAAwE;IACxE,uEAAuE;IACvE,sEAAsE;IACtE,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,YAAY,IAAI,IAAI,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,MAAM,CAAA;IACzF,IAAI,gBAAgB,GAAG,EAAE,CAAA;IACzB,IAAI,UAAU,EAAE,CAAC;QACf,IAAI,CAAC;YACH,gBAAgB,GAAG,MAAM,wBAAwB,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAA;QAC5E,CAAC;QAAC,MAAM,CAAC;YACP,uEAAuE;YACvE,mEAAmE;YACnE,mEAAmE;YACnE,6DAA6D;YAC7D,gBAAgB,GAAG,GAAG,CAAA;QACxB,CAAC;IACH,CAAC;IAED,yDAAyD;IACzD,6EAA6E;IAC7E,yEAAyE;IACzE,4EAA4E;IAC5E,4EAA4E;IAC5E,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/core/mpc/keysign/chainSpecific/resolvers/cosmos/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,KAAK,EAAyB,MAAM,4BAA4B,CAAA;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iEAAiE,CAAA;AACtG,OAAO,EAAE,iBAAiB,EAAE,MAAM,yDAAyD,CAAA;AAC3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAA;AAC3E,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,0DAA0D,CAAA;AACnH,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oDAAoD,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,MAA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QAClC,aAAa,EAAE,MAAM,CAAC,aAAa,CAAC;QACpC,QAAQ,EAAE,cAAc;QACxB,eAAe;QACf,GAAG;QACH,QAAQ;QACR,cAAc,EAAE;YACd,WAAW,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,gBAAgB,EAAE,CAAC,CAAC,CAAC,WAAW;YAChG,SAAS,EAAE,gBAAgB;YAC3B,IAAI,EAAE,EAAE;SACT;KACF,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/mpc/keysign/chainSpecific/resolvers/sui/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/mpc/keysign/chainSpecific/resolvers/sui/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AAKzD,eAAO,MAAM,mBAAmB,EAAE,wBAAwB,CAAC,gBAAgB,CAgH1E,CAAA"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { create } from '@bufbuild/protobuf';
|
|
2
2
|
import { getSuiClient } from '@vultisig/core-chain/chains/sui/client';
|
|
3
3
|
import { suiGasBudget } from '@vultisig/core-chain/chains/sui/config';
|
|
4
|
+
import { listAllSuiCoins } from '@vultisig/core-chain/chains/sui/listAllCoins';
|
|
4
5
|
import { SuiCoinSchema, SuiSpecificSchema } from '@vultisig/core-mpc/types/vultisig/keysign/v1/blockchain_specific_pb';
|
|
5
|
-
import { attempt
|
|
6
|
+
import { attempt } from '@vultisig/lib-utils/attempt';
|
|
6
7
|
import { getKeysignCoin } from '../../../utils/getKeysignCoin.js';
|
|
7
|
-
import { selectSuiPayloadCoins } from '../../../suiCoinSelection.js';
|
|
8
|
+
import { isSameSuiCoinType, selectSuiPayloadCoins, suiNativeCoinType } from '../../../suiCoinSelection.js';
|
|
8
9
|
import { refineSuiChainSpecific } from './refine.js';
|
|
10
|
+
class SuiGasBudgetConvergenceError extends Error {
|
|
11
|
+
}
|
|
9
12
|
export const getSuiChainSpecific = async ({ keysignPayload, walletCore, }) => {
|
|
10
13
|
// dApp-supplied PTBs (`signData.signSui`) are already fully built: coins,
|
|
11
14
|
// gas budget and reference gas price are baked into the BCS bytes that
|
|
@@ -17,37 +20,25 @@ export const getSuiChainSpecific = async ({ keysignPayload, walletCore, }) => {
|
|
|
17
20
|
const coin = getKeysignCoin(keysignPayload);
|
|
18
21
|
const { address } = coin;
|
|
19
22
|
const client = getSuiClient();
|
|
20
|
-
// `getAllCoins`
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
// display path shows the correct aggregate total. Follow the cursor to
|
|
29
|
-
// completion, mirroring the Solana SPL pagination fix (sdk#962).
|
|
30
|
-
// Bound the cursor loop: a buggy/misbehaving RPC that keeps returning
|
|
31
|
-
// hasNextPage=true with a non-advancing cursor would otherwise spin forever.
|
|
32
|
-
// 200 pages ≈ 10k coin objects — far beyond any real wallet — so hitting the
|
|
33
|
-
// cap means the cursor is stuck; fail CLOSED (throw) rather than hang or
|
|
34
|
-
// silently truncate the coin set and under-fund the send.
|
|
35
|
-
const MAX_COIN_PAGES = 200;
|
|
36
|
-
const rawCoins = [];
|
|
37
|
-
let cursor = undefined;
|
|
38
|
-
let pages = 0;
|
|
39
|
-
do {
|
|
40
|
-
const page = await client.getAllCoins({ owner: address, cursor });
|
|
41
|
-
rawCoins.push(...page.data);
|
|
42
|
-
cursor = page.hasNextPage ? page.nextCursor : null;
|
|
43
|
-
if (++pages >= MAX_COIN_PAGES && cursor) {
|
|
44
|
-
throw new Error(`getSuiChainSpecific: getAllCoins exceeded ${MAX_COIN_PAGES} pages for ${address} — refusing to build a send from a possibly-truncated or looping coin set`);
|
|
45
|
-
}
|
|
46
|
-
} while (cursor);
|
|
47
|
-
const coins = rawCoins.map((coin) => create(SuiCoinSchema, coin));
|
|
48
|
-
const referenceGasPrice = await client.getReferenceGasPrice();
|
|
49
|
-
const amount = BigInt(keysignPayload.toAmount || '0');
|
|
23
|
+
// The retired JSON-RPC `getAllCoins` returned every coin type in one paginated
|
|
24
|
+
// sweep. The unified client's `listCoins` is scoped to ONE coin type (SUI by
|
|
25
|
+
// default), so fetch exactly the two sets the payload needs and nothing more:
|
|
26
|
+
// - native SUI objects, always — they pay gas for both Pay and PaySui;
|
|
27
|
+
// - the sent coin type's objects, when sending a non-native token.
|
|
28
|
+
// `listAllSuiCoins` follows the cursor to completion (see its comment on why
|
|
29
|
+
// a single page silently under-funds a send) and is bounded so a stuck cursor
|
|
30
|
+
// fails closed instead of spinning.
|
|
50
31
|
const isNativeToken = !coin.id;
|
|
32
|
+
// A payload can name SUI as its "token" id; listing it twice would duplicate every
|
|
33
|
+
// native object in the selection pool, so only a genuinely distinct type is fetched.
|
|
34
|
+
const tokenCoinType = coin.id && !isSameSuiCoinType(coin.id, suiNativeCoinType) ? coin.id : undefined;
|
|
35
|
+
const [nativeCoins, tokenCoins] = await Promise.all([
|
|
36
|
+
listAllSuiCoins({ client, owner: address, coinType: suiNativeCoinType }),
|
|
37
|
+
tokenCoinType ? listAllSuiCoins({ client, owner: address, coinType: tokenCoinType }) : Promise.resolve([]),
|
|
38
|
+
]);
|
|
39
|
+
const coins = [...nativeCoins, ...tokenCoins].map(rawCoin => create(SuiCoinSchema, rawCoin));
|
|
40
|
+
const { referenceGasPrice } = await client.getReferenceGasPrice();
|
|
41
|
+
const amount = BigInt(keysignPayload.toAmount || '0');
|
|
51
42
|
const selectCoins = (gasBudget) => selectSuiPayloadCoins({
|
|
52
43
|
coins,
|
|
53
44
|
isNativeToken,
|
|
@@ -65,40 +56,47 @@ export const getSuiChainSpecific = async ({ keysignPayload, walletCore, }) => {
|
|
|
65
56
|
// Re-price that grown selection, bounded so a pathological RPC response
|
|
66
57
|
// cannot make transaction construction loop indefinitely.
|
|
67
58
|
const maxGasBudgetConvergeIterations = 2;
|
|
68
|
-
const
|
|
69
|
-
|
|
59
|
+
const initialRefinement = await attempt(() => refineSuiChainSpecific({
|
|
60
|
+
keysignPayload,
|
|
61
|
+
chainSpecific,
|
|
62
|
+
walletCore,
|
|
63
|
+
}));
|
|
64
|
+
// Preserve the historical fallback only when the first dry run cannot
|
|
65
|
+
// refine the static baseline. Once refinement has learned a higher gas
|
|
66
|
+
// requirement, returning that baseline on a later re-price or re-selection
|
|
67
|
+
// failure would knowingly construct an under-budget transaction.
|
|
68
|
+
if ('error' in initialRefinement)
|
|
69
|
+
return chainSpecific;
|
|
70
|
+
let priced = initialRefinement.data;
|
|
71
|
+
let gasBudget = priced.gasBudget ? BigInt(priced.gasBudget) : suiGasBudget;
|
|
72
|
+
let selectedCoins = selectCoins(gasBudget);
|
|
73
|
+
let pricedCoinCount = chainSpecific.coins.length;
|
|
74
|
+
for (let iteration = 0; iteration < maxGasBudgetConvergeIterations && selectedCoins.length > pricedCoinCount; iteration++) {
|
|
75
|
+
const repriced = await refineSuiChainSpecific({
|
|
70
76
|
keysignPayload,
|
|
71
|
-
chainSpecific,
|
|
77
|
+
chainSpecific: create(SuiSpecificSchema, {
|
|
78
|
+
...priced,
|
|
79
|
+
coins: selectedCoins,
|
|
80
|
+
gasBudget: gasBudget.toString(),
|
|
81
|
+
}),
|
|
72
82
|
walletCore,
|
|
73
83
|
});
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
pricedCoinCount = selectedCoins.length;
|
|
92
|
-
gasBudget = nextGasBudget;
|
|
93
|
-
priced = repriced;
|
|
94
|
-
selectedCoins = selectCoins(gasBudget);
|
|
95
|
-
}
|
|
96
|
-
return create(SuiSpecificSchema, {
|
|
97
|
-
...priced,
|
|
98
|
-
coins: selectedCoins,
|
|
99
|
-
gasBudget: gasBudget.toString(),
|
|
100
|
-
});
|
|
101
|
-
}), chainSpecific);
|
|
102
|
-
return refined;
|
|
84
|
+
const repricedGasBudget = repriced.gasBudget ? BigInt(repriced.gasBudget) : gasBudget;
|
|
85
|
+
const nextGasBudget = repricedGasBudget > gasBudget ? repricedGasBudget : gasBudget;
|
|
86
|
+
pricedCoinCount = selectedCoins.length;
|
|
87
|
+
if (nextGasBudget === gasBudget)
|
|
88
|
+
break;
|
|
89
|
+
gasBudget = nextGasBudget;
|
|
90
|
+
priced = repriced;
|
|
91
|
+
selectedCoins = selectCoins(gasBudget);
|
|
92
|
+
}
|
|
93
|
+
if (selectedCoins.length > pricedCoinCount) {
|
|
94
|
+
throw new SuiGasBudgetConvergenceError(`Sui gas budget did not converge after ${maxGasBudgetConvergeIterations} re-price rounds`);
|
|
95
|
+
}
|
|
96
|
+
return create(SuiSpecificSchema, {
|
|
97
|
+
...priced,
|
|
98
|
+
coins: selectedCoins,
|
|
99
|
+
gasBudget: gasBudget.toString(),
|
|
100
|
+
});
|
|
103
101
|
};
|
|
104
102
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/core/mpc/keysign/chainSpecific/resolvers/sui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAA;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAA;AACrE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,qEAAqE,CAAA;AACtH,OAAO,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/core/mpc/keysign/chainSpecific/resolvers/sui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAA;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAA;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAA;AAC9E,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,qEAAqE,CAAA;AACtH,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAEvG,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAEjD,MAAM,4BAA6B,SAAQ,KAAK;CAAG;AAEnD,MAAM,CAAC,MAAM,mBAAmB,GAA+C,KAAK,EAAE,EACpF,cAAc,EACd,UAAU,GACX,EAAE,EAAE;IACH,0EAA0E;IAC1E,uEAAuE;IACvE,4EAA4E;IAC5E,uEAAuE;IACvE,IAAI,cAAc,CAAC,QAAQ,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC/C,OAAO,MAAM,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAA;IACtC,CAAC;IAED,MAAM,IAAI,GAAG,cAAc,CAAC,cAAc,CAAC,CAAA;IAC3C,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;IACxB,MAAM,MAAM,GAAG,YAAY,EAAE,CAAA;IAE7B,+EAA+E;IAC/E,6EAA6E;IAC7E,8EAA8E;IAC9E,yEAAyE;IACzE,qEAAqE;IACrE,6EAA6E;IAC7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F,MAAM,aAAa,GAAG,iBAAiB,GAAG,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAA;QACnF,eAAe,GAAG,aAAa,CAAC,MAAM,CAAA;QACtC,IAAI,aAAa,KAAK,SAAS;YAAE,MAAK;QAEtC,SAAS,GAAG,aAAa,CAAA;QACzB,MAAM,GAAG,QAAQ,CAAA;QACjB,aAAa,GAAG,WAAW,CAAC,SAAS,CAAC,CAAA;IACxC,CAAC;IAED,IAAI,aAAa,CAAC,MAAM,GAAG,eAAe,EAAE,CAAC;QAC3C,MAAM,IAAI,4BAA4B,CACpC,yCAAyC,8BAA8B,kBAAkB,CAC1F,CAAA;IACH,CAAC;IAED,OAAO,MAAM,CAAC,iBAAiB,EAAE;QAC/B,GAAG,MAAM;QACT,KAAK,EAAE,aAAa;QACpB,SAAS,EAAE,SAAS,CAAC,QAAQ,EAAE;KAChC,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refine.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/mpc/keysign/chainSpecific/resolvers/sui/refine.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"refine.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/mpc/keysign/chainSpecific/resolvers/sui/refine.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,qEAAqE,CAAA;AACjG,OAAO,EAAE,cAAc,EAAwB,MAAM,iEAAiE,CAAA;AAEtH,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAOrD,KAAK,2BAA2B,GAAG;IACjC,cAAc,EAAE,cAAc,CAAA;IAC9B,aAAa,EAAE,WAAW,CAAA;IAC1B,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,sBAAsB,GAAU,gDAI1C,2BAA2B,KAAG,OAAO,CAAC,WAAW,CAyCnD,CAAA"}
|