Skip to content

Latest commit

 

History

History
1138 lines (800 loc) · 39.3 KB

File metadata and controls

1138 lines (800 loc) · 39.3 KB

Classes

ETH_Base

Ethereum Base

ETH_InboundETH_Base

Ethereum Inbound

ETH_OutboundETH_Base

Ethereum Outbound

ETH_Base

Ethereum Base

Kind: global class


ETH_Base.storemanQuota(opts, skipValidation) ⇒ Promise

Make storeman quota call on Wanchain

Kind: instance method of ETH_Base Returns: Promise - Promise returning object

Param Type Description
opts Object Tx options
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
skipValidation boolean

ETH_Base.storemanInfo(opts, skipValidation) ⇒ Promise

Make storeman info call on Wanchain

Kind: instance method of ETH_Base Returns: Promise - Promise returning object

Param Type Description
opts Object Tx options
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
skipValidation boolean

ETH_Base.buildStoremanQuotaTx(opts, skipValidation) ⇒ Object

Build storeman quota call

Kind: instance method of ETH_Base Returns: Object - Tx object

Param Type Description
opts Object Tx options
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
skipValidation boolean

ETH_Base.buildStoremanInfoTx(opts, skipValidation) ⇒ Object

Build storeman info call

Kind: instance method of ETH_Base Returns: Object - Tx object

Param Type Description
opts Object Tx options
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
skipValidation boolean

ETH_Base.buildStoremanQuotaData(opts, skipValidation) ⇒ string

Get data hex string for storeman quota call

Kind: instance method of ETH_Base Returns: string - Data hex string

Param Type Description
opts Object Data options
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
skipValidation boolean

ETH_Base.buildStoremanInfoData(opts, skipValidation) ⇒ string

Get data hex string for storeman info call

Kind: instance method of ETH_Base Returns: string - Data hex string

Param Type Description
opts Object Data options
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
skipValidation boolean

ETH_Inbound ⇐ ETH_Base

Ethereum Inbound

Kind: global class Extends: ETH_Base


ETH_Inbound.send(opts, skipValidation) ⇒ Promise

Complete crosschain transaction (lock + redeem)

Kind: instance method of ETH_Inbound Returns: Promise - Promise object

Param Type Description
opts Object Tx options
opts.from string Sender address
opts.to string Destination address
opts.value string Tx value
opts.redeemKey Object Redeem key pair
opts.redeemKey.x string Redeem key x
opts.redeemKey.xHash string Redeem key xHash
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
opts.storeman.eth string Storeman Ethereum address
skipValidation boolean

ETH_Inbound.lock(opts, skipValidation) ⇒ Promise

Lock transaction and confirmation

Kind: instance method of ETH_Inbound Returns: Promise - Promise object

Param Type Description
opts Object Tx options
opts.from string Sender address
opts.to string Destination address
opts.value string Tx value
opts.redeemKey Object Redeem key pair
opts.redeemKey.x string Redeem key x
opts.redeemKey.xHash string Redeem key xHash
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
opts.storeman.eth string Storeman Ethereum address
skipValidation boolean

ETH_Inbound.redeem(opts, skipValidation) ⇒ Promise

Redeem transaction and confirmation

Kind: instance method of ETH_Inbound Returns: Promise - Promise object

Param Type Description
opts Object Tx options
opts.to string Destination address
opts.redeemKey Object Redeem key pair
opts.redeemKey.x string Redeem key x
skipValidation boolean

ETH_Inbound.sendLock(opts, skipValidation) ⇒ Promise

Send lock tx on Ethereum

Kind: instance method of ETH_Inbound Returns: Promise - Promise object

Param Type Description
opts Object Tx options
opts.from string Sender address
opts.to string Destination address
opts.value string Tx value
opts.redeemKey Object Redeem key pair
opts.redeemKey.x string Redeem key x
opts.redeemKey.xHash string Redeem key xHash
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
opts.storeman.eth string Storeman Ethereum address
skipValidation boolean

