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

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    yellowcardClient: YellowcardClient

    Methods

    • Parameters

      • args: Pick<
            YellowcardWithdrawalQuote,
            "deviceIpAddress"
            | "deviceLocation"
            | "entityId",
        > & {
            channelId?: string;
            country: string;
            customerId: 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";
        }

      Returns Promise<
          | { ok: true; value: YellowcardWithdrawalQuote }
          | {
              error:
                  | ServiceError<"LIMIT_EXCEEDED", ProductLimitViolation>
                  | ServiceError<
                      "PRODUCT_BLOCKED"
                      | "PRODUCT_INACTIVE"
                      | "NO_ELIGIBLE_ROUTE",
                  >
                  | ServiceError<QuoteInvariantViolation>
                  | ServiceError<
                      "ENTITY_NOT_FOUND"
                      | "ENTITY_CANNOT_TRANSACT"
                      | "NO_COUNTRY",
                  >
                  | ServiceError<"UNSUPPORTED_COUNTRY" | "UNSUPPORTED_PRODUCT">
                  | ServiceError<"IDENTITY_NOT_ACTIVE" | "IDENTITY_MISSING_NAME">
                  | 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;
          }[],
      >