Get a paginated list of contract packages.
This endpoint allows you to retrieve a paginated list of contract packages. You can filter the results by owner public key, specify the page number and size, and choose the sorting order and field. Additionally, you can include optional deploys number data in the response. The example shows a sample response with relevant details for each contract package, including contract package hash, owner public key, name, description, metadata, latest version contract type ID, timestamp, icon URL, and deploys number.
Copy curl -X 'GET' \
'https://api.testnet.cspr.cloud/contract-packages' \
-H 'Accept: application/json' \
-H 'Authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'
Copy {
"data" : [
{
"contract_package_hash" : "ae2feaa4e86841c1c6f40f1779e1e1cb1d9d4d52a0eb82a8962829646524e744" ,
"owner_public_key" : "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01" ,
"name" : "MyContractPackage1" ,
"description" : "A sample contract package" ,
"metadata" : {
"name" : "MyToken1" ,
"symbol" : "MT1" ,
"decimals" : 18 ,
"balances_uref" : "uref-0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef-007" ,
"total_supply_uref" : "uref-abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef-007" ,
"ownership_mode" : 1 ,
"nft_kind" : 2 ,
"nft_metadata_kind" : 1 ,
"whitelist_mode" : 0 ,
"holder_mode" : 1 ,
"minting_mode" : 2 ,
"burn_mode" : 1 ,
"identifier_mode" : 0 ,
"metadata_mutability" : 1 ,
"owner_reverse_lookup_mode" : 1 ,
"events_mode" : 2
} ,
"latest_version_contract_type_id" : 3 ,
"timestamp" : "2023-01-01T12:00:00Z" ,
"icon_url" : "https://example.com/icon1.png" ,
"deploys_number" : 42
} ,
{
"contract_package_hash" : "be2feaa4e86841c1c6f40f1779e1e1cb1d9d4d52a0eb82a8962829646524e745" ,
"owner_public_key" : "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" ,
"name" : "MyContractPackage2" ,
"description" : "Another sample contract package" ,
"metadata" : {
"name" : "MyToken2" ,
"symbol" : "MT2" ,
"decimals" : 18 ,
"balances_uref" : "uref-abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef-007" ,
"total_supply_uref" : "uref-0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef-007" ,
"ownership_mode" : 1 ,
"nft_kind" : 2 ,
"nft_metadata_kind" : 1 ,
"whitelist_mode" : 0 ,
"holder_mode" : 1 ,
"minting_mode" : 2 ,
"burn_mode" : 1 ,
"identifier_mode" : 0 ,
"metadata_mutability" : 1 ,
"owner_reverse_lookup_mode" : 1 ,
"events_mode" : 2
} ,
"latest_version_contract_type_id" : 4 ,
"timestamp" : "2023-01-02T12:00:00Z" ,
"icon_url" : "https://example.com/icon2.png" ,
"deploys_number" : 56
} ,
...
] ,
"item_count" : 100 ,
"page_count" : 10
}