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

    Hierarchy

    • UsInstantWithdrawalQuoteQueryService
      • UsInstantWithdrawalQuoteService
    Index
    • Parameters

      • args: {
            B2B_TEMPORAL_WORKER_TASK_QUEUE: string;
            customerQueryService: CustomerQueryService;
            db: B2bDatabase;
            entityService: EntityService;
            ledgerAccountQueryService: LedgerAccountQueryService;
            paymentInstrumentQueryService: PaymentInstrumentQueryService;
            productQuoteService: ProductQuoteService;
            solanaBackofficeLedgerAccountService: SolanaBackofficeLedgerAccountService;
            solanaBackofficeWalletService: SolanaBackofficeWalletService;
            solanaNonceService: SolanaNonceService;
            solanaTokenService: SolanaTokenQueryService;
            solanaTransactionService: SolanaTransactionService;
            temporalClient: Client;
            victorAccountClient: VictorAccountClient;
            victorAccountQueryService: VictorAccountQueryService;
            virtualAccountQueryService: VirtualAccountQueryService;
            withdrawalAdminService: WithdrawalAdminService;
            withdrawalQuoteService: WithdrawalQuoteService;
        }

      Returns UsInstantWithdrawalQuoteService

    • Parameters

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

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

    • Parameters

      • args: Pick<
            UsInstantWithdrawalQuote,
            "deviceIpAddress"
            | "deviceLocation"
            | "entityId",
        > & {
            customerId: string;
            idempotencyKey?: string;
            targetUsInstantPaymentInstrument: string;
        } & (
            ({ sourceAccountId: string; } | { sourceWalletAddress: string; }) & ({ sourceAmount: BigNumber; } | { targetAmount: BigNumber; })
        )
        • 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.

        • targetUsInstantPaymentInstrument: string

      Returns Promise<
          | { ok: true; value: UsInstantWithdrawalQuote }
          | {
              error:
                  | ServiceError<
                      "PRODUCT_BLOCKED"
                      | "PRODUCT_INACTIVE"
                      | "NO_ELIGIBLE_ROUTE",
                  >
                  | ServiceError<"ENTITY_NOT_FOUND" | "ENTITY_CANNOT_TRANSACT">
                  | ServiceError<"LIMIT_EXCEEDED", ProductLimitViolation>
                  | ServiceError<QuoteInvariantViolation>
                  | ServiceError<
                      "INSUFFICIENT_FUNDS",
                      { balance: { amount: BigNumber; currency: string } },
                  >;
              ok: false;
          },
      >

    • Parameters

      • __namedParameters: {
            customerId: string;
            id: string;
            tx?: PgAsyncTransaction<NodePgQueryResultHKT, EmptyRelations>;
        }

      Returns Promise<{ ok: true; value: UsInstantWithdrawalQuote | null }>