Browse Source

fix: update refs with bns

feat/new-clarity-onboarding
Alexander Graebe 4 years ago
committed by Alexander Graebe
parent
commit
3e90b33a34
  1. 341
      src/_data/boot-contracts-reference.json

341
src/_data/boot-contracts-reference.json

@ -1,4 +1,345 @@
{
"bns": {
"public_functions": [
{
"name": "name-import",
"input_type": "(buff 20), (buff 48), principal, (buff 20)",
"output_type": "(response bool int)",
"signature": "(name-import namespace name beneficiary zonefile-hash)",
"description": "Import name to a revealed namespace. Each imported name is given both an owner and some off-chain state."
},
{
"name": "name-preorder",
"input_type": "(buff 20), uint",
"output_type": "(response uint int)",
"signature": "(name-preorder hashed-salted-fqn stx-to-burn)",
"description": "Preorders a name by telling all BNS nodes the salted hash of the BNS name. It pays the registration fee to the namespace owner's designated address."
},
{
"name": "name-register",
"input_type": "(buff 20), (buff 48), (buff 20), (buff 20)",
"output_type": "(response bool int)",
"signature": "(name-register namespace name salt zonefile-hash)",
"description": "Reveals the salt and the name to all BNS nodes, and assigns the name an initial public key hash and zone file hash."
},
{
"name": "name-renewal",
"input_type": "(buff 20), (buff 48), uint, (optional principal), (optional (buff 20))",
"output_type": "(response bool int)",
"signature": "(name-renewal namespace name stx-to-burn new-owner zonefile-hash)",
"description": "Depending in the namespace rules, a name can expire. For example, names in the .id namespace expire after 2 years. You need to send a name reveal every so often to keep your name.\n\nYou will pay the registration cost of your name to the namespace's designated burn address when you renew it.\nWhen a name expires, it enters a month-long \"grace period\" (5000 blocks). \n\nIt will stop resolving in the grace period, and all of the above operations will cease to be honored by the BNS consensus rules.\nYou may, however, send a NAME_RENEWAL during this grace period to preserve your name.\nIf your name is in a namespace where names do not expire, then you never need to use this transaction."
},
{
"name": "name-revoke",
"input_type": "(buff 20), (buff 48)",
"output_type": "(response bool int)",
"signature": "(name-revoke namespace name)",
"description": "Makes a name unresolvable. The BNS consensus rules stipulate that once a name is revoked, no one can change its public key hash or its zone file hash. The name's zone file hash is set to null to prevent it from resolving. You should only do this if your private key is compromised, or if you want to render your name unusable for whatever reason."
},
{
"name": "name-transfer",
"input_type": "(buff 20), (buff 48), principal, (optional (buff 20))",
"output_type": "(response bool int)",
"signature": "(name-transfer namespace name new-owner zonefile-hash)",
"description": "Changes the name's public key hash. You would send one of these transactions if you wanted to:\n* Change your private key\n* Send the name to someone else\n\nWhen transferring a name, you have the option to also clear the name's zone file hash (i.e. set it to null). This is useful for when you send the name to someone else, so the recipient's name does not resolve to your zone file."
},
{
"name": "name-update",
"input_type": "(buff 20), (buff 48), (buff 20)",
"output_type": "(response bool int)",
"signature": "(name-update namespace name zonefile-hash)",
"description": "Changes the name's zone file hash. You would send one of these transactions if you wanted to change the name's zone file contents. For example, you would do this if you want to deploy your own Gaia hub and want other people to read from it."
},
{
"name": "namespace-preorder",
"input_type": "(buff 20), uint",
"output_type": "(response uint int)",
"signature": "(namespace-preorder hashed-salted-namespace stx-to-burn)",
"description": "Registers the salted hash of the namespace with BNS nodes, and burns the requisite amount of cryptocurrency. Additionally, this step proves to the BNS nodes that user has honored the BNS consensus rules by including a recent consensus hash in the transaction. Returns pre-order's expiration date (in blocks)."
},
{
"name": "namespace-ready",
"input_type": "(buff 20)",
"output_type": "(response bool int)",
"signature": "(namespace-ready namespace)",
"description": "Launches the namespace and makes it available to the public. Once a namespace is launched, anyone can register a name in it if they pay the appropriate amount of cryptocurrency."
},
{
"name": "namespace-reveal",
"input_type": "(buff 20), (buff 20), uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, principal",
"output_type": "(response bool int)",
"signature": "(namespace-reveal namespace namespace-salt p-func-base p-func-coeff p-func-b1 p-func-b2 p-func-b3 p-func-b4 p-func-b5 p-func-b6 p-func-b7 p-func-b8 p-func-b9 p-func-b10 p-func-b11 p-func-b12 p-func-b13 p-func-b14 p-func-b15 p-func-b16 p-func-non-alpha-discount p-func-no-vowel-discount lifetime namespace-import)",
"description": "Reveals the salt and the namespace ID (pafter a namespace preorder). It reveals how long names last in this namespace before they expire or must be renewed, and it sets a price function for the namespace that determines how cheap or expensive names its will be."
}
],
"read_only_functions": [
{
"name": "can-name-be-registered",
"input_type": "(buff 20), (buff 48)",
"output_type": "(response bool int)",
"signature": "(can-name-be-registered namespace name)",
"description": "Returns true if the provided name can be registered."
},
{
"name": "can-namespace-be-registered",
"input_type": "(buff 20)",
"output_type": "(response bool UnknownType)",
"signature": "(can-namespace-be-registered namespace)",
"description": "Returns true if the provided namespace is available."
},
{
"name": "can-receive-name",
"input_type": "principal",
"output_type": "(response bool int)",
"signature": "(can-receive-name owner)",
"description": "Returns true if the provided name can be received. That is, if it is not curretly owned, a previous lease is expired, and the name wasn't revoked."
},
{
"name": "get-name-price",
"input_type": "(buff 20), (buff 48)",
"output_type": "(response uint int)",
"signature": "(get-name-price namespace name)",
"description": "Get the price for a name."
},
{
"name": "get-namespace-price",
"input_type": "(buff 20)",
"output_type": "(response uint int)",
"signature": "(get-namespace-price namespace)",
"description": "Get the price for a namespace."
},
{
"name": "get-namespace-properties",
"input_type": "(buff 20)",
"output_type": "(response (tuple (namespace (buff 20)) (properties (tuple (can-update-price-function bool) (launched-at (optional uint)) (lifetime uint) (namespace-import principal) (price-function (tuple (base uint) (buckets (list 16 uint)) (coeff uint) (no-vowel-discount uint) (nonalpha-discount uint))) (revealed-at uint)))) int)",
"signature": "(get-namespace-properties namespace)",
"description": "Get namespace properties."
},
{
"name": "is-name-lease-expired",
"input_type": "(buff 20), (buff 48)",
"output_type": "(response bool int)",
"signature": "(is-name-lease-expired namespace name)",
"description": "Return true if the provided name lease is expired."
},
{
"name": "name-resolve",
"input_type": "(buff 20), (buff 48)",
"output_type": "(response (tuple (lease-ending-at (optional uint)) (lease-started-at uint) (owner principal) (zonefile-hash (buff 20))) int)",
"signature": "(name-resolve namespace name)",
"description": "Get name registration details."
},
{
"name": "resolve-principal",
"input_type": "principal",
"output_type": "(response (tuple (name (buff 48)) (namespace (buff 20))) (tuple (code int) (name (optional (tuple (name (buff 48)) (namespace (buff 20)))))))",
"signature": "(resolve-principal owner)",
"description": "Returns the name for a principal, if there is one."
}
],
"error_codes": [
{
"name": "ERR_INSUFFICIENT_FUNDS",
"type": "int",
"value": "4001"
},
{
"name": "ERR_NAMESPACE_ALREADY_EXISTS",
"type": "int",
"value": "1006"
},
{
"name": "ERR_NAMESPACE_ALREADY_LAUNCHED",
"type": "int",
"value": "1014"
},
{
"name": "ERR_NAMESPACE_BLANK",
"type": "int",
"value": "1013"
},
{
"name": "ERR_NAMESPACE_CHARSET_INVALID",
"type": "int",
"value": "1016"
},
{
"name": "ERR_NAMESPACE_HASH_MALFORMED",
"type": "int",
"value": "1015"
},
{
"name": "ERR_NAMESPACE_NOT_FOUND",
"type": "int",
"value": "1005"
},
{
"name": "ERR_NAMESPACE_NOT_LAUNCHED",
"type": "int",
"value": "1007"
},
{
"name": "ERR_NAMESPACE_OPERATION_UNAUTHORIZED",
"type": "int",
"value": "1011"
},
{
"name": "ERR_NAMESPACE_PREORDER_ALREADY_EXISTS",
"type": "int",
"value": "1003"
},
{
"name": "ERR_NAMESPACE_PREORDER_CLAIMABILITY_EXPIRED",
"type": "int",
"value": "1009"
},
{
"name": "ERR_NAMESPACE_PREORDER_EXPIRED",
"type": "int",
"value": "1002"
},
{
"name": "ERR_NAMESPACE_PREORDER_LAUNCHABILITY_EXPIRED",
"type": "int",
"value": "1010"
},
{
"name": "ERR_NAMESPACE_PREORDER_NOT_FOUND",
"type": "int",
"value": "1001"
},
{
"name": "ERR_NAMESPACE_PRICE_FUNCTION_INVALID",
"type": "int",
"value": "1008"
},
{
"name": "ERR_NAMESPACE_STX_BURNT_INSUFFICIENT",
"type": "int",
"value": "1012"
},
{
"name": "ERR_NAMESPACE_UNAVAILABLE",
"type": "int",
"value": "1004"
},
{
"name": "ERR_NAME_ALREADY_CLAIMED",
"type": "int",
"value": "2011"
},
{
"name": "ERR_NAME_BLANK",
"type": "int",
"value": "2010"
},
{
"name": "ERR_NAME_CHARSET_INVALID",
"type": "int",
"value": "2022"
},
{
"name": "ERR_NAME_CLAIMABILITY_EXPIRED",
"type": "int",
"value": "2012"
},
{
"name": "ERR_NAME_COULD_NOT_BE_MINTED",
"type": "int",
"value": "2020"
},
{
"name": "ERR_NAME_COULD_NOT_BE_TRANSFERED",
"type": "int",
"value": "2021"
},
{
"name": "ERR_NAME_EXPIRED",
"type": "int",
"value": "2008"
},
{
"name": "ERR_NAME_GRACE_PERIOD",
"type": "int",
"value": "2009"
},
{
"name": "ERR_NAME_HASH_MALFORMED",
"type": "int",
"value": "2017"
},
{
"name": "ERR_NAME_NOT_FOUND",
"type": "int",
"value": "2013"
},
{
"name": "ERR_NAME_NOT_RESOLVABLE",
"type": "int",
"value": "2019"
},
{
"name": "ERR_NAME_OPERATION_UNAUTHORIZED",
"type": "int",
"value": "2006"
},
{
"name": "ERR_NAME_PREORDERED_BEFORE_NAMESPACE_LAUNCH",
"type": "int",
"value": "2018"
},
{
"name": "ERR_NAME_PREORDER_ALREADY_EXISTS",
"type": "int",
"value": "2016"
},
{
"name": "ERR_NAME_PREORDER_EXPIRED",
"type": "int",
"value": "2002"
},
{
"name": "ERR_NAME_PREORDER_FUNDS_INSUFFICIENT",
"type": "int",
"value": "2003"
},
{
"name": "ERR_NAME_PREORDER_NOT_FOUND",
"type": "int",
"value": "2001"
},
{
"name": "ERR_NAME_REVOKED",
"type": "int",
"value": "2014"
},
{
"name": "ERR_NAME_STX_BURNT_INSUFFICIENT",
"type": "int",
"value": "2007"
},
{
"name": "ERR_NAME_TRANSFER_FAILED",
"type": "int",
"value": "2015"
},
{
"name": "ERR_NAME_UNAVAILABLE",
"type": "int",
"value": "2004"
},
{
"name": "ERR_PANIC",
"type": "int",
"value": "0"
},
{
"name": "ERR_PRINCIPAL_ALREADY_ASSOCIATED",
"type": "int",
"value": "3001"
}
]
},
"pox": {
"public_functions": [
{

Loading…
Cancel
Save