@anywalletkit/protocol-swap2-omniston 0.5.4 → 0.5.5
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/README.md +72 -4
- package/dist/activity.cjs +4 -1
- package/dist/activity.cjs.map +1 -1
- package/dist/activity.d.cts +7 -1
- package/dist/activity.d.ts +7 -1
- package/dist/activity.js +1 -1
- package/dist/{chunk-AIWAM7BS.js → chunk-ENAEOF7N.js} +5 -2
- package/dist/chunk-ENAEOF7N.js.map +1 -0
- package/dist/{chunk-4JOTKQOT.js → chunk-FDSTD34Z.js} +10 -3
- package/dist/{chunk-4JOTKQOT.js.map → chunk-FDSTD34Z.js.map} +1 -1
- package/dist/chunk-IDRZHWWL.js +74 -0
- package/dist/chunk-IDRZHWWL.js.map +1 -0
- package/dist/{chunk-2E6CVWD6.js → chunk-IX4NF2J7.js} +2 -2
- package/dist/index.cjs +49 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/protocol.cjs +11 -1
- package/dist/protocol.cjs.map +1 -1
- package/dist/protocol.d.cts +1 -1
- package/dist/protocol.d.ts +1 -1
- package/dist/protocol.js +4 -4
- package/dist/{provider-CcCZB-Cj.d.cts → provider-BQzNkVvW.d.cts} +18 -2
- package/dist/{provider-CcCZB-Cj.d.ts → provider-BQzNkVvW.d.ts} +18 -2
- package/dist/provider.cjs +49 -2
- package/dist/provider.cjs.map +1 -1
- package/dist/provider.d.cts +1 -1
- package/dist/provider.d.ts +1 -1
- package/dist/provider.js +3 -3
- package/dist/validators.cjs +56 -3
- package/dist/validators.cjs.map +1 -1
- package/dist/validators.d.cts +1 -1
- package/dist/validators.d.ts +1 -1
- package/dist/validators.js +19 -3
- package/dist/validators.js.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-AIWAM7BS.js.map +0 -1
- package/dist/chunk-JWYDIW4V.js +0 -37
- package/dist/chunk-JWYDIW4V.js.map +0 -1
- /package/dist/{chunk-2E6CVWD6.js.map → chunk-IX4NF2J7.js.map} +0 -0
package/dist/provider.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as AssetId, C as ChainAddress, E as EscrowMessage, H as HtlcSecretStore, O as ObservableLike, a as OmnistonClientLike, b as OmnistonProviderOptions, c as OmnistonQuote, d as OmnistonQuoteStore, e as OrderEvent, f as OrderExecution, g as OrderSettlement, h as OrderSnapshot, Q as QuoteRequest, R as RfqEvent, S as SwapSettlement, i as SwapTrackEvent, T as TON_SWAP_PROTOCOL_LAYOUTS, j as TonSwapCheckInput, k as TonSwapCheckResult, l as TonSwapLeg, m as TonSwapPayloadError, n as checkTonSwapPayload, o as encodeTypedMessage, p as inMemoryQuoteStore, q as inMemorySecretStore, r as omnistonPins, s as omnistonProvider, t as omnistonVerifyBuild, v as validateEvmToTonOrderExtension, u as validateEvmTypedOrder } from './provider-
|
|
1
|
+
export { A as AssetId, C as ChainAddress, E as EscrowMessage, H as HtlcSecretStore, O as ObservableLike, a as OmnistonClientLike, b as OmnistonProviderOptions, c as OmnistonQuote, d as OmnistonQuoteStore, e as OrderEvent, f as OrderExecution, g as OrderSettlement, h as OrderSnapshot, Q as QuoteRequest, R as RfqEvent, S as SwapSettlement, i as SwapTrackEvent, T as TON_SWAP_PROTOCOL_LAYOUTS, j as TonSwapCheckInput, k as TonSwapCheckResult, l as TonSwapLeg, m as TonSwapPayloadError, n as checkTonSwapPayload, o as encodeTypedMessage, p as inMemoryQuoteStore, q as inMemorySecretStore, r as omnistonPins, s as omnistonProvider, t as omnistonVerifyBuild, v as validateEvmToTonOrderExtension, u as validateEvmTypedOrder } from './provider-BQzNkVvW.cjs';
|
|
2
2
|
import '@anywalletkit/protocol-swap2-core/types';
|
package/dist/provider.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as AssetId, C as ChainAddress, E as EscrowMessage, H as HtlcSecretStore, O as ObservableLike, a as OmnistonClientLike, b as OmnistonProviderOptions, c as OmnistonQuote, d as OmnistonQuoteStore, e as OrderEvent, f as OrderExecution, g as OrderSettlement, h as OrderSnapshot, Q as QuoteRequest, R as RfqEvent, S as SwapSettlement, i as SwapTrackEvent, T as TON_SWAP_PROTOCOL_LAYOUTS, j as TonSwapCheckInput, k as TonSwapCheckResult, l as TonSwapLeg, m as TonSwapPayloadError, n as checkTonSwapPayload, o as encodeTypedMessage, p as inMemoryQuoteStore, q as inMemorySecretStore, r as omnistonPins, s as omnistonProvider, t as omnistonVerifyBuild, v as validateEvmToTonOrderExtension, u as validateEvmTypedOrder } from './provider-
|
|
1
|
+
export { A as AssetId, C as ChainAddress, E as EscrowMessage, H as HtlcSecretStore, O as ObservableLike, a as OmnistonClientLike, b as OmnistonProviderOptions, c as OmnistonQuote, d as OmnistonQuoteStore, e as OrderEvent, f as OrderExecution, g as OrderSettlement, h as OrderSnapshot, Q as QuoteRequest, R as RfqEvent, S as SwapSettlement, i as SwapTrackEvent, T as TON_SWAP_PROTOCOL_LAYOUTS, j as TonSwapCheckInput, k as TonSwapCheckResult, l as TonSwapLeg, m as TonSwapPayloadError, n as checkTonSwapPayload, o as encodeTypedMessage, p as inMemoryQuoteStore, q as inMemorySecretStore, r as omnistonPins, s as omnistonProvider, t as omnistonVerifyBuild, v as validateEvmToTonOrderExtension, u as validateEvmTypedOrder } from './provider-BQzNkVvW.js';
|
|
2
2
|
import '@anywalletkit/protocol-swap2-core/types';
|
package/dist/provider.js
CHANGED
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
omnistonVerifyBuild,
|
|
11
11
|
validateEvmToTonOrderExtension,
|
|
12
12
|
validateEvmTypedOrder
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FDSTD34Z.js";
|
|
14
14
|
import "./chunk-QDXFC6BC.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-ENAEOF7N.js";
|
|
16
|
+
import "./chunk-IDRZHWWL.js";
|
|
17
17
|
export {
|
|
18
18
|
TON_SWAP_PROTOCOL_LAYOUTS,
|
|
19
19
|
TonSwapPayloadError,
|
package/dist/validators.cjs
CHANGED
|
@@ -594,7 +594,44 @@ var import_core3 = require("@anywalletkit/core");
|
|
|
594
594
|
|
|
595
595
|
// src/validators/settlement.ts
|
|
596
596
|
var AUDITED_OMNISTON_SETTLEMENT_CONTRACTS = {
|
|
597
|
-
|
|
597
|
+
// The TON Escrow Minter a new TON <-> EVM order may name. The provider
|
|
598
|
+
// compares TON addresses as these exact strings, so it is kept in the form
|
|
599
|
+
// Omniston's quotes use.
|
|
600
|
+
// - EQDybO88… (code 9737943f…, "rev2"): Omniston's TON <-> EVM quotes name it
|
|
601
|
+
// since 2026-11-10 ~19:00Z. Reviewed 2026-11-12, read-only:
|
|
602
|
+
// - Deploy tx fkabfHcN8DcrqQyazmlB+UprljBDeEkvFlgaVOi905g=
|
|
603
|
+
// (2026-11-10 18:47:06Z). Code and data still equal that StateInit:
|
|
604
|
+
// no upgrade since, none pending (no pendingCode, upgradeAfter 0).
|
|
605
|
+
// - Same admin (0:408fff62…) as rev1; it is also the admin_address of the
|
|
606
|
+
// STON.fi DEX v2 routers api.ston.fi lists. Deployed from the same
|
|
607
|
+
// wallet as rev1 (a weak signal on TON: anyone can send a StateInit).
|
|
608
|
+
// - The bytecode diff to rev1: escrow / execution code must be in an
|
|
609
|
+
// embedded whitelist (9e77…, f6ed…, d304…, pinned in ton.ts, plus 9fe4…
|
|
610
|
+
// for TON <-> TON, which the SDK does not pin), the escrow sub-VM must
|
|
611
|
+
// return one value, and a failed position deploy now credits the amount
|
|
612
|
+
// back to the same account contract instead of aborting (the only new
|
|
613
|
+
// path that moves value; no real message has used it). Fees, timelocks,
|
|
614
|
+
// payouts, admin and the 7-day upgrade delay are unchanged. Replayed
|
|
615
|
+
// through both codes, the real traffic of both minters (~42k
|
|
616
|
+
// transactions) and of ~1,070 of their positions gave the same outputs.
|
|
617
|
+
// - It deploys positions with code eb503578…, the only code in
|
|
618
|
+
// DEFAULT_OMNISTON_TON_CODE_HASHES.position. The address and that pin
|
|
619
|
+
// go together: without the pin every EVM -> TON order on this minter
|
|
620
|
+
// fills and then fails the disclosure check.
|
|
621
|
+
// - EQAbWJ3Y… (code f91c43d3…, "rev1", deployed 2026-06-09) is no longer
|
|
622
|
+
// trusted by default (2026-11-12). Omniston's quotes moved to rev2 on
|
|
623
|
+
// 2026-11-10 (rev1 still took a few orders on 2026-11-12), and rev1 lacks the escrow-code whitelist rev2 added: on
|
|
624
|
+
// rev1 only the SDK's own pins check the escrow and execution code an
|
|
625
|
+
// order carries. A quote that names rev1 is refused with its address
|
|
626
|
+
// in the reason, and so is building one cached under an older table; its positions (code e4d5115a…) fail
|
|
627
|
+
// position-code-hash. It stays in OMNISTON_ESCROWS (activity.ts), which
|
|
628
|
+
// recognizes history and grants no trust. Old orders need nothing from
|
|
629
|
+
// this table: trackIntent reads no trust table, and every disclosure
|
|
630
|
+
// check refuses a quote older than 6 h, so a rev1 order quoted before
|
|
631
|
+
// the switch cannot be closed by any version. Listing rev1 here or in
|
|
632
|
+
// trustedProtocolAddresses trusts it again for NEW orders; it does not
|
|
633
|
+
// help close an old one.
|
|
634
|
+
"ton:-239": ["EQDybO88l2lrrAmALRUqpmgEE_tuxk510F4Yd4xjbQZxC9IA"],
|
|
598
635
|
"eip155:1": ["0xafCF681272AF10959736f45616eeCBC22D7095E2"],
|
|
599
636
|
"eip155:56": ["0xafCF681272AF10959736f45616eeCBC22D7095E2"],
|
|
600
637
|
"eip155:137": ["0x41A392062A4307a6961d48e30FF20bF6823715B8"],
|
|
@@ -636,8 +673,24 @@ var DEFAULT_OMNISTON_TON_CODE_HASHES = {
|
|
|
636
673
|
authorityKeys: ["ed210da12aa96ea42de4f2f61dc172bbaa3da86051a1b2a6f342f69a777d2770"],
|
|
637
674
|
/** EVM→TON output position: the contract the factory deploys for the
|
|
638
675
|
* resolver's jetton lock (observed on every resolver-created position,
|
|
639
|
-
* 2026-10-15/16), and the escrow code cell it carries in its state.
|
|
640
|
-
position
|
|
676
|
+
* 2026-10-15/16), and the escrow code cell it carries in its state.
|
|
677
|
+
* A position counts only when a trusted factory itself sent its deploy
|
|
678
|
+
* message, and a minter deploys only the position code stored in its own
|
|
679
|
+
* data, so this list follows the trusted minters in
|
|
680
|
+
* AUDITED_OMNISTON_SETTLEMENT_CONTRACTS["ton:-239"]:
|
|
681
|
+
* - eb503578…: positions of the rev2 Escrow Minter EQDybO88… (the position
|
|
682
|
+
* code stored in its data; reviewed 2026-11-12). The diff to rev1's
|
|
683
|
+
* e4d5115a… is 13 sub-VM calls in another mode (RUNVMX 20 -> 276) and 2
|
|
684
|
+
* escrow-code whitelist checks. The state layout is the same, and live
|
|
685
|
+
* and settled rev2 positions pass every check of
|
|
686
|
+
* validateTonOutputPosition.
|
|
687
|
+
* - e4d5115a… (positions of the rev1 minter EQAbWJ3Y…) left the default
|
|
688
|
+
* with rev1 on 2026-11-12. Only an EVM -> TON order quoted on rev1 less
|
|
689
|
+
* than 6 h before an app upgrades can still need it (positionCodeHashes
|
|
690
|
+
* with both codes, until those 6 h are over). That pin alone trusts no
|
|
691
|
+
* new order: a new quote must name a trusted minter, and a position
|
|
692
|
+
* counts only when the minter its quote named deployed it. */
|
|
693
|
+
position: ["eb503578b4d9cd791c9c0ecd0da6da4064aae2bcb19d3c924d4001c493386bc5"],
|
|
641
694
|
outputEscrow: ["d30423575384773abaad8d3c6f763898afa3d57a5693005904b7c61e95cee630"]
|
|
642
695
|
};
|
|
643
696
|
var POSITION_DEPLOY_OP = "0xf240cd30";
|