@cfxlabsinc/b2b-services
    Preparing search index...

    Hierarchy (View Summary)

    Index
    • Parameters

      • args: {
            aiPriseClient: AiPriseClient;
            B2B_TEMPORAL_WORKER_TASK_QUEUE: string;
            db: B2bDatabase;
            identityQueryService: IdentityQueryService;
            paymentInstrumentAdminQueryService: PaymentInstrumentAdminQueryService;
            productQuoteService: ProductQuoteService;
            solanaBackofficeWalletService: SolanaBackofficeWalletService;
            solanaNonceService: SolanaNonceService;
            solanaTokenService: SolanaTokenQueryService;
            solanaTransactionService: SolanaTransactionService;
            temporalClient: Client;
            withdrawalAdminService: WithdrawalAdminService;
            withdrawalQuoteService: WithdrawalQuoteService;
            yellowcardClient: YellowcardClient;
        }

      Returns YellowcardWithdrawalQuoteService

    yellowcardClient: YellowcardClient
    • Parameters

      • args: { customerId: string; quoteId: string; signedTransaction: string }

      Returns Promise<
          | { ok: true; value: { withdrawalId: string } }
          | { error: ServiceError; ok: false },
      >

    • Parameters

      • args: Pick<
            YellowcardWithdrawalQuote,
            "deviceIpAddress"
            | "deviceLocation"
            | "entityId",
        > & {
            channelId?: string;
            country: string;
            customerId: string;
            idempotencyKey?: string;
            kyc?: {
                address: string;
                country: string;
                dob: string;
                email: string;
                idNumber: string;
                idType: string;
                name: string;
                phone: string;
            };
            reason: | "gift"
            | "bills"
            | "groceries"
            | "travel"
            | "health"
            | "entertainment"
            | "housing"
            | "school/fees"
            | "other";
            sourceAmount: BigNumber;
            sourceWalletAddress: string;
            targetCurrency: string;
            targetPaymentInstrument: string;
            withdrawalType: "bank"
            | "momo";
        }
        • OptionalchannelId?: string
        • country: string
        • customerId: string
        • OptionalidempotencyKey?: string

          Caller-supplied idempotency key (from the API Idempotency-Key header). Threaded into productQuoteService.quote() (dedupes the pinned engine quote) and withdrawalQuoteService.create() (dedupes the withdrawal quote). Optional — internal callers don't supply one.

        • Optionalkyc?: {
              address: string;
              country: string;
              dob: string;
              email: string;
              idNumber: string;
              idType: string;
              name: string;
              phone: string;
          }
        • reason:
              | "gift"
              | "bills"
              | "groceries"
              | "travel"
              | "health"
              | "entertainment"
              | "housing"
              | "school/fees"
              | "other"
        • sourceAmount: BigNumber
        • sourceWalletAddress: string
        • targetCurrency: string
        • targetPaymentInstrument: string
        • withdrawalType: "bank" | "momo"

      Returns Promise<
          | { ok: true; value: YellowcardWithdrawalQuote }
          | {
              error:
                  | ServiceError<
                      "PRODUCT_BLOCKED"
                      | "PRODUCT_INACTIVE"
                      | "NO_ELIGIBLE_ROUTE",
                  >
                  | ServiceError<"LIMIT_EXCEEDED", ProductLimitViolation>
                  | ServiceError<QuoteInvariantViolation>
                  | ServiceError<
                      "ENTITY_NOT_FOUND"
                      | "ENTITY_CANNOT_TRANSACT"
                      | "NO_COUNTRY",
                  >
                  | ServiceError<"UNSUPPORTED_COUNTRY" | "UNSUPPORTED_PRODUCT">
                  | ServiceError<"IDENTITY_NOT_ACTIVE">
                  | ServiceError<"NO_AVAILABLE_CHANNELS" | "CHANNEL_NOT_AVAILABLE">
                  | ServiceError<"AMOUNT_BELOW_MINIMUM" | "AMOUNT_ABOVE_MAXIMUM">
                  | ServiceError<"INVALID_INSTRUMENT">
                  | ServiceError<
                      "INSUFFICIENT_FUNDS",
                      { amount: BigNumber; currency: string },
                  >;
              ok: false;
          },
      >

    • Parameters

      • args: {
            country: string;
            customerId: string;
            entityId: string;
            source: { amount: BigNumber };
            targetCurrency: string;
            withdrawalType: "bank" | "momo";
        }

      Returns Promise<
          | { error: ServiceError<string, object>; ok: false }
          | {
              ok: true;
              value: {
                  exchangeRate: BigNumber;
                  fees: Fees;
                  sourceAmount: BigNumber;
                  targetAmountAfterFees: BigNumber;
                  totalFees: BigNumber;
                  withdrawalType: "bank" | "momo";
              };
          },
      >

    • Parameters

      • country: string

      Returns Promise<
          {
              accountNumberType: string;
              channelIds: string[];
              code?: string;
              country: string;
              id: string;
              name: string;
              status: string;
          }[],
      >