@anywalletkit/protocol-swap2-omniston 0.3.1 → 0.5.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/README.md +20 -4
- package/dist/{chunk-HOTFZYSW.js → chunk-2DGCZD5K.js} +214 -62
- package/dist/chunk-2DGCZD5K.js.map +1 -0
- package/dist/{chunk-RW4XZWNC.js → chunk-4MKR2SUZ.js} +2 -2
- package/dist/chunk-JWYDIW4V.js +37 -0
- package/dist/chunk-JWYDIW4V.js.map +1 -0
- package/dist/index.cjs +241 -61
- 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 +3 -2
- package/dist/protocol.cjs +108 -52
- 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 +3 -2
- package/dist/{provider-BBG2zhpu.d.cts → provider-CcCZB-Cj.d.cts} +15 -5
- package/dist/{provider-BBG2zhpu.d.ts → provider-CcCZB-Cj.d.ts} +15 -5
- package/dist/provider.cjs +241 -61
- 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 +2 -1
- package/dist/validators.d.cts +1 -1
- package/dist/validators.d.ts +1 -1
- package/dist/validators.js +5 -34
- package/dist/validators.js.map +1 -1
- package/package.json +5 -5
- package/dist/chunk-HOTFZYSW.js.map +0 -1
- /package/dist/{chunk-RW4XZWNC.js.map → chunk-4MKR2SUZ.js.map} +0 -0
package/dist/protocol.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _anywalletkit_protocol_swap2_core_types from '@anywalletkit/protocol-swap2-core/types';
|
|
2
2
|
import { SingleProviderSwap2 } from '@anywalletkit/protocol-swap2-core/swap2/single';
|
|
3
3
|
import { Swap2EngineConfig, Swap2Account } from '@anywalletkit/protocol-swap2-core/swap2/base';
|
|
4
|
-
import { b as OmnistonProviderOptions } from './provider-
|
|
4
|
+
import { b as OmnistonProviderOptions } from './provider-CcCZB-Cj.cjs';
|
|
5
5
|
|
|
6
6
|
interface OmnistonSwap2Config extends Swap2EngineConfig, OmnistonProviderOptions {
|
|
7
7
|
}
|
package/dist/protocol.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _anywalletkit_protocol_swap2_core_types from '@anywalletkit/protocol-swap2-core/types';
|
|
2
2
|
import { SingleProviderSwap2 } from '@anywalletkit/protocol-swap2-core/swap2/single';
|
|
3
3
|
import { Swap2EngineConfig, Swap2Account } from '@anywalletkit/protocol-swap2-core/swap2/base';
|
|
4
|
-
import { b as OmnistonProviderOptions } from './provider-
|
|
4
|
+
import { b as OmnistonProviderOptions } from './provider-CcCZB-Cj.js';
|
|
5
5
|
|
|
6
6
|
interface OmnistonSwap2Config extends Swap2EngineConfig, OmnistonProviderOptions {
|
|
7
7
|
}
|
package/dist/protocol.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OmnistonSwap2Protocol
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-4MKR2SUZ.js";
|
|
4
|
+
import "./chunk-2DGCZD5K.js";
|
|
5
5
|
import "./chunk-QDXFC6BC.js";
|
|
6
6
|
import "./chunk-AIWAM7BS.js";
|
|
7
|
+
import "./chunk-JWYDIW4V.js";
|
|
7
8
|
export {
|
|
8
9
|
OmnistonSwap2Protocol
|
|
9
10
|
};
|
|
@@ -530,10 +530,12 @@ interface OmnistonProviderOptions {
|
|
|
530
530
|
* swap body depends on — that a STON.fi hop's ask wallet is its router's
|
|
531
531
|
* wallet of the quoted output (and, for native input, that the pTON wallet
|
|
532
532
|
* the message pays belongs to that router), or that a DeDust pool trades the
|
|
533
|
-
* quoted pair. `createOmnistonTonValidators` supplies it.
|
|
534
|
-
*
|
|
535
|
-
*
|
|
536
|
-
*
|
|
533
|
+
* quoted pair. `createOmnistonTonValidators` supplies it. Required, with
|
|
534
|
+
* `validateTonSwapTarget`, to advertise same-chain TON swaps (scan
|
|
535
|
+
* 2026-10-30 F8: without it a genuine DEX body can pay out a token other
|
|
536
|
+
* than the quoted one). Only `tonSwapPayloadCheck: "report"` lets a host run
|
|
537
|
+
* without it — each unverified leg is then traced as `ton-swap-payload
|
|
538
|
+
* legs-unverified`; STON.fi v1 native input (pTON v1) is refused regardless.
|
|
537
539
|
*/
|
|
538
540
|
validateTonSwapLeg?: (leg: TonSwapLeg) => Promise<boolean> | boolean;
|
|
539
541
|
/**
|
|
@@ -751,13 +753,17 @@ declare function omnistonPins(trustedEvmOrderProtocols: Readonly<Record<string,
|
|
|
751
753
|
* validators (`validateTonSwapTarget`, `validateTonSwapLeg`);
|
|
752
754
|
* - a TON → EVM escrow body (an Omniston order from TON) goes to `verifyTonEscrowBuild` with what the app knows: the
|
|
753
755
|
* input, the trader's TON address, the destination chain, address and token, and the quote's minimum delivery.
|
|
754
|
-
* EVM typed
|
|
756
|
+
* - an EVM typed order (EVM → TON, EVM → EVM) is opened with the order extension the build carries: price, receiver,
|
|
757
|
+
* traits, salt and the escrow terms are checked against the app's request and the audited contracts
|
|
758
|
+
* (`trustedEvmOrderProtocols`, `trustedSettlementContracts`; default the audited tables), scan 2026-10-28 F6.
|
|
759
|
+
* The reason it fails, or null.
|
|
755
760
|
*/
|
|
756
761
|
declare function omnistonVerifyBuild(hooks: {
|
|
757
762
|
validateTonSwapTarget: (input: {
|
|
758
763
|
address: string;
|
|
759
764
|
protocols: readonly string[];
|
|
760
765
|
}) => Promise<boolean> | boolean;
|
|
766
|
+
/** The DEX pays out the quoted token (`createOmnistonTonValidators().validateTonSwapLeg`). Without it a TON swap body is refused. */
|
|
761
767
|
validateTonSwapLeg?: (leg: TonSwapLeg) => Promise<boolean> | boolean;
|
|
762
768
|
/**
|
|
763
769
|
* The app's check of a TON → EVM escrow body (`createOmnistonTonValidators().verifyTonEscrowBuild`). Without it a
|
|
@@ -766,6 +772,10 @@ declare function omnistonVerifyBuild(hooks: {
|
|
|
766
772
|
verifyTonEscrowBuild?: (input: TonEscrowBuildExpectation) => string | null | Promise<string | null>;
|
|
767
773
|
/** The integrator your backend's Omniston provider uses: the only referral a body may name. */
|
|
768
774
|
integratorAddress?: string | null;
|
|
775
|
+
/** EVM order protocols an EVM typed order may name, per chain. Default `AUDITED_OMNISTON_EVM_ORDER_PROTOCOLS`. */
|
|
776
|
+
trustedEvmOrderProtocols?: Readonly<Record<string, readonly string[]>>;
|
|
777
|
+
/** Escrow factories an EVM order's extension may target, per chain. Default `AUDITED_OMNISTON_SETTLEMENT_CONTRACTS`. */
|
|
778
|
+
trustedSettlementContracts?: Readonly<Record<string, readonly string[]>>;
|
|
769
779
|
}): (quote: Quote, tx: UnsignedTx, params?: QuoteParams) => Promise<string | null>;
|
|
770
780
|
declare function omnistonProvider(opts?: OmnistonProviderOptions): CrossChainProvider;
|
|
771
781
|
|
|
@@ -530,10 +530,12 @@ interface OmnistonProviderOptions {
|
|
|
530
530
|
* swap body depends on — that a STON.fi hop's ask wallet is its router's
|
|
531
531
|
* wallet of the quoted output (and, for native input, that the pTON wallet
|
|
532
532
|
* the message pays belongs to that router), or that a DeDust pool trades the
|
|
533
|
-
* quoted pair. `createOmnistonTonValidators` supplies it.
|
|
534
|
-
*
|
|
535
|
-
*
|
|
536
|
-
*
|
|
533
|
+
* quoted pair. `createOmnistonTonValidators` supplies it. Required, with
|
|
534
|
+
* `validateTonSwapTarget`, to advertise same-chain TON swaps (scan
|
|
535
|
+
* 2026-10-30 F8: without it a genuine DEX body can pay out a token other
|
|
536
|
+
* than the quoted one). Only `tonSwapPayloadCheck: "report"` lets a host run
|
|
537
|
+
* without it — each unverified leg is then traced as `ton-swap-payload
|
|
538
|
+
* legs-unverified`; STON.fi v1 native input (pTON v1) is refused regardless.
|
|
537
539
|
*/
|
|
538
540
|
validateTonSwapLeg?: (leg: TonSwapLeg) => Promise<boolean> | boolean;
|
|
539
541
|
/**
|
|
@@ -751,13 +753,17 @@ declare function omnistonPins(trustedEvmOrderProtocols: Readonly<Record<string,
|
|
|
751
753
|
* validators (`validateTonSwapTarget`, `validateTonSwapLeg`);
|
|
752
754
|
* - a TON → EVM escrow body (an Omniston order from TON) goes to `verifyTonEscrowBuild` with what the app knows: the
|
|
753
755
|
* input, the trader's TON address, the destination chain, address and token, and the quote's minimum delivery.
|
|
754
|
-
* EVM typed
|
|
756
|
+
* - an EVM typed order (EVM → TON, EVM → EVM) is opened with the order extension the build carries: price, receiver,
|
|
757
|
+
* traits, salt and the escrow terms are checked against the app's request and the audited contracts
|
|
758
|
+
* (`trustedEvmOrderProtocols`, `trustedSettlementContracts`; default the audited tables), scan 2026-10-28 F6.
|
|
759
|
+
* The reason it fails, or null.
|
|
755
760
|
*/
|
|
756
761
|
declare function omnistonVerifyBuild(hooks: {
|
|
757
762
|
validateTonSwapTarget: (input: {
|
|
758
763
|
address: string;
|
|
759
764
|
protocols: readonly string[];
|
|
760
765
|
}) => Promise<boolean> | boolean;
|
|
766
|
+
/** The DEX pays out the quoted token (`createOmnistonTonValidators().validateTonSwapLeg`). Without it a TON swap body is refused. */
|
|
761
767
|
validateTonSwapLeg?: (leg: TonSwapLeg) => Promise<boolean> | boolean;
|
|
762
768
|
/**
|
|
763
769
|
* The app's check of a TON → EVM escrow body (`createOmnistonTonValidators().verifyTonEscrowBuild`). Without it a
|
|
@@ -766,6 +772,10 @@ declare function omnistonVerifyBuild(hooks: {
|
|
|
766
772
|
verifyTonEscrowBuild?: (input: TonEscrowBuildExpectation) => string | null | Promise<string | null>;
|
|
767
773
|
/** The integrator your backend's Omniston provider uses: the only referral a body may name. */
|
|
768
774
|
integratorAddress?: string | null;
|
|
775
|
+
/** EVM order protocols an EVM typed order may name, per chain. Default `AUDITED_OMNISTON_EVM_ORDER_PROTOCOLS`. */
|
|
776
|
+
trustedEvmOrderProtocols?: Readonly<Record<string, readonly string[]>>;
|
|
777
|
+
/** Escrow factories an EVM order's extension may target, per chain. Default `AUDITED_OMNISTON_SETTLEMENT_CONTRACTS`. */
|
|
778
|
+
trustedSettlementContracts?: Readonly<Record<string, readonly string[]>>;
|
|
769
779
|
}): (quote: Quote, tx: UnsignedTx, params?: QuoteParams) => Promise<string | null>;
|
|
770
780
|
declare function omnistonProvider(opts?: OmnistonProviderOptions): CrossChainProvider;
|
|
771
781
|
|