sl.contracts
Find contracts that conform to a trait, or get one from the registry by id.
| list(params) | ContractsEnvelope | Find contracts conforming to trait. |
| get(contractId, opts) | ContractSummary | null | Get one contract from the registry by id, or null. |
sl.contracts.list(params)
REST GET /v1/contractssource
Find contracts conforming to trait. trait is required (server 400s without it).
Parameters
hover a row to find it in the codeRequired
traitrequiredstring | Required. Trait identifier to match (e.g. "sip-010", or a fully-qualified trait). |
Options
conformanceContractConformance | Match source. Defaults to "any" server-side. |
include"abi" | Set to "abi" to include the full ABI blob in each row. |
limitnumber | Page size, 1–500 (default 100 server-side). |
cursorstring | Opaque cursor from a prior response's next_cursor. |
Returns Promise<ContractsEnvelope>
contracts- ContractSummary[]
next_cursor- string | null
Get one contract from the registry by id, or null.
The prod-safe ABI source. Pass { includeAbi: true } for the full ABI blob. Resolves to null on 404.
Parameters
hover a row to find it in the codeRequired
contractIdrequiredstring |
Options
opts.includeAbiboolean |
Returns Promise<ContractSummary | null>
contract_id- string
deployer- string
block_height- number
declared_traits- string[] | null
inferred_standards- string[] | null
abi_status- string
abi- Present only when
include: "abi"was requested.
ContractConformanceWhether a trait match must be declared in source, inferred from ABI, or either.
ContractsEnvelopeOne page of contracts and the cursor for the next page.
ContractsListParamsTrait, conformance, and paging for listing contracts.
ContractSummaryA deployed contract with its traits, standards, and ABI status.