AccountWorkPage

Protocol.AccountWorkPage History

Hide minor edits - Show changes to output

Added lines 1-125:
Account Request

{
    "type": "account-request",
    "to": (string),
    "from": (string),
    "request-id": (integer),
    "body": {
        "account": {
            "account-id": (string),
            (remaining account data structure containing requested field values)
        },
        ("note": (string))
    }
}


Account Set

{
    "type": "account-set",
    "to": (string),
    "from": (string),
    ("request-id": (integer),)
    "time": (date/time string),
    "body": {
        "account": {
            "account-id": (string),
            (remaining account data structure containing requested field values)
        },
    }
}

Nodes may directly set their own keys and reduce their own limits using @@account-set@@.  Other modifications require an @@account-request@@ to obtain the other node's approval.  @@Balance@@ and @@last-interest@@ may only be modified by @@account-entry@@ below.  A change to the interest rate should be followed immediately by an @@account-entry@@ settling the outstanding interest at the former rate, with an identical timestamp as the @@account-set@@ that changed the interest rate.


Account Entry
{
    "type": "account-entry",
    "to": (string),
    "from": (string),
    "time": (date/time),
    "body": {
        "amount": (decimal),
        ("interest": (decimal),)
        "balance": (decimal),
    }
}

* @@amount@@ is amount that @@from@@ node's balance is decreased (ie, @@from@@ pays to @@to@@)
* @@interest@@ is interest accumulated since @@last-interest@@ date, also given as amount that @@from@@ node's balance is decreased.  If this field is included, @@last-interest@@ is set to the entry @@time@@.
* @@balance@@ is the new account balance
* all amounts must be given to the number of decimal places specified in account @@precision@@


Account Verify Request

{
    "type": "account-verify-request",
    "to": (string),
    "from": (string),
    "request-id": (integer),
    "body": {
        "account-id": (string)
    }
}


Account Verify

{
    "type": "account-verify",
    "to": (string),
    "from": (string),
    "request-id": (integer),
    "time": (date/time),
    "body": {
        "account": {
            (...)
    }
}


Account History Request

{
    "type": "account-history-request",
    "to": (string),
    "from": (string),
    "request-id": (integer),
    "body": {
        "account-id": (string),
        "start": (date/time),
        "end": (date/time)
    }
}


Account History

{
    "type": "account-history",
    "to": (string),
    "from": (string),
    "request-id": (integer),
    "body": [
        (a chronological order of signed messages sent and received over
        this account during the requested period that have changed a piece
        of shared account data, in the format they were originally sent or
        received, including signatures)
    ]
}


Account Close

{
    "type": "account-close",
    "to": (string),
    "from": (string),
    "request-id": (integer),
    "body": {
        "account-id": (string)
    }
}