activity2
Introduction
The activity2 method is used to query the node's ActivityStorage for a historical log of events associated with a specific wallet. This includes transactions, mining rewards, signing rewards, and other on-chain activities.
The endpoint supports pagination, allowing clients to efficiently retrieve the activity list in discrete chunks. This is the primary method for populating a user-facing transaction or activity history view.
Request
Requests can be made using either HTTP POST with a JSON body (recommended for complex requests) or HTTP GET with URL query parameters (useful for simple queries and browser-based access).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
wallet | string | Yes | The base58-encoded Ixian wallet address for which to retrieve activity. |
fromId | string | No | The id of the last activity from the previous page. Used for pagination. If omitted, the query starts from the latest activity. |
count | string | No | The maximum number of activity items to return. Defaults to 50. |
type | string | No | A string-encoded integer representing the ActivityType to filter by. If omitted, all activity types are returned. |
descending | string | No | If set to "true", results are returned in descending order (newest first). Defaults to false (ascending). |
Example POST Request
POST /activity2
Content-Type: application/json
{
"method": "activity2",
"params": {
"wallet": "1EXSqPpj49ZmKiWF8stsMsMXVnSfkee7EzTaBakwNn9sJdaWm",
"count": "10",
"descending": "true"
},
"id": 1
}
Example GET Request
The params object is flattened into URL query string parameters.
GET /activity2?wallet=1EXSqPpj49ZmKiWF8stsMsMXVnSfkee7EzTaBakwNn9sJdaWm&count=10&descending=true
Response
The response format is a standard JSON-RPC object, regardless of whether the request was made via GET or POST. The result is an array of ActivityObject structures, sorted according to the request parameters.
Result: ActivityObject Structure
| Name | Type | Description |
|---|---|---|
id | string | A unique identifier for this activity entry. This value is used in the fromId parameter for pagination. |
seedHash | string | The Base64-encoded seed hash of the associated wallet. |
type | integer | An enum value identifying the type of the activity. See the ActivityType table below. |
timestamp | integer | The Unix Epoch timestamp (in seconds) when the event occurred. |
status | integer | An enum value indicating the status of the activity. See the ActivityStatus table below. |
fromAddressList | object | A map of sender addresses to their IxiNumber values involved in the activity. |
toAddressList | object | A map of recipient addresses to their IxiNumber values involved in the activity. |
value | IxiNumber | The primary value of the activity, represented as a string to preserve precision. |
fee | IxiNumber | The fee associated with the transaction, represented as a string. |
appliedBlockHeight | integer | The block number in which this activity was recorded. |
transaction | object | null | The full transaction object associated with the activity, if available. |
Example Success Response
{
"result": [
{
"id": "stk-478387-478392-22NsqTQCGkWa6gyRHYsQbbJNCvC8vVzer6WnV4g9ThuHDdtKkpcKGMfiYGneA",
"seedHash": "AIeMKxG8QDs3a8fE0zmSKw==",
"type": 201,
"timestamp": 1776981957,
"status": 2,
"fromAddressList": {
"1ixianinfinimine234234234234234234234234234242HP": "50991.87446676"
},
"toAddressList": {
"1EXSqPpj49ZmKiWF8stsMsMXVnSfkee7EzTaBakwNn9sJdaWm": "32920.16494997"
},
"value": "32920.16494997",
"fee": "0.00000000",
"appliedBlockHeight": 478393,
"transaction": null
}
],
"error": null,
"id": null
}
Example Error Response
This error is returned if the node is not configured to provide the ActivityStorage service.
{
"result": null,
"id": 1,
"error": {
"code": -32603,
"message": "/activity2 can't be used, because ActivityStorage was not implemented."
}
}
Enumerations
ActivityType
| Value | Name | Description |
|---|---|---|
0 | None | An uninitialized or unspecified activity type. |
100 | TransactionReceived | A standard IXI transaction was received by the wallet. |
101 | TransactionSent | A standard IXI transaction was sent from the wallet. |
200 | MiningReward | A reward for PoW mining was generated. |
201 | SigningReward | A reward for signing participation was received. |
300 | ContactRequest | A contact request was received. |
400 | IxiName | An IXI Name registration or management transaction. |
ActivityStatus
| Value | Name | Description |
|---|---|---|
1 | Pending | The activity is not yet confirmed in the blockchain. |
2 | Final | The activity is finalized and included in the blockchain. |
3 | Expired | The activity has expired. |
4 | Reverted | The activity was reverted (e.g., due to a block reorg). |
5 | Rejected | The activity was rejected. |
6 | Unknown | The activity status is unknown. |
Behavioral Notes
- Pagination: To fetch the next page of results, take the
idof the last item from the current result set, and use it as thefromIdparameter in the next request. - Wallet Scope: The query is always scoped to a single wallet's
seedHash. The node derives theseedHashfrom the providedwalletaddress. An error will occur if thewalletparameter is missing or invalid. - Node Configuration: This endpoint is only available on DLT nodes that have the
ActivityStoragemodule enabled and fully synchronized.