OmnistonProviderOptions
Defined in: protocol-swap2-omniston/src/provider.ts:331
Extended by
Section titled “Extended by”Properties
Section titled “Properties”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.
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}).
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).
enabled?
Section titled “enabled?”
optionalenabled?:boolean
Defined in: protocol-swap2-omniston/src/provider.ts:347
Explicit constructor configuration; no deployment environment is read.
integratorAddress?
Section titled “integratorAddress?”
optionalintegratorAddress?:string
Defined in: protocol-swap2-omniston/src/provider.ts:350
integratorFeePips?
Section titled “integratorFeePips?”
optionalintegratorFeePips?:number
Defined in: protocol-swap2-omniston/src/provider.ts:351
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>
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>
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.
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).
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.
quoteSettleMs?
Section titled “quoteSettleMs?”
optionalquoteSettleMs?:number
Defined in: protocol-swap2-omniston/src/provider.ts:345
Resolver competition window; primarily useful for deterministic tests.
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).
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).
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.
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
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.
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.
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>
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>
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>
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>
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>
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>
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>