ts-sdk

API

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables

Interfaces

     
AbortActionArgs GetVersionResult SendWithResult
AbortActionResult IdentityCertificate SignActionArgs
AcquireCertificateArgs IdentityCertifier SignActionOptions
AuthenticatedResult InternalizeActionArgs SignActionResult
BasketInsertion InternalizeActionResult SignActionSpend
CertificateResult InternalizeOutput SignableTransaction
CreateActionArgs KeyDeriverApi VerifyHmacArgs
CreateActionInput KeyLinkageResult VerifyHmacResult
CreateActionOptions ListActionsArgs VerifySignatureArgs
CreateActionOutput ListActionsResult VerifySignatureResult
CreateActionResult ListCertificatesArgs WalletAction
CreateHmacArgs ListCertificatesResult WalletActionInput
CreateHmacResult ListOutputsArgs WalletActionOutput
CreateSignatureArgs ListOutputsResult WalletCertificate
CreateSignatureResult ProveCertificateArgs WalletDecryptArgs
DiscoverByAttributesArgs ProveCertificateResult WalletDecryptResult
DiscoverByIdentityKeyArgs RelinquishCertificateArgs WalletEncryptArgs
DiscoverCertificatesResult RelinquishCertificateResult WalletEncryptResult
GetHeaderArgs RelinquishOutputArgs WalletEncryptionArgs
GetHeaderResult RelinquishOutputResult WalletErrorObject
GetHeightResult RevealCounterpartyKeyLinkageArgs WalletInterface
GetNetworkResult RevealCounterpartyKeyLinkageResult WalletOutput
GetPublicKeyArgs RevealSpecificKeyLinkageArgs WalletPayment
GetPublicKeyResult RevealSpecificKeyLinkageResult WalletWire

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: AbortActionArgs

export interface AbortActionArgs {
    reference: Base64String;
}

See also: Base64String

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: AbortActionResult

export interface AbortActionResult {
    aborted: true;
}

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: AcquireCertificateArgs

export interface AcquireCertificateArgs {
    type: Base64String;
    certifier: PubKeyHex;
    acquisitionProtocol: AcquisitionProtocol;
    fields: Record<CertificateFieldNameUnder50Bytes, string>;
    serialNumber?: Base64String;
    revocationOutpoint?: OutpointString;
    signature?: HexString;
    certifierUrl?: string;
    keyringRevealer?: KeyringRevealer;
    keyringForSubject?: Record<CertificateFieldNameUnder50Bytes, Base64String>;
    privileged?: BooleanDefaultFalse;
    privilegedReason?: DescriptionString5to50Bytes;
}

See also: AcquisitionProtocol, Base64String, BooleanDefaultFalse, CertificateFieldNameUnder50Bytes, DescriptionString5to50Bytes, HexString, KeyringRevealer, OutpointString, PubKeyHex

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: AuthenticatedResult

export interface AuthenticatedResult {
    authenticated: true;
}

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: BasketInsertion

export interface BasketInsertion {
    basket: BasketStringUnder300Bytes;
    customInstructions?: string;
    tags?: OutputTagStringUnder300Bytes[];
}

See also: BasketStringUnder300Bytes, OutputTagStringUnder300Bytes

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: CertificateResult

export interface CertificateResult extends WalletCertificate {
    keyring?: Record<CertificateFieldNameUnder50Bytes, Base64String>;
    verifier?: string;
}

See also: Base64String, CertificateFieldNameUnder50Bytes, WalletCertificate

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: CreateActionArgs

export interface CreateActionArgs {
    description: DescriptionString5to50Bytes;
    inputBEEF?: BEEF;
    inputs?: CreateActionInput[];
    outputs?: CreateActionOutput[];
    lockTime?: PositiveIntegerOrZero;
    version?: PositiveIntegerOrZero;
    labels?: LabelStringUnder300Bytes[];
    options?: CreateActionOptions;
}

See also: BEEF, CreateActionInput, CreateActionOptions, CreateActionOutput, DescriptionString5to50Bytes, LabelStringUnder300Bytes, PositiveIntegerOrZero

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: CreateActionInput

export interface CreateActionInput {
    outpoint: OutpointString;
    inputDescription: DescriptionString5to50Bytes;
    unlockingScript?: HexString;
    unlockingScriptLength?: PositiveInteger;
    sequenceNumber?: PositiveIntegerOrZero;
}

See also: DescriptionString5to50Bytes, HexString, OutpointString, PositiveInteger, PositiveIntegerOrZero

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: CreateActionOptions

export interface CreateActionOptions {
    signAndProcess?: BooleanDefaultTrue;
    acceptDelayedBroadcast?: BooleanDefaultTrue;
    trustSelf?: TrustSelf;
    knownTxids?: TXIDHexString[];
    returnTXIDOnly?: BooleanDefaultFalse;
    noSend?: BooleanDefaultFalse;
    noSendChange?: OutpointString[];
    sendWith?: TXIDHexString[];
    randomizeOutputs?: BooleanDefaultTrue;
}

See also: BooleanDefaultFalse, BooleanDefaultTrue, OutpointString, TXIDHexString, TrustSelf

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: CreateActionOutput

export interface CreateActionOutput {
    lockingScript: HexString;
    satoshis: SatoshiValue;
    outputDescription: DescriptionString5to50Bytes;
    basket?: BasketStringUnder300Bytes;
    customInstructions?: string;
    tags?: OutputTagStringUnder300Bytes[];
}

See also: BasketStringUnder300Bytes, DescriptionString5to50Bytes, HexString, OutputTagStringUnder300Bytes, SatoshiValue

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: CreateActionResult

export interface CreateActionResult {
    txid?: TXIDHexString;
    tx?: AtomicBEEF;
    noSendChange?: OutpointString[];
    sendWithResults?: SendWithResult[];
    signableTransaction?: SignableTransaction;
}

See also: AtomicBEEF, OutpointString, SendWithResult, SignableTransaction, TXIDHexString

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: CreateHmacArgs

export interface CreateHmacArgs extends WalletEncryptionArgs {
    data: Byte[];
}

See also: Byte, WalletEncryptionArgs

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: CreateHmacResult

export interface CreateHmacResult {
    hmac: Byte[];
}

See also: Byte

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: CreateSignatureArgs

export interface CreateSignatureArgs extends WalletEncryptionArgs {
    data?: Byte[];
    hashToDirectlySign?: Byte[];
}

See also: Byte, WalletEncryptionArgs

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: CreateSignatureResult

export interface CreateSignatureResult {
    signature: Byte[];
}

See also: Byte

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: DiscoverByAttributesArgs

export interface DiscoverByAttributesArgs {
    attributes: Record<CertificateFieldNameUnder50Bytes, string>;
    limit?: PositiveIntegerDefault10Max10000;
    offset?: PositiveIntegerOrZero;
    seekPermission?: BooleanDefaultTrue;
}

See also: BooleanDefaultTrue, CertificateFieldNameUnder50Bytes, PositiveIntegerDefault10Max10000, PositiveIntegerOrZero

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: DiscoverByIdentityKeyArgs

export interface DiscoverByIdentityKeyArgs {
    identityKey: PubKeyHex;
    limit?: PositiveIntegerDefault10Max10000;
    offset?: PositiveIntegerOrZero;
    seekPermission?: BooleanDefaultTrue;
}

See also: BooleanDefaultTrue, PositiveIntegerDefault10Max10000, PositiveIntegerOrZero, PubKeyHex

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: DiscoverCertificatesResult

export interface DiscoverCertificatesResult {
    totalCertificates: PositiveIntegerOrZero;
    certificates: IdentityCertificate[];
}

See also: IdentityCertificate, PositiveIntegerOrZero

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: GetHeaderArgs

export interface GetHeaderArgs {
    height: PositiveInteger;
}

See also: PositiveInteger

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: GetHeaderResult

export interface GetHeaderResult {
    header: HexString;
}

See also: HexString

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: GetHeightResult

export interface GetHeightResult {
    height: PositiveInteger;
}

See also: PositiveInteger

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: GetNetworkResult

export interface GetNetworkResult {
    network: WalletNetwork;
}

See also: WalletNetwork

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: GetPublicKeyArgs

When identityKey is true, WalletEncryptionArgs are not used.

When identityKey is undefined, WalletEncryptionArgs are required.

export interface GetPublicKeyArgs extends Partial<WalletEncryptionArgs> {
    identityKey?: true;
    forSelf?: BooleanDefaultFalse;
}

See also: BooleanDefaultFalse, WalletEncryptionArgs

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: GetPublicKeyResult

export interface GetPublicKeyResult {
    publicKey: PubKeyHex;
}

See also: PubKeyHex

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: GetVersionResult

export interface GetVersionResult {
    version: VersionString7To30Bytes;
}

See also: VersionString7To30Bytes

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: IdentityCertificate

export interface IdentityCertificate extends WalletCertificate {
    certifierInfo: IdentityCertifier;
    publiclyRevealedKeyring: Record<CertificateFieldNameUnder50Bytes, Base64String>;
    decryptedFields: Record<CertificateFieldNameUnder50Bytes, string>;
}

See also: Base64String, CertificateFieldNameUnder50Bytes, IdentityCertifier, WalletCertificate

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: IdentityCertifier

export interface IdentityCertifier {
    name: EntityNameStringMax100Bytes;
    iconUrl: EntityIconURLStringMax500Bytes;
    description: DescriptionString5to50Bytes;
    trust: PositiveIntegerMax10;
}

See also: DescriptionString5to50Bytes, EntityIconURLStringMax500Bytes, EntityNameStringMax100Bytes, PositiveIntegerMax10

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: InternalizeActionArgs

export interface InternalizeActionArgs {
    tx: AtomicBEEF;
    outputs: InternalizeOutput[];
    description: DescriptionString5to50Bytes;
    labels?: LabelStringUnder300Bytes[];
    seekPermission?: BooleanDefaultTrue;
}

See also: AtomicBEEF, BooleanDefaultTrue, DescriptionString5to50Bytes, InternalizeOutput, LabelStringUnder300Bytes

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: InternalizeActionResult

export interface InternalizeActionResult {
    accepted: true;
}

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: InternalizeOutput

export interface InternalizeOutput {
    outputIndex: PositiveIntegerOrZero;
    protocol: "wallet payment" | "basket insertion";
    paymentRemittance?: WalletPayment;
    insertionRemittance?: BasketInsertion;
}

See also: BasketInsertion, PositiveIntegerOrZero, WalletPayment

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: KeyDeriverApi

export interface KeyDeriverApi {
    rootKey: PrivateKey;
    identityKey: string;
    derivePublicKey: (protocolID: WalletProtocol, keyID: string, counterparty: Counterparty, forSelf?: boolean) => PublicKey;
    derivePrivateKey: (protocolID: WalletProtocol, keyID: string, counterparty: Counterparty) => PrivateKey;
    deriveSymmetricKey: (protocolID: WalletProtocol, keyID: string, counterparty: Counterparty) => SymmetricKey;
    revealCounterpartySecret: (counterparty: Counterparty) => number[];
    revealSpecificSecret: (counterparty: Counterparty, protocolID: WalletProtocol, keyID: string) => number[];
}

See also: Counterparty, PrivateKey, PublicKey, SymmetricKey, WalletProtocol

Property derivePrivateKey

Derives a private key based on protocol ID, key ID, and counterparty.

derivePrivateKey: (protocolID: WalletProtocol, keyID: string, counterparty: Counterparty) => PrivateKey

See also: Counterparty, PrivateKey, WalletProtocol

Property derivePublicKey

Derives a public key based on protocol ID, key ID, and counterparty.

derivePublicKey: (protocolID: WalletProtocol, keyID: string, counterparty: Counterparty, forSelf?: boolean) => PublicKey

See also: Counterparty, PublicKey, WalletProtocol

Property deriveSymmetricKey

Derives a symmetric key based on protocol ID, key ID, and counterparty. Note: Symmetric keys should not be derivable by everyone due to security risks.

