ZcashSwapService
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / ZcashSwapService
Class: ZcashSwapService
Section titled “Class: ZcashSwapService”Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:8942
Zcash Swap Service
Enables cross-chain swaps from ETH/SOL/NEAR to Zcash’s shielded pool.
Throws
Section titled “Throws”If production mode is configured without a bridge provider
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ZcashSwapService(
config):ZcashSwapService
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:8949
Parameters
Section titled “Parameters”config
Section titled “config”Returns
Section titled “Returns”ZcashSwapService
Methods
Section titled “Methods”getQuote()
Section titled “getQuote()”getQuote(
params):Promise<ZcashQuote>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:8953
Get a quote for swapping to ZEC
Parameters
Section titled “Parameters”params
Section titled “params”Returns
Section titled “Returns”Promise<ZcashQuote>
executeSwapToShielded()
Section titled “executeSwapToShielded()”executeSwapToShielded(
params):Promise<ZcashSwapResult>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:8965
Execute a swap to Zcash shielded pool
Parameters
Section titled “Parameters”params
Section titled “params”Returns
Section titled “Returns”Promise<ZcashSwapResult>
getSwapStatus()
Section titled “getSwapStatus()”getSwapStatus(
requestId):Promise<ZcashSwapResult|null>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:8977
Get swap status
Parameters
Section titled “Parameters”requestId
Section titled “requestId”string
Returns
Section titled “Returns”Promise<ZcashSwapResult | null>
waitForCompletion()
Section titled “waitForCompletion()”waitForCompletion(
requestId,timeout?,pollInterval?):Promise<ZcashSwapResult>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:8981
Wait for swap completion
Parameters
Section titled “Parameters”requestId
Section titled “requestId”string
timeout?
Section titled “timeout?”number
pollInterval?
Section titled “pollInterval?”number
Returns
Section titled “Returns”Promise<ZcashSwapResult>
getSupportedChains()
Section titled “getSupportedChains()”getSupportedChains():
Promise<ZcashSwapSourceChain[]>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:8985
Get supported source chains
Returns
Section titled “Returns”Promise<ZcashSwapSourceChain[]>
getSupportedTokens()
Section titled “getSupportedTokens()”getSupportedTokens(
chain):ZcashSwapSourceToken[]
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:8989
Get supported source tokens for a chain
Parameters
Section titled “Parameters”Returns
Section titled “Returns”isRouteSupported()
Section titled “isRouteSupported()”isRouteSupported(
chain,token):boolean
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:8993
Check if a swap route is supported
Parameters
Section titled “Parameters”Returns
Section titled “Returns”boolean