Options
All
  • Public
  • Public/Protected
  • All
Menu

Module taler-wallet-core/src

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Type aliases

AnyStoreMap

AnyStoreMap: {}

Type declaration

  • [s: string]: Store<any, any>

CoinSource

PendingOperationInfo

Information about a pending operation.

WalletRefundItem

State of one refund from the merchant, maintained by the wallet.

Variables

Const MetaStores

MetaStores: { metaConfig: MetaConfigStore } = ...

Type declaration

Const Stores

Stores: { backupProviders: BackupProvidersStore; bankWithdrawUris: BankWithdrawUrisStore; coins: CoinsStore; config: ConfigStore; currencies: CurrenciesStore; denominations: DenominationsStore; depositGroups: DepositGroupsStore; exchanges: ExchangesStore; ghostDepositGroups: Store<"ghostDepositGroups", GhostDepositGroupRecord>; planchets: PlanchetsStore; proposals: ProposalsStore; purchases: PurchasesStore; recoupGroups: Store<"recoupGroups", RecoupGroupRecord>; refreshGroups: Store<"refreshGroups", RefreshGroupRecord>; reserves: ReservesStore; tips: TipsStore; withdrawalGroups: WithdrawalGroupsStore } = ...

The stores and indices for the wallet database.

Type declaration

  • backupProviders: BackupProvidersStore
  • bankWithdrawUris: BankWithdrawUrisStore
  • coins: CoinsStore
  • config: ConfigStore
  • currencies: CurrenciesStore
  • denominations: DenominationsStore
  • depositGroups: DepositGroupsStore
  • exchanges: ExchangesStore
  • ghostDepositGroups: Store<"ghostDepositGroups", GhostDepositGroupRecord>
  • planchets: PlanchetsStore
  • proposals: ProposalsStore
  • purchases: PurchasesStore
  • recoupGroups: Store<"recoupGroups", RecoupGroupRecord>
  • refreshGroups: Store<"refreshGroups", RefreshGroupRecord>
  • reserves: ReservesStore
  • tips: TipsStore
  • withdrawalGroups: WithdrawalGroupsStore

Const TransactionAbort

TransactionAbort: typeof TransactionAbort = ...

Exception that should be thrown by client code to abort a transaction.

Const URL

URL: URLCtor = ...

Const WALLET_BANK_INTEGRATION_PROTOCOL_VERSION

WALLET_BANK_INTEGRATION_PROTOCOL_VERSION: "0:0:0" = "0:0:0"

Protocol version spoken with the merchant.

Uses libtool's current:revision:age versioning.

Const WALLET_CACHE_BREAKER_CLIENT_VERSION

WALLET_CACHE_BREAKER_CLIENT_VERSION: "3" = "3"

Cache breaker that is appended to queries such as /keys and /wire to break through caching, if it has been accidentally/badly configured by the exchange.

This is only a temporary measure.

Const WALLET_DB_MINOR_VERSION

WALLET_DB_MINOR_VERSION: 1 = 1

Current database minor version, should be incremented each time we do minor schema changes on the database. A change is considered minor when fields are added in a backwards-compatible way or object stores and indices are added.

Const WALLET_EXCHANGE_PROTOCOL_VERSION

WALLET_EXCHANGE_PROTOCOL_VERSION: "9:0:0" = "9:0:0"

Protocol version spoken with the exchange.

Uses libtool's current:revision:age versioning.

Const WALLET_MERCHANT_PROTOCOL_VERSION

WALLET_MERCHANT_PROTOCOL_VERSION: "1:0:0" = "1:0:0"

Protocol version spoken with the merchant.

Uses libtool's current:revision:age versioning.

Let jed

jed: any = ...

Const strings

strings: {} = {}

Type declaration

  • [s: string]: any

Const walletCoreDebugFlags

walletCoreDebugFlags: WalletCoreDebugFlags = ...

Functions

bytesToString

  • bytesToString(b: Uint8Array): string
  • Parameters

    • b: Uint8Array

    Returns string

checkSuccessResponseOrThrow

  • checkSuccessResponseOrThrow(httpResponse: HttpResponse): Promise<void>
  • Parameters

    Returns Promise<void>

createEcdheKeyPair

  • Returns EcdheKeyPair

createEddsaKeyPair

  • Returns EddsaKeyPair

createHashContext

  • createHashContext(): nacl.HashState
  • Returns nacl.HashState

decodeCrock

  • decodeCrock(encoded: string): Uint8Array
  • Parameters

    • encoded: string

    Returns Uint8Array

deleteTalerDatabase

  • deleteTalerDatabase(idbFactory: IDBFactory): void
  • Parameters

    • idbFactory: IDBFactory

    Returns void

ecdheGetPublic

  • ecdheGetPublic(ecdhePriv: Uint8Array): Uint8Array
  • Parameters

    • ecdhePriv: Uint8Array

    Returns Uint8Array

eddsaGetPublic

  • eddsaGetPublic(eddsaPriv: Uint8Array): Uint8Array
  • Parameters

    • eddsaPriv: Uint8Array

    Returns Uint8Array

eddsaSign

  • eddsaSign(msg: Uint8Array, eddsaPriv: Uint8Array): Uint8Array
  • Parameters

    • msg: Uint8Array
    • eddsaPriv: Uint8Array

    Returns Uint8Array

eddsaVerify

  • eddsaVerify(msg: Uint8Array, sig: Uint8Array, eddsaPub: Uint8Array): boolean
  • Parameters

    • msg: Uint8Array
    • sig: Uint8Array
    • eddsaPub: Uint8Array

    Returns boolean

encodeCrock

  • encodeCrock(data: ArrayBuffer): string
  • Parameters

    • data: ArrayBuffer

    Returns string

getDefaultNodeWallet

  • Get a wallet instance with default settings for node.

    Parameters

    Returns Promise<Wallet>

getExpiryTimestamp

  • getExpiryTimestamp(httpResponse: HttpResponse, opt: { minDuration?: Duration }): Timestamp
  • Get the timestamp at which the response's content is considered expired.

    Parameters

    • httpResponse: HttpResponse
    • opt: { minDuration?: Duration }
      • Optional minDuration?: Duration

    Returns Timestamp

getHttpResponseErrorDetails

  • getHttpResponseErrorDetails(httpResponse: HttpResponse): Record<string, unknown>
  • Parameters

    Returns Record<string, unknown>

getJsonI18n

  • getJsonI18n<K>(obj: Record<K, string>, key: K): string
  • Get an internationalized string (based on the globally set, current language) from a JSON object. Fall back to the default language of the JSON object if no match exists.

    Type parameters

    • K: string

    Parameters

    • obj: Record<K, string>
    • key: K

    Returns string

getRandomBytes

  • getRandomBytes(n: number): Uint8Array
  • Parameters

    • n: number

    Returns Uint8Array

guardOperationException

  • guardOperationException<T>(op: () => Promise<T>, onOpError: (e: TalerErrorDetails) => Promise<void>): Promise<T>
  • Run an operation and call the onOpError callback when there was an exception or operation error that must be reported. The cause will be re-thrown to the caller.

    Type parameters

    • T

    Parameters

    • op: () => Promise<T>
        • (): Promise<T>
        • Returns Promise<T>

    • onOpError: (e: TalerErrorDetails) => Promise<void>
        • (e: TalerErrorDetails): Promise<void>
        • Parameters

          • e: TalerErrorDetails

          Returns Promise<void>

    Returns Promise<T>

handleWorkerError

  • handleWorkerError(e: Error): void
  • Parameters

    • e: Error

    Returns void

handleWorkerMessage

  • handleWorkerMessage(msg: any): void
  • This function is executed in the worker thread to handle a message.

    Parameters

    • msg: any

    Returns void

hash

  • hash(d: Uint8Array): Uint8Array
  • Parameters

    • d: Uint8Array

    Returns Uint8Array

internalSetStrings

  • internalSetStrings(langStrings: any): void
  • Use different translations for testing. Should not be used outside of test cases.

    Parameters

    • langStrings: any

    Returns void

keyExchangeEcdheEddsa

  • keyExchangeEcdheEddsa(ecdhePriv: Uint8Array, eddsaPub: Uint8Array): Uint8Array
  • Parameters

    • ecdhePriv: Uint8Array
    • eddsaPub: Uint8Array

    Returns Uint8Array

keyExchangeEddsaEcdhe

  • keyExchangeEddsaEcdhe(eddsaPriv: Uint8Array, ecdhePub: Uint8Array): Uint8Array
  • Parameters

    • eddsaPriv: Uint8Array
    • ecdhePub: Uint8Array

    Returns Uint8Array

makeErrorDetails

  • makeErrorDetails(ec: TalerErrorCode, message: string, details: Record<string, unknown>): TalerErrorDetails
  • Parameters

    • ec: TalerErrorCode
    • message: string
    • details: Record<string, unknown>

    Returns TalerErrorDetails

openDatabase

  • openDatabase(idbFactory: IDBFactory, databaseName: string, databaseVersion: number, onVersionChange: () => void, onUpgradeNeeded: (db: IDBDatabase, oldVersion: number, newVersion: number, upgradeTransaction: IDBTransaction) => void): Promise<IDBDatabase>
  • Return a promise that resolves to the opened IndexedDB database.

    Parameters

    • idbFactory: IDBFactory
    • databaseName: string
    • databaseVersion: number
    • onVersionChange: () => void
        • (): void
        • Returns void

    • onUpgradeNeeded: (db: IDBDatabase, oldVersion: number, newVersion: number, upgradeTransaction: IDBTransaction) => void
        • (db: IDBDatabase, oldVersion: number, newVersion: number, upgradeTransaction: IDBTransaction): void
        • Parameters

          • db: IDBDatabase
          • oldVersion: number
          • newVersion: number
          • upgradeTransaction: IDBTransaction

          Returns void

    Returns Promise<IDBDatabase>

openPromise

  • Get an unresolved promise together with its extracted resolve / reject function.

    Type parameters

    • T

    Returns OpenedPromise<T>

openTalerDatabase

  • openTalerDatabase(idbFactory: IDBFactory, onVersionChange: () => void): Promise<Database<typeof Stores>>
  • Return a promise that resolves to the taler wallet db.

    Parameters

    • idbFactory: IDBFactory
    • onVersionChange: () => void
        • (): void
        • Returns void

    Returns Promise<Database<typeof Stores>>

readSuccessResponseJsonOrErrorCode

  • readSuccessResponseJsonOrErrorCode<T>(httpResponse: HttpResponse, codec: Codec<T>): Promise<ResponseOrError<T>>
  • Type parameters

    • T

    Parameters

    Returns Promise<ResponseOrError<T>>

readSuccessResponseJsonOrThrow

  • readSuccessResponseJsonOrThrow<T>(httpResponse: HttpResponse, codec: Codec<T>): Promise<T>
  • Type parameters

    • T

    Parameters

    Returns Promise<T>

readSuccessResponseTextOrErrorCode

  • readSuccessResponseTextOrErrorCode<T>(httpResponse: HttpResponse): Promise<ResponseOrError<string>>
  • Type parameters

    • T

    Parameters

    Returns Promise<ResponseOrError<string>>

readSuccessResponseTextOrThrow

  • readSuccessResponseTextOrThrow<T>(httpResponse: HttpResponse): Promise<string>
  • Type parameters

    • T

    Parameters

    Returns Promise<string>

readTalerErrorResponse

  • readTalerErrorResponse(httpResponse: HttpResponse): Promise<TalerErrorDetails>
  • Parameters

    Returns Promise<TalerErrorDetails>

rsaBlind

  • rsaBlind(hm: Uint8Array, bks: Uint8Array, rsaPubEnc: Uint8Array): Uint8Array
  • Parameters

    • hm: Uint8Array
    • bks: Uint8Array
    • rsaPubEnc: Uint8Array

    Returns Uint8Array

rsaUnblind

  • rsaUnblind(sig: Uint8Array, rsaPubEnc: Uint8Array, bks: Uint8Array): Uint8Array
  • Parameters

    • sig: Uint8Array
    • rsaPubEnc: Uint8Array
    • bks: Uint8Array

    Returns Uint8Array

rsaVerify

  • rsaVerify(hm: Uint8Array, rsaSig: Uint8Array, rsaPubEnc: Uint8Array): boolean
  • Parameters

    • hm: Uint8Array
    • rsaSig: Uint8Array
    • rsaPubEnc: Uint8Array

    Returns boolean

setupI18n

  • setupI18n(lang: string): any
  • Set up jed library for internationalization, based on browser language settings.

    Parameters

    • lang: string

    Returns any

setupRefreshPlanchet

  • setupRefreshPlanchet(secretSeed: Uint8Array, coinNumber: number): FreshCoin
  • Parameters

    • secretSeed: Uint8Array
    • coinNumber: number

    Returns FreshCoin

setupRefreshTransferPub

  • setupRefreshTransferPub(secretSeed: Uint8Array, transferPubIndex: number): EcdheKeyPair
  • Parameters

    • secretSeed: Uint8Array
    • transferPubIndex: number

    Returns EcdheKeyPair

setupTipPlanchet

  • setupTipPlanchet(secretSeed: Uint8Array, coinNumber: number): FreshCoin
  • Parameters

    • secretSeed: Uint8Array
    • coinNumber: number

    Returns FreshCoin

setupWithdrawPlanchet

  • setupWithdrawPlanchet(secretSeed: Uint8Array, coinNumber: number): FreshCoin
  • Parameters

    • secretSeed: Uint8Array
    • coinNumber: number

    Returns FreshCoin

str

  • str(stringSeq: TemplateStringsArray, ...values: any[]): string
  • Internationalize a string template with arbitrary serialized values.

    Parameters

    • stringSeq: TemplateStringsArray
    • Rest ...values: any[]

    Returns string

stringToBytes

  • stringToBytes(s: string): Uint8Array
  • Parameters

    • s: string

    Returns Uint8Array

throwUnexpectedRequestError

  • throwUnexpectedRequestError(httpResponse: HttpResponse, talerErrorResponse: TalerErrorResponse): never
  • Parameters

    • httpResponse: HttpResponse
    • talerErrorResponse: TalerErrorResponse

    Returns never

Generated using TypeDoc