diff --git a/files/grest/rpc/00_blockchain/reserve_withdrawals.sql b/files/grest/rpc/00_blockchain/reserve_withdrawals.sql new file mode 100644 index 00000000..4c0f3c18 --- /dev/null +++ b/files/grest/rpc/00_blockchain/reserve_withdrawals.sql @@ -0,0 +1,27 @@ +CREATE OR REPLACE FUNCTION grest.reserve_withdrawals() +RETURNS TABLE ( + epoch_no word31type, + epoch_slot word31type, + tx_hash text, + block_hash text, + block_height word31type, + amount text, + stake_address text +) +LANGUAGE SQL STABLE +AS $$ + SELECT + b.epoch_no, + b.epoch_slot_no, + ENCODE(tx.hash,'hex'), + ENCODE(b.hash,'hex'), + b.block_no, + r.amount::text, + sa.view + FROM reserve AS r + LEFT JOIN tx ON r.tx_id = tx.id + INNER JOIN block AS b ON tx.block_id = b.id + LEFT JOIN stake_address AS sa ON sa.id = r.addr_id; +$$; + +COMMENT ON FUNCTION grest.reserve_withdrawals IS 'A list of withdrawals made from reserves (MIRs)'; --noqa: LT01 \ No newline at end of file diff --git a/files/grest/rpc/00_blockchain/treasury_withdrawals.sql b/files/grest/rpc/00_blockchain/treasury_withdrawals.sql new file mode 100644 index 00000000..b9919831 --- /dev/null +++ b/files/grest/rpc/00_blockchain/treasury_withdrawals.sql @@ -0,0 +1,27 @@ +CREATE OR REPLACE FUNCTION grest.treasury_withdrawals() +RETURNS TABLE ( + epoch_no word31type, + epoch_slot word31type, + tx_hash text, + block_hash text, + block_height word31type, + amount text, + stake_address text +) +LANGUAGE SQL STABLE +AS $$ + SELECT + b.epoch_no, + b.epoch_slot_no, + ENCODE(tx.hash,'hex'), + ENCODE(b.hash,'hex'), + b.block_no, + t.amount::text, + sa.view + FROM treasury AS t + LEFT JOIN tx ON t.tx_id = tx.id + INNER JOIN block AS b ON tx.block_id = b.id + LEFT JOIN stake_address AS sa ON sa.id = t.addr_id; +$$; + +COMMENT ON FUNCTION grest.treasury_withdrawals IS 'A list of withdrawals made from treasury'; --noqa: LT01 \ No newline at end of file diff --git a/files/grest/rpc/pool/pool_registrations.sql b/files/grest/rpc/pool/pool_registrations.sql new file mode 100644 index 00000000..855ff4bd --- /dev/null +++ b/files/grest/rpc/pool/pool_registrations.sql @@ -0,0 +1,28 @@ +CREATE OR REPLACE FUNCTION grest.pool_registrations(_epoch_no numeric) +RETURNS TABLE ( + pool_id_bech32 text, + tx_hash text, + block_hash text, + block_height word31type, + epoch_no word31type, + epoch_slot word31type, + active_epoch_no word31type +) +LANGUAGE SQL STABLE +AS $$ + SELECT + ph.view, + ENCODE(tx.hash,'hex'), + ENCODE(b.hash,'hex'), + b.block_no, + b.epoch_no, + b.epoch_slot_no, + pu.active_epoch_no + FROM pool_update AS pu + LEFT JOIN tx ON pu.registered_tx_id = tx.id + INNER JOIN block AS b ON tx.block_id = b.id + LEFT JOIN pool_hash AS ph ON ph.id = pu.hash_id + WHERE b.epoch_no = _epoch_no; +$$; + +COMMENT ON FUNCTION grest.pool_registrations IS 'A list of all pool registrations initiated in the requested epoch'; --noqa: LT01 \ No newline at end of file diff --git a/files/grest/rpc/pool/pool_relays.sql b/files/grest/rpc/pool/pool_relays.sql index 2b3e2c09..84b70ab9 100644 --- a/files/grest/rpc/pool/pool_relays.sql +++ b/files/grest/rpc/pool/pool_relays.sql @@ -20,4 +20,4 @@ BEGIN END; $$; -COMMENT ON FUNCTION grest.pool_relays IS 'A list of registered relays for all pools'; --noqa: LT01 +COMMENT ON FUNCTION grest.pool_relays IS 'A list of registered relays for all pools'; --noqa: LT01 \ No newline at end of file diff --git a/files/grest/rpc/pool/pool_retirements.sql b/files/grest/rpc/pool/pool_retirements.sql new file mode 100644 index 00000000..d2e7a16a --- /dev/null +++ b/files/grest/rpc/pool/pool_retirements.sql @@ -0,0 +1,28 @@ +CREATE OR REPLACE FUNCTION grest.pool_retirements(_epoch_no numeric) +RETURNS TABLE ( + pool_id_bech32 text, + tx_hash text, + block_hash text, + block_height word31type, + epoch_no word31type, + epoch_slot word31type, + active_epoch_no word31type +) +LANGUAGE SQL STABLE +AS $$ + SELECT + ph.view, + ENCODE(tx.hash,'hex'), + ENCODE(b.hash,'hex'), + b.block_no, + b.epoch_no, + b.epoch_slot_no, + pr.retiring_epoch + FROM pool_retire AS pr + LEFT JOIN tx ON pr.announced_tx_id = tx.id + INNER JOIN block AS b ON tx.block_id = b.id + LEFT JOIN pool_hash AS ph ON ph.id = pr.hash_id + WHERE b.epoch_no = _epoch_no; +$$; + +COMMENT ON FUNCTION grest.pool_registrations IS 'A list of all pool retirements initiated in the requested epoch'; --noqa: LT01 \ No newline at end of file diff --git a/specs/results/koiosapi-guild.yaml b/specs/results/koiosapi-guild.yaml index 4294860b..45e95819 100644 --- a/specs/results/koiosapi-guild.yaml +++ b/specs/results/koiosapi-guild.yaml @@ -232,6 +232,44 @@ paths: $ref: "#/components/responses/NotFound" summary: Param Update Proposals description: Get all parameter update proposals submitted to the chain starting Shelley era + /reserve_withdrawals: #RPC + get: + tags: + - Network + responses: + "200": + description: Array of withdrawals from reserves against stake accounts + content: + application/json: + schema: + $ref: "#/components/schemas/reserve_withdrawals" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Reserve Withdrawals + description: List of all withdrawals from reserves against stake accounts + /treasury_withdrawals: #RPC + get: + tags: + - Network + responses: + "200": + description: Array of withdrawals from treasury against stake accounts + content: + application/json: + schema: + $ref: "#/components/schemas/reserve_withdrawals" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Treasury Withdrawals + description: List of all withdrawals from treasury against stake accounts /epoch_info: #RPC get: @@ -1362,6 +1400,48 @@ paths: $ref: "#/components/responses/NotFound" summary: Pool Updates (History) description: Return all pool updates for all pools or only updates for specific pool if specified + /pool_registrations: #RPC + get: + tags: + - Pool + parameters: + - $ref: "#/components/parameters/_epoch_no" + responses: + "200": + description: Array of historical pool updates + content: + application/json: + schema: + $ref: "#/components/schemas/pool_registrations" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Pool Registrations + description: Return all pool registrations initiated in the requested epoch + /pool_retirements: #RPC + get: + tags: + - Pool + parameters: + - $ref: "#/components/parameters/_epoch_no" + responses: + "200": + description: Array of historical pool updates + content: + application/json: + schema: + $ref: "#/components/schemas/pool_registrations" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Pool Retirements + description: Return all pool retirements initiated in the requested epoch /pool_relays: #RPC get: tags: @@ -2281,6 +2361,24 @@ components: type: string description: JSON encoded data with details about the parameter update example: {"decentralisation": 0.9} + reserve_withdrawals: + type: array + items: + properties: + epoch_no: + $ref: "#/components/schemas/epoch_info/items/properties/epoch_no" + epoch_slot: + $ref: "#/components/schemas/blocks/items/properties/epoch_slot" + tx_hash: + $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + block_hash: + $ref: "#/components/schemas/blocks/items/properties/hash" + block_height: + $ref: "#/components/schemas/blocks/items/properties/block_height" + amount: + $ref: "#/components/schemas/pool_delegators/items/properties/amount" + stake_address: + $ref: "#/components/schemas/account_history/items/properties/stake_address" pool_list: type: array items: @@ -2569,6 +2667,26 @@ components: type: string description: Latest transaction hash used for delegation by the account example: 368d08fe86804d637649341d3aec4a9baa7dffa6d00f16de2ba9dba814f1c948 + pool_registrations: + type: array + nullable: true + items: + type: object + properties: + pool_id_bech32: + $ref: "#/components/schemas/pool_info/items/properties/pool_id_bech32" + tx_hash: + $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + block_hash: + $ref: "#/components/schemas/blocks/items/properties/hash" + block_height: + $ref: "#/components/schemas/blocks/items/properties/block_height" + epoch_no: + $ref: "#/components/schemas/epoch_info/items/properties/epoch_no" + epoch_slot: + $ref: "#/components/schemas/blocks/items/properties/epoch_slot" + active_epoch_no: + $ref: "#/components/schemas/pool_updates/items/properties/active_epoch_no" pool_delegators_history: type: array nullable: true diff --git a/specs/results/koiosapi-mainnet.yaml b/specs/results/koiosapi-mainnet.yaml index c0be2965..867a1ce0 100644 --- a/specs/results/koiosapi-mainnet.yaml +++ b/specs/results/koiosapi-mainnet.yaml @@ -232,6 +232,44 @@ paths: $ref: "#/components/responses/NotFound" summary: Param Update Proposals description: Get all parameter update proposals submitted to the chain starting Shelley era + /reserve_withdrawals: #RPC + get: + tags: + - Network + responses: + "200": + description: Array of withdrawals from reserves against stake accounts + content: + application/json: + schema: + $ref: "#/components/schemas/reserve_withdrawals" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Reserve Withdrawals + description: List of all withdrawals from reserves against stake accounts + /treasury_withdrawals: #RPC + get: + tags: + - Network + responses: + "200": + description: Array of withdrawals from treasury against stake accounts + content: + application/json: + schema: + $ref: "#/components/schemas/reserve_withdrawals" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Treasury Withdrawals + description: List of all withdrawals from treasury against stake accounts /epoch_info: #RPC get: @@ -1362,6 +1400,48 @@ paths: $ref: "#/components/responses/NotFound" summary: Pool Updates (History) description: Return all pool updates for all pools or only updates for specific pool if specified + /pool_registrations: #RPC + get: + tags: + - Pool + parameters: + - $ref: "#/components/parameters/_epoch_no" + responses: + "200": + description: Array of historical pool updates + content: + application/json: + schema: + $ref: "#/components/schemas/pool_registrations" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Pool Registrations + description: Return all pool registrations initiated in the requested epoch + /pool_retirements: #RPC + get: + tags: + - Pool + parameters: + - $ref: "#/components/parameters/_epoch_no" + responses: + "200": + description: Array of historical pool updates + content: + application/json: + schema: + $ref: "#/components/schemas/pool_registrations" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Pool Retirements + description: Return all pool retirements initiated in the requested epoch /pool_relays: #RPC get: tags: @@ -1885,7 +1965,7 @@ components: _stake_addresses: - stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250 - stake1uxpdrerp9wrxunfh6ukyv5267j70fzxgw0fr3z8zeac5vyqhf9jhy - _epoch_no: 350 + _epoch_no: 409 stake_addresses_with_first_only_and_empty: content: application/json: @@ -2281,6 +2361,24 @@ components: type: string description: JSON encoded data with details about the parameter update example: {"decentralisation": 0.9} + reserve_withdrawals: + type: array + items: + properties: + epoch_no: + $ref: "#/components/schemas/epoch_info/items/properties/epoch_no" + epoch_slot: + $ref: "#/components/schemas/blocks/items/properties/epoch_slot" + tx_hash: + $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + block_hash: + $ref: "#/components/schemas/blocks/items/properties/hash" + block_height: + $ref: "#/components/schemas/blocks/items/properties/block_height" + amount: + $ref: "#/components/schemas/pool_delegators/items/properties/amount" + stake_address: + $ref: "#/components/schemas/account_history/items/properties/stake_address" pool_list: type: array items: @@ -2569,6 +2667,26 @@ components: type: string description: Latest transaction hash used for delegation by the account example: 368d08fe86804d637649341d3aec4a9baa7dffa6d00f16de2ba9dba814f1c948 + pool_registrations: + type: array + nullable: true + items: + type: object + properties: + pool_id_bech32: + $ref: "#/components/schemas/pool_info/items/properties/pool_id_bech32" + tx_hash: + $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + block_hash: + $ref: "#/components/schemas/blocks/items/properties/hash" + block_height: + $ref: "#/components/schemas/blocks/items/properties/block_height" + epoch_no: + $ref: "#/components/schemas/epoch_info/items/properties/epoch_no" + epoch_slot: + $ref: "#/components/schemas/blocks/items/properties/epoch_slot" + active_epoch_no: + $ref: "#/components/schemas/pool_updates/items/properties/active_epoch_no" pool_delegators_history: type: array nullable: true diff --git a/specs/results/koiosapi-preprod.yaml b/specs/results/koiosapi-preprod.yaml index 25be6ec8..1eb430c4 100644 --- a/specs/results/koiosapi-preprod.yaml +++ b/specs/results/koiosapi-preprod.yaml @@ -232,6 +232,44 @@ paths: $ref: "#/components/responses/NotFound" summary: Param Update Proposals description: Get all parameter update proposals submitted to the chain starting Shelley era + /reserve_withdrawals: #RPC + get: + tags: + - Network + responses: + "200": + description: Array of withdrawals from reserves against stake accounts + content: + application/json: + schema: + $ref: "#/components/schemas/reserve_withdrawals" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Reserve Withdrawals + description: List of all withdrawals from reserves against stake accounts + /treasury_withdrawals: #RPC + get: + tags: + - Network + responses: + "200": + description: Array of withdrawals from treasury against stake accounts + content: + application/json: + schema: + $ref: "#/components/schemas/reserve_withdrawals" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Treasury Withdrawals + description: List of all withdrawals from treasury against stake accounts /epoch_info: #RPC get: @@ -1362,6 +1400,48 @@ paths: $ref: "#/components/responses/NotFound" summary: Pool Updates (History) description: Return all pool updates for all pools or only updates for specific pool if specified + /pool_registrations: #RPC + get: + tags: + - Pool + parameters: + - $ref: "#/components/parameters/_epoch_no" + responses: + "200": + description: Array of historical pool updates + content: + application/json: + schema: + $ref: "#/components/schemas/pool_registrations" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Pool Registrations + description: Return all pool registrations initiated in the requested epoch + /pool_retirements: #RPC + get: + tags: + - Pool + parameters: + - $ref: "#/components/parameters/_epoch_no" + responses: + "200": + description: Array of historical pool updates + content: + application/json: + schema: + $ref: "#/components/schemas/pool_registrations" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Pool Retirements + description: Return all pool retirements initiated in the requested epoch /pool_relays: #RPC get: tags: @@ -2281,6 +2361,24 @@ components: type: string description: JSON encoded data with details about the parameter update example: {"decentralisation": 0.9} + reserve_withdrawals: + type: array + items: + properties: + epoch_no: + $ref: "#/components/schemas/epoch_info/items/properties/epoch_no" + epoch_slot: + $ref: "#/components/schemas/blocks/items/properties/epoch_slot" + tx_hash: + $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + block_hash: + $ref: "#/components/schemas/blocks/items/properties/hash" + block_height: + $ref: "#/components/schemas/blocks/items/properties/block_height" + amount: + $ref: "#/components/schemas/pool_delegators/items/properties/amount" + stake_address: + $ref: "#/components/schemas/account_history/items/properties/stake_address" pool_list: type: array items: @@ -2569,6 +2667,26 @@ components: type: string description: Latest transaction hash used for delegation by the account example: 368d08fe86804d637649341d3aec4a9baa7dffa6d00f16de2ba9dba814f1c948 + pool_registrations: + type: array + nullable: true + items: + type: object + properties: + pool_id_bech32: + $ref: "#/components/schemas/pool_info/items/properties/pool_id_bech32" + tx_hash: + $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + block_hash: + $ref: "#/components/schemas/blocks/items/properties/hash" + block_height: + $ref: "#/components/schemas/blocks/items/properties/block_height" + epoch_no: + $ref: "#/components/schemas/epoch_info/items/properties/epoch_no" + epoch_slot: + $ref: "#/components/schemas/blocks/items/properties/epoch_slot" + active_epoch_no: + $ref: "#/components/schemas/pool_updates/items/properties/active_epoch_no" pool_delegators_history: type: array nullable: true diff --git a/specs/results/koiosapi-preview.yaml b/specs/results/koiosapi-preview.yaml index 68fd1687..bbbd5055 100644 --- a/specs/results/koiosapi-preview.yaml +++ b/specs/results/koiosapi-preview.yaml @@ -232,6 +232,44 @@ paths: $ref: "#/components/responses/NotFound" summary: Param Update Proposals description: Get all parameter update proposals submitted to the chain starting Shelley era + /reserve_withdrawals: #RPC + get: + tags: + - Network + responses: + "200": + description: Array of withdrawals from reserves against stake accounts + content: + application/json: + schema: + $ref: "#/components/schemas/reserve_withdrawals" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Reserve Withdrawals + description: List of all withdrawals from reserves against stake accounts + /treasury_withdrawals: #RPC + get: + tags: + - Network + responses: + "200": + description: Array of withdrawals from treasury against stake accounts + content: + application/json: + schema: + $ref: "#/components/schemas/reserve_withdrawals" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Treasury Withdrawals + description: List of all withdrawals from treasury against stake accounts /epoch_info: #RPC get: @@ -1362,6 +1400,48 @@ paths: $ref: "#/components/responses/NotFound" summary: Pool Updates (History) description: Return all pool updates for all pools or only updates for specific pool if specified + /pool_registrations: #RPC + get: + tags: + - Pool + parameters: + - $ref: "#/components/parameters/_epoch_no" + responses: + "200": + description: Array of historical pool updates + content: + application/json: + schema: + $ref: "#/components/schemas/pool_registrations" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Pool Registrations + description: Return all pool registrations initiated in the requested epoch + /pool_retirements: #RPC + get: + tags: + - Pool + parameters: + - $ref: "#/components/parameters/_epoch_no" + responses: + "200": + description: Array of historical pool updates + content: + application/json: + schema: + $ref: "#/components/schemas/pool_registrations" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Pool Retirements + description: Return all pool retirements initiated in the requested epoch /pool_relays: #RPC get: tags: @@ -2281,6 +2361,24 @@ components: type: string description: JSON encoded data with details about the parameter update example: {"decentralisation": 0.9} + reserve_withdrawals: + type: array + items: + properties: + epoch_no: + $ref: "#/components/schemas/epoch_info/items/properties/epoch_no" + epoch_slot: + $ref: "#/components/schemas/blocks/items/properties/epoch_slot" + tx_hash: + $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + block_hash: + $ref: "#/components/schemas/blocks/items/properties/hash" + block_height: + $ref: "#/components/schemas/blocks/items/properties/block_height" + amount: + $ref: "#/components/schemas/pool_delegators/items/properties/amount" + stake_address: + $ref: "#/components/schemas/account_history/items/properties/stake_address" pool_list: type: array items: @@ -2569,6 +2667,26 @@ components: type: string description: Latest transaction hash used for delegation by the account example: 368d08fe86804d637649341d3aec4a9baa7dffa6d00f16de2ba9dba814f1c948 + pool_registrations: + type: array + nullable: true + items: + type: object + properties: + pool_id_bech32: + $ref: "#/components/schemas/pool_info/items/properties/pool_id_bech32" + tx_hash: + $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + block_hash: + $ref: "#/components/schemas/blocks/items/properties/hash" + block_height: + $ref: "#/components/schemas/blocks/items/properties/block_height" + epoch_no: + $ref: "#/components/schemas/epoch_info/items/properties/epoch_no" + epoch_slot: + $ref: "#/components/schemas/blocks/items/properties/epoch_slot" + active_epoch_no: + $ref: "#/components/schemas/pool_updates/items/properties/active_epoch_no" pool_delegators_history: type: array nullable: true diff --git a/specs/templates/4-api-schemas.yaml b/specs/templates/4-api-schemas.yaml index 00fbc712..f370f9cb 100644 --- a/specs/templates/4-api-schemas.yaml +++ b/specs/templates/4-api-schemas.yaml @@ -111,6 +111,24 @@ schemas: type: string description: JSON encoded data with details about the parameter update example: {"decentralisation": 0.9} + reserve_withdrawals: + type: array + items: + properties: + epoch_no: + $ref: "#/components/schemas/epoch_info/items/properties/epoch_no" + epoch_slot: + $ref: "#/components/schemas/blocks/items/properties/epoch_slot" + tx_hash: + $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + block_hash: + $ref: "#/components/schemas/blocks/items/properties/hash" + block_height: + $ref: "#/components/schemas/blocks/items/properties/block_height" + amount: + $ref: "#/components/schemas/pool_delegators/items/properties/amount" + stake_address: + $ref: "#/components/schemas/account_history/items/properties/stake_address" pool_list: type: array items: @@ -399,6 +417,26 @@ schemas: type: string description: Latest transaction hash used for delegation by the account example: 368d08fe86804d637649341d3aec4a9baa7dffa6d00f16de2ba9dba814f1c948 + pool_registrations: + type: array + nullable: true + items: + type: object + properties: + pool_id_bech32: + $ref: "#/components/schemas/pool_info/items/properties/pool_id_bech32" + tx_hash: + $ref: "#/components/schemas/tx_info/items/properties/tx_hash" + block_hash: + $ref: "#/components/schemas/blocks/items/properties/hash" + block_height: + $ref: "#/components/schemas/blocks/items/properties/block_height" + epoch_no: + $ref: "#/components/schemas/epoch_info/items/properties/epoch_no" + epoch_slot: + $ref: "#/components/schemas/blocks/items/properties/epoch_slot" + active_epoch_no: + $ref: "#/components/schemas/pool_updates/items/properties/active_epoch_no" pool_delegators_history: type: array nullable: true diff --git a/specs/templates/api-main.yaml b/specs/templates/api-main.yaml index 96aa728c..2a0eccbb 100644 --- a/specs/templates/api-main.yaml +++ b/specs/templates/api-main.yaml @@ -87,6 +87,44 @@ paths: $ref: "#/components/responses/NotFound" summary: Param Update Proposals description: Get all parameter update proposals submitted to the chain starting Shelley era + /reserve_withdrawals: #RPC + get: + tags: + - Network + responses: + "200": + description: Array of withdrawals from reserves against stake accounts + content: + application/json: + schema: + $ref: "#/components/schemas/reserve_withdrawals" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Reserve Withdrawals + description: List of all withdrawals from reserves against stake accounts + /treasury_withdrawals: #RPC + get: + tags: + - Network + responses: + "200": + description: Array of withdrawals from treasury against stake accounts + content: + application/json: + schema: + $ref: "#/components/schemas/reserve_withdrawals" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Treasury Withdrawals + description: List of all withdrawals from treasury against stake accounts /epoch_info: #RPC get: @@ -1217,6 +1255,48 @@ paths: $ref: "#/components/responses/NotFound" summary: Pool Updates (History) description: Return all pool updates for all pools or only updates for specific pool if specified + /pool_registrations: #RPC + get: + tags: + - Pool + parameters: + - $ref: "#/components/parameters/_epoch_no" + responses: + "200": + description: Array of historical pool updates + content: + application/json: + schema: + $ref: "#/components/schemas/pool_registrations" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Pool Registrations + description: Return all pool registrations initiated in the requested epoch + /pool_retirements: #RPC + get: + tags: + - Pool + parameters: + - $ref: "#/components/parameters/_epoch_no" + responses: + "200": + description: Array of historical pool updates + content: + application/json: + schema: + $ref: "#/components/schemas/pool_registrations" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "404": + $ref: "#/components/responses/NotFound" + summary: Pool Retirements + description: Return all pool retirements initiated in the requested epoch /pool_relays: #RPC get: tags: diff --git a/specs/templates/example-map.json b/specs/templates/example-map.json index 07e6f63a..e67131cf 100644 --- a/specs/templates/example-map.json +++ b/specs/templates/example-map.json @@ -87,7 +87,7 @@ }, "requestBodies": { "epoch_no": { - "m": "350", + "m": "409", "g": "1500", "pv": "11", "pp": "30"