ZcashSwapService
SIP Protocol API Reference v0.7.0
SIP Protocol API Reference / ZcashSwapService
Class: ZcashSwapService
Section titled “Class: ZcashSwapService”Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:5730
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-BYZbDjal.d.ts:5737
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-BYZbDjal.d.ts:5741
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-BYZbDjal.d.ts:5753
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-BYZbDjal.d.ts:5765
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-BYZbDjal.d.ts:5769
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-BYZbDjal.d.ts:5773
Get supported source chains
Returns
Section titled “Returns”Promise<ZcashSwapSourceChain[]>
getSupportedTokens()
Section titled “getSupportedTokens()”getSupportedTokens(
chain):ZcashSwapSourceToken[]
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:5777
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-BYZbDjal.d.ts:5781
Check if a swap route is supported
Parameters
Section titled “Parameters”Returns
Section titled “Returns”boolean