This document describes the API of the @gear-js/voucher-indexer
service.
Get a voucher by its ID.
{
"id": "0x123",
"owner": "0x456",
"spender": "0x789",
"amount": "11000000000000",
"balance": "10000000000000",
"programs": ["0xabc", "0xdef"],
"codeUploading": false,
"expiryAtBlock": 1000,
"expiryAt": "2021-01-01T00:00:00Z",
"issuedAtBlock": 100,
"issuedAt": "2020-01-01T00:00:00Z",
"updatedAtBlock": 200,
"updatedAt": "2020-01-02T00:00:00Z",
"isDeclined": false
}
Get a list of vouchers.
{
"vouchers": [
{
"id": "0x123",
"owner": "0x456",
"spender": "0x789",
"amount": "11000000000000",
"balance": "10000000000000",
"programs": ["0xabc", "0xdef"],
"codeUploading": false,
"expiryAtBlock": 1000,
"expiryAt": "2021-01-01T00:00:00Z",
"issuedAtBlock": 100,
"issuedAt": "2020-01-01T00:00:00Z",
"updatedAtBlock": 200,
"updatedAt": "2020-01-02T00:00:00Z",
"isDeclined": false
}
],
"count": 1
}