withdraw(contract, sender, currency)

Feature

Generate an withdraw operation to withdraw all deposits with certain currency at once and delete account information.

Parameters

string contract address, string sender, string currency ID

Return Value

object withdraw operation

example

const contract = "0x675b7c22dd188Af248985C64278081cC64Dc9bD2fca";
const sender = "0x4526f3D0EdC63D9EaeCD94D56551e0f061CFCa47fca";
const currencyID = "MCC";

const op = mitum.payment.withdraw(contract, sender, currencyID);
console.log(op);

// output
Operation {
  id: 'mitum',
  fact: WithdrawFact {
    hint: Hint { s: 'mitum-payment-withdraw-operation-fact' },
    token: Token { s: '2025-02-06 07:03:06.061 +0000 UTC' },
    _hash: <Buffer c1 d6 3f c9 74 71 5d 14 d2 ec 1d fe 0b 56 84 d4 3a 2d 2d 33 a7 5e 72 26 e2 45 2b e2 4a e8 b0 79>,
    sender: Address {
      s: '0xc12004613aC5e031f642BD79740307E0e91768e4fca',
      type: 'mitum'
    },
    contract: Address {
      s: '0x675b7c22dd188Af248985C64278081cC64Dc9bD2fca',
      type: 'mitum'
    },
    currency: CurrencyID { s: 'MCC' }
  },
  hint: Hint { s: 'mitum-payment-withdraw-operation' },
  _factSigns: [],
  _hash: <Buffer >
}

Last updated