Register

Price

Get the price for domain registering.

GET https://cns.api.pawket.app/api/price

Request:

?name=123458.xch&year=1&renew=false
KeyRequired?Description
nameYesthe name to register, typically suffix with .xch
yearYeshow many year to register or renew, max 99
renewNowhether to get price for register or renew

Response:

{
  "name": "123458.xch",
  "price": 400000000000,
  "annualFee": 250000000000,
  "registrationFee": 150000000000,
  "royaltyPercentage": 500,
  "success": true
}
KeyTypeDescription
nameStringthe name to register or renew
priceNumberthe total price for register or renew, in mojo
annualFeeNumberthe annual fee for this name, in mojo
registrationFeeNumberthe registration fee for this name, in mojo
royaltyPercentageNumberthe royalty percentage in 1/10000, e.g. 500=5%
successBooleanwhether success to get price information
codeStringif failed, this is the error code
reasonStringif failed, this is the reason
argumentsString[]if failed, this is the arguments for reason

Register

Get the offer for registering or renewing.

POST https://cns.api.pawket.app/api/register

Request:

{
  "name": "123458.xch",
  "royaltyAddress": "",
  "address": "",
  "publicKey": "",
  "did": "",
  "text": "",
  "renew": false,
  "year": 1
}
KeyRequired?Description
nameYesthe name to register, typically suffix with .xch
yearYeshow many year to register or renew, max 99
royaltyAddressNothe default royalty address of this CNS NFT, format like xch1...
addressNothe default binding address, format like xch1
publicKeyNothe default binding publick key, format usually like 0x...
didNothe default binding DID, format like did:chia:...
textNothe default binding text, can be arbitrary text except double quotes
renewNowhether to get price for register or renew

Response:

{
  "name": "123458.xch",
  "offer": "offer1qqr83....",
  "image": "/9j/4AAQSkZJRg....",
  "success": true
}
KeyTypeDescription
nameStringthe name to register or renew
imageStringthe NFT image in base64
offerStringthe offer string
successBooleanwhether success to get register offer
codeStringif failed, this is the error code
reasonStringif failed, this is the reason
argumentsString[]if failed, this is the arguments for reason