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
    })

safe-transactions-sdk

The RawTransactionBuilder provides the possibility to create raw transactions.

  • A) Initialize the RawTransactionBuilder
    • Parameters:
      • safe: Safe - the safe previously created
    import { RawTransactionBuilder } from '@rsksmart/safe-transactions-sdk'
    
    const rawTransactionBuilder = new RawTransactionBuilder(safe)
    
  • 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
    const tx = await rawTransactionBuilder.rawTransaction(to, value, data)