Options
All
  • Public
  • Public/Protected
  • All
Menu

Stacks.js 1.0.0 Library Reference

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

AllowedKeyEntropyBits

AllowedKeyEntropyBits: 128 | 256

AnyJson

AnyJson: string | number | boolean | null | {} | AnyJson[]

AppKeyInfoType

AppKeyInfoType: { keyInfo: { address: string; privateKey: string }; legacyKeyInfo: { address: string; privateKey: string }; ownerKeyIndex: number }

Type declaration

  • keyInfo: { address: string; privateKey: string }
    • address: string
    • privateKey: string
  • legacyKeyInfo: { address: string; privateKey: string }
    • address: string
    • privateKey: string
  • ownerKeyIndex: number

AuthMetadata

AuthMetadata: { email?: undefined | string; profileUrl?: undefined | string }

Type declaration

  • Optional email?: undefined | string
  • Optional profileUrl?: undefined | string

BooleanCV

BooleanCV: TrueCV | FalseCV

CipherAlgorithm

CipherAlgorithm: "aes-256-cbc" | "aes-128-cbc"

ClarityAbiType

ClarityAbiTypeBool

ClarityAbiTypeBool: "bool"

ClarityAbiTypeBuffer

ClarityAbiTypeBuffer: { buffer: { length: number } }

Type declaration

  • buffer: { length: number }
    • length: number

ClarityAbiTypeInt128

ClarityAbiTypeInt128: "int128"

ClarityAbiTypeList

ClarityAbiTypeList: { list: { length: number; type: ClarityAbiType } }

Type declaration

ClarityAbiTypeNone

ClarityAbiTypeNone: "none"

ClarityAbiTypeOptional

ClarityAbiTypeOptional: { optional: ClarityAbiType }

Type declaration

ClarityAbiTypePrimitive

ClarityAbiTypePrincipal

ClarityAbiTypePrincipal: "principal"

ClarityAbiTypeResponse

ClarityAbiTypeResponse: { response: { error: ClarityAbiType; ok: ClarityAbiType } }

Type declaration

ClarityAbiTypeStringAscii

ClarityAbiTypeStringAscii: { string-ascii: { length: number } }

Type declaration

  • string-ascii: { length: number }
    • length: number

ClarityAbiTypeStringUtf8

ClarityAbiTypeStringUtf8: { string-utf8: { length: number } }

Type declaration

  • string-utf8: { length: number }
    • length: number

ClarityAbiTypeTraitReference

ClarityAbiTypeTraitReference: "trait_reference"

ClarityAbiTypeTuple

ClarityAbiTypeTuple: { tuple: { name: string; type: ClarityAbiType }[] }

Type declaration

ClarityAbiTypeUInt128

ClarityAbiTypeUInt128: "uint128"

ClarityAbiTypeUnion

ClarityValue

CommandFunction

CommandFunction: (network: CLINetworkAdapter, args: string[]) => Promise<string | Buffer>

Type declaration

DocsArgsType

DocsArgsType: { format: string; name: string; type: string; value: string }

Type declaration

  • format: string
  • name: string
  • type: string
  • value: string

EtagMap

EtagMap: {}

Type declaration

  • [key: string]: string

FormattedDocsType

FormattedDocsType: { args: DocsArgsType[]; command: string; group: string; usage: string }

Type declaration

  • args: DocsArgsType[]
  • command: string
  • group: string
  • usage: string

GetRandomBytes

GetRandomBytes: (count: number) => Buffer

Optional function to generate cryptographically secure random bytes

Type declaration

    • (count: number): Buffer
    • Parameters

      • count: number

      Returns Buffer

MultiSigHashMode

MultiSigHashMode: SerializeP2SH | SerializeP2WSH

NameInfoType

NameInfoType: { address: string; blockchain?: undefined | string; did?: undefined | string; expire_block?: undefined | number; grace_period?: undefined | number; last_txid?: undefined | string; renewal_deadline?: undefined | number; resolver?: string | null; status?: undefined | string; zonefile?: string | null; zonefile_hash?: string | null }

Type declaration

  • address: string
  • Optional blockchain?: undefined | string
  • Optional did?: undefined | string
  • Optional expire_block?: undefined | number
  • Optional grace_period?: undefined | number
  • Optional last_txid?: undefined | string
  • Optional renewal_deadline?: undefined | number
  • Optional resolver?: string | null
  • Optional status?: undefined | string
  • Optional zonefile?: string | null
  • Optional zonefile_hash?: string | null

NodeCryptoCreateCipher

NodeCryptoCreateCipher: createCipheriv

NodeCryptoCreateDecipher

NodeCryptoCreateDecipher: createDecipheriv

NodeCryptoCreateHash

NodeCryptoCreateHash: createHash

NodeCryptoCreateHmac

NodeCryptoCreateHmac: createHmac

NodePbkdf2Fn

NodePbkdf2Fn: pbkdf2

OptionalCV

OptionalCV: NoneCV | SomeCV

OwnerKeyInfoType

OwnerKeyInfoType: { idAddress: string; index: number; privateKey: string; version: string }

Type declaration

  • idAddress: string
  • index: number
  • privateKey: string
  • version: string

Payload

PaymentKeyInfoType

PaymentKeyInfoType: { address: { BTC: string; STACKS: string }; index: number; privateKey: string }

Type declaration

  • address: { BTC: string; STACKS: string }
    • BTC: string
    • STACKS: string
  • index: number
  • privateKey: string

Pbkdf2Digests

Pbkdf2Digests: "sha512" | "sha256"

PostCondition

PostConditionPrincipal

PostConditionPrincipal: StandardPrincipal | ContractPrincipal

PrincipalCV

PutFileContent

PutFileContent: string | Buffer | ArrayBufferView | ArrayBufferLike | Blob

Retrieves the specified file from the app's data store.

param

the path to the file to read

returns

that resolves to the raw data in the file or rejects with an error

ReadOnlyFunctionResponse

ResponseCV

SingleSigHashMode

SingleSigHashMode: SerializeP2PKH | SerializeP2WPKH

SpendingCondition

StackerInfo

StackerInfo: { stacked: false } | { details: { amount_microstx: string; first_reward_cycle: number; lock_period: number; pox_address: { hashbytes: Buffer; version: Buffer }; unlock_height: number }; stacked: true }

StacksKeyInfoType

StacksKeyInfoType: { address: string; btcAddress: string; index: number; privateKey: string }

Type declaration

  • address: string
  • btcAddress: string
  • index: number
  • privateKey: string

StacksMessage

TransactionAuthFieldContents

TransactionAuthFieldContents: StacksPublicKey | MessageSignature

TriplesecDecryptSignature

TriplesecDecryptSignature: (arg: { data: Buffer; key: Buffer }, cb: (err: Error | null, buff: Buffer | null) => void) => void

Type declaration

    • (arg: { data: Buffer; key: Buffer }, cb: (err: Error | null, buff: Buffer | null) => void): void
    • Parameters

      • arg: { data: Buffer; key: Buffer }
        • data: Buffer
        • key: Buffer
      • cb: (err: Error | null, buff: Buffer | null) => void
          • (err: Error | null, buff: Buffer | null): void
          • Parameters

            • err: Error | null
            • buff: Buffer | null

            Returns void

      Returns void

TupleData

TupleData: {}

Type declaration

TxBroadcastResult

TxBroadcastResultOk

TxBroadcastResultOk: string

TxBroadcastResultRejected

TxBroadcastResultRejected: { error: string; reason: TxRejectedReason; reason_data: any; txid: string }

Type declaration

Variables

Const ADDRESS_CHARS

ADDRESS_CHARS: "[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{1,35}" = "[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{1,35}"

Const ADDRESS_PATTERN

ADDRESS_PATTERN: string = `^(${ADDRESS_CHARS})$`

Const APPS_NODE_INDEX

APPS_NODE_INDEX: 0 = 0

Const AUTH_CONTINUATION_PARAM

AUTH_CONTINUATION_PARAM: "authContinuation" = "authContinuation"

Const BLOCKSTACK_ON_BITCOIN

BLOCKSTACK_ON_BITCOIN: 0 = 0

Let BLOCKSTACK_TEST

BLOCKSTACK_TEST: boolean = !!process.env.BLOCKSTACK_TEST

Const BN

BN: any = require('bn.js')

Const BOOLEAN_PATTERN

BOOLEAN_PATTERN: "^(0|1|true|false)$" = "^(0|1|true|false)$"

Const C32_ADDRESS_CHARS

C32_ADDRESS_CHARS: "[0123456789ABCDEFGHJKMNPQRSTVWXYZ]+" = "[0123456789ABCDEFGHJKMNPQRSTVWXYZ]+"

Const CHANGE_ADDRESS

CHANGE_ADDRESS: "CHANGE_ADDRESS" = "CHANGE_ADDRESS"

Const CLARITY_INT_SIZE

CLARITY_INT_SIZE: 128 = 128

Const COINBASE_BUFFER_LENGTH_BYTES

COINBASE_BUFFER_LENGTH_BYTES: 32 = 32

Const COMPRESSED_PUBKEY_LENGTH_BYTES

COMPRESSED_PUBKEY_LENGTH_BYTES: 32 = 32

Const CONFIG_INDEX

CONFIG_INDEX: 45 = 45

Const CONTEXT

CONTEXT: "http://schema.org" = "http://schema.org"

Const DEFAULT_BLOCKSTACK_HOST

DEFAULT_BLOCKSTACK_HOST: "https://browser.blockstack.org/auth" = "https://browser.blockstack.org/auth"

This constant is used in the [[redirectToSignInWithAuthRequest]]

Const DEFAULT_CHAIN_ID

DEFAULT_CHAIN_ID: Mainnet = ChainID.Mainnet

Const DEFAULT_CONFIG_PATH

DEFAULT_CONFIG_PATH: "~/.blockstack-cli.conf" = "~/.blockstack-cli.conf"

Const DEFAULT_CONFIG_REGTEST_PATH

DEFAULT_CONFIG_REGTEST_PATH: "~/.blockstack-cli-regtest.conf" = "~/.blockstack-cli-regtest.conf"

Const DEFAULT_CONFIG_TESTNET_PATH

DEFAULT_CONFIG_TESTNET_PATH: "~/.blockstack-cli-testnet.conf" = "~/.blockstack-cli-testnet.conf"

Const DEFAULT_CORE_NODE_API_URL

DEFAULT_CORE_NODE_API_URL: "https://stacks-node-api.mainnet.stacks.co" = "https://stacks-node-api.mainnet.stacks.co"

Const DEFAULT_GAIA_HUB

DEFAULT_GAIA_HUB: "https://gaia.blockstack.org/hub/" = "https://gaia.blockstack.org/hub/"

Const DEFAULT_MAX_ID_SEARCH_INDEX

DEFAULT_MAX_ID_SEARCH_INDEX: 256 = 256

Const DEFAULT_PROFILE_FILE_NAME

DEFAULT_PROFILE_FILE_NAME: "profile.json" = "profile.json"

Const DEFAULT_TRANSACTION_VERSION

DEFAULT_TRANSACTION_VERSION: Mainnet = TransactionVersion.Mainnet

Const DERIVATION_PATH

DERIVATION_PATH: "m/44'/5757'/0'/0/0" = "m/44'/5757'/0'/0/0"

Const ECHO_REPLY_PARAM

ECHO_REPLY_PARAM: "echoReply" = "echoReply"

Const ENCRYPTION_NODE_INDEX

ENCRYPTION_NODE_INDEX: 2 = 2

Const EXTERNAL_ADDRESS

EXTERNAL_ADDRESS: "EXTERNAL_ADDRESS" = "EXTERNAL_ADDRESS"

Const GLOBAL_DETECTION_CACHE_KEY

GLOBAL_DETECTION_CACHE_KEY: "_blockstackDidCheckEchoReply" = "_blockstackDidCheckEchoReply"

This logic is in a separate file with no dependencies so that it can be loaded and executed as soon as possible to fulfill the purpose of the protocol detection technique. The effectiveness of this is obviously subject to how web apps bundle/consume the blockstack.js lib.

Const IDENTITY_KEYCHAIN

IDENTITY_KEYCHAIN: 888 = 888

Const ID_ADDRESS_PATTERN

ID_ADDRESS_PATTERN: string = `^ID-${ADDRESS_CHARS}$`

Const IMAGE_TYPE

IMAGE_TYPE: "ImageObject" = "ImageObject"

Const INT_PATTERN

INT_PATTERN: "^-?[0-9]+$" = "^-?[0-9]+$"

Const MAX_STRING_LENGTH_BYTES

MAX_STRING_LENGTH_BYTES: 128 = 128

Const MEMO_MAX_LENGTH_BYTES

MEMO_MAX_LENGTH_BYTES: 34 = 34

Const NAMESPACE_PATTERN

NAMESPACE_PATTERN: "^([0-9a-z_-]{1,19})$" = "^([0-9a-z_-]{1,19})$"

Const NAME_PATTERN

NAME_PATTERN: "^([0-9a-z_.+-]{3,37})$" = "^([0-9a-z_.+-]{3,37})$"

Const NO_CRYPTO_LIB

NO_CRYPTO_LIB: "Crypto lib not found. Either the WebCrypto "crypto.subtle" or Node.js "crypto" module must be available." = "Crypto lib not found. Either the WebCrypto "crypto.subtle" or Node.js "crypto" module must be available."

Const PERSON_TYPE

PERSON_TYPE: "Person" = "Person"

Const PRIVATE_KEY_MULTISIG_PATTERN

PRIVATE_KEY_MULTISIG_PATTERN: "^([0-9]+),([0-9a-f]{64,66},)*([0-9a-f]{64,66})$" = "^([0-9]+),([0-9a-f]{64,66},)*([0-9a-f]{64,66})$"

Const PRIVATE_KEY_NOSIGN_PATTERN

PRIVATE_KEY_NOSIGN_PATTERN: string = `^nosign:${ADDRESS_CHARS}$`

Const PRIVATE_KEY_PATTERN

PRIVATE_KEY_PATTERN: "^([0-9a-f]{64,66})$" = "^([0-9a-f]{64,66})$"

Const PRIVATE_KEY_PATTERN_ANY

PRIVATE_KEY_PATTERN_ANY: string = `${PRIVATE_KEY_PATTERN}|${PRIVATE_KEY_MULTISIG_PATTERN}|${PRIVATE_KEY_SEGWIT_P2SH_PATTERN}|${PRIVATE_KEY_NOSIGN_PATTERN}`

Const PRIVATE_KEY_SEGWIT_P2SH_PATTERN

PRIVATE_KEY_SEGWIT_P2SH_PATTERN: "^segwit:p2sh:([0-9]+),([0-9a-f]{64,66},)*([0-9a-f]{64,66})$" = "^segwit:p2sh:([0-9]+),([0-9a-f]{64,66},)*([0-9a-f]{64,66})$"

Const PRIVATE_KEY_UNCOMPRESSED_PATTERN

PRIVATE_KEY_UNCOMPRESSED_PATTERN: "^([0-9a-f]{64})$" = "^([0-9a-f]{64})$"

Const PUBLIC_KEY_PATTERN

PUBLIC_KEY_PATTERN: "^([0-9a-f]{66,130})$" = "^([0-9a-f]{66,130})$"

Const PUBLIC_TESTNET_HOST

PUBLIC_TESTNET_HOST: "testnet-master.blockstack.org" = "testnet-master.blockstack.org"

Const RECOVERABLE_ECDSA_SIG_LENGTH_BYTES

RECOVERABLE_ECDSA_SIG_LENGTH_BYTES: 65 = 65

Const SATOSHIS_PER_BTC

SATOSHIS_PER_BTC: 100000000 = 100000000

Const SESSION_VERSION

SESSION_VERSION: "1.0.0" = "1.0.0"

Const SIGNATURE_FILE_SUFFIX

SIGNATURE_FILE_SUFFIX: ".sig" = ".sig"

Const SIGNING_NODE_INDEX

SIGNING_NODE_INDEX: 1 = 1

Const SIGNIN_CSS

SIGNIN_CSS: "h1 {font-family: monospace;font-size: 24px;font-style: normal;font-variant: normal;font-weight: 700;line-height: 26.4px;}h3 {font-family: monospace;font-size: 14px;font-style: normal;font-variant: normal;font-weight: 700;line-height: 15.4px;}p {font-family: monospace;font-size: 14px;font-style: normal;font-variant: normal;font-weight: 400;line-height: 20px;}b {background-color: #e8e8e8;}pre {font-family: monospace;font-size: 13px;font-style: normal;font-variant: normal;font-weight: 400;line-height: 18.5714px;}" = `h1 {font-family: monospace;font-size: 24px;font-style: normal;font-variant: normal;font-weight: 700;line-height: 26.4px;}h3 {font-family: monospace;font-size: 14px;font-style: normal;font-variant: normal;font-weight: 700;line-height: 15.4px;}p {font-family: monospace;font-size: 14px;font-style: normal;font-variant: normal;font-weight: 400;line-height: 20px;}b {background-color: #e8e8e8;}pre {font-family: monospace;font-size: 13px;font-style: normal;font-variant: normal;font-weight: 400;line-height: 18.5714px;}`

Const SIGNIN_DESC

SIGNIN_DESC: "<p>Sign-in request for <b>"{appName}"</b></p>" = "<p>Sign-in request for <b>"{appName}"</b></p>"

Const SIGNIN_FMT_ID

SIGNIN_FMT_ID: "<p><a href="{authRedirect}">{idAddress}</a> (anonymous)</p>" = "<p><a href="{authRedirect}">{idAddress}</a> (anonymous)</p>"

Const SIGNIN_FMT_NAME

SIGNIN_FMT_NAME: "<p><a href="{authRedirect}">{blockstackID}</a> ({idAddress})</p>" = "<p><a href="{authRedirect}">{blockstackID}</a> ({idAddress})</p>"

Const SIGNIN_FOOTER

SIGNIN_FOOTER: "</body></html>" = "</body></html>"

Const SIGNIN_HEADER

SIGNIN_HEADER: string = `<html><head><style>${SIGNIN_CSS}</style></head></body><h3>Blockstack CLI Sign-in</h3><br>`

Const SIGNIN_SCOPES

SIGNIN_SCOPES: "<p>Requested scopes: <b>"{appScopes}"</b></p>" = "<p>Requested scopes: <b>"{appScopes}"</b></p>"

Const STACKS_ADDRESS_PATTERN

STACKS_ADDRESS_PATTERN: string = `^(${C32_ADDRESS_CHARS})$`

Const STRENGTH

STRENGTH: 128 = 128

Const STX_NODE_INDEX

STX_NODE_INDEX: 6 = 6

Const STX_WALLET_COMPATIBLE_SEED_STRENGTH

STX_WALLET_COMPATIBLE_SEED_STRENGTH: 256 = 256

Const SUBDOMAIN_PATTERN

SUBDOMAIN_PATTERN: "^([0-9a-z_+-]{1,37}).([0-9a-z_.+-]{3,37})$" = "^([0-9a-z_+-]{1,37}).([0-9a-z_.+-]{3,37})$"

Const TXID_PATTERN

TXID_PATTERN: "^([0-9a-f]{64})$" = "^([0-9a-f]{64})$"

Const UNCOMPRESSED_PUBKEY_LENGTH_BYTES

UNCOMPRESSED_PUBKEY_LENGTH_BYTES: 64 = 64

Const URL_PATTERN

URL_PATTERN: "^http[s]?://.+$" = "^http[s]?://.+$"

Const USAGE

USAGE: string = `Usage: ${process.argv[1]} [options] command [command arguments]Options can be:-c Path to a config file (defaults to${DEFAULT_CONFIG_PATH})-d Print verbose debugging output-e Estimate the BTC cost of an transaction (in satoshis).Do not generate or send any transactions.-m MAGIC_BYTES Use an alternative magic byte string instead of "id".-t Use the public testnet instead of mainnet.-i Use integration test framework instead of mainnet.-U Unsafe mode. No safety checks will be performed.-x Do not broadcast a transaction. Only generate andprint them to stdout.-B BURN_ADDR Use the given namespace burn address instead of the oneobtained from the Blockstack network (DANGEROUS)-D DENOMINATION Denominate the price to pay in the given units(DANGEROUS)-C CONSENSUS_HASH Use the given consensus hash instead of one obtainedfrom the network-F FEE_RATE Use the given transaction fee rate instead of the oneobtained from the Bitcoin network-G GRACE_PERIOD Number of blocks in which a name can be renewed after itexpires (DANGEROUS)-H URL Use an alternative Blockstack Core API endpoint.-I URL Use an alternative Blockstack Core Indexer endpoint.-M MAX_INDEX Maximum keychain index to use when searching for an identity address(default is ${DEFAULT_MAX_ID_SEARCH_INDEX}).-N PAY2NS_PERIOD Number of blocks in which a namespace receives the registrationand renewal fees after it is created (DANGEROUS)-P PRICE Use the given price to pay for names or namespaces(DANGEROUS)-T URL Use an alternative Blockstack transaction broadcaster.-X URL Use an alternative UTXO service endpoint.-u USERNAME A username to be passed to bitcoind RPC endpoints-p PASSWORD A password to be passed to bitcoind RPC endpoints`

Const VERSION

VERSION: "1.3.1" = "1.3.1"

Const ZONEFILE_HASH_PATTERN

ZONEFILE_HASH_PATTERN: "^([0-9a-f]{40})$" = "^([0-9a-f]{40})$"

Const ZoneFile

ZoneFile: any = require('zone-file')

Const authTransitNonce

authTransitNonce: string = crypto.randomBytes(32).toString('hex')

Const c32check

c32check: any = require('c32check')

Const ecurve

ecurve: ec = new EllipticCurve('secp256k1')

Const enumCheckFunctions

enumCheckFunctions: Map<object, (value: number) => boolean> = new Map<object, (value: number) => boolean>()

Let estimateOnly

estimateOnly: boolean = false

Let global

global: any

Let gracePeriod

gracePeriod: number = 5000

Const intToLevel

intToLevel: {}

Type declaration

  • [int: number]: string

Const levelToInt

levelToInt: {}

Type declaration

  • [level: string]: number

Const levels

levels: string[] = ['debug', 'info', 'warn', 'error', 'none']

Const localStorageRAM

localStorageRAM: Record<string, any>

Let maxIDSearchIndex

maxIDSearchIndex: number = DEFAULT_MAX_ID_SEARCH_INDEX

Const networkDerivationPath

networkDerivationPath: "m/44'/5757'/0'/0/0" = `m/44'/5757'/0'/0/0`

Let noExit

noExit: boolean = false

Let receiveFeesPeriod

receiveFeesPeriod: number = 52595

Let safetyChecks

safetyChecks: boolean = true

Let txOnly

txOnly: boolean = false

Functions

CLIMain

  • CLIMain(): void

CLIOptAsBool

  • CLIOptAsBool(opts: CLI_OPTS, key: string): boolean

CLIOptAsString

  • CLIOptAsString(opts: CLI_OPTS, key: string): string | null

CLIOptAsStringArray

  • CLIOptAsStringArray(opts: CLI_OPTS, key: string): string[] | null

JSONStringify

  • JSONStringify(obj: AnyJson, stderr?: boolean): string

abiFunctionToString

addressConvert

addressFromHashMode

addressFromPublicKeys

addressFromVersionHash

addressHashModeToVersion

addressToString

  • addressToString(address: Address): string

answerToClarityValue

argToPrompt

assertIsTruthy

  • assertIsTruthy<T>(val: any): assertsval is NonNullable<T>

authDaemon

balance

batchify

  • batchify<T>(input: T[], batchSize?: number): T[][]

broadcastRawTransaction

  • Broadcast the signed transaction to a core node

    Parameters

    • rawTx: Buffer

      the raw serialized transaction buffer to broadcast

    • url: string

      the broadcast endpoint URL

    Returns Promise<TxBroadcastResult>

    that resolves to a response if the operation succeeds

broadcastTransaction

broadcastTransactionAndZoneFile

  • broadcastTransactionAndZoneFile(network: CLINetworkAdapter, tx: string, zonefile?: undefined | string): Promise<{ error: string; status: false; txid: string } | { status: true; txid: string } | { error: string; message: any; stacktrace: any; status: false }>
  • Parameters

    Returns Promise<{ error: string; status: false; txid: string } | { status: true; txid: string } | { error: string; message: any; stacktrace: any; status: false }>

Const bufferCV

Const bufferCVFromString

  • bufferCVFromString(str: string): BufferCV

bufferWithTypeID

  • bufferWithTypeID(typeId: ClarityType, buffer: Buffer): Buffer

callReadOnlyFunction

canStack

canonicalPrivateKey

  • canonicalPrivateKey(privkey: string): string

checkArgs

checkUrl

  • checkUrl(url: string): string

clearCondition

cloneDeep

  • cloneDeep<T>(obj: T): T

codeBodyString

Const connectToGaiaHubWithConfig

  • connectToGaiaHubWithConfig(__namedParameters: { gaiaHubUrl: string; hubInfo: HubInfo; privateKey: string }): GaiaHubConfig

Const containsLegalCharacters

  • containsLegalCharacters(name: string): boolean

contractDeploy

contractFunctionCall

contractPrincipalCV

contractPrincipalCVFromAddress

contractPrincipalCVFromStandard

createAddress

  • createAddress(c32AddressString: string): Address

createAssetInfo

  • createAssetInfo(addressString: string, contractName: string, assetName: string): AssetInfo

createCipher

createCoinbasePayload

createContractCallPayload

createContractPrincipal

  • createContractPrincipal(addressString: string, contractName: string): ContractPrincipal

createEmptyAddress

createEnumChecker

  • createEnumChecker<T, TEnumValue>(enumVariable: {}): (value: number) => value is TEnumValue
  • Type parameters

    • T: string

    • TEnumValue: number

    Parameters

    • enumVariable: {}

    Returns (value: number) => value is TEnumValue

      • (value: number): value is TEnumValue
      • Parameters

        • value: number

        Returns value is TEnumValue

createFungiblePostCondition

createHashRipemd160

createHmacSha256

  • createHmacSha256(): Promise<Hmac>

createLPList

  • createLPList<T>(values: T[], lengthPrefixBytes?: undefined | number): LengthPrefixedList

createLPString

createMemoString

createMessageSignature

createMultiSigSpendingCondition

createNonFungiblePostCondition

createPbkdf2

  • createPbkdf2(): Promise<Pbkdf2>

createPoisonPayload

createSTXPostCondition

createSha2Hash

createSingleSigSpendingCondition

createSmartContractPayload

createStacksPrivateKey

createStacksPublicKey

createStandardPrincipal

createTokenTransferPayload

createTransactionAuthField

cvToHex

cvToJSON

cvToString

  • cvToString(val: ClarityValue, encoding?: "tryAscii" | "hex"): string

cvToValue

decodeBtcAddress

  • decodeBtcAddress(btcAddress: string): { data: Buffer; hashMode: AddressHashMode }

decodePrivateKey

decrypt

  • decrypt(dataBuffer: Buffer | string, password: string): Promise<string>
  • Decrypt an encrypted mnemonic phrase with a password. Legacy triplesec encrypted payloads are also supported.

    Parameters

    • dataBuffer: Buffer | string
    • password: string

      Password for data

    Returns Promise<string>

    the raw mnemonic phrase

decryptBackupPhrase

  • decryptBackupPhrase(dataBuffer: string | Buffer, password: string): Promise<string>

decryptContent

  • decryptContent(content: string, options?: undefined | { privateKey?: undefined | string }): Promise<string | Buffer>
  • Decrypts data encrypted with encryptContent with the transit private key.

    Parameters

    • content: string

      encrypted content.

    • Optional options: undefined | { privateKey?: undefined | string }

    Returns Promise<string | Buffer>

    decrypted content.

deleteFromGaiaHub

  • deleteFromGaiaHub(filename: string, hubConfig: GaiaHubConfig): Promise<void>

deriveIdentityKeyPair

deriveRootKeychainFromMnemonic

  • deriveRootKeychainFromMnemonic(plaintextMnemonic: string): Promise<BIP32Interface>

deriveStxAddressChain

  • deriveStxAddressChain(chain: ChainID): (Anonymous function)

deserializeAddress

deserializeAssetInfo

deserializeCV

deserializeLPList

deserializeLPString

deserializeMemoString

deserializeMessageSignature

deserializeMultiSigSpendingCondition

deserializePayload

deserializePostCondition

deserializePrincipal

deserializePublicKey

deserializeSingleSigSpendingCondition

deserializeSpendingCondition

deserializeStacksMessage

deserializeTransaction

deserializeTransactionAuthField

emptyMessageSignature

encodeClarityValue

encrypt

  • encrypt(phrase: string, password: string): Promise<Buffer>
  • Encrypt a raw mnemonic phrase to be password protected

    Parameters

    • phrase: string

      Raw mnemonic phrase

    • password: string

      Password to encrypt mnemonic with

    Returns Promise<Buffer>

    The encrypted phrase

encryptBackupPhrase

  • encryptBackupPhrase(plaintextBuffer: string, password: string): Promise<Buffer>

encryptContent

encryptMnemonicFormatted

  • encryptMnemonicFormatted(plaintextMnemonic: string, password: string): Promise<{ encryptedMnemonic: Buffer; encryptedMnemonicHex: string }>

estimateContractDeploy

  • Estimate the total transaction fee in microstacks for a contract deploy

    Parameters

    • transaction: StacksTransaction

      the token transfer transaction to estimate fees for

    • Optional network: StacksNetwork

      the Stacks network to estimate transaction for

    Returns Promise<BigNum>

    a promise that resolves to number of microstacks per byte

estimateContractFunctionCall

  • Estimate the total transaction fee in microstacks for a contract function call

    Parameters

    • transaction: StacksTransaction

      the token transfer transaction to estimate fees for

    • Optional network: StacksNetwork

      the Stacks network to estimate transaction for

    Returns Promise<BigNum>

    a promise that resolves to number of microstacks per byte

estimateTransfer

  • Estimate the total transaction fee in microstacks for a token transfer

    Parameters

    • transaction: StacksTransaction

      the token transfer transaction to estimate fees for

    • Optional network: StacksNetwork

      the Stacks network to estimate transaction for

    Returns Promise<BigNum>

    a promise that resolves to number of microstacks per byte

Const exceedsMaxLengthBytes

  • exceedsMaxLengthBytes(string: string, maxLengthBytes: number): boolean

extractAppKey

  • extractAppKey(network: CLINetworkAdapter, appKeyInfo: { keyInfo: { address: string; privateKey: string }; legacyKeyInfo: { address: string; privateKey: string } }, appAddress?: undefined | string): string
  • Parameters

    • network: CLINetworkAdapter
    • appKeyInfo: { keyInfo: { address: string; privateKey: string }; legacyKeyInfo: { address: string; privateKey: string } }
      • keyInfo: { address: string; privateKey: string }
        • address: string
        • privateKey: string
      • legacyKeyInfo: { address: string; privateKey: string }
        • address: string
        • privateKey: string
    • Optional appAddress: undefined | string

    Returns string

extractProfile

  • extractProfile(token: string, publicKeyOrAddress?: string | null): Record<string, any>
  • Extracts a profile from an encoded token and optionally verifies it, if publicKeyOrAddress is provided.

    throws

    {Error} - if the token isn't signed by the provided publicKeyOrAddress

    Parameters

    • token: string

      the token to be extracted

    • Default value publicKeyOrAddress: string | null = null

      the public key or address of the keypair that is thought to have signed the token

    Returns Record<string, any>

    • the profile extracted from the encoded token

Const falseCV

faucetCall

Const fetchProfile

  • fetchProfile(__namedParameters: { gaiaUrl: string; identity: Identity }): Promise<null | Profile>

findIdentityIndex

  • findIdentityIndex(network: CLINetworkAdapter, mnemonic: string, idAddress: string, maxIndex?: undefined | number): Promise<number>

formatCommandHelpLines

formatHelpString

  • formatHelpString(indent: number, limit: number, helpString: string): string

gaiaAuth

  • gaiaAuth(network: CLINetworkAdapter, appPrivateKey: string | null, hubUrl: string | null, ownerPrivateKey?: undefined | string): Promise<UserData>

gaiaConnect

  • gaiaConnect(network: CLINetworkAdapter, gaiaHubUrl: string, privateKey: string, ownerPrivateKey?: undefined | string): Promise<GaiaHubConfig>

gaiaDeleteFile

gaiaDumpBucket

gaiaFindProfileName

  • gaiaFindProfileName(network: CLINetworkAdapter, hubConfig: GaiaHubConfig, blockstackID?: undefined | string): Promise<string>

gaiaGetFile

gaiaListFiles

gaiaPutFile

gaiaRestoreBucket

gaiaSetHub

gaiaUploadProfile

  • gaiaUploadProfile(network: CLINetworkAdapter, gaiaHubURL: string, gaiaData: string, privateKey: string, blockstackID?: undefined | string): Promise<string>

gaiaUploadProfileAll

  • gaiaUploadProfileAll(network: CLINetworkAdapter, gaiaUrls: string[], gaiaData: string, privateKey: string, blockstackID?: undefined | string): Promise<{ dataUrls?: string[] | null; error?: string | null }>
  • Parameters

    • network: CLINetworkAdapter
    • gaiaUrls: string[]
    • gaiaData: string
    • privateKey: string
    • Optional blockstackID: undefined | string

    Returns Promise<{ dataUrls?: string[] | null; error?: string | null }>

generateEncryptedMnemonicRootKeychain

  • generateEncryptedMnemonicRootKeychain(password: string, entropy: AllowedKeyEntropyBits): Promise<{ encryptedMnemonicPhrase: string; rootNode: BIP32Interface }>

generateExplorerTxPageUrl

  • generateExplorerTxPageUrl(txid: string, network: StacksNetwork): string

generateMnemonicRootKeychain

  • generateMnemonicRootKeychain(entropy: AllowedKeyEntropyBits): Promise<{ plaintextMnemonic: string; rootNode: BIP32Interface }>

getAPIUsageErrorMessage

  • getAPIUsageErrorMessage(scopeObject: unknown, apiName: string, usageDesc?: undefined | string): string

getAbi

  • getAbi(address: string, contractName: string, network: StacksNetwork): Promise<ClarityAbi>
  • Fetch a contract's ABI

    Parameters

    • address: string

      the contracts address

    • contractName: string

      the contracts name

    • network: StacksNetwork

      the Stacks network to broadcast transaction to

    Returns Promise<ClarityAbi>

    that resolves to a ClarityAbi if the operation succeeds

getAccountHistory

getAddressFromPrivateKey

  • getAddressFromPrivateKey(privateKey: string | Buffer, transactionVersion?: TransactionVersion): string

getAddressFromPublicKey

  • getAddressFromPublicKey(publicKey: string | Buffer, transactionVersion?: TransactionVersion): string

getAddressHashMode

getAppKeys

getAppPrivateKey

getApplicationKeyInfo

  • getApplicationKeyInfo(network: CLINetworkAdapter, mnemonic: string, idAddress: string, appDomain: string, idIndex?: undefined | number): Promise<AppKeyInfoType>

getBTCAddress

  • getBTCAddress(version: Buffer, checksum: Buffer): string

getBackupPhrase

  • getBackupPhrase(backupPhraseOrCiphertext: string, password?: undefined | string): Promise<string>
  • Parameters

    • backupPhraseOrCiphertext: string
    • Optional password: undefined | string

    Returns Promise<string>

getBase64OutputLength

  • getBase64OutputLength(inputByteLength: number): number
  • Calculate the base64 encoded string length for a given input length. This is equivalent to the byte length when the string is ASCII or UTF8-8 encoded.

    Parameters

    • inputByteLength: number

    Returns number

getBitcoinAddressNode

  • getBitcoinAddressNode(bitcoinKeychain: BIP32Interface, addressIndex?: number, chainType?: string): BIP32Interface
  • Parameters

    • bitcoinKeychain: BIP32Interface
    • Default value addressIndex: number = 0
    • Default value chainType: string = EXTERNAL_ADDRESS

    Returns BIP32Interface

getBitcoinPrivateKeychain

  • getBitcoinPrivateKeychain(rootNode: BIP32Interface): BIP32Interface

getBlockchainIdentities

  • getBlockchainIdentities(rootNode: BIP32Interface, identitiesToGenerate: number): Promise<{ bitcoinPublicKeychain: string; firstBitcoinAddress: string; identities: Identity[]; identityAddresses: string[]; identityKeypairs: IdentityKeyPair[]; identityPublicKeychain: string }>
  • Parameters

    • rootNode: BIP32Interface
    • identitiesToGenerate: number

    Returns Promise<{ bitcoinPublicKeychain: string; firstBitcoinAddress: string; identities: Identity[]; identityAddresses: string[]; identityKeypairs: IdentityKeyPair[]; identityPublicKeychain: string }>

getBlockstackErrorFromResponse

  • getBlockstackErrorFromResponse(response: Response, errorMsg: string, hubConfig: GaiaHubConfig | null): Promise<Error>
  • Returns a BlockstackError correlating to the given HTTP response, with the provided errorMsg. Throws if the HTTP response is 'ok'.

    Parameters

    • response: Response
    • errorMsg: string
    • hubConfig: GaiaHubConfig | null

    Returns Promise<Error>

getCLIOpts

  • getCLIOpts(argv: string[], opts?: string): CLI_OPTS

getCVTypeString

getCommandArgs

  • getCommandArgs(command: string, argsList: Array<string>): { error: string; status: boolean } | { arguments: string[]; status: boolean }
  • Parameters

    • command: string
    • argsList: Array<string>

    Returns { error: string; status: boolean } | { arguments: string[]; status: boolean }

getCommandGroups

getCryptoLib

getDerivationPath

  • getDerivationPath(chain: ChainID): string

getErrorString

getGaiaAddressFromProfile

  • getGaiaAddressFromProfile(network: CLINetworkAdapter, profile: any, appOrigin: string): string

getGaiaAddressFromURL

  • getGaiaAddressFromURL(appUrl: string): string

getGaiaErrorResponse

  • getGaiaErrorResponse(response: Response): Promise<GaiaHubErrorResponse>

Const getHubInfo

  • getHubInfo(hubUrl: string): Promise<HubInfo>

Const getHubPrefix

  • getHubPrefix(hubUrl: string): Promise<string>

getIDAddress

getIDAppKeys

  • getIDAppKeys(network: CLINetworkAdapter, nameOrIDAddress: string, appOrigin: string, mnemonicOrCiphertext: string): Promise<IDAppKeys>

getIdentityInfo

getIdentityOwnerAddressNode

  • getIdentityOwnerAddressNode(identityPrivateKeychain: BIP32Interface, identityIndex?: number): Promise<IdentityAddressOwnerNode>

getIdentityPrivateKeychain

  • getIdentityPrivateKeychain(rootNode: BIP32Interface): BIP32Interface

getKeyAddress

getMaxIDSearchIndex

  • getMaxIDSearchIndex(): number

getName

  • getName(profile: any): any

getNameInfoEasy

getNetwork

  • getNetwork(configData: CLI_CONFIG_TYPE, regTest: boolean): BlockstackNetwork

getNodePrivateKey

  • getNodePrivateKey(node: BIP32Interface): string

getNonce

  • getNonce(address: string, network?: StacksNetwork): Promise<BigNum>
  • Lookup the nonce for an address from a core node

    Parameters

    • address: string

      the c32check address to look up

    • Optional network: StacksNetwork

      the Stacks network to look up address on

    Returns Promise<BigNum>

    a promise that resolves to an integer

getOwnerKeyFromIDAddress

  • getOwnerKeyFromIDAddress(network: CLINetworkAdapter, mnemonic: string, idAddress: string): Promise<string>

getOwnerKeyInfo

getOwnerKeys

getPaymentKey

getPaymentKeyInfo

getPrivateKeyAddress

Const getProfileURLFromZoneFile

  • getProfileURLFromZoneFile(name: string): Promise<undefined | string>

getPublicKey

getPublicKeyFromPrivateKey

  • getPublicKeyFromPrivateKey(privateKey: string): string

getQueryStringParams

  • getQueryStringParams(query: string): Record<string, string>

getSignatureRecoveryParam

  • getSignatureRecoveryParam(signature: string): number

getStacksWalletKey

getStacksWalletKeyInfo

getTypeString

getTypeUnion

getpass

  • getpass(promptStr: string, cb: (passwd: string) => void): void
  • Parameters

    • promptStr: string
    • cb: (passwd: string) => void
        • (passwd: string): void
        • Parameters

          • passwd: string

          Returns void

    Returns void

handleAuth

  • handleAuth(network: CLINetworkAdapter, mnemonic: string, gaiaHubUrl: string, profileGaiaHub: string, port: number, req: express.Request, res: express.Response): Promise<any>

handleSignIn

  • handleSignIn(network: CLINetworkAdapter, mnemonic: string, appGaiaHub: string, profileGaiaHub: string, req: express.Request, res: express.Response): Promise<any>

hasKeys

Const hash160

  • hash160(buff: Buffer): Buffer
  • hash160(input: Buffer): Buffer

Const hashP2PKH

  • hashP2PKH(input: Buffer): string

Const hashP2SH

  • hashP2SH(numSigs: number, pubKeys: Buffer[]): string

hashRipemd160

  • hashRipemd160(data: Buffer): Buffer

hashSha256Sync

  • hashSha256Sync(data: Buffer): Buffer

hashSha512Sync

  • hashSha512Sync(data: Buffer): Buffer

Const hexStringToInt

  • hexStringToInt(hexString: string): number

hexToCV

Const intCV

  • intCV(value: number | string | Buffer): IntCV

Const intToHexString

  • intToHexString(integer: number, lengthBytes?: number): string

isCLITransactionSigner

Const isClarityAbiBuffer

  • isClarityAbiBuffer(val: ClarityAbiType): val is ClarityAbiTypeBuffer

Const isClarityAbiList

Const isClarityAbiOptional

  • isClarityAbiOptional(val: ClarityAbiType): val is ClarityAbiTypeOptional

Const isClarityAbiPrimitive

  • isClarityAbiPrimitive(val: ClarityAbiType): val is ClarityAbiTypePrimitive

Const isClarityAbiResponse

  • isClarityAbiResponse(val: ClarityAbiType): val is ClarityAbiTypeResponse

Const isClarityAbiStringAscii

  • isClarityAbiStringAscii(val: ClarityAbiType): val is ClarityAbiTypeStringAscii

Const isClarityAbiStringUtf8

  • isClarityAbiStringUtf8(val: ClarityAbiType): val is ClarityAbiTypeStringUtf8

Const isClarityAbiTuple

isClarityName

  • isClarityName(name: string): boolean

isCompressed

isEnum

  • isEnum<T, TEnumValue>(enumVariable: {}, value: number): value is TEnumValue
  • Type guard to check if a given value is a valid enum value.

    example
    enum Color {
      Purple = 3,
      Orange = 5
    }
    const val: number = 3;
    if (isEnum(Color, val)) {
      // `val` is known as enum type `Color`, e.g.:
      const colorVal: Color = val;
    }

    Type parameters

    • T: string

    • TEnumValue: number

    Parameters

    • enumVariable: {}

      Literal enum type.

    • value: number

      A value to check against the enum's values.

    Returns value is TEnumValue

isNodeCryptoAvailable

  • isNodeCryptoAvailable<T>(withFeature: (nodeCrypto: "crypto") => boolean | T): false | T
  • Type parameters

    • T

    Parameters

    • withFeature: (nodeCrypto: "crypto") => boolean | T
        • (nodeCrypto: "crypto"): boolean | T
        • Parameters

          • nodeCrypto: "crypto"

          Returns boolean | T

    Returns false | T

isRecoverableGaiaError

  • isRecoverableGaiaError(error: GaiaHubError): boolean
  • Determines if a gaia error response is possible to recover from by refreshing the gaiaHubConfig, and retrying the request.

    Parameters

    • error: GaiaHubError

    Returns boolean

isSingleSig

isStringArray

  • isStringArray(value: any): value is string[]

isSubdomain

  • isSubdomain(name: string): boolean

isSubtleCryptoAvailable

  • isSubtleCryptoAvailable(): boolean

Const leftPadHex

  • leftPadHex(hexString: string): string

Const leftPadHexToLength

  • leftPadHexToLength(hexString: string, length: number): string

listCV

  • listCV<T>(values: T[]): ListCV

loadConfig

  • Load the config file and return a config dict. If no config file exists, then return the default config.

    configpath

    (string) the path to the config file.

    networktype

    (sring) 'mainnet', 'regtest', or 'testnet'

    Parameters

    • configFile: string
    • networkType: string

    Returns CLI_CONFIG_TYPE

loadNamedIdentities

loadNamedIdentitiesLoop

loadUnnamedIdentity

lookupProfile

makeAllCommandsHelp

  • makeAllCommandsHelp(): string

makeAllCommandsList

  • makeAllCommandsList(): string

makeAssociationToken

  • makeAssociationToken(appPrivateKey: string, identityKey: string): string

makeAuthPage

makeAuthRequest

  • makeAuthRequest(transitPrivateKey: string, redirectURI?: undefined | string, manifestURI?: undefined | string, scopes?: (AuthScope | string)[], appDomain?: undefined | string, expiresAt?: number, extraParams?: any): string
  • Generates an authentication request that can be sent to the Blockstack browser for the user to approve sign in. This authentication request can then be used for sign in by passing it to the redirectToSignInWithAuthRequest method.

    Note: This method should only be used if you want to roll your own authentication flow. Typically you'd use redirectToSignIn which takes care of this under the hood.

    Parameters

    • transitPrivateKey: string

      hex encoded transit private key

    • Optional redirectURI: undefined | string

      location to redirect user to after sign in approval

    • Optional manifestURI: undefined | string

      location of this app's manifest file

    • Default value scopes: (AuthScope | string)[] = DEFAULT_SCOPE.slice()

      the permissions this app is requesting

    • Optional appDomain: undefined | string

      the origin of this app

    • Default value expiresAt: number = nextMonth().getTime()

      the time at which this request is no longer valid

    • Default value extraParams: any = {}

      Any extra parameters you'd like to pass to the authenticator. Use this to pass options that aren't part of the Blockstack auth spec, but might be supported by special authenticators.

    Returns string

    the authentication request

makeCommandUsageString

  • makeCommandUsageString(command?: undefined | string): string

makeContractCall

makeContractDeploy

makeContractFungiblePostCondition

  • Generates a fungible token post condition with a contract principal

    Returns a fungible token post condition object

    Parameters

    • address: string

      the c32check address

    • contractName: string

      the name of the contract

    • conditionCode: FungibleConditionCode

      the condition code

    • amount: BigNum

      the amount of fungible tokens

    • assetInfo: string | AssetInfo

      asset info describing the fungible token

    Returns FungiblePostCondition

makeContractNonFungiblePostCondition

makeContractSTXPostCondition

makeDIDConfiguration

  • makeDIDConfiguration(network: CLINetworkAdapter, blockstackID: string, domain: string, privateKey: string): Promise<{ entries: { did: string; jwt: string }[] }>

makeFakeAuthResponseToken

  • makeFakeAuthResponseToken(appPrivateKey: string | null, hubURL: string | null, associationToken?: undefined | string): string
  • Parameters

    • appPrivateKey: string | null
    • hubURL: string | null
    • Optional associationToken: undefined | string

    Returns string

Const makeGaiaAssociationToken

  • makeGaiaAssociationToken(secretKeyHex: string, childPublicKeyHex: string): string

Const makeGaiaAuthToken

  • makeGaiaAuthToken(__namedParameters: { gaiaHubUrl: string; hubInfo: HubInfo; privateKey: string }): string

Const makeIdentity

  • makeIdentity(rootNode: BIP32Interface, index: number): Promise<Identity>

makeKeychain

makeProfileJWT

  • makeProfileJWT(profileData: Object, privateKey: string): string

makePromptsFromArgList

makeRandomPrivKey

Const makeReadOnlyGaiaConfig

  • makeReadOnlyGaiaConfig(__namedParameters: { privateKey: string; readURL: string }): GaiaHubConfig
  • When you already know the Gaia read URL, make a Gaia config that doesn't have to fetch /hub_info

    Parameters

    • __namedParameters: { privateKey: string; readURL: string }
      • privateKey: string
      • readURL: string

    Returns GaiaHubConfig

makeSTXTokenTransfer

makeSigHashPostSign

makeSigHashPreSign

  • makeSigHashPreSign(curSigHash: string, authType: AuthType, fee: BigNum, nonce: BigNum): string

makeSignInLink

makeStandardFungiblePostCondition

makeStandardNonFungiblePostCondition

makeStandardSTXPostCondition

makeUnsignedContractCall

makeUnsignedSTXTokenTransfer

makeUsageString

  • makeUsageString(): string

makeZoneFileFromGaiaUrl

  • makeZoneFileFromGaiaUrl(network: CLINetworkAdapter, name: string, gaiaHubUrl: string, ownerKey: string): Promise<any>

matchType

mkdirs

  • mkdirs(path: string): void

nameLookup

  • nameLookup(network: CLINetworkAdapter, name: string, includeProfile?: boolean): Promise<{ profile: any; profileUrl?: undefined | string; zonefile?: undefined | string }>
  • Parameters

    • network: CLINetworkAdapter
    • name: string
    • Default value includeProfile: boolean = true

    Returns Promise<{ profile: any; profileUrl?: undefined | string; zonefile?: undefined | string }>

newInitialSigHash

nextSignature

nextVerification

Const noneCV

omit

  • omit<T, K>(obj: T, prop: K): Omit<T, K>

Const optionalCVOf

parseAssetInfoString

  • parseAssetInfoString(id: string): AssetInfo
  • Parse a fully qualified string that identifies the token type.

    example

    "SP13N5TE1FBBGRZD1FCM49QDGN32WAXM2E5F8WT2G.example-contract::example-token"

    Parameters

    • id: string

      String in the format {address}.{contractName}::{assetName}

    Returns AssetInfo

parseClarityFunctionArgAnswers

parseMultiSigKeys

parseNullSigner

parsePrincipalString

  • Parses a principal string for either a standard principal or contract principal.

    example

    "SP13N5TE1FBBGRZD1FCM49QDGN32WAXM2E5F8WT2G.example-contract"

    example

    "SP13N5TE1FBBGRZD1FCM49QDGN32WAXM2E5F8WT2G"

    Parameters

    • principalString: string

      String in the format {address}.{contractName}

    Returns StandardPrincipal | ContractPrincipal

Const parseReadOnlyResponse

parseRecoverableSignature

  • parseRecoverableSignature(signature: string): { r: string; recoveryParam: number; s: string }

parseSegwitP2SHKeys

parseToCV

  • Convert string input to Clarity value based on contract ABI data. Only handles Clarity primitives and buffers. Responses, optionals, tuples and lists are not supported.

    Parameters

    • input: string

      string to be parsed into Clarity value

    • type: ClarityAbiType

      the contract function argument object

    Returns ClarityValue

    returns a Clarity value

principalCV

principalToString

printDocs

printUsage

  • printUsage(): void

privateKeyToString

profileSign

profileStore

profileVerify

pubKeyfromPrivKey

publicKeyFromBuffer

publicKeyFromSignature

  • publicKeyFromSignature(message: string, messageSignature: MessageSignature): string

publicKeyToString

readOnlyContractFunctionCall

  • readOnlyContractFunctionCall(network: CLINetworkAdapter, args: string[]): Promise<string>

Const recursiveRestoreIdentities

  • recursiveRestoreIdentities(__namedParameters: { identities: Identity[]; index: number; rootNode: BIP32Interface }): Promise<Identity[]>
  • Restore identities by recursively making a new identity, and checking if it has a username.

    As soon as a username is not found for an identity, the recursion stops.

    Parameters

    • __namedParameters: { identities: Identity[]; index: number; rootNode: BIP32Interface }
      • identities: Identity[]
      • index: number
      • rootNode: BIP32Interface

    Returns Promise<Identity[]>

Const registerSubdomain

  • registerSubdomain(__namedParameters: { gaiaHubUrl: string; identity: Identity; subdomain: Subdomains; username: string }): Promise<Identity>

responseErrorCV

responseOkCV

Const rightPadHexToLength

  • rightPadHexToLength(hexString: string, length: number): string

sendJSON

  • sendJSON(res: express.Response, data: Object, statusCode: number): void

sendTokens

Const sendUsernameToRegistrar

  • sendUsernameToRegistrar(__namedParameters: { identity: Identity; subdomain: Subdomains; username: string; zoneFile: string }): Promise<any>

serializeAddress

  • serializeAddress(address: Address): Buffer

serializeAssetInfo

  • serializeAssetInfo(info: AssetInfo): Buffer

serializeBoolCV

serializeBufferCV

  • serializeBufferCV(cv: BufferCV): Buffer

serializeCV

serializeContractPrincipalCV

serializeIntCV

serializeLPList

serializeLPString

serializeListCV

  • serializeListCV(cv: ListCV): Buffer

serializeMemoString

  • serializeMemoString(memoString: MemoString): Buffer

serializeMessageSignature

serializeMultiSigSpendingCondition

serializeOptionalCV

serializePayload

  • serializePayload(payload: Payload): Buffer

serializePostCondition

serializePrincipal

serializePublicKey

serializeResponseCV

serializeSingleSigSpendingCondition

serializeSpendingCondition

serializeStacksMessage

serializeStandardPrincipalCV

serializeStringAsciiCV

serializeStringCV

serializeStringUtf8CV

serializeTransactionAuthField

serializeTupleCV

  • serializeTupleCV(cv: TupleCV): Buffer

Const signAndUploadProfile

  • signAndUploadProfile(__namedParameters: { gaiaHubConfig: undefined | GaiaHubConfig; gaiaHubUrl: string; identity: Identity; profile: Profile }): Promise<void>

signProfileForUpload

signProfileToken

  • signProfileToken(profile: any, privateKey: string, subject?: any, issuer?: any, signingAlgorithm?: string, issuedAt?: Date, expiresAt?: Date): string
  • Signs a profile token

    Parameters

    • profile: any

      the JSON of the profile to be signed

    • privateKey: string

      the signing private key

    • Optional subject: any

      the entity that the information is about

    • Optional issuer: any

      the entity that is issuing the token

    • Default value signingAlgorithm: string = "ES256K"

      the signing algorithm to use

    • Default value issuedAt: Date = new Date()

      the time of issuance of the token

    • Default value expiresAt: Date = nextYear()

      the time of expiration of the token

    Returns string

    • the signed profile token

signWithKey

Const someCV

sponsorTransaction

stack

stackingStatus

standardPrincipalCV

standardPrincipalCVFromAddress

Const stringAsciiCV

Const stringCV

Const stringUtf8CV

sumUTXOs

  • sumUTXOs(utxos: UTXO[]): number

Const trueCV

tupleCV

Const txidFromData

  • txidFromData(data: Buffer): string

Const uintCV

  • uintCV(value: number | string | Buffer): UIntCV

updateProfileAPISettings

updateProfileApps

  • updateProfileApps(network: CLINetworkAdapter, id: NamedIdentityType, appOrigin: string, appGaiaConfig: GaiaHubConfig, profile?: any): Promise<{ changed: boolean; profile: any }>

uploadProfile

  • uploadProfile(gaiaHubUrl: string, identity: Identity, signedProfileTokenData: string, gaiaHubConfig?: GaiaHubConfig): Promise<string>

validateContractCall

Const validateStacksAddress

  • validateStacksAddress(stacksAddress: string): boolean

Const validateSubdomain

Const validateSubdomainAvailability

  • validateSubdomainAvailability(name: string, subdomain?: Subdomains): Promise<any>

Const validateSubdomainFormat

verify

verifyProfileToken

  • verifyProfileToken(token: string, publicKeyOrAddress: string): TokenInterface
  • Verifies a profile token

    throws

    {Error} - throws an error if token verification fails

    Parameters

    • token: string

      the token to be verified

    • publicKeyOrAddress: string

      the public key or address of the keypair that is thought to have signed the token

    Returns TokenInterface

    • the verified, decoded profile token

verifySingleSig

walletFromMnemonic

  • walletFromMnemonic(mnemonic: string): Promise<BlockstackWallet>

wrapProfileToken

  • wrapProfileToken(token: string): { decodedToken: TokenInterface; token: string }
  • Wraps a token for a profile token file

    Parameters

    • token: string

      the token to be wrapped

    Returns { decodedToken: TokenInterface; token: string }

    • including token and decodedToken
    • decodedToken: TokenInterface
    • token: string

Object literals

Const CLI_ARGS

CLI_ARGS: object

additionalProperties

additionalProperties: boolean = false

properties

properties: CLI_PROP = {announce: {type: 'array',items: [{name: 'message_hash',type: 'string',realtype: 'zonefile_hash',pattern: ZONEFILE_HASH_PATTERN,},{name: 'owner_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},],minItems: 2,maxItems: 2,help:'Broadcast a message on the blockchain for subscribers to read. ' +'The `MESSAGE_HASH` argument must be the hash of a previously-announced zone file. ' +'The `OWNER_KEY` used to sign the transaction must correspond to the Blockstack ID ' +'to which other users have already subscribed. `OWNER_KEY` can be a single private key ' +'or a serialized multisig private key bundle.\n' +'\n' +'If this command succeeds, it will print a transaction ID. The rest of the Blockstack peer ' +'network will process it once the transaction reaches 7 confirmations.\n' +'\n' +'Examples:\n' +'\n' +' $ # Tip: You can obtain the owner key with the get_owner_keys command\n' +' $ export OWNER_KEY="136ff26efa5db6f06b28f9c8c7a0216a1a52598045162abfe435d13036154a1b01"\n' +' $ stx announce 737c631c7c5d911c6617993c21fba731363f1cfe "$OWNER_KEY"\n' +' d51749aeec2803e91a2f8bdec8d3e413491fd816b4962372b214ab74acb0bba8\n' +'\n' +' $ export OWNER_KEY="2,136ff26efa5db6f06b28f9c8c7a0216a1a52598045162abfe435d13036154a1b01,1885cba486a42960499d1f137ef3a475725ceb11f45d74631f9928280196f67401,2418981c7f3a91d4467a65a518e14fafa30e07e6879c11fab7106ea72b49a7cb01"\n' +' $ stx announce 737c631c7c5d911c6617993c21fba731363f1cfe "$OWNER_KEY"\n' +' 8136a1114098893b28a693e8d84451abf99ee37ef8766f4bc59808eed76968c9\n' +'\n',group: 'Peer Services',},authenticator: {type: 'array',items: [{name: 'app_gaia_hub',type: 'string',realtype: 'url',pattern: URL_PATTERN,},{name: 'backup_phrase',type: 'string',realtype: '12_words_or_ciphertext',pattern: '.+',},{name: 'profile_gaia_hub',type: 'string',realtype: 'url',pattern: URL_PATTERN,},{name: 'port',type: 'string',realtype: 'portnum',pattern: '^[0-9]+',},],minItems: 2,maxItems: 4,help:'Run an authentication endpoint for the set of names owned ' +'by the given backup phrase. Send applications the given Gaia hub URL on sign-in, ' +'so the application will use it to read/write user data.\n' +'\n' +'You can supply your encrypted backup phrase instead of the raw backup phrase. If so, ' +'then you will be prompted for your password before any authentication takes place.\n' +'\n' +'Example:\n' +'\n' +' $ export BACKUP_PHRASE="oak indicate inside poet please share dinner monitor glow hire source perfect"\n' +' $ export APP_GAIA_HUB="https://1.2.3.4"\n' +' $ export PROFILE_GAIA_HUB="https://hub.blockstack.org"\n' +' $ stx authenticator "$APP_GAIA_HUB" "$BACKUP_PHRASE" "$PROFILE_GAIA_HUB" 8888\n' +' Press Ctrl+C to exit\n' +' Authentication server started on 8888\n',group: 'Authentication',},balance: {type: 'array',items: [{name: 'address',type: 'string',realtype: 'address',pattern: `${ADDRESS_PATTERN}|${STACKS_ADDRESS_PATTERN}`,},],minItems: 1,maxItems: 1,help:'Query the balance of an account. Returns the balances of each kind of token ' +'that the account owns. The balances will be in the *smallest possible units* of the ' +'token (i.e. satoshis for BTC, microStacks for Stacks, etc.).\n' +'\n' +'Example:\n' +'\n' +' $ stx balance 16pm276FpJYpm7Dv3GEaRqTVvGPTdceoY4\n' +' {\n' +' "BTC": "123456"\n' +' "STACKS": "123456"\n' +' }\n' +' $ stx balance SPZY1V53Z4TVRHHW9Z7SFG8CZNRAG7BD8WJ6SXD0\n' +' {\n' +' "BTC": "123456"\n' +' "STACKS": "123456"\n' +' }\n',group: 'Account Management',},can_stack: {type: 'array',items: [{name: 'amount',type: 'string',realtype: 'integer',pattern: '^[0-9]+$',},{name: 'cycles',type: 'string',realtype: 'integer',pattern: '^[0-9]+$',},{name: 'pox_address',type: 'string',realtype: 'address',pattern: `${ADDRESS_PATTERN}`,},{name: 'stx_address',type: 'string',realtype: 'address',pattern: `${STACKS_ADDRESS_PATTERN}`,},],minItems: 4,maxItems: 4,help:'Check if specified account can stack a number of Stacks tokens for given number of cycles.\n' +'\n' +'Example:\n' +'\n' +' $ stx can_stack 10000000 20 16pm276FpJYpm7Dv3GEaRqTVvGPTdceoY4 SPZY1V53Z4TVRHHW9Z7SFG8CZNRAG7BD8WJ6SXD0\n' +' {\n' +' "eligible": true\n' +' }\n',group: 'Account Management',},call_contract_func: {type: 'array',items: [{name: 'contract_address',type: 'string',realtype: 'address',pattern: `${STACKS_ADDRESS_PATTERN}`,},{name: 'contract_name',type: 'string',realtype: 'string',pattern: '^[a-zA-Z]([a-zA-Z0-9]|[-_])*$',},{name: 'function_name',type: 'string',realtype: 'string',pattern: '^[a-zA-Z]([a-zA-Z0-9]|[-_!?])*$',},{name: 'fee',type: 'string',realtype: 'integer',pattern: '^[0-9]+$',},{name: 'nonce',type: 'string',realtype: 'integer',pattern: '^[0-9]+$',},{name: 'payment_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},],minItems: 6,maxItems: 6,help:'Call a function in a deployed Clarity smart contract.\n' +'\n' +'If the command succeeds, it prints out a transaction ID.' +'\n' +'Example:\n' +' $ export PAYMENT="bfeffdf57f29b0cc1fab9ea197bb1413da2561fe4b83e962c7f02fbbe2b1cd5401"\n' +' $ stx call_contract_func SPBMRFRPPGCDE3F384WCJPK8PQJGZ8K9QKK7F59X contract_name' +' contract_function 1 0 "$PAYMENT"\n' +' {\n' +" txid: '0x2e33ad647a9cedacb718ce247967dc705bc0c878db899fdba5eae2437c6fa1e1'," +" transaction: 'https://explorer.stacks.co/txid/0x2e33ad647a9cedacb718ce247967dc705bc0c878db899fdba5eae2437c6fa1e1'" +' }\n' +'\n',group: 'Account Management',},call_read_only_contract_func: {type: 'array',items: [{name: 'contract_address',type: 'string',realtype: 'address',pattern: `${STACKS_ADDRESS_PATTERN}`,},{name: 'contract_name',type: 'string',realtype: 'string',pattern: '^[a-zA-Z]([a-zA-Z0-9]|[-_])*$',},{name: 'function_name',type: 'string',realtype: 'string',pattern: '^[a-zA-Z]([a-zA-Z0-9]|[-_!?])*$',},{name: 'sender_address',type: 'string',realtype: 'address',pattern: `${STACKS_ADDRESS_PATTERN}`,},],minItems: 4,maxItems: 4,help:'Call a read-only function in a deployed Clarity smart contract.\n' +'\n' +'If the command succeeds, it prints out a Clarity value.' +'\n' +'Example:\n' +' $ stx call_read_only_contract_func SPBMRFRPPGCDE3F384WCJPK8PQJGZ8K9QKK7F59X contract_name' +' contract_function SPBMRFRPPGCDE3F384WCJPK8PQJGZ8K9QKK7F59X\n' +' {\n' +" txid: '0x2e33ad647a9cedacb718ce247967dc705bc0c878db899fdba5eae2437c6fa1e1'," +" transaction: 'https://explorer.stacks.co/txid/0x2e33ad647a9cedacb718ce247967dc705bc0c878db899fdba5eae2437c6fa1e1'" +' }\n' +'\n',group: 'Account Management',},convert_address: {type: 'array',items: [{name: 'address',type: 'string',realtype: 'address',pattern: `${ADDRESS_PATTERN}|${STACKS_ADDRESS_PATTERN}`,},],minItems: 1,maxItems: 1,help:'Convert a Bitcoin address to a Stacks address and vice versa.\n' +'\n' +'Example:\n' +'\n' +' $ stx convert_address 12qdRgXxgNBNPnDeEChy3fYTbSHQ8nfZfD\n' +' {\n' +' "STACKS": "SPA2MZWV9N67TBYVWTE0PSSKMJ2F6YXW7CBE6YPW",\n' +' "BTC": "12qdRgXxgNBNPnDeEChy3fYTbSHQ8nfZfD"\n' +' }\n' +' $ stx convert_address SPA2MZWV9N67TBYVWTE0PSSKMJ2F6YXW7CBE6YPW\n' +' {\n' +' "STACKS": "SPA2MZWV9N67TBYVWTE0PSSKMJ2F6YXW7CBE6YPW",\n' +' "BTC": "12qdRgXxgNBNPnDeEChy3fYTbSHQ8nfZfD"\n' +' }\n',group: 'Account Management',},decrypt_keychain: {type: 'array',items: [{name: 'encrypted_backup_phrase',type: 'string',realtype: 'encrypted_backup_phrase',pattern: '^[^ ]+$',},{name: 'password',type: 'string',realtype: 'password',pattern: '.+',},],minItems: 1,maxItems: 2,help:'Decrypt an encrypted backup phrase with a password. Decrypts to a 12-word ' +'backup phrase if done correctly. The password will be prompted if not given.\n' +'\n' +'Example:\n' +'\n' +' $ # password is "asdf"\n' +' $ stx decrypt_keychain "bfMDtOucUGcJXjZo6vkrZWgEzue9fzPsZ7A6Pl4LQuxLI1xsVF0VPgBkMsnSLCmYS5YHh7R3mNtMmX45Bq9sNGPfPsseQMR0fD9XaHi+tBg=\n' +' Enter password:\n' +' section amount spend resemble spray verify night immune tattoo best emotion parrot',group: 'Key Management',},deploy_contract: {type: 'array',items: [{name: 'source_file',type: 'string',realtype: 'path',pattern: '.+',},{name: 'contract_name',type: 'string',realtype: 'string',pattern: '^[a-zA-Z]([a-zA-Z0-9]|[-_])*$',},{name: 'fee',type: 'string',realtype: 'integer',pattern: '^[0-9]+$',},{name: 'nonce',type: 'string',realtype: 'integer',pattern: '^[0-9]+$',},{name: 'payment_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},],minItems: 5,maxItems: 5,help:'Deploys a Clarity smart contract on the network.\n' +'\n' +'If the command succeeds, it prints out a transaction ID.' +'\n' +'Example:\n' +' $ export PAYMENT="bfeffdf57f29b0cc1fab9ea197bb1413da2561fe4b83e962c7f02fbbe2b1cd5401"\n' +' $ stx deploy_contract ./my_contract.clar my_contract 1 0 "$PAYMENT"\n' +' {\n' +" txid: '0x2e33ad647a9cedacb718ce247967dc705bc0c878db899fdba5eae2437c6fa1e1'," +" transaction: 'https://explorer.stacks.co/txid/0x2e33ad647a9cedacb718ce247967dc705bc0c878db899fdba5eae2437c6fa1e1'" +' }\n' +'\n',group: 'Account Management',},docs: {type: 'array',items: [{name: 'format',type: 'string',realtype: 'output_format',pattern: '^json$',},],minItems: 0,maxItems: 1,help: 'Dump the documentation for all commands as JSON to standard out.',group: 'CLI',},encrypt_keychain: {type: 'array',items: [{name: 'backup_phrase',type: 'string',realtype: 'backup_phrase',pattern: '.+',},{name: 'password',type: 'string',realtype: 'password',pattern: '.+',},],minItems: 1,maxItems: 2,help:'Encrypt a 12-word backup phrase, which can be decrypted later with the ' +'`decrypt_backup_phrase` command. The password will be prompted if not given.\n' +'\n' +'Example:\n' +'\n' +' $ # password is "asdf"\n' +' $ stx encrypt_keychain "section amount spend resemble spray verify night immune tattoo best emotion parrot"\n' +' Enter password:\n' +' Enter password again:\n' +' M+DnBHYb1fgw4N3oZ+5uTEAua5bAWkgTW/SjmmBhGGbJtjOtqVV+RrLJEJOgT35hBon4WKdGWye2vTdgqDo7+HIobwJwkQtN2YF9g3zPsKk=',group: 'Key Management',},faucet: {type: 'array',items: [{name: 'address',type: 'string',realtype: 'address',pattern: `${ADDRESS_PATTERN}|${STACKS_ADDRESS_PATTERN}`,},],minItems: 1,maxItems: 1,help:'Encrypt a 12-word backup phrase, which can be decrypted later with the ' +'`decrypt_backup_phrase` command. The password will be prompted if not given.\n' +'\n' +'Example:\n' +'\n' +' $ # password is "asdf"\n' +' $ blockstack-cli encrypt_keychain "section amount spend resemble spray verify night immune tattoo best emotion parrot"\n' +' Enter password:\n' +' Enter password again:\n' +' M+DnBHYb1fgw4N3oZ+5uTEAua5bAWkgTW/SjmmBhGGbJtjOtqVV+RrLJEJOgT35hBon4WKdGWye2vTdgqDo7+HIobwJwkQtN2YF9g3zPsKk=',group: 'Key Management',},gaia_dump_bucket: {type: 'array',items: [{name: 'name_or_id_address',type: 'string',realtype: 'name_or_id_address',pattern: `${ID_ADDRESS_PATTERN}|${NAME_PATTERN}|${SUBDOMAIN_PATTERN}`,},{name: 'app_origin',type: 'string',realtype: 'url',pattern: URL_PATTERN,},{name: 'gaia_hub',type: 'string',realtype: 'url',pattern: URL_PATTERN,},{name: 'backup_phrase',type: 'string',realtype: '12_words_or_ciphertext',},{name: 'dump_dir',type: 'string',realtype: 'path',pattern: '.+',},],minItems: 5,maxItems: 5,help:'Download the contents of a Gaia hub bucket to a given directory. The `GAIA_HUB` argument ' +'must correspond to the *write* endpoint of the Gaia hub -- that is, you should be able to fetch ' +'`$GAIA_HUB/hub_info`. If `DUMP_DIR` does not exist, it will be created.\n' +'\n' +'Example:\n' +'\n' +' $ export BACKUP_PHRASE="section amount spend resemble spray verify night immune tattoo best emotion parrot\n' +' $ stx gaia_dump_bucket hello.id.blockstack https://sample.app https://hub.blockstack.org "$BACKUP_PHRASE" ./backups\n' +' Download 3 files...\n' +' Download hello_world to ./backups/hello_world\n' +' Download dir/format to ./backups/dir\\x2fformat\n' +' Download /.dotfile to ./backups/\\x2f.dotfile\n' +' 3\n',group: 'Gaia',},gaia_getfile: {type: 'array',items: [{name: 'blockstack_id',type: 'string',realtype: 'blockstack_id',pattern: `${NAME_PATTERN}|${SUBDOMAIN_PATTERN}$`,},{name: 'app_origin',type: 'string',realtype: 'url',pattern: URL_PATTERN,},{name: 'filename',type: 'string',realtype: 'filename',pattern: '.+',},{name: 'app_private_key',type: 'string',realtype: 'private_key',pattern: PRIVATE_KEY_UNCOMPRESSED_PATTERN,},{name: 'decrypt',type: 'string',realtype: 'boolean',pattern: BOOLEAN_PATTERN,},{name: 'verify',type: 'string',realtype: 'boolean',pattern: BOOLEAN_PATTERN,},],minItems: 3,maxItems: 6,help:"Get a file from another user's Gaia hub. Prints the file data to stdout. If you " +'want to read an encrypted file, and/or verify a signed file, then you must pass an app ' +'private key, and pass 1 for `DECRYPT` and/or `VERIFY`. If the file is encrypted, and you do not ' +'pass an app private key, then this command downloads the ciphertext. If the file is signed, ' +'and you want to download its data and its signature, then you must run this command twice -- ' +'once to get the file contents at `FILENAME`, and once to get the signature (whose name will be `FILENAME`.sig).\n' +'\n' +'Gaia is a key-value store, so it does not have any built-in notion of directories. However, ' +'most underlying storage systems do -- directory separators in the name of a file in ' +"Gaia may be internally treated as first-class directories (it depends on the Gaia hub's driver)." +'As such, repeated directory separators will be treated as a single directory separator by this command. ' +'For example, the file name `a/b.txt`, `/a/b.txt`, and `///a////b.txt` will be treated as identical.\n' +'\n' +'Example without encryption:\n' +'\n' +' $ # Get an unencrypted, unsigned file\n' +' $ stx gaia_getfile ryan.id http://public.ykliao.com statuses.json\n' +' [{"id":0,"text":"Hello, Blockstack!","created_at":1515786983492}]\n' +'\n' +'Example with encryption:\n' +'\n' +' $ # Get an encrypted file without decrypting\n' +' $ stx gaia_getfile ryan.id https://app.graphitedocs.com documentscollection.json\n' +' ' +' $ # Get an encrypted file, and decrypt it\n' +' $ # Tip: You can obtain the app key with the get_app_keys command\n' +' $ export APP_KEY="3ac770e8c3d88b1003bf4a0a148ceb920a6172bdade8e0325a1ed1480ab4fb19"\n' +' $ stx gaia_getfile ryan.id https://app.graphitedocs.com documentscollection.json "$APP_KEY" 1 0\n',group: 'Gaia',},gaia_putfile: {type: 'array',items: [{name: 'gaia_hub',type: 'string',realtype: 'url',pattern: URL_PATTERN,},{name: 'app_private_key',type: 'string',realtype: 'private_key',pattern: PRIVATE_KEY_UNCOMPRESSED_PATTERN,},{name: 'data_path',type: 'string',realtype: 'path',pattern: '.+',},{name: 'gaia_filename',type: 'string',realtype: 'filename',pattern: '.+',},{name: 'encrypt',type: 'string',realtype: 'boolean',pattern: BOOLEAN_PATTERN,},{name: 'sign',type: 'string',realtype: 'boolean',pattern: BOOLEAN_PATTERN,},],minItems: 4,maxItems: 6,help:'Put a file into a given Gaia hub, authenticating with the given app private key. ' +'Optionally encrypt and/or sign the data with the given app private key. If the file is ' +'successfully stored, this command prints out the URLs at which it can be fetched.\n' +'\n' +'Gaia is a key-value store, so it does not have any built-in notion of directories. However, ' +'most underlying storage systems do -- directory separators in the name of a file in ' +"Gaia may be internally treated as first-class directories (it depends on the Gaia hub's driver)." +'As such, repeated directory separators will be treated as a single directory separator by this command. ' +'For example, the file name `a/b.txt`, `/a/b.txt`, and `///a////b.txt` will be treated as identical.\n' +'\n' +'Example:\n' +'\n' +' $ # Store 4 versions of a file: plaintext, encrypted, signed, and encrypted+signed\n' +' $ # Tip: You can obtain the app key with the get_app_keys command.\n' +' $ export APP_KEY="3ac770e8c3d88b1003bf4a0a148ceb920a6172bdade8e0325a1ed1480ab4fb19"\n' +' $ stx gaia_putfile https://hub.blockstack.org "$APP_KEY" /path/to/file.txt file.txt\n' +' {\n' +' "urls": "https://gaia.blockstack.org/hub/19KAzYp4kSKozeAGMUsnuqkEGdgQQLEvwo/file.txt"\n' +' }\n' +' $ stx gaia_putfile https://hub.blockstack.org "$APP_KEY" /path/to/file.txt file-encrypted.txt 1\n' +' {\n' +' "urls": "https://gaia.blockstack.org/hub/19KAzYp4kSKozeAGMUsnuqkEGdgQQLEvwo/file-encrypted.txt"\n' +' }\n' +' $ stx gaia_putfile https://hub.blockstack.org "$APP_KEY" /path/to/file.txt file-signed.txt 0 1\n' +' {\n' +' "urls": "https://gaia.blockstack.org/hub/19KAzYp4kSKozeAGMUsnuqkEGdgQQLEvwo/file-signed.txt"\n' +' }\n' +' $ stx gaia_putfile https://hub.blockstack.org "$APP_KEY" /path/to/file.txt file-encrypted-signed.txt 1 1\n' +' {\n' +' "urls": "https://gaia.blockstack.org/hub/19KAzYp4kSKozeAGMUsnuqkEGdgQQLEvwo/file-encrypted-signed.txt"\n' +' }\n',group: 'Gaia',},gaia_deletefile: {type: 'array',items: [{name: 'gaia_hub',type: 'string',realtype: 'url',pattern: URL_PATTERN,},{name: 'app_private_key',type: 'string',realtype: 'private_key',pattern: PRIVATE_KEY_UNCOMPRESSED_PATTERN,},{name: 'gaia_filename',type: 'string',realtype: 'filename',pattern: '.+',},{name: 'was_signed',type: 'string',realtype: 'boolean',pattern: BOOLEAN_PATTERN,},],minItems: 3,maxItems: 4,help:'Delete a file in a Gaia hub, as well as its signature metadata (which is stored in a separate file).' +'\n' +'Example:\n' +'\n' +' $ # Tip: You can obtain the app key with the get_app_keys command.\n' +' $ export APP_KEY="3ac770e8c3d88b1003bf4a0a148ceb920a6172bdade8e0325a1ed1480ab4fb19"\n' +' $ stx gaia_deletefile https://hub.blockstack.org "$APP_KEY" file.txt false\n' +' ok',group: 'Gaia',},gaia_listfiles: {type: 'array',items: [{name: 'gaia_hub',type: 'string',realtype: 'url',pattern: URL_PATTERN,},{name: 'app_private_key',type: 'string',realtype: 'private_key',pattern: PRIVATE_KEY_UNCOMPRESSED_PATTERN,},],minItems: 2,maxItems: 3,help:'List all the files in a Gaia hub bucket. You must have the private key for the bucket ' +'in order to list its contents. The command prints each file name on its own line, and when ' +'finished, it prints the number of files listed.\n' +'\n' +'Example:\n' +'\n' +' $ # Tip: You can obtain the app key with the get_app_keys command.\n' +' $ export APP_KEY="3ac770e8c3d88b1003bf4a0a148ceb920a6172bdade8e0325a1ed1480ab4fb19"\n' +' $ stx gaia_listfiles "https://hub.blockstack.org" "$APP_KEY"\n' +' hello_world\n' +' dir/format\n' +' /.dotfile\n' +' 3\n',group: 'Gaia',},gaia_restore_bucket: {type: 'array',items: [{name: 'name_or_id_address',type: 'string',realtype: 'name_or_id_address',pattern: `${ID_ADDRESS_PATTERN}|${NAME_PATTERN}|${SUBDOMAIN_PATTERN}`,},{name: 'app_origin',type: 'string',realtype: 'url',pattern: URL_PATTERN,},{name: 'gaia_hub',type: 'string',realtype: 'url',pattern: URL_PATTERN,},{name: 'backup_phrase',type: 'string',realtype: '12_words_or_ciphertext',},{name: 'dump_dir',type: 'string',realtype: 'path',pattern: '.+',},],minItems: 5,maxItems: 5,help:'Upload the contents of a previously-dumped Gaia bucket to a new Gaia hub. The `GAIA_HUB` argument ' +'must correspond to the *write* endpoint of the Gaia hub -- that is, you should be able to fetch ' +'`$GAIA_HUB/hub_info`. `DUMP_DIR` must contain the file contents created by a previous successful run of the gaia_dump_bucket command, ' +'and both `NAME_OR_ID_ADDRESS` and `APP_ORIGIN` must be the same as they were when it was run.\n' +'\n' +'Example:\n' +'\n' +' $ export BACKUP_PHRASE="section amount spend resemble spray verify night immune tattoo best emotion parrot"\n' +' $ stx gaia_restore_bucket hello.id.blockstack https://sample.app https://new.gaia.hub "$BACKUP_PHRASE" ./backups\n' +' Uploaded ./backups/hello_world to https://new.gaia.hub/hub/1Lr8ggSgdmfcb4764woYutUfFqQMjEoKHc/hello_world\n' +' Uploaded ./backups/dir\\x2fformat to https://new.gaia.hub/hub/1Lr8ggSgdmfcb4764woYutUfFqQMjEoKHc/dir/format\n' +' Uploaded ./backups/\\x2f.dotfile to https://new.gaia.hub/hub/1Lr8ggSgdmfcb4764woYutUfFqQMjEoKHc//.dotfile\n' +' 3\n',group: 'Gaia',},gaia_sethub: {type: 'array',items: [{name: 'blockstack_id',type: 'string',realtype: 'blockstack_id',pattern: `^${NAME_PATTERN}|${SUBDOMAIN_PATTERN}$`,},{name: 'owner_gaia_hub',type: 'string',realtype: 'url',pattern: URL_PATTERN,},{name: 'app_origin',type: 'string',realtype: 'url',pattern: URL_PATTERN,},{name: 'app_gaia_hub',type: 'string',realtype: 'url',pattern: URL_PATTERN,},{name: 'backup_phrase',type: 'string',realtype: '12_words_or_ciphertext',},],minItems: 5,maxItems: 5,help:'Set the Gaia hub for a particular application for a Blockstack ID. If the command succeeds, ' +'the URLs to your updated profile will be printed and your profile will contain an entry in its "apps" ' +'key that links the given `APP_ORIGIN` to the given `APP_GAIA_HUB`.\n' +'\n' +'NOTE: Both `OWNER_GAIA_HUB` and `APP_GAIA_HUB` must be the *write* endpoints of their respective Gaia hubs.\n' +'\n' +'Your 12-word phrase (in either raw or encrypted form) is required to re-sign and store your ' +'profile and to generate an app-specific key and Gaia bucket. If you give the encrypted backup phrase, you will be prompted for a password.\n' +'\n' +'Example:\n' +'\n' +' $ export BACKUP_PHRASE="soap fog wealth upon actual blossom neither timber phone exile monkey vocal"\n' +' $ stx gaia_sethub hello_world.id https://hub.blockstack.org https://my.cool.app https://my.app.gaia.hub "$BACKUP_PHRASE"\n' +' {\n' +' "profileUrls": {\n' +' "error": null,\n' +' "dataUrls": [\n' +' "https://gaia.blockstack.org/hub/1ArdkA2oLaKnbNbLccBaFhEV4pYju8hJ82/profile.json"\n' +' ]\n' +' }\n' +' }\n' +' \n' +' $ # You can check the new apps entry with curl and jq as follows:\n' +' $ curl -sL https://gaia.blockstack.org/hub/1ArdkA2oLaKnbNbLccBaFhEV4pYju8hJ82/profile.json | jq ".[0].decodedToken.payload.claim.apps"\n' +' {\n' +' "https://my.cool.app": "https://my.app.gaia.hub/hub/1EqzyQLJ15KG1WQmi5cf1HtmSeqS1Wb8tY/"\n' +' }\n' +'\n',group: 'Gaia',},get_account_history: {type: 'array',items: [{name: 'address',type: 'string',realtype: 'address',pattern: STACKS_ADDRESS_PATTERN,},{name: 'page',type: 'string',realtype: 'integer',pattern: '^[0-9]+$',},],minItems: 2,maxItems: 2,help:'Query the history of account debits and credits over a given block range. ' +'Returns the history one page at a time. An empty result indicates that the page ' +'number has exceeded the number of historic operations in the given block range.\n' +'\n' +'Example:\n' +'\n' +' $ stx get_account_history SP2H7VMY13ESQDAD5808QEY1EMGESMHZWBJRTN2YA 0\n' +' [\n' +' {\n' +' "address": "SP2H7VMY13ESQDAD5808QEY1EMGESMHZWBJRTN2YA",\n' +' "block_id": 56789\n' +' "credit_value": "100000000000",\n' +' "debit_value": "0",\n' +' "lock_transfer_block_id": 0,\n' +' "txid": "0e5db84d94adff5b771262b9df015164703b39bb4a70bf499a1602b858a0a5a1",\n' +' "type": "STACKS",\n' +' "vtxindex": 0\n' +' },\n' +' {\n' +' "address": "SP2H7VMY13ESQDAD5808QEY1EMGESMHZWBJRTN2YA",\n' +' "block_id": 56790,\n' +' "credit_value": "100000000000",\n' +' "debit_value": "64000000000",\n' +' "lock_transfer_block_id": 0,\n' +' "txid": "5a0c67144626f7bd4514e4de3f3bbf251383ca13887444f326bac4bc8b8060ee",\n' +' "type": "STACKS",\n' +' "vtxindex": 1\n' +' },\n' +' {\n' +' "address": "SP2H7VMY13ESQDAD5808QEY1EMGESMHZWBJRTN2YA",\n' +' "block_id": 56791,\n' +' "credit_value": "100000000000",\n' +' "debit_value": "70400000000",\n' +' "lock_transfer_block_id": 0,\n' +' "txid": "e54c271d6a9feb4d1859d32bc99ffd713493282adef5b4fbf50bca9e33fc0ecc",\n' +' "type": "STACKS",\n' +' "vtxindex": 2\n' +' },\n' +' {\n' +' "address": "SP2H7VMY13ESQDAD5808QEY1EMGESMHZWBJRTN2YA",\n' +' "block_id": 56792,\n' +' "credit_value": "100000000000",\n' +' "debit_value": "76800000000",\n' +' "lock_transfer_block_id": 0,\n' +' "txid": "06e0d313261baefec1e59783e256ab487e17e0e776e2fdab0920cc624537e3c8",\n' +' "type": "STACKS",\n' +' "vtxindex": 3\n' +' }\n' +' ]\n' +'\n',group: 'Account Management',},get_account_at: {type: 'array',items: [{name: 'address',type: 'string',realtype: 'address',pattern: STACKS_ADDRESS_PATTERN,},{name: 'blocknumber',type: 'string',realtype: 'integer',pattern: '^[0-9]+$',},],minItems: 2,maxItems: 2,help:'Query the list of token debits and credits on a given address that occurred ' +'at a particular block height. Does not include BTC debits and credits; only Stacks.\n' +'\n' +'Example\n' +'\n' +' $ stx -t get_account_at SP2NTAQFECYGSTE1W47P71FG21H8F00KZZWFGEVKQ 56789\n' +' [\n' +' {\n' +' "debit_value": "0",\n' +' "block_id": 56789\n' +' "lock_transfer_block_id": 0,\n' +' "txid": "291817c78a865c1f72938695218a48174265b2358e89b9448edc89ceefd66aa0",\n' +' "address": "SP2NTAQFECYGSTE1W47P71FG21H8F00KZZWFGEVKQ",\n' +' "credit_value": "1000000000000000000",\n' +' "type": "STACKS",\n' +' "vtxindex": 0\n' +' }\n' +' ]\n' +'\n',group: 'Account Management',},get_address: {type: 'array',items: [{name: 'private_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},],minItems: 1,maxItems: 1,help:'Get the address of a private key or multisig private key bundle. Gives the BTC and STACKS addresses\n' +'\n' +'Example:\n' +'\n' +' $ stx get_address f5185b9ca93bdcb5753fded3b097dab8547a8b47d2be578412d0687a9a0184cb01\n' +' {\n' +' "BTC": "1JFhWyVPpZQjbPcXFtpGtTmU22u4fhBVmq",\n' +' "STACKS": "SP2YM3J4KQK09V670TD6ZZ1XYNYCNGCWCVVKSDFWQ"\n' +' }\n' +' $ stx get_address 1,f5185b9ca93bdcb5753fded3b097dab8547a8b47d2be578412d0687a9a0184cb01,ff2ff4f4e7f8a1979ffad4fc869def1657fd5d48fc9cf40c1924725ead60942c01\n' +' {\n' +' "BTC": "363pKBhc5ipDws1k5181KFf6RSxhBZ7e3p",\n' +' "STACKS": "SMQWZ30EXVG6XEC1K4QTDP16C1CAWSK1JSWMS0QN"\n' +' }',group: 'Key Management',},get_blockchain_record: {type: 'array',items: [{name: 'blockstack_id',type: 'string',realtype: 'blockstack_id',pattern: `^${NAME_PATTERN}|${SUBDOMAIN_PATTERN}$`,},],minItems: 1,maxItems: 1,help:'Get the low-level blockchain-hosted state for a Blockstack ID. This command ' +'is used mainly for debugging and diagnostics. You should not rely on it to be stable.',group: 'Querying Blockstack IDs',},get_blockchain_history: {type: 'array',items: [{name: 'blockstack_id',type: 'string',realtype: 'blockstack_id',pattern: `${NAME_PATTERN}|${SUBDOMAIN_PATTERN}$`,},{name: 'page',type: 'string',realtype: 'page_number',pattern: '^[0-9]+$',},],minItems: 1,maxItems: 2,help:'Get the low-level blockchain-hosted history of operations on a Blockstack ID. ' +'This command is used mainly for debugging and diagnostics, and is not guaranteed to ' +'be stable across releases.',group: 'Querying Blockstack IDs',},get_confirmations: {type: 'array',items: [{name: 'txid',type: 'string',realtype: 'transaction_id',pattern: TXID_PATTERN,},],minItems: 1,maxItems: 1,help:'Get the block height and number of confirmations for a transaction.\n' +'\n' +'Example:\n' +'\n' +' $ stx get_confirmations e41ce043ab64fd5a5fd382fba21acba8c1f46cbb1d7c08771ada858ce7d29eea\n' +' {\n' +' "blockHeight": 567890,\n' +' "confirmations": 7,\n' +' }\n' +'\n',group: 'Peer Services',},get_namespace_blockchain_record: {type: 'array',items: [{name: 'namespace_id',type: 'string',realtype: 'namespace_id',pattern: NAMESPACE_PATTERN,},],minItems: 1,maxItems: 1,help:'Get the low-level blockchain-hosted state for a Blockstack namespace. This command ' +'is used mainly for debugging and diagnostics, and is not guaranteed to be stable across ' +'releases.',group: 'Namespace Operations',},get_app_keys: {type: 'array',items: [{name: 'backup_phrase',type: 'string',realtype: '12_words_or_ciphertext',},{name: 'name_or_id_address',type: 'string',realtype: 'name-or-id-address',pattern: `${NAME_PATTERN}|${SUBDOMAIN_PATTERN}|${ID_ADDRESS_PATTERN}`,},{name: 'app_origin',type: 'string',realtype: 'url',pattern: URL_PATTERN,},],minItems: 3,maxItems: 3,help:'Get the application private key from a 12-word backup phrase and a name or ID-address. ' +'This is the private key used to sign data in Gaia, and its address is the Gaia bucket ' +'address. If you provide your encrypted backup phrase, you will be asked to decrypt it. ' +'If you provide a name instead of an ID-address, its ID-address will be queried automatically ' +'(note that this means that the name must already be registered).\n' +'\n' +'NOTE: This command does NOT verify whether or not the name or ID-address was created by the ' +'backup phrase. You should do this yourself via the `get_owner_keys` command if you are not sure.\n' +'\n' +'There are two derivation paths emitted by this command: a `keyInfo` path and a `legacyKeyInfo`' +"path. You should use the one that matches the Gaia hub read URL's address, if you have already " +'signed in before. If not, then you should use the `keyInfo` path when possible.\n' +'\n' +'Example:\n' +'\n' +' $ export BACKUP_PHRASE="one race buffalo dynamic icon drip width lake extra forest fee kit"\n' +' $ stx get_app_keys "$BACKUP_PHRASE" example.id.blockstack https://my.cool.dapp\n' +' {\n' +' "keyInfo": {\n' +' "privateKey": "TODO",\n' +' "address": "TODO"\n' +' },\n' +' "legacyKeyInfo": {\n' +' "privateKey": "90f9ec4e13fb9a00243b4c1510075157229bda73076c7c721208c2edca28ea8b",\n' +' "address": "1Lr8ggSgdmfcb4764woYutUfFqQMjEoKHc"\n' +' },\n' +' "ownerKeyIndex": 0\n' +' }',group: 'Key Management',},get_owner_keys: {type: 'array',items: [{name: 'backup_phrase',type: 'string',realtype: '12_words_or_ciphertext',},{name: 'index',type: 'string',realtype: 'integer',pattern: '^[0-9]+$',},],minItems: 1,maxItems: 2,help:'Get the list of owner private keys and ID-addresses from a 12-word backup phrase. ' +'Pass non-zero values for INDEX to generate the sequence of ID-addresses that can be used ' +'to own Blockstack IDs. If you provide an encrypted 12-word backup phrase, you will be ' +'asked for your password to decrypt it.\n' +'\n' +'Example:\n' +'\n' +' $ # get the first 3 owner keys and addresses for a backup phrase\n' +' $ export BACKUP_PHRASE="soap fog wealth upon actual blossom neither timber phone exile monkey vocal"\n' +' $ stx get_owner_keys "$BACKUP_PHRASE" 3\n' +' [\n' +' {\n' +' "privateKey": "14b0811d5cd3486d47279d8f3a97008647c64586b121e99862c18863e2a4183501",\n' +' "version": "v0.10-current",\n' +' "index": 0,\n' +' "idAddress": "ID-1ArdkA2oLaKnbNbLccBaFhEV4pYju8hJ82"\n' +' },\n' +' {\n' +' "privateKey": "1b3572d8dd6866828281ac6cf135f04153210c1f9b123743eccb795fd3095e4901",\n' +' "version": "v0.10-current",\n' +' "index": 1,\n' +' "idAddress": "ID-18pR3UpD1KFrnk88a3MGZmG2dLuZmbJZ25"\n' +' },\n' +' {\n' +' "privateKey": "b19b6d62356db96d570fb5f08b78f0aa7f384525ba3bdcb96fbde29b8e11710d01",\n' +' "version": "v0.10-current",\n' +' "index": 2,\n' +' "idAddress": "ID-1Gx4s7ggkjENw3wSY6bNd1CwoQKk857AqN"\n' +' }\n' +' ]\n' +'\n',group: 'Key Management',},get_payment_key: {type: 'array',items: [{name: 'backup_phrase',type: 'string',realtype: '12_words_or_ciphertext',},],minItems: 1,maxItems: 1,help:'Get the payment private key from a 12-word backup phrase. If you provide an ' +'encrypted backup phrase, you will be asked for your password to decrypt it. This command ' +'will tell you your Bitcoin and Stacks token addresses as well.\n' +'\n' +'Example\n' +'\n' +' $ stx get_payment_key "soap fog wealth upon actual blossom neither timber phone exile monkey vocal"\n' +' [\n' +' {\n' +' "privateKey": "4023435e33da4aff0775f33e7b258f257fb20ecff039c919b5782313ab73afb401",\n' +' "address": {\n' +' "BTC": "1ybaP1gaRwRSWRE4f8JXo2W8fiTZmA4rV",\n' +' "STACKS": "SP5B89ZJAQHBRXVYP15YB5PAY5E24FEW9K4Q63PE"\n' +' },\n' +' "index": 0\n' +' }\n' +' ]\n' +'\n',group: 'Key Management',},get_stacks_wallet_key: {type: 'array',items: [{name: 'backup_phrase',type: 'string',realtype: '24_words_or_ciphertext',},],minItems: 1,maxItems: 1,help:'Get the payment private key from a 24-word backup phrase used by the Stacks wallet. If you provide an ' +'encrypted backup phrase, you will be asked for your password to decrypt it. This command ' +'will tell you your Bitcoin and Stacks token addresses as well.\n' +'\n' +'Example\n' +'\n' +' $ stx get_stacks_payment_key "toast canal educate tissue express melody produce later gospel victory meadow outdoor hollow catch liberty annual gasp hat hello april equip thank neck cruise"\n' +' [\n' +' {\n' +' "privateKey": "a25cea8d310ce656c6d427068c77bad58327334f73e39c296508b06589bc4fa201",\n' +' "address": {\n' +' "BTC": "1ATAW6TAbTCKgU3xPgAcWQwjW9Q26Eambx",\n' +' "STACKS": "SP1KTQR7CTQNA20SV2VNTF9YABMR6RJERSES3KC6Z"\n' +' },\n' +' "index": 0\n' +' }\n' +' ]\n' +'\n',group: 'Key Management',},get_zonefile: {type: 'array',items: [{name: 'zonefile_hash',type: 'string',realtype: 'zonefile_hash',pattern: ZONEFILE_HASH_PATTERN,},],minItems: 1,maxItems: 1,help:'Get a zone file by hash.\n' +'\n' +'Example:\n' +'\n' +' $ stx get_zonefile ee77ad484b7b229f09461e4c2b6d3bd3e152ba95\n' +' $ORIGIN ryanshea.id\n' +' $TTL 3600\n' +' _http._tcp URI 10 1 "https://gaia.blockstack.org/hub/15BcxePn59Y6mYD2fRLCLCaaHScefqW2No/1/profile.json"\n' +'\n',group: 'Peer Services',},help: {type: 'array',items: [{name: 'command',type: 'string',realtype: 'command',},],minItems: 0,maxItems: 1,help: 'Get the usage string for a CLI command',group: 'CLI',},lookup: {type: 'array',items: [{name: 'blockstack_id',type: 'string',realtype: 'blockstack_id',pattern: `${NAME_PATTERN}|${SUBDOMAIN_PATTERN}$`,},],minItems: 1,maxItems: 1,help:'Get and authenticate the profile and zone file for a Blockstack ID.\n' +'\n' +'Example:\n' +'\n' +' $ stx lookup example.id\n' +'\n',group: 'Querying Blockstack IDs',},names: {type: 'array',items: [{name: 'id_address',type: 'string',realtype: 'id-address',pattern: ID_ADDRESS_PATTERN,},],minItems: 1,maxItems: 1,help:'Get the list of Blockstack IDs owned by an ID-address.\n' +'\n' +'Example:\n' +'\n' +' $ stx names ID-1FpBChfzHG3TdQQRKWAipbLragCUArueG9\n' +'\n',group: 'Querying Blockstack IDs',},make_keychain: {type: 'array',items: [{name: 'backup_phrase',type: 'string',realtype: '12_words_or_ciphertext',},],minItems: 0,maxItems: 1,help:'Generate the owner and payment private keys, optionally from a given 12-word ' +'backup phrase. If no backup phrase is given, a new one will be generated. If you provide ' +'your encrypted backup phrase, you will be asked to decrypt it.\n' +'\n' +'Example:\n' +'\n' +' $ stx make_keychain\n' +' {\n' +' "mnemonic": "apart spin rich leader siren foil dish sausage fee pipe ethics bundle",\n' +' "keyInfo": {\n' +' "privateKey": "56d30f2b605ed114c7dc45599ae521c525d07e1286fbab67452a6586ea49332a01"\n' +' "address": "SP3G19B6J50FH6JGXAKS06N6WA1XPJCKKM4JCHC2D"\n' +' "btcAddress": "1Nixy2aB3miBreDTGTjieyh2hGng55k1rw"\n' +' "index": 0,\n' +' }\n' +' }\n' +'\n',group: 'Key Management',},make_zonefile: {type: 'array',items: [{name: 'blockstack_id',type: 'string',realtype: 'blockstack_id',pattern: `^${NAME_PATTERN}|${SUBDOMAIN_PATTERN}$`,},{name: 'id_address',type: 'string',realtype: 'ID-address',pattern: ID_ADDRESS_PATTERN,},{name: 'gaia_url_prefix',type: 'string',realtype: 'url',pattern: '.+',},{name: 'resolver_url',type: 'string',realtype: 'url',pattern: '.+',},],minItems: 3,maxItems: 4,help:'Generate a zone file for a Blockstack ID with the given profile URL. If you know ' +'the ID-address for the Blockstack ID, the profile URL usually takes the form of:\n' +'\n' +' {GAIA_URL_PREFIX}/{ADDRESS}/profile.json\n' +'\n' +'where `{GAIA_URL_PREFIX}` is the *read* endpoint of your Gaia hub (e.g. https://gaia.blockstack.org/hub) and ' +"`{ADDRESS}` is the base58check part of your ID-address (i.e. the string following 'ID-').\n" +'\n' +'Example:\n' +'\n' +' $ stx make_zonefile example.id ID-1ArdkA2oLaKnbNbLccBaFhEV4pYju8hJ82 https://my.gaia.hub/hub\n' +' $ORIGIN example.id\n' +' $TTL 3600\n' +' _http._tcp IN URI 10 1 "https://my.gaia.hub/hub/1ArdkA2oLaKnbNbLccBaFhEV4pYju8hJ82/profile.json"\n' +'\n',group: 'Peer Services',},name_import: {type: 'array',items: [{name: 'blockstack_id',type: 'string',realtype: 'blockstack_id',pattern: NAME_PATTERN,},{name: 'id_address',type: 'string',realtype: 'id-address',pattern: ID_ADDRESS_PATTERN,},{name: 'gaia_url_prefix',type: 'string',realtype: 'url',pattern: '.+',},{name: 'reveal_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},{name: 'zonefile',type: 'string',realtype: 'path',pattern: '.+',},{name: 'zonefile_hash',type: 'string',realtype: 'zonefile_hash',pattern: ZONEFILE_HASH_PATTERN,},],minItems: 4,maxItems: 6,help:'Import a name into a namespace you revealed. The `REVEAL_KEY` must be the same as ' +'the key that revealed the namespace. You can only import a name into a namespace if ' +'the namespace has not yet been launched (i.e. via `namespace_ready`), and if the ' +'namespace was revealed less than a year ago (52595 blocks ago).\n' +'\n' +'A zone file will be generated for this name automatically, if "ZONEFILE" is not given. By default, ' +"the zone file will have a URL to the name owner's profile prefixed by `GAIA_URL_PREFIX`. If you " +"know the *write* endpoint for the name owner's Gaia hub, you can find out the `GAIA_URL_PREFIX` " +'to use with `curl $GAIA_HUB/hub_info`".\n' +'\n' +'If you specify an argument for `ZONEFILE`, then the `GAIA_URL_PREFIX` argument is ignored in favor of ' +'your custom zone file on disk.\n' +'\n' +'If you specify a valid zone file hash for `ZONEFILE_HASH` then it will be used in favor of ' +'both `ZONEFILE` and `GAIA_URL_PREFIX`. The zone file hash will be incorporated directly into the ' +'name-import transaction.\n' +'\n' +'This command prints out a transaction ID if it succeeds, and it replicates the zone file (if given) ' +'to a transaction broadcaster (you can choose which one with -T). The zone file will be automatically ' +'broadcast to the Blockstack peer network when the transaction confirms. Alternatively, you can do so ' +'yourself with the `zonefile_push` command.\n' +'\n' +'Example:\n' +'\n' +' $ export REVEAL_KEY="bfeffdf57f29b0cc1fab9ea197bb1413da2561fe4b83e962c7f02fbbe2b1cd5401"\n' +' $ export ID_ADDRESS="ID-18e1bqU7B5qUPY3zJgMLxDnexyStTeSnvV"\n' +' $ stx name_import example.id "$ID_ADDRESS" https://gaia.blockstack.org/hub "$REVEAL_KEY"\n' +' f726309cea7a9db364307466dc0e0e759d5c0d6bad1405e2fd970740adc7dc45\n' +'\n',group: 'Namespace Operations',},namespace_preorder: {type: 'array',items: [{name: 'namespace_id',type: 'string',realtype: 'namespace_id',pattern: NAMESPACE_PATTERN,},{name: 'reveal_address',type: 'string',realtype: 'address',pattern: ADDRESS_PATTERN,},{name: 'payment_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},],minItems: 3,maxItems: 3,help:'Preorder a namespace. This is the first of three steps to creating a namespace. ' +'Once this transaction is confirmed, you will need to use the `namespace_reveal` command ' +'to reveal the namespace (within 24 hours, or 144 blocks).',group: 'Namespace Operations',},namespace_reveal: {type: 'array',items: [{name: 'namespace_id',type: 'string',realtype: 'namespace_id',pattern: NAMESPACE_PATTERN,},{name: 'reveal_address',type: 'string',realtype: 'address',pattern: ADDRESS_PATTERN,},{// versionname: 'version',type: 'string',realtype: '2-byte-integer',pattern: INT_PATTERN,},{// lifetimename: 'lifetime',type: 'string',realtype: '4-byte-integer',pattern: INT_PATTERN,},{// coeffname: 'coefficient',type: 'string',realtype: '1-byte-integer',pattern: INT_PATTERN,},{// basename: 'base',type: 'string',realtype: '1-byte-integer',pattern: INT_PATTERN,},{// bucketsname: 'price_buckets',type: 'string',realtype: 'csv-of-16-nybbles',pattern: '^([0-9]{1,2},){15}[0-9]{1,2}$',},{// non-alpha discountname: 'nonalpha_discount',type: 'string',realtype: 'nybble',pattern: INT_PATTERN,},{// no-vowel discountname: 'no_vowel_discount',type: 'string',realtype: 'nybble',pattern: INT_PATTERN,},{name: 'payment_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},],minItems: 10,maxItems: 10,help:'Reveal a preordered namespace, and set the price curve and payment options. ' +'This is the second of three steps required to create a namespace, and must be done ' +'shortly after the associated `namespace_preorder` command.',group: 'Namespace Operations',},namespace_ready: {type: 'array',items: [{name: 'namespace_id',type: 'string',realtype: 'namespace_id',pattern: NAMESPACE_PATTERN,},{name: 'reveal_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},],minItems: 2,maxItems: 2,help:'Launch a revealed namespace. This is the third and final step of creating a namespace. ' +'Once launched, you will not be able to import names anymore.',group: 'Namespace Operations',},price: {type: 'array',items: [{name: 'blockstack_id',type: 'string',realtype: 'blockstack_id',pattern: NAME_PATTERN,},],minItems: 1,maxItems: 1,help:'Get the price of an on-chain Blockstack ID. Its namespace must already exist.\n' +'\n' +'Example:\n' +'\n' +' $ stx price example.id\n' +' {\n' +' "units": "BTC",\n' +' "amount": "5500"\n' +' }\n' +'\n',group: 'Querying Blockstack IDs',},price_namespace: {type: 'array',items: [{name: 'namespace_id',type: 'string',realtype: 'namespace_id',pattern: NAMESPACE_PATTERN,},],minItems: 1,maxItems: 1,help:'Get the price of a namespace.\n' +'\n' +'Example:\n' +'\n' +' $ # get the price of the .hello namespace\n' +' $ stx price_namespace hello\n' +' {\n' +' "units": "BTC",\n' +' "amount": "40000000"\n' +' }\n' +'\n',group: 'Namespace Operations',},profile_sign: {type: 'array',items: [{name: 'profile',type: 'string',realtype: 'path',},{name: 'owner_key',type: 'string',realtype: 'private_key',pattern: PRIVATE_KEY_PATTERN,},],minItems: 2,maxItems: 2,help:'Sign a profile on disk with a given owner private key. Print out the signed profile JWT.\n' +'\n' +'Example:\n' +'\n' +' $ # Tip: you can get the owner key from your 12-word backup phrase using the get_owner_keys command\n' +' $ stx profile_sign /path/to/profile.json 0ffd299af9c257173be8486ef54a4dd1373407d0629ca25ca68ff24a76be09fb01\n' +'\n',group: 'Profiles',},profile_store: {type: 'array',items: [{name: 'user_id',type: 'string',realtype: 'name-or-id-address',pattern: `${NAME_PATTERN}|${SUBDOMAIN_PATTERN}|${ID_ADDRESS_PATTERN}`,},{name: 'profile',type: 'string',realtype: 'path',},{name: 'owner_key',type: 'string',realtype: 'private_key',pattern: PRIVATE_KEY_PATTERN,},{name: 'gaia_hub',type: 'string',realtype: 'url',},],minItems: 4,maxItems: 4,help:'Store a profile on disk to a Gaia hub. `USER_ID` can be either a Blockstack ID or ' +"an ID-address. The `GAIA_HUB` argument must be the *write* endpoint for the user's Gaia hub " +'(e.g. https://hub.blockstack.org). You can verify this by ensuring that you can run ' +'`curl "$GAIA_HUB/hub_info"` successfully.',group: 'Profiles',},profile_verify: {type: 'array',items: [{name: 'profile',type: 'string',realtype: 'path',},{name: 'id_address',type: 'string',realtype: 'id-address',pattern: `${ID_ADDRESS_PATTERN}|${PUBLIC_KEY_PATTERN}`,},],minItems: 2,maxItems: 2,help:'Verify a JWT encoding a profile on disk using an ID-address. Prints out the contained profile on success.\n' +'\n' +'Example:\n' +'\n' +' $ # get the raw profile JWT\n' +' $ curl -sL https://raw.githubusercontent.com/jcnelson/profile/master/judecn.id > /tmp/judecn.id.jwt\n' +' $ # Tip: you can get the ID-address for a name with the "whois" command\n' +' $ stx profile_verify /tmp/judecn.id.jwt ID-16EMaNw3pkn3v6f2BgnSSs53zAKH4Q8YJg\n' +'\n',group: 'Profiles',},renew: {type: 'array',items: [{name: 'blockstack_id',type: 'string',realtype: 'on-chain-blockstack_id',pattern: NAME_PATTERN,},{name: 'owner_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},{name: 'payment_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},{name: 'new_id_address',type: 'string',realtype: 'id-address',pattern: ID_ADDRESS_PATTERN,},{name: 'zonefile',type: 'string',realtype: 'path',},{name: 'zonefile_hash',type: 'string',realtype: 'zonefile_hash',pattern: ZONEFILE_HASH_PATTERN,},],minItems: 3,maxItems: 6,help:'Renew a name. Optionally transfer it to a new owner address (`NEW_ID_ADDRESS`), ' +'and optionally load up and give it a new zone file on disk (`ZONEFILE`). If the command ' +'succeeds, it prints out a transaction ID. You can use with the `get_confirmations` ' +'command to track its confirmations on the underlying blockchain -- once it reaches 7 ' +'confirmations, the rest of the Blockstack peer network will process it.\n' +'\n' +'If you create a new zonefile for your name, you will need ' +'to later use `zonefile_push` to replicate the zone file to the Blockstack peer network ' +'once the transaction reaches 7 confirmations.\n' +'\n' +'Example:\n' +'\n' +' $ # Tip: you can get your owner key from your backup phrase with "get_owner_keys".\n' +' $ # Tip: you can get your payment key from your backup phrase with "get_payment_key".\n' +' $ export OWNER="136ff26efa5db6f06b28f9c8c7a0216a1a52598045162abfe435d13036154a1b01"\n' +' $ export PAYMENT="bfeffdf57f29b0cc1fab9ea197bb1413da2561fe4b83e962c7f02fbbe2b1cd5401"\n' +' $ stx renew hello_world.id "$OWNER" "$PAYMENT"\n' +' 3d8945ce76d4261678d76592b472ed639a10d4298f9d730af4edbbc3ec02882e\n' +'\n' +' $ # Renew with a new owner\n' +' $ export NEW_OWNER="ID-141BcmFVbEuuMb7Bd6umXyV6ZD1WYomYDE"\n' +' $ stx renew hello_world.id "$OWNER" "$PAYMENT" "$NEW_OWNER"\n' +' 33865625ef3f1b607111c0dfba9e58604927173bd2e299a343e19aa6d2cfb263\n' +'\n' +' $ # Renew with a new zone file.\n' +' $ # Tip: you can create a new zonefile with the "make_zonefile" command.\n' +' $ export ZONEFILE_PATH="/path/to/new/zonefile.txt"\n' +' $ stx renew hello_world.id "$OWNER" "$PAYMENT" --zonefile "$ZONEFILE_PATH"\n' +' e41ce043ab64fd5a5fd382fba21acba8c1f46cbb1d7c08771ada858ce7d29eea\n' +' $ # wait 7 confirmations\n' +' $ stx get_confirmations e41ce043ab64fd5a5fd382fba21acba8c1f46cbb1d7c08771ada858ce7d29eea\n' +' {\n' +' "blockHeight": 567890,\n' +' "confirmations": 7,\n' +' }\n' +' $ stx -H https://core.blockstack.org zonefile_push "$ZONEFILE_PATH"\n' +' [\n' +' "https://core.blockstack.org"\n' +' ]\n' +'\n',group: 'Blockstack ID Management',},register: {type: 'array',items: [{name: 'blockstack_id',type: 'string',realtype: 'on-chain-blockstack_id',pattern: NAME_PATTERN,},{name: 'owner_key',type: 'string',realtype: 'private_key',pattern: PRIVATE_KEY_PATTERN,},{name: 'payment_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},{name: 'gaia_hub',type: 'string',realtype: 'url',},{name: 'zonefile',type: 'string',realtype: 'path',},],minItems: 4,maxItems: 5,help:'If you are trying to register a name for a *private key*, use this command.\n' +'\n' +'Register a name to a single name-owning private key. After successfully running this command, ' +'and after waiting a couple hours, your name will be ready to use and will resolve to a ' +'signed empty profile hosted on the given Gaia hub (`GAIA_HUB`).\n' +'\n' +'Behind the scenes, this will generate and send two transactions ' +'and generate and replicate a zone file with the given Gaia hub URL (`GAIA_HUB`). ' +'Note that the `GAIA_HUB` argument must correspond to the *write* endpoint of the Gaia hub ' +'(i.e. you should be able to run \'curl "$GAIA_HUB/hub_info"\' and get back data). If you ' +'are using Blockstack PBC\'s default Gaia hub, pass "https://hub.blockstack.org" for this ' +'argument.\n' +'\n' +"By default, this command generates a zone file automatically that points to the Gaia hub's " +'read endpoint (which is queried on-the-fly from `GAIA_HUB`). If you instead want to have a custom zone file for this name, ' +'you can specify a path to it on disk with the `ZONEFILE` argument.\n' +'\n' +'If this command completes successfully, your name will be ready to use once both transactions have 7+ confirmations. ' +'You can use the `get_confirmations` command to track the confirmations ' +'on the transaction IDs returned by this command.\n' +'\n' +'WARNING: You should *NOT* use the payment private key (`PAYMENT_KEY`) while the name is being confirmed. ' +'If you do so, you could double-spend one of the pending transactions and lose your name.\n' +'\n' +'Example:\n' +'\n' +' $ export OWNER="136ff26efa5db6f06b28f9c8c7a0216a1a52598045162abfe435d13036154a1b01"\n' +' $ export PAYMENT="bfeffdf57f29b0cc1fab9ea197bb1413da2561fe4b83e962c7f02fbbe2b1cd5401"\n' +' $ stx register example.id "$OWNER" "$PAYMENT" https://hub.blockstack.org\n' +' 9bb908bfd4ab221f0829167a461229172184fc825a012c4e551533aa283207b1\n' +'\n',group: 'Blockstack ID Management',},register_addr: {type: 'array',items: [{name: 'blockstack_id',type: 'string',realtype: 'blockstack_id',pattern: NAME_PATTERN,},{name: 'id-address',type: 'string',realtype: 'id-address',pattern: ID_ADDRESS_PATTERN,},{name: 'payment_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},{name: 'gaia_url_prefix',type: 'string',realtype: 'url',},{name: 'zonefile',type: 'string',realtype: 'path',},],minItems: 4,maxItems: 5,help:'If you are trying to register a name for an *ID-address*, use this command.\n' +'\n' +"Register a name to someone's ID-address. After successfully running this " +'command and waiting a couple of hours, the name will be registered on-chain and have a ' +"zone file with a URL to where the owner's profile should be. This command does NOT " +'generate, sign, or replicate a profile for the name---the name owner will need to do this ' +'separately, once the name is registered.\n' +'\n' +'Behind the scenes, this command will generate two ' +'transactions, and generate and replicate a zone file with the given Gaia hub read URL ' +'(`GAIA_URL_PREFIX`). Note that the `GAIA_URL_PREFIX` argument must correspond to the *read* endpoint of the Gaia hub ' +'(e.g. if you are using Blockstack PBC\'s default Gaia hub, this is "https://gaia.blockstack.org/hub"). ' +"If you know the *write* endpoint of the name owner's Gaia hub, you can find the right value for " +'`GAIA_URL_PREFIX` by running "curl $GAIA_HUB/hub_info".\n' +'\n' +'No profile will be generated or uploaded by this command. Instead, this command generates ' +'a zone file that will include the URL to a profile based on the `GAIA_URL_PREFIX` argument.\n' +'\n' +'The zone file will be generated automatically from the `GAIA_URL_PREFIX` argument. If you need ' +'to use a custom zone file, you can pass the path to it on disk via the `ZONEFILE` argument.\n' +'\n' +'If this command completes successfully, the name will be ready to use in a couple of ' +'hours---that is, once both transactions have 7+ confirmations. ' +'You can use the `get_confirmations` command to track the confirmations.\n' +'\n' +'WARNING: You should *NOT* use the payment private key (`PAYMENT_KEY`) while the name is being confirmed. ' +'If you do so, you could double-spend one of the pending transactions and lose the name.\n' +'\n' +'Example:\n' +'\n' +' $ export ID_ADDRESS="ID-18e1bqU7B5qUPY3zJgMLxDnexyStTeSnvV"\n' +' $ export PAYMENT="bfeffdf57f29b0cc1fab9ea197bb1413da2561fe4b83e962c7f02fbbe2b1cd5401"\n' +' $ stx register_addr example.id "$ID_ADDRESS" "$PAYMENT" https://gaia.blockstack.org/hub',group: 'Blockstack ID Management',},register_subdomain: {type: 'array',items: [{name: 'blockstack_id',type: 'string',realtype: 'blockstack_id',pattern: SUBDOMAIN_PATTERN,},{name: 'owner_key',type: 'string',realtype: 'private_key',pattern: PRIVATE_KEY_PATTERN,},{name: 'gaia_hub',type: 'string',realtype: 'url',},{name: 'registrar',type: 'string',realtype: 'url',},{name: 'zonefile',type: 'string',realtype: 'path',},],minItems: 4,maxItems: 5,help:'Register a subdomain. This will generate and sign a subdomain zone file record ' +'with the given `GAIA_HUB` URL and send it to the given subdomain registrar (`REGISTRAR`).\n' +'\n' +'This command generates, signs, and uploads a profile to the `GAIA_HUB` url. Note that the `GAIA_HUB` ' +'argument must correspond to the *write* endpoint of your Gaia hub (i.e. you should be able ' +"to run 'curl \"$GAIA_HUB/hub_info\"' successfully). If you are using Blockstack PBC's default " +'Gaia hub, this argument should be "https://hub.blockstack.org".\n' +'\n' +'WARNING: At this time, no validation will occur on the registrar URL. Be sure that the URL ' +'corresponds to the registrar for the on-chain name before running this command!\n' +'\n' +'Example:\n' +'\n' +' $ export OWNER="6e50431b955fe73f079469b24f06480aee44e4519282686433195b3c4b5336ef01"\n' +' $ # NOTE: https://registrar.blockstack.org is the registrar for personal.id!\n' +' $ stx register_subdomain hello.personal.id "$OWNER" https://hub.blockstack.org https://registrar.blockstack.org\n',group: 'Blockstack ID Management',},revoke: {type: 'array',items: [{name: 'blockstack_id',type: 'string',realtype: 'on-chain-blockstack_id',pattern: NAME_PATTERN,},{name: 'owner_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},{name: 'payment_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},],minItems: 3,maxItems: 3,help:'Revoke a name. This renders it unusable until it expires (if ever). This command ' +'prints out the transaction ID if it succeeds. Once the transaction confirms, the name will ' +'be revoked by each node in the peer network. This command only works for on-chain names, not ' +'subdomains.\n' +'\n' +'Example:\n' +'\n' +' $ # Tip: you can get your owner and payment keys from your 12-word backup phrase using the get_owner_keys and get_payment_key commands.\n' +' $ export OWNER="6e50431b955fe73f079469b24f06480aee44e4519282686433195b3c4b5336ef01"\n' +' $ export PAYMENT="bfeffdf57f29b0cc1fab9ea197bb1413da2561fe4b83e962c7f02fbbe2b1cd5401"\n' +' $ stx revoke example.id "$OWNER" "$PAYMENT"\n' +' 233b559c97891affa010567bd582110508d0236b4e3f88d3b1d0731629e030b0\n' +'\n',group: 'Blockstack ID Management',},send_btc: {type: 'array',items: [{name: 'recipient_address',type: 'string',realtype: 'address',pattern: ADDRESS_PATTERN,},{name: 'amount',type: 'string',realtype: 'satoshis',pattern: INT_PATTERN,},{name: 'payment_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},],minItems: 3,maxItems: 3,help:'Send some Bitcoin (in satoshis) from a payment key to an address. Up to the given ' +'amount will be spent, but likely less---the actual amount sent will be the amount given, ' +'minus the transaction fee. For example, if you want to send 10000 satoshis but the ' +'transaction fee is 2000 satoshis, then the resulting transaction will send 8000 satoshis ' +'to the given address. This is to ensure that this command does not *over*-spend your ' +'Bitcoin. If you want to check the amount before spending, pass the `-x` flag to see the ' +'raw transaction.\n' +'\n' +'If the command succeeds, it prints out the transaction ID. You can track its confirmations ' +'with the `get_confirmations` command.\n' +'\n' +'Example:\n' +'\n' +' $ export PAYMENT="bfeffdf57f29b0cc1fab9ea197bb1413da2561fe4b83e962c7f02fbbe2b1cd5401"\n' +' $ stx send_btc 18qTSE5PPQmypwKKej7QX5Db2XAttgYeA1 123456 "$PAYMENT"\n' +' c7e239fd24da30e36e011e6bc7db153574a5b40a3a8dc3b727adb54ad038acc5\n' +'\n',group: 'Account Management',},send_tokens: {type: 'array',items: [{name: 'address',type: 'string',realtype: 'address',pattern: STACKS_ADDRESS_PATTERN,},{name: 'amount',type: 'string',realtype: 'integer',pattern: '^[0-9]+$',},{name: 'fee',type: 'string',realtype: 'integer',pattern: '^[0-9]+$',},{name: 'nonce',type: 'string',realtype: 'integer',pattern: '^[0-9]+$',},{name: 'payment_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},{name: 'memo',type: 'string',realtype: 'string',pattern: '^.{0,34}$',},],minItems: 5,maxItems: 6,help:'Send a particular type of tokens to the given `ADDRESS`. Right now, only supported `TOKEN-TYPE` is `STACKS`. Optionally ' +'include a memo string (`MEMO`) up to 34 characters long.\n' +'\n' +'If the command succeeds, it prints out a transaction ID. You can track the confirmations on the transaction ' +'via the `get_confirmations` command. Once the transaction has 7 confirmations, the Blockstack peer network ' +'will have processed it, and your payment key balance and recipient balance will be updated.\n' +'\n' +'Example:\n' +'\n' +' $ # check balances of sender and recipient before sending.\n' +' $ # address of the key below is SP2SC16ASH76GX549PT7J5WQZA4GHMFBKYMBQFF9V\n' +' $ export PAYMENT="bfeffdf57f29b0cc1fab9ea197bb1413da2561fe4b83e962c7f02fbbe2b1cd5401"\n' +' $ stx balance SP2SC16ASH76GX549PT7J5WQZA4GHMFBKYMBQFF9V\n' +' {\n' +' "STACKS": "10000000"\n' +' }\n' +' $ stx balance SP1P10PS2T517S4SQGZT5WNX8R00G1ECTRKYCPMHY\n' +' {\n' +' "STACKS": "0"\n' +' }\n' +'\n' +' $ # send tokens\n' +' $ stx send_tokens SP1P10PS2T517S4SQGZT5WNX8R00G1ECTRKYCPMHY 12345 1 0 "$PAYMENT"\n' +' {\n' +" txid: '0x2e33ad647a9cedacb718ce247967dc705bc0c878db899fdba5eae2437c6fa1e1'," +" transaction: 'https://explorer.stacks.co/txid/0x2e33ad647a9cedacb718ce247967dc705bc0c878db899fdba5eae2437c6fa1e1'" +' }\n' +' a9d387a925fb0ba7a725fb1e11f2c3f1647473699dd5a147c312e6453d233456\n' +'\n' +' $ # wait for transaction to be confirmed\n' +'\n' +' $ stx balance SP2SC16ASH76GX549PT7J5WQZA4GHMFBKYMBQFF9V\n' +' {\n' +' "STACKS": "9987655"\n' +' }\n' +' $ stx balance SP1P10PS2T517S4SQGZT5WNX8R00G1ECTRKYCPMHY\n' +' {\n' +' "STACKS": "12345"\n' +' }\n' +'\n',group: 'Account Management',},stack: {type: 'array',items: [{name: 'amount',type: 'string',realtype: 'integer',pattern: '^[0-9]+$',},{name: 'cycles',type: 'string',realtype: 'integer',pattern: '^[0-9]+$',},{name: 'pox_address',type: 'string',realtype: 'integer',pattern: `${ADDRESS_PATTERN}`,},{name: 'private_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},{name: 'fee',type: 'string',realtype: 'integer',pattern: '^[0-9]+$',},{name: 'nonce',type: 'string',realtype: 'integer',pattern: '^[0-9]+$',},],minItems: 4,maxItems: 6,help:'Stack the specified number of Stacks tokens for given number of cycles.\n' +'\n' +'Example:\n' +'\n' +' $ stx stack 10000000 20 16pm276FpJYpm7Dv3GEaRqTVvGPTdceoY4 136ff26efa5db6f06b28f9c8c7a0216a1a52598045162abfe435d13036154a1b01\n' +' {\n' +" txid: '0x2e33ad647a9cedacb718ce247967dc705bc0c878db899fdba5eae2437c6fa1e1'," +" transaction: 'https://explorer.stacks.co/txid/0x2e33ad647a9cedacb718ce247967dc705bc0c878db899fdba5eae2437c6fa1e1'" +' }\n',group: 'Account Management',},stacking_status: {type: 'array',items: [{name: 'pox_address',type: 'string',realtype: 'integer',pattern: `${STACKS_ADDRESS_PATTERN}`,},],minItems: 1,maxItems: 1,help:'Get stacking status for specified address.\n' +'\n' +'Example:\n' +'\n' +' $ stx stacking_status SPZY1V53Z4TVRHHW9Z7SFG8CZNRAG7BD8WJ6SXD0\n',group: 'Account Management',},transfer: {type: 'array',items: [{name: 'blockstack_id',type: 'string',realtype: 'on-chain-blockstack_id',pattern: NAME_PATTERN,},{name: 'new_id_address',type: 'string',realtype: 'id-address',pattern: ID_ADDRESS_PATTERN,},{name: 'keep_zonefile',type: 'string',realtype: 'true-or-false',pattern: '^true$|^false$',},{name: 'owner_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},{name: 'payment_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},],minItems: 5,maxItems: 5,help:'Transfer a Blockstack ID to a new address (`NEW_ID_ADDRESS`). Optionally preserve ' +'its zone file (`KEEP_ZONEFILE`). If the command succeeds, it will print a transaction ID. ' +'Once the transaction reaches 7 confirmations, the Blockstack peer network will transfer the ' +"Blockstack ID to the new ID-address. You can track the transaction's confirmations with " +'the `get_confirmations` command.\n' +'\n' +'NOTE: This command only works for on-chain Blockstack IDs. It does not yet work for subdomains.\n' +'\n' +'An ID-address can only own up to 25 Blockstack IDs. In practice, you should generate a new ' +'owner key and ID-address for each name you receive (via the `get_owner_keys` command).\n' +'\n' +'Example:\n' +'\n' +' $ # Tip: you can get your owner key from your backup phrase with "get_owner_keys".\n' +' $ # Tip: you can get your payment key from your backup phrase with "get_payment_key".\n' +' $ export OWNER="136ff26efa5db6f06b28f9c8c7a0216a1a52598045162abfe435d13036154a1b01"\n' +' $ export PAYMENT="bfeffdf57f29b0cc1fab9ea197bb1413da2561fe4b83e962c7f02fbbe2b1cd5401"\n' +' $ stx transfer example.id ID-1HJA1AJvWef21XbQVL2AcTv71b6JHGPfDX true "$OWNER" "$PAYMENT"\n' +' e09dc158e586d0c09dbcdcba917ec394e6c6ac2b9c91c4b55f32f5973e4f08fc\n' +'\n',group: 'Blockstack ID Management',},tx_preorder: {type: 'array',items: [{name: 'blockstack_id',type: 'string',realtype: 'on-chain-blockstack_id',pattern: NAME_PATTERN,},{name: 'id_address',type: 'string',realtype: 'id-address',pattern: ID_ADDRESS_PATTERN,},{name: 'payment_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},],minItems: 3,maxItems: 3,help:'Generate and send `NAME_PREORDER` transaction, for a Blockstack ID to be owned ' +'by a given `ID_ADDRESS`. The name cost will be paid for by the gven `PAYMENT_KEY`. The ' +'ID-address should be a never-before-seen address, since it will be used as a salt when ' +'generating the name preorder hash.\n' +'\n' +'This is a low-level command that only experienced Blockstack developers should use. ' +'If you just want to register a name, use the "register" command.\n',group: 'Blockstack ID Management',},tx_register: {type: 'array',items: [{name: 'blockstack_id',type: 'string',realtype: 'on-chain-blockstack_id',pattern: NAME_PATTERN,},{name: 'id_address',type: 'string',realtype: 'id-address',pattern: ID_ADDRESS_PATTERN,},{name: 'payment_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},{name: 'zonefile',type: 'string',realtype: 'path',},{name: 'zonefile_hash',type: 'string',realtype: 'zoenfile_hash',pattern: ZONEFILE_HASH_PATTERN,},],minItems: 3,maxItems: 5,help:'Generate and send a NAME_REGISTRATION transaction, assigning the given `BLOCKSTACK_ID` ' +'to the given `ID_ADDRESS`. Optionally pair the Blockstack ID with a zone file (`ZONEFILE`) or ' +'the hash of the zone file (`ZONEFILE_HASH`). You will need to push the zone file to the peer ' +'network after the transaction confirms (i.e. with `zonefile_push`).\n' +'\n' +'This is a low-level command that only experienced Blockstack developers should use. If you ' +'just want to register a name, you should use the `register` command.',group: 'Blockstack ID Management',},update: {type: 'array',items: [{name: 'blockstack_id',type: 'string',realtype: 'on-chain-blockstack_id',pattern: NAME_PATTERN,},{name: 'zonefile',type: 'string',realtype: 'path',},{name: 'owner_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},{name: 'payment_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN_ANY}`,},{name: 'zonefile_hash',type: 'string',realtype: 'zonefile_hash',pattern: ZONEFILE_HASH_PATTERN,},],minItems: 4,maxItems: 5,help:'Update the zonefile for an on-chain Blockstack ID. You can generate a well-formed ' +'zone file using the `make_zonefile` command, or you can supply your own. Zone files can be ' +'up to 40Kb. Alternatively, if you only want to announce the hash of a zone file (or any ' +'arbitrary 20-byte hex string), you can do so by passing a value for `ZONEFILE_HASH`. If `ZONEFILE_HASH` ' +'is given, then the value for `ZONEFILE` will be ignored.\n' +'\n' +'If this command succeeds, it prints out a transaction ID. Once the transaction has 7 confirmations, ' +"the Blockstack peer network will set the name's zone file hash to the `RIPEMD160`(SHA256) hash of " +'the given zone file (or it will simply set it to the hash given in `ZONEFILE_HASH`).\n' +'\n' +'Once the transaction confirms, you will need to replicate the zone file to the Blockstack peer network. ' +'This can be done with the `zonefile_push` command. Until you do so, no Blockstack clients will be able ' +'to obtain the zone file announced by this command.\n' +'\n' +'Example:\n' +'\n' +' $ # Tip: you can get your owner and payment keys from your 12-word backup phrase using the get_owner_keys and get_payment_key commands.\n' +' $ export OWNER="6e50431b955fe73f079469b24f06480aee44e4519282686433195b3c4b5336ef01"\n' +' $ export PAYMENT="bfeffdf57f29b0cc1fab9ea197bb1413da2561fe4b83e962c7f02fbbe2b1cd5401"\n' +' $ # make a new zone file\n' +' $ stx make_zonefile example.id ID-1ArdkA2oLaKnbNbLccBaFhEV4pYju8hJ82 https://my.gaia.hub/hub > /tmp/zonefile.txt\n' +' \n' +' $ # update the name to reference this new zone file\n' +' $ stx update example.id /tmp/zonefile.txt "$OWNER" "$PAYMENT"\n' +' 8e94a5b6647276727a343713d3213d587836e1322b1e38bc158406f5f8ebe3fd\n' +' \n' +' $ # check confirmations\n' +' $ stx get_confirmations e41ce043ab64fd5a5fd382fba21acba8c1f46cbb1d7c08771ada858ce7d29eea\n' +' {\n' +' "blockHeight": 567890,\n' +' "confirmations": 7,\n' +' }\n' +' \n' +' $ # send out the new zone file to a Blockstack peer\n' +' $ stx -H https://core.blockstack.org zonefile_push /tmp/zonefile.txt\n' +' [\n' +' "https://core.blockstack.org"\n' +' ]\n' +'\n',group: 'Blockstack ID Management',},whois: {type: 'array',items: [{name: 'blockstack_id',type: 'string',realtype: 'blockstack_id',pattern: NAME_PATTERN + '|' + SUBDOMAIN_PATTERN,},],minItems: 1,maxItems: 1,help:'Look up the zone file and owner of a Blockstack ID. Works with both on-chain and off-chain names.\n' +'\n' +'Example:\n' +'\n' +' $ stx whois example.id\n' +' {\n' +' "address": "1ArdkA2oLaKnbNbLccBaFhEV4pYju8hJ82",\n' +' "block_renewed_at": 567890,\n' +' "blockchain": "bitcoin",\n' +' "expire_block": 687010,\n' +' "grace_period": false,\n' +' "last_transaction_height": "567891",\n' +' "last_txid": "a564aa482ee43eb2bdfb016e01ea3b950bab0cfa39eace627d632e73c7c93e48",\n' +' "owner_script": "76a9146c1c2fc3cf74d900c51e9b5628205130d7b98ae488ac",\n' +' "renewal_deadline": 692010,\n' +' "resolver": null,\n' +' "status": "registered",\n' +' "zonefile": "$ORIGIN example.id\\n$TTL 3600\\n_http._tcp URI 10 1 \\"https://gaia.blockstack.org/hub/1ArdkA2oLaKnbNbLccBaFhEV4pYju8hJ82/profile.json\\"\\n",\n' +' "zonefile_hash": "ae4ee8e7f30aa890468164e667e2c203266f726e"\n' +' }\n' +'\n',group: 'Querying Blockstack IDs',},zonefile_push: {type: 'array',items: [{name: 'zonefile',type: 'string',realtype: 'path',},],minItems: 1,maxItems: 1,help:'Push a zone file on disk to the Blockstack peer network. The zone file must ' +'correspond to a zone file hash that has already been announced. That is, you use this command ' +'in conjunction with the `register`, `update`, `renew`, or `name_import` commands.\n' +'\n' +'Example:\n' +'\n' +' $ stx -H https://core.blockstack.org zonefile_push /path/to/zonefile.txt\n' +' [\n' +' "https://core.blockstack.org"\n' +' ]\n' +'\n',group: 'Peer Services',},get_did_configuration: {type: 'array',items: [{name: 'blockstack_id',type: 'string',realtype: 'blockstack_id',pattern: NAME_PATTERN + '|' + SUBDOMAIN_PATTERN,},{name: 'domain',type: 'string',realtype: 'domain',pattern: NAME_PATTERN + '|' + SUBDOMAIN_PATTERN,},{name: 'owner_key',type: 'string',realtype: 'private_key',pattern: `${PRIVATE_KEY_PATTERN}`,},],minItems: 3,maxItems: 3,help:'Creates a DID configuration for the given blockstack id and domain to create a link between both.' +'The specification is define by the Decentralized Identity Foundation at https://identity.foundation/specs/did-configuration/\n' +'The DID configuration should be placed in the json file ".well_known/did_configuration"' +'\n' +'Example:\n' +'\n' +' $ # Tip: you can get your owner keys from your 12-word backup phrase using the get_owner_keys command.\n' +' $ export PRIVATE_OWNER_KEY="6e50431b955fe73f079469b24f06480aee44e4519282686433195b3c4b5336ef01"\n' +' $ stx get_did_configuration public_profile_for_testing.id.blockstack helloblockstack.com PRIVATE_OWNER_KEY\n' +' {\n' +' "entries": [\n' +' {\n' +' "did": "did:stack:v0:SewTRvPZUEQGdr45QvEnVMGHZBhx3FT1Jj-0",\n' +' "jwt": "eyJ0eXAiOiJKV1QiL...."\n' +' }\n' +' ]\n' +' }\n' +'\n' +'The decoded content of the jwt above is \n' +' {\n' +' "header": {\n' +' "typ": "JWT", "alg": "ES256K"\n' +' },\n' +' "payload": {\n' +' "iss": "did:stack:v0:SewTRvPZUEQGdr45QvEnVMGHZBhx3FT1Jj-0",\n' +' "domain": "helloblockstack.com",\n' +' "exp": "2020-12-07T13:05:28.375Z"\n' +' },\n' +' "signature": "NDY7ISzgAHKcZDvbxzTxQdVnf6xWMZ46w5vHcDpNx_1Fsyip0M6E6GMq_2YZ-gUcwmwlo8Ag9jgnfOkaBIFpoQ"\n' +' }\n' +'\n',group: 'DID',},} as CLI_PROP

strict

strict: boolean = true

type

type: string = "object"

Const COMMANDS

COMMANDS: object

authenticator

authenticator: authDaemon = authDaemon

balance

balance: balance = balance

call_contract_func

call_contract_func: contractFunctionCall = contractFunctionCall

call_read_only_contract_func

call_read_only_contract_func: readOnlyContractFunctionCall = readOnlyContractFunctionCall

can_stack

can_stack: canStack = canStack

convert_address

convert_address: addressConvert = addressConvert

decrypt_keychain

decrypt_keychain: decryptMnemonic = decryptMnemonic

deploy_contract

deploy_contract: contractDeploy = contractDeploy

docs

docs: printDocs = printDocs

encrypt_keychain

encrypt_keychain: encryptMnemonic = encryptMnemonic

faucet

faucet: faucetCall = faucetCall

gaia_deletefile

gaia_deletefile: gaiaDeleteFile = gaiaDeleteFile

gaia_dump_bucket

gaia_dump_bucket: gaiaDumpBucket = gaiaDumpBucket

gaia_getfile

gaia_getfile: gaiaGetFile = gaiaGetFile

gaia_listfiles

gaia_listfiles: gaiaListFiles = gaiaListFiles

gaia_putfile

gaia_putfile: gaiaPutFile = gaiaPutFile

gaia_restore_bucket

gaia_restore_bucket: gaiaRestoreBucket = gaiaRestoreBucket

gaia_sethub

gaia_sethub: gaiaSetHub = gaiaSetHub

get_account_history

get_account_history: getAccountHistory = getAccountHistory

get_address

get_address: getKeyAddress = getKeyAddress

get_app_keys

get_app_keys: getAppKeys = getAppKeys

get_owner_keys

get_owner_keys: getOwnerKeys = getOwnerKeys

get_payment_key

get_payment_key: getPaymentKey = getPaymentKey

get_stacks_wallet_key

get_stacks_wallet_key: getStacksWalletKey = getStacksWalletKey

make_keychain

make_keychain: makeKeychain = makeKeychain

profile_sign

profile_sign: profileSign = profileSign

profile_store

profile_store: profileStore = profileStore

profile_verify

profile_verify: profileVerify = profileVerify

send_tokens

send_tokens: sendTokens = sendTokens

stack

stack: stack = stack

stacking_status

stacking_status: stackingStatus = stackingStatus

Const CONFIG_DEFAULTS

CONFIG_DEFAULTS: object

blockstackAPIUrl

blockstackAPIUrl: string = "http://stacks-node-api.stacks.co"

blockstackNodeUrl

blockstackNodeUrl: string = "http://stacks-node-api.stacks.co"

broadcastServiceUrl

broadcastServiceUrl: string = "http://stacks-node-api.stacks.co/v2/transactions"

logConfig

logConfig: CLI_LOG_CONFIG_TYPE = LOG_CONFIG_DEFAULTS

utxoServiceUrl

utxoServiceUrl: string = "https://blockchain.info"

Const CONFIG_REGTEST_DEFAULTS

CONFIG_REGTEST_DEFAULTS: object

bitcoindPassword

bitcoindPassword: string = "blockstacksystem"

bitcoindUsername

bitcoindUsername: string = "blockstack"

blockstackAPIUrl

blockstackAPIUrl: string = "http://localhost:16268"

blockstackNodeUrl

blockstackNodeUrl: string = "http://localhost:16264"

broadcastServiceUrl

broadcastServiceUrl: string = "http://localhost:16269"

logConfig

logConfig: CLI_LOG_CONFIG_TYPE = LOG_CONFIG_DEFAULTS

utxoServiceUrl

utxoServiceUrl: string = "http://localhost:18332"

Const CONFIG_TESTNET_DEFAULTS

CONFIG_TESTNET_DEFAULTS: object

blockstackAPIUrl

blockstackAPIUrl: string = `http://${PUBLIC_TESTNET_HOST}:20443`

blockstackNodeUrl

blockstackNodeUrl: string = `http://${PUBLIC_TESTNET_HOST}:20443`

broadcastServiceUrl

broadcastServiceUrl: string = `http://${PUBLIC_TESTNET_HOST}:20443/v2/transactions`

logConfig

logConfig: CLI_LOG_CONFIG_TYPE & { level: string } = Object.assign({}, LOG_CONFIG_DEFAULTS, { level: 'debug' })

utxoServiceUrl

utxoServiceUrl: string = `http://${PUBLIC_TESTNET_HOST}:18332`

Const DEFAULT_PROFILE

DEFAULT_PROFILE: object

Default user profile object

@context

@context: "http://schema.org" = "http://schema.org"

@type

@type: "Person" = "Person"

Const LOG_CONFIG_DEFAULTS

LOG_CONFIG_DEFAULTS: object

colorize

colorize: true = true

handleExceptions

handleExceptions: true = true

json

json: true = true

level

level: string = "info"

stringify

stringify: true = true

timestamp

timestamp: true = true

Const derivationPaths

derivationPaths: object

[ChainID.Mainnet]

[ChainID.Mainnet]: string = networkDerivationPath

[ChainID.Testnet]

[ChainID.Testnet]: string = networkDerivationPath

Const personSchemaDefinition

personSchemaDefinition: object

strict

strict: boolean = false

type

type: string = "object"

properties

properties: object

@context

@context: object

optional

optional: boolean = true

type

type: string = "string"

@id

@id: object

optional

optional: boolean = true

type

type: string = "string"

@type

@type: object

type

type: string = "string"

account

account: object

optional

optional: boolean = true

type

type: string = "array"

items

items: object

type

type: string = "object"

properties

properties: object

@type

@type: object

type

type: string = "string"

identifier

identifier: object

optional

optional: boolean = true

type

type: string = "string"

proofMessage

proofMessage: object

optional

optional: boolean = true

type

type: string = "string"

proofSignature

proofSignature: object

optional

optional: boolean = true

type

type: string = "string"

proofType

proofType: object

optional

optional: boolean = true

type

type: string = "string"

proofUrl

proofUrl: object

optional

optional: boolean = true

type

type: string = "string"

service

service: object

optional

optional: boolean = true

type

type: string = "string"

address

address: object

optional

optional: boolean = true

type

type: string = "object"

properties

properties: object

@type

@type: object

type

type: string = "string"

addressCountry

addressCountry: object

optional

optional: boolean = true

type

type: string = "string"

addressLocality

addressLocality: object

optional

optional: boolean = true

type

type: string = "string"

postalCode

postalCode: object

optional

optional: boolean = true

type

type: string = "string"

streetAddress

streetAddress: object

optional

optional: boolean = true

type

type: string = "string"

birthDate

birthDate: object

optional

optional: boolean = true

type

type: string = "string"

description

description: object

optional

optional: boolean = true

type

type: string = "string"

familyName

familyName: object

optional

optional: boolean = true

type

type: string = "string"

givenName

givenName: object

optional

optional: boolean = true

type

type: string = "string"

image

image: object

optional

optional: boolean = true

type

type: string = "array"

items

items: object

type

type: string = "object"

properties

properties: object

@type

@type: object

type

type: string = "string"

contentUrl

contentUrl: object

optional

optional: boolean = true

type

type: string = "string"

name

name: object

optional

optional: boolean = true

type

type: string = "string"

knows

knows: object

optional

optional: boolean = true

type

type: string = "array"

items

items: object

type

type: string = "object"

properties

properties: object

@id

@id: object

optional

optional: boolean = true

type

type: string = "string"

@type

@type: object

type

type: string = "string"

name

name: object

optional

optional: boolean = true

type

type: string = "string"

taxID

taxID: object

optional

optional: boolean = true

type

type: string = "string"

website

website: object

optional

optional: boolean = true

type

type: string = "array"

items

items: object

type

type: string = "object"

properties

properties: object

@type

@type: object

type

type: string = "string"

url

url: object

optional

optional: boolean = true

type

type: string = "string"

worksFor

worksFor: object

optional

optional: boolean = true

type

type: string = "array"

items

items: object

type

type: string = "object"

properties

properties: object

@id

@id: object

optional

optional: boolean = true

type

type: string = "string"

@type

@type: object

type

type: string = "string"

Const registrars

registrars: object

[Subdomains.BLOCKSTACK]

[Subdomains.BLOCKSTACK]: object

apiUrl

apiUrl: string = "https://registrar.blockstack.org/v1/names"

registerUrl

registerUrl: string = "https://registrar.blockstack.org/register"

[Subdomains.TEST]

[Subdomains.TEST]: object

apiUrl

apiUrl: string = "https://test-registrar.blockstack.org/v1/names"

registerUrl

registerUrl: string = "https://test-registrar.blockstack.org/register"

Const schemaDefinition

schemaDefinition: object

type

type: string = "object"

properties

properties: object

@context

@context: object

optional

optional: boolean = true

type

type: string = "string"

@type

@type: object

type

type: string = "string"

Generated using TypeDoc