deriveSymmetricKey: (protocolID: WalletProtocol, keyID: string, counterparty: Counterparty) => SymmetricKey

See also: Counterparty, SymmetricKey, WalletProtocol

Property identityKey

The identity of this key deriver which is normally the public key associated with the rootKey

identityKey: string

Property revealCounterpartySecret

Reveals the shared secret between the root key and the counterparty. Note: This should not be used for ‘self’.

revealCounterpartySecret: (counterparty: Counterparty) => number[]

See also: Counterparty

Property revealSpecificSecret

Reveals the specific key association for a given protocol ID, key ID, and counterparty.

revealSpecificSecret: (counterparty: Counterparty, protocolID: WalletProtocol, keyID: string) => number[]

See also: Counterparty, WalletProtocol

Property rootKey

The root key from which all other keys are derived.

rootKey: PrivateKey

See also: PrivateKey

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: KeyLinkageResult

export interface KeyLinkageResult {
    encryptedLinkage: Byte[];
    encryptedLinkageProof: Byte[];
    prover: PubKeyHex;
    verifier: PubKeyHex;
    counterparty: PubKeyHex;
}

See also: Byte, PubKeyHex

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: ListActionsArgs

export interface ListActionsArgs {
    labels: LabelStringUnder300Bytes[];
    labelQueryMode?: "any" | "all";
    includeLabels?: BooleanDefaultFalse;
    includeInputs?: BooleanDefaultFalse;
    includeInputSourceLockingScripts?: BooleanDefaultFalse;
    includeInputUnlockingScripts?: BooleanDefaultFalse;
    includeOutputs?: BooleanDefaultFalse;
    includeOutputLockingScripts?: BooleanDefaultFalse;
    limit?: PositiveIntegerDefault10Max10000;
    offset?: PositiveIntegerOrZero;
    seekPermission?: BooleanDefaultTrue;
}

See also: BooleanDefaultFalse, BooleanDefaultTrue, LabelStringUnder300Bytes, PositiveIntegerDefault10Max10000, PositiveIntegerOrZero

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: ListActionsResult

export interface ListActionsResult {
    totalActions: PositiveIntegerOrZero;
    actions: WalletAction[];
}

See also: PositiveIntegerOrZero, WalletAction

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: ListCertificatesArgs

export interface ListCertificatesArgs {
    certifiers: PubKeyHex[];
    types: Base64String[];
    limit?: PositiveIntegerDefault10Max10000;
    offset?: PositiveIntegerOrZero;
    privileged?: BooleanDefaultFalse;
    privilegedReason?: DescriptionString5to50Bytes;
}

See also: Base64String, BooleanDefaultFalse, DescriptionString5to50Bytes, PositiveIntegerDefault10Max10000, PositiveIntegerOrZero, PubKeyHex

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: ListCertificatesResult

export interface ListCertificatesResult {
    totalCertificates: PositiveIntegerOrZero;
    certificates: CertificateResult[];
}

See also: CertificateResult, PositiveIntegerOrZero

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: ListOutputsArgs

export interface ListOutputsArgs {
    basket: BasketStringUnder300Bytes;
    tags?: OutputTagStringUnder300Bytes[];
    tagQueryMode?: "all" | "any";
    include?: "locking scripts" | "entire transactions";
    includeCustomInstructions?: BooleanDefaultFalse;
    includeTags?: BooleanDefaultFalse;
    includeLabels?: BooleanDefaultFalse;
    limit?: PositiveIntegerDefault10Max10000;
    offset?: PositiveIntegerOrZero;
    seekPermission?: BooleanDefaultTrue;
}

See also: BasketStringUnder300Bytes, BooleanDefaultFalse, BooleanDefaultTrue, OutputTagStringUnder300Bytes, PositiveIntegerDefault10Max10000, PositiveIntegerOrZero

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: ListOutputsResult

export interface ListOutputsResult {
    totalOutputs: PositiveIntegerOrZero;
    BEEF?: BEEF;
    outputs: WalletOutput[];
}

See also: BEEF, PositiveIntegerOrZero, WalletOutput

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: ProveCertificateArgs

export interface ProveCertificateArgs {
    certificate: Partial<WalletCertificate>;
    fieldsToReveal: CertificateFieldNameUnder50Bytes[];
    verifier: PubKeyHex;
    privileged?: BooleanDefaultFalse;
    privilegedReason?: DescriptionString5to50Bytes;
}

See also: BooleanDefaultFalse, CertificateFieldNameUnder50Bytes, DescriptionString5to50Bytes, PubKeyHex, WalletCertificate

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: ProveCertificateResult

export interface ProveCertificateResult {
    keyringForVerifier: Record<CertificateFieldNameUnder50Bytes, Base64String>;
    certificate?: WalletCertificate;
    verifier?: PubKeyHex;
}

See also: Base64String, CertificateFieldNameUnder50Bytes, PubKeyHex, WalletCertificate

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: RelinquishCertificateArgs

export interface RelinquishCertificateArgs {
    type: Base64String;
    serialNumber: Base64String;
    certifier: PubKeyHex;
}

See also: Base64String, PubKeyHex

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: RelinquishCertificateResult

export interface RelinquishCertificateResult {
    relinquished: true;
}

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: RelinquishOutputArgs

export interface RelinquishOutputArgs {
    basket: BasketStringUnder300Bytes;
    output: OutpointString;
}

See also: BasketStringUnder300Bytes, OutpointString

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: RelinquishOutputResult

export interface RelinquishOutputResult {
    relinquished: true;
}

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: RevealCounterpartyKeyLinkageArgs

export interface RevealCounterpartyKeyLinkageArgs {
    counterparty: PubKeyHex;
    verifier: PubKeyHex;
    privileged?: BooleanDefaultFalse;
    privilegedReason?: DescriptionString5to50Bytes;
}

See also: BooleanDefaultFalse, DescriptionString5to50Bytes, PubKeyHex

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: RevealCounterpartyKeyLinkageResult

export interface RevealCounterpartyKeyLinkageResult extends KeyLinkageResult {
    revelationTime: ISOTimestampString;
}

See also: ISOTimestampString, KeyLinkageResult

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: RevealSpecificKeyLinkageArgs

export interface RevealSpecificKeyLinkageArgs {
    counterparty: WalletCounterparty;
    verifier: PubKeyHex;
    protocolID: WalletProtocol;
    keyID: KeyIDStringUnder800Bytes;
    privilegedReason?: DescriptionString5to50Bytes;
    privileged?: BooleanDefaultFalse;
}

See also: BooleanDefaultFalse, DescriptionString5to50Bytes, KeyIDStringUnder800Bytes, PubKeyHex, WalletCounterparty, WalletProtocol

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: RevealSpecificKeyLinkageResult

export interface RevealSpecificKeyLinkageResult extends KeyLinkageResult {
    protocolID: WalletProtocol;
    keyID: KeyIDStringUnder800Bytes;
    proofType: Byte;
}

See also: Byte, KeyIDStringUnder800Bytes, KeyLinkageResult, WalletProtocol

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: SendWithResult

export interface SendWithResult {
    txid: TXIDHexString;
    status: SendWithResultStatus;
}

See also: SendWithResultStatus, TXIDHexString

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: SignActionArgs

export interface SignActionArgs {
    spends: Record<PositiveIntegerOrZero, SignActionSpend>;
    reference: Base64String;
    options?: SignActionOptions;
}

See also: Base64String, PositiveIntegerOrZero, SignActionOptions, SignActionSpend

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: SignActionOptions

export interface SignActionOptions {
    acceptDelayedBroadcast?: BooleanDefaultTrue;
    returnTXIDOnly?: BooleanDefaultFalse;
    noSend?: BooleanDefaultFalse;
    sendWith?: TXIDHexString[];
}

See also: BooleanDefaultFalse, BooleanDefaultTrue, TXIDHexString

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: SignActionResult

export interface SignActionResult {
    txid?: TXIDHexString;
    tx?: AtomicBEEF;
    sendWithResults?: SendWithResult[];
}

See also: AtomicBEEF, SendWithResult, TXIDHexString

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: SignActionSpend

export interface SignActionSpend {
    unlockingScript: HexString;
    sequenceNumber?: PositiveIntegerOrZero;
}

See also: HexString, PositiveIntegerOrZero

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: SignableTransaction

export interface SignableTransaction {
    tx: AtomicBEEF;
    reference: Base64String;
}

See also: AtomicBEEF, Base64String

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: VerifyHmacArgs

export interface VerifyHmacArgs extends WalletEncryptionArgs {
    data: Byte[];
    hmac: Byte[];
}

See also: Byte, WalletEncryptionArgs

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: VerifyHmacResult

export interface VerifyHmacResult {
    valid: true;
}

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: VerifySignatureArgs

export interface VerifySignatureArgs extends WalletEncryptionArgs {
    data?: Byte[];
    hashToDirectlyVerify?: Byte[];
    signature: Byte[];
    forSelf?: BooleanDefaultFalse;
}

See also: BooleanDefaultFalse, Byte, WalletEncryptionArgs

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: VerifySignatureResult

export interface VerifySignatureResult {
    valid: true;
}

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: WalletAction

export interface WalletAction {
    txid: TXIDHexString;
    satoshis: SatoshiValue;
    status: ActionStatus;
    isOutgoing: boolean;
    description: DescriptionString5to50Bytes;
    labels?: LabelStringUnder300Bytes[];
    version: PositiveIntegerOrZero;
    lockTime: PositiveIntegerOrZero;
    inputs?: WalletActionInput[];
    outputs?: WalletActionOutput[];
}

See also: ActionStatus, DescriptionString5to50Bytes, LabelStringUnder300Bytes, PositiveIntegerOrZero, SatoshiValue, TXIDHexString, WalletActionInput, WalletActionOutput

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: WalletActionInput

export interface WalletActionInput {
    sourceOutpoint: OutpointString;
    sourceSatoshis: SatoshiValue;
    sourceLockingScript?: HexString;
    unlockingScript?: HexString;
    inputDescription: DescriptionString5to50Bytes;
    sequenceNumber: PositiveIntegerOrZero;
}

See also: DescriptionString5to50Bytes, HexString, OutpointString, PositiveIntegerOrZero, SatoshiValue

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: WalletActionOutput

export interface WalletActionOutput {
    satoshis: SatoshiValue;
    lockingScript?: HexString;
    spendable: boolean;
    customInstructions?: string;
    tags: OutputTagStringUnder300Bytes[];
    outputIndex: PositiveIntegerOrZero;
    outputDescription: DescriptionString5to50Bytes;
    basket: BasketStringUnder300Bytes;
}

See also: BasketStringUnder300Bytes, DescriptionString5to50Bytes, HexString, OutputTagStringUnder300Bytes, PositiveIntegerOrZero, SatoshiValue

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: WalletCertificate

export interface WalletCertificate {
    type: Base64String;
    subject: PubKeyHex;
    serialNumber: Base64String;
    certifier: PubKeyHex;
    revocationOutpoint: OutpointString;
    signature: HexString;
    fields: Record<CertificateFieldNameUnder50Bytes, string>;
}

See also: Base64String, CertificateFieldNameUnder50Bytes, HexString, OutpointString, PubKeyHex

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: WalletDecryptArgs

export interface WalletDecryptArgs extends WalletEncryptionArgs {
    ciphertext: Byte[];
}

See also: Byte, WalletEncryptionArgs

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: WalletDecryptResult

export interface WalletDecryptResult {
    plaintext: Byte[];
}

See also: Byte

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: WalletEncryptArgs

export interface WalletEncryptArgs extends WalletEncryptionArgs {
    plaintext: Byte[];
}

See also: Byte, WalletEncryptionArgs

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: WalletEncryptResult

export interface WalletEncryptResult {
    ciphertext: Byte[];
}

See also: Byte

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: WalletEncryptionArgs