ETH_Inbound.sendRedeem(opts, skipValidation) ⇒ Promise

Send redeem tx on Wanchain

Kind: instance method of ETH_Inbound Returns: Promise - Promise object

Param Type Description
opts Object Tx options
opts.to string Destination address
opts.redeemKey Object Redeem key pair
opts.redeemKey.x string Redeem key x
skipValidation boolean

ETH_Inbound.sendRevoke(opts, skipValidation) ⇒ Promise

Send revoke tx on Ethereum

Kind: instance method of ETH_Inbound Returns: Promise - Promise object

Param Type Description
opts Object Tx options
opts.from string Sender address
opts.redeemKey Object Redeem key pair
opts.redeemKey.xHash string Redeem key xHash
skipValidation boolean

ETH_Inbound.listenLock(opts, skipValidation) ⇒ Promise

Listen for storeman lock confirmation on Wanchain

Kind: instance method of ETH_Inbound Returns: Promise - Promise object

Param Type Description
opts Object Tx options
opts.redeemKey Object Redeem key pair
opts.redeemKey.xHash string Redeem key xHash
skipValidation boolean

ETH_Inbound.listenRedeem(opts, skipValidation) ⇒ Promise

Listen for storeman redeem confirmation on Ethereum

Kind: instance method of ETH_Inbound Returns: Promise - Promise object

Param Type Description
opts Object Tx options
opts.redeemKey Object Redeem key pair
opts.redeemKey.xHash string Redeem key xHash
skipValidation boolean

ETH_Inbound.buildLockTx(opts, skipValidation) ⇒ Object

Build lock tx

Kind: instance method of ETH_Inbound Returns: Object - Tx object

Param Type Description
opts Object Tx options
opts.from string Sender address
opts.to string Destination address
opts.value string Tx value
opts.redeemKey Object Redeem key pair
opts.redeemKey.x string Redeem key x
opts.redeemKey.xHash string Redeem key xHash
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
opts.storeman.eth string Storeman Ethereum address
skipValidation boolean

ETH_Inbound.buildRedeemTx(opts, skipValidation) ⇒ Object

Build redeem tx

Kind: instance method of ETH_Inbound Returns: Object - Tx object

Param Type Description
opts Object Tx options
opts.to string Destination address
opts.redeemKey Object Redeem key pair
opts.redeemKey.x string Redeem key x
skipValidation boolean

ETH_Inbound.buildRevokeTx(opts, skipValidation) ⇒ Object

Build revoke tx

Kind: instance method of ETH_Inbound Returns: Object - Tx object

Param Type Description
opts Object Tx options
opts.from string Sender address
opts.redeemKey Object Redeem key pair
opts.redeemKey.xHash string Redeem key xHash
skipValidation boolean

ETH_Inbound.buildLockScanOpts(opts, skipValidation) ⇒ Object

Build lock scan opts

Kind: instance method of ETH_Inbound Returns: Object - Call opts object

Param Type Description
opts Object Tx options
opts.redeemKey Object Redeem key pair
opts.redeemKey.xHash string Redeem key xHash
skipValidation boolean

ETH_Inbound.buildRedeemScanOpts(opts, skipValidation) ⇒ Object

Build redeem scan opts

Kind: instance method of ETH_Inbound Returns: Object - Call opts object

Param Type Description
opts Object Tx options
opts.redeemKey Object Redeem key pair
opts.redeemKey.xHash string Redeem key xHash
skipValidation boolean

ETH_Inbound.buildLockData(opts, skipValidation) ⇒ string

Get data hex string for lock call

Kind: instance method of ETH_Inbound Returns: string - Data hex string

Param Type Description
opts Object Tx options
opts.redeemKey Object Redeem key pair
opts.redeemKey.xHash string Redeem key xHash
opts.storeman Object Storeman address pair
opts.storeman.eth string Storeman Ethereum address
opts.to string Destination address
skipValidation boolean

