Open Cap Table Protocol Canton SDK - v0.2.125
    Preparing search index...

    Function buildPaymentContextWithAmulets

    • Build payment context with payer's amulets for initial paymentStream approval

      Queries the ledger for:

      • Payer's Amulet contracts (via Validator API)
      • AmuletRules contract
      • OpenMiningRound contract
      • FeaturedAppRight contract

      Selects the minimum number of amulets needed to cover the requested amount, choosing largest amulets first to minimize the number of inputs.

      Returns both the payment context and the disclosed contracts needed

      NOTE: The validatorClient must be authenticated as the payerParty

      Parameters

      • validatorClient: ValidatorApiClient

        Validator API client authenticated as payer

      • payerParty: string

        Party ID of the payer (for validation only)

      • requestedAmount: string

        Amount in CC needed for the payment

      • provider: string

        Provider party ID for featured app right lookup

      Returns Promise<PaymentContextWithAmuletsAndDisclosed>