export interface WalletEncryptionArgs {
    protocolID: WalletProtocol;
    keyID: KeyIDStringUnder800Bytes;
    counterparty?: WalletCounterparty;
    privileged?: BooleanDefaultFalse;
    privilegedReason?: DescriptionString5to50Bytes;
    seekPermission?: BooleanDefaultTrue;
}

See also: BooleanDefaultFalse, BooleanDefaultTrue, DescriptionString5to50Bytes, KeyIDStringUnder800Bytes, WalletCounterparty, WalletProtocol

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: WalletErrorObject

Every method of the Wallet interface has a return value of the form Promise<object>. When errors occur, an exception object may be thrown which must conform to the WalletErrorObject interface. Serialization layers can rely on the isError property being unique to error objects. Deserialization should rethrow WalletErrorObject conforming objects.

export interface WalletErrorObject extends Error {
    isError: true;
}

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: WalletInterface

The Wallet interface defines a wallet capable of various tasks including transaction creation and signing, encryption, decryption, identity certificate management, identity verification, and communication with applications as per the BRC standards. This interface allows applications to interact with the wallet for a range of functionalities aligned with the Babbage architectural principles.

Error Handling

Every method of the Wallet interface has a return value of the form Promise<object>. When an error occurs, an exception object may be thrown which must conform to the WalletErrorObject interface. Serialization layers can rely on the isError property being unique to error objects to deserialize and rethrow WalletErrorObject conforming objects.

