OmnistonSwap2Config
Defined in: protocol-swap2-omniston/src/protocol.ts:7
Extends
Section titled “Extends”Swap2EngineConfig.OmnistonProviderOptions
Properties
Section titled “Properties”accountChain?
Section titled “accountChain?”
optionalaccountChain?:string
Defined in: protocol-swap2-core/dist/swap2/base.d.ts:66
Optional account chain identity when the account does not expose a provider.
Inherited from
Section titled “Inherited from”Swap2EngineConfig.accountChain
allowUnlistedTokens?
Section titled “allowUnlistedTokens?”
optionalallowUnlistedTokens?:boolean
Defined in: protocol-swap2-core/dist/swap2/base.d.ts:107
Accept tokens the swap catalog does not list, named by their contract (EVM) or mint (Solana):
tokens the user added at their own risk. Off by default. The source token’s decimals are read
with the account’s getTokenInfo (a fromTokenDecimals that disagrees is refused); an account
without it must be given fromTokenDecimals. Only providers that trade any token (LI.FI,
Uniswap, Balancer, Fynd, Jupiter) quote them, and they have no USD value: the router cannot
judge their price, so show the user the amounts.
Inherited from
Section titled “Inherited from”Swap2EngineConfig.allowUnlistedTokens
apiUrl?
Section titled “apiUrl?”
optionalapiUrl?:string
Defined in: protocol-swap2-omniston/src/provider.ts:335
WebSocket API URL; defaults to the public ston.fi endpoint.
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.apiUrl
client?
Section titled “client?”
optionalclient?:OmnistonClientLike
Defined in: protocol-swap2-omniston/src/provider.ts:333
Injected SDK client (tests); defaults to a lazy new Omniston({apiUrl}).
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.client
closeInjectedClient?
Section titled “closeInjectedClient?”
optionalcloseInjectedClient?:boolean
Defined in: protocol-swap2-omniston/src/provider.ts:521
Close an injected client when the provider closes (default: caller owns it).
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.closeInjectedClient
decodeTonBody?
Section titled “decodeTonBody?”
optionaldecodeTonBody?: (bocBase64) =>unknown
Defined in: protocol-swap2-core/dist/swap2/base.d.ts:74
Decodes a base64 BoC into a TON Cell for deposits that carry a cell body
(e.g. Omniston escrow payloads). The package deliberately does not depend on
@ton/core; the caller supplies e.g. (b) => Cell.fromBase64(b). Without
it, cell-body deposits fail closed — a TON account treats a string body
as a TEXT COMMENT, which would strand the swap.
Parameters
Section titled “Parameters”bocBase64
Section titled “bocBase64”string
Returns
Section titled “Returns”unknown
Inherited from
Section titled “Inherited from”Swap2EngineConfig.decodeTonBody
enabled?
Section titled “enabled?”
optionalenabled?:boolean
Defined in: protocol-swap2-omniston/src/provider.ts:347
Explicit constructor configuration; no deployment environment is read.
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.enabled
fromChain
Section titled “fromChain”fromChain:
string
Defined in: protocol-swap2-core/dist/swap2/base.d.ts:60
CAIP-2 of the chain the bound account lives on (the swap2 source).
Inherited from
Section titled “Inherited from”Swap2EngineConfig.fromChain
integratorAddress?
Section titled “integratorAddress?”
optionalintegratorAddress?:string
Defined in: protocol-swap2-omniston/src/provider.ts:350
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.integratorAddress
integratorFeePips?
Section titled “integratorFeePips?”
optionalintegratorFeePips?:number
Defined in: protocol-swap2-omniston/src/provider.ts:351
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.integratorFeePips
locateEvmDelivery?
Section titled “locateEvmDelivery?”
optionallocateEvmDelivery?: (input) =>Promise<string|null>
Defined in: protocol-swap2-omniston/src/provider.ts:501
EVM destination: find the delivery transaction — the destination escrow’s
payout to the recipient — so a completed order carries destTxHash.
Omniston’s tracking feed names the escrow but not that transaction.
Parameters
Section titled “Parameters”string
minUnits
Section titled “minUnits”string
positionAddress
Section titled “positionAddress”string
recipientAddress
Section titled “recipientAddress”string
tokenAddress
Section titled “tokenAddress”string
Returns
Section titled “Returns”Promise<string | null>
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.locateEvmDelivery
locateTonDelivery?
Section titled “locateTonDelivery?”
optionallocateTonDelivery?: (input) =>Promise<string|null>
Defined in: protocol-swap2-omniston/src/provider.ts:514
TON destination: find the delivery — the output position’s jetton transfer
to the recipient — so a completed EVM → TON order carries destTxHash in
the form the TON history source uses (tonapi event id). Without it the
wallet’s feed cannot pair the TON receive with the swap.
Parameters
Section titled “Parameters”jettonMasterAddress
Section titled “jettonMasterAddress”string
minUnits
Section titled “minUnits”string
positionAddress
Section titled “positionAddress”string
recipientAddress
Section titled “recipientAddress”string
Returns
Section titled “Returns”Promise<string | null>
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.locateTonDelivery
maxHtlcExecutions?
Section titled “maxHtlcExecutions?”
optionalmaxHtlcExecutions?:number
Defined in: protocol-swap2-omniston/src/provider.ts:341
Maximum number of HTLC execution attempts covered by generated secrets.
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.maxHtlcExecutions
maxNetworkFeeBps?
Section titled “maxNetworkFeeBps?”
optionalmaxNetworkFeeBps?:number|bigint
Defined in: core/dist/index-QWdcwE6y.d.ts:429
Maximum acceptable network fee, basis points of the input amount.
Inherited from
Section titled “Inherited from”Swap2EngineConfig.maxNetworkFeeBps
maxProtocolFeeBps?
Section titled “maxProtocolFeeBps?”
optionalmaxProtocolFeeBps?:number|bigint
Defined in: core/dist/index-QWdcwE6y.d.ts:431
Maximum acceptable protocol fee, basis points of the input amount.
Inherited from
Section titled “Inherited from”Swap2EngineConfig.maxProtocolFeeBps
maxTonExecutionNano?
Section titled “maxTonExecutionNano?”
optionalmaxTonExecutionNano?:string
Defined in: protocol-swap2-omniston/src/provider.ts:343
Hard cap for resolver-requested TON gas/forward value (default: 2 TON).
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.maxTonExecutionNano
maxUsd?
Section titled “maxUsd?”
optionalmaxUsd?:string|number
Defined in: protocol-swap2-omniston/src/provider.ts:349
Exact decimal USD cap; string form avoids binary-float rounding.
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.maxUsd
onExecutionPhase?
Section titled “onExecutionPhase?”
optionalonExecutionPhase?: (phase,detail?) =>void
Defined in: protocol-swap2-core/dist/swap2/base.d.ts:62
Progress observer, see Swap2ExecutionPhase.
Parameters
Section titled “Parameters”Swap2ExecutionPhase
detail?
Section titled “detail?”Swap2ExecutionPhaseDetail
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Swap2EngineConfig.onExecutionPhase
quoteSettleMs?
Section titled “quoteSettleMs?”
optionalquoteSettleMs?:number
Defined in: protocol-swap2-omniston/src/provider.ts:345
Resolver competition window; primarily useful for deterministic tests.
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.quoteSettleMs
quoteStore?
Section titled “quoteStore?”
optionalquoteStore?:OmnistonQuoteStore
Defined in: protocol-swap2-omniston/src/provider.ts:339
Quote/build context persistence; defaults to in-memory (NOT serverless-safe).
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.quoteStore
reviewExecution?
Section titled “reviewExecution?”
optionalreviewExecution?: (plan) =>void|Promise<void>
Defined in: protocol-swap2-core/dist/swap2/base.d.ts:98
Review gate: called once the live quote is built and every payload/value
check has passed, BEFORE any approval or signature. It receives a copy of
exactly what will be signed; throwing (the user cancelled) aborts with
nothing sent. A quote that expires while the gate is open is refused
before the first approval. When the quote expires while the engine’s own
approval is being mined, the engine re-quotes once; if the fresh quote
differs from the reviewed one (payload, gas, a worse output) the gate is
called again with requoted: true, and throwing then revokes the allowance.
Parameters
Section titled “Parameters”Swap2ExecutionPlan
Returns
Section titled “Returns”void | Promise<void>
Inherited from
Section titled “Inherited from”Swap2EngineConfig.reviewExecution
secretStore?
Section titled “secretStore?”
optionalsecretStore?:HtlcSecretStore
Defined in: protocol-swap2-omniston/src/provider.ts:337
HTLC preimage persistence; defaults to in-memory (NOT serverless-safe).
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.secretStore
serializedNativeAllowance?
Section titled “serializedNativeAllowance?”
optionalserializedNativeAllowance?:string|number|bigint
Defined in: protocol-swap2-core/dist/swap2/base.d.ts:81
Provider-SERIALIZED legs (a swap aggregator’s fully built Solana transaction): how much native coin, in base units, the account may lose on top of the swap input — rent for a destination token account, wrapped SOL juggling, priority fees. Default 20 000 000 lamports (0.02 SOL).
Inherited from
Section titled “Inherited from”Swap2EngineConfig.serializedNativeAllowance
skipAccountChainCheck?
Section titled “skipAccountChainCheck?”
optionalskipAccountChainCheck?:boolean
Defined in: protocol-swap2-core/dist/swap2/base.d.ts:64
Explicit escape hatch for adapters that can prove chain binding elsewhere.
Inherited from
Section titled “Inherited from”Swap2EngineConfig.skipAccountChainCheck
tonGasCeiling?
Section titled “tonGasCeiling?”
optionaltonGasCeiling?:string|number|bigint
Defined in: protocol-swap2-core/dist/swap2/base.d.ts:87
The most nanoTON a TON cell-body deposit may attach as gas: on top of the input for a native source, the whole attached value for a jetton source (default 1 TON; live Omniston swaps attach 0.1–0.4). A build attaching more is refused (scan 2026-10-27 modules, F7).
Inherited from
Section titled “Inherited from”Swap2EngineConfig.tonGasCeiling
tonSwapPayloadCheck?
Section titled “tonSwapPayloadCheck?”
optionaltonSwapPayloadCheck?:"report"|"enforce"
Defined in: protocol-swap2-omniston/src/provider.ts:407
TON↔TON swap settlement (scan F11): what a built swap body that fails the
decoder (receiver ≠ destination, refund/excess ≠ trader, on-chain minimum
below the quote, unknown layout, unverifiable leg) does. “enforce”
(default) refuses the build; “report” traces ton-swap-payload <reason>
and still builds — a rollout escape hatch, not a steady state.
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.tonSwapPayloadCheck
trace?
Section titled “trace?”
optionaltrace?: (event,details?) =>void
Defined in: protocol-swap2-omniston/src/provider.ts:528
Diagnostics: why a poll did not disclose (disclosure-skipped with the gate
and its fields, validator-refused, validator-threw) and when it did
(secret-disclosed). Never carries secrets. Wire it to your logger: a
silent “pending” cost a live order its 2-minute window (2026-10-20).
Parameters
Section titled “Parameters”string
details?
Section titled “details?”Record<string, unknown>
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”trustedEvmOrderProtocols?
Section titled “trustedEvmOrderProtocols?”
optionaltrustedEvmOrderProtocols?:Readonly<Record<string, readonlystring[]>>
Defined in: protocol-swap2-omniston/src/provider.ts:362
Independently trusted EVM order protocols — the Omniston fork of the 1inch
Limit Order Protocol an EVM-source order is signed against and that moves
the input token on fill — keyed by CAIP-2 chain. Kept apart from
trustedSettlementContracts because one address plays different roles on
different chains (0xafCF… is the escrow factory on Ethereum and the order
protocol on Polygon). EVM→TON is advertised only for chains listed here.
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.trustedEvmOrderProtocols
trustedSettlementContracts?
Section titled “trustedSettlementContracts?”
optionaltrustedSettlementContracts?:Readonly<Record<string, readonlystring[]>>
Defined in: protocol-swap2-omniston/src/provider.ts:353
Independently trusted settlement contracts, keyed by CAIP-2 chain.
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.trustedSettlementContracts
validateEvmInputPosition?
Section titled “validateEvmInputPosition?”
optionalvalidateEvmInputPosition?: (input) =>boolean|Promise<boolean>
Defined in: protocol-swap2-omniston/src/provider.ts:459
RPC-backed proof of the finalized EVM source position (EVM→TON). The
tracking feed only hints at the address; no secret is disclosed until this
hook proves — from the trusted factory’s own SrcEscrowCreated event, the
deterministic escrow address and the escrow’s balances — that the
trader’s FULL input is locked for this hashlock under the quoted terms
(owner, token, amount, resolver, deposit, timelocks, TON output amount).
Parameters
Section titled “Parameters”string
destinationChainId?
Section titled “destinationChainId?”number
EVM destination only: the escrow event’s destination complement must name this chain, token and deposit.
destinationTokenAddress?
Section titled “destinationTokenAddress?”string
dstSecurityDepositUnits?
Section titled “dstSecurityDepositUnits?”string
factoryAddress
Section titled “factoryAddress”string
inputTokenAddress
Section titled “inputTokenAddress”string
inputUnits
Section titled “inputUnits”string
orderProtocolAddress
Section titled “orderProtocolAddress”string
ownerAddress
Section titled “ownerAddress”string
positionAddress
Section titled “positionAddress”string
quoteTimestamp
Section titled “quoteTimestamp”number
resolverAddress
Section titled “resolverAddress”string
resolverSendsUnits
Section titled “resolverSendsUnits”string
secretHash
Section titled “secretHash”Uint8Array
srcHtlcSecurityDepositUnits
Section titled “srcHtlcSecurityDepositUnits”string
Returns
Section titled “Returns”boolean | Promise<boolean>
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.validateEvmInputPosition
validateEvmOutputPosition?
Section titled “validateEvmOutputPosition?”
optionalvalidateEvmOutputPosition?: (input) =>boolean|Promise<boolean>
Defined in: protocol-swap2-omniston/src/provider.ts:431
RPC-backed proof of the destination EVM escrow. The tracking feed is only a discovery hint: no HTLC preimage is disclosed until this hook proves the independently finalized on-chain position matches the signed quote.
Parameters
Section titled “Parameters”string
dstSecurityDepositUnits
Section titled “dstSecurityDepositUnits”string
executionIndex
Section titled “executionIndex”number
factoryAddress
Section titled “factoryAddress”string
inputUnits
Section titled “inputUnits”string
integratorAddress?
Section titled “integratorAddress?”string
integratorFeeUnits
Section titled “integratorFeeUnits”string
outputTokenAddress
Section titled “outputTokenAddress”string
outputUnits
Section titled “outputUnits”string
positionAddress
Section titled “positionAddress”string
protocolFeeRecipientAddress?
Section titled “protocolFeeRecipientAddress?”string
The quote’s settlementData.protocolFeeRecipientAddress (destination chain).
protocolFeeUnits
Section titled “protocolFeeUnits”string
quoteTimestamp
Section titled “quoteTimestamp”number
recipientAddress
Section titled “recipientAddress”string
resolverSendsUnits
Section titled “resolverSendsUnits”string
secretHash
Section titled “secretHash”Uint8Array
srcHtlcSecurityDepositUnits
Section titled “srcHtlcSecurityDepositUnits”string
Returns
Section titled “Returns”boolean | Promise<boolean>
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.validateEvmOutputPosition
validateTonEscrowPayload?
Section titled “validateTonEscrowPayload?”
optionalvalidateTonEscrowPayload?: (input) =>boolean|Promise<boolean>
Defined in: protocol-swap2-omniston/src/provider.ts:408
Parameters
Section titled “Parameters”destinationAddress
Section titled “destinationAddress”string
destinationChain
Section titled “destinationChain”string
exclusivityTimeout
Section titled “exclusivityTimeout”number
The quote’s exclusivityTimeout (seconds) the escrow config must carry.
forwardPayloadBocHex
Section titled “forwardPayloadBocHex”string
hashingFunction?
Section titled “hashingFunction?”string
initialResolverAddress
Section titled “initialResolverAddress”string
inputUnits
Section titled “inputUnits”string
outputTokenAddress
Section titled “outputTokenAddress”string
ownerAddress
Section titled “ownerAddress”string
payloadBocHex
Section titled “payloadBocHex”string
protocolAddress
Section titled “protocolAddress”string
quoteId
Section titled “quoteId”string
resolverSendsUnits
Section titled “resolverSendsUnits”string
secretHashes
Section titled “secretHashes”readonly Uint8Array<ArrayBufferLike>[]
srcHtlcSecurityDepositUnits
Section titled “srcHtlcSecurityDepositUnits”string
Returns
Section titled “Returns”boolean | Promise<boolean>
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.validateTonEscrowPayload
validateTonJettonWallet?
Section titled “validateTonJettonWallet?”
optionalvalidateTonJettonWallet?: (input) =>boolean|Promise<boolean>
Defined in: protocol-swap2-omniston/src/provider.ts:368
RPC-backed TON jetton-wallet verification. A TON-source order is rejected
when this hook is absent or does not prove that walletAddress belongs to
the quoted jetton master for ownerAddress.
Parameters
Section titled “Parameters”jettonMasterAddress
Section titled “jettonMasterAddress”string
ownerAddress
Section titled “ownerAddress”string
walletAddress
Section titled “walletAddress”string
Returns
Section titled “Returns”boolean | Promise<boolean>
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.validateTonJettonWallet
validateTonOutputPosition?
Section titled “validateTonOutputPosition?”
optionalvalidateTonOutputPosition?: (input) =>boolean|Promise<boolean>
Defined in: protocol-swap2-omniston/src/provider.ts:483
Indexer/RPC-backed proof of the TON output position (EVM→TON): deployed by the trusted factory for THIS quote, pinned position/escrow code, hashlock, recipient, amount, security deposit, and a cancellation boundary still far enough away to complete. The tracking feed is only a discovery hint.
Parameters
Section titled “Parameters”dstSecurityDepositUnits
Section titled “dstSecurityDepositUnits”string
inputUnits
Section titled “inputUnits”string
outputJettonMasterAddress
Section titled “outputJettonMasterAddress”string
outputUnits
Section titled “outputUnits”string
positionAddress
Section titled “positionAddress”string
protocolAddress
Section titled “protocolAddress”string
quoteId
Section titled “quoteId”string
quoteTimestamp
Section titled “quoteTimestamp”number
recipientAddress
Section titled “recipientAddress”string
resolverSendsUnits
Section titled “resolverSendsUnits”string
secretHash
Section titled “secretHash”Uint8Array
Returns
Section titled “Returns”boolean | Promise<boolean>
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.validateTonOutputPosition
validateTonSwapLeg?
Section titled “validateTonSwapLeg?”
optionalvalidateTonSwapLeg?: (leg) =>boolean|Promise<boolean>
Defined in: protocol-swap2-omniston/src/provider.ts:399
TON↔TON swap settlement (scan F11): confirm one chain fact the decoded
swap body depends on — that a STON.fi hop’s ask wallet is its router’s
wallet of the quoted output (and, for native input, that the pTON wallet
the message pays belongs to that router), or that a DeDust pool trades the
quoted pair. createOmnistonTonValidators supplies it. Required, with
validateTonSwapTarget, to advertise same-chain TON swaps (scan
2026-10-30 F8: without it a genuine DEX body can pay out a token other
than the quoted one). Only tonSwapPayloadCheck: "report" lets a host run
without it — each unverified leg is then traced as ton-swap-payload legs-unverified; STON.fi v1 native input (pTON v1) is refused regardless.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”boolean | Promise<boolean>
Inherited from
Section titled “Inherited from”OmnistonProviderOptions.validateTonSwapLeg
validateTonSwapTarget?
Section titled “validateTonSwapTarget?”
optionalvalidateTonSwapTarget?: (input) =>boolean|Promise<boolean>
Defined in: protocol-swap2-omniston/src/provider.ts:386
TON↔TON swap settlement: independently confirm that the contract a swap message pays into — directly for native GRAM, as the jetton-transfer destination for jettons — is a DEX contract of a protocol the quote named (e.g. by its code interface on an indexer). Without it, same-chain TON swaps are not advertised.
Parameters
Section titled “Parameters”address
Section titled “address”string
protocols
Section titled “protocols”readonly string[]
Returns
Section titled “Returns”boolean | Promise<boolean>