registerModel(contract, sender, currency)

Feature

Return raw operation for creating new payment model.

Note: Contract account must be deployed on the mitum network. Handler of contract also can execute the function.

Parameters

string contract address, string sender, string currency ID,

Return Value

object register-model operation

example

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

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

// output
Operation {
  id: 'mitum',
  fact: RegisterModelFact {
    hint: Hint { s: 'mitum-payment-register-model-operation-fact' },
    token: Token { s: '2025-02-06 06:37:26.242 +0000 UTC' },
    _hash: <Buffer 77 e4 e3 b7 d4 bf be e0 01 a4 9b 76 51 58 b5 f9 98 93 d9 cd 2e 91 82 2a ff a3 e6 b6 31 e3 80 da>,
    sender: Address {
      s: '0x4526f3D0EdC63D9EaeCD94D56551e0f061CFCa47fca',
      type: 'mitum'
    },
    contract: Address {
      s: '0x675b7c22dd188Af248985C64278081cC64Dc9bD2fca',
      type: 'mitum'
    },
    currency: CurrencyID { s: 'MCC' }
  },
  hint: Hint { s: 'mitum-payment-register-model-operation' },
  _factSigns: [],
  _hash: <Buffer >
}

Last updated