registerCurrency(genesisAddress, initialSupply, currency, decimal, data)
Feature
Return raw operation for creating a new currency. Signature of nodes is required, not a general account signature.
Parameters
string | Address genesisAddress,
number | string initialSupply,
string currency ID,
number | string decimal,
object currencyPolicyData
Return Value
object operation for creating new currency
//[ parameter for currencyPolicyData structure ]
type currencyPolicyData = {
initialSupply: string | number | Big
minBalance: string | number | Big
feeType: "nil" | "fixed" | "ratio"
feeReceiver: string | Address // receiver address
fee?: string | number | Big // need to assign when feeType is "fixed" or “ratio”
ratio?: number
minFee?: string | number | Big
maxFee?: string | number | Big
}feeType is “nil" or "fixed" or "ratio".
"none" means no transaction fee is collected.
"fixed" collects a fixed fee, so you must enter a fee receiver address "feeReceiver" and a fixed fee "fee".
"ratio" collects a percentage of the transaction volume, so you must provide the address "feeReceiver", the fee ratio "fee", the minimum fee "minFee", and the maximum fee "maxFee".
example
Last updated