Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

feat: 568-569 add cursor pagination for withdrawals and deposits #468

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,240 changes: 935 additions & 305 deletions data-node/api/v2/trading_data.pb.go

Large diffs are not rendered by default.

76 changes: 76 additions & 0 deletions data-node/api/v2/trading_data_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 78 additions & 0 deletions generated/json/data-node/api/v2/DepositEdge.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/DepositEdge",
"definitions": {
"DepositEdge": {
"properties": {
"node": {
"$ref": "#/definitions/vega.Deposit",
"additionalProperties": true
},
"cursor": {
"type": "string"
}
},
"additionalProperties": true,
"type": "object",
"title": "Deposit Edge"
},
"vega.Deposit": {
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the deposit"
},
"status": {
"enum": [
"STATUS_UNSPECIFIED",
0,
"STATUS_OPEN",
1,
"STATUS_CANCELLED",
2,
"STATUS_FINALIZED",
3
],
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
],
"title": "Status",
"description": "The status of the deposit"
},
"party_id": {
"type": "string",
"description": "Party identifier of the user initiating the deposit"
},
"asset": {
"type": "string",
"description": "The Vega asset targeted by this deposit"
},
"amount": {
"type": "string",
"description": "The amount to be deposited"
},
"tx_hash": {
"type": "string",
"description": "The hash of the transaction from the foreign chain"
},
"credited_timestamp": {
"type": "string",
"description": "Timestamp for when the Vega account was updated with the deposit"
},
"created_timestamp": {
"type": "string",
"description": "Timestamp for when the deposit was created on the Vega network"
}
},
"additionalProperties": true,
"type": "object",
"title": "Deposit",
"description": "A deposit on to the Vega network"
}
}
}
118 changes: 118 additions & 0 deletions generated/json/data-node/api/v2/DepositsConnection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/DepositsConnection",
"definitions": {
"DepositsConnection": {
"properties": {
"total_count": {
"type": "string"
},
"edges": {
"items": {
"$ref": "#/definitions/datanode.api.v2.DepositEdge"
},
"type": "array"
},
"page_info": {
"$ref": "#/definitions/datanode.api.v2.PageInfo",
"additionalProperties": true
}
},
"additionalProperties": true,
"type": "object",
"title": "Deposits Connection"
},
"datanode.api.v2.DepositEdge": {
"properties": {
"node": {
"$ref": "#/definitions/vega.Deposit",
"additionalProperties": true
},
"cursor": {
"type": "string"
}
},
"additionalProperties": true,
"type": "object",
"title": "Deposit Edge"
},
"datanode.api.v2.PageInfo": {
"properties": {
"has_next_page": {
"type": "boolean"
},
"has_previous_page": {
"type": "boolean"
},
"start_cursor": {
"type": "string"
},
"end_cursor": {
"type": "string"
}
},
"additionalProperties": true,
"type": "object",
"title": "Page Info",
"description": "Page information for cursor based pagination"
},
"vega.Deposit": {
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the deposit"
},
"status": {
"enum": [
"STATUS_UNSPECIFIED",
0,
"STATUS_OPEN",
1,
"STATUS_CANCELLED",
2,
"STATUS_FINALIZED",
3
],
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
],
"title": "Status",
"description": "The status of the deposit"
},
"party_id": {
"type": "string",
"description": "Party identifier of the user initiating the deposit"
},
"asset": {
"type": "string",
"description": "The Vega asset targeted by this deposit"
},
"amount": {
"type": "string",
"description": "The amount to be deposited"
},
"tx_hash": {
"type": "string",
"description": "The hash of the transaction from the foreign chain"
},
"credited_timestamp": {
"type": "string",
"description": "Timestamp for when the Vega account was updated with the deposit"
},
"created_timestamp": {
"type": "string",
"description": "Timestamp for when the deposit was created on the Vega network"
}
},
"additionalProperties": true,
"type": "object",
"title": "Deposit",
"description": "A deposit on to the Vega network"
}
}
}
41 changes: 41 additions & 0 deletions generated/json/data-node/api/v2/GetDepositsRequest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/GetDepositsRequest",
"definitions": {
"GetDepositsRequest": {
"properties": {
"party_id": {
"type": "string"
},
"pagination": {
"$ref": "#/definitions/datanode.api.v2.Pagination",
"additionalProperties": true
}
},
"additionalProperties": true,
"type": "object",
"title": "Get Deposits Request",
"description": "-- Deposits --"
},
"datanode.api.v2.Pagination": {
"properties": {
"first": {
"type": "integer"
},
"after": {
"type": "string"
},
"last": {
"type": "integer"
},
"before": {
"type": "string"
}
},
"additionalProperties": true,
"type": "object",
"title": "Pagination",
"description": "Cursor information for cursor based pagination requests"
}
}
}
Loading