@vultisig/core-chain 2.28.0 → 2.29.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 +138 -0
- package/dist/chains/cosmos/cosmosGasLimitRecord.js +3 -3
- package/dist/chains/cosmos/cosmosGasLimitRecord.js.map +1 -1
- package/dist/chains/cosmos/gas.d.ts +28 -1
- package/dist/chains/cosmos/gas.d.ts.map +1 -1
- package/dist/chains/cosmos/gas.js +37 -5
- package/dist/chains/cosmos/gas.js.map +1 -1
- package/dist/chains/cosmos/resolveCosmosGasLimit.d.ts +82 -0
- package/dist/chains/cosmos/resolveCosmosGasLimit.d.ts.map +1 -0
- package/dist/chains/cosmos/resolveCosmosGasLimit.js +71 -0
- package/dist/chains/cosmos/resolveCosmosGasLimit.js.map +1 -0
- package/dist/chains/cosmos/terraClassicTax.d.ts +68 -0
- package/dist/chains/cosmos/terraClassicTax.d.ts.map +1 -1
- package/dist/chains/cosmos/terraClassicTax.js +85 -0
- package/dist/chains/cosmos/terraClassicTax.js.map +1 -1
- package/dist/chains/sui/client.d.ts +11 -2
- package/dist/chains/sui/client.d.ts.map +1 -1
- package/dist/chains/sui/client.js +5 -4
- package/dist/chains/sui/client.js.map +1 -1
- package/dist/chains/sui/config.d.ts +28 -0
- package/dist/chains/sui/config.d.ts.map +1 -1
- package/dist/chains/sui/config.js +27 -0
- package/dist/chains/sui/config.js.map +1 -1
- package/dist/chains/sui/listAllCoins.d.ts +44 -0
- package/dist/chains/sui/listAllCoins.d.ts.map +1 -0
- package/dist/chains/sui/listAllCoins.js +43 -0
- package/dist/chains/sui/listAllCoins.js.map +1 -0
- package/dist/chains/sui/transactionResult.d.ts +59 -0
- package/dist/chains/sui/transactionResult.d.ts.map +1 -0
- package/dist/chains/sui/transactionResult.js +43 -0
- package/dist/chains/sui/transactionResult.js.map +1 -0
- package/dist/coin/balance/resolvers/sui.d.ts.map +1 -1
- package/dist/coin/balance/resolvers/sui.js +6 -3
- package/dist/coin/balance/resolvers/sui.js.map +1 -1
- package/dist/coin/token/metadata/chains.d.ts +1 -1
- package/dist/coin/token/metadata/chains.d.ts.map +1 -1
- package/dist/coin/token/metadata/chains.js +1 -0
- package/dist/coin/token/metadata/chains.js.map +1 -1
- package/dist/coin/token/metadata/index.d.ts.map +1 -1
- package/dist/coin/token/metadata/index.js +2 -0
- package/dist/coin/token/metadata/index.js.map +1 -1
- package/dist/coin/token/metadata/resolvers/ripple.d.ts +17 -0
- package/dist/coin/token/metadata/resolvers/ripple.d.ts.map +1 -0
- package/dist/coin/token/metadata/resolvers/ripple.js +44 -0
- package/dist/coin/token/metadata/resolvers/ripple.js.map +1 -0
- package/dist/coin/token/metadata/resolvers/sui.d.ts +1 -1
- package/dist/coin/token/metadata/resolvers/sui.d.ts.map +1 -1
- package/dist/coin/token/metadata/resolvers/sui.js +6 -3
- package/dist/coin/token/metadata/resolvers/sui.js.map +1 -1
- package/dist/swap/general/jupiter/api/getJupiterSwapQuote.d.ts.map +1 -1
- package/dist/swap/general/jupiter/api/getJupiterSwapQuote.js +2 -1
- package/dist/swap/general/jupiter/api/getJupiterSwapQuote.js.map +1 -1
- package/dist/swap/native/limitSwapMemo.d.ts +35 -5
- package/dist/swap/native/limitSwapMemo.d.ts.map +1 -1
- package/dist/swap/native/limitSwapMemo.js +32 -7
- package/dist/swap/native/limitSwapMemo.js.map +1 -1
- package/dist/tx/broadcast/resolvers/sui.d.ts +2 -8
- package/dist/tx/broadcast/resolvers/sui.d.ts.map +1 -1
- package/dist/tx/broadcast/resolvers/sui.js +18 -17
- package/dist/tx/broadcast/resolvers/sui.js.map +1 -1
- package/dist/tx/broadcast/transientRetry.d.ts.map +1 -1
- package/dist/tx/broadcast/transientRetry.js +30 -2
- package/dist/tx/broadcast/transientRetry.js.map +1 -1
- package/dist/tx/hash/resolvers/sui.d.ts.map +1 -1
- package/dist/tx/hash/resolvers/sui.js +13 -3
- package/dist/tx/hash/resolvers/sui.js.map +1 -1
- package/dist/tx/status/resolvers/sui.d.ts.map +1 -1
- package/dist/tx/status/resolvers/sui.js +15 -6
- package/dist/tx/status/resolvers/sui.js.map +1 -1
- package/dist/utils/isValidTokenId.d.ts +11 -0
- package/dist/utils/isValidTokenId.d.ts.map +1 -1
- package/dist/utils/isValidTokenId.js +31 -2
- package/dist/utils/isValidTokenId.js.map +1 -1
- package/package.json +22 -7
- package/dist/chains/cosmos/resolveCosmosGasFee.d.ts +0 -49
- package/dist/chains/cosmos/resolveCosmosGasFee.d.ts.map +0 -1
- package/dist/chains/cosmos/resolveCosmosGasFee.js +0 -35
- package/dist/chains/cosmos/resolveCosmosGasFee.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,143 @@
|
|
|
1
1
|
# @vultisig/core-chain
|
|
2
2
|
|
|
3
|
+
## 2.29.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1568](https://github.com/vultisig/vultisig-sdk/pull/1568) [`859ab28`](https://github.com/vultisig/vultisig-sdk/commit/859ab287d3574c508b4abce5950e8e42c17f8198) Thanks [@Ehsan-saradar](https://github.com/Ehsan-saradar)! - feat(ripple): add XRPL issued-currency (custom token) support
|
|
8
|
+
|
|
9
|
+
XRPL issued currencies (trust-line tokens / IOUs) had no token metadata resolver,
|
|
10
|
+
so custom tokens could not be added on Ripple. Adds `getRippleTokenMetadata` and
|
|
11
|
+
registers Ripple in `chainsWithTokenMetadataDiscovery`. Unlike EVM/Tron there is no
|
|
12
|
+
on-ledger metadata call: XRPL exposes no per-token decimal metadata — so the SDK
|
|
13
|
+
applies its fixed issued-currency decimal policy (`rippleIssuedCurrencyDecimals`) —
|
|
14
|
+
and the ticker is derived from the currency code, so the resolver fetches nothing.
|
|
15
|
+
Curated tokens
|
|
16
|
+
(RLUSD) get their logo and price provider merged in; an arbitrary token gets neither
|
|
17
|
+
rather than borrowing a known token's identity, since two issuers can share a ticker
|
|
18
|
+
on XRPL.
|
|
19
|
+
|
|
20
|
+
`isValidTokenId` now also accepts a human ticker (`SOLO`, `RLUSD`) wherever an
|
|
21
|
+
on-ledger currency code is accepted — the form shown on explorers like xrpscan — and
|
|
22
|
+
a new `normalizeTokenId` canonicalises a pasted id to the on-ledger form.
|
|
23
|
+
|
|
24
|
+
`BalanceService.addToken`/`removeToken` normalise the token id (and its matching
|
|
25
|
+
`contractAddress`) before it enters persisted state, so a manually added
|
|
26
|
+
`RLUSD.<issuer>` collapses onto the canonical `524C…<issuer>` that ledger discovery
|
|
27
|
+
stores instead of being kept as a second, distinct token. A no-op for chains whose
|
|
28
|
+
ids are already canonical.
|
|
29
|
+
|
|
30
|
+
## 2.29.0
|
|
31
|
+
|
|
32
|
+
### Minor Changes
|
|
33
|
+
|
|
34
|
+
- [#1475](https://github.com/vultisig/vultisig-sdk/pull/1475) [`4b14790`](https://github.com/vultisig/vultisig-sdk/commit/4b14790fb5f0fa5b9a58f6fe5575ad4c2bab3867) Thanks [@rcoderdev](https://github.com/rcoderdev)! - Expose canonical Cosmos native-send fee metadata so first-party consumers can stop maintaining local tables: IBC chains use their shared/default floors, MayaChain exposes its fixed fee, and THORChain remains explicitly unresolved because its fee comes from live network data.
|
|
35
|
+
|
|
36
|
+
- [#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.
|
|
37
|
+
|
|
38
|
+
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.
|
|
39
|
+
|
|
40
|
+
`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.
|
|
41
|
+
|
|
42
|
+
`parseLimitSwapMemo` is the underlying decoder, and `assertLimitSwapMemo` now delegates to it so the grammar has one implementation.
|
|
43
|
+
|
|
44
|
+
`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.
|
|
45
|
+
|
|
46
|
+
- [#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.
|
|
47
|
+
|
|
48
|
+
Sui is retiring JSON-RPC: shutdown on Foundation mainnet full nodes began the
|
|
49
|
+
week of 2026-07-27 and full decommission (code removal) lands mid-October 2026,
|
|
50
|
+
after which no provider can serve it. This is a scheduled migration ahead of
|
|
51
|
+
that date, NOT a fix for a live outage — as of 2026-07-27 both
|
|
52
|
+
`sui-rpc.publicnode.com` and `fullnode.mainnet.sui.io` still answer JSON-RPC.
|
|
53
|
+
|
|
54
|
+
- `getSuiClient()` now returns a `SuiGrpcClient` pointed at
|
|
55
|
+
`https://fullnode.mainnet.sui.io:443` (gRPC-web over HTTPS).
|
|
56
|
+
- React Native uses `SuiGraphQLClient` against
|
|
57
|
+
`https://graphql.mainnet.sui.io/graphql` instead: grpc-web needs
|
|
58
|
+
`Response.body` streaming, which Hermes' fetch does not provide. Both clients
|
|
59
|
+
implement the same unified transport interface, so callsites are identical.
|
|
60
|
+
- Balance, coin metadata, coin listing, tx hash, tx status, broadcast and
|
|
61
|
+
keysign gas refinement moved to `getBalance` / `getCoinMetadata` / `listCoins`
|
|
62
|
+
/ `simulateTransaction` / `getTransaction` / `executeTransaction`.
|
|
63
|
+
- The dependency-free `@vultisig/sdk` balance tools (`getSuiBalance`,
|
|
64
|
+
`getSuiTokenBalance`, `getSuiAllBalances`) now POST Sui GraphQL and follow the
|
|
65
|
+
paginated `balances` connection to completion, returning `tokens_unavailable`
|
|
66
|
+
rather than a silently truncated portfolio.
|
|
67
|
+
|
|
68
|
+
Broadcast-error classification follows the transport. A gRPC failure carries the
|
|
69
|
+
grpc-status NAME in `code` (not a JSON-RPC number) and a percent-encoded message,
|
|
70
|
+
so both classifiers were re-pointed:
|
|
71
|
+
|
|
72
|
+
- `isTransientBroadcastError` retries `UNAVAILABLE` / `DEADLINE_EXCEEDED` /
|
|
73
|
+
`RESOURCE_EXHAUSTED` and decodes the message before pattern-matching. A
|
|
74
|
+
grpc-web response is HTTP 200 with the real status in the trailer, so the
|
|
75
|
+
existing 5xx branch never saw a busy or restarting node.
|
|
76
|
+
- The CLI's permanent-vs-retryable gate matches `INVALID_ARGUMENT` instead of
|
|
77
|
+
the numeric `-32002`. Left unchanged, that gate would have gone dead and every
|
|
78
|
+
permanent Sui rejection would have been re-broadcast as if transient.
|
|
79
|
+
|
|
80
|
+
Breaking for direct consumers: `assertSuiTxSucceeded` now takes the unified
|
|
81
|
+
client's transaction result (`{ $kind, Transaction | FailedTransaction }`)
|
|
82
|
+
instead of a JSON-RPC effects object.
|
|
83
|
+
|
|
84
|
+
### Patch Changes
|
|
85
|
+
|
|
86
|
+
- [#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
|
|
87
|
+
|
|
88
|
+
`CosmosSpecific.gas` (proto field 3) is the fee AMOUNT — commondata#93 documents
|
|
89
|
+
it as such and every other client signs it verbatim. The signing-inputs and
|
|
90
|
+
fee-display resolvers were instead re-deriving it as
|
|
91
|
+
`ceil(gas × relayedGasLimit / staticGasLimit)`, and doubling it for IBC
|
|
92
|
+
transfers. That silently redefined a shared wire field in one client: on a
|
|
93
|
+
TerraClassic LUNC send with a simulated gas limit of 321,979 the extension
|
|
94
|
+
signed a 21.465267 LUNC fee while the iOS co-signer signed the payload's
|
|
95
|
+
20 LUNC, the SignDocs diverged, and the MPC keysign never completed.
|
|
96
|
+
|
|
97
|
+
Both read paths now use `gas` as-is and only resolve the gas LIMIT from field 7.
|
|
98
|
+
Fee headroom moved to the initiator, which prices `gas` against the limit it
|
|
99
|
+
relays — matching iOS `CosmosGasPricedFee.scaled` and Android
|
|
100
|
+
`TerraClassicTax.baseGas`. The COSMOS-02 IBC source-leg headroom is preserved by
|
|
101
|
+
relaying the widened limit in `gas_limit` instead of applying a multiplier that
|
|
102
|
+
no other client can reproduce.
|
|
103
|
+
|
|
104
|
+
`resolveCosmosGasFee` is replaced by `resolveCosmosGasLimit` (limit resolution)
|
|
105
|
+
and `scaleCosmosFeeAmount` (initiator-only pricing).
|
|
106
|
+
|
|
107
|
+
- [#1582](https://github.com/vultisig/vultisig-sdk/pull/1582) [`d7fd8fd`](https://github.com/vultisig/vultisig-sdk/commit/d7fd8fd891d2bb9f007b3feff5b31cc961bae497) Thanks [@rcoderdev](https://github.com/rcoderdev)! - Apply the Jupiter affiliate fee by deriving and prepending its ATA, while
|
|
108
|
+
normalizing zero-fee quotes before unsigned transaction construction.
|
|
109
|
+
|
|
110
|
+
- [#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
|
|
111
|
+
|
|
112
|
+
`cosmosGasRecord[TerraClassic]` was a hand-tuned flat 20 LUNC (itself already
|
|
113
|
+
lowered from 100 LUNC). Terra Classic's actual `uluna` gas price is 28.325
|
|
114
|
+
uluna/gas, so a send at the static 300k limit costs 8,497,500 uluna — the flat
|
|
115
|
+
constant overcharged every send by ~2.35× before any gas-limit scaling.
|
|
116
|
+
|
|
117
|
+
It was also implicitly absorbing the `x/tax` burn tax (0.5% of the transfer),
|
|
118
|
+
which scales with the amount while a flat constant does not. So it overcharged
|
|
119
|
+
small sends and under-covered anything above ~2,300 LUNC, where 0.5% outgrows
|
|
120
|
+
the slack.
|
|
121
|
+
|
|
122
|
+
Both halves are now explicit:
|
|
123
|
+
|
|
124
|
+
- `cosmosGasRecord[TerraClassic]` = `8_497_500n` (`300_000 × 28.325`), matching
|
|
125
|
+
iOS `TerraClassicTax.ulunaBaseGas` and Android `ULUNA_BASE_GAS`. It still
|
|
126
|
+
scales with a relayed `gas_limit`.
|
|
127
|
+
- The initiator adds `applyTerraClassicBurnTax(amount, rate)` to `gas` for
|
|
128
|
+
native LUNC sends, after the gas scaling — the tax tracks the transfer
|
|
129
|
+
amount, not the gas limit.
|
|
130
|
+
|
|
131
|
+
Adds `getTerraClassicBurnTaxRate`, which reads `x/tax` `burn_tax_rate` (live
|
|
132
|
+
0.5%) and fails closed to 0.5% on any LCD error. This is a different tax from
|
|
133
|
+
the existing `x/treasury` `tax_rate`, which governance has held at 0 since the
|
|
134
|
+
UST collapse and which exempts `uluna` — reading it for a LUNC send always
|
|
135
|
+
returned 0. `applyTerraClassicBurnTax` is separate from `applyTerraClassicTax`
|
|
136
|
+
for the same reason: the burn tax exempts nothing and is uncapped.
|
|
137
|
+
|
|
138
|
+
A 300 LUNC send at a simulated 321,979 gas limit now costs 10.620056 LUNC
|
|
139
|
+
(9.120056 gas + 1.5 tax) instead of 21.465267.
|
|
140
|
+
|
|
3
141
|
## 2.28.0
|
|
4
142
|
|
|
5
143
|
### Minor Changes
|
|
@@ -38,8 +38,8 @@ export const getCosmosGasLimit = (coin) => {
|
|
|
38
38
|
* That fee is supplied by the CONSUMER's separate per-msg staking fee
|
|
39
39
|
* (mcp-ts COSMOS_STAKING_FEE_PER_MSG_BASE_UNITS[TerraClassic] = 100 LUNC/msg,
|
|
40
40
|
* written into the signAmino / signDirect fee) — NOT by
|
|
41
|
-
* `cosmosGasRecord[TerraClassic]`, which is the native MsgSend fee
|
|
42
|
-
* (
|
|
41
|
+
* `cosmosGasRecord[TerraClassic]`, which is the native MsgSend gas fee
|
|
42
|
+
* (8.4975 LUNC = 300k × 28.325) and never governs staking. The msgCount scaling is disabled for
|
|
43
43
|
* TerraClassic: at msgCount>=2, scaled gasWanted would push the required fee
|
|
44
44
|
* above the 100 LUNC per-msg staking fee, causing node rejection. Columbus-5
|
|
45
45
|
* callers must split multi-validator claims into separate txs.
|
|
@@ -72,7 +72,7 @@ export const getCosmosStakingGasLimit = ({ chain, msgCount = 1 }) => {
|
|
|
72
72
|
// TerraClassic: staking-fee cap (see comment on cosmosStakingGasLimitRecord).
|
|
73
73
|
// Scaling would push the required fee above the consumer's 100 LUNC per-msg
|
|
74
74
|
// staking fee at msgCount>=2; single-msg policy keeps the tx within that fee
|
|
75
|
-
// for columbus-5 (independent of the
|
|
75
|
+
// for columbus-5 (independent of the cosmosGasRecord native-send gas fee).
|
|
76
76
|
if (chain === Chain.TerraClassic)
|
|
77
77
|
return base;
|
|
78
78
|
const n = BigInt(Math.max(1, msgCount));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cosmosGasLimitRecord.js","sourceRoot":"","sources":["../../../../../../packages/core/chain/chains/cosmos/cosmosGasLimitRecord.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAsC,MAAM,4BAA4B,CAAA;AAItF,MAAM,oBAAoB,GAAgC;IACxD,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO;IACvB,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO;IACxB,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO;IACvB,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO;IACrB,CAAC,KAAK,CAAC,KAAK,CAAC,E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,0EAA0E,QAAQ,EAAE,CAAC,CAAA;IACvG,CAAC;IAED,MAAM,IAAI,GAAG,2BAA2B,CAAC,KAAK,CAAC,CAAA;IAE/C,8EAA8E;IAC9E,4EAA4E;IAC5E,6EAA6E;IAC7E,
|
|
1
|
+
{"version":3,"file":"cosmosGasLimitRecord.js","sourceRoot":"","sources":["../../../../../../packages/core/chain/chains/cosmos/cosmosGasLimitRecord.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAsC,MAAM,4BAA4B,CAAA;AAItF,MAAM,oBAAoB,GAAgC;IACxD,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO;IACvB,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO;IACxB,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO;IACvB,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO;IACrB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,OAAO;IACtB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,OAAO;IACtB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,OAAO;IACtB,wDAAwD;IACxD,2EAA2E;IAC3E,0EAA0E;IAC1E,sEAAsE;IACtE,uEAAuE;IACvE,wEAAwE;IACxE,yEAAyE;IACzE,gCAAgC;IAChC,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,OAAO;IAC7B,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,SAAS;IAC5B,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,WAAW;CAC/B,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAA0B,EAAU,EAAE;IACtE,OAAO,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AACzC,CAAC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,2BAA2B,GAA0C;IACzE,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,OAAQ;IACxB,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,OAAQ;IACzB,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,OAAQ;IACxB,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,OAAQ;IACtB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,OAAQ;IACvB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,OAAQ;IACvB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,OAAQ;IACvB,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,QAAU;CACjC,CAAA;AAaD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,GAAG,CAAC,EAAiC,EAAU,EAAE;IACzG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,QAAQ,GAAG,CAAC,EAAE,CAAC;QAChD,MAAM,IAAI,KAAK,CAAC,0EAA0E,QAAQ,EAAE,CAAC,CAAA;IACvG,CAAC;IAED,MAAM,IAAI,GAAG,2BAA2B,CAAC,KAAK,CAAC,CAAA;IAE/C,8EAA8E;IAC9E,4EAA4E;IAC5E,6EAA6E;IAC7E,2EAA2E;IAC3E,IAAI,KAAK,KAAK,KAAK,CAAC,YAAY;QAAE,OAAO,IAAI,CAAA;IAE7C,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAA;IACvC,OAAO,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;AACtC,CAAC,CAAA"}
|
|
@@ -1,8 +1,35 @@
|
|
|
1
|
-
import { IbcEnabledCosmosChain } from '../../Chain.js';
|
|
1
|
+
import { CosmosChain, IbcEnabledCosmosChain } from '../../Chain.js';
|
|
2
2
|
import type { CoinKey } from '../../coin/Coin.js';
|
|
3
3
|
import { type ParsedDecimal } from './cosmosDecimal.js';
|
|
4
4
|
export { getFeeAmountFromGasPrice } from './cosmosDecimal.js';
|
|
5
|
+
/** Canonical signable send-fee floor for IBC-enabled Cosmos chains without a chain-specific override. */
|
|
6
|
+
export declare const COSMOS_SEND_FEE_DEFAULT = 7500n;
|
|
7
|
+
/** Canonical fixed MayaChain native-send fee in CACAO base units. */
|
|
8
|
+
export declare const MAYA_SEND_FEE_BASE_UNITS = 2000000000n;
|
|
9
|
+
/**
|
|
10
|
+
* Terra Classic's `uluna` fee at the static 300k gas limit:
|
|
11
|
+
* `300_000 × 28.325 uluna/gas`. 28.325 is the chain's own minimum gas price,
|
|
12
|
+
* live-verifiable at `/terra/tax/v1beta1/params` (`gas_prices[uluna]`), and
|
|
13
|
+
* real columbus-5 sends pay exactly `gas_wanted × 28.325`.
|
|
14
|
+
*
|
|
15
|
+
* This is a derived price, NOT a hand-tuned floor. It previously sat at
|
|
16
|
+
* 20_000_000 (20 LUNC) — 2.35× the chain's requirement — which overcharged
|
|
17
|
+
* every send while ALSO under-covering large ones, because the burn tax it
|
|
18
|
+
* was implicitly absorbing scales with the transfer amount and this constant
|
|
19
|
+
* does not. The burn tax is now added explicitly by the initiator (see
|
|
20
|
+
* `applyTerraClassicBurnTax`), so this is purely the gas component.
|
|
21
|
+
*
|
|
22
|
+
* Matches iOS `TerraClassicTax.ulunaBaseGas` and Android
|
|
23
|
+
* `TerraClassicTax.ULUNA_BASE_GAS`.
|
|
24
|
+
*/
|
|
25
|
+
export declare const TERRA_CLASSIC_ULUNA_BASE_GAS = 8497500n;
|
|
5
26
|
export declare const cosmosGasRecord: Record<IbcEnabledCosmosChain, bigint>;
|
|
27
|
+
/**
|
|
28
|
+
* Returns the canonical static native-send fee in base units.
|
|
29
|
+
* THORChain returns `undefined` because its fee must be read from live
|
|
30
|
+
* `native_tx_fee_rune` network data rather than a static fallback.
|
|
31
|
+
*/
|
|
32
|
+
export declare const getCosmosSendFeeBaseUnits: (chain: CosmosChain) => bigint | undefined;
|
|
6
33
|
type FetchOpts = {
|
|
7
34
|
fetchImpl?: typeof fetch;
|
|
8
35
|
signal?: AbortSignal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gas.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/chain/chains/cosmos/gas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,qBAAqB,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"gas.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/chain/chains/cosmos/gas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,WAAW,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AACvE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAA4B,KAAK,aAAa,EAAgB,MAAM,iBAAiB,CAAA;AAM5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAA;AAE1D,yGAAyG;AACzG,eAAO,MAAM,uBAAuB,QAAQ,CAAA;AAE5C,qEAAqE;AACrE,eAAO,MAAM,wBAAwB,cAAc,CAAA;AAEnD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,4BAA4B,WAAa,CAAA;AAEtD,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,qBAAqB,EAAE,MAAM,CASjE,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GAAI,OAAO,WAAW,KAAG,MAAM,GAAG,SAIvE,CAAA;AAED,KAAK,SAAS,GAAG;IACf,SAAS,CAAC,EAAE,OAAO,KAAK,CAAA;IACxB,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB,CAAA;AAqBD,eAAO,MAAM,sBAAsB,GAAI,iBAAiB,MAAM,EAAE,aAAa,MAAM,KAAG,aAAa,GAAG,SAYrG,CAAA;AA0ED,eAAO,MAAM,kBAAkB,GAC7B,MAAM,OAAO,CAAC,qBAAqB,CAAC,EACpC,OAAM,SAAc,KACnB,OAAO,CAAC,MAAM,CAehB,CAAA"}
|
|
@@ -5,17 +5,49 @@ import { getCosmosGasLimit } from './cosmosGasLimitRecord.js';
|
|
|
5
5
|
import { getCosmosRpcUrl } from './getCosmosRpcUrl.js';
|
|
6
6
|
import { getOsmosisDynamicFeeFloor } from './osmosisDynamicFee.js';
|
|
7
7
|
export { getFeeAmountFromGasPrice } from './cosmosDecimal.js';
|
|
8
|
-
|
|
8
|
+
/** Canonical signable send-fee floor for IBC-enabled Cosmos chains without a chain-specific override. */
|
|
9
|
+
export const COSMOS_SEND_FEE_DEFAULT = 7500n;
|
|
10
|
+
/** Canonical fixed MayaChain native-send fee in CACAO base units. */
|
|
11
|
+
export const MAYA_SEND_FEE_BASE_UNITS = 2000000000n;
|
|
12
|
+
/**
|
|
13
|
+
* Terra Classic's `uluna` fee at the static 300k gas limit:
|
|
14
|
+
* `300_000 × 28.325 uluna/gas`. 28.325 is the chain's own minimum gas price,
|
|
15
|
+
* live-verifiable at `/terra/tax/v1beta1/params` (`gas_prices[uluna]`), and
|
|
16
|
+
* real columbus-5 sends pay exactly `gas_wanted × 28.325`.
|
|
17
|
+
*
|
|
18
|
+
* This is a derived price, NOT a hand-tuned floor. It previously sat at
|
|
19
|
+
* 20_000_000 (20 LUNC) — 2.35× the chain's requirement — which overcharged
|
|
20
|
+
* every send while ALSO under-covering large ones, because the burn tax it
|
|
21
|
+
* was implicitly absorbing scales with the transfer amount and this constant
|
|
22
|
+
* does not. The burn tax is now added explicitly by the initiator (see
|
|
23
|
+
* `applyTerraClassicBurnTax`), so this is purely the gas component.
|
|
24
|
+
*
|
|
25
|
+
* Matches iOS `TerraClassicTax.ulunaBaseGas` and Android
|
|
26
|
+
* `TerraClassicTax.ULUNA_BASE_GAS`.
|
|
27
|
+
*/
|
|
28
|
+
export const TERRA_CLASSIC_ULUNA_BASE_GAS = 8497500n;
|
|
9
29
|
export const cosmosGasRecord = {
|
|
10
|
-
[Chain.Cosmos]:
|
|
30
|
+
[Chain.Cosmos]: COSMOS_SEND_FEE_DEFAULT,
|
|
11
31
|
[Chain.Osmosis]: 9000n,
|
|
12
|
-
[Chain.Kujira]:
|
|
13
|
-
[Chain.Terra]:
|
|
32
|
+
[Chain.Kujira]: COSMOS_SEND_FEE_DEFAULT,
|
|
33
|
+
[Chain.Terra]: COSMOS_SEND_FEE_DEFAULT,
|
|
14
34
|
[Chain.Dydx]: 2500000000000000n,
|
|
15
|
-
[Chain.TerraClassic]:
|
|
35
|
+
[Chain.TerraClassic]: TERRA_CLASSIC_ULUNA_BASE_GAS,
|
|
16
36
|
[Chain.Noble]: 30000n,
|
|
17
37
|
[Chain.Akash]: 200000n,
|
|
18
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* Returns the canonical static native-send fee in base units.
|
|
41
|
+
* THORChain returns `undefined` because its fee must be read from live
|
|
42
|
+
* `native_tx_fee_rune` network data rather than a static fallback.
|
|
43
|
+
*/
|
|
44
|
+
export const getCosmosSendFeeBaseUnits = (chain) => {
|
|
45
|
+
if (chain === Chain.THORChain)
|
|
46
|
+
return undefined;
|
|
47
|
+
if (chain === Chain.MayaChain)
|
|
48
|
+
return MAYA_SEND_FEE_BASE_UNITS;
|
|
49
|
+
return cosmosGasRecord[chain];
|
|
50
|
+
};
|
|
19
51
|
const minGasPriceConfigPath = '/cosmos/base/node/v1beta1/config';
|
|
20
52
|
const minGasPriceFetchTimeoutMs = 3_000;
|
|
21
53
|
const maxLiveFeeMultiplier = 10n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gas.js","sourceRoot":"","sources":["../../../../../../packages/core/chain/chains/cosmos/gas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"gas.js","sourceRoot":"","sources":["../../../../../../packages/core/chain/chains/cosmos/gas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAsC,MAAM,aAAa,CAAA;AAEvE,OAAO,EAAE,wBAAwB,EAAsB,YAAY,EAAE,MAAM,i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AAC;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,EACrC,IAAoC,EACpC,OAAkB,EAAE,EACH,EAAE;IACnB,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,OAAO;QAAE,OAAO,yBAAyB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IAE9E,0EAA0E;IAC1E,wEAAwE;IACxE,yEAAyE;IACzE,2EAA2E;IAC3E,yEAAyE;IACzE,qEAAqE;IACrE,4BAA4B;IAC5B,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACnD,yBAAyB,CAAC,IAAI,EAAE,IAAI,CAAC;QACrC,yBAAyB,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC;KACzD,CAAC,CAAA;IACF,OAAO,YAAY,KAAK,IAAI,IAAI,YAAY,GAAG,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,CAAA;AACvF,CAAC,CAAA"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cosmos gas-limit resolution, and the initiator-side helper that prices a fee
|
|
3
|
+
* amount against a chosen limit.
|
|
4
|
+
*
|
|
5
|
+
* WIRE CONTRACT (commondata `CosmosSpecific`, vultisig/commondata#93):
|
|
6
|
+
* - field 3 `gas` — the fee AMOUNT. Signed VERBATIM by every co-signer.
|
|
7
|
+
* - field 7 `gas_limit` — the per-tx gas limit. When unset, peers fall back
|
|
8
|
+
* to the static per-chain limit.
|
|
9
|
+
*
|
|
10
|
+
* Both fields are part of the SignDoc, so every co-signing device MUST derive
|
|
11
|
+
* them identically or the MPC signature fails. The only way to guarantee that
|
|
12
|
+
* across independent implementations is for the read side to do NO arithmetic:
|
|
13
|
+
* whatever the initiator wrote is what gets signed. iOS (`TerraHelperStruct` /
|
|
14
|
+
* `CosmosHelperStruct.defaultFee`), Android (`TerraHelper`) and this SDK's own
|
|
15
|
+
* QBTC builder (`QBTCHelper`) all follow that rule.
|
|
16
|
+
*
|
|
17
|
+
* A previous version of this module rescaled `gas` on the READ side by
|
|
18
|
+
* `relayedGasLimit / staticGasLimit`. That silently redefined field 3 in one
|
|
19
|
+
* client: on a TerraClassic send the extension signed a fee of 21.465267 LUNC
|
|
20
|
+
* while iOS signed the payload's 20 LUNC, the two SignDocs diverged, and the
|
|
21
|
+
* keysign never completed. Any fee headroom must therefore be applied by the
|
|
22
|
+
* INITIATOR (see `scaleCosmosFeeAmount`) before it is written to `gas`.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* COSMOS-02: an IBC transfer (ICS-20 `MsgTransfer`, optionally PFM-forwarded
|
|
26
|
+
* via memo) does measurably more work on the source leg than a plain bank
|
|
27
|
+
* send — channel-state writes plus a relayer event — so the flat per-chain
|
|
28
|
+
* limit (calibrated for `MsgSend`) is undersized and can run out of gas
|
|
29
|
+
* mid-execution: the fee is spent, the transfer fails, and funds don't move
|
|
30
|
+
* but the fee is still burned. PFM hops are budgeted by each forwarding
|
|
31
|
+
* chain, not the source leg here, so ×2 headroom on the source leg is
|
|
32
|
+
* sufficient.
|
|
33
|
+
*
|
|
34
|
+
* Applied by the initiator, which relays the widened limit in `gas_limit` and
|
|
35
|
+
* prices `gas` for it — never by the read side, which has no proto field to
|
|
36
|
+
* carry a multiplier and so could not stay in lockstep with iOS / Android.
|
|
37
|
+
*/
|
|
38
|
+
export declare const IBC_GAS_MULTIPLIER = 2n;
|
|
39
|
+
type ResolveCosmosGasLimitInput = {
|
|
40
|
+
/** relayed `CosmosSpecific.gas_limit` (undefined / 0 → use the static limit) */
|
|
41
|
+
relayedGasLimit: bigint | undefined;
|
|
42
|
+
/** static per-chain gas limit (`getCosmosGasLimit`) */
|
|
43
|
+
staticGasLimit: bigint;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* The gas limit to sign: the relayed per-tx limit when an initiator set one,
|
|
47
|
+
* else the static per-chain limit.
|
|
48
|
+
*
|
|
49
|
+
* `0n` is treated as unset. Proto field 7 is `optional uint64`, but a producer
|
|
50
|
+
* can still relay a nonsensical 0, and signing `gas_wanted = 0` would be
|
|
51
|
+
* rejected on-chain. Mirrors iOS `relayedGasLimit ?? config.gasLimit` and the
|
|
52
|
+
* same guard in `buildQBTCAuthInfo`.
|
|
53
|
+
*/
|
|
54
|
+
export declare const resolveCosmosGasLimit: ({ relayedGasLimit, staticGasLimit }: ResolveCosmosGasLimitInput) => bigint;
|
|
55
|
+
type ScaleCosmosFeeAmountInput = {
|
|
56
|
+
/** fee amount priced at `fromGasLimit` */
|
|
57
|
+
feeAmount: bigint;
|
|
58
|
+
/** the gas limit `feeAmount` was calibrated for (the static per-chain limit) */
|
|
59
|
+
fromGasLimit: bigint;
|
|
60
|
+
/** the gas limit that will actually be signed */
|
|
61
|
+
toGasLimit: bigint;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* `ceil(feeAmount × toGasLimit / fromGasLimit)` in exact integer arithmetic.
|
|
65
|
+
*
|
|
66
|
+
* INITIATOR-ONLY. Chains that price their fee per unit of gas (Terra Classic,
|
|
67
|
+
* dYdX) set the static amount to exactly `staticGasLimit × minGasPrice`, so a
|
|
68
|
+
* widened gas limit needs a proportionally widened fee or the ante handler
|
|
69
|
+
* rejects the tx with "insufficient fee". Scaling the known-good static amount
|
|
70
|
+
* by the limit ratio yields `ceil(toGasLimit × minGasPrice)` without hardcoding
|
|
71
|
+
* each chain's price — the price is implicit in the static amount.
|
|
72
|
+
*
|
|
73
|
+
* Runs once, on the device that builds the payload; the result is written to
|
|
74
|
+
* `CosmosSpecific.gas` and every co-signer reads it verbatim. Mirrors iOS
|
|
75
|
+
* `CosmosGasPricedFee.scaled` and Android `TerraClassicTax.baseGas`.
|
|
76
|
+
*
|
|
77
|
+
* Returns `feeAmount` unchanged when the limit is unchanged or `fromGasLimit`
|
|
78
|
+
* is 0, so the non-dynamic path stays byte-identical.
|
|
79
|
+
*/
|
|
80
|
+
export declare const scaleCosmosFeeAmount: ({ feeAmount, fromGasLimit, toGasLimit }: ScaleCosmosFeeAmountInput) => bigint;
|
|
81
|
+
export {};
|
|
82
|
+
//# sourceMappingURL=resolveCosmosGasLimit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveCosmosGasLimit.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/chain/chains/cosmos/resolveCosmosGasLimit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,KAAK,CAAA;AAEpC,KAAK,0BAA0B,GAAG;IAChC,gFAAgF;IAChF,eAAe,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,uDAAuD;IACvD,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAAI,qCAAqC,0BAA0B,KAAG,MAC5B,CAAA;AAE5E,KAAK,yBAAyB,GAAG;IAC/B,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAA;IACjB,gFAAgF;IAChF,YAAY,EAAE,MAAM,CAAA;IACpB,iDAAiD;IACjD,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,oBAAoB,GAAI,yCAAyC,yBAAyB,KAAG,MAIzG,CAAA"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cosmos gas-limit resolution, and the initiator-side helper that prices a fee
|
|
3
|
+
* amount against a chosen limit.
|
|
4
|
+
*
|
|
5
|
+
* WIRE CONTRACT (commondata `CosmosSpecific`, vultisig/commondata#93):
|
|
6
|
+
* - field 3 `gas` — the fee AMOUNT. Signed VERBATIM by every co-signer.
|
|
7
|
+
* - field 7 `gas_limit` — the per-tx gas limit. When unset, peers fall back
|
|
8
|
+
* to the static per-chain limit.
|
|
9
|
+
*
|
|
10
|
+
* Both fields are part of the SignDoc, so every co-signing device MUST derive
|
|
11
|
+
* them identically or the MPC signature fails. The only way to guarantee that
|
|
12
|
+
* across independent implementations is for the read side to do NO arithmetic:
|
|
13
|
+
* whatever the initiator wrote is what gets signed. iOS (`TerraHelperStruct` /
|
|
14
|
+
* `CosmosHelperStruct.defaultFee`), Android (`TerraHelper`) and this SDK's own
|
|
15
|
+
* QBTC builder (`QBTCHelper`) all follow that rule.
|
|
16
|
+
*
|
|
17
|
+
* A previous version of this module rescaled `gas` on the READ side by
|
|
18
|
+
* `relayedGasLimit / staticGasLimit`. That silently redefined field 3 in one
|
|
19
|
+
* client: on a TerraClassic send the extension signed a fee of 21.465267 LUNC
|
|
20
|
+
* while iOS signed the payload's 20 LUNC, the two SignDocs diverged, and the
|
|
21
|
+
* keysign never completed. Any fee headroom must therefore be applied by the
|
|
22
|
+
* INITIATOR (see `scaleCosmosFeeAmount`) before it is written to `gas`.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* COSMOS-02: an IBC transfer (ICS-20 `MsgTransfer`, optionally PFM-forwarded
|
|
26
|
+
* via memo) does measurably more work on the source leg than a plain bank
|
|
27
|
+
* send — channel-state writes plus a relayer event — so the flat per-chain
|
|
28
|
+
* limit (calibrated for `MsgSend`) is undersized and can run out of gas
|
|
29
|
+
* mid-execution: the fee is spent, the transfer fails, and funds don't move
|
|
30
|
+
* but the fee is still burned. PFM hops are budgeted by each forwarding
|
|
31
|
+
* chain, not the source leg here, so ×2 headroom on the source leg is
|
|
32
|
+
* sufficient.
|
|
33
|
+
*
|
|
34
|
+
* Applied by the initiator, which relays the widened limit in `gas_limit` and
|
|
35
|
+
* prices `gas` for it — never by the read side, which has no proto field to
|
|
36
|
+
* carry a multiplier and so could not stay in lockstep with iOS / Android.
|
|
37
|
+
*/
|
|
38
|
+
export const IBC_GAS_MULTIPLIER = 2n;
|
|
39
|
+
/**
|
|
40
|
+
* The gas limit to sign: the relayed per-tx limit when an initiator set one,
|
|
41
|
+
* else the static per-chain limit.
|
|
42
|
+
*
|
|
43
|
+
* `0n` is treated as unset. Proto field 7 is `optional uint64`, but a producer
|
|
44
|
+
* can still relay a nonsensical 0, and signing `gas_wanted = 0` would be
|
|
45
|
+
* rejected on-chain. Mirrors iOS `relayedGasLimit ?? config.gasLimit` and the
|
|
46
|
+
* same guard in `buildQBTCAuthInfo`.
|
|
47
|
+
*/
|
|
48
|
+
export const resolveCosmosGasLimit = ({ relayedGasLimit, staticGasLimit }) => relayedGasLimit && relayedGasLimit > 0n ? relayedGasLimit : staticGasLimit;
|
|
49
|
+
/**
|
|
50
|
+
* `ceil(feeAmount × toGasLimit / fromGasLimit)` in exact integer arithmetic.
|
|
51
|
+
*
|
|
52
|
+
* INITIATOR-ONLY. Chains that price their fee per unit of gas (Terra Classic,
|
|
53
|
+
* dYdX) set the static amount to exactly `staticGasLimit × minGasPrice`, so a
|
|
54
|
+
* widened gas limit needs a proportionally widened fee or the ante handler
|
|
55
|
+
* rejects the tx with "insufficient fee". Scaling the known-good static amount
|
|
56
|
+
* by the limit ratio yields `ceil(toGasLimit × minGasPrice)` without hardcoding
|
|
57
|
+
* each chain's price — the price is implicit in the static amount.
|
|
58
|
+
*
|
|
59
|
+
* Runs once, on the device that builds the payload; the result is written to
|
|
60
|
+
* `CosmosSpecific.gas` and every co-signer reads it verbatim. Mirrors iOS
|
|
61
|
+
* `CosmosGasPricedFee.scaled` and Android `TerraClassicTax.baseGas`.
|
|
62
|
+
*
|
|
63
|
+
* Returns `feeAmount` unchanged when the limit is unchanged or `fromGasLimit`
|
|
64
|
+
* is 0, so the non-dynamic path stays byte-identical.
|
|
65
|
+
*/
|
|
66
|
+
export const scaleCosmosFeeAmount = ({ feeAmount, fromGasLimit, toGasLimit }) => {
|
|
67
|
+
if (fromGasLimit <= 0n || toGasLimit === fromGasLimit)
|
|
68
|
+
return feeAmount;
|
|
69
|
+
return (feeAmount * toGasLimit + fromGasLimit - 1n) / fromGasLimit;
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=resolveCosmosGasLimit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveCosmosGasLimit.js","sourceRoot":"","sources":["../../../../../../packages/core/chain/chains/cosmos/resolveCosmosGasLimit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAA;AASpC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EAAE,eAAe,EAAE,cAAc,EAA8B,EAAU,EAAE,CAC/G,eAAe,IAAI,eAAe,GAAG,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,cAAc,CAAA;AAW5E;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAA6B,EAAU,EAAE;IACjH,IAAI,YAAY,IAAI,EAAE,IAAI,UAAU,KAAK,YAAY;QAAE,OAAO,SAAS,CAAA;IAEvE,OAAO,CAAC,SAAS,GAAG,UAAU,GAAG,YAAY,GAAG,EAAE,CAAC,GAAG,YAAY,CAAA;AACpE,CAAC,CAAA"}
|
|
@@ -34,6 +34,23 @@
|
|
|
34
34
|
* Reference: terra-money/classic-core, x/treasury REST routes.
|
|
35
35
|
*/
|
|
36
36
|
export declare const getTerraClassicTaxRateUrl: () => string;
|
|
37
|
+
/**
|
|
38
|
+
* The `x/tax` module params, which carry `burn_tax_rate` — a DIFFERENT tax
|
|
39
|
+
* from the `x/treasury` `tax_rate` above, and the one that is actually live.
|
|
40
|
+
*
|
|
41
|
+
* | module | field | live value | exempts uluna? |
|
|
42
|
+
* |--------------|-----------------|------------|----------------|
|
|
43
|
+
* | `x/treasury` | `tax_rate` | 0 | yes |
|
|
44
|
+
* | `x/tax` | `burn_tax_rate` | 0.005 | NO |
|
|
45
|
+
*
|
|
46
|
+
* The treasury stability tax has been paused by governance since the UST
|
|
47
|
+
* collapse; the burn tax replaced it and applies to `uluna` transfers too —
|
|
48
|
+
* burning LUNC is its entire purpose. Reading the treasury endpoint for a
|
|
49
|
+
* LUNC send therefore always yields 0 and undercharges the fee.
|
|
50
|
+
*
|
|
51
|
+
* Same endpoint iOS (`CosmosAPI.terraClassicTaxParams`) and Android read.
|
|
52
|
+
*/
|
|
53
|
+
export declare const getTerraClassicBurnTaxParamsUrl: () => string;
|
|
37
54
|
export declare const getTerraClassicTaxCapsUrl: (denom: string) => string;
|
|
38
55
|
/**
|
|
39
56
|
* cosmos-sdk `Dec` is fixed-point with 18 decimals — the on-the-wire
|
|
@@ -42,6 +59,24 @@ export declare const getTerraClassicTaxCapsUrl: (denom: string) => string;
|
|
|
42
59
|
* tax in base units of the same denom.
|
|
43
60
|
*/
|
|
44
61
|
export declare const TERRA_CLASSIC_TAX_DEC_SCALE: bigint;
|
|
62
|
+
/**
|
|
63
|
+
* Conservative fallback burn-tax rate (0.5%) used when the live `x/tax`
|
|
64
|
+
* params can't be fetched or parsed. Failing CLOSED (taxing) rather than open
|
|
65
|
+
* (0%) avoids signing a tx the chain then rejects at broadcast — an overpaid
|
|
66
|
+
* fee is recoverable, a rejected transfer wastes the gas and moves nothing.
|
|
67
|
+
*
|
|
68
|
+
* Mirrors iOS / Android `TerraClassicTax.fallbackBurnTaxRate`.
|
|
69
|
+
*/
|
|
70
|
+
export declare const TERRA_CLASSIC_FALLBACK_BURN_TAX_RATE = 5000000000000000n;
|
|
71
|
+
/**
|
|
72
|
+
* Sanity ceiling (10%) for a parsed burn-tax rate. The rate is
|
|
73
|
+
* governance-controlled and has historically been ≤ 1.2%, so anything above
|
|
74
|
+
* this is treated as garbage — a malformed `"5"` meaning 500% would otherwise
|
|
75
|
+
* be applied literally and drain the account into the fee. Keeps the fail-safe
|
|
76
|
+
* symmetric with the lower bound, so a bad endpoint can neither under- nor
|
|
77
|
+
* massively over-charge. Mirrors iOS / Android `maxBurnTaxRate`.
|
|
78
|
+
*/
|
|
79
|
+
export declare const TERRA_CLASSIC_MAX_BURN_TAX_RATE = 100000000000000000n;
|
|
45
80
|
type FetchOpts = {
|
|
46
81
|
fetchImpl?: typeof fetch;
|
|
47
82
|
signal?: AbortSignal;
|
|
@@ -55,6 +90,39 @@ type FetchOpts = {
|
|
|
55
90
|
* un-pauses the tax (causing post-sign "insufficient fee" rejections).
|
|
56
91
|
*/
|
|
57
92
|
export declare function getTerraClassicTaxRate(opts?: FetchOpts): Promise<bigint>;
|
|
93
|
+
/**
|
|
94
|
+
* Parses an `x/tax` `burn_tax_rate` Dec string into an 18-decimal fixed-point
|
|
95
|
+
* bigint, falling back to {@link TERRA_CLASSIC_FALLBACK_BURN_TAX_RATE} on a
|
|
96
|
+
* missing, malformed, negative, or implausibly large value.
|
|
97
|
+
*
|
|
98
|
+
* Never throws. Unlike the treasury `tax_rate` — where a missing field means
|
|
99
|
+
* "the LCD is broken, refuse to guess" — a missing burn rate has a known-safe
|
|
100
|
+
* answer (the current governance rate), and the initiator is the only device
|
|
101
|
+
* that computes this. Mirrors iOS / Android `TerraClassicTax.parseRate`.
|
|
102
|
+
*/
|
|
103
|
+
export declare const parseTerraClassicBurnTaxRate: (raw: string | null | undefined) => bigint;
|
|
104
|
+
/**
|
|
105
|
+
* Fetches the live `x/tax` burn-tax rate as an 18-decimal fixed-point bigint
|
|
106
|
+
* (`5_000_000_000_000_000n` for the current 0.5%).
|
|
107
|
+
*
|
|
108
|
+
* Fails closed to {@link TERRA_CLASSIC_FALLBACK_BURN_TAX_RATE} on any LCD
|
|
109
|
+
* error, so a network blip produces a slightly overpaid fee rather than a tx
|
|
110
|
+
* the ante handler rejects.
|
|
111
|
+
*/
|
|
112
|
+
export declare function getTerraClassicBurnTaxRate(opts?: FetchOpts): Promise<bigint>;
|
|
113
|
+
/**
|
|
114
|
+
* Burn tax on a `amount` of the send denom, at an 18-decimal fixed-point
|
|
115
|
+
* `rate`, rounded UP so the signed fee never lands a base unit below the
|
|
116
|
+
* chain's check.
|
|
117
|
+
*
|
|
118
|
+
* Deliberately NOT {@link applyTerraClassicTax}: that models the treasury
|
|
119
|
+
* stability tax, which exempts `uluna` and applies per-denom caps. The burn
|
|
120
|
+
* tax exempts nothing and is uncapped — feeding a LUNC send through the
|
|
121
|
+
* treasury helper silently returns `0n`.
|
|
122
|
+
*
|
|
123
|
+
* Mirrors iOS / Android `TerraClassicTax.burnTax` (both round up).
|
|
124
|
+
*/
|
|
125
|
+
export declare const applyTerraClassicBurnTax: (amount: bigint, rate: bigint) => bigint;
|
|
58
126
|
/**
|
|
59
127
|
* Fetches the per-denom tax cap as a base-unit bigint (e.g.
|
|
60
128
|
* `60_000_000_000_000_000n` for `uluna`). The cap is the maximum tax that
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terraClassicTax.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/chain/chains/cosmos/terraClassicTax.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;
|
|
1
|
+
{"version":3,"file":"terraClassicTax.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/chain/chains/cosmos/terraClassicTax.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAWH;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,QAAO,MAC0B,CAAA;AAEvE;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,+BAA+B,QAAO,MACa,CAAA;AAEhE,eAAO,MAAM,yBAAyB,GAAI,OAAO,MAAM,KAAG,MAK0C,CAAA;AAMpG;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,QAAa,CAAA;AAErD;;;;;;;GAOG;AACH,eAAO,MAAM,oCAAoC,oBAAyB,CAAA;AAE1E;;;;;;;GAOG;AACH,eAAO,MAAM,+B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