ETH_Inbound.buildRedeemData(opts, skipValidation) ⇒ string

Get data hex string for redeem call

Kind: instance method of ETH_Inbound Returns: string - Data hex string

Param Type Description
opts Object Tx options
opts.redeemKey Object Redeem key pair
opts.redeemKey.x string Redeem key x
skipValidation boolean

ETH_Inbound.buildRevokeData(opts, skipValidation) ⇒ string

Get data hex string for revoke call

Kind: instance method of ETH_Inbound Returns: string - Data hex string

Param Type Description
opts Object Tx options
opts.redeemKey Object Redeem key pair
opts.redeemKey.xHash string Redeem key xHash
skipValidation boolean

ETH_Inbound.storemanQuota(opts, skipValidation) ⇒ Promise

Make storeman quota call on Wanchain

Kind: instance method of ETH_Inbound Returns: Promise - Promise returning object

Param Type Description
opts Object Tx options
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
skipValidation boolean

ETH_Inbound.storemanInfo(opts, skipValidation) ⇒ Promise

Make storeman info call on Wanchain

Kind: instance method of ETH_Inbound Returns: Promise - Promise returning object

Param Type Description
opts Object Tx options
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
skipValidation boolean

ETH_Inbound.buildStoremanQuotaTx(opts, skipValidation) ⇒ Object

Build storeman quota call

Kind: instance method of ETH_Inbound Returns: Object - Tx object

Param Type Description
opts Object Tx options
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
skipValidation boolean

ETH_Inbound.buildStoremanInfoTx(opts, skipValidation) ⇒ Object

Build storeman info call

Kind: instance method of ETH_Inbound Returns: Object - Tx object

Param Type Description
opts Object Tx options
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
skipValidation boolean

ETH_Inbound.buildStoremanQuotaData(opts, skipValidation) ⇒ string

Get data hex string for storeman quota call

Kind: instance method of ETH_Inbound Returns: string - Data hex string

Param Type Description
opts Object Data options
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
skipValidation boolean

ETH_Inbound.buildStoremanInfoData(opts, skipValidation) ⇒ string

Get data hex string for storeman info call

Kind: instance method of ETH_Inbound Returns: string - Data hex string

Param Type Description
opts Object Data options
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
skipValidation boolean

ETH_Outbound ⇐ ETH_Base

Ethereum Outbound

Kind: global class Extends: ETH_Base


ETH_Outbound.send(opts, skipValidation) ⇒ Promise

Complete crosschain transaction (lock + redeem)

Kind: instance method of ETH_Outbound Returns: Promise - Promise object

Param Type Description
opts Object Tx options
opts.from string Sender address
opts.to string Destination address
opts.value string Tx value
opts.redeemKey Object Redeem key pair
opts.redeemKey.x string Redeem key x
opts.redeemKey.xHash string Redeem key xHash
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
opts.storeman.eth string Storeman Ethereum address
skipValidation boolean

ETH_Outbound.lock(opts, skipValidation) ⇒ Promise

Lock transaction and confirmation

Kind: instance method of ETH_Outbound Returns: Promise - Promise object

Param Type Description
opts Object Tx options
opts.from string Sender address
opts.to string Destination address
opts.value string Tx value
opts.redeemKey Object Redeem key pair
opts.redeemKey.x string Redeem key x
opts.redeemKey.xHash string Redeem key xHash
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
opts.storeman.eth string Storeman Ethereum address
skipValidation boolean

ETH_Outbound.redeem(opts, skipValidation) ⇒ Promise

Redeem transaction and confirmation

Kind: instance method of ETH_Outbound Returns: Promise - Promise object

Param Type Description
opts Object Tx options
opts.to string Destination address
opts.redeemKey Object Redeem key pair
opts.redeemKey.x string Redeem key x
skipValidation boolean