export interface WalletInterface {
    getPublicKey: (args: GetPublicKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetPublicKeyResult>;
    revealCounterpartyKeyLinkage: (args: RevealCounterpartyKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RevealCounterpartyKeyLinkageResult>;
    revealSpecificKeyLinkage: (args: RevealSpecificKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RevealSpecificKeyLinkageResult>;
    encrypt: (args: WalletEncryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletEncryptResult>;
    decrypt: (args: WalletDecryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletDecryptResult>;
    createHmac: (args: CreateHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateHmacResult>;
    verifyHmac: (args: VerifyHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<VerifyHmacResult>;
    createSignature: (args: CreateSignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateSignatureResult>;
    verifySignature: (args: VerifySignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<VerifySignatureResult>;
    createAction: (args: CreateActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateActionResult>;
    signAction: (args: SignActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<SignActionResult>;
    abortAction: (args: AbortActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AbortActionResult>;
    listActions: (args: ListActionsArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListActionsResult>;
    internalizeAction: (args: InternalizeActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<InternalizeActionResult>;
    listOutputs: (args: ListOutputsArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListOutputsResult>;
    relinquishOutput: (args: RelinquishOutputArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RelinquishOutputResult>;
    acquireCertificate: (args: AcquireCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletCertificate>;
    listCertificates: (args: ListCertificatesArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListCertificatesResult>;
    proveCertificate: (args: ProveCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ProveCertificateResult>;
    relinquishCertificate: (args: RelinquishCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RelinquishCertificateResult>;
    discoverByIdentityKey: (args: DiscoverByIdentityKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<DiscoverCertificatesResult>;
    discoverByAttributes: (args: DiscoverByAttributesArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<DiscoverCertificatesResult>;
    isAuthenticated: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AuthenticatedResult>;
    waitForAuthentication: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AuthenticatedResult>;
    getHeight: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetHeightResult>;
    getHeaderForHeight: (args: GetHeaderArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetHeaderResult>;
    getNetwork: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetNetworkResult>;
    getVersion: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetVersionResult>;
}

See also: AbortActionArgs, AbortActionResult, AcquireCertificateArgs, AuthenticatedResult, CreateActionArgs, CreateActionResult, CreateHmacArgs, CreateHmacResult, CreateSignatureArgs, CreateSignatureResult, DiscoverByAttributesArgs, DiscoverByIdentityKeyArgs, DiscoverCertificatesResult, GetHeaderArgs, GetHeaderResult, GetHeightResult, GetNetworkResult, GetPublicKeyArgs, GetPublicKeyResult, GetVersionResult, InternalizeActionArgs, InternalizeActionResult, ListActionsArgs, ListActionsResult, ListCertificatesArgs, ListCertificatesResult, ListOutputsArgs, ListOutputsResult, OriginatorDomainNameStringUnder250Bytes, ProveCertificateArgs, ProveCertificateResult, RelinquishCertificateArgs, RelinquishCertificateResult, RelinquishOutputArgs, RelinquishOutputResult, RevealCounterpartyKeyLinkageArgs, RevealCounterpartyKeyLinkageResult, RevealSpecificKeyLinkageArgs, RevealSpecificKeyLinkageResult, SignActionArgs, SignActionResult, VerifyHmacArgs, VerifyHmacResult, VerifySignatureArgs, VerifySignatureResult, WalletCertificate, WalletDecryptArgs, WalletDecryptResult, WalletEncryptArgs, WalletEncryptResult, decrypt, encrypt

Property abortAction

Aborts a transaction that is in progress and has not yet been finalized or sent to the network.

abortAction: (args: AbortActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AbortActionResult>

See also: AbortActionArgs, AbortActionResult, OriginatorDomainNameStringUnder250Bytes

Property acquireCertificate

Acquires an identity certificate, whether by acquiring one from the certifier or by directly receiving it.

acquireCertificate: (args: AcquireCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletCertificate>

See also: AcquireCertificateArgs, OriginatorDomainNameStringUnder250Bytes, WalletCertificate

Property createAction

Creates a new Bitcoin transaction based on the provided inputs, outputs, labels, locks, and other options.

createAction: (args: CreateActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateActionResult>

See also: CreateActionArgs, CreateActionResult, OriginatorDomainNameStringUnder250Bytes

Property createHmac

Creates an HMAC (Hash-based Message Authentication Code) based on the provided data, protocol, key ID, counterparty, and other factors.

createHmac: (args: CreateHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateHmacResult>

See also: CreateHmacArgs, CreateHmacResult, OriginatorDomainNameStringUnder250Bytes

Property createSignature

Creates a digital signature for the provided data or hash using a specific protocol, key, and optionally considering privilege and counterparty.

createSignature: (args: CreateSignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateSignatureResult>

See also: CreateSignatureArgs, CreateSignatureResult, OriginatorDomainNameStringUnder250Bytes

Property decrypt

Decrypts the provided ciphertext using derived keys, based on the protocol ID, key ID, counterparty, and other factors.

decrypt: (args: WalletDecryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletDecryptResult>

See also: OriginatorDomainNameStringUnder250Bytes, WalletDecryptArgs, WalletDecryptResult

Property discoverByAttributes

Discovers identity certificates belonging to other users, where the documents contain specific attributes, issued by a trusted entity.

discoverByAttributes: (args: DiscoverByAttributesArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<DiscoverCertificatesResult>

See also: DiscoverByAttributesArgs, DiscoverCertificatesResult, OriginatorDomainNameStringUnder250Bytes

Property discoverByIdentityKey

Discovers identity certificates, issued to a given identity key by a trusted entity.

discoverByIdentityKey: (args: DiscoverByIdentityKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<DiscoverCertificatesResult>

See also: DiscoverByIdentityKeyArgs, DiscoverCertificatesResult, OriginatorDomainNameStringUnder250Bytes

Property encrypt

Encrypts the provided plaintext data using derived keys, based on the protocol ID, key ID, counterparty, and other factors.

encrypt: (args: WalletEncryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletEncryptResult>

See also: OriginatorDomainNameStringUnder250Bytes, WalletEncryptArgs, WalletEncryptResult

Property getHeaderForHeight

Retrieves the block header of a block at a specified height.

getHeaderForHeight: (args: GetHeaderArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetHeaderResult>

See also: GetHeaderArgs, GetHeaderResult, OriginatorDomainNameStringUnder250Bytes

Property getHeight

Retrieves the current height of the blockchain.

getHeight: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetHeightResult>

See also: GetHeightResult, OriginatorDomainNameStringUnder250Bytes

Property getNetwork

Retrieves the Bitcoin network the client is using (mainnet or testnet).

getNetwork: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetNetworkResult>

See also: GetNetworkResult, OriginatorDomainNameStringUnder250Bytes

Property getPublicKey

Retrieves a derived or identity public key based on the requested protocol, key ID, counterparty, and other factors.

getPublicKey: (args: GetPublicKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetPublicKeyResult>

See also: GetPublicKeyArgs, GetPublicKeyResult, OriginatorDomainNameStringUnder250Bytes

Property getVersion

Retrieves the current version string of the wallet.

getVersion: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetVersionResult>

See also: GetVersionResult, OriginatorDomainNameStringUnder250Bytes

Property internalizeAction

Submits a transaction to be internalized and optionally labeled, outputs paid to the wallet balance, inserted into baskets, and/or tagged.

internalizeAction: (args: InternalizeActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<InternalizeActionResult>

See also: InternalizeActionArgs, InternalizeActionResult, OriginatorDomainNameStringUnder250Bytes

Property isAuthenticated

Checks the authentication status of the user.

isAuthenticated: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AuthenticatedResult>

See also: AuthenticatedResult, OriginatorDomainNameStringUnder250Bytes

Property listActions

Lists all transactions matching the specified labels.

listActions: (args: ListActionsArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListActionsResult>

See also: ListActionsArgs, ListActionsResult, OriginatorDomainNameStringUnder250Bytes

Property listCertificates

Lists identity certificates belonging to the user, filtered by certifier(s) and type(s).

listCertificates: (args: ListCertificatesArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListCertificatesResult>

See also: ListCertificatesArgs, ListCertificatesResult, OriginatorDomainNameStringUnder250Bytes

Property listOutputs

Lists the spendable outputs kept within a specific basket, optionally tagged with specific labels.

listOutputs: (args: ListOutputsArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListOutputsResult>

See also: ListOutputsArgs, ListOutputsResult, OriginatorDomainNameStringUnder250Bytes

Property proveCertificate

Proves select fields of an identity certificate, as specified, when requested by a verifier.

proveCertificate: (args: ProveCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ProveCertificateResult>

See also: OriginatorDomainNameStringUnder250Bytes, ProveCertificateArgs, ProveCertificateResult

Property relinquishCertificate

Relinquishes an identity certificate, removing it from the wallet regardless of whether the revocation outpoint has become spent.

relinquishCertificate: (args: RelinquishCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RelinquishCertificateResult>

See also: OriginatorDomainNameStringUnder250Bytes, RelinquishCertificateArgs, RelinquishCertificateResult

Property relinquishOutput

Relinquish an output out of a basket, removing it from tracking without spending it.

relinquishOutput: (args: RelinquishOutputArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RelinquishOutputResult>

See also: OriginatorDomainNameStringUnder250Bytes, RelinquishOutputArgs, RelinquishOutputResult

Property revealCounterpartyKeyLinkage

Reveals the key linkage between ourselves and a counterparty, to a particular verifier, across all interactions with the counterparty.

revealCounterpartyKeyLinkage: (args: RevealCounterpartyKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RevealCounterpartyKeyLinkageResult>

See also: OriginatorDomainNameStringUnder250Bytes, RevealCounterpartyKeyLinkageArgs, RevealCounterpartyKeyLinkageResult

Property revealSpecificKeyLinkage

Reveals the key linkage between ourselves and a counterparty, to a particular verifier, with respect to a specific interaction.

revealSpecificKeyLinkage: (args: RevealSpecificKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RevealSpecificKeyLinkageResult>

See also: OriginatorDomainNameStringUnder250Bytes, RevealSpecificKeyLinkageArgs, RevealSpecificKeyLinkageResult

Property signAction

Signs a transaction previously created using createAction.

signAction: (args: SignActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<SignActionResult>

See also: OriginatorDomainNameStringUnder250Bytes, SignActionArgs, SignActionResult

Property verifyHmac

Verifies an HMAC (Hash-based Message Authentication Code) based on the provided data, protocol, key ID, counterparty, and other factors.

verifyHmac: (args: VerifyHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<VerifyHmacResult>

See also: OriginatorDomainNameStringUnder250Bytes, VerifyHmacArgs, VerifyHmacResult

Property verifySignature

Verifies a digital signature for the provided data or hash using a specific protocol, key, and optionally considering privilege and counterparty.

verifySignature: (args: VerifySignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<VerifySignatureResult>

See also: OriginatorDomainNameStringUnder250Bytes, VerifySignatureArgs, VerifySignatureResult

Property waitForAuthentication

Continuously waits until the user is authenticated, returning the result once confirmed.

waitForAuthentication: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AuthenticatedResult>

See also: AuthenticatedResult, OriginatorDomainNameStringUnder250Bytes

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: WalletOutput

export interface WalletOutput {
    satoshis: SatoshiValue;
    lockingScript?: HexString;
    spendable: boolean;
    customInstructions?: string;
    tags?: OutputTagStringUnder300Bytes[];
    outpoint: OutpointString;
    labels?: LabelStringUnder300Bytes[];
}

See also: HexString, LabelStringUnder300Bytes, OutpointString, OutputTagStringUnder300Bytes, SatoshiValue

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: WalletPayment

export interface WalletPayment {
    derivationPrefix: Base64String;
    derivationSuffix: Base64String;
    senderIdentityKey: PubKeyHex;
}

See also: Base64String, PubKeyHex

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Interface: WalletWire

A Wallet Wire is an abstraction over a raw transport medium where binary data can be sent to and subsequently received from a wallet.

export default interface WalletWire {
    transmitToWallet: (message: number[]) => Promise<number[]>;
}

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Classes

 
CachedKeyDeriver
HTTPWalletJSON
HTTPWalletWire
KeyDeriver
ProtoWallet
WalletClient
WalletError
WalletWireProcessor
WalletWireTransceiver
WindowCWISubstrate
XDMSubstrate

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Class: CachedKeyDeriver

A cached version of KeyDeriver that caches the results of key derivation methods. This is useful for optimizing performance when the same keys are derived multiple times. It supports configurable cache size with sane defaults and maintains cache entries using LRU (Least Recently Used) eviction policy.

export default class CachedKeyDeriver {
    constructor(rootKey: PrivateKey | "anyone", options?: {
        maxCacheSize?: number;
    }) 
    derivePublicKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty, forSelf: boolean = false): PublicKey 
    derivePrivateKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): PrivateKey 
    deriveSymmetricKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): SymmetricKey 
    revealCounterpartySecret(counterparty: Counterparty): number[] 
    revealSpecificSecret(counterparty: Counterparty, protocolID: WalletProtocol, keyID: string): number[] 
}

See also: Counterparty, PrivateKey, PublicKey, SymmetricKey, WalletProtocol

Constructor

Initializes the CachedKeyDeriver instance with a root private key and optional cache settings.

constructor(rootKey: PrivateKey | "anyone", options?: {
    maxCacheSize?: number;
}) 

See also: PrivateKey

Argument Details

Method derivePrivateKey

Derives a private key based on protocol ID, key ID, and counterparty. Caches the result for future calls with the same parameters.

derivePrivateKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): PrivateKey 

See also: Counterparty, PrivateKey, WalletProtocol

Returns

Argument Details

Method derivePublicKey

Derives a public key based on protocol ID, key ID, and counterparty. Caches the result for future calls with the same parameters.

derivePublicKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty, forSelf: boolean = false): PublicKey 

See also: Counterparty, PublicKey, WalletProtocol

Returns

Argument Details

Method deriveSymmetricKey

Derives a symmetric key based on protocol ID, key ID, and counterparty. Caches the result for future calls with the same parameters.

deriveSymmetricKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): SymmetricKey 

See also: Counterparty, SymmetricKey, WalletProtocol

Returns

Argument Details

Throws

Method revealCounterpartySecret

Reveals the shared secret between the root key and the counterparty. Caches the result for future calls with the same parameters.

revealCounterpartySecret(counterparty: Counterparty): number[] 

See also: Counterparty

Returns

Argument Details

Throws

Method revealSpecificSecret

Reveals the specific key association for a given protocol ID, key ID, and counterparty. Caches the result for future calls with the same parameters.

revealSpecificSecret(counterparty: Counterparty, protocolID: WalletProtocol, keyID: string): number[] 

See also: Counterparty, WalletProtocol

Returns

Argument Details

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Class: HTTPWalletJSON

export default class HTTPWalletJSON implements WalletInterface {
    baseUrl: string;
    httpClient: typeof fetch;
    originator: OriginatorDomainNameStringUnder250Bytes | undefined;
    api: (call: string, args: object) => Promise<unknown>;
    constructor(originator: OriginatorDomainNameStringUnder250Bytes | undefined, baseUrl: string = "http://localhost:3321", httpClient = fetch) 
    async createAction(args: CreateActionArgs): Promise<CreateActionResult> 
    async signAction(args: SignActionArgs): Promise<SignActionResult> 
    async abortAction(args: {
        reference: Base64String;
    }): Promise<{
        aborted: true;
    }> 
    async listActions(args: ListActionsArgs): Promise<ListActionsResult> 
    async internalizeAction(args: InternalizeActionArgs): Promise<{
        accepted: true;
    }> 
    async listOutputs(args: ListOutputsArgs): Promise<ListOutputsResult> 
    async relinquishOutput(args: {
        basket: BasketStringUnder300Bytes;
        output: OutpointString;
    }): Promise<{
        relinquished: true;
    }> 
    async getPublicKey(args: {
        seekPermission?: BooleanDefaultTrue;
        identityKey?: true;
        protocolID?: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID?: KeyIDStringUnder800Bytes;
        privileged?: BooleanDefaultFalse;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        forSelf?: BooleanDefaultFalse;
    }): Promise<{
        publicKey: PubKeyHex;
    }> 
    async revealCounterpartyKeyLinkage(args: {
        counterparty: PubKeyHex;
        verifier: PubKeyHex;
        privilegedReason?: DescriptionString5to50Bytes;
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        prover: PubKeyHex;
        verifier: PubKeyHex;
        counterparty: PubKeyHex;
        revelationTime: ISOTimestampString;
        encryptedLinkage: Byte[];
        encryptedLinkageProof: number[];
    }> 
    async revealSpecificKeyLinkage(args: {
        counterparty: PubKeyHex;
        verifier: PubKeyHex;
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        prover: PubKeyHex;
        verifier: PubKeyHex;
        counterparty: PubKeyHex;
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        encryptedLinkage: Byte[];
        encryptedLinkageProof: Byte[];
        proofType: Byte;
    }> 
    async encrypt(args: {
        seekPermission?: BooleanDefaultTrue;
        plaintext: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        ciphertext: Byte[];
    }> 
    async decrypt(args: {
        seekPermission?: BooleanDefaultTrue;
        ciphertext: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        plaintext: Byte[];
    }> 
    async createHmac(args: {
        seekPermission?: BooleanDefaultTrue;
        data: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        hmac: Byte[];
    }> 
    async verifyHmac(args: {
        seekPermission?: BooleanDefaultTrue;
        data: Byte[];
        hmac: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        valid: true;
    }> 
    async createSignature(args: {
        seekPermission?: BooleanDefaultTrue;
        data?: Byte[];
        hashToDirectlySign?: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        signature: Byte[];
    }> 
    async verifySignature(args: {
        seekPermission?: BooleanDefaultTrue;
        data?: Byte[];
        hashToDirectlyVerify?: Byte[];
        signature: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        forSelf?: BooleanDefaultFalse;
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        valid: true;
    }> 
    async acquireCertificate(args: AcquireCertificateArgs): Promise<AcquireCertificateResult> 
    async listCertificates(args: {
        certifiers: PubKeyHex[];
        types: Base64String[];
        limit?: PositiveIntegerDefault10Max10000;
        offset?: PositiveIntegerOrZero;
        privileged?: BooleanDefaultFalse;
        privilegedReason?: DescriptionString5to50Bytes;
    }): Promise<ListCertificatesResult> 
    async proveCertificate(args: ProveCertificateArgs): Promise<ProveCertificateResult> 
    async relinquishCertificate(args: {
        type: Base64String;
        serialNumber: Base64String;
        certifier: PubKeyHex;
    }): Promise<{
        relinquished: true;
    }> 
    async discoverByIdentityKey(args: {
        seekPermission?: BooleanDefaultTrue;
        identityKey: PubKeyHex;
        limit?: PositiveIntegerDefault10Max10000;
        offset?: PositiveIntegerOrZero;
    }): Promise<DiscoverCertificatesResult> 
    async discoverByAttributes(args: {
        seekPermission?: BooleanDefaultTrue;
        attributes: Record<CertificateFieldNameUnder50Bytes, string>;
        limit?: PositiveIntegerDefault10Max10000;
        offset?: PositiveIntegerOrZero;
    }): Promise<DiscoverCertificatesResult> 
    async isAuthenticated(args: object): Promise<{
        authenticated: true;
    }> 
    async waitForAuthentication(args: object): Promise<{
        authenticated: true;
    }> 
    async getHeight(args: object): Promise<{
        height: PositiveInteger;
    }> 
    async getHeaderForHeight(args: {
        height: PositiveInteger;
    }): Promise<{
        header: HexString;
    }> 
    async getNetwork(args: object): Promise<{
        network: "mainnet" | "testnet";
    }> 
    async getVersion(args: object): Promise<{
        version: VersionString7To30Bytes;
    }> 
}

See also: AcquireCertificateArgs, AcquireCertificateResult, Base64String, BasketStringUnder300Bytes, BooleanDefaultFalse, BooleanDefaultTrue, Byte, CertificateFieldNameUnder50Bytes, CreateActionArgs, CreateActionResult, DescriptionString5to50Bytes, DiscoverCertificatesResult, HexString, ISOTimestampString, InternalizeActionArgs, KeyIDStringUnder800Bytes, ListActionsArgs, ListActionsResult, ListCertificatesResult, ListOutputsArgs, ListOutputsResult, OriginatorDomainNameStringUnder250Bytes, OutpointString, PositiveInteger, PositiveIntegerDefault10Max10000, PositiveIntegerOrZero, ProtocolString5To400Bytes, ProveCertificateArgs, ProveCertificateResult, PubKeyHex, SecurityLevel, SignActionArgs, SignActionResult, VersionString7To30Bytes, WalletInterface, decrypt, encrypt

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Class: HTTPWalletWire

export default class HTTPWalletWire implements WalletWire {
    baseUrl: string;
    httpClient: typeof fetch;
    originator: string | undefined;
    constructor(originator: string | undefined, baseUrl: string = "http://localhost:3301", httpClient = fetch) 
    async transmitToWallet(message: number[]): Promise<number[]> 
}

See also: WalletWire

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Class: KeyDeriver

Class responsible for deriving various types of keys using a root private key. It supports deriving public and private keys, symmetric keys, and revealing key linkages.

export class KeyDeriver implements KeyDeriverApi {
    rootKey: PrivateKey;
    identityKey: string;
    constructor(rootKey: PrivateKey | "anyone") 
    derivePublicKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty, forSelf: boolean = false): PublicKey 
    derivePrivateKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): PrivateKey 
    deriveSymmetricKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): SymmetricKey 
    revealCounterpartySecret(counterparty: Counterparty): number[] 
    revealSpecificSecret(counterparty: Counterparty, protocolID: WalletProtocol, keyID: string): number[] 
}

See also: Counterparty, KeyDeriverApi, PrivateKey, PublicKey, SymmetricKey, WalletProtocol

Constructor

Initializes the KeyDeriver instance with a root private key.

constructor(rootKey: PrivateKey | "anyone") 

See also: PrivateKey

Argument Details

Method derivePrivateKey

Derives a private key based on protocol ID, key ID, and counterparty.

derivePrivateKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): PrivateKey 

See also: Counterparty, PrivateKey, WalletProtocol

Returns

Argument Details

Method derivePublicKey

Derives a public key based on protocol ID, key ID, and counterparty.

derivePublicKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty, forSelf: boolean = false): PublicKey 

See also: Counterparty, PublicKey, WalletProtocol

Returns

Argument Details

Method deriveSymmetricKey

Derives a symmetric key based on protocol ID, key ID, and counterparty. Note: Symmetric keys should not be derivable by everyone due to security risks.

deriveSymmetricKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): SymmetricKey 

See also: Counterparty, SymmetricKey, WalletProtocol

Returns

Argument Details

Method revealCounterpartySecret

Reveals the shared secret between the root key and the counterparty. Note: This should not be used for ‘self’.

revealCounterpartySecret(counterparty: Counterparty): number[] 

See also: Counterparty

Returns

Argument Details

Throws

Method revealSpecificSecret

Reveals the specific key association for a given protocol ID, key ID, and counterparty.

revealSpecificSecret(counterparty: Counterparty, protocolID: WalletProtocol, keyID: string): number[] 

See also: Counterparty, WalletProtocol

Returns

Argument Details

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Class: ProtoWallet

A ProtoWallet is precursor to a full wallet, capable of performing all foundational cryptographic operations. It can derive keys, create signatures, facilitate encryption and HMAC operations, and reveal key linkages.

However, ProtoWallet does not create transactions, manage outputs, interact with the blockchain, enable the management of identity certificates, or store any data. It is also not concerned with privileged keys.

export class ProtoWallet {
    keyDeriver?: KeyDeriverApi;
    constructor(rootKeyOrKeyDeriver?: PrivateKey | "anyone" | KeyDeriverApi) 
    async getPublicKey(args: GetPublicKeyArgs): Promise<{
        publicKey: PubKeyHex;
    }> 
    async revealCounterpartyKeyLinkage(args: RevealCounterpartyKeyLinkageArgs): Promise<RevealCounterpartyKeyLinkageResult> 
    async revealSpecificKeyLinkage(args: RevealSpecificKeyLinkageArgs): Promise<RevealSpecificKeyLinkageResult> 
    async encrypt(args: WalletEncryptArgs): Promise<WalletEncryptResult> 
    async decrypt(args: WalletDecryptArgs): Promise<WalletDecryptResult> 
    async createHmac(args: CreateHmacArgs): Promise<CreateHmacResult> 
    async verifyHmac(args: VerifyHmacArgs): Promise<VerifyHmacResult> 
    async createSignature(args: CreateSignatureArgs): Promise<CreateSignatureResult> 
    async verifySignature(args: VerifySignatureArgs): Promise<VerifySignatureResult> 
}

See also: CreateHmacArgs, CreateHmacResult, CreateSignatureArgs, CreateSignatureResult, GetPublicKeyArgs, KeyDeriverApi, PrivateKey, PubKeyHex, RevealCounterpartyKeyLinkageArgs, RevealCounterpartyKeyLinkageResult, RevealSpecificKeyLinkageArgs, RevealSpecificKeyLinkageResult, VerifyHmacArgs, VerifyHmacResult, VerifySignatureArgs, VerifySignatureResult, WalletDecryptArgs, WalletDecryptResult, WalletEncryptArgs, WalletEncryptResult, decrypt, encrypt

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Class: WalletClient

The SDK is how applications communicate with wallets over a communications substrate.

export default class WalletClient implements WalletInterface {
    public substrate: "auto" | WalletInterface;
    originator?: OriginatorDomainNameStringUnder250Bytes;
    constructor(substrate: "auto" | "Cicada" | "XDM" | "window.CWI" | "json-api" | WalletInterface = "auto", originator?: OriginatorDomainNameStringUnder250Bytes) 
    async connectToSubstrate(): Promise<void> 
    async createAction(args: CreateActionArgs): Promise<CreateActionResult> 
    async signAction(args: SignActionArgs): Promise<SignActionResult> 
    async abortAction(args: {
        reference: Base64String;
    }): Promise<{
        aborted: true;
    }> 
    async listActions(args: ListActionsArgs): Promise<ListActionsResult> 
    async internalizeAction(args: InternalizeActionArgs): Promise<{
        accepted: true;
    }> 
    async listOutputs(args: ListOutputsArgs): Promise<ListOutputsResult> 
    async relinquishOutput(args: {
        basket: BasketStringUnder300Bytes;
        output: OutpointString;
    }): Promise<{
        relinquished: true;
    }> 
    async getPublicKey(args: {
        identityKey?: true;
        protocolID?: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID?: KeyIDStringUnder800Bytes;
        privileged?: BooleanDefaultFalse;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        forSelf?: BooleanDefaultFalse;
    }): Promise<{
        publicKey: PubKeyHex;
    }> 
    async revealCounterpartyKeyLinkage(args: {
        counterparty: PubKeyHex;
        verifier: PubKeyHex;
        privilegedReason?: DescriptionString5to50Bytes;
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        prover: PubKeyHex;
        verifier: PubKeyHex;
        counterparty: PubKeyHex;
        revelationTime: ISOTimestampString;
        encryptedLinkage: Byte[];
        encryptedLinkageProof: Byte[];
    }> 
    async revealSpecificKeyLinkage(args: {
        counterparty: PubKeyHex;
        verifier: PubKeyHex;
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        prover: PubKeyHex;
        verifier: PubKeyHex;
        counterparty: PubKeyHex;
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        encryptedLinkage: Byte[];
        encryptedLinkageProof: Byte[];
        proofType: Byte;
    }> 
    async encrypt(args: {
        plaintext: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        ciphertext: Byte[];
    }> 
    async decrypt(args: {
        ciphertext: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        plaintext: Byte[];
    }> 
    async createHmac(args: {
        data: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        hmac: Byte[];
    }> 
    async verifyHmac(args: {
        data: Byte[];
        hmac: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        valid: true;
    }> 
    async createSignature(args: {
        data?: Byte[];
        hashToDirectlySign?: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        signature: Byte[];
    }> 
    async verifySignature(args: {
        data?: Byte[];
        hashToDirectlyVerify?: Byte[];
        signature: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        forSelf?: BooleanDefaultFalse;
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        valid: true;
    }> 
    async acquireCertificate(args: AcquireCertificateArgs): Promise<AcquireCertificateResult> 
    async listCertificates(args: {
        certifiers: PubKeyHex[];
        types: Base64String[];
        limit?: PositiveIntegerDefault10Max10000;
        offset?: PositiveIntegerOrZero;
        privileged?: BooleanDefaultFalse;
        privilegedReason?: DescriptionString5to50Bytes;
    }): Promise<ListCertificatesResult> 
    async proveCertificate(args: ProveCertificateArgs): Promise<ProveCertificateResult> 
    async relinquishCertificate(args: {
        type: Base64String;
        serialNumber: Base64String;
        certifier: PubKeyHex;
    }): Promise<{
        relinquished: true;
    }> 
    async discoverByIdentityKey(args: {
        identityKey: PubKeyHex;
        limit?: PositiveIntegerDefault10Max10000;
        offset?: PositiveIntegerOrZero;
    }): Promise<DiscoverCertificatesResult> 
    async discoverByAttributes(args: {
        attributes: Record<CertificateFieldNameUnder50Bytes, string>;
        limit?: PositiveIntegerDefault10Max10000;
        offset?: PositiveIntegerOrZero;
    }): Promise<DiscoverCertificatesResult> 
    async isAuthenticated(args: object = {}): Promise<AuthenticatedResult> 
    async waitForAuthentication(args: object = {}): Promise<{
        authenticated: true;
    }> 
    async getHeight(args: object = {}): Promise<{
        height: PositiveInteger;
    }> 
    async getHeaderForHeight(args: {
        height: PositiveInteger;
    }): Promise<{
        header: HexString;
    }> 
    async getNetwork(args: object = {}): Promise<{
        network: "mainnet" | "testnet";
    }> 
    async getVersion(args: object = {}): Promise<{
        version: VersionString7To30Bytes;
    }> 
}

See also: AcquireCertificateArgs, AcquireCertificateResult, AuthenticatedResult, Base64String, BasketStringUnder300Bytes, BooleanDefaultFalse, Byte, CertificateFieldNameUnder50Bytes, CreateActionArgs, CreateActionResult, DescriptionString5to50Bytes, DiscoverCertificatesResult, HexString, ISOTimestampString, InternalizeActionArgs, KeyIDStringUnder800Bytes, ListActionsArgs, ListActionsResult, ListCertificatesResult, ListOutputsArgs, ListOutputsResult, OriginatorDomainNameStringUnder250Bytes, OutpointString, PositiveInteger, PositiveIntegerDefault10Max10000, PositiveIntegerOrZero, ProtocolString5To400Bytes, ProveCertificateArgs, ProveCertificateResult, PubKeyHex, SecurityLevel, SignActionArgs, SignActionResult, VersionString7To30Bytes, WalletInterface, decrypt, encrypt

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Class: WalletError

export class WalletError extends Error {
    code: number;
    isError: boolean = true;
    constructor(message: string, code = 1, stack?: string) 
}

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Class: WalletWireProcessor

Processes incoming wallet calls received over a wallet wire, with a given wallet.

export default class WalletWireProcessor implements WalletWire {
    wallet: WalletInterface;
    constructor(wallet: WalletInterface) 
    async transmitToWallet(message: number[]): Promise<number[]> 
}

See also: WalletInterface, WalletWire

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Class: WalletWireTransceiver

A way to make remote calls to a wallet over a wallet wire.

export default class WalletWireTransceiver implements WalletInterface {
    wire: WalletWire;
    constructor(wire: WalletWire) 
    async createAction(args: CreateActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<CreateActionResult> 
    async signAction(args: SignActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<SignActionResult> 
    async abortAction(args: {
        reference: Base64String;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        aborted: true;
    }> 
    async listActions(args: ListActionsArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ListActionsResult> 
    async internalizeAction(args: InternalizeActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        accepted: true;
    }> 
    async listOutputs(args: ListOutputsArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ListOutputsResult> 
    async relinquishOutput(args: {
        basket: BasketStringUnder300Bytes;
        output: OutpointString;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        relinquished: true;
    }> 
    async getPublicKey(args: {
        seekPermission?: BooleanDefaultTrue;
        identityKey?: true;
        protocolID?: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID?: KeyIDStringUnder800Bytes;
        privileged?: BooleanDefaultFalse;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        forSelf?: BooleanDefaultFalse;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        publicKey: PubKeyHex;
    }> 
    async revealCounterpartyKeyLinkage(args: {
        counterparty: PubKeyHex;
        verifier: PubKeyHex;
        privilegedReason?: DescriptionString5to50Bytes;
        privileged?: BooleanDefaultFalse;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        prover: PubKeyHex;
        verifier: PubKeyHex;
        counterparty: PubKeyHex;
        revelationTime: ISOTimestampString;
        encryptedLinkage: Byte[];
        encryptedLinkageProof: number[];
    }> 
    async revealSpecificKeyLinkage(args: {
        counterparty: PubKeyHex;
        verifier: PubKeyHex;
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        privileged?: BooleanDefaultFalse;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        prover: PubKeyHex;
        verifier: PubKeyHex;
        counterparty: PubKeyHex;
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        encryptedLinkage: Byte[];
        encryptedLinkageProof: Byte[];
        proofType: Byte;
    }> 
    async encrypt(args: {
        seekPermission?: BooleanDefaultTrue;
        plaintext: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        ciphertext: Byte[];
    }> 
    async decrypt(args: {
        seekPermission?: BooleanDefaultTrue;
        ciphertext: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        plaintext: Byte[];
    }> 
    async createHmac(args: {
        seekPermission?: BooleanDefaultTrue;
        data: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        hmac: Byte[];
    }> 
    async verifyHmac(args: {
        seekPermission?: BooleanDefaultTrue;
        data: Byte[];
        hmac: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        valid: true;
    }> 
    async createSignature(args: {
        seekPermission?: BooleanDefaultTrue;
        data?: Byte[];
        hashToDirectlySign?: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        signature: Byte[];
    }> 
    async verifySignature(args: {
        seekPermission?: BooleanDefaultTrue;
        data?: Byte[];
        hashToDirectlyVerify?: Byte[];
        signature: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        forSelf?: BooleanDefaultFalse;
        privileged?: BooleanDefaultFalse;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        valid: true;
    }> 
    async acquireCertificate(args: AcquireCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<AcquireCertificateResult> 
    async listCertificates(args: {
        certifiers: PubKeyHex[];
        types: Base64String[];
        limit?: PositiveIntegerDefault10Max10000;
        offset?: PositiveIntegerOrZero;
        privileged?: BooleanDefaultFalse;
        privilegedReason?: DescriptionString5to50Bytes;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ListCertificatesResult> 
    async proveCertificate(args: ProveCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ProveCertificateResult> 
    async relinquishCertificate(args: {
        type: Base64String;
        serialNumber: Base64String;
        certifier: PubKeyHex;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        relinquished: true;
    }> 
    async discoverByIdentityKey(args: {
        seekPermission?: BooleanDefaultTrue;
        identityKey: PubKeyHex;
        limit?: PositiveIntegerDefault10Max10000;
        offset?: PositiveIntegerOrZero;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<DiscoverCertificatesResult> 
    async discoverByAttributes(args: {
        seekPermission?: BooleanDefaultTrue;
        attributes: Record<CertificateFieldNameUnder50Bytes, string>;
        limit?: PositiveIntegerDefault10Max10000;
        offset?: PositiveIntegerOrZero;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<DiscoverCertificatesResult> 
    async isAuthenticated(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        authenticated: true;
    }> 
    async waitForAuthentication(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        authenticated: true;
    }> 
    async getHeight(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        height: PositiveInteger;
    }> 
    async getHeaderForHeight(args: {
        height: PositiveInteger;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        header: HexString;
    }> 
    async getNetwork(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        network: "mainnet" | "testnet";
    }> 
    async getVersion(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        version: VersionString7To30Bytes;
    }> 
}

See also: AcquireCertificateArgs, AcquireCertificateResult, Base64String, BasketStringUnder300Bytes, BooleanDefaultFalse, BooleanDefaultTrue, Byte, CertificateFieldNameUnder50Bytes, CreateActionArgs, CreateActionResult, DescriptionString5to50Bytes, DiscoverCertificatesResult, HexString, ISOTimestampString, InternalizeActionArgs, KeyIDStringUnder800Bytes, ListActionsArgs, ListActionsResult, ListCertificatesResult, ListOutputsArgs, ListOutputsResult, OriginatorDomainNameStringUnder250Bytes, OutpointString, PositiveInteger, PositiveIntegerDefault10Max10000, PositiveIntegerOrZero, ProtocolString5To400Bytes, ProveCertificateArgs, ProveCertificateResult, PubKeyHex, SecurityLevel, SignActionArgs, SignActionResult, VersionString7To30Bytes, WalletInterface, WalletWire, decrypt, encrypt

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Class: WindowCWISubstrate

Facilitates wallet operations over the window.CWI interface.

export default class WindowCWISubstrate implements WalletInterface {
    constructor() 
    async createAction(args: {
        description: DescriptionString5to50Bytes;
        inputs?: Array<{
            tx?: BEEF;
            outpoint: OutpointString;
            unlockingScript?: HexString;
            unlockingScriptLength?: PositiveInteger;
            inputDescription: DescriptionString5to50Bytes;
            sequenceNumber?: PositiveIntegerOrZero;
        }>;
        outputs?: Array<{
            lockingScript: HexString;
            satoshis: SatoshiValue;
            outputDescription: DescriptionString5to50Bytes;
            basket?: BasketStringUnder300Bytes;
            customInstructions?: string;
            tags?: OutputTagStringUnder300Bytes[];
        }>;
        lockTime?: PositiveIntegerOrZero;
        version?: PositiveIntegerOrZero;
        labels?: LabelStringUnder300Bytes[];
        options?: {
            signAndProcess?: BooleanDefaultTrue;
            acceptDelayedBroadcast?: BooleanDefaultTrue;
            trustSelf?: "known";
            knownTxids?: TXIDHexString[];
            returnTXIDOnly?: BooleanDefaultFalse;
            noSend?: BooleanDefaultFalse;
            noSendChange?: OutpointString[];
            sendWith?: TXIDHexString[];
        };
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        txid?: TXIDHexString;
        tx?: BEEF;
        noSendChange?: OutpointString[];
        sendWithResults?: Array<{
            txid: TXIDHexString;
            status: "unproven" | "sending" | "failed";
        }>;
        signableTransaction?: {
            tx: BEEF;
            reference: Base64String;
        };
    }> 
    async signAction(args: {
        spends: Record<PositiveIntegerOrZero, {
            unlockingScript: HexString;
            sequenceNumber?: PositiveIntegerOrZero;
        }>;
        reference: Base64String;
        options?: {
            acceptDelayedBroadcast?: BooleanDefaultTrue;
            returnTXIDOnly?: BooleanDefaultFalse;
            noSend?: BooleanDefaultFalse;
            noSendChange?: OutpointString[];
            sendWith: TXIDHexString[];
        };
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        txid?: TXIDHexString;
        tx?: BEEF;
        noSendChange?: OutpointString[];
        sendWithResults?: Array<{
            txid: TXIDHexString;
            status: "unproven" | "sending" | "failed";
        }>;
    }> 
    async abortAction(args: {
        reference: Base64String;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        aborted: true;
    }> 
    async listActions(args: {
        labels: LabelStringUnder300Bytes[];
        labelQueryMode?: "any" | "all";
        includeLabels?: BooleanDefaultFalse;
        includeInputs?: BooleanDefaultFalse;
        includeInputSourceLockingScripts?: BooleanDefaultFalse;
        includeInputUnlockingScripts?: BooleanDefaultFalse;
        includeOutputs?: BooleanDefaultFalse;
        includeOutputLockingScripts?: BooleanDefaultFalse;
        limit?: PositiveIntegerDefault10Max10000;
        offset?: PositiveIntegerOrZero;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        totalActions: PositiveIntegerOrZero;
        actions: Array<{
            txid: TXIDHexString;
            satoshis: SatoshiValue;
            status: "completed" | "unprocessed" | "sending" | "unproven" | "unsigned" | "nosend" | "nonfinal";
            isOutgoing: boolean;
            description: DescriptionString5to50Bytes;
            labels?: LabelStringUnder300Bytes[];
            version: PositiveIntegerOrZero;
            lockTime: PositiveIntegerOrZero;
            inputs?: Array<{
                sourceOutpoint: OutpointString;
                sourceSatoshis: SatoshiValue;
                sourceLockingScript?: HexString;
                unlockingScript?: HexString;
                inputDescription: DescriptionString5to50Bytes;
                sequenceNumber: PositiveIntegerOrZero;
            }>;
            outputs?: Array<{
                outputIndex: PositiveIntegerOrZero;
                satoshis: SatoshiValue;
                lockingScript?: HexString;
                spendable: boolean;
                outputDescription: DescriptionString5to50Bytes;
                basket: BasketStringUnder300Bytes;
                tags: OutputTagStringUnder300Bytes[];
                customInstructions?: string;
            }>;
        }>;
    }> 
    async internalizeAction(args: {
        tx: BEEF;
        outputs: Array<{
            outputIndex: PositiveIntegerOrZero;
            protocol: "wallet payment" | "basket insertion";
            paymentRemittance?: {
                derivationPrefix: Base64String;
                derivationSuffix: Base64String;
                senderIdentityKey: PubKeyHex;
            };
            insertionRemittance?: {
                basket: BasketStringUnder300Bytes;
                customInstructions?: string;
                tags?: OutputTagStringUnder300Bytes[];
            };
        }>;
        description: DescriptionString5to50Bytes;
        labels?: LabelStringUnder300Bytes[];
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        accepted: true;
    }> 
    async listOutputs(args: {
        basket: BasketStringUnder300Bytes;
        tags?: OutputTagStringUnder300Bytes[];
        tagQueryMode?: "all" | "any";
        include?: "locking scripts" | "entire transactions";
        includeCustomInstructions?: BooleanDefaultFalse;
        includeTags?: BooleanDefaultFalse;
        includeLabels?: BooleanDefaultFalse;
        limit?: PositiveIntegerDefault10Max10000;
        offset?: PositiveIntegerOrZero;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        totalOutputs: PositiveIntegerOrZero;
        outputs: Array<{
            outpoint: OutpointString;
            satoshis: SatoshiValue;
            lockingScript?: HexString;
            tx?: BEEF;
            spendable: boolean;
            customInstructions?: string;
            tags?: OutputTagStringUnder300Bytes[];
            labels?: LabelStringUnder300Bytes[];
        }>;
    }> 
    async relinquishOutput(args: {
        basket: BasketStringUnder300Bytes;
        output: OutpointString;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        relinquished: true;
    }> 
    async getPublicKey(args: {
        identityKey?: true;
        protocolID?: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID?: KeyIDStringUnder800Bytes;
        privileged?: BooleanDefaultFalse;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        forSelf?: BooleanDefaultFalse;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        publicKey: PubKeyHex;
    }> 
    async revealCounterpartyKeyLinkage(args: {
        counterparty: PubKeyHex;
        verifier: PubKeyHex;
        privilegedReason?: DescriptionString5to50Bytes;
        privileged?: BooleanDefaultFalse;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        prover: PubKeyHex;
        verifier: PubKeyHex;
        counterparty: PubKeyHex;
        revelationTime: ISOTimestampString;
        encryptedLinkage: Byte[];
        encryptedLinkageProof: Byte[];
    }> 
    async revealSpecificKeyLinkage(args: {
        counterparty: PubKeyHex;
        verifier: PubKeyHex;
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        privileged?: BooleanDefaultFalse;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        prover: PubKeyHex;
        verifier: PubKeyHex;
        counterparty: PubKeyHex;
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        encryptedLinkage: Byte[];
        encryptedLinkageProof: Byte[];
        proofType: Byte;
    }> 
    async encrypt(args: {
        plaintext: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        ciphertext: Byte[];
    }> 
    async decrypt(args: {
        ciphertext: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        plaintext: Byte[];
    }> 
    async createHmac(args: {
        data: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        hmac: Byte[];
    }> 
    async verifyHmac(args: {
        data: Byte[];
        hmac: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        valid: true;
    }> 
    async createSignature(args: {
        data?: Byte[];
        hashToDirectlySign?: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        signature: Byte[];
    }> 
    async verifySignature(args: {
        data?: Byte[];
        hashToDirectlyVerify?: Byte[];
        signature: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        forSelf?: BooleanDefaultFalse;
        privileged?: BooleanDefaultFalse;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        valid: true;
    }> 
    async acquireCertificate(args: {
        type: Base64String;
        subject: PubKeyHex;
        serialNumber: Base64String;
        revocationOutpoint: OutpointString;
        signature: HexString;
        fields: Record<CertificateFieldNameUnder50Bytes, string>;
        certifier: PubKeyHex;
        keyringRevealer: PubKeyHex | "certifier";
        keyringForSubject: Record<CertificateFieldNameUnder50Bytes, Base64String>;
        acquisitionProtocol: "direct" | "issuance";
        certifierUrl?: string;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        type: Base64String;
        subject: PubKeyHex;
        serialNumber: Base64String;
        certifier: PubKeyHex;
        revocationOutpoint: OutpointString;
        signature: HexString;
        fields: Record<CertificateFieldNameUnder50Bytes, string>;
    }> 
    async listCertificates(args: {
        certifiers: PubKeyHex[];
        types: Base64String[];
        limit?: PositiveIntegerDefault10Max10000;
        offset?: PositiveIntegerOrZero;
        privileged?: BooleanDefaultFalse;
        privilegedReason?: DescriptionString5to50Bytes;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        totalCertificates: PositiveIntegerOrZero;
        certificates: Array<{
            type: Base64String;
            subject: PubKeyHex;
            serialNumber: Base64String;
            certifier: PubKeyHex;
            revocationOutpoint: OutpointString;
            signature: HexString;
            fields: Record<CertificateFieldNameUnder50Bytes, string>;
        }>;
    }> 
    async proveCertificate(args: {
        certificate: {
            type: Base64String;
            subject: PubKeyHex;
            serialNumber: Base64String;
            certifier: PubKeyHex;
            revocationOutpoint: OutpointString;
            signature: HexString;
            fields: Record<CertificateFieldNameUnder50Bytes, string>;
        };
        fieldsToReveal: CertificateFieldNameUnder50Bytes[];
        verifier: PubKeyHex;
        privileged?: BooleanDefaultFalse;
        privilegedReason?: DescriptionString5to50Bytes;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        keyringForVerifier: Record<CertificateFieldNameUnder50Bytes, Base64String>;
    }> 
    async relinquishCertificate(args: {
        type: Base64String;
        serialNumber: Base64String;
        certifier: PubKeyHex;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        relinquished: true;
    }> 
    async discoverByIdentityKey(args: {
        identityKey: PubKeyHex;
        limit?: PositiveIntegerDefault10Max10000;
        offset?: PositiveIntegerOrZero;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        totalCertificates: PositiveIntegerOrZero;
        certificates: Array<{
            type: Base64String;
            subject: PubKeyHex;
            serialNumber: Base64String;
            certifier: PubKeyHex;
            revocationOutpoint: OutpointString;
            signature: HexString;
            fields: Record<CertificateFieldNameUnder50Bytes, Base64String>;
            certifierInfo: {
                name: EntityNameStringMax100Bytes;
                iconUrl: EntityIconURLStringMax500Bytes;
                description: DescriptionString5to50Bytes;
                trust: PositiveIntegerMax10;
            };
            publiclyRevealedKeyring: Record<CertificateFieldNameUnder50Bytes, Base64String>;
            decryptedFields: Record<CertificateFieldNameUnder50Bytes, string>;
        }>;
    }> 
    async discoverByAttributes(args: {
        attributes: Record<CertificateFieldNameUnder50Bytes, string>;
        limit?: PositiveIntegerDefault10Max10000;
        offset?: PositiveIntegerOrZero;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        totalCertificates: PositiveIntegerOrZero;
        certificates: Array<{
            type: Base64String;
            subject: PubKeyHex;
            serialNumber: Base64String;
            certifier: PubKeyHex;
            revocationOutpoint: OutpointString;
            signature: HexString;
            fields: Record<CertificateFieldNameUnder50Bytes, Base64String>;
            certifierInfo: {
                name: EntityNameStringMax100Bytes;
                iconUrl: EntityIconURLStringMax500Bytes;
                description: DescriptionString5to50Bytes;
                trust: PositiveIntegerMax10;
            };
            publiclyRevealedKeyring: Record<CertificateFieldNameUnder50Bytes, Base64String>;
            decryptedFields: Record<CertificateFieldNameUnder50Bytes, string>;
        }>;
    }> 
    async isAuthenticated(args: object, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        authenticated: true;
    }> 
    async waitForAuthentication(args: object, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        authenticated: true;
    }> 
    async getHeight(args: object, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        height: PositiveInteger;
    }> 
    async getHeaderForHeight(args: {
        height: PositiveInteger;
    }, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        header: HexString;
    }> 
    async getNetwork(args: object, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        network: "mainnet" | "testnet";
    }> 
    async getVersion(args: object, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
        version: VersionString7To30Bytes;
    }> 
}

See also: BEEF, Base64String, BasketStringUnder300Bytes, BooleanDefaultFalse, BooleanDefaultTrue, Byte, CertificateFieldNameUnder50Bytes, DescriptionString5to50Bytes, EntityIconURLStringMax500Bytes, EntityNameStringMax100Bytes, HexString, ISOTimestampString, KeyIDStringUnder800Bytes, LabelStringUnder300Bytes, OriginatorDomainNameStringUnder250Bytes, OutpointString, OutputTagStringUnder300Bytes, PositiveInteger, PositiveIntegerDefault10Max10000, PositiveIntegerMax10, PositiveIntegerOrZero, ProtocolString5To400Bytes, PubKeyHex, SatoshiValue, SecurityLevel, TXIDHexString, VersionString7To30Bytes, WalletInterface, decrypt, encrypt

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Class: XDMSubstrate

Facilitates wallet operations over cross-document messaging.

export default class XDMSubstrate implements WalletInterface {
    constructor(domain: string = "*") 
    async invoke(call: CallType, args: any): Promise<any> 
    async createAction(args: {
        description: DescriptionString5to50Bytes;
        inputs?: Array<{
            tx?: BEEF;
            outpoint: OutpointString;
            unlockingScript?: HexString;
            unlockingScriptLength?: PositiveInteger;
            inputDescription: DescriptionString5to50Bytes;
            sequenceNumber?: PositiveIntegerOrZero;
        }>;
        outputs?: Array<{
            lockingScript: HexString;
            satoshis: SatoshiValue;
            outputDescription: DescriptionString5to50Bytes;
            basket?: BasketStringUnder300Bytes;
            customInstructions?: string;
            tags?: OutputTagStringUnder300Bytes[];
        }>;
        lockTime?: PositiveIntegerOrZero;
        version?: PositiveIntegerOrZero;
        labels?: LabelStringUnder300Bytes[];
        options?: {
            signAndProcess?: BooleanDefaultTrue;
            acceptDelayedBroadcast?: BooleanDefaultTrue;
            trustSelf?: "known";
            knownTxids?: TXIDHexString[];
            returnTXIDOnly?: BooleanDefaultFalse;
            noSend?: BooleanDefaultFalse;
            noSendChange?: OutpointString[];
            sendWith?: TXIDHexString[];
        };
    }): Promise<{
        txid?: TXIDHexString;
        tx?: BEEF;
        noSendChange?: OutpointString[];
        sendWithResults?: Array<{
            txid: TXIDHexString;
            status: "unproven" | "sending" | "failed";
        }>;
        signableTransaction?: {
            tx: BEEF;
            reference: Base64String;
        };
    }> 
    async signAction(args: {
        spends: Record<PositiveIntegerOrZero, {
            unlockingScript: HexString;
            sequenceNumber?: PositiveIntegerOrZero;
        }>;
        reference: Base64String;
        options?: {
            acceptDelayedBroadcast?: BooleanDefaultTrue;
            returnTXIDOnly?: BooleanDefaultFalse;
            noSend?: BooleanDefaultFalse;
            noSendChange?: OutpointString[];
            sendWith: TXIDHexString[];
        };
    }): Promise<{
        txid?: TXIDHexString;
        tx?: BEEF;
        noSendChange?: OutpointString[];
        sendWithResults?: Array<{
            txid: TXIDHexString;
            status: "unproven" | "sending" | "failed";
        }>;
    }> 
    async abortAction(args: {
        reference: Base64String;
    }): Promise<{
        aborted: true;
    }> 
    async listActions(args: {
        labels: LabelStringUnder300Bytes[];
        labelQueryMode?: "any" | "all";
        includeLabels?: BooleanDefaultFalse;
        includeInputs?: BooleanDefaultFalse;
        includeInputSourceLockingScripts?: BooleanDefaultFalse;
        includeInputUnlockingScripts?: BooleanDefaultFalse;
        includeOutputs?: BooleanDefaultFalse;
        includeOutputLockingScripts?: BooleanDefaultFalse;
        limit?: PositiveIntegerDefault10Max10000;
        offset?: PositiveIntegerOrZero;
    }): Promise<{
        totalActions: PositiveIntegerOrZero;
        actions: Array<{
            txid: TXIDHexString;
            satoshis: SatoshiValue;
            status: "completed" | "unprocessed" | "sending" | "unproven" | "unsigned" | "nosend" | "nonfinal";
            isOutgoing: boolean;
            description: DescriptionString5to50Bytes;
            labels?: LabelStringUnder300Bytes[];
            version: PositiveIntegerOrZero;
            lockTime: PositiveIntegerOrZero;
            inputs?: Array<{
                sourceOutpoint: OutpointString;
                sourceSatoshis: SatoshiValue;
                sourceLockingScript?: HexString;
                unlockingScript?: HexString;
                inputDescription: DescriptionString5to50Bytes;
                sequenceNumber: PositiveIntegerOrZero;
            }>;
            outputs?: Array<{
                outputIndex: PositiveIntegerOrZero;
                satoshis: SatoshiValue;
                lockingScript?: HexString;
                spendable: boolean;
                outputDescription: DescriptionString5to50Bytes;
                basket: BasketStringUnder300Bytes;
                tags: OutputTagStringUnder300Bytes[];
                customInstructions?: string;
            }>;
        }>;
    }> 
    async internalizeAction(args: {
        tx: BEEF;
        outputs: Array<{
            outputIndex: PositiveIntegerOrZero;
            protocol: "wallet payment" | "basket insertion";
            paymentRemittance?: {
                derivationPrefix: Base64String;
                derivationSuffix: Base64String;
                senderIdentityKey: PubKeyHex;
            };
            insertionRemittance?: {
                basket: BasketStringUnder300Bytes;
                customInstructions?: string;
                tags?: OutputTagStringUnder300Bytes[];
            };
        }>;
        description: DescriptionString5to50Bytes;
        labels?: LabelStringUnder300Bytes[];
    }): Promise<{
        accepted: true;
    }> 
    async listOutputs(args: {
        basket: BasketStringUnder300Bytes;
        tags?: OutputTagStringUnder300Bytes[];
        tagQueryMode?: "all" | "any";
        include?: "locking scripts" | "entire transactions";
        includeCustomInstructions?: BooleanDefaultFalse;
        includeTags?: BooleanDefaultFalse;
        includeLabels?: BooleanDefaultFalse;
        limit?: PositiveIntegerDefault10Max10000;
        offset?: PositiveIntegerOrZero;
    }): Promise<{
        totalOutputs: PositiveIntegerOrZero;
        outputs: Array<{
            outpoint: OutpointString;
            satoshis: SatoshiValue;
            lockingScript?: HexString;
            tx?: BEEF;
            spendable: boolean;
            customInstructions?: string;
            tags?: OutputTagStringUnder300Bytes[];
            labels?: LabelStringUnder300Bytes[];
        }>;
    }> 
    async relinquishOutput(args: {
        basket: BasketStringUnder300Bytes;
        output: OutpointString;
    }): Promise<{
        relinquished: true;
    }> 
    async getPublicKey(args: {
        identityKey?: true;
        protocolID?: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID?: KeyIDStringUnder800Bytes;
        privileged?: BooleanDefaultFalse;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        forSelf?: BooleanDefaultFalse;
    }): Promise<{
        publicKey: PubKeyHex;
    }> 
    async revealCounterpartyKeyLinkage(args: {
        counterparty: PubKeyHex;
        verifier: PubKeyHex;
        privilegedReason?: DescriptionString5to50Bytes;
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        prover: PubKeyHex;
        verifier: PubKeyHex;
        counterparty: PubKeyHex;
        revelationTime: ISOTimestampString;
        encryptedLinkage: Byte[];
        encryptedLinkageProof: Byte[];
    }> 
    async revealSpecificKeyLinkage(args: {
        counterparty: PubKeyHex;
        verifier: PubKeyHex;
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        prover: PubKeyHex;
        verifier: PubKeyHex;
        counterparty: PubKeyHex;
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        encryptedLinkage: Byte[];
        encryptedLinkageProof: Byte[];
        proofType: Byte;
    }> 
    async encrypt(args: {
        plaintext: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        ciphertext: Byte[];
    }> 
    async decrypt(args: {
        ciphertext: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        plaintext: Byte[];
    }> 
    async createHmac(args: {
        data: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        hmac: Byte[];
    }> 
    async verifyHmac(args: {
        data: Byte[];
        hmac: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        valid: true;
    }> 
    async createSignature(args: {
        data?: Byte[];
        hashToDirectlySign?: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        signature: Byte[];
    }> 
    async verifySignature(args: {
        data?: Byte[];
        hashToDirectlyVerify?: Byte[];
        signature: Byte[];
        protocolID: [
            SecurityLevel,
            ProtocolString5To400Bytes
        ];
        keyID: KeyIDStringUnder800Bytes;
        privilegedReason?: DescriptionString5to50Bytes;
        counterparty?: PubKeyHex | "self" | "anyone";
        forSelf?: BooleanDefaultFalse;
        privileged?: BooleanDefaultFalse;
    }): Promise<{
        valid: true;
    }> 
    async acquireCertificate(args: {
        type: Base64String;
        subject: PubKeyHex;
        serialNumber: Base64String;
        revocationOutpoint: OutpointString;
        signature: HexString;
        fields: Record<CertificateFieldNameUnder50Bytes, string>;
        certifier: PubKeyHex;
        keyringRevealer: PubKeyHex | "certifier";
        keyringForSubject: Record<CertificateFieldNameUnder50Bytes, Base64String>;
        acquisitionProtocol: "direct" | "issuance";
        certifierUrl?: string;
    }): Promise<{
        type: Base64String;
        subject: PubKeyHex;
        serialNumber: Base64String;
        certifier: PubKeyHex;
        revocationOutpoint: OutpointString;
        signature: HexString;
        fields: Record<CertificateFieldNameUnder50Bytes, string>;
    }> 
    async listCertificates(args: {
        certifiers: PubKeyHex[];
        types: Base64String[];
        limit?: PositiveIntegerDefault10Max10000;
        offset?: PositiveIntegerOrZero;
        privileged?: BooleanDefaultFalse;
        privilegedReason?: DescriptionString5to50Bytes;
    }): Promise<{
        totalCertificates: PositiveIntegerOrZero;
        certificates: Array<{
            type: Base64String;
            subject: PubKeyHex;
            serialNumber: Base64String;
            certifier: PubKeyHex;
            revocationOutpoint: OutpointString;
            signature: HexString;
            fields: Record<CertificateFieldNameUnder50Bytes, string>;
        }>;
    }> 
    async proveCertificate(args: {
        certificate: {
            type: Base64String;
            subject: PubKeyHex;
            serialNumber: Base64String;
            certifier: PubKeyHex;
            revocationOutpoint: OutpointString;
            signature: HexString;
            fields: Record<CertificateFieldNameUnder50Bytes, string>;
        };
        fieldsToReveal: CertificateFieldNameUnder50Bytes[];
        verifier: PubKeyHex;
        privileged?: BooleanDefaultFalse;
        privilegedReason?: DescriptionString5to50Bytes;
    }): Promise<{
        keyringForVerifier: Record<CertificateFieldNameUnder50Bytes, Base64String>;
    }> 
    async relinquishCertificate(args: {
        type: Base64String;
        serialNumber: Base64String;
        certifier: PubKeyHex;
    }): Promise<{
        relinquished: true;
    }> 
    async discoverByIdentityKey(args: {
        identityKey: PubKeyHex;
        limit?: PositiveIntegerDefault10Max10000;
        offset?: PositiveIntegerOrZero;
    }): Promise<{
        totalCertificates: PositiveIntegerOrZero;
        certificates: Array<{
            type: Base64String;
            subject: PubKeyHex;
            serialNumber: Base64String;
            certifier: PubKeyHex;
            revocationOutpoint: OutpointString;
            signature: HexString;
            fields: Record<CertificateFieldNameUnder50Bytes, Base64String>;
            certifierInfo: {
                name: EntityNameStringMax100Bytes;
                iconUrl: EntityIconURLStringMax500Bytes;
                description: DescriptionString5to50Bytes;
                trust: PositiveIntegerMax10;
            };
            publiclyRevealedKeyring: Record<CertificateFieldNameUnder50Bytes, Base64String>;
            decryptedFields: Record<CertificateFieldNameUnder50Bytes, string>;
        }>;
    }> 
    async discoverByAttributes(args: {
        attributes: Record<CertificateFieldNameUnder50Bytes, string>;
        limit?: PositiveIntegerDefault10Max10000;
        offset?: PositiveIntegerOrZero;
    }): Promise<{
        totalCertificates: PositiveIntegerOrZero;
        certificates: Array<{
            type: Base64String;
            subject: PubKeyHex;
            serialNumber: Base64String;
            certifier: PubKeyHex;
            revocationOutpoint: OutpointString;
            signature: HexString;
            fields: Record<CertificateFieldNameUnder50Bytes, Base64String>;
            certifierInfo: {
                name: EntityNameStringMax100Bytes;
                iconUrl: EntityIconURLStringMax500Bytes;
                description: DescriptionString5to50Bytes;
                trust: PositiveIntegerMax10;
            };
            publiclyRevealedKeyring: Record<CertificateFieldNameUnder50Bytes, Base64String>;
            decryptedFields: Record<CertificateFieldNameUnder50Bytes, string>;
        }>;
    }> 
    async isAuthenticated(args: {}): Promise<{
        authenticated: true;
    }> 
    async waitForAuthentication(args: {}): Promise<{
        authenticated: true;
    }> 
    async getHeight(args: {}): Promise<{
        height: PositiveInteger;
    }> 
    async getHeaderForHeight(args: {
        height: PositiveInteger;
    }): Promise<{
        header: HexString;
    }> 
    async getNetwork(args: {}): Promise<{
        network: "mainnet" | "testnet";
    }> 
    async getVersion(args: {}): Promise<{
        version: VersionString7To30Bytes;
    }> 
}

See also: BEEF, Base64String, BasketStringUnder300Bytes, BooleanDefaultFalse, BooleanDefaultTrue, Byte, CallType, CertificateFieldNameUnder50Bytes, DescriptionString5to50Bytes, EntityIconURLStringMax500Bytes, EntityNameStringMax100Bytes, HexString, ISOTimestampString, KeyIDStringUnder800Bytes, LabelStringUnder300Bytes, OutpointString, OutputTagStringUnder300Bytes, PositiveInteger, PositiveIntegerDefault10Max10000, PositiveIntegerMax10, PositiveIntegerOrZero, ProtocolString5To400Bytes, PubKeyHex, SatoshiValue, SecurityLevel, TXIDHexString, VersionString7To30Bytes, WalletInterface, decrypt, encrypt

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Functions

Types

     
AcquireCertificateResult EntityIconURLStringMax500Bytes PositiveIntegerMax10
AcquisitionProtocol EntityNameStringMax100Bytes PositiveIntegerOrZero
ActionStatus ErrorCodeString10To40Bytes ProtocolString5To400Bytes
AtomicBEEF ErrorDescriptionString20To200Bytes PubKeyHex
BEEF HexString SatoshiValue
Base64String ISOTimestampString SecurityLevel
BasketStringUnder300Bytes KeyIDStringUnder800Bytes SendWithResultStatus
BooleanDefaultFalse KeyringRevealer TXIDHexString
BooleanDefaultTrue LabelStringUnder300Bytes TrustSelf
Byte OriginatorDomainNameStringUnder250Bytes VersionString7To30Bytes
CallType OutpointString WalletCounterparty
CertificateFieldNameUnder50Bytes OutputTagStringUnder300Bytes WalletErrorCode
Counterparty PositiveInteger WalletNetwork
DescriptionString5to50Bytes PositiveIntegerDefault10Max10000 WalletProtocol

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: AcquireCertificateResult

export type AcquireCertificateResult = WalletCertificate

See also: WalletCertificate

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: AcquisitionProtocol

export type AcquisitionProtocol = "direct" | "issuance"

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: ActionStatus

export type ActionStatus = "completed" | "unprocessed" | "sending" | "unproven" | "unsigned" | "nosend" | "nonfinal"

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: AtomicBEEF

export type AtomicBEEF = Byte[]

See also: Byte

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: BEEF

export type BEEF = Byte[]

See also: Byte

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: Base64String

export type Base64String = string

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: BasketStringUnder300Bytes

export type BasketStringUnder300Bytes = string

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: BooleanDefaultFalse

export type BooleanDefaultFalse = boolean

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: BooleanDefaultTrue

export type BooleanDefaultTrue = boolean

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: Byte

export type Byte = number

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: CallType

export type CallType = keyof typeof calls

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: CertificateFieldNameUnder50Bytes

export type CertificateFieldNameUnder50Bytes = string

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: Counterparty

export type Counterparty = PublicKey | PubKeyHex | "self" | "anyone"

See also: PubKeyHex, PublicKey

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: DescriptionString5to50Bytes

export type DescriptionString5to50Bytes = string

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: EntityIconURLStringMax500Bytes

export type EntityIconURLStringMax500Bytes = string

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: EntityNameStringMax100Bytes

export type EntityNameStringMax100Bytes = string

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: ErrorCodeString10To40Bytes

export type ErrorCodeString10To40Bytes = string

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: ErrorDescriptionString20To200Bytes

export type ErrorDescriptionString20To200Bytes = string

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: HexString

export type HexString = string

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: ISOTimestampString

export type ISOTimestampString = string

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: KeyIDStringUnder800Bytes

export type KeyIDStringUnder800Bytes = string

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: KeyringRevealer

export type KeyringRevealer = PubKeyHex | "certifier"

See also: PubKeyHex

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: LabelStringUnder300Bytes

export type LabelStringUnder300Bytes = string

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: OriginatorDomainNameStringUnder250Bytes

export type OriginatorDomainNameStringUnder250Bytes = string

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: OutpointString

export type OutpointString = string

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: OutputTagStringUnder300Bytes

export type OutputTagStringUnder300Bytes = string

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: PositiveInteger

export type PositiveInteger = number

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: PositiveIntegerDefault10Max10000

export type PositiveIntegerDefault10Max10000 = number

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: PositiveIntegerMax10

export type PositiveIntegerMax10 = number

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: PositiveIntegerOrZero

export type PositiveIntegerOrZero = number

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: ProtocolString5To400Bytes

export type ProtocolString5To400Bytes = string

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: PubKeyHex

export type PubKeyHex = HexString

See also: HexString

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: SatoshiValue

export type SatoshiValue = number

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: SecurityLevel

SecurityLevel for protocols. 0 = Silently grants the request with no user interation. 1 = Requires user approval for every application. 2 = Requires user approval per counterparty per application.

export type SecurityLevel = 0 | 1 | 2

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: SendWithResultStatus

export type SendWithResultStatus = "unproven" | "sending" | "failed"

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: TXIDHexString

export type TXIDHexString = HexString

See also: HexString

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: TrustSelf

Controls behavior of input BEEF validation.

If known, input transactions may omit supporting validity proof data for all TXIDs known to this wallet.

If undefined, input BEEFs must be complete and valid.

export type TrustSelf = "known"

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: VersionString7To30Bytes

export type VersionString7To30Bytes = string

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: WalletCounterparty

export type WalletCounterparty = PubKeyHex | "self" | "anyone"

See also: PubKeyHex

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: WalletErrorCode

export type WalletErrorCode = keyof typeof walletErrors

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: WalletNetwork

export type WalletNetwork = "mainnet" | "testnet"

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Type: WalletProtocol

export type WalletProtocol = [
    SecurityLevel,
    ProtocolString5To400Bytes
]

See also: ProtocolString5To400Bytes, SecurityLevel

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Enums

Enum: SecurityLevels

export enum SecurityLevels {
    Silent = 0,
    App = 1,
    Counterparty = 2
}

See also: Counterparty

Links: API, Interfaces, Classes, Functions, Types, Enums, Variables


Variables