Skip to content

Commit

Permalink
Merge pull request #15 from utxostack/docs/readme
Browse files Browse the repository at this point in the history
Update readme
  • Loading branch information
duanyytop authored Jan 14, 2025
2 parents 50d885a + 62ff748 commit a5b7c91
Showing 1 changed file with 25 additions and 21 deletions.
46 changes: 25 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,41 @@
# typeid-contract-cell-deps

The cell deps of the CKB contracts deployed by TypeID
The `typeid-contract-cell-deps` repository contains the cell deps of the CKB contracts deployed by TypeID.

## Cell Deps APIs

All the supported cellDeps can be fetched with the following Get HTTP request:
You can fetch all supported cell deps using the following HTTP GET request:

```bash
curl -X GET "https://typeid-contract-cell-deps.vercel.app/api/cell-deps"
```

If you want to filter specific cellDeps, append query parameters directly to the URL:
To filter specific cell deps, append query parameters to the URL:

```bash
curl -X GET "https://typeid-contract-cell-deps.vercel.app/api/filter-cell-deps?xudt=false&compatibleUdtCodeHashes=0x1142755a044bf2ee358cba9f2da187ce928c91cd4dc8692ded0337efa677d21a,0x26a33e0815888a4a0614a0b7d09fa951e0993ff21e55905510104a0b1312032b"
```

- **rgbpp**: boolean, true means included, false means not included
- **btcTime**: boolean, true means included, false means not included
- **xudt**: boolean, true means included, false means not included
- **unique**: boolean, true means included, false means not included
- **tokenMetadata**: boolean, true means included, false means not included
- **utxoAirdropBadge**: boolean, true means included, false means not included
- **compatibleUdtCodeHashe**s: string, a comma-separated string to represent code hash array
### Query Parameters

- **rgbpp**: boolean, `true` means included, `false` means not included
- **btcTime**: boolean, `true` means included, `false` means not included
- **xudt**: boolean, `true` means included, `false` means not included
- **unique**: boolean, `true` means included, `false` means not included
- **tokenMetadata**: boolean, `true` means included, `false` means not included
- **utxoAirdropBadge**: boolean, `true` means included, `false` means not included
- **compatibleUdtCodeHashes**: string, a comma-separated string representing code hash array

All the cellDeps will be cached for 30 ~ 60 seconds, and the cache detail can be found [here](./api/cell-deps.ts).
All cell deps are cached for 30 to 60 seconds. Cache details can be found [here](./api/cell-deps.ts).

## Compatible xUDT TypeId deployment information
## Compatible xUDT TypeId Deployment Information

A fungible token that is fully compatible with xUDT can directly submit the deployment information of the mainnet and testnet in the [compatible-udt.json](./compatible-udt.json) file, and the API response will return the cellDep of the asset.
A fungible token fully compatible with xUDT can submit deployment information for the mainnet and testnet in the [compatible-udt.json](./compatible-udt.json) file. The API response will return the cell dep of the asset.

**Anyone can create a GitHub Pull Request to add his/her fully-compatible-xUDT TypeId deployment information**
**Anyone can create a GitHub Pull Request to add their fully-compatible-xUDT TypeId deployment information.**

**Feel free to submit your token information**
**Feel free to submit your token information.**

The fully-compatible-xUDT JSON format is like this:
The fully-compatible-xUDT JSON format is as follows:

```json
{
Expand All @@ -46,12 +47,15 @@ The fully-compatible-xUDT JSON format is like this:
"deploymentTypeArgs": "0x97d30b723c0b2c66e9cb8d4d0df4ab5d7222cbb00d4a9a2055ce2e5d7f0d8b0f"
}
```

### Annotative Optional Fields
- _description: The compatible-xUDT token description
- _udt_link: The compatible-xUDT token detail link of the CKB Explorer
- _deployment_link: The compatible-xUDT token deployment transaction detail link of the CKB Explorer

- **_description**: The compatible-xUDT token description
- **_udt_link**: The compatible-xUDT token detail link on the CKB Explorer
- **_deployment_link**: The compatible-xUDT token deployment transaction detail link on the CKB Explorer

### Required Fields
- **network**: testnet or mainnet for Nervos CKB

- **network**: `testnet` or `mainnet` for Nervos CKB
- **codeHash**: The compatible-xUDT token code hash
- **deploymentTypeArgs**: The compatible-xUDT token deployment transaction output type script args

0 comments on commit a5b7c91

Please sign in to comment.