Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • CryptoImplementation

Index

Constructors

constructor

Properties

Static enableTracing

enableTracing: boolean = false

Methods

benchmark

  • benchmark(repetitions: number): BenchmarkResult
  • Parameters

    • repetitions: number

    Returns BenchmarkResult

createEddsaKeypair

  • createEddsaKeypair(): { priv: string; pub: string }
  • Create a new EdDSA key pair.

    Returns { priv: string; pub: string }

    • priv: string
    • pub: string

createPlanchet

  • createPlanchet(req: PlanchetCreationRequest): PlanchetCreationResult
  • Create a pre-coin of the given denomination to be withdrawn from then given reserve.

    Parameters

    • req: PlanchetCreationRequest

    Returns PlanchetCreationResult

createRecoupRequest

  • createRecoupRequest(coin: CoinRecord): RecoupRequest
  • Create and sign a message to recoup a coin.

    Parameters

    Returns RecoupRequest

createTipPlanchet

  • createTipPlanchet(req: DeriveTipRequest): DerivedTipPlanchet
  • Create a planchet used for tipping, including the private keys.

    Parameters

    • req: DeriveTipRequest

    Returns DerivedTipPlanchet

deriveRefreshSession

  • deriveRefreshSession(req: DeriveRefreshSessionRequest): DerivedRefreshSession
  • Parameters

    • req: DeriveRefreshSessionRequest

    Returns DerivedRefreshSession

hashEncoded

  • hashEncoded(encodedBytes: string): string
  • Hash a crockford encoded value.

    Parameters

    • encodedBytes: string

    Returns string

hashString

  • hashString(str: string): string
  • Hash a string including the zero terminator.

    Parameters

    • str: string

    Returns string

isValidContractTermsSignature

  • isValidContractTermsSignature(contractTermsHash: string, sig: string, merchantPub: string): boolean
  • Parameters

    • contractTermsHash: string
    • sig: string
    • merchantPub: string

    Returns boolean

isValidDenom

  • Check if the signature of a denomination is valid.

    Parameters

    Returns boolean

isValidPaymentSignature

  • isValidPaymentSignature(sig: string, contractHash: string, merchantPub: string): boolean
  • Check if a payment signature is valid.

    Parameters

    • sig: string
    • contractHash: string
    • merchantPub: string

    Returns boolean

isValidWireAccount

  • isValidWireAccount(paytoUri: string, sig: string, masterPub: string): boolean
  • Parameters

    • paytoUri: string
    • sig: string
    • masterPub: string

    Returns boolean

isValidWireFee

  • isValidWireFee(type: string, wf: WireFee, masterPub: string): boolean
  • Check if a wire fee is correctly signed.

    Parameters

    • type: string
    • wf: WireFee
    • masterPub: string

    Returns boolean

makeSyncSignature

  • makeSyncSignature(req: MakeSyncSignatureRequest): string
  • Parameters

    • req: MakeSyncSignatureRequest

    Returns string

rsaUnblind

  • rsaUnblind(blindedSig: string, bk: string, pk: string): string
  • Unblind a blindly signed value.

    Parameters

    • blindedSig: string
    • bk: string
    • pk: string

    Returns string

rsaVerify

  • rsaVerify(hm: string, sig: string, pk: string): boolean
  • Unblind a blindly signed value.

    Parameters

    • hm: string
    • sig: string
    • pk: string

    Returns boolean

signCoinLink

  • signCoinLink(oldCoinPriv: string, newDenomHash: string, oldCoinPub: string, transferPub: string, coinEv: string): string
  • Parameters

    • oldCoinPriv: string
    • newDenomHash: string
    • oldCoinPub: string
    • transferPub: string
    • coinEv: string

    Returns string

signDepositPermission

  • signDepositPermission(depositInfo: DepositInfo): CoinDepositPermission
  • Generate updated coins (to store in the database) and deposit permissions for each given coin.

    Parameters

    • depositInfo: DepositInfo

    Returns CoinDepositPermission

signTrackTransaction

  • signTrackTransaction(req: SignTrackTransactionRequest): string
  • Parameters

    • req: SignTrackTransactionRequest

    Returns string

Generated using TypeDoc