## Index

### Enumerations

- AuthScope

### Classes

- AppConfig
- BNClass
- BlockstackNetwork
- Facebook
- Github
- HackerNews
- Instagram
- LinkedIn
- NodeCryptoAesCipher
- NodeCryptoHmacSha256
- NodeCryptoPbkdf2
- NodeCryptoRipemd160Digest
- NodeCryptoSha2Hash
- PasswordError
- Profile
- Ripemd160PolyfillDigest
- SessionDataStore
- Twitter
- UserSession
- WebCryptoAesCipher
- WebCryptoHmacSha256
- WebCryptoPartialPbkdf2
- WebCryptoPbkdf2
- WebCryptoSha2Hash

### Interfaces

- AccountProofInfo
- AccountTokens
- AesCipher
- GaiaHubConfig
- GetFileOptions
- GetFileUrlOptions
- GetGlobalObjectOptions
- Hmac
- NodeCryptoLib
- Pbkdf2
- PriceInfo
- PutFileOptions
- Ripemd160Digest
- SessionOptions
- Sha2Hash
- TransactionInfo
- UTXO
- UserData
- WebCryptoLib

### Type aliases

- AmountType
- AmountTypeV1
- AmountTypeV2
- AuthMetadata
- BN
- CheerioModuleType
- CipherAlgorithm
- Endianness
- GetRandomBytes
- NodeCryptoCreateCipher
- NodeCryptoCreateDecipher
- NodeCryptoCreateHash
- NodeCryptoCreateHmac
- NodePbkdf2Fn
- Pbkdf2Digests
- TriplesecDecryptSignature
- txPoint

### Variables

- APPS_NODE_INDEX
- AUTH_CONTINUATION_PARAM
- BITCOIN_ACCOUNT_INDEX
- BITCOIN_BIP_44_PURPOSE
- BITCOIN_COIN_TYPE
- BLOCKSTACK_ON_BITCOIN
- BNConstructor
- BadTypeUsage
- CHANGE_ADDRESS
- DEFAULT_BLOCKSTACK_HOST
- ECHO_REPLY_PARAM
- EXTERNAL_ADDRESS
- GLOBAL_DETECTION_CACHE_KEY
- IDENTITY_KEYCHAIN
- MAINNET_DEFAULT
- NO_CRYPTO_LIB
- SATOSHIS_PER_BTC
- SESSION_VERSION
- SIGNATURE_FILE_SUFFIX
- TX_BROADCAST_SERVICE_REGISTRATION_ENDPOINT
- TX_BROADCAST_SERVICE_TX_ENDPOINT
- TX_BROADCAST_SERVICE_ZONE_FILE_ENDPOINT
- TX_EMPTY_SIZE
- TX_INPUT_BASE
- TX_INPUT_PUBKEYHASH
- TX_OUTPUT_BASE
- TX_OUTPUT_PUBKEYHASH
- VERSION
- dummyConsensusHash
- dummyZonefileHash
- ecurve
- intToLevel
- levelToInt
- levels

### Functions

- createCipher
- createHashRipemd160
- createHmacSha256
- createPbkdf2
- createSha2Hash
- decryptContent
- deleteFile
- deleteFromGaiaHub
- encryptContent
- estimateAnnounce
- estimateNameImport
- estimateNamespacePreorder
- estimateNamespaceReady
- estimateNamespaceReveal
- estimatePreorder
- estimateRegister
- estimateRenewal
- estimateRevoke
- estimateTokenTransfer
- estimateTransfer
- estimateUpdate
- extractProfile
- getAPIUsageErrorMessage
- getAppBucketUrl
- getAuthResponseToken
- getBlockstackErrorFromResponse
- getCryptoLib
- getFile
- getFileContents
- getFileSignedUnencrypted
- getFileUrl
- getGaiaAddress
- getGaiaErrorResponse
- getName
- getNameInfo
- getTransaction
- getUserAppFileUrl
- handlePendingSignIn
- handleSignedEncryptedContents
- hashRipemd160
- hashSha256Sync
- hashSha512Sync
- inputBytes
- isNodeCryptoAvailable
- isSignInPending
- isSubtleCryptoAvailable
- isUserSignedIn
- launchCustomProtocol
- listFiles
- loadUserData
- lookupProfile
- makeAnnounce
- makeAuthRequest
- makeBitcoinSpend
- makeNameImport
- makeNamespaceReady
- makeNamespaceReveal
- makePreorder
- makeRegister
- makeRenewal
- makeRevoke
- makeTokenTransfer
- makeTransfer
- makeUpdate
- outputBytes
- putFile
- redirectToSignIn
- redirectToSignInWithAuthRequest
- signInputs
- signProfileToken
- signUserOut
- transactionBytes
- validateProofs
- verifyProfileToken
- wrapProfileToken

### Object literals

- DEFAULT_PROFILE
- schemaDefinition
- transactions

## Type aliases

### AmountType

AmountType: AmountTypeV1 | AmountTypeV2

- Defined in src/operations/skeletons.ts:13

### AmountTypeV1

AmountTypeV1: number

- Defined in src/operations/skeletons.ts:11

### AmountTypeV2

AmountTypeV2: object

- Defined in src/operations/skeletons.ts:12

#### Type declaration

- ##### amount: BN

- ##### units: string

### AuthMetadata

AuthMetadata: object

- Defined in src/auth/authMessages.ts:16

#### Type declaration

- ##### Optional email?: string

- ##### Optional profileUrl?: string

### BN

BN: BNClass

- Defined in src/bn.ts:68

### CheerioModuleType

CheerioModuleType: CheerioAPI

- Defined in src/profiles/services/service.ts:5

### CipherAlgorithm

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

- Defined in src/encryption/aesCipher.ts:6

### Endianness

Endianness: "le" | "be"

- Defined in src/bn.ts:21

### GetRandomBytes

GetRandomBytes: function

- Defined in src/encryption/cryptoRandom.ts:6

Optional function to generate cryptographically secure random bytes

#### Type declaration

- - (count: number): Buffer

  - #### Parameters

    - ##### count: number

    #### Returns Buffer

### NodeCryptoCreateCipher

NodeCryptoCreateCipher: createCipheriv

- Defined in src/encryption/aesCipher.ts:3

### NodeCryptoCreateDecipher

NodeCryptoCreateDecipher: createDecipheriv

- Defined in src/encryption/aesCipher.ts:4

### NodeCryptoCreateHash

NodeCryptoCreateHash: createHash

- Defined in src/encryption/sha2Hash.ts:4
- Defined in src/encryption/hashRipemd160.ts:4

### NodeCryptoCreateHmac

NodeCryptoCreateHmac: createHmac

- Defined in src/encryption/hmacSha256.ts:7

### NodePbkdf2Fn

NodePbkdf2Fn: pbkdf2

- Defined in src/encryption/pbkdf2.ts:14

### Pbkdf2Digests

Pbkdf2Digests: "sha512" | "sha256"

- Defined in src/encryption/pbkdf2.ts:3

### TriplesecDecryptSignature

TriplesecDecryptSignature: function

- Defined in src/encryption/cryptoUtils.ts:34

#### Type declaration

- - (arg: object, cb: function): void

  - #### Parameters

    - ##### arg: object

      - ##### data: Buffer

      - ##### key: Buffer

    - ##### cb: function

      - - (err: Error | null, buff: Buffer | null): void

        - #### Parameters

          - ##### err: Error | null

          - ##### buff: Buffer | null

          #### Returns void

### txPoint

txPoint: object

- Defined in src/operations/utils.ts:45

#### Type declaration

- ##### script: object

  - ##### length: number

## Variables

### Const APPS_NODE_INDEX

APPS_NODE_INDEX: 0 = 0

- Defined in src/wallet.ts:9

### Const AUTH_CONTINUATION_PARAM

AUTH_CONTINUATION_PARAM: "authContinuation" = "authContinuation"

- Defined in src/auth/protocolEchoDetection.ts:10

### Const BITCOIN_ACCOUNT_INDEX

BITCOIN_ACCOUNT_INDEX: 0 = 0

- Defined in src/wallet.ts:15

### Const BITCOIN_BIP_44_PURPOSE

BITCOIN_BIP_44_PURPOSE: 44 = 44

- Defined in src/wallet.ts:13

### Const BITCOIN_COIN_TYPE

BITCOIN_COIN_TYPE: 0 = 0

- Defined in src/wallet.ts:14

### Const BLOCKSTACK_ON_BITCOIN

BLOCKSTACK_ON_BITCOIN: 0 = 0

- Defined in src/wallet.ts:11

### Const BNConstructor

BNConstructor: BNClass = BN_Borked as any

- Defined in src/bn.ts:67

### Const BadTypeUsage

BadTypeUsage: Error = new Error('Class only used as an interface')

- Defined in src/bn.ts:23

### Const CHANGE_ADDRESS

CHANGE_ADDRESS: "CHANGE_ADDRESS" = "CHANGE_ADDRESS"

- Defined in src/wallet.ts:18

### Const DEFAULT_BLOCKSTACK_HOST

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

- Defined in src/auth/authConstants.ts:13

This constant is used in the redirectToSignInWithAuthRequest

### Const ECHO_REPLY_PARAM

ECHO_REPLY_PARAM: "echoReply" = "echoReply"

- Defined in src/auth/protocolEchoDetection.ts:9

### Const EXTERNAL_ADDRESS

EXTERNAL_ADDRESS: "EXTERNAL_ADDRESS" = "EXTERNAL_ADDRESS"

- Defined in src/wallet.ts:17

### Const GLOBAL_DETECTION_CACHE_KEY

GLOBAL_DETECTION_CACHE_KEY: "_blockstackDidCheckEchoReply" = "_blockstackDidCheckEchoReply"

- Defined in src/auth/protocolEchoDetection.ts:8

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

- Defined in src/wallet.ts:10

### Const MAINNET_DEFAULT

MAINNET_DEFAULT: BlockstackNetwork = new BlockstackNetwork('https://core.blockstack.org','https://broadcast.blockstack.org',new BlockchainInfoApi())

- Defined in src/network.ts:1294

Instance of BlockstackNetwork set to the default endpoints.

### 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."

- Defined in src/encryption/cryptoUtils.ts:32

### Const SATOSHIS_PER_BTC

SATOSHIS_PER_BTC: 100000000 = 100000000

- Defined in src/network.ts:32

### Const SESSION_VERSION

SESSION_VERSION: "1.0.0" = "1.0.0"

- Defined in src/auth/sessionData.ts:6

### Const SIGNATURE_FILE_SUFFIX

SIGNATURE_FILE_SUFFIX: ".sig" = ".sig"

- Defined in src/storage/index.ts:52

### Const TX_BROADCAST_SERVICE_REGISTRATION_ENDPOINT

TX_BROADCAST_SERVICE_REGISTRATION_ENDPOINT: "registration" = "registration"

- Defined in src/network.ts:34

### Const TX_BROADCAST_SERVICE_TX_ENDPOINT

TX_BROADCAST_SERVICE_TX_ENDPOINT: "transaction" = "transaction"

- Defined in src/network.ts:35

### Const TX_BROADCAST_SERVICE_ZONE_FILE_ENDPOINT

TX_BROADCAST_SERVICE_ZONE_FILE_ENDPOINT: "zone-file" = "zone-file"

- Defined in src/network.ts:33

### Const TX_EMPTY_SIZE

TX_EMPTY_SIZE: number = 4 + 1 + 1 + 4

- Defined in src/operations/utils.ts:39

### Const TX_INPUT_BASE

TX_INPUT_BASE: number = 32 + 4 + 1 + 4

- Defined in src/operations/utils.ts:40

### Const TX_INPUT_PUBKEYHASH

TX_INPUT_PUBKEYHASH: 107 = 107

- Defined in src/operations/utils.ts:41

### Const TX_OUTPUT_BASE

TX_OUTPUT_BASE: number = 8 + 1

- Defined in src/operations/utils.ts:42

### Const TX_OUTPUT_PUBKEYHASH

TX_OUTPUT_PUBKEYHASH: 25 = 25

- Defined in src/operations/utils.ts:43

### Const VERSION

VERSION: "1.3.1" = "1.3.1"

- Defined in src/auth/authMessages.ts:14

### Const dummyConsensusHash

dummyConsensusHash: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

- Defined in src/operations/txbuild.ts:24

### Const dummyZonefileHash

dummyZonefileHash: "ffffffffffffffffffffffffffffffffffffffff" = "ffffffffffffffffffffffffffffffffffffffff"

- Defined in src/operations/txbuild.ts:25

### Const ecurve

ecurve: ec = new EllipticCurve('secp256k1')

- Defined in src/encryption/ec.ts:10

### Const intToLevel

intToLevel: object

- Defined in src/logger.ts:12

#### Type declaration

- ##### [int: number]: string

### Const levelToInt

levelToInt: object

- Defined in src/logger.ts:11

#### Type declaration

- ##### [level: string]: number

### Const levels

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

- Defined in src/logger.ts:3

## Functions

### createCipher

- createCipher(): Promise<AesCipher>

- - Defined in src/encryption/aesCipher.ts:121

  #### Returns Promise<AesCipher>

### createHashRipemd160

- createHashRipemd160(): Ripemd160PolyfillDigest | NodeCryptoRipemd160Digest

- - Defined in src/encryption/hashRipemd160.ts:46

  #### Returns Ripemd160PolyfillDigest | NodeCryptoRipemd160Digest

### createHmacSha256

- createHmacSha256(): Promise<Hmac>

- - Defined in src/encryption/hmacSha256.ts:45

  #### Returns Promise<Hmac>

### createPbkdf2

- createPbkdf2(): Promise<Pbkdf2>

- - Defined in src/encryption/pbkdf2.ts:151

  #### Returns Promise<Pbkdf2>

### createSha2Hash

- createSha2Hash(): Promise<Sha2Hash>

- - Defined in src/encryption/sha2Hash.ts:58

  #### Returns Promise<Sha2Hash>

### decryptContent

- decryptContent(content: string, options?: object, caller?: UserSession): Promise<string | Buffer>

- - Defined in src/storage/index.ts:123
  deprecated

    #### v19 Use UserSession.decryptContent.

    Decrypts data encrypted with `encryptContent` with the transit private key.

  #### Parameters

  - ##### content: string

    encrypted content.

  - ##### Optional options: object

    - ##### Optional privateKey?: string

      the hex string of the ECDSA private key to use for decryption. If not provided, will use user's appPrivateKey.

  - ##### Optional caller: UserSession

  #### Returns Promise<string | Buffer>

  decrypted content.

### deleteFile

- deleteFile(path: string, options?: object, caller?: UserSession): Promise<void>

- - Defined in src/storage/index.ts:677

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

  #### Parameters

  - ##### path: string

    The path to the file to delete.

  - ##### Optional options: object

    Optional options object.

    - ##### Optional wasSigned?: boolean

      Set to true if the file was originally signed in order for the corresponding signature file to also be deleted.

  - ##### Optional caller: UserSession

  #### Returns Promise<void>

  Resolves when the file has been removed or rejects with an error.

### deleteFromGaiaHub

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

- - Defined in src/storage/hub.ts:60

  #### Parameters

  - ##### filename: string

  - ##### hubConfig: GaiaHubConfig

  #### Returns Promise<void>

### encryptContent

- encryptContent(content: string | Buffer, options?: object, caller?: UserSession): Promise<string>

- - Defined in src/storage/index.ts:94
  deprecated

    #### v19 Use UserSession.encryptContent.

    Encrypts the data provided with the app public key.

  #### Parameters

  - ##### content: string | Buffer

    data to encrypt

  - ##### Optional options: object

    - ##### Optional publicKey?: string

      the hex string of the ECDSA public key to use for encryption. If not provided, will use user's appPublicKey.

  - ##### Optional caller: UserSession

  #### Returns Promise<string>

  Stringified ciphertext object

### Private estimateAnnounce

- estimateAnnounce(messageHash: string, senderUtxos?: number): Promise<number>

- - Defined in src/operations/txbuild.ts:429

  Estimates the cost of an announce transaction

  #### Parameters

  - ##### messageHash: string

    the hash of the message

  - ##### Default value senderUtxos: number = 1

    the number of utxos we expect will be required from the importer address

  #### Returns Promise<number>

  - a promise which resolves to the satoshi cost to fund this announce transaction

### Private estimateNameImport

- estimateNameImport(name: string, recipientAddr: string, zonefileHash: string, importUtxos?: number): Promise<number>

- - Defined in src/operations/txbuild.ts:404

  Estimates the cost of a name-import transaction

  #### Parameters

  - ##### name: string

    the fully-qualified name

  - ##### recipientAddr: string

    the recipient

  - ##### zonefileHash: string

    the zone file hash

  - ##### Default value importUtxos: number = 1

    the number of UTXOs we expect will be required from the importer address

  #### Returns Promise<number>

  - a promise which resolves to the satoshi cost to fund this name-import transaction

### Private estimateNamespacePreorder

- estimateNamespacePreorder(namespaceID: string, revealAddress: string, paymentAddress: string, paymentUtxos?: number): Promise<number>

- - Defined in src/operations/txbuild.ts:317

  Estimates cost of a namespace preorder transaction for a namespace

  #### Parameters

  - ##### namespaceID: string

    the namespace to preorder

  - ##### revealAddress: string

    the address to receive the namespace (this must be passed as the 'revealAddress' in the namespace-reveal transaction)

  - ##### paymentAddress: string

    the address funding the preorder

  - ##### Default value paymentUtxos: number = 1

    the number of UTXOs we expect will be required from the payment address.

  #### Returns Promise<number>

  - a promise which resolves to the satoshi cost to fund the preorder. This includes a 5500 satoshi dust output for the preorder. Even though this is a change output, the payer must supply enough funds to generate this output, so we include it in the cost.

### Private estimateNamespaceReady

- estimateNamespaceReady(namespaceID: string, revealUtxos?: number): Promise<number>

- - Defined in src/operations/txbuild.ts:379

  Estimates the cost of a namespace-ready transaction for a namespace

  #### Parameters

  - ##### namespaceID: string

    the namespace to ready

  - ##### Default value revealUtxos: number = 1

    the number of UTXOs we expect will be required from the reveal address

  #### Returns Promise<number>

  - a promise which resolves to the satoshi cost to fund this namespacey-ready transaction.

### Private estimateNamespaceReveal

- estimateNamespaceReveal(namespace: BlockstackNamespace, revealAddress: string, paymentAddress: string, paymentUtxos?: number): Promise<number>

- - Defined in src/operations/txbuild.ts:353

  Estimates cost of a namesapce reveal transaction for a namespace

  #### Parameters

  - ##### namespace: BlockstackNamespace

    the namespace to reveal

  - ##### revealAddress: string

    the address to receive the namespace (this must have been passed as 'revealAddress' to a prior namespace preorder)

  - ##### paymentAddress: string

    the address that pays for this transaction

  - ##### Default value paymentUtxos: number = 1

    the number of UTXOs we expect will be required from the payment address

  #### Returns Promise<number>

  - a promise which resolves to the satoshi cost to fund the reveal. This includes a 5500 satoshi dust output for the preorder. Even though this is a change output, the payer must have enough funds to generate this output, so we include it in the cost.

### Private estimatePreorder

- estimatePreorder(fullyQualifiedName: string, destinationAddress: string, paymentAddress: string, paymentUtxos?: number): Promise<number>

- - Defined in src/operations/txbuild.ts:108

  Estimates cost of a preorder transaction for a domain name.

  #### Parameters

  - ##### fullyQualifiedName: string

    the name to preorder

  - ##### destinationAddress: string

    the address to receive the name (this must be passed as the 'registrationAddress' in the register transaction)

  - ##### paymentAddress: string

    the address funding the preorder

  - ##### Default value paymentUtxos: number = 1

    the number of UTXOs we expect will be required from the payment address.

  #### Returns Promise<number>

  - a promise which resolves to the satoshi cost to fund the preorder. This includes a 5500 satoshi dust output for the preorder. Even though this is a change output, the payer must supply enough funds to generate this output, so we include it in the cost.

### Private estimateRegister

- estimateRegister(fullyQualifiedName: string, registerAddress: string, paymentAddress: string, includingZonefile?: boolean, paymentUtxos?: number): Promise<number>

- - Defined in src/operations/txbuild.ts:142

  Estimates cost of a register transaction for a domain name.

  #### Parameters

  - ##### fullyQualifiedName: string

    the name to register

  - ##### registerAddress: string

    the address to receive the name

  - ##### paymentAddress: string

    the address funding the register

  - ##### Default value includingZonefile: boolean = false

    whether or not we will broadcast a zonefile hash as part of the register

  - ##### Default value paymentUtxos: number = 1

    the number of UTXOs we expect will be required from the payment address.

  #### Returns Promise<number>

  - a promise which resolves to the satoshi cost to fund the register.

### Private estimateRenewal

- estimateRenewal(fullyQualifiedName: string, destinationAddress: string, ownerAddress: string, paymentAddress: string, includingZonefile?: boolean, paymentUtxos?: number): Promise<number>

- - Defined in src/operations/txbuild.ts:244

  Estimates cost of an transfer transaction for a domain name.

  #### Parameters

  - ##### fullyQualifiedName: string

    the name to renew

  - ##### destinationAddress: string

    the next owner of the name

  - ##### ownerAddress: string

    the current owner of the name

  - ##### paymentAddress: string

    the address funding the transfer

  - ##### Default value includingZonefile: boolean = false

    whether or not we will broadcast a zonefile hash in the renewal operation

  - ##### Default value paymentUtxos: number = 1

    the number of UTXOs we expect will be required from the payment address.

  #### Returns Promise<number>

  - a promise which resolves to the satoshi cost to fund the transfer.

### Private estimateRevoke

- estimateRevoke(fullyQualifiedName: string, ownerAddress: string, paymentAddress: string, paymentUtxos?: number): Promise<number>

- - Defined in src/operations/txbuild.ts:285

  Estimates cost of a revoke transaction for a domain name.

  #### Parameters

  - ##### fullyQualifiedName: string

    the name to revoke

  - ##### ownerAddress: string

    the current owner of the name

  - ##### paymentAddress: string

    the address funding the revoke

  - ##### Default value paymentUtxos: number = 1

    the number of UTXOs we expect will be required from the payment address.

  #### Returns Promise<number>

  - a promise which resolves to the satoshi cost to fund the revoke.

### Private estimateTokenTransfer

- estimateTokenTransfer(recipientAddress: string, tokenType: string, tokenAmount: BN, scratchArea: string, senderUtxos?: number, additionalOutputs?: number): Promise<number>

- - Defined in src/operations/txbuild.ts:458

  Estimates the cost of a token-transfer transaction

  #### Parameters

  - ##### recipientAddress: string

    the recipient of the tokens

  - ##### tokenType: string

    the type of token to spend

  - ##### tokenAmount: BN

    a 64-bit unsigned BigInteger encoding the number of tokens to spend

  - ##### scratchArea: string

    an arbitrary string to store with the transaction

  - ##### Default value senderUtxos: number = 1

    the number of utxos we expect will be required from the importer address

  - ##### Default value additionalOutputs: number = 1

    the number of outputs we expect to add beyond just the recipient output (default = 1, if the token owner is also the bitcoin funder)

  #### Returns Promise<number>

  - a promise which resolves to the satoshi cost to fund this token-transfer transaction

### Private estimateTransfer

- estimateTransfer(fullyQualifiedName: string, destinationAddress: string, ownerAddress: string, paymentAddress: string, paymentUtxos?: number): Promise<number>

- - Defined in src/operations/txbuild.ts:210

  Estimates cost of an transfer transaction for a domain name.

  #### Parameters

  - ##### fullyQualifiedName: string

    the name to transfer

  - ##### destinationAddress: string

    the next owner of the name

  - ##### ownerAddress: string

    the current owner of the name

  - ##### paymentAddress: string

    the address funding the transfer

  - ##### Default value paymentUtxos: number = 1

    the number of UTXOs we expect will be required from the payment address.

  #### Returns Promise<number>

  - a promise which resolves to the satoshi cost to fund the transfer.

### Private estimateUpdate

- estimateUpdate(fullyQualifiedName: string, ownerAddress: string, paymentAddress: string, paymentUtxos?: number): Promise<number>

- - Defined in src/operations/txbuild.ts:179

  Estimates cost of an update transaction for a domain name.

  #### Parameters

  - ##### fullyQualifiedName: string

    the name to update

  - ##### ownerAddress: string

    the owner of the name

  - ##### paymentAddress: string

    the address funding the update

  - ##### Default value paymentUtxos: number = 1

    the number of UTXOs we expect will be required from the payment address.

  #### Returns Promise<number>

  - a promise which resolves to the satoshi cost to fund the update.

### extractProfile

- extractProfile(token: string, publicKeyOrAddress?: string | null): Record<string, any>

- - Defined in src/profiles/profileTokens.ts:146

  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

### getAPIUsageErrorMessage

- getAPIUsageErrorMessage(scopeObject: unknown, apiName: string, usageDesc?: string): string

- - Defined in src/utils.ts:182

  #### Parameters

  - ##### scopeObject: unknown

  - ##### apiName: string

  - ##### Optional usageDesc: string

  #### Returns string

### getAppBucketUrl

- getAppBucketUrl(gaiaHubUrl: string, appPrivateKey: string): Promise<string>

- - Defined in src/storage/index.ts:716

  Get the app storage bucket URL

  #### Parameters

  - ##### gaiaHubUrl: string

    the gaia hub URL

  - ##### appPrivateKey: string

    the app private key used to generate the app address

  #### Returns Promise<string>

  That resolves to the URL of the app index file or rejects if it fails

### getAuthResponseToken

- getAuthResponseToken(): string

- - Defined in src/auth/authApp.ts:155
  deprecated

    #### v19 Use UserSession.getAuthResponseToken instead.

    Retrieve the authentication token from the URL query

  #### Returns string

  the authentication token if it exists otherwise `null`

### getBlockstackErrorFromResponse

- getBlockstackErrorFromResponse(response: Response, errorMsg: string): Promise<Error>

- - Defined in src/utils.ts:323

  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

  #### Returns Promise<Error>

### getCryptoLib

- getCryptoLib(): Promise<WebCryptoLib | NodeCryptoLib>

- - Defined in src/encryption/cryptoUtils.ts:50

  #### Returns Promise<WebCryptoLib | NodeCryptoLib>

### getFile

- getFile(path: string, options?: GetFileOptions, caller?: UserSession): Promise<string | ArrayBuffer>

- - Defined in src/storage/index.ts:446

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

  #### Parameters

  - ##### path: string

    the path to the file to read

  - ##### Optional options: GetFileOptions

  - ##### Optional caller: UserSession

  #### Returns Promise<string | ArrayBuffer>

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

### getFileContents

- getFileContents(path: string, app: string, username: string | undefined, zoneFileLookupURL: string | undefined, forceText: boolean, caller?: UserSession): Promise<string | ArrayBuffer | null>

- - Defined in src/storage/index.ts:252

  #### Parameters

  - ##### path: string

  - ##### app: string

  - ##### username: string | undefined

  - ##### zoneFileLookupURL: string | undefined

  - ##### forceText: boolean

  - ##### Optional caller: UserSession

  #### Returns Promise<string | ArrayBuffer | null>

### getFileSignedUnencrypted

- getFileSignedUnencrypted(path: string, opt: GetFileOptions, caller?: UserSession): Promise<string | ArrayBuffer>

- - Defined in src/storage/index.ts:278

  #### Parameters

  - ##### path: string

  - ##### opt: GetFileOptions

  - ##### Optional caller: UserSession

  #### Returns Promise<string | ArrayBuffer>

### getFileUrl

- getFileUrl(path: string, options?: GetFileUrlOptions, caller?: UserSession): Promise<string>

- - Defined in src/storage/index.ts:225
  deprecated

    #### v19 Use UserSession.getFileUrl instead.

  #### Parameters

  - ##### path: string

    the path to the file to read

  - ##### Optional options: GetFileUrlOptions

  - ##### Optional caller: UserSession

  #### Returns Promise<string>

  that resolves to the URL or rejects with an error

### getGaiaAddress

- getGaiaAddress(app: string, username?: string, zoneFileLookupURL?: string, caller?: UserSession): Promise<string>

- - Defined in src/storage/index.ts:153

  #### Parameters

  - ##### app: string

  - ##### Optional username: string

  - ##### Optional zoneFileLookupURL: string

  - ##### Optional caller: UserSession

  #### Returns Promise<string>

### getGaiaErrorResponse

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

- - Defined in src/utils.ts:300

  #### Parameters

  - ##### response: Response

  #### Returns Promise<GaiaHubErrorResponse>

### getName

- getName(profile: any): any

- - Defined in src/profiles/profileSchemas/personUtils.ts:1

  #### Parameters

  - ##### profile: any

  #### Returns any

### getNameInfo

- getNameInfo(fullyQualifiedName: string): Promise<any>

- - Defined in src/network.ts:1307

  Get WHOIS-like information for a name, including the address that owns it, the block at which it expires, and the zone file anchored to it (if available). This is intended for use in third-party wallets or in DApps that register names.

  #### Parameters

  - ##### fullyQualifiedName: string

    the name to query. Can be on-chain of off-chain.

  #### Returns Promise<any>

  a promise that resolves to the WHOIS-like information

### getTransaction

- getTransaction(txIn: Transaction | TransactionBuilder): Transaction

- - Defined in src/operations/utils.ts:79

  #### Parameters

  - ##### txIn: Transaction | TransactionBuilder

  #### Returns Transaction

### getUserAppFileUrl

- getUserAppFileUrl(path: string, username: string, appOrigin: string, zoneFileLookupURL?: string): Promise<string | null>

- - Defined in src/storage/index.ts:65

  Fetch the public read URL of a user file for the specified app.

  #### Parameters

  - ##### path: string

    the path to the file to read

  - ##### username: string

    The Blockstack ID of the user to look up

  - ##### appOrigin: string

    The app origin

  - ##### Optional zoneFileLookupURL: string

  #### Returns Promise<string | null>

  that resolves to the public read URL of the file or rejects with an error

### handlePendingSignIn

- handlePendingSignIn(nameLookupURL?: string, authResponseToken?: string, transitKey?: string, caller?: UserSession): Promise<UserData>

- - Defined in src/auth/authApp.ts:261
  deprecated

    #### v19 Use UserSession.handlePendingSignIn instead.

    Try to process any pending sign in request by returning a `Promise` that resolves to the user data object if the sign in succeeds.

  #### Parameters

  - ##### Default value nameLookupURL: string = ""

    the endpoint against which to verify public keys match claimed username

  - ##### Default value authResponseToken: string = getAuthResponseToken()

    the signed authentication response token

  - ##### Optional transitKey: string

    the transit private key that corresponds to the transit public key that was provided in the authentication request

  - ##### Optional caller: UserSession

  #### Returns Promise<UserData>

  that resolves to the user data object if successful and rejects if handling the sign in request fails or there was no pending sign in request.

### handleSignedEncryptedContents

- handleSignedEncryptedContents(caller: UserSession, path: string, storedContents: string, app: string, privateKey?: string, username?: string, zoneFileLookupURL?: string): Promise<string | Buffer>

- - Defined in src/storage/index.ts:348

  #### Parameters

  - ##### caller: UserSession

  - ##### path: string

  - ##### storedContents: string

  - ##### app: string

  - ##### Optional privateKey: string

  - ##### Optional username: string

  - ##### Optional zoneFileLookupURL: string

  #### Returns Promise<string | Buffer>

### hashRipemd160

- hashRipemd160(data: Buffer): Buffer

- - Defined in src/encryption/hashRipemd160.ts:60

  #### Parameters

  - ##### data: Buffer

  #### Returns Buffer

### hashSha256Sync

- hashSha256Sync(data: Buffer): Buffer

- - Defined in src/encryption/sha2Hash.ts:67

  #### Parameters

  - ##### data: Buffer

  #### Returns Buffer

### hashSha512Sync

- hashSha512Sync(data: Buffer): Buffer

- - Defined in src/encryption/sha2Hash.ts:73

  #### Parameters

  - ##### data: Buffer

  #### Returns Buffer

### inputBytes

- inputBytes(input: txPoint | null): number

- - Defined in src/operations/utils.ts:49

  #### Parameters

  - ##### input: txPoint | null

  #### Returns number

### isNodeCryptoAvailable

- isNodeCryptoAvailable<T>(withFeature: function): false | T

- - Defined in src/encryption/cryptoUtils.ts:6

  #### Type parameters

  - #### T

  #### Parameters

  - ##### withFeature: function

    - - (nodeCrypto: "crypto"): boolean | T

      - #### Parameters

        - ##### nodeCrypto: "crypto"

        #### Returns boolean | T

  #### Returns false | T

### isSignInPending

- isSignInPending(): boolean

- - Defined in src/auth/authApp.ts:134
  deprecated

    #### v19 Use UserSession.isSignInPending instead.

    Check if there is a authentication request that hasn't been handled.

    Also checks for a protocol echo reply (which if detected then the page will be automatically redirected after this call).

  #### Returns boolean

  `true` if there is a pending sign in, otherwise `false`

### isSubtleCryptoAvailable

- isSubtleCryptoAvailable(): boolean

- - Defined in src/encryption/cryptoUtils.ts:2

  #### Returns boolean

### isUserSignedIn

- isUserSignedIn(): boolean

- - Defined in src/auth/authApp.ts:78
  deprecated

    #### v19 Use UserSession.isUserSignedIn instead.

    Check if a user is currently signed in.

  #### Returns boolean

  `true` if the user is signed in, `false` if not.

### launchCustomProtocol

- launchCustomProtocol(authRequest: string, successCallback: function, failCallback: function): void

- - Defined in src/auth/protocolLaunch.ts:15

  Detects if the native auth-browser is installed and is successfully launched via a custom protocol URI.

  #### Parameters

  - ##### authRequest: string

    The encoded authRequest to be used as a query param in the custom URI.

  - ##### successCallback: function

    The callback that is invoked when the protocol handler was detected.

    - - (): void

      - #### Returns void

  - ##### failCallback: function

    The callback that is invoked when the protocol handler was not detected.

    - - (): void

      - #### Returns void

### listFiles

- listFiles(callback: function, caller?: UserSession): Promise<number>

- - Defined in src/storage/index.ts:813

  List the set of files in this application's Gaia storage bucket.

  #### Parameters

  - ##### callback: function

    a callback to invoke on each named file that returns `true` to continue the listing operation or `false` to end it

    - - (name: string): boolean

      - #### Parameters

        - ##### name: string

        #### Returns boolean

  - ##### Optional caller: UserSession

  #### Returns Promise<number>

  that resolves to the number of files listed, or rejects with an error.

### loadUserData

- loadUserData(): UserData

- - Defined in src/auth/authApp.ts:171
  deprecated

    #### v19 Use UserSession.loadUserData instead.

    Retrieves the user data object. The user's profile is stored in the key `profile`.

  #### Returns UserData

  User data object.

### lookupProfile

- lookupProfile(username: string, zoneFileLookupURL?: string): Promise<Record<string, any>>

- - Defined in src/profiles/profileLookup.ts:15

  Look up a user profile by blockstack ID

  #### Parameters

  - ##### username: string

    The Blockstack ID of the profile to look up

  - ##### Optional zoneFileLookupURL: string

  #### Returns Promise<Record<string, any>>

  that resolves to a profile object

### Private makeAnnounce

- makeAnnounce(messageHash: string, senderKeyIn: string | TransactionSigner, buildIncomplete?: boolean): Promise<string>

- - Defined in src/operations/txbuild.ts:1023

  Generates an announce transaction

  #### Parameters

  - ##### messageHash: string

    the hash of the message to send. Should be an already-announced zone file hash

  - ##### senderKeyIn: string | TransactionSigner

    the private key that pays for the transaction. Should be the key that owns the name that the message recipients subscribe to

  - ##### Default value buildIncomplete: boolean = false

    optional boolean, defaults to false, indicating whether the function should attempt to return an unsigned (or not fully signed) transaction. Useful for passing around a TX for multi-sig input signing.

  #### Returns Promise<string>

  - a promise which resolves to the hex-encoded transaction. this function does not perform the requisite safety checks -- please see the safety module for those.

### makeAuthRequest

- makeAuthRequest(transitPrivateKey?: string, redirectURI?: string, manifestURI?: string, scopes?: Array<AuthScope | string>, appDomain?: string, expiresAt?: number, extraParams?: any): string

- - Defined in src/auth/authMessages.ts:56

  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

  - ##### Optional transitPrivateKey: string

    hex encoded transit private key

  - ##### Optional redirectURI: string

    location to redirect user to after sign in approval

  - ##### Optional manifestURI: string

    location of this app's manifest file

  - ##### Default value scopes: Array<AuthScope | string> = DEFAULT_SCOPE.slice()

    the permissions this app is requesting

  - ##### Optional appDomain: 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

### Private makeBitcoinSpend

- makeBitcoinSpend(destinationAddress: string, paymentKeyIn: string | TransactionSigner, amount: number, buildIncomplete?: boolean): Promise<string>

- - Defined in src/operations/txbuild.ts:1129

  Generates a bitcoin spend to a specified address. This will fund up to `amount` of satoshis from the payer's UTXOs. It will generate a change output if and only if the amount of leftover change is greater than the additional fees associated with the extra output. If the requested amount is not enough to fund the transaction's associated fees, then this will reject with a InvalidAmountError

  UTXOs are selected largest to smallest, and UTXOs which cannot fund the fees associated with their own input will not be included.

  If you specify an amount > the total balance of the payer address, then this will generate a maximum spend transaction

  #### Parameters

  - ##### destinationAddress: string

    the address to receive the bitcoin payment

  - ##### paymentKeyIn: string | TransactionSigner

    the private key used to fund the bitcoin spend

  - ##### amount: number

    the amount in satoshis for the payment address to spend in this transaction

  - ##### Default value buildIncomplete: boolean = false

    optional boolean, defaults to false, indicating whether the function should attempt to return an unsigned (or not fully signed) transaction. Useful for passing around a TX for multi-sig input signing.

  #### Returns Promise<string>

  - a promise which resolves to the hex-encoded transaction.

### Private makeNameImport

- makeNameImport(name: string, recipientAddr: string, zonefileHash: string, importerKeyIn: string | TransactionSigner, buildIncomplete?: boolean): Promise<string>

- - Defined in src/operations/txbuild.ts:986

  Generates a name import transaction for a namespace

  #### Parameters

  - ##### name: string

    the name to import

  - ##### recipientAddr: string

    the address to receive the name

  - ##### zonefileHash: string

    the hash of the zonefile to give this name

  - ##### importerKeyIn: string | TransactionSigner

    the private key that pays for the import

  - ##### Default value buildIncomplete: boolean = false

    optional boolean, defaults to false, indicating whether the function should attempt to return an unsigned (or not fully signed) transaction. Useful for passing around a TX for multi-sig input signing.

  #### Returns Promise<string>

  - a promise which resolves to the hex-encoded transaction. this function does not perform the requisite safety checks -- please see the safety module for those.

### Private makeNamespaceReady

- makeNamespaceReady(namespaceID: string, revealKeyIn: string | TransactionSigner, buildIncomplete?: boolean): Promise<string>

- - Defined in src/operations/txbuild.ts:950

  Generates a namespace ready transaction for a namespace

  #### Parameters

  - ##### namespaceID: string

    the namespace to launch

  - ##### revealKeyIn: string | TransactionSigner

    the private key of the 'revealAddress' used to reveal the namespace

  - ##### Default value buildIncomplete: boolean = false

    optional boolean, defaults to false, indicating whether the function should attempt to return an unsigned (or not fully signed) transaction. Useful for passing around a TX for multi-sig input signing.

  #### Returns Promise<string>

  - a promise which resolves to the hex-encoded transaction. this function does not perform the requisite safety checks -- please see the safety module for those.

### Private makeNamespaceReveal

- makeNamespaceReveal(namespace: BlockstackNamespace, revealAddress: string, paymentKeyIn: string | TransactionSigner, buildIncomplete?: boolean): Promise<string>

- - Defined in src/operations/txbuild.ts:908

  Generates a namespace reveal transaction for a namespace

  #### Parameters

  - ##### namespace: BlockstackNamespace

    the namespace to reveal

  - ##### revealAddress: string

    the address to receive the namespace (this must be passed as the 'revealAddress' in the namespace-reveal transaction)

  - ##### paymentKeyIn: string | TransactionSigner

    a hex string (or a TransactionSigner object) of the private key used to fund the transaction

  - ##### Default value buildIncomplete: boolean = false

    optional boolean, defaults to false, indicating whether the function should attempt to return an unsigned (or not fully signed) transaction. Useful for passing around a TX for multi-sig input signing.

  #### Returns Promise<string>

  - a promise which resolves to the hex-encoded transaction. this function does not perform the requisite safety checks -- please see the safety module for those.

### Private makePreorder

- makePreorder(fullyQualifiedName: string, destinationAddress: string, paymentKeyIn: string | TransactionSigner, buildIncomplete?: boolean): Promise<string>

- - Defined in src/operations/txbuild.ts:492

  Generates a preorder transaction for a domain name.

  #### Parameters

  - ##### fullyQualifiedName: string

    the name to pre-order

  - ##### destinationAddress: string

    the address to receive the name (this must be passed as the 'registrationAddress' in the register transaction)

  - ##### paymentKeyIn: string | TransactionSigner

    a hex string of the private key used to fund the transaction or a transaction signer object

  - ##### Default value buildIncomplete: boolean = false

    optional boolean, defaults to false, indicating whether the function should attempt to return an unsigned (or not fully signed) transaction. Useful for passing around a TX for multi-sig input signing.

  #### Returns Promise<string>

  - a promise which resolves to the hex-encoded transaction. this function does not perform the requisite safety checks -- please see the safety module for those.

### Private makeRegister

- makeRegister(fullyQualifiedName: string, registerAddress: string, paymentKeyIn: string | TransactionSigner, zonefile?: string, valueHash?: string, buildIncomplete?: boolean): Promise<string>

- - Defined in src/operations/txbuild.ts:624

  Generates a register transaction for a domain name.

  #### Parameters

  - ##### fullyQualifiedName: string

    the name to register

  - ##### registerAddress: string

    the address to receive the name (this must have been passed as the 'destinationAddress' in the preorder transaction) this address will receive a dust UTXO

  - ##### paymentKeyIn: string | TransactionSigner

    a hex string of the private key (or a TransactionSigner object) used to fund the transaction (this must be the same as the payment address used to fund the preorder)

  - ##### Default value zonefile: string = null

    the zonefile data to include (this will be hashed to include in the transaction), the zonefile itself must be published after the UPDATE propagates.

  - ##### Default value valueHash: string = null

    the hash of the zone file data to include. It will be used instead of zonefile, if given

  - ##### Default value buildIncomplete: boolean = false

    optional boolean, defaults to false, indicating whether the function should attempt to return an unsigned (or not fully signed) transaction. Useful for passing around a TX for multi-sig input signing.

  #### Returns Promise<string>

  - a promise which resolves to the hex-encoded transaction. this function does not perform the requisite safety checks -- please see the safety module for those.

### Private makeRenewal

- makeRenewal(fullyQualifiedName: string, destinationAddress: string, ownerKeyIn: string | TransactionSigner, paymentKeyIn: string | TransactionSigner, zonefile?: string, valueHash?: string, buildIncomplete?: boolean): Promise<string>

- - Defined in src/operations/txbuild.ts:786

  Generates a renewal transaction for a domain name.

  #### Parameters

  - ##### fullyQualifiedName: string

    the name to transfer

  - ##### destinationAddress: string

    the address to receive the name after renewal this address will receive a dust UTXO

  - ##### ownerKeyIn: string | TransactionSigner

    a hex string of the current owner's private key (or a TransactionSigner object)

  - ##### paymentKeyIn: string | TransactionSigner

    a hex string of the private key used to fund the renewal (or a TransactionSigner object)

  - ##### Default value zonefile: string = null

    the zonefile data to include, if given (this will be hashed to include in the transaction), the zonefile itself must be published after the RENEWAL propagates.

  - ##### Default value valueHash: string = null

    the raw zone file hash to include (this will be used instead of zonefile, if given).

  - ##### Default value buildIncomplete: boolean = false

    optional boolean, defaults to false, indicating whether the function should attempt to return an unsigned (or not fully signed) transaction. Useful for passing around a TX for multi-sig input signing.

  #### Returns Promise<string>

  - a promise which resolves to the hex-encoded transaction. this function does not perform the requisite safety checks -- please see the safety module for those.

### Private makeRevoke

- makeRevoke(fullyQualifiedName: string, ownerKeyIn: string | TransactionSigner, paymentKeyIn: string | TransactionSigner, buildIncomplete?: boolean): Promise<string>

- - Defined in src/operations/txbuild.ts:734

  Generates a revoke transaction for a domain name.

  #### Parameters

  - ##### fullyQualifiedName: string

    the name to revoke

  - ##### ownerKeyIn: string | TransactionSigner

    a hex string of the current owner's private key (or a TransactionSigner object)

  - ##### paymentKeyIn: string | TransactionSigner

    a hex string of the private key used to fund the transaction (or a TransactionSigner object)

  - ##### Default value buildIncomplete: boolean = false

    optional boolean, defaults to false, indicating whether the function should attempt to return an unsigned (or not fully signed) transaction. Useful for passing around a TX for multi-sig input signing.

  #### Returns Promise<string>

  - a promise which resolves to the hex-encoded transaction. this function does not perform the requisite safety checks -- please see the safety module for those.

### Private makeTokenTransfer

- makeTokenTransfer(recipientAddress: string, tokenType: string, tokenAmount: BN, scratchArea: string, senderKeyIn: string | TransactionSigner, btcFunderKeyIn?: string | TransactionSigner, buildIncomplete?: boolean): Promise<string>

- - Defined in src/operations/txbuild.ts:1063

  Generates a token-transfer transaction

  #### Parameters

  - ##### recipientAddress: string

    the address to receive the tokens

  - ##### tokenType: string

    the type of tokens to send

  - ##### tokenAmount: BN

    the BigInteger encoding of an unsigned 64-bit number of tokens to send

  - ##### scratchArea: string

    an arbitrary string to include with the transaction

  - ##### senderKeyIn: string | TransactionSigner

    the hex-encoded private key to send the tokens

  - ##### Optional btcFunderKeyIn: string | TransactionSigner

    the hex-encoded private key to fund the bitcoin fees for the transaction. Optional -- if not passed, will attempt to fund with sender key.

  - ##### Default value buildIncomplete: boolean = false

    optional boolean, defaults to false, indicating whether the function should attempt to return an unsigned (or not fully signed) transaction. Useful for passing around a TX for multi-sig input signing.

  #### Returns Promise<string>

  - a promise which resolves to the hex-encoded transaction. This function does not perform the requisite safety checks -- please see the safety module for those.

### Private makeTransfer

- makeTransfer(fullyQualifiedName: string, destinationAddress: string, ownerKeyIn: string | TransactionSigner, paymentKeyIn: string | TransactionSigner, keepZonefile?: boolean, buildIncomplete?: boolean): Promise<string>

- - Defined in src/operations/txbuild.ts:680

  Generates a transfer transaction for a domain name.

  #### Parameters

  - ##### fullyQualifiedName: string

    the name to transfer

  - ##### destinationAddress: string

    the address to receive the name. this address will receive a dust UTXO

  - ##### ownerKeyIn: string | TransactionSigner

    a hex string of the current owner's private key (or a TransactionSigner object)

  - ##### paymentKeyIn: string | TransactionSigner

    a hex string of the private key used to fund the transaction (or a TransactionSigner object)

  - ##### Default value keepZonefile: boolean = false

    if true, then preserve the name's zone file

  - ##### Default value buildIncomplete: boolean = false

    optional boolean, defaults to false, indicating whether the function should attempt to return an unsigned (or not fully signed) transaction. Useful for passing around a TX for multi-sig input signing.

  #### Returns Promise<string>

  - a promise which resolves to the hex-encoded transaction. this function does not perform the requisite safety checks -- please see the safety module for those.

### Private makeUpdate

- makeUpdate(fullyQualifiedName: string, ownerKeyIn: string | TransactionSigner, paymentKeyIn: string | TransactionSigner, zonefile: string, valueHash?: string, buildIncomplete?: boolean): Promise<string>

- - Defined in src/operations/txbuild.ts:549

  Generates an update transaction for a domain name.

  #### Parameters

  - ##### fullyQualifiedName: string

    the name to update

  - ##### ownerKeyIn: string | TransactionSigner

    a hex string of the owner key, or a transaction signer object. This will provide one UTXO input, and also recieve a dust output.

  - ##### paymentKeyIn: string | TransactionSigner

    a hex string, or a transaction signer object, of the private key used to fund the transaction's txfees

  - ##### zonefile: string

    the zonefile data to update (this will be hashed to include in the transaction), the zonefile itself must be published after the UPDATE propagates.

  - ##### Default value valueHash: string = ""

    if given, this is the hash to store (instead of zonefile). zonefile will be ignored if this is given.

  - ##### Default value buildIncomplete: boolean = false

    optional boolean, defaults to false, indicating whether the function should attempt to return an unsigned (or not fully signed) transaction. Useful for passing around a TX for multi-sig input signing.

  #### Returns Promise<string>

  - a promise which resolves to the hex-encoded transaction. this function does not perform the requisite safety checks -- please see the safety module for those.

### outputBytes

- outputBytes(output: txPoint | null): number

- - Defined in src/operations/utils.ts:57

  #### Parameters

  - ##### output: txPoint | null

  #### Returns number

### putFile

- putFile(path: string, content: string | Buffer | ArrayBufferView | Blob, options?: PutFileOptions, caller?: UserSession): Promise<string>

- - Defined in src/storage/index.ts:564

  Stores the data provided in the app's data store to to the file specified.

  #### Parameters

  - ##### path: string

    the path to store the data in

  - ##### content: string | Buffer | ArrayBufferView | Blob

    the data to store in the file

  - ##### Optional options: PutFileOptions

  - ##### Optional caller: UserSession

  #### Returns Promise<string>

  that resolves if the operation succeed and rejects if it failed

### redirectToSignIn

- redirectToSignIn(redirectURI?: string, manifestURI?: string, scopes?: Array<AuthScope | string>): void

- - Defined in src/auth/authApp.ts:113
  deprecated

    #### v19 Use UserSession.isUserSignedIn instead.

    Generates an authentication request and redirects the user to the Blockstack browser to approve the sign in request.

    Please note that this requires that the web browser properly handles the `blockstack:` URL protocol handler.

    Most applications should use this method for sign in unless they require more fine grained control over how the authentication request is generated. If your app falls into this category, use `makeAuthRequest` and `redirectToSignInWithAuthRequest` to build your own sign in process.

  #### Parameters

  - ##### Optional redirectURI: string

  - ##### Optional manifestURI: string

  - ##### Optional scopes: Array<AuthScope | string>

  #### Returns void

### redirectToSignInWithAuthRequest

- redirectToSignInWithAuthRequest(authRequest?: string, blockstackIDHost?: string): void

- - Defined in src/auth/authApp.ts:214
  deprecated

    #### v19 Use UserSession.redirectToSignInWithAuthRequest instead.

    Redirects the user to the Blockstack browser to approve the sign in request given.

    The user is redirected to the `blockstackIDHost` if the `blockstack:` protocol handler is not detected. Please note that the protocol handler detection does not work on all browsers.

  #### Parameters

  - ##### Optional authRequest: string

    the authentication request generated by `makeAuthRequest`

  - ##### Default value blockstackIDHost: string = DEFAULT_BLOCKSTACK_HOST

    the URL to redirect the user to if the blockstack protocol handler is not detected

  #### Returns void

### signInputs

- signInputs(txB: TransactionBuilder, defaultSigner: TransactionSigner, otherSigners?: Array<object>): Promise<TransactionBuilder>

- - Defined in src/operations/utils.ts:212

  #### Parameters

  - ##### txB: TransactionBuilder

  - ##### defaultSigner: TransactionSigner

  - ##### Optional otherSigners: Array<object>

  #### Returns Promise<TransactionBuilder>

### signProfileToken

- signProfileToken(profile: any, privateKey: string, subject?: any, issuer?: any, signingAlgorithm?: string, issuedAt?: Date, expiresAt?: Date): string

- - Defined in src/profiles/profileTokens.ts:19

  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

### signUserOut

- signUserOut(redirectURL?: string, caller?: UserSession): void

- - Defined in src/auth/authApp.ts:188
  deprecated

    #### v19 Use UserSession.signUserOut instead.

    Sign the user out and optionally redirect to given location.

  #### Parameters

  - ##### Optional redirectURL: string

    Location to redirect user to after sign out. Only used in environments with `window` available

  - ##### Optional caller: UserSession

  #### Returns void

### transactionBytes

- transactionBytes(inputs: Array<txPoint | null>, outputs: Array<txPoint | null>): number

- - Defined in src/operations/utils.ts:65

  #### Parameters

  - ##### inputs: Array<txPoint | null>

  - ##### outputs: Array<txPoint | null>

  #### Returns number

### validateProofs

- validateProofs(profile: any, ownerAddress: string, cheerio: CheerioModuleType, name?: string): Promise<AccountProofInfo[]>

- - Defined in src/profiles/profileProofs.ts:20

  Validates the social proofs in a user's profile. Currently supports validation of Facebook, Twitter, GitHub, Instagram, LinkedIn and HackerNews accounts.

  #### Parameters

  - ##### profile: any

    The JSON of the profile to be validated

  - ##### ownerAddress: string

    The owner bitcoin address to be validated

  - ##### cheerio: CheerioModuleType

  - ##### Default value name: string = null

  #### Returns Promise<AccountProofInfo[]>

  that resolves to an array of validated proof objects

### verifyProfileToken

- verifyProfileToken(token: string, publicKeyOrAddress: string): TokenInterface

- - Defined in src/profiles/profileTokens.ts:74

  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

### wrapProfileToken

- wrapProfileToken(token: string): object

- - Defined in src/profiles/profileTokens.ts:59

  Wraps a token for a profile token file

  #### Parameters

  - ##### token: string

    the token to be wrapped

  #### Returns object

  - including `token` and `decodedToken`

  - ##### decodedToken: TokenInterface

  - ##### token: string

## Object literals

### Const DEFAULT_PROFILE

DEFAULT_PROFILE: object

- Defined in src/auth/authApp.ts:26

### @context

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

- Defined in src/auth/authApp.ts:28

### @type

@type: string = "Person"

- Defined in src/auth/authApp.ts:27

### Const schemaDefinition

schemaDefinition: object

- Defined in src/profiles/profile.ts:9
- Defined in src/profiles/profileSchemas/person.ts:13
- Defined in src/profiles/profileSchemas/organization.ts:8
- Defined in src/profiles/profileSchemas/creativework.ts:6

### strict

strict: boolean = false

- Defined in src/profiles/profileSchemas/person.ts:15

### type

type: string = "object"

- Defined in src/profiles/profile.ts:10
- Defined in src/profiles/profileSchemas/person.ts:14
- Defined in src/profiles/profileSchemas/organization.ts:9
- Defined in src/profiles/profileSchemas/creativework.ts:7

### properties

properties: object

- Defined in src/profiles/profile.ts:11
- Defined in src/profiles/profileSchemas/person.ts:16
- Defined in src/profiles/profileSchemas/organization.ts:10
- Defined in src/profiles/profileSchemas/creativework.ts:8

### @context

@context: object

- Defined in src/profiles/profile.ts:12
- Defined in src/profiles/profileSchemas/person.ts:17
- Defined in src/profiles/profileSchemas/organization.ts:11
- Defined in src/profiles/profileSchemas/creativework.ts:9

### optional

optional: boolean = true

- Defined in src/profiles/profile.ts:12
- Defined in src/profiles/profileSchemas/person.ts:17
- Defined in src/profiles/profileSchemas/organization.ts:11
- Defined in src/profiles/profileSchemas/creativework.ts:9

### type

type: string = "string"

- Defined in src/profiles/profile.ts:12
- Defined in src/profiles/profileSchemas/person.ts:17
- Defined in src/profiles/profileSchemas/organization.ts:11
- Defined in src/profiles/profileSchemas/creativework.ts:9

### @id

@id: object

- Defined in src/profiles/profileSchemas/person.ts:19
- Defined in src/profiles/profileSchemas/organization.ts:13
- Defined in src/profiles/profileSchemas/creativework.ts:11

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:19
- Defined in src/profiles/profileSchemas/organization.ts:13
- Defined in src/profiles/profileSchemas/creativework.ts:11

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:19
- Defined in src/profiles/profileSchemas/organization.ts:13
- Defined in src/profiles/profileSchemas/creativework.ts:11

### @type

@type: object

- Defined in src/profiles/profile.ts:13
- Defined in src/profiles/profileSchemas/person.ts:18
- Defined in src/profiles/profileSchemas/organization.ts:12
- Defined in src/profiles/profileSchemas/creativework.ts:10

### type

type: string = "string"

- Defined in src/profiles/profile.ts:13
- Defined in src/profiles/profileSchemas/person.ts:18
- Defined in src/profiles/profileSchemas/organization.ts:12
- Defined in src/profiles/profileSchemas/creativework.ts:10

### account

account: object

- Defined in src/profiles/profileSchemas/person.ts:47

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:49

### type

type: string = "array"

- Defined in src/profiles/profileSchemas/person.ts:48

### items

items: object

- Defined in src/profiles/profileSchemas/person.ts:50

### type

type: string = "object"

- Defined in src/profiles/profileSchemas/person.ts:51

### properties

properties: object

- Defined in src/profiles/profileSchemas/person.ts:52

### @type

@type: object

- Defined in src/profiles/profileSchemas/person.ts:53

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:53

### identifier

identifier: object

- Defined in src/profiles/profileSchemas/person.ts:55

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:55

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:55

### proofMessage

proofMessage: object

- Defined in src/profiles/profileSchemas/person.ts:58

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:58

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:58

### proofSignature

proofSignature: object

- Defined in src/profiles/profileSchemas/person.ts:59

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:59

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:59

### proofType

proofType: object

- Defined in src/profiles/profileSchemas/person.ts:56

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:56

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:56

### proofUrl

proofUrl: object

- Defined in src/profiles/profileSchemas/person.ts:57

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:57

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:57

### service

service: object

- Defined in src/profiles/profileSchemas/person.ts:54

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:54

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:54

### address

address: object

- Defined in src/profiles/profileSchemas/person.ts:85

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:87

### type

type: string = "object"

- Defined in src/profiles/profileSchemas/person.ts:86

### properties

properties: object

- Defined in src/profiles/profileSchemas/person.ts:88

### @type

@type: object

- Defined in src/profiles/profileSchemas/person.ts:89

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:89

### addressCountry

addressCountry: object

- Defined in src/profiles/profileSchemas/person.ts:93

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:93

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:93

### addressLocality

addressLocality: object

- Defined in src/profiles/profileSchemas/person.ts:91

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:91

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:91

### postalCode

postalCode: object

- Defined in src/profiles/profileSchemas/person.ts:92

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:92

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:92

### streetAddress

streetAddress: object

- Defined in src/profiles/profileSchemas/person.ts:90

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:90

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:90

### birthDate

birthDate: object

- Defined in src/profiles/profileSchemas/person.ts:96

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:96

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:96

### description

description: object

- Defined in src/profiles/profileSchemas/person.ts:23

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:23

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:23

### familyName

familyName: object

- Defined in src/profiles/profileSchemas/person.ts:22

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:22

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:22

### givenName

givenName: object

- Defined in src/profiles/profileSchemas/person.ts:21

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:21

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:21

### image

image: object

- Defined in src/profiles/profileSchemas/person.ts:24

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:26

### type

type: string = "array"

- Defined in src/profiles/profileSchemas/person.ts:25

### items

items: object

- Defined in src/profiles/profileSchemas/person.ts:27

### type

type: string = "object"

- Defined in src/profiles/profileSchemas/person.ts:28

### properties

properties: object

- Defined in src/profiles/profileSchemas/person.ts:29

### @type

@type: object

- Defined in src/profiles/profileSchemas/person.ts:30

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:30

### contentUrl

contentUrl: object

- Defined in src/profiles/profileSchemas/person.ts:32

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:32

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:32

### name

name: object

- Defined in src/profiles/profileSchemas/person.ts:31

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:31

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:31

### knows

knows: object

- Defined in src/profiles/profileSchemas/person.ts:74

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:76

### type

type: string = "array"

- Defined in src/profiles/profileSchemas/person.ts:75

### items

items: object

- Defined in src/profiles/profileSchemas/person.ts:77

### type

type: string = "object"

- Defined in src/profiles/profileSchemas/person.ts:78

### properties

properties: object

- Defined in src/profiles/profileSchemas/person.ts:79

### @id

@id: object

- Defined in src/profiles/profileSchemas/person.ts:81

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:81

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:81

### @type

@type: object

- Defined in src/profiles/profileSchemas/person.ts:80

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:80

### name

name: object

- Defined in src/profiles/profileSchemas/person.ts:20

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:20

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:20

### taxID

taxID: object

- Defined in src/profiles/profileSchemas/person.ts:97

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:97

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:97

### website

website: object

- Defined in src/profiles/profileSchemas/person.ts:36

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:38

### type

type: string = "array"

- Defined in src/profiles/profileSchemas/person.ts:37

### items

items: object

- Defined in src/profiles/profileSchemas/person.ts:39

### type

type: string = "object"

- Defined in src/profiles/profileSchemas/person.ts:40

### properties

properties: object

- Defined in src/profiles/profileSchemas/person.ts:41

### @type

@type: object

- Defined in src/profiles/profileSchemas/person.ts:42

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:42

### url

url: object

- Defined in src/profiles/profileSchemas/person.ts:43

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:43

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:43

### worksFor

worksFor: object

- Defined in src/profiles/profileSchemas/person.ts:63

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:65

### type

type: string = "array"

- Defined in src/profiles/profileSchemas/person.ts:64

### items

items: object

- Defined in src/profiles/profileSchemas/person.ts:66

### type

type: string = "object"

- Defined in src/profiles/profileSchemas/person.ts:67

### properties

properties: object

- Defined in src/profiles/profileSchemas/person.ts:68

### @id

@id: object

- Defined in src/profiles/profileSchemas/person.ts:70

### optional

optional: boolean = true

- Defined in src/profiles/profileSchemas/person.ts:70

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:70

### @type

@type: object

- Defined in src/profiles/profileSchemas/person.ts:69

### type

type: string = "string"

- Defined in src/profiles/profileSchemas/person.ts:69

### Const transactions

transactions: object

- Defined in src/operations/txbuild.ts:1190

### BlockstackNamespace

BlockstackNamespace: BlockstackNamespace

- Defined in src/operations/txbuild.ts:1204

### estimateAnnounce

estimateAnnounce: estimateAnnounce

- Defined in src/operations/txbuild.ts:1215

### estimateNameImport

estimateNameImport: estimateNameImport

- Defined in src/operations/txbuild.ts:1214

### estimateNamespacePreorder

estimateNamespacePreorder: estimateNamespacePreorder

- Defined in src/operations/txbuild.ts:1211

### estimateNamespaceReady

estimateNamespaceReady: estimateNamespaceReady

- Defined in src/operations/txbuild.ts:1213

### estimateNamespaceReveal

estimateNamespaceReveal: estimateNamespaceReveal

- Defined in src/operations/txbuild.ts:1212

### estimatePreorder

estimatePreorder: estimatePreorder

- Defined in src/operations/txbuild.ts:1205

### estimateRegister

estimateRegister: estimateRegister

- Defined in src/operations/txbuild.ts:1206

### estimateRenewal

estimateRenewal: estimateRenewal

- Defined in src/operations/txbuild.ts:1209

### estimateRevoke

estimateRevoke: estimateRevoke

- Defined in src/operations/txbuild.ts:1210

### estimateTokenTransfer

estimateTokenTransfer: estimateTokenTransfer

- Defined in src/operations/txbuild.ts:1216

### estimateTransfer

estimateTransfer: estimateTransfer

- Defined in src/operations/txbuild.ts:1207

### estimateUpdate

estimateUpdate: estimateUpdate

- Defined in src/operations/txbuild.ts:1208

### makeAnnounce

makeAnnounce: makeAnnounce

- Defined in src/operations/txbuild.ts:1202

### makeBitcoinSpend

makeBitcoinSpend: makeBitcoinSpend

- Defined in src/operations/txbuild.ts:1200

### makeNameImport

makeNameImport: makeNameImport

- Defined in src/operations/txbuild.ts:1201

### makeNamespacePreorder

makeNamespacePreorder: makeNamespacePreorder

- Defined in src/operations/txbuild.ts:1197

### makeNamespaceReady

makeNamespaceReady: makeNamespaceReady

- Defined in src/operations/txbuild.ts:1199

### makeNamespaceReveal

makeNamespaceReveal: makeNamespaceReveal

- Defined in src/operations/txbuild.ts:1198

### makePreorder

makePreorder: makePreorder

- Defined in src/operations/txbuild.ts:1193

### makeRegister

makeRegister: makeRegister

- Defined in src/operations/txbuild.ts:1194

### makeRenewal

makeRenewal: makeRenewal

- Defined in src/operations/txbuild.ts:1191

### makeRevoke

makeRevoke: makeRevoke

- Defined in src/operations/txbuild.ts:1196

### makeTokenTransfer

makeTokenTransfer: makeTokenTransfer

- Defined in src/operations/txbuild.ts:1203

### makeTransfer

makeTransfer: makeTransfer

- Defined in src/operations/txbuild.ts:1195

### makeUpdate

makeUpdate: makeUpdate

- Defined in src/operations/txbuild.ts:1192

Generated using TypeDoc