ETH_Outbound.getOutboundFee(opts, skipValidation) ⇒ Promise

Get outbound fee amount

Kind: instance method of ETH_Outbound Returns: Promise - Promise object

Param Type Description
opts Object Tx options
opts.value string Tx value
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
skipValidation boolean

ETH_Outbound.sendLock(opts, skipValidation) ⇒ Promise

Send lock tx on Wanchain

Kind: instance method of ETH_Outbound Returns: Promise - Promise object

Param Type Description
opts Object Tx options
opts.from string Sender address
opts.to string Destination address
opts.value string Tx value
opts.outboundFee string Tx outbound fee
opts.redeemKey Object Redeem key pair
opts.redeemKey.x string Redeem key x
opts.redeemKey.xHash string Redeem key xHash
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
opts.storeman.eth string Storeman Ethereum address
skipValidation boolean

ETH_Outbound.sendRedeem(opts, skipValidation) ⇒ Promise

Send redeem tx on Ethereum

Kind: instance method of ETH_Outbound Returns: Promise - Promise object

Param Type Description
opts Object Tx options
opts.to string Destination address
opts.redeemKey Object Redeem key pair
opts.redeemKey.x string Redeem key x
skipValidation boolean

ETH_Outbound.sendRevoke(opts, skipValidation) ⇒ Promise

Send revoke tx on Wanchain

Kind: instance method of ETH_Outbound Returns: Promise - Promise object

Param Type Description
opts Object Tx options
opts.from string Sender address
opts.redeemKey Object Redeem key pair
opts.redeemKey.xHash string Redeem key xHash
skipValidation boolean

ETH_Outbound.listenLock(opts, skipValidation) ⇒ Promise

Listen for storeman lock confirmation on Ethereum

Kind: instance method of ETH_Outbound Returns: Promise - Promise object

Param Type Description
opts Object Tx options
opts.redeemKey Object Redeem key pair
opts.redeemKey.xHash string Redeem key xHash
skipValidation boolean

ETH_Outbound.listenRedeem(opts, skipValidation) ⇒ Promise

Listen for storeman redeem confirmation on Wanchain

Kind: instance method of ETH_Outbound Returns: Promise - Promise object

Param Type Description
opts Object Tx options
opts.redeemKey Object Redeem key pair
opts.redeemKey.xHash string Redeem key xHash
skipValidation boolean

ETH_Outbound.buildOutboundFeeTx(opts, skipValidation) ⇒ Object

Build outboundFee tx

Kind: instance method of ETH_Outbound Returns: Object - Tx object

Param Type Description
opts Object Tx options
opts.to string Destination address
opts.value string Tx value
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
skipValidation boolean

ETH_Outbound.buildLockTx(opts, skipValidation) ⇒ Object

Build lock tx

Kind: instance method of ETH_Outbound Returns: Object - Tx object

Param Type Description
opts Object Tx options
opts.from string Sender address
opts.to string Destination address
opts.value string Tx value
opts.outboundFee string Tx outbound fee
opts.redeemKey Object Redeem key pair
opts.redeemKey.x string Redeem key x
opts.redeemKey.xHash string Redeem key xHash
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
opts.storeman.eth string Storeman Ethereum address
skipValidation boolean

ETH_Outbound.buildRedeemTx(opts, skipValidation) ⇒ Object

Build redeem tx

Kind: instance method of ETH_Outbound Returns: Object - Tx object

Param Type Description
opts Object Tx options
opts.to string Destination address
opts.redeemKey Object Redeem key pair
opts.redeemKey.x string Redeem key x
skipValidation boolean

ETH_Outbound.buildRevokeTx(opts, skipValidation) ⇒ Object

Build revoke tx

Kind: instance method of ETH_Outbound Returns: Object - Tx object

Param Type Description
opts Object Tx options
opts.from string Sender address
opts.redeemKey Object Redeem key pair
opts.redeemKey.xHash string Redeem key xHash
skipValidation boolean

ETH_Outbound.buildLockScanOpts(opts, skipValidation) ⇒ Object

Build lock scan opts

Kind: instance method of ETH_Outbound Returns: Object - Call opts object

Param Type Description
opts Object Tx options
opts.redeemKey Object Redeem key pair
opts.redeemKey.xHash string Redeem key xHash
skipValidation boolean

ETH_Outbound.buildRedeemScanOpts(opts, skipValidation) ⇒ Object

Build redeem scan opts

Kind: instance method of ETH_Outbound Returns: Object - Call opts object

Param Type Description
opts Object Tx options
opts.redeemKey Object Redeem key pair
opts.redeemKey.xHash string Redeem key xHash
skipValidation boolean

ETH_Outbound.buildLockData(opts, skipValidation) ⇒ string

Get data hex string for lock call

Kind: instance method of ETH_Outbound Returns: string - Data hex string

Param Type Description
opts Object Tx options
opts.redeemKey Object Redeem key pair
opts.redeemKey.xHash string Redeem key xHash
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
opts.to string Destination address
opts.value number | string Tx value
skipValidation boolean

ETH_Outbound.buildRedeemData(opts, skipValidation) ⇒ string

Get data hex string for redeem call

Kind: instance method of ETH_Outbound Returns: string - Data hex string

Param Type Description
opts Object Tx options
opts.redeemKey Object Redeem key pair
opts.redeemKey.x string Redeem key x
skipValidation boolean

ETH_Outbound.buildRevokeData(opts, skipValidation) ⇒ string

Get data hex string for revoke call

Kind: instance method of ETH_Outbound Returns: string - Data hex string

Param Type Description
opts Object Tx options
opts.redeemKey Object Redeem key pair
opts.redeemKey.xHash string Redeem key xHash
skipValidation boolean

ETH_Outbound.buildOutboundFeeData(opts, skipValidation) ⇒ string

Get data hex string for outboundFee call

Kind: instance method of ETH_Outbound Returns: string - Data hex string

Param Type Description
opts Object Tx options
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
opts.value number | string Tx value
skipValidation boolean

ETH_Outbound.storemanQuota(opts, skipValidation) ⇒ Promise

Make storeman quota call on Wanchain

Kind: instance method of ETH_Outbound Returns: Promise - Promise returning object

Param Type Description
opts Object Tx options
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
skipValidation boolean

ETH_Outbound.storemanInfo(opts, skipValidation) ⇒ Promise

Make storeman info call on Wanchain

Kind: instance method of ETH_Outbound Returns: Promise - Promise returning object

Param Type Description
opts Object Tx options
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
skipValidation boolean

ETH_Outbound.buildStoremanQuotaTx(opts, skipValidation) ⇒ Object

Build storeman quota call

Kind: instance method of ETH_Outbound Returns: Object - Tx object

Param Type Description
opts Object Tx options
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
skipValidation boolean

ETH_Outbound.buildStoremanInfoTx(opts, skipValidation) ⇒ Object

Build storeman info call

Kind: instance method of ETH_Outbound Returns: Object - Tx object

Param Type Description
opts Object Tx options
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
skipValidation boolean

ETH_Outbound.buildStoremanQuotaData(opts, skipValidation) ⇒ string

Get data hex string for storeman quota call

Kind: instance method of ETH_Outbound Returns: string - Data hex string

Param Type Description
opts Object Data options
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
skipValidation boolean

ETH_Outbound.buildStoremanInfoData(opts, skipValidation) ⇒ string

Get data hex string for storeman info call

Kind: instance method of ETH_Outbound Returns: string - Data hex string

Param Type Description
opts Object Data options
opts.storeman Object Storeman address pair
opts.storeman.wan string Storeman Wanchain address
skipValidation boolean