Get contract package

Get a contract package by its identifier (contract package hash).

GET /contract-packages/{contract_package_hash}

This endpoint allows you to retrieve detailed information about a specific contract package using its unique identifier, the contract package hash. The response includes various properties such as owner public key, name, description, metadata, latest version contract type ID, timestamp, icon URL, and deploys number.

Query params

None

Sorting

None

Optional properties

None

Response

ContractPackage

Example

curl -X 'GET' \
  'https://api.testnet.cspr.cloud/contract-packages/ae2feaa4e86841c1c6f40f1779e1e1cb1d9d4d52a0eb82a8962829646524e744' \
  -H 'Accept: application/json' \
  -H 'Authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'
{
  "data": {
    "contract_package_hash": "ae2feaa4e86841c1c6f40f1779e1e1cb1d9d4d52a0eb82a8962829646524e744",
    "owner_public_key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01",
    "name": "MyContractPackage",
    "description": "A sample contract package",
    "metadata": {
      "name": "MyToken",
      "symbol": "MT",
      "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/icon.png",
    "deploys_number": 42
  }
}

Last updated