@vultisig/core-mpc 1.19.0 → 1.19.2
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 +69 -0
- package/dist/keysign/chainSpecific/resolvers/ripple.d.ts.map +1 -1
- package/dist/keysign/chainSpecific/resolvers/ripple.js +6 -2
- package/dist/keysign/chainSpecific/resolvers/ripple.js.map +1 -1
- package/dist/keysign/fee/resolvers/evm.d.ts +8 -0
- package/dist/keysign/fee/resolvers/evm.d.ts.map +1 -1
- package/dist/keysign/fee/resolvers/evm.js +34 -2
- package/dist/keysign/fee/resolvers/evm.js.map +1 -1
- package/dist/keysign/signingInputs/resolvers/ripple.d.ts.map +1 -1
- package/dist/keysign/signingInputs/resolvers/ripple.js +70 -1
- package/dist/keysign/signingInputs/resolvers/ripple.js.map +1 -1
- package/dist/keysign/utils/isRippleTrustSet.d.ts +26 -12
- package/dist/keysign/utils/isRippleTrustSet.d.ts.map +1 -1
- package/dist/keysign/utils/isRippleTrustSet.js +35 -12
- package/dist/keysign/utils/isRippleTrustSet.js.map +1 -1
- package/dist/tx/signature/generateSignature.js +1 -1
- package/dist/tx/signature/generateSignature.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,74 @@
|
|
|
1
1
|
# @vultisig/core-mpc
|
|
2
2
|
|
|
3
|
+
## 1.19.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1846](https://github.com/vultisig/vultisig-sdk/pull/1846) [`8faa612`](https://github.com/vultisig/vultisig-sdk/commit/8faa612e6358af0a77cebf9c06d8865d832b69df) Thanks [@Ehsan-saradar](https://github.com/Ehsan-saradar)! - Reserve the OP-stack balance-check surcharges in the EVM fee amount, so a native max send on Optimism, Base, Blast or Mantle stays affordable at broadcast. op-geth requires `value + gasLimit * maxFeePerGas + l1Cost + operatorCost`, and an amount that left only the gas term behind was rejected by exactly the difference — after the keysign ceremony had already run. Both oracle reads fail open, so a chain whose oracle is unreachable or predates a term behaves exactly as before.
|
|
8
|
+
|
|
9
|
+
- [#1844](https://github.com/vultisig/vultisig-sdk/pull/1844) [`69a891c`](https://github.com/vultisig/vultisig-sdk/commit/69a891ce5fbb49c6fd8951e28f66411cc5a8ff99) Thanks [@Ehsan-saradar](https://github.com/Ehsan-saradar)! - fix(ripple): refuse a partial payment with no delivery floor
|
|
10
|
+
|
|
11
|
+
For a `signRipple` Payment this resolver binds the raw transaction's
|
|
12
|
+
`Destination` and `Amount` to the reviewed `toAddress` / `toAmount`, so the
|
|
13
|
+
bytes being signed match the terms someone approved. That binding assumes
|
|
14
|
+
`Amount` is a delivery.
|
|
15
|
+
|
|
16
|
+
`tfPartialPayment` breaks the assumption. With the flag set, `Amount` becomes a
|
|
17
|
+
maximum: the ledger delivers whatever the chosen path can source and records
|
|
18
|
+
the real figure only in the executed transaction's metadata
|
|
19
|
+
(`delivered_amount`). The reviewed amount is still matched byte for byte and
|
|
20
|
+
still describes nothing the recipient will actually receive, while the sender
|
|
21
|
+
can be charged the full `SendMax`. A cross-currency self-swap — the shape where
|
|
22
|
+
`Destination` is the sender's own address — turns an attractive receive figure
|
|
23
|
+
into dust for the price of the whole `SendMax`.
|
|
24
|
+
|
|
25
|
+
A `DeliverMin` restores a floor only if it actually guarantees the reviewed
|
|
26
|
+
amount: `DeliverMin` must be the same asset as `Amount` (native XRP, or the
|
|
27
|
+
same issued-currency code and issuer) and at least as much value, so a
|
|
28
|
+
partial payment carrying one is forwarded unchanged only when the recipient
|
|
29
|
+
is guaranteed to receive no less than what was reviewed. A `DeliverMin` that
|
|
30
|
+
is merely present and positive — but floors delivery at a fraction of
|
|
31
|
+
`Amount`, or in an unrelated currency — is refused: it satisfies "the field
|
|
32
|
+
is there" while leaving the sender able to pay the full `SendMax` for dust,
|
|
33
|
+
which is the exact outcome this resolver exists to prevent. `Flags` that
|
|
34
|
+
cannot be read as a uint32 — the `{ tfPartialPayment: true }` object form
|
|
35
|
+
some client libraries accept — are refused for the same reason, since they
|
|
36
|
+
may carry the very bit being checked.
|
|
37
|
+
|
|
38
|
+
- Updated dependencies [[`8faa612`](https://github.com/vultisig/vultisig-sdk/commit/8faa612e6358af0a77cebf9c06d8865d832b69df)]:
|
|
39
|
+
- @vultisig/core-chain@2.35.1
|
|
40
|
+
|
|
41
|
+
## 1.19.1
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- [#1813](https://github.com/vultisig/vultisig-sdk/pull/1813) [`aaa3aa9`](https://github.com/vultisig/vultisig-sdk/commit/aaa3aa93b62b6933f09ba8a33d09806d051215b9) Thanks [@Ehsan-saradar](https://github.com/Ehsan-saradar)! - fix(ripple): only declare genuine trust lines as TrustSet
|
|
46
|
+
|
|
47
|
+
`RippleSpecific.transaction_type` was set from the coin's shape alone, but an
|
|
48
|
+
issued-currency Payment has the identical shape — a non-native Ripple coin with
|
|
49
|
+
a `contractAddress`. So sending a token stamped that payload
|
|
50
|
+
`TRANSACTION_TYPE_RIPPLE_TRUST_SET`.
|
|
51
|
+
|
|
52
|
+
That is worse than the ambiguity it was meant to remove. Before the field
|
|
53
|
+
existed, a token send diverged: this SDK built a TrustSet, an iOS co-signer
|
|
54
|
+
built a Payment, and the ceremony failed without signing anything. With the
|
|
55
|
+
field set, every signer agrees to build a TrustSet — so the ceremony _completes_
|
|
56
|
+
over an operation the user never asked for, setting a trust-line limit to the
|
|
57
|
+
amount they meant to send. No funds move, and nothing surfaces it.
|
|
58
|
+
|
|
59
|
+
Declaring is an assertion, so it now requires more than the shape: a TrustSet is
|
|
60
|
+
addressed to the _issuer_, the party being trusted, while a Payment is addressed
|
|
61
|
+
to a recipient.
|
|
62
|
+
|
|
63
|
+
The signing fallback is deliberately left broad. Clients already released infer
|
|
64
|
+
TrustSet from a non-native coin alone, and honouring that inference is what keeps
|
|
65
|
+
a genuine TrustSet byte-identical across a mixed-version committee; narrowing it
|
|
66
|
+
would break MPC parity with every signer in the field. A token send therefore
|
|
67
|
+
returns to diverging safely rather than completing wrongly.
|
|
68
|
+
|
|
69
|
+
- Updated dependencies [[`2e1b8bb`](https://github.com/vultisig/vultisig-sdk/commit/2e1b8bb597d2d0fa052a121ab2757efa228314f5), [`67dd842`](https://github.com/vultisig/vultisig-sdk/commit/67dd8425a10f0c7b7833c02147fc0036e6ee7a64), [`3ea8b2c`](https://github.com/vultisig/vultisig-sdk/commit/3ea8b2c5133a16878991ec33d569fd8498837316)]:
|
|
70
|
+
- @vultisig/core-chain@2.35.0
|
|
71
|
+
|
|
3
72
|
## 1.19.0
|
|
4
73
|
|
|
5
74
|
### Minor Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ripple.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/mpc/keysign/chainSpecific/resolvers/ripple.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAOtD,eAAO,MAAM,2BAA2B,GAAI,oBAAoB,MAAM,GAAG,SAAS,KAAG,MAMpF,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,wBAAwB,CAAC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"ripple.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/mpc/keysign/chainSpecific/resolvers/ripple.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAOtD,eAAO,MAAM,2BAA2B,GAAI,oBAAoB,MAAM,GAAG,SAAS,KAAG,MAMpF,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,wBAAwB,CAAC,gBAAgB,CA8F7E,CAAA"}
|
|
@@ -8,7 +8,7 @@ import { isInError } from '@vultisig/lib-utils/error/isInError';
|
|
|
8
8
|
import { maxBigInt } from '@vultisig/lib-utils/math/maxBigInt';
|
|
9
9
|
import { BuildKeysignPayloadError } from '../../error.js';
|
|
10
10
|
import { getKeysignCoin } from '../../utils/getKeysignCoin.js';
|
|
11
|
-
import {
|
|
11
|
+
import { originatesRippleTrustSet } from '../../utils/isRippleTrustSet.js';
|
|
12
12
|
import { resolveDestinationTag } from '../../utils/rippleDestinationTag.js';
|
|
13
13
|
const minProtocolFee = 15n;
|
|
14
14
|
const baseFeeMultiplier = 2n;
|
|
@@ -81,7 +81,11 @@ export const getRippleChainSpecific = async ({ keysignPayload, destinationTag, }
|
|
|
81
81
|
// or "send this token", and the two sign different bytes — a co-signer that
|
|
82
82
|
// reads the undiscriminated case as a Payment diverges from the TrustSet
|
|
83
83
|
// built here, and the ceremony never completes.
|
|
84
|
-
|
|
84
|
+
//
|
|
85
|
+
// Only genuine originations are declared. Stamping a token send would make
|
|
86
|
+
// every signer agree to build a TrustSet from it, which is worse than the
|
|
87
|
+
// divergence: the ceremony completes over an operation nobody asked for.
|
|
88
|
+
const isTrustSet = originatesRippleTrustSet(keysignPayload);
|
|
85
89
|
return create(RippleSpecificSchema, {
|
|
86
90
|
sequence: BigInt(account_data.Sequence),
|
|
87
91
|
lastLedgerSequence: getRippleLastLedgerSequence(ledgerCurrentIndex),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ripple.js","sourceRoot":"","sources":["../../../../../../../packages/core/mpc/keysign/chainSpecific/resolvers/ripple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAA;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAA;AACtF,OAAO,EACL,oBAAoB,EACpB,eAAe,GAChB,MAAM,qEAAqE,CAAA;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAA;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,MAA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A;IAEhF,4EAA4E;IAC5E,8EAA8E;IAC9E,4EAA4E;IAC5E,yEAAyE;IACzE,gDAAgD;IAChD,EAAE;IACF,2EAA2E;IAC3E,0EAA0E;IAC1E,yEAAyE;IACzE,MAAM,UAAU,GAAG,wBAAwB,CAAC,cAAc,CAAC,CAAA;IAE3D,OAAO,MAAM,CAAC,oBAAoB,EAAE;QAClC,QAAQ,EAAE,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC;QACvC,kBAAkB,EAAE,2BAA2B,CAAC,kBAAkB,CAAC;QACnE,yEAAyE;QACzE,GAAG,EAAE,UAAU;QACf,GAAG,CAAC,uBAAuB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,uBAAuB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7F,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,eAAe,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC7E,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import { FeeAmountResolver } from '../resolver.js';
|
|
2
|
+
/**
|
|
3
|
+
* What an EVM transaction costs its sender's balance: the gas the node holds
|
|
4
|
+
* against it, plus the surcharges an OP-stack rollup adds to the same check.
|
|
5
|
+
*
|
|
6
|
+
* The gas term is `gasLimit * maxFeePerGas` — the worst case the node reserves
|
|
7
|
+
* up front, not the eventual `gasUsed * effectiveGasPrice` — so anything derived
|
|
8
|
+
* from this number stays affordable once the transaction lands.
|
|
9
|
+
*/
|
|
2
10
|
export declare const getEvmFeeAmount: FeeAmountResolver;
|
|
3
11
|
//# sourceMappingURL=evm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/mpc/keysign/fee/resolvers/evm.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/mpc/keysign/fee/resolvers/evm.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAY/C;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,iBAoB7B,CAAA"}
|
|
@@ -1,6 +1,38 @@
|
|
|
1
|
+
import { getOpStackFeeSurcharge } from '@vultisig/core-chain/chains/evm/opStack/getOpStackFeeSurcharge';
|
|
2
|
+
import { isOpStackChain } from '@vultisig/core-chain/chains/evm/opStack/opStackChains';
|
|
3
|
+
import { formatDataToHex } from '@vultisig/lib-utils/formatDataToHex';
|
|
4
|
+
import { size } from 'viem';
|
|
1
5
|
import { getBlockchainSpecificValue } from '../../chainSpecific/KeysignChainSpecific.js';
|
|
2
|
-
|
|
6
|
+
import { getKeysignSwapPayload } from '../../swap/getKeysignSwapPayload.js';
|
|
7
|
+
import { getKeysignChain } from '../../utils/getKeysignChain.js';
|
|
8
|
+
// Mirrors how the EVM chain-specific resolver picks the transaction's `data`, so
|
|
9
|
+
// the bytes the L1 fee is quoted for are the bytes that end up being signed.
|
|
10
|
+
const getCallDataSize = (keysignPayload) => {
|
|
11
|
+
const swapPayload = getKeysignSwapPayload(keysignPayload);
|
|
12
|
+
const swapData = swapPayload && 'general' in swapPayload ? swapPayload.general.quote?.tx?.data : undefined;
|
|
13
|
+
const data = swapData || keysignPayload.memo;
|
|
14
|
+
return data ? size(formatDataToHex(data)) : 0;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* What an EVM transaction costs its sender's balance: the gas the node holds
|
|
18
|
+
* against it, plus the surcharges an OP-stack rollup adds to the same check.
|
|
19
|
+
*
|
|
20
|
+
* The gas term is `gasLimit * maxFeePerGas` — the worst case the node reserves
|
|
21
|
+
* up front, not the eventual `gasUsed * effectiveGasPrice` — so anything derived
|
|
22
|
+
* from this number stays affordable once the transaction lands.
|
|
23
|
+
*/
|
|
24
|
+
export const getEvmFeeAmount = async ({ keysignPayload }) => {
|
|
3
25
|
const { maxFeePerGasWei, gasLimit } = getBlockchainSpecificValue(keysignPayload.blockchainSpecific, 'ethereumSpecific');
|
|
4
|
-
|
|
26
|
+
const gasFee = BigInt(maxFeePerGasWei) * BigInt(gasLimit);
|
|
27
|
+
const chain = getKeysignChain(keysignPayload);
|
|
28
|
+
if (!isOpStackChain(chain)) {
|
|
29
|
+
return gasFee;
|
|
30
|
+
}
|
|
31
|
+
const surcharge = await getOpStackFeeSurcharge({
|
|
32
|
+
chain,
|
|
33
|
+
gasLimit: BigInt(gasLimit),
|
|
34
|
+
callDataSize: getCallDataSize(keysignPayload),
|
|
35
|
+
});
|
|
36
|
+
return gasFee + surcharge;
|
|
5
37
|
};
|
|
6
38
|
//# sourceMappingURL=evm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evm.js","sourceRoot":"","sources":["../../../../../../../packages/core/mpc/keysign/fee/resolvers/evm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAA;
|
|
1
|
+
{"version":3,"file":"evm.js","sourceRoot":"","sources":["../../../../../../../packages/core/mpc/keysign/fee/resolvers/evm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gEAAgE,CAAA;AACvG,OAAO,EAAE,cAAc,EAAE,MAAM,uDAAuD,CAAA;AACtF,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAG3B,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAA;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAA;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAG7D,iFAAiF;AACjF,6EAA6E;AAC7E,MAAM,eAAe,GAAG,CAAC,cAA8B,EAAU,EAAE;IACjE,MAAM,WAAW,GAAG,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1
|
+
{"version":3,"file":"ripple.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/mpc/keysign/signingInputs/resolvers/ripple.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AA4DnD,eAAO,MAAM,sBAAsB,EAAE,qBAAqB,CAAC,QAAQ,CA6NlE,CAAA"}
|
|
@@ -8,6 +8,47 @@ import { getBlockchainSpecificValue } from '../../chainSpecific/KeysignChainSpec
|
|
|
8
8
|
import { getKeysignTwPublicKey } from '../../tw/getKeysignTwPublicKey.js';
|
|
9
9
|
import { isRippleTrustSet } from '../../utils/isRippleTrustSet.js';
|
|
10
10
|
import { getLegacyDestinationTag, resolveDestinationTag } from '../../utils/rippleDestinationTag.js';
|
|
11
|
+
// tfPartialPayment on an XRPL Payment. It redefines `Amount` from a guaranteed
|
|
12
|
+
// delivery into a maximum, leaving `delivered_amount` in the executed
|
|
13
|
+
// transaction's metadata as the only record of what actually moved.
|
|
14
|
+
const tfPartialPayment = 0x00020000;
|
|
15
|
+
const parseXrplAmount = (value) => {
|
|
16
|
+
if (typeof value === 'string') {
|
|
17
|
+
const drops = attempt(() => BigInt(value));
|
|
18
|
+
if ('error' in drops || drops.data <= 0n) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
return { kind: 'native', units: drops.data };
|
|
22
|
+
}
|
|
23
|
+
if (typeof value !== 'object' || value === null) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
const { currency, issuer, value: issuedValue } = value;
|
|
27
|
+
if (typeof currency !== 'string' || typeof issuer !== 'string' || typeof issuedValue !== 'string') {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
const parsed = attempt(() => parseIssuedCurrencyValue(issuedValue));
|
|
31
|
+
if ('error' in parsed || parsed.data <= 0n) {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
const normalizedCurrency = attempt(() => toXrplCurrencyCode(currency));
|
|
35
|
+
if ('error' in normalizedCurrency) {
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
return { kind: 'issued', currency: normalizedCurrency.data, issuer, units: parsed.data };
|
|
39
|
+
};
|
|
40
|
+
// True only if `deliverMin` is the same asset as `amount` (native XRP, or the
|
|
41
|
+
// same issued-currency code + issuer) and exactly matches its value. On XRPL a
|
|
42
|
+
// partial payment's `Amount` is the delivery maximum, so `DeliverMin > Amount`
|
|
43
|
+
// is unsatisfiable rather than a stricter guarantee. A different currency, or a
|
|
44
|
+
// lower/higher floor in the same currency, means the reviewed `toAmount` no
|
|
45
|
+
// longer describes a valid guaranteed outcome.
|
|
46
|
+
const deliverMinExactlyMatchesReviewedAmount = (deliverMin, amount) => {
|
|
47
|
+
if (deliverMin.kind === 'native' || amount.kind === 'native') {
|
|
48
|
+
return deliverMin.kind === 'native' && amount.kind === 'native' && deliverMin.units === amount.units;
|
|
49
|
+
}
|
|
50
|
+
return (deliverMin.currency === amount.currency && deliverMin.issuer === amount.issuer && deliverMin.units === amount.units);
|
|
51
|
+
};
|
|
11
52
|
export const getRippleSigningInputs = ({ keysignPayload }) => {
|
|
12
53
|
const rippleSpecific = getBlockchainSpecificValue(keysignPayload.blockchainSpecific, 'rippleSpecific');
|
|
13
54
|
const { gas, sequence, lastLedgerSequence } = rippleSpecific;
|
|
@@ -20,7 +61,8 @@ export const getRippleSigningInputs = ({ keysignPayload }) => {
|
|
|
20
61
|
// payload's toAddress / toAmount (which cannot describe an offer); this
|
|
21
62
|
// resolver is instead the fail-closed chokepoint that binds the raw
|
|
22
63
|
// transaction to the signing vault (the `Account` check below) and, for
|
|
23
|
-
// Payments, to the reviewed destination and amount
|
|
64
|
+
// Payments, to the reviewed destination and amount — including refusing the
|
|
65
|
+
// flags that would quietly unbind that amount again.
|
|
24
66
|
const getRawJson = () => {
|
|
25
67
|
if (keysignPayload.signData.case !== 'signRipple') {
|
|
26
68
|
return undefined;
|
|
@@ -92,6 +134,33 @@ export const getRippleSigningInputs = ({ keysignPayload }) => {
|
|
|
92
134
|
// Missing Amount (or an unrepresentable encoding) cannot be reviewed.
|
|
93
135
|
throw amountMismatch;
|
|
94
136
|
}
|
|
137
|
+
// The Amount binding just established only means something while Amount
|
|
138
|
+
// is a delivery. tfPartialPayment turns it into a ceiling: the ledger
|
|
139
|
+
// hands over whatever the path can source and records the real figure
|
|
140
|
+
// only in the executed transaction's metadata, so the reviewed toAmount
|
|
141
|
+
// stops describing what the recipient gets while the sender can still be
|
|
142
|
+
// charged the full SendMax. A DeliverMin that merely exists and is
|
|
143
|
+
// positive is not a floor the reviewer approved — a dApp can bind Amount
|
|
144
|
+
// to the reviewed toAmount while DeliverMin permits delivering a dust
|
|
145
|
+
// fraction of it. Only a DeliverMin that guarantees the full reviewed
|
|
146
|
+
// Amount (same asset, at least as much value) restores what the review
|
|
147
|
+
// screen promised; without one there is nothing left to bind, so refuse
|
|
148
|
+
// rather than sign an outcome no reviewer could have seen. Flags we
|
|
149
|
+
// cannot read as a uint32 are refused for the same reason — they may
|
|
150
|
+
// carry the very bit checked here.
|
|
151
|
+
const flags = tx.Flags === undefined ? 0 : tx.Flags;
|
|
152
|
+
if (typeof flags !== 'number' || !Number.isInteger(flags) || flags < 0 || flags > 0xffffffff) {
|
|
153
|
+
throw new Error('signRipple rawJson Flags is not a uint32 bitmask');
|
|
154
|
+
}
|
|
155
|
+
if ((flags & tfPartialPayment) !== 0) {
|
|
156
|
+
const parsedAmount = parseXrplAmount(amount);
|
|
157
|
+
const parsedDeliverMin = parseXrplAmount(tx.DeliverMin);
|
|
158
|
+
if (!parsedAmount ||
|
|
159
|
+
!parsedDeliverMin ||
|
|
160
|
+
!deliverMinExactlyMatchesReviewedAmount(parsedDeliverMin, parsedAmount)) {
|
|
161
|
+
throw new Error('signRipple rawJson sets tfPartialPayment without a DeliverMin that guarantees the reviewed amount');
|
|
162
|
+
}
|
|
163
|
+
}
|
|
95
164
|
}
|
|
96
165
|
return { rawJson };
|
|
97
166
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ripple.js","sourceRoot":"","sources":["../../../../../../../packages/core/mpc/keysign/signingInputs/resolvers/ripple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,mDAAmD,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAA;AAC7C,OAAO,IAAI,MAAM,MAAM,CAAA;AAEvB,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAA;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAA;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAA;AAGjG,MAAM,CAAC,MAAM,sBAAsB,GAAoC,CAAC,EAAE,cAAc,EAAE,EAAE,EAAE;IAC5F,MAAM,cAAc,GAAG,0BAA0B,CAAC,cAAc,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,CAAA;IACtG,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,kBAAkB,EAAE,GAAG,cAAc,CAAA;IAE5D,MAAM,IAAI,GAAG,WAAW,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA;IAEhD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;IAE5B,4EAA4E;IAC5E,6EAA6E;IAC7E,6EAA6E;IAC7E,8EAA8E;IAC9E,wEAAwE;IACxE,oEAAoE;IACpE,wEAAwE;IACxE,
|
|
1
|
+
{"version":3,"file":"ripple.js","sourceRoot":"","sources":["../../../../../../../packages/core/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AA;YAED,OAAO;gBACL,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;aAChC,CAAA;QACH,CAAC;QAED,OAAO;YACL,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,MAAM,CAAC;gBACjD,WAAW,EAAE,cAAc,CAAC,SAAS;gBACrC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,QAAQ,CAAC;gBAChD,GAAG,CAAC,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,IAAI,CAAC,UAAU,CAAC,cAAc,CAAQ,EAAE,CAAC;aACpG,CAAC;SACH,CAAA;IACH,CAAC,CAAA;IAED,MAAM,KAAK,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC;QAChD,OAAO;QACP,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QACpC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;QAC1B,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,CAAC;QAC9C,SAAS,EAAE,qBAAqB,CAAC,cAAc,CAAC;QAChD,GAAG,CAAC,UAAU,EAAE,IAAI,WAAW,EAAE,IAAI,UAAU,EAAE,CAAC;KACnD,CAAC,CAAA;IAEF,OAAO,CAAC,KAAK,CAAC,CAAA;AAChB,CAAC,CAAA"}
|
|
@@ -1,17 +1,35 @@
|
|
|
1
1
|
import { KeysignPayload } from '@vultisig/core-mpc/types/vultisig/keysign/v1/keysign_message_pb';
|
|
2
2
|
/**
|
|
3
|
-
* Whether the payload's shape alone reads as a TrustSet
|
|
3
|
+
* Whether the payload's shape alone reads as a TrustSet — i.e. how every signer
|
|
4
4
|
* that predates `RippleSpecific.transaction_type` decides.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* Deliberately broad, and **only** for the signing fallback. Clients already in
|
|
7
|
+
* the field infer TrustSet from a non-native Ripple coin alone, so honouring
|
|
8
|
+
* that same inference is what keeps a TrustSet byte-identical across a
|
|
9
|
+
* mixed-version committee. Narrowing it would break MPC parity with every
|
|
10
|
+
* signer already released.
|
|
11
|
+
*
|
|
12
|
+
* Do not use this to decide what a payload *is*: an issued-currency Payment has
|
|
13
|
+
* the same shape. Use {@link originatesRippleTrustSet} when originating.
|
|
10
14
|
*
|
|
11
15
|
* A verbatim dApp transaction (`signRipple`) is excluded — it is signed exactly
|
|
12
16
|
* as given and never rebuilt from the coin.
|
|
13
17
|
*/
|
|
14
18
|
export declare const hasRippleTrustSetShape: ({ signData, coin }: KeysignPayload) => boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Whether this payload is being originated as a TrustSet, and so should declare
|
|
21
|
+
* itself one on the wire.
|
|
22
|
+
*
|
|
23
|
+
* Stricter than {@link hasRippleTrustSetShape} because declaring is an
|
|
24
|
+
* assertion, not a guess. A send of an issued currency has the identical coin
|
|
25
|
+
* shape, and stamping that as a TrustSet would make every signer agree to build
|
|
26
|
+
* one — turning what used to be a safe divergence into a completed ceremony
|
|
27
|
+
* over an operation the user never asked for.
|
|
28
|
+
*
|
|
29
|
+
* A TrustSet is addressed to the *issuer*: it is the party being trusted. A
|
|
30
|
+
* Payment is addressed to a recipient. That is what separates them here.
|
|
31
|
+
*/
|
|
32
|
+
export declare const originatesRippleTrustSet: (keysignPayload: KeysignPayload) => boolean;
|
|
15
33
|
/**
|
|
16
34
|
* Whether this Ripple payload describes a TrustSet — opening or modifying a
|
|
17
35
|
* trust line, where the keysign amount is the trust-line LIMIT — rather than a
|
|
@@ -20,13 +38,9 @@ export declare const hasRippleTrustSetShape: ({ signData, coin }: KeysignPayload
|
|
|
20
38
|
* A non-native Ripple coin cannot say this on its own: the same
|
|
21
39
|
* `(currency, issuer)` pair means either operation, and the two produce
|
|
22
40
|
* different signed bytes. `RippleSpecific.transaction_type` states it
|
|
23
|
-
* explicitly, so it wins when present
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* Clients shipped before the field infer TrustSet from a non-native coin alone,
|
|
27
|
-
* so honouring that inference keeps a TrustSet byte-identical across a
|
|
28
|
-
* mixed-version committee. Dropping it would break every signer already in the
|
|
29
|
-
* field.
|
|
41
|
+
* explicitly, so it wins when present, and the shape decides only when it is
|
|
42
|
+
* absent — which is the mixed-version case documented on
|
|
43
|
+
* {@link hasRippleTrustSetShape}.
|
|
30
44
|
*/
|
|
31
45
|
export declare const isRippleTrustSet: (keysignPayload: KeysignPayload) => boolean;
|
|
32
46
|
//# sourceMappingURL=isRippleTrustSet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRippleTrustSet.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/mpc/keysign/utils/isRippleTrustSet.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isRippleTrustSet.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/mpc/keysign/utils/isRippleTrustSet.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iEAAiE,CAAA;AAMhG;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,sBAAsB,GAAI,oBAAoB,cAAc,KAAG,OACe,CAAA;AAE3F;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB,GAAI,gBAAgB,cAAc,KAAG,OASzE,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,GAAI,gBAAgB,cAAc,KAAG,OAQjE,CAAA"}
|
|
@@ -1,18 +1,45 @@
|
|
|
1
|
+
import { parseRippleTokenId } from '@vultisig/core-chain/chains/ripple/issuedCurrency';
|
|
2
|
+
import { attempt } from '@vultisig/lib-utils/attempt';
|
|
1
3
|
import { TransactionType } from '../../types/vultisig/keysign/v1/blockchain_specific_pb.js';
|
|
2
4
|
import { getBlockchainSpecificValue } from '../chainSpecific/KeysignChainSpecific.js';
|
|
3
5
|
/**
|
|
4
|
-
* Whether the payload's shape alone reads as a TrustSet
|
|
6
|
+
* Whether the payload's shape alone reads as a TrustSet — i.e. how every signer
|
|
5
7
|
* that predates `RippleSpecific.transaction_type` decides.
|
|
6
8
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* Deliberately broad, and **only** for the signing fallback. Clients already in
|
|
10
|
+
* the field infer TrustSet from a non-native Ripple coin alone, so honouring
|
|
11
|
+
* that same inference is what keeps a TrustSet byte-identical across a
|
|
12
|
+
* mixed-version committee. Narrowing it would break MPC parity with every
|
|
13
|
+
* signer already released.
|
|
14
|
+
*
|
|
15
|
+
* Do not use this to decide what a payload *is*: an issued-currency Payment has
|
|
16
|
+
* the same shape. Use {@link originatesRippleTrustSet} when originating.
|
|
11
17
|
*
|
|
12
18
|
* A verbatim dApp transaction (`signRipple`) is excluded — it is signed exactly
|
|
13
19
|
* as given and never rebuilt from the coin.
|
|
14
20
|
*/
|
|
15
21
|
export const hasRippleTrustSetShape = ({ signData, coin }) => signData.case !== 'signRipple' && !!coin && !coin.isNativeToken && !!coin.contractAddress;
|
|
22
|
+
/**
|
|
23
|
+
* Whether this payload is being originated as a TrustSet, and so should declare
|
|
24
|
+
* itself one on the wire.
|
|
25
|
+
*
|
|
26
|
+
* Stricter than {@link hasRippleTrustSetShape} because declaring is an
|
|
27
|
+
* assertion, not a guess. A send of an issued currency has the identical coin
|
|
28
|
+
* shape, and stamping that as a TrustSet would make every signer agree to build
|
|
29
|
+
* one — turning what used to be a safe divergence into a completed ceremony
|
|
30
|
+
* over an operation the user never asked for.
|
|
31
|
+
*
|
|
32
|
+
* A TrustSet is addressed to the *issuer*: it is the party being trusted. A
|
|
33
|
+
* Payment is addressed to a recipient. That is what separates them here.
|
|
34
|
+
*/
|
|
35
|
+
export const originatesRippleTrustSet = (keysignPayload) => {
|
|
36
|
+
if (!hasRippleTrustSetShape(keysignPayload)) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
const { coin, toAddress } = keysignPayload;
|
|
40
|
+
const issuer = attempt(() => parseRippleTokenId(coin?.contractAddress ?? '').issuer);
|
|
41
|
+
return 'data' in issuer && issuer.data === toAddress;
|
|
42
|
+
};
|
|
16
43
|
/**
|
|
17
44
|
* Whether this Ripple payload describes a TrustSet — opening or modifying a
|
|
18
45
|
* trust line, where the keysign amount is the trust-line LIMIT — rather than a
|
|
@@ -21,13 +48,9 @@ export const hasRippleTrustSetShape = ({ signData, coin }) => signData.case !==
|
|
|
21
48
|
* A non-native Ripple coin cannot say this on its own: the same
|
|
22
49
|
* `(currency, issuer)` pair means either operation, and the two produce
|
|
23
50
|
* different signed bytes. `RippleSpecific.transaction_type` states it
|
|
24
|
-
* explicitly, so it wins when present
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* Clients shipped before the field infer TrustSet from a non-native coin alone,
|
|
28
|
-
* so honouring that inference keeps a TrustSet byte-identical across a
|
|
29
|
-
* mixed-version committee. Dropping it would break every signer already in the
|
|
30
|
-
* field.
|
|
51
|
+
* explicitly, so it wins when present, and the shape decides only when it is
|
|
52
|
+
* absent — which is the mixed-version case documented on
|
|
53
|
+
* {@link hasRippleTrustSetShape}.
|
|
31
54
|
*/
|
|
32
55
|
export const isRippleTrustSet = (keysignPayload) => {
|
|
33
56
|
const { transactionType } = getBlockchainSpecificValue(keysignPayload.blockchainSpecific, 'rippleSpecific');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRippleTrustSet.js","sourceRoot":"","sources":["../../../../../../packages/core/mpc/keysign/utils/isRippleTrustSet.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isRippleTrustSet.js","sourceRoot":"","sources":["../../../../../../packages/core/mpc/keysign/utils/isRippleTrustSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mDAAm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+9,7 @@ export const generateSignature = ({ walletCore, signature, signatureFormat }) =>
|
|
|
9
9
|
return new Uint8Array([...r, ...s, ...recovery_id]);
|
|
10
10
|
},
|
|
11
11
|
raw: () => {
|
|
12
|
-
const { r, s } = recordMap(pick(signature, ['r', 's']), value => walletCore.HexCoding.decode(value)
|
|
12
|
+
const { r, s } = recordMap(pick(signature, ['r', 's']), value => walletCore.HexCoding.decode(value));
|
|
13
13
|
return new Uint8Array([...r, ...s]);
|
|
14
14
|
},
|
|
15
15
|
der: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateSignature.js","sourceRoot":"","sources":["../../../../../../packages/core/mpc/tx/signature/generateSignature.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAA;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAWhE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAS,EAAE,EAAE;IACrF,OAAO,KAAK,CAAC,eAAe,EAAE;QAC5B,iBAAiB,EAAE,GAAG,EAAE;YACtB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,GAAG,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAC5G,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CACnC,CAAA;YAED,OAAO,IAAI,UAAU,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,WAAW,CAAC,CAAC,CAAA;QACrD,CAAC;QACD,GAAG,EAAE,GAAG,EAAE;YACR,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,SAAS,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"generateSignature.js","sourceRoot":"","sources":["../../../../../../packages/core/mpc/tx/signature/generateSignature.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAA;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAWhE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAS,EAAE,EAAE;IACrF,OAAO,KAAK,CAAC,eAAe,EAAE;QAC5B,iBAAiB,EAAE,GAAG,EAAE;YACtB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,GAAG,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAC5G,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CACnC,CAAA;YAED,OAAO,IAAI,UAAU,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,WAAW,CAAC,CAAC,CAAA;QACrD,CAAC;QACD,GAAG,EAAE,GAAG,EAAE;YACR,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,SAAS,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;YAEpG,OAAO,IAAI,UAAU,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAA;QACrC,CAAC;QACD,GAAG,EAAE,GAAG,EAAE;YACR,OAAO,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,CAAA;QAC7D,CAAC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vultisig/core-mpc",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.2",
|
|
4
4
|
"description": "MPC, keysign, and vault types shared across Vultisig clients",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -1094,7 +1094,7 @@
|
|
|
1094
1094
|
"@noble/hashes": "^1.8.0",
|
|
1095
1095
|
"@solana/web3.js": "^1.98.4",
|
|
1096
1096
|
"@trustwallet/wallet-core": "^4.7.0",
|
|
1097
|
-
"@vultisig/core-chain": "2.
|
|
1097
|
+
"@vultisig/core-chain": "2.35.1",
|
|
1098
1098
|
"@vultisig/core-config": "0.9.1",
|
|
1099
1099
|
"@vultisig/lib-dkls": "0.9.0",
|
|
1100
1100
|
"@vultisig/lib-mldsa": "0.9.0",
|