Join the Rootstock Discord Community to get the latest updates from the Rootstock Ecosystem!

RIF Multisig SDK - Send RBTC

Required packages:

Raw Transactions with safe-core-sdk

Raw transactions can be created by using directly the safe-core-sdk package or the safe-transactions-sdk.

const tx = await safe.createTransaction({
      to,
      data,
      value
    })

{:.snippet__code.snippet__code--lightgreen}


safe-transactions-sdk

The RawTransactionBuilder provides the possibility to create raw transactions.

  • A) Initialize the RawTransactionBuilder

    • Parameters:
      • safe: Safe - the safe previously created

    {:.snippet__parameters.snippet__parameters--lightgreen.border-bottom-0}

    import { RawTransactionBuilder } from '@rsksmart/safe-transactions-sdk'
    
    const rawTransactionBuilder = new RawTransactionBuilder(safe)

    {:.snippet__code.snippet__code--lightgreen.border-top-0}

  • B) Create the transaction.

    • Parameters:
      • to: string - the transaction receiver address
      • value: string - the amount we want to transfer
      • data: string - the data we want to send with the transaction

    {:.snippet__parameters.snippet__parameters--lightgreen.border-bottom-0}

    const tx = await rawTransactionBuilder.rawTransaction(to, value, data)

    {:.snippet__code.snippet__code--lightgreen.border-top-0}

Receive updates

Get the latest updates from the Rootstock ecosystem

Loading...