Skip to content

2. Operation Reference

syuan100 edited this page Aug 27, 2021 · 5 revisions

DebitOp

Describes the debit of a specific amount from a Helium account. (See supported coins) (TBD).

Requirements:

  • MUST have an amount that is negative.
  • MUST be a supported currency.
{
    "operation_identifier": {
        "index": 0
    },
    "type": "debit_op",
    "account": {
        "address": "..."
    },
    "amount": {
        "value": "-10000000",
        "currency": {
            "symbol": "HNT",
            "decimals": 8
        }
    },
    "metadata": {
        "debit_category": "payment"
    }
}

CreditOp

Describes the credit of a specific amount to a Helium account. (See supported coins) (TBD).

Requirements:

  • MUST have an amount that is positive.
  • MUST be a supported currency.
{
    "operation_identifier": {
        "index": 0
    },
    "type": "credit_op",
    "account": {
        "address": "..."
    },
    "amount": {
        "value": "10000000",
        "currency": {
            "symbol": "HNT",
            "decimals": 8
        }
    },
    "metadata": {
        "credit_category": "payment"
    }
}