Skip to content

Commit 6acacb8

Browse files
committed
Add address_list output
Add deprecated to various policy endpoints (other than policy asset mints, which relies on cache)
1 parent a44c419 commit 6acacb8

File tree

7 files changed

+144
-5
lines changed

7 files changed

+144
-5
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
CREATE OR REPLACE FUNCTION grest.address_list()
2+
RETURNS TABLE (
3+
address text,
4+
address_hex text,
5+
has_script boolean,
6+
payment_cred text,
7+
stake_address text
8+
)
9+
LANGUAGE sql STABLE
10+
AS $$
11+
SELECT
12+
a.address::text,
13+
ENCODE(a.raw,'hex')::text,
14+
a.has_script,
15+
ENCODE(a.payment_cred,'hex')::text,
16+
ENCODE(sa.hash_raw,'hex')::text,
17+
sa.view
18+
FROM address AS a
19+
LEFT JOIN stake_address AS sa ON a.stake_address_id = sa.id
20+
ORDER BY a.id DESC
21+
;
22+
$$;
23+
24+
COMMENT ON FUNCTION grest.address_list IS 'Get a list of all used addresses on chain'; -- noqa: LT01

specs/results/koiosapi-guild.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ info:
88
license:
99
name: Creative Commons Attribution 4.0 International
1010
url: https://github.com/cardano-community/koios-artifacts/blob/main/LICENSE
11-
version: v1.3.2
11+
version: v1.4.0alpha
1212
description: |
1313
Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples.
1414
@@ -721,6 +721,26 @@ paths:
721721
- color: red
722722
label: "Deprecated"
723723

724+
/address_list: #RPC
725+
get:
726+
tags:
727+
- Address
728+
responses:
729+
"200":
730+
description: Success!!
731+
content:
732+
application/json:
733+
schema:
734+
$ref: "#/components/schemas/address_list"
735+
"400":
736+
$ref: "#/components/responses/BadRequest"
737+
"401":
738+
$ref: "#/components/responses/Unauthorized"
739+
"404":
740+
$ref: "#/components/responses/NotFound"
741+
summary: Address List
742+
description: Get a list of all used address on blockchain
743+
operationId: account_list
724744
/address_info: #RPC
725745
post:
726746
tags:
@@ -1201,6 +1221,7 @@ paths:
12011221
operationId: asset_list
12021222
/policy_asset_list: #RPC
12031223
get:
1224+
deprecated: true
12041225
tags:
12051226
- Asset
12061227
parameters:
@@ -1359,6 +1380,7 @@ paths:
13591380
operationId: asset_nft_address
13601381
/policy_asset_addresses: #RPC
13611382
get:
1383+
deprecated: true
13621384
tags:
13631385
- Asset
13641386
parameters:
@@ -1384,6 +1406,7 @@ paths:
13841406
query layers to have a dedicated cache table for themselves served via Koios.`
13851407
operationId: policy_asset_addresses
13861408
/policy_asset_info: #RPC
1409+
deprecated: true
13871410
get:
13881411
tags:
13891412
- Asset

specs/results/koiosapi-mainnet.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ info:
88
license:
99
name: Creative Commons Attribution 4.0 International
1010
url: https://github.com/cardano-community/koios-artifacts/blob/main/LICENSE
11-
version: v1.3.2
11+
version: v1.4.0alpha
1212
description: |
1313
Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples.
1414
@@ -721,6 +721,26 @@ paths:
721721
- color: red
722722
label: "Deprecated"
723723

724+
/address_list: #RPC
725+
get:
726+
tags:
727+
- Address
728+
responses:
729+
"200":
730+
description: Success!!
731+
content:
732+
application/json:
733+
schema:
734+
$ref: "#/components/schemas/address_list"
735+
"400":
736+
$ref: "#/components/responses/BadRequest"
737+
"401":
738+
$ref: "#/components/responses/Unauthorized"
739+
"404":
740+
$ref: "#/components/responses/NotFound"
741+
summary: Address List
742+
description: Get a list of all used address on blockchain
743+
operationId: account_list
724744
/address_info: #RPC
725745
post:
726746
tags:
@@ -1201,6 +1221,7 @@ paths:
12011221
operationId: asset_list
12021222
/policy_asset_list: #RPC
12031223
get:
1224+
deprecated: true
12041225
tags:
12051226
- Asset
12061227
parameters:
@@ -1359,6 +1380,7 @@ paths:
13591380
operationId: asset_nft_address
13601381
/policy_asset_addresses: #RPC
13611382
get:
1383+
deprecated: true
13621384
tags:
13631385
- Asset
13641386
parameters:
@@ -1384,6 +1406,7 @@ paths:
13841406
query layers to have a dedicated cache table for themselves served via Koios.`
13851407
operationId: policy_asset_addresses
13861408
/policy_asset_info: #RPC
1409+
deprecated: true
13871410
get:
13881411
tags:
13891412
- Asset

specs/results/koiosapi-preprod.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ info:
88
license:
99
name: Creative Commons Attribution 4.0 International
1010
url: https://github.com/cardano-community/koios-artifacts/blob/main/LICENSE
11-
version: v1.3.2
11+
version: v1.4.0alpha
1212
description: |
1313
Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples.
1414
@@ -721,6 +721,26 @@ paths:
721721
- color: red
722722
label: "Deprecated"
723723

724+
/address_list: #RPC
725+
get:
726+
tags:
727+
- Address
728+
responses:
729+
"200":
730+
description: Success!!
731+
content:
732+
application/json:
733+
schema:
734+
$ref: "#/components/schemas/address_list"
735+
"400":
736+
$ref: "#/components/responses/BadRequest"
737+
"401":
738+
$ref: "#/components/responses/Unauthorized"
739+
"404":
740+
$ref: "#/components/responses/NotFound"
741+
summary: Address List
742+
description: Get a list of all used address on blockchain
743+
operationId: account_list
724744
/address_info: #RPC
725745
post:
726746
tags:
@@ -1201,6 +1221,7 @@ paths:
12011221
operationId: asset_list
12021222
/policy_asset_list: #RPC
12031223
get:
1224+
deprecated: true
12041225
tags:
12051226
- Asset
12061227
parameters:
@@ -1359,6 +1380,7 @@ paths:
13591380
operationId: asset_nft_address
13601381
/policy_asset_addresses: #RPC
13611382
get:
1383+
deprecated: true
13621384
tags:
13631385
- Asset
13641386
parameters:
@@ -1384,6 +1406,7 @@ paths:
13841406
query layers to have a dedicated cache table for themselves served via Koios.`
13851407
operationId: policy_asset_addresses
13861408
/policy_asset_info: #RPC
1409+
deprecated: true
13871410
get:
13881411
tags:
13891412
- Asset

specs/results/koiosapi-preview.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ info:
88
license:
99
name: Creative Commons Attribution 4.0 International
1010
url: https://github.com/cardano-community/koios-artifacts/blob/main/LICENSE
11-
version: v1.3.2
11+
version: v1.4.0alpha
1212
description: |
1313
Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples.
1414
@@ -721,6 +721,26 @@ paths:
721721
- color: red
722722
label: "Deprecated"
723723

724+
/address_list: #RPC
725+
get:
726+
tags:
727+
- Address
728+
responses:
729+
"200":
730+
description: Success!!
731+
content:
732+
application/json:
733+
schema:
734+
$ref: "#/components/schemas/address_list"
735+
"400":
736+
$ref: "#/components/responses/BadRequest"
737+
"401":
738+
$ref: "#/components/responses/Unauthorized"
739+
"404":
740+
$ref: "#/components/responses/NotFound"
741+
summary: Address List
742+
description: Get a list of all used address on blockchain
743+
operationId: account_list
724744
/address_info: #RPC
725745
post:
726746
tags:
@@ -1201,6 +1221,7 @@ paths:
12011221
operationId: asset_list
12021222
/policy_asset_list: #RPC
12031223
get:
1224+
deprecated: true
12041225
tags:
12051226
- Asset
12061227
parameters:
@@ -1359,6 +1380,7 @@ paths:
13591380
operationId: asset_nft_address
13601381
/policy_asset_addresses: #RPC
13611382
get:
1383+
deprecated: true
13621384
tags:
13631385
- Asset
13641386
parameters:
@@ -1384,6 +1406,7 @@ paths:
13841406
query layers to have a dedicated cache table for themselves served via Koios.`
13851407
operationId: policy_asset_addresses
13861408
/policy_asset_info: #RPC
1409+
deprecated: true
13871410
get:
13881411
tags:
13891412
- Asset

specs/templates/1-api-info.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ info:
77
license:
88
name: Creative Commons Attribution 4.0 International
99
url: https://github.com/cardano-community/koios-artifacts/blob/main/LICENSE
10-
version: v1.3.2
10+
version: v1.4.0alpha
1111
description: |
1212
Koios is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc. This page not only provides an OpenAPI Spec for live implementation, but also ability to execute live demo from client browser against each endpoint with pre-filled examples.
1313

specs/templates/api-main.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,26 @@ paths:
576576
- color: red
577577
label: "Deprecated"
578578

579+
/address_list: #RPC
580+
get:
581+
tags:
582+
- Address
583+
responses:
584+
"200":
585+
description: Success!!
586+
content:
587+
application/json:
588+
schema:
589+
$ref: "#/components/schemas/address_list"
590+
"400":
591+
$ref: "#/components/responses/BadRequest"
592+
"401":
593+
$ref: "#/components/responses/Unauthorized"
594+
"404":
595+
$ref: "#/components/responses/NotFound"
596+
summary: Address List
597+
description: Get a list of all used address on blockchain
598+
operationId: account_list
579599
/address_info: #RPC
580600
post:
581601
tags:
@@ -1056,6 +1076,7 @@ paths:
10561076
operationId: asset_list
10571077
/policy_asset_list: #RPC
10581078
get:
1079+
deprecated: true
10591080
tags:
10601081
- Asset
10611082
parameters:
@@ -1214,6 +1235,7 @@ paths:
12141235
operationId: asset_nft_address
12151236
/policy_asset_addresses: #RPC
12161237
get:
1238+
deprecated: true
12171239
tags:
12181240
- Asset
12191241
parameters:
@@ -1239,6 +1261,7 @@ paths:
12391261
query layers to have a dedicated cache table for themselves served via Koios.`
12401262
operationId: policy_asset_addresses
12411263
/policy_asset_info: #RPC
1264+
deprecated: true
12421265
get:
12431266
tags:
12441267
- Asset

0 commit comments

Comments
 (0)