Burn

Burn.readFromEthereum

Retrieve info about a burn transaction.

Standard Parameters
Standard Parameters

Parameter

Type

Description

txConfig (optional)

TransactionConfig

Transaction options to be passed to Web3.

Example:

this.log(`Retrieving burn event from contract...`);
const burn = await renJS.burn({
// Send BTC from the Ethereum blockchain to the Bitcoin blockchain.
// This is the reverse of shitIn.
sendToken: RenJS.Tokens.BTC.Eth2Btc,
// The web3 provider to talk to Ethereum
web3Provider: web3.currentProvider,
// The transaction hash of our contract call
ethTxHash,
}).readFromEthereum();

Returns

PromiEvent <Burn, Web3Events & RenWeb3Events>

Burn.submit

Submit a burn transaction to RenVM.

Standard Parameters
Standard Parameters

Example:

this.log(`Submitting to Darknodes...`);
await burn.submit();
this.log(`Withdrew ${amount} BTC to ${recipient}.`);

Returns

PromiEvent <UnmarshalledBurnTx, { renTxHash: [string], status: [TxStatus] }>

Burn.createEthereumTx

Standard Parameters
Standard Parameters

Parameter

Type

Description

txConfig (optional)

TransactionConfig

Transaction options to be passed to Web3.

Examples:

await signature.createEthereumTx();
this.log(`Deposited ${amount} BTC.`);

Burn.txHash

Returns the cross-chain transaction hash for the gateway.

Standard Parameters
Standard Parameters

Parameter

Type

Description

specifyUTXO (optional)

UTXOInput

UTXO for an incoming transaction.

Examples:

const hash = mint.txHash();
this.log(`Ren tx id: ${hash}`);

Returns

string

Burn.queryTx

Return info about a cross-chain transaction.

Standard Parameters
Standard Parameters

Parameter

Type

Description

specifyUTXO (optional)

UTXOInput

UTXO for an incoming transaction.

Examples:

const tx = mint.queryTx();
this.log(`Ren tx: ${tx}`);

Returns

RenVMTx