Sends the preorder and registration transactions and zone file for a Blockstack name registration along with the to the transaction broadcast service.
The transaction broadcast:
This is intended for use in third-party wallets or in DApps that register names.
the hex-encoded, signed preorder transaction generated
using the makePreorder
function
the hex-encoded, signed register transaction generated
using the makeRegister
function
the zone file to be broadcast to the Atlas network
Returns a Promise that resolves to an object with a
transaction_hash
key containing the transaction hash of the broadcasted transaction.
In the event of an error, it rejects with:
RemoteServiceError
if there is a problem
with the transaction broadcast serviceMissingParameterError
if you call the function without a required
parameterPerforms a POST request to the given URL. This is intended for use in third-party wallets or in DApps that register names.
the name of
Returns a Promise
that resolves to the object requested.
In the event of an error, it rejects with:
RemoteServiceError
if there is a problem
with the transaction broadcast serviceMissingParameterError
if you call the function without a required
parameterBroadcasts a signed bitcoin transaction to the network optionally waiting to broadcast the transaction until a second transaction has a certain number of confirmations.
This is intended for use in third-party wallets or in DApps that register names.
the hex-encoded transaction to broadcast
the hex transaction id of the transaction to watch for
the specified number of confirmations before broadcasting the transaction
the number of confirmations transactionToWatch
must have
before broadcasting transaction
.
Returns a Promise that resolves to an object with a
transaction_hash
key containing the transaction hash of the broadcasted transaction.
In the event of an error, it rejects with:
RemoteServiceError
if there is a problem
with the transaction broadcast serviceMissingParameterError
if you call the function without a required
parameterBroadcasts a zone file to the Atlas network via the transaction broadcast service. This is intended for use in third-party wallets or in DApps that register names.
the zone file to be broadcast to the Atlas network
the hex transaction id of the transaction to watch for confirmation before broadcasting the zone file to the Atlas network
Returns a Promise that resolves to an object with a
transaction_hash
key containing the transaction hash of the broadcasted transaction.
In the event of an error, it rejects with:
RemoteServiceError
if there is a problem
with the transaction broadcast serviceMissingParameterError
if you call the function without a required
parameterGet the state(s) of an account at a particular block height. This includes the state of the account beginning with this block's transactions, as well as all of the states the account passed through when this block was processed (if any).
This is intended for use in third-party wallets or in DApps that register names.
the account's address
the block to query
a promise that resolves to an Array of Objects, where each Object encodes states of the account at this block.
Get the number of tokens owned by an account. If the account does not exist or has no tokens of this type, then 0 will be returned.
This is intended for use in third-party wallets or in DApps that register names.
the account's address
the type of token to query.
a promise that resolves to a BigInteger that encodes the number of tokens held by this account.
Get a page of an account's transaction history. This is intended for use in third-party wallets or in DApps that register names.
the account's address
the page number. Page 0 is the most recent transactions
a promise that resolves to an Array of Objects, where each Object encodes states of the account at various block heights (e.g. prior balances, txids, etc)
Get the status of an account for a particular token holding. This includes its total number of
expenditures and credits, lockup times, last txid
, and so on.
This is intended for use in third-party wallets or in DApps that register names.
the account
the token type to query
a promise that resolves to an object representing the state of the account for this token
Get the set of token types that this account owns. This is intended for use in third-party wallets or in DApps that register names.
the account's address
a promise that resolves to an Array of Strings, where each item encodes the type of token this account holds (excluding the underlying blockchain's tokens)
This is intended for use in third-party wallets or in DApps that register names.
How many blocks can pass between a name expiring and the name being able to be re-registered by a different owner. This is intended for use in third-party wallets or in DApps that register names.
unused
a promise to the number of blocks
Get WHOIS-like information for a name, including the address that owns it, the block at which it expires, and the zone file anchored to it (if available).
This is intended for use in third-party wallets or in DApps that register names.
the name to query. Can be on-chain of off-chain.
a promise that resolves to the WHOIS-like information
Get the price of a name. This is intended for use in third-party wallets or in DApps that register names. This is intended for use in third-party wallets or in DApps that register names.
the name to query
a promise to an Object with { units: String, amount: BigInteger }, where .units encodes the cryptocurrency units to pay (e.g. BTC, STACKS), and .amount encodes the number of units, in the smallest denominiated amount (e.g. if .units is BTC, .amount will be satoshis; if .units is STACKS, .amount will be microStacks)
Get the price of a name via the legacy /v1/prices API endpoint. This is intended for use in third-party wallets or in DApps that register names.
the name to query
a promise to an Object with { units: String, amount: BigInteger }
Get the price of a name via the /v2/prices API endpoint. This is intended for use in third-party wallets or in DApps that register names.
the name to query
a promise to an Object with { units: String, amount: BigInteger }
Get the names -- both on-chain and off-chain -- owned by an address. This is intended for use in third-party wallets or in DApps that register names.
the blockchain address (the hash of the owner public key)
a promise that resolves to a list of names (Strings)
Get the blockchain address to which a name's registration fee must be sent (the address will depend on the namespace in which it is registered.)
This is intended for use in third-party wallets or in DApps that register names.
the namespace ID
a promise that resolves to an address (String)
Get the pricing parameters and creation history of a namespace. This is intended for use in third-party wallets or in DApps that register names.
the namespace to query
a promise that resolves to the namespace information.
Get the price of a namespace. This is intended for use in third-party wallets or in DApps that register names.
the namespace to query
a promise to an Object with { units: String, amount: BigInteger }, where .units encodes the cryptocurrency units to pay (e.g. BTC, STACKS), and .amount encodes the number of units, in the smallest denominiated amount (e.g. if .units is BTC, .amount will be satoshis; if .units is STACKS, .amount will be microStacks)
Get the price of a namespace via the legacy /v1/prices API endpoint. This is intended for use in third-party wallets or in DApps that register names.
the namespace to query
a promise to an Object with { units: String, amount: BigInteger }
Get the price of a namespace via the /v2/prices API endpoint. This is intended for use in third-party wallets or in DApps that register names.
the namespace to query
a promise to an Object with { units: String, amount: BigInteger }
Get a zone file, given its hash. Throws an exception if the zone file obtained does not match the hash.
This is intended for use in third-party wallets or in DApps that register names.
the ripemd160(sha256) hash of the zone file
a promise that resolves to the zone file's text
Generated using TypeDoc
Use the methods in class to build third-party wallets or in DApps that register names.