@bsv/wallet-toolbox
Version:
BRC100 conforming wallet, wallet storage and wallet signer components
1,597 lines (1,151 loc) • 522 kB
Markdown
# CLIENT: BSV Wallet Toolbox API Documentation
The documentation is split into various pages, this page is the API of the `@bsv/wallet-toolbox-client` package;
which is the subset of the `@bsv/wallet-toolbox` that is compatible with browser deployment contexts.
[Return To Top](./README.md)
<!--#region ts2md-api-merged-here-->
### API
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
#### Interfaces
| | | |
| --- | --- | --- |
| [AdminStatsResult](#interface-adminstatsresult) | [PendingSignAction](#interface-pendingsignaction) | [TableOutput](#interface-tableoutput) |
| [ArcConfig](#interface-arcconfig) | [PendingStorageInput](#interface-pendingstorageinput) | [TableOutputBasket](#interface-tableoutputbasket) |
| [ArcMinerGetTxData](#interface-arcminergettxdata) | [PermissionRequest](#interface-permissionrequest) | [TableOutputTag](#interface-tableoutputtag) |
| [AuthId](#interface-authid) | [PermissionToken](#interface-permissiontoken) | [TableOutputTagMap](#interface-tableoutputtagmap) |
| [AuthPayload](#interface-authpayload) | [PermissionsManagerConfig](#interface-permissionsmanagerconfig) | [TableOutputX](#interface-tableoutputx) |
| [BaseBlockHeader](#interface-baseblockheader) | [PostBeefResult](#interface-postbeefresult) | [TableProvenTx](#interface-tableproventx) |
| [BaseBlockHeader](#interface-baseblockheader) | [PostBeefResultForTxidApi](#interface-postbeefresultfortxidapi) | [TableProvenTxReq](#interface-tableproventxreq) |
| [BitailsConfig](#interface-bitailsconfig) | [PostReqsToNetworkDetails](#interface-postreqstonetworkdetails) | [TableProvenTxReqDynamics](#interface-tableproventxreqdynamics) |
| [BitailsMerkleProof](#interface-bitailsmerkleproof) | [PostReqsToNetworkResult](#interface-postreqstonetworkresult) | [TableSettings](#interface-tablesettings) |
| [BlockHeader](#interface-blockheader) | [PostTxResultForTxid](#interface-posttxresultfortxid) | [TableSyncState](#interface-tablesyncstate) |
| [BlockHeader](#interface-blockheader) | [PostTxResultForTxidError](#interface-posttxresultfortxiderror) | [TableTransaction](#interface-tabletransaction) |
| [BsvExchangeRate](#interface-bsvexchangerate) | [PostTxsResult](#interface-posttxsresult) | [TableTxLabel](#interface-tabletxlabel) |
| [CertOpsWallet](#interface-certopswallet) | [ProcessSyncChunkResult](#interface-processsyncchunkresult) | [TableTxLabelMap](#interface-tabletxlabelmap) |
| [Certifier](#interface-certifier) | [Profile](#interface-profile) | [TableUser](#interface-tableuser) |
| [CommitNewTxResults](#interface-commitnewtxresults) | [ProvenOrRawTx](#interface-provenorrawtx) | [TaskPurgeParams](#interface-taskpurgeparams) |
| [CompleteAuthResponse](#interface-completeauthresponse) | [ProvenTransactionStatus](#interface-proventransactionstatus) | [TrustSettings](#interface-trustsettings) |
| [CreateActionResultX](#interface-createactionresultx) | [ProvenTxFromTxidResult](#interface-proventxfromtxidresult) | [TrxToken](#interface-trxtoken) |
| [EntitySyncMap](#interface-entitysyncmap) | [ProvenTxReqHistory](#interface-proventxreqhistory) | [TscMerkleProofApi](#interface-tscmerkleproofapi) |
| [EntityTimeStamp](#interface-entitytimestamp) | [ProvenTxReqHistorySummaryApi](#interface-proventxreqhistorysummaryapi) | [TxScriptOffsets](#interface-txscriptoffsets) |
| [ExchangeRatesIoApi](#interface-exchangeratesioapi) | [ProvenTxReqNotify](#interface-proventxreqnotify) | [UMPToken](#interface-umptoken) |
| [ExtendedVerifiableCertificate](#interface-extendedverifiablecertificate) | [ProviderCallHistory](#interface-providercallhistory) | [UMPTokenInteractor](#interface-umptokeninteractor) |
| [FiatExchangeRates](#interface-fiatexchangerates) | [PurgeParams](#interface-purgeparams) | [UpdateProvenTxReqWithNewProvenTxArgs](#interface-updateproventxreqwithnewproventxargs) |
| [FindCertificateFieldsArgs](#interface-findcertificatefieldsargs) | [PurgeResults](#interface-purgeresults) | [UpdateProvenTxReqWithNewProvenTxResult](#interface-updateproventxreqwithnewproventxresult) |
| [FindCertificatesArgs](#interface-findcertificatesargs) | [RequestSyncChunkArgs](#interface-requestsyncchunkargs) | [ValidAbortActionArgs](#interface-validabortactionargs) |
| [FindCommissionsArgs](#interface-findcommissionsargs) | [ReviewActionResult](#interface-reviewactionresult) | [ValidAcquireCertificateArgs](#interface-validacquirecertificateargs) |
| [FindForUserSincePagedArgs](#interface-findforusersincepagedargs) | [ScriptTemplateParamsBRC29](#interface-scripttemplateparamsbrc29) | [ValidAcquireDirectCertificateArgs](#interface-validacquiredirectcertificateargs) |
| [FindMonitorEventsArgs](#interface-findmonitoreventsargs) | [ScriptTemplateUnlock](#interface-scripttemplateunlock) | [ValidAcquireIssuanceCertificateArgs](#interface-validacquireissuancecertificateargs) |
| [FindOutputBasketsArgs](#interface-findoutputbasketsargs) | [ServiceCall](#interface-servicecall) | [ValidBasketInsertion](#interface-validbasketinsertion) |
| [FindOutputTagMapsArgs](#interface-findoutputtagmapsargs) | [ServiceCall](#interface-servicecall) | [ValidCreateActionArgs](#interface-validcreateactionargs) |
| [FindOutputTagsArgs](#interface-findoutputtagsargs) | [ServiceCallHistory](#interface-servicecallhistory) | [ValidCreateActionInput](#interface-validcreateactioninput) |
| [FindOutputsArgs](#interface-findoutputsargs) | [ServiceCallHistoryCounts](#interface-servicecallhistorycounts) | [ValidCreateActionOptions](#interface-validcreateactionoptions) |
| [FindPartialSincePagedArgs](#interface-findpartialsincepagedargs) | [ServiceToCall](#interface-servicetocall) | [ValidCreateActionOutput](#interface-validcreateactionoutput) |
| [FindProvenTxReqsArgs](#interface-findproventxreqsargs) | [SetupClientWalletArgs](#interface-setupclientwalletargs) | [ValidDiscoverByAttributesArgs](#interface-validdiscoverbyattributesargs) |
| [FindProvenTxsArgs](#interface-findproventxsargs) | [SetupClientWalletClientArgs](#interface-setupclientwalletclientargs) | [ValidDiscoverByIdentityKeyArgs](#interface-validdiscoverbyidentitykeyargs) |
| [FindSincePagedArgs](#interface-findsincepagedargs) | [SetupWallet](#interface-setupwallet) | [ValidInternalizeActionArgs](#interface-validinternalizeactionargs) |
| [FindSyncStatesArgs](#interface-findsyncstatesargs) | [SetupWalletClient](#interface-setupwalletclient) | [ValidInternalizeOutput](#interface-validinternalizeoutput) |
| [FindTransactionsArgs](#interface-findtransactionsargs) | [SetupWalletIdb](#interface-setupwalletidb) | [ValidListActionsArgs](#interface-validlistactionsargs) |
| [FindTxLabelMapsArgs](#interface-findtxlabelmapsargs) | [SetupWalletIdbArgs](#interface-setupwalletidbargs) | [ValidListCertificatesArgs](#interface-validlistcertificatesargs) |
| [FindTxLabelsArgs](#interface-findtxlabelsargs) | [SignActionResultX](#interface-signactionresultx) | [ValidListOutputsArgs](#interface-validlistoutputsargs) |
| [FindUsersArgs](#interface-findusersargs) | [StartAuthResponse](#interface-startauthresponse) | [ValidProcessActionArgs](#interface-validprocessactionargs) |
| [GenerateChangeSdkChangeInput](#interface-generatechangesdkchangeinput) | [StatusForTxidResult](#interface-statusfortxidresult) | [ValidProcessActionOptions](#interface-validprocessactionoptions) |
| [GenerateChangeSdkChangeOutput](#interface-generatechangesdkchangeoutput) | [StorageAdminStats](#interface-storageadminstats) | [ValidProveCertificateArgs](#interface-validprovecertificateargs) |
| [GenerateChangeSdkInput](#interface-generatechangesdkinput) | [StorageCreateActionResult](#interface-storagecreateactionresult) | [ValidRelinquishCertificateArgs](#interface-validrelinquishcertificateargs) |
| [GenerateChangeSdkOutput](#interface-generatechangesdkoutput) | [StorageCreateTransactionSdkInput](#interface-storagecreatetransactionsdkinput) | [ValidRelinquishOutputArgs](#interface-validrelinquishoutputargs) |
| [GenerateChangeSdkParams](#interface-generatechangesdkparams) | [StorageCreateTransactionSdkOutput](#interface-storagecreatetransactionsdkoutput) | [ValidSignActionArgs](#interface-validsignactionargs) |
| [GenerateChangeSdkResult](#interface-generatechangesdkresult) | [StorageFeeModel](#interface-storagefeemodel) | [ValidSignActionOptions](#interface-validsignactionoptions) |
| [GenerateChangeSdkStorageChange](#interface-generatechangesdkstoragechange) | [StorageGetBeefOptions](#interface-storagegetbeefoptions) | [ValidWalletPayment](#interface-validwalletpayment) |
| [GetMerklePathResult](#interface-getmerklepathresult) | [StorageIdbOptions](#interface-storageidboptions) | [ValidWalletSignerArgs](#interface-validwalletsignerargs) |
| [GetRawTxResult](#interface-getrawtxresult) | [StorageIdbSchema](#interface-storageidbschema) | [ValidateGenerateChangeSdkParamsResult](#interface-validategeneratechangesdkparamsresult) |
| [GetReqsAndBeefDetail](#interface-getreqsandbeefdetail) | [StorageIdentity](#interface-storageidentity) | [WalletArgs](#interface-walletargs) |
| [GetReqsAndBeefResult](#interface-getreqsandbeefresult) | [StorageInternalizeActionResult](#interface-storageinternalizeactionresult) | [WalletBalance](#interface-walletbalance) |
| [GetScriptHashHistory](#interface-getscripthashhistory) | [StorageProcessActionArgs](#interface-storageprocessactionargs) | [WalletPermissionsManagerCallbacks](#interface-walletpermissionsmanagercallbacks) |
| [GetScriptHashHistoryResult](#interface-getscripthashhistoryresult) | [StorageProcessActionResults](#interface-storageprocessactionresults) | [WalletServices](#interface-walletservices) |
| [GetStatusForTxidsResult](#interface-getstatusfortxidsresult) | [StorageProvenOrReq](#interface-storageprovenorreq) | [WalletServicesOptions](#interface-walletservicesoptions) |
| [GetUtxoStatusDetails](#interface-getutxostatusdetails) | [StorageProviderOptions](#interface-storageprovideroptions) | [WalletSettings](#interface-walletsettings) |
| [GetUtxoStatusResult](#interface-getutxostatusresult) | [StorageReaderOptions](#interface-storagereaderoptions) | [WalletSettingsManagerConfig](#interface-walletsettingsmanagerconfig) |
| [GroupedPermissionRequest](#interface-groupedpermissionrequest) | [StorageReaderWriterOptions](#interface-storagereaderwriteroptions) | [WalletSigner](#interface-walletsigner) |
| [GroupedPermissions](#interface-groupedpermissions) | [StorageSyncReaderOptions](#interface-storagesyncreaderoptions) | [WalletStorage](#interface-walletstorage) |
| [KeyPair](#interface-keypair) | [SyncChunk](#interface-syncchunk) | [WalletStorageInfo](#interface-walletstorageinfo) |
| [KeyPairAddress](#interface-keypairaddress) | [SyncError](#interface-syncerror) | [WalletStorageProvider](#interface-walletstorageprovider) |
| [ListActionsSpecOp](#interface-listactionsspecop) | [SyncMap](#interface-syncmap) | [WalletStorageReader](#interface-walletstoragereader) |
| [ListOutputsSpecOp](#interface-listoutputsspecop) | [TableCertificate](#interface-tablecertificate) | [WalletStorageSync](#interface-walletstoragesync) |
| [LiveBlockHeader](#interface-liveblockheader) | [TableCertificateField](#interface-tablecertificatefield) | [WalletStorageSyncReader](#interface-walletstoragesyncreader) |
| [MonitorOptions](#interface-monitoroptions) | [TableCertificateX](#interface-tablecertificatex) | [WalletStorageWriter](#interface-walletstoragewriter) |
| [OutPoint](#interface-outpoint) | [TableCommission](#interface-tablecommission) | [WalletTheme](#interface-wallettheme) |
| [Paged](#interface-paged) | [TableMonitorEvent](#interface-tablemonitorevent) | [XValidCreateActionOutput](#interface-xvalidcreateactionoutput) |
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: AdminStatsResult
```ts
export interface AdminStatsResult extends StorageAdminStats {
servicesStats?: ServicesCallHistory;
monitorStats?: ServicesCallHistory;
}
```
See also: [ServicesCallHistory](./client.md#type-servicescallhistory), [StorageAdminStats](./storage.md#interface-storageadminstats)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: ArcConfig
Configuration options for the ARC broadcaster.
```ts
export interface ArcConfig {
apiKey?: string;
httpClient?: HttpClient;
deploymentId?: string;
callbackUrl?: string;
callbackToken?: string;
headers?: Record<string, string>;
}
```
###### Property apiKey
Authentication token for the ARC API
```ts
apiKey?: string
```
###### Property callbackToken
default access token for notification callback endpoint. It will be used as a Authorization header for the http callback
```ts
callbackToken?: string
```
###### Property callbackUrl
notification callback endpoint for proofs and double spend notification
```ts
callbackUrl?: string
```
###### Property deploymentId
Deployment id used annotating api calls in XDeployment-ID header - this value will be randomly generated if not set
```ts
deploymentId?: string
```
###### Property headers
additional headers to be attached to all tx submissions.
```ts
headers?: Record<string, string>
```
###### Property httpClient
The HTTP client used to make requests to the ARC API.
```ts
httpClient?: HttpClient
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: ArcMinerGetTxData
```ts
export interface ArcMinerGetTxData {
status: number;
title: string;
blockHash: string;
blockHeight: number;
competingTxs: null | string[];
extraInfo: string;
merklePath: string;
timestamp: string;
txid: string;
txStatus: string;
}
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: AuthId
```ts
export interface AuthId {
identityKey: string;
userId?: number;
isActive?: boolean;
}
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: AuthPayload
AuthMethodInteractor
A base interface/class for client-side logic to interact with a server
for a specific Auth Method's flow (start, complete).
```ts
export interface AuthPayload {
[key: string]: any;
}
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: BaseBlockHeader
These are fields of 80 byte serialized header in order whose double sha256 hash is a block's hash value
and the next block's previousHash value.
All block hash values and merkleRoot values are 32 byte hex string values with the byte order reversed from the serialized byte order.
```ts
export interface BaseBlockHeader {
version: number;
previousHash: string;
merkleRoot: string;
time: number;
bits: number;
nonce: number;
}
```
###### Property bits
Block header bits value. Serialized length is 4 bytes.
```ts
bits: number
```
###### Property merkleRoot
Root hash of the merkle tree of all transactions in this block. Serialized length is 32 bytes.
```ts
merkleRoot: string
```
###### Property nonce
Block header nonce value. Serialized length is 4 bytes.
```ts
nonce: number
```
###### Property previousHash
Hash of previous block's block header. Serialized length is 32 bytes.
```ts
previousHash: string
```
###### Property time
Block header time value. Serialized length is 4 bytes.
```ts
time: number
```
###### Property version
Block header version value. Serialized length is 4 bytes.
```ts
version: number
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: BaseBlockHeader
These are fields of 80 byte serialized header in order whose double sha256 hash is a block's hash value
and the next block's previousHash value.
All block hash values and merkleRoot values are 32 byte hex string values with the byte order reversed from the serialized byte order.
```ts
export interface BaseBlockHeader {
version: number;
previousHash: string;
merkleRoot: string;
time: number;
bits: number;
nonce: number;
}
```
###### Property bits
Block header bits value. Serialized length is 4 bytes.
```ts
bits: number
```
###### Property merkleRoot
Root hash of the merkle tree of all transactions in this block. Serialized length is 32 bytes.
```ts
merkleRoot: string
```
###### Property nonce
Block header nonce value. Serialized length is 4 bytes.
```ts
nonce: number
```
###### Property previousHash
Hash of previous block's block header. Serialized length is 32 bytes.
```ts
previousHash: string
```
###### Property time
Block header time value. Serialized length is 4 bytes.
```ts
time: number
```
###### Property version
Block header version value. Serialized length is 4 bytes.
```ts
version: number
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: BitailsConfig
```ts
export interface BitailsConfig {
apiKey?: string;
httpClient?: HttpClient;
}
```
###### Property apiKey
Authentication token for BitTails API
```ts
apiKey?: string
```
###### Property httpClient
The HTTP client used to make requests to the API.
```ts
httpClient?: HttpClient
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: BitailsMerkleProof
```ts
export interface BitailsMerkleProof {
index: number;
txOrId: string;
target: string;
nodes: string[];
}
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: BlockHeader
A `BaseBlockHeader` extended with its computed hash and height in its chain.
```ts
export interface BlockHeader extends BaseBlockHeader {
height: number;
hash: string;
}
```
See also: [BaseBlockHeader](./services.md#interface-baseblockheader)
###### Property hash
The double sha256 hash of the serialized `BaseBlockHeader` fields.
```ts
hash: string
```
###### Property height
Height of the header, starting from zero.
```ts
height: number
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: BlockHeader
A `BaseBlockHeader` extended with its computed hash and height in its chain.
```ts
export interface BlockHeader extends BaseBlockHeader {
height: number;
hash: string;
}
```
See also: [BaseBlockHeader](./services.md#interface-baseblockheader)
###### Property hash
The double sha256 hash of the serialized `BaseBlockHeader` fields.
```ts
hash: string
```
###### Property height
Height of the header, starting from zero.
```ts
height: number
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: BsvExchangeRate
```ts
export interface BsvExchangeRate {
timestamp: Date;
base: "USD";
rate: number;
}
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: CertOpsWallet
```ts
export interface CertOpsWallet {
getPublicKey(args: GetPublicKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<GetPublicKeyResult>;
encrypt(args: WalletEncryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<WalletEncryptResult>;
decrypt(args: WalletDecryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<WalletDecryptResult>;
}
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: Certifier
```ts
export interface Certifier {
name: string;
description: string;
identityKey: PubKeyHex;
trust: number;
iconUrl?: string;
baseURL?: string;
}
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: CommitNewTxResults
```ts
export interface CommitNewTxResults {
req: EntityProvenTxReq;
log?: string;
}
```
See also: [EntityProvenTxReq](./storage.md#class-entityproventxreq)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: CompleteAuthResponse
```ts
export interface CompleteAuthResponse {
success: boolean;
message?: string;
presentationKey?: string;
}
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: CreateActionResultX
```ts
export interface CreateActionResultX extends CreateActionResult {
txid?: TXIDHexString;
tx?: AtomicBEEF;
noSendChange?: OutpointString[];
sendWithResults?: SendWithResult[];
signableTransaction?: SignableTransaction;
notDelayedResults?: ReviewActionResult[];
}
```
See also: [ReviewActionResult](./client.md#interface-reviewactionresult)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: EntitySyncMap
```ts
export interface EntitySyncMap {
entityName: string;
idMap: Record<number, number>;
maxUpdated_at?: Date;
count: number;
}
```
###### Property count
The cummulative count of items of this entity type received over all the `SyncChunk`s
since the `since` was last updated.
This is the `offset` value to use for the next SyncChunk request.
```ts
count: number
```
###### Property idMap
Maps foreign ids to local ids
Some entities don't have idMaps (CertificateField, TxLabelMap and OutputTagMap)
```ts
idMap: Record<number, number>
```
###### Property maxUpdated_at
the maximum updated_at value seen for this entity over chunks received
during this udpate cycle.
```ts
maxUpdated_at?: Date
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: EntityTimeStamp
```ts
export interface EntityTimeStamp {
created_at: Date;
updated_at: Date;
}
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: ExchangeRatesIoApi
```ts
export interface ExchangeRatesIoApi {
success: boolean;
timestamp: number;
base: "EUR" | "USD";
date: string;
rates: Record<string, number>;
}
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: ExtendedVerifiableCertificate
```ts
export interface ExtendedVerifiableCertificate extends IdentityCertificate {
certifierInfo: IdentityCertifier;
publiclyRevealedKeyring: Record<string, Base64String>;
}
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: FiatExchangeRates
```ts
export interface FiatExchangeRates {
timestamp: Date;
base: "USD";
rates: Record<string, number>;
}
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: FindCertificateFieldsArgs
```ts
export interface FindCertificateFieldsArgs extends FindSincePagedArgs {
partial: Partial<TableCertificateField>;
}
```
See also: [FindSincePagedArgs](./client.md#interface-findsincepagedargs), [TableCertificateField](./storage.md#interface-tablecertificatefield)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: FindCertificatesArgs
```ts
export interface FindCertificatesArgs extends FindSincePagedArgs {
partial: Partial<TableCertificate>;
certifiers?: string[];
types?: string[];
includeFields?: boolean;
}
```
See also: [FindSincePagedArgs](./client.md#interface-findsincepagedargs), [TableCertificate](./storage.md#interface-tablecertificate)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: FindCommissionsArgs
```ts
export interface FindCommissionsArgs extends FindSincePagedArgs {
partial: Partial<TableCommission>;
}
```
See also: [FindSincePagedArgs](./client.md#interface-findsincepagedargs), [TableCommission](./storage.md#interface-tablecommission)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: FindForUserSincePagedArgs
```ts
export interface FindForUserSincePagedArgs extends FindSincePagedArgs {
userId: number;
}
```
See also: [FindSincePagedArgs](./client.md#interface-findsincepagedargs)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: FindMonitorEventsArgs
```ts
export interface FindMonitorEventsArgs extends FindSincePagedArgs {
partial: Partial<TableMonitorEvent>;
}
```
See also: [FindSincePagedArgs](./client.md#interface-findsincepagedargs), [TableMonitorEvent](./storage.md#interface-tablemonitorevent)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: FindOutputBasketsArgs
```ts
export interface FindOutputBasketsArgs extends FindSincePagedArgs {
partial: Partial<TableOutputBasket>;
}
```
See also: [FindSincePagedArgs](./client.md#interface-findsincepagedargs), [TableOutputBasket](./storage.md#interface-tableoutputbasket)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: FindOutputTagMapsArgs
```ts
export interface FindOutputTagMapsArgs extends FindSincePagedArgs {
partial: Partial<TableOutputTagMap>;
tagIds?: number[];
}
```
See also: [FindSincePagedArgs](./client.md#interface-findsincepagedargs), [TableOutputTagMap](./storage.md#interface-tableoutputtagmap)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: FindOutputTagsArgs
```ts
export interface FindOutputTagsArgs extends FindSincePagedArgs {
partial: Partial<TableOutputTag>;
}
```
See also: [FindSincePagedArgs](./client.md#interface-findsincepagedargs), [TableOutputTag](./storage.md#interface-tableoutputtag)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: FindOutputsArgs
```ts
export interface FindOutputsArgs extends FindSincePagedArgs {
partial: Partial<TableOutput>;
noScript?: boolean;
txStatus?: TransactionStatus[];
}
```
See also: [FindSincePagedArgs](./client.md#interface-findsincepagedargs), [TableOutput](./storage.md#interface-tableoutput), [TransactionStatus](./client.md#type-transactionstatus)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: FindPartialSincePagedArgs
```ts
export interface FindPartialSincePagedArgs<T extends object> extends FindSincePagedArgs {
partial: Partial<T>;
}
```
See also: [FindSincePagedArgs](./client.md#interface-findsincepagedargs)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: FindProvenTxReqsArgs
```ts
export interface FindProvenTxReqsArgs extends FindSincePagedArgs {
partial: Partial<TableProvenTxReq>;
status?: ProvenTxReqStatus[];
txids?: string[];
}
```
See also: [FindSincePagedArgs](./client.md#interface-findsincepagedargs), [ProvenTxReqStatus](./client.md#type-proventxreqstatus), [TableProvenTxReq](./storage.md#interface-tableproventxreq)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: FindProvenTxsArgs
```ts
export interface FindProvenTxsArgs extends FindSincePagedArgs {
partial: Partial<TableProvenTx>;
}
```
See also: [FindSincePagedArgs](./client.md#interface-findsincepagedargs), [TableProvenTx](./storage.md#interface-tableproventx)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: FindSincePagedArgs
```ts
export interface FindSincePagedArgs {
since?: Date;
paged?: Paged;
trx?: TrxToken;
orderDescending?: boolean;
}
```
See also: [Paged](./client.md#interface-paged), [TrxToken](./client.md#interface-trxtoken)
###### Property orderDescending
Support for orderDescending is implemented in StorageKnex for basic table find methods,
excluding certificate_fields table, map tables, and settings (singleton row table).
```ts
orderDescending?: boolean
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: FindSyncStatesArgs
```ts
export interface FindSyncStatesArgs extends FindSincePagedArgs {
partial: Partial<TableSyncState>;
}
```
See also: [FindSincePagedArgs](./client.md#interface-findsincepagedargs), [TableSyncState](./storage.md#interface-tablesyncstate)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: FindTransactionsArgs
```ts
export interface FindTransactionsArgs extends FindSincePagedArgs {
partial: Partial<TableTransaction>;
status?: TransactionStatus[];
noRawTx?: boolean;
}
```
See also: [FindSincePagedArgs](./client.md#interface-findsincepagedargs), [TableTransaction](./storage.md#interface-tabletransaction), [TransactionStatus](./client.md#type-transactionstatus)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: FindTxLabelMapsArgs
```ts
export interface FindTxLabelMapsArgs extends FindSincePagedArgs {
partial: Partial<TableTxLabelMap>;
labelIds?: number[];
}
```
See also: [FindSincePagedArgs](./client.md#interface-findsincepagedargs), [TableTxLabelMap](./storage.md#interface-tabletxlabelmap)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: FindTxLabelsArgs
```ts
export interface FindTxLabelsArgs extends FindSincePagedArgs {
partial: Partial<TableTxLabel>;
}
```
See also: [FindSincePagedArgs](./client.md#interface-findsincepagedargs), [TableTxLabel](./storage.md#interface-tabletxlabel)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: FindUsersArgs
```ts
export interface FindUsersArgs extends FindSincePagedArgs {
partial: Partial<TableUser>;
}
```
See also: [FindSincePagedArgs](./client.md#interface-findsincepagedargs), [TableUser](./storage.md#interface-tableuser)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: GenerateChangeSdkChangeInput
```ts
export interface GenerateChangeSdkChangeInput {
outputId: number;
satoshis: number;
}
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: GenerateChangeSdkChangeOutput
```ts
export interface GenerateChangeSdkChangeOutput {
satoshis: number;
lockingScriptLength: number;
}
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: GenerateChangeSdkInput
```ts
export interface GenerateChangeSdkInput {
satoshis: number;
unlockingScriptLength: number;
}
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: GenerateChangeSdkOutput
```ts
export interface GenerateChangeSdkOutput {
satoshis: number;
lockingScriptLength: number;
}
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: GenerateChangeSdkParams
```ts
export interface GenerateChangeSdkParams {
fixedInputs: GenerateChangeSdkInput[];
fixedOutputs: GenerateChangeSdkOutput[];
feeModel: sdk.StorageFeeModel;
targetNetCount?: number;
changeInitialSatoshis: number;
changeFirstSatoshis: number;
changeLockingScriptLength: number;
changeUnlockingScriptLength: number;
randomVals?: number[];
noLogging?: boolean;
log?: string;
}
```
See also: [GenerateChangeSdkInput](./storage.md#interface-generatechangesdkinput), [GenerateChangeSdkOutput](./storage.md#interface-generatechangesdkoutput), [StorageFeeModel](./client.md#interface-storagefeemodel)
###### Property changeFirstSatoshis
Lowest amount value to assign to a change output.
Drop the output if unable to satisfy.
default 285
```ts
changeFirstSatoshis: number
```
###### Property changeInitialSatoshis
Satoshi amount to initialize optional new change outputs.
```ts
changeInitialSatoshis: number
```
###### Property changeLockingScriptLength
Fixed change locking script length.
For P2PKH template, 25 bytes
```ts
changeLockingScriptLength: number
```
###### Property changeUnlockingScriptLength
Fixed change unlocking script length.
For P2PKH template, 107 bytes
```ts
changeUnlockingScriptLength: number
```
###### Property targetNetCount
Target for number of new change outputs added minus number of funding change outputs consumed.
If undefined, only a single change output will be added if excess fees must be recaptured.
```ts
targetNetCount?: number
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: GenerateChangeSdkResult
```ts
export interface GenerateChangeSdkResult {
allocatedChangeInputs: GenerateChangeSdkChangeInput[];
changeOutputs: GenerateChangeSdkChangeOutput[];
size: number;
fee: number;
satsPerKb: number;
maxPossibleSatoshisAdjustment?: {
fixedOutputIndex: number;
satoshis: number;
};
}
```
See also: [GenerateChangeSdkChangeInput](./storage.md#interface-generatechangesdkchangeinput), [GenerateChangeSdkChangeOutput](./storage.md#interface-generatechangesdkchangeoutput)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: GenerateChangeSdkStorageChange
```ts
export interface GenerateChangeSdkStorageChange extends GenerateChangeSdkChangeInput {
spendable: boolean;
}
```
See also: [GenerateChangeSdkChangeInput](./storage.md#interface-generatechangesdkchangeinput)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: GetMerklePathResult
Properties on result returned from `WalletServices` function `getMerkleProof`.
```ts
export interface GetMerklePathResult {
name?: string;
merklePath?: MerklePath;
header?: BlockHeader;
error?: WalletError;
notes?: ReqHistoryNote[];
}
```
See also: [BlockHeader](./services.md#interface-blockheader), [ReqHistoryNote](./client.md#type-reqhistorynote), [WalletError](./client.md#class-walleterror)
###### Property error
The first exception error that occurred during processing, if any.
```ts
error?: WalletError
```
See also: [WalletError](./client.md#class-walleterror)
###### Property merklePath
Multiple proofs may be returned when a transaction also appears in
one or more orphaned blocks
```ts
merklePath?: MerklePath
```
###### Property name
The name of the service returning the proof, or undefined if no proof
```ts
name?: string
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: GetRawTxResult
Properties on result returned from `WalletServices` function `getRawTx`.
```ts
export interface GetRawTxResult {
txid: string;
name?: string;
rawTx?: number[];
error?: WalletError;
}
```
See also: [WalletError](./client.md#class-walleterror)
###### Property error
The first exception error that occurred during processing, if any.
```ts
error?: WalletError
```
See also: [WalletError](./client.md#class-walleterror)
###### Property name
The name of the service returning the rawTx, or undefined if no rawTx
```ts
name?: string
```
###### Property rawTx
Multiple proofs may be returned when a transaction also appears in
one or more orphaned blocks
```ts
rawTx?: number[]
```
###### Property txid
Transaction hash or rawTx (and of initial request)
```ts
txid: string
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: GetReqsAndBeefDetail
```ts
export interface GetReqsAndBeefDetail {
txid: string;
req?: TableProvenTxReq;
proven?: TableProvenTx;
status: "readyToSend" | "alreadySent" | "error" | "unknown";
error?: string;
}
```
See also: [TableProvenTx](./storage.md#interface-tableproventx), [TableProvenTxReq](./storage.md#interface-tableproventxreq)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: GetReqsAndBeefResult
```ts
export interface GetReqsAndBeefResult {
beef: Beef;
details: GetReqsAndBeefDetail[];
}
```
See also: [GetReqsAndBeefDetail](./storage.md#interface-getreqsandbeefdetail)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: GetScriptHashHistory
```ts
export interface GetScriptHashHistory {
txid: string;
height?: number;
}
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: GetScriptHashHistoryResult
```ts
export interface GetScriptHashHistoryResult {
name: string;
status: "success" | "error";
error?: WalletError;
history: GetScriptHashHistory[];
}
```
See also: [GetScriptHashHistory](./client.md#interface-getscripthashhistory), [WalletError](./client.md#class-walleterror)
###### Property error
When status is 'error', provides code and description
```ts
error?: WalletError
```
See also: [WalletError](./client.md#class-walleterror)
###### Property history
Transaction txid (and height if mined) that consumes the script hash. May not be a complete history.
```ts
history: GetScriptHashHistory[]
```
See also: [GetScriptHashHistory](./client.md#interface-getscripthashhistory)
###### Property name
The name of the service to which the transaction was submitted for processing
```ts
name: string
```
###### Property status
'success' - the operation was successful, non-error results are valid.
'error' - the operation failed, error may have relevant information.
```ts
status: "success" | "error"
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: GetStatusForTxidsResult
```ts
export interface GetStatusForTxidsResult {
name: string;
status: "success" | "error";
error?: WalletError;
results: StatusForTxidResult[];
}
```
See also: [StatusForTxidResult](./client.md#interface-statusfortxidresult), [WalletError](./client.md#class-walleterror)
###### Property error
The first exception error that occurred during processing, if any.
```ts
error?: WalletError
```
See also: [WalletError](./client.md#class-walleterror)
###### Property name
The name of the service returning these results.
```ts
name: string
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: GetUtxoStatusDetails
```ts
export interface GetUtxoStatusDetails {
height?: number;
txid?: string;
index?: number;
satoshis?: number;
}
```
###### Property height
if isUtxo, the block height containing the matching unspent transaction output
typically there will be only one, but future orphans can result in multiple values
```ts
height?: number
```
###### Property index
if isUtxo, the output index in the transaction containing of the matching unspent transaction output
typically there will be only one, but future orphans can result in multiple values
```ts
index?: number
```
###### Property satoshis
if isUtxo, the amount of the matching unspent transaction output
typically there will be only one, but future orphans can result in multiple values
```ts
satoshis?: number
```
###### Property txid
if isUtxo, the transaction hash (txid) of the transaction containing the matching unspent transaction output
typically there will be only one, but future orphans can result in multiple values
```ts
txid?: string
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: GetUtxoStatusResult
```ts
export interface GetUtxoStatusResult {
name: string;
status: "success" | "error";
error?: WalletError;
isUtxo?: boolean;
details: GetUtxoStatusDetails[];
}
```
See also: [GetUtxoStatusDetails](./client.md#interface-getutxostatusdetails), [WalletError](./client.md#class-walleterror)
###### Property details
Additional details about occurances of this output script as a utxo.
Normally there will be one item in the array but due to the possibility of orphan races
there could be more than one block in which it is a valid utxo.
```ts
details: GetUtxoStatusDetails[]
```
See also: [GetUtxoStatusDetails](./client.md#interface-getutxostatusdetails)
###### Property error
When status is 'error', provides code and description
```ts
error?: WalletError
```
See also: [WalletError](./client.md#class-walleterror)
###### Property isUtxo
true if the output is associated with at least one unspent transaction output
```ts
isUtxo?: boolean
```
###### Property name
The name of the service to which the transaction was submitted for processing
```ts
name: string
```
###### Property status
'success' - the operation was successful, non-error results are valid.
'error' - the operation failed, error may have relevant information.
```ts
status: "success" | "error"
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: GroupedPermissionRequest
The object passed to the UI when a grouped permission is requested.
```ts
export interface GroupedPermissionRequest {
originator: string;
requestID: string;
permissions: GroupedPermissions;
}
```
See also: [GroupedPermissions](./client.md#interface-groupedpermissions)
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: GroupedPermissions
Describes a group of permissions that can be requested together.
This structure is based on BRC-73.
```ts
export interface GroupedPermissions {
description?: string;
spendingAuthorization?: {
amount: number;
description: string;
};
protocolPermissions?: Array<{
protocolID: WalletProtocol;
counterparty?: string;
description: string;
}>;
basketAccess?: Array<{
basket: string;
description: string;
}>;
certificateAccess?: Array<{
type: string;
fields: string[];
verifierPublicKey: string;
description: string;
}>;
}
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: KeyPair
```ts
export interface KeyPair {
privateKey: string;
publicKey: string;
}
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: KeyPairAddress
```ts
export interface KeyPairAddress {
privateKey: PrivateKey;
publicKey: PublicKey;
address: string;
}
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: ListActionsSpecOp
```ts
export interface ListActionsSpecOp {
name: string;
labelsToIntercept?: string[];
setStatusFilter?: () => sdk.TransactionStatus[];
postProcess?: (s: StorageProvider, auth: sdk.AuthId, vargs: sdk.ValidListActionsArgs, specOpLabels: string[], txs: Partial<TableTransaction>[]) => Promise<void>;
}
```
See also: [AuthId](./client.md#interface-authid), [StorageProvider](./storage.md#class-storageprovider), [TableTransaction](./storage.md#interface-tabletransaction), [TransactionStatus](./client.md#type-transactionstatus), [ValidListActionsArgs](./client.md#interface-validlistactionsargs)
###### Property labelsToIntercept
undefined to intercept no labels from vargs,
empty array to intercept all labels,
or an explicit array of labels to intercept.
```ts
labelsToIntercept?: string[]
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: ListOutputsSpecOp
```ts
export interface ListOutputsSpecOp {
name: string;
useBasket?: string;
ignoreLimit?: boolean;
includeOutputScripts?: boolean;
includeSpent?: boolean;
resultFromTags?: (s: StorageProvider, auth: sdk.AuthId, vargs: ValidListOutputsArgs, specOpTags: string[]) => Promise<ListOutputsResult>;
resultFromOutputs?: (s: StorageProvider, auth: sdk.AuthId, vargs: ValidListOutputsArgs, specOpTags: string[], outputs: TableOutput[]) => Promise<ListOutputsResult>;
filterOutputs?: (s: StorageProvider, auth: sdk.AuthId, vargs: ValidListOutputsArgs, specOpTags: string[], outputs: TableOutput[]) => Promise<TableOutput[]>;
tagsToIntercept?: string[];
tagsParamsCount?: number;
}
```
See also: [AuthId](./client.md#interface-authid), [StorageProvider](./storage.md#class-storageprovider), [TableOutput](./storage.md#interface-tableoutput), [ValidListOutputsArgs](./client.md#interface-validlistoutputsargs)
###### Property tagsParamsCount
How many positional tags to intercept.
```ts
tagsParamsCount?: number
```
###### Property tagsToIntercept
undefined to intercept no tags from vargs,
empty array to intercept all tags,
or an explicit array of tags to intercept.
```ts
tagsToIntercept?: string[]
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
---
##### Interface: LiveBlockHeader
The "live" portion of the block chain is recent history that can conceivably be subject to reorganizations.
The additional fields support tracking orphan blocks, chain forks, and chain reorgs.
```ts
export interface LiveBlockHeader extends BlockHeader {
chainWork: string;
isChainTip: boolean;
isActive: boolean;
headerId: number;
previousHeaderId: number | null;
}
```
See also: [BlockHeader](./services.md#interface-blockheader)
###### Property chainWork
The cummulative chainwork achieved by the addition of this block to the chain.
Chainwork only matters in selecting the active chain.
```ts
chainWork: string
```
###### Property headerId
As there may be more than one header with identical height values due to orphan tracking,
headers are assigned a unique headerId while part of the "live" portion of the block chain.
```ts
headerId: number
```
###### Property isActive
True only if this header is currently on the active chain.
```ts
isActive: boolean
```
###### Property isChainTip
True only if this header is currently a chain tip. e.g. There is no header that follows it by previousHash or previousHeaderId.
```ts
isChainTip: boolean
```
###### Property previousHeaderId
Every header in the "live" portion of the block chain is linked to an ancestor header through
both its previousHash and previousHeaderId properties.
Due to forks, there may be multiple headers with identical `previousHash` and `previousHeaderId` values.
Of these, only one (the header on the active chain) will have `isActive` === true.
```ts
previousHeaderId: number | null
```
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Fu