Skip to content

parseEtherDeposit

Parse a ETH deposit request coming from the EtherPortal smart contract.

Usage

import { createApp } from "@deroll/app";
import { isEtherDeposit, parseEtherDeposit } from "@deroll/wallet";
 
// create app
const app = createApp({ url: "http://127.0.0.1:5004" });
 
app.addAdvanceHandler(async (data) => {
    if (isEtherDeposit(data)) {
        const deposit = parseEtherDeposit(data.payload); 
        deposit.
sender
value
} return "accept"; });

Returns

Type: EtherDeposit

Structure with deposit data.

Parameters

Type: Hex

Deposit payload.