export interface PortalApiSuccessEnvelope { data: T metadata?: Record } // -- Shared enums & primitives -- export type NoahPaymentMethodType = | 'BankAch' | 'BankFedNow' | 'BankFedwire' | 'BankLocal' | 'BankSepa' | 'BankSortCode' | 'BankSwift' | 'IdentifierAlias' | 'IdentifierMerchantID' | 'IdentifierMobileMoney' | 'IdentifierPix' | 'IdentifierQr' | 'TokenizedCard' export type FiatPaymentMethodCategory = 'Bank' | 'Card' | 'Identifier' export type FiatPaymentMethodDisplayType = | 'FiatPaymentMethodBankDisplay' | 'FiatPaymentMethodCardDisplay' | 'FiatPaymentMethodIdentifierDisplay' export type NoahComparisonOperator = 'EQ' | 'LTEQ' | 'GTEQ' export type NoahProcessingTier = 'Standard' | 'Priority' export type TransactionBreakdownType = 'ChannelFee' | 'BusinessFee' | 'Remaining' export interface TransactionBreakdownItem { type: TransactionBreakdownType amount: string } export interface NoahSellQuote { signedQuote: string expiry: string } /** Richer fee object returned by payin and related payment method responses. */ export interface NoahFeeDetails { fiatCurrencyCode: string totalFeePct: string totalFeeBase: string totalFeeMin: string } /** Optional business-level fee configuration passed on payout/quote/payin requests. */ export interface NoahBusinessFee { feeBase?: string feePct?: string fiatCurrency?: string } export type BusinessFeesInput = Record // -- KYC -- export interface NoahInitiateKycRequest { returnUrl: string fiatOptions?: { fiatCurrencyCode: string }[] customerType?: 'Individual' | 'Business' metadata?: Record form?: Record } export interface NoahInitiateKycResponseData { hostedUrl: string } export type NoahInitiateKycResponse = PortalApiSuccessEnvelope // -- Payin -- export interface NoahInitiatePayinRequest { fiatCurrency: string cryptoCurrency: string network: string destinationAddress: string businessFees?: BusinessFeesInput } export interface NoahBankAddress { street: string street2?: string city: string postCode: string state: string country: string } export interface BankToAddressRelatedPaymentMethod { paymentMethodId: string paymentMethodType: NoahPaymentMethodType fee: NoahFeeDetails details: { accountNumber?: string bankCode?: string } } export interface BankDetails { paymentMethodId: string paymentMethodType: NoahPaymentMethodType accountNumber: string cryptoCurrency: string network: string fee: NoahFeeDetails accountHolderName?: string bankCode?: string bankName?: string bankAddress?: NoahBankAddress reference?: string relatedPaymentMethods?: BankToAddressRelatedPaymentMethod[] } export interface NoahInitiatePayinResponseData { payinId: string cryptoCurrency: string fee: NoahFeeDetails bankDetails: BankDetails } export type NoahInitiatePayinResponse = PortalApiSuccessEnvelope export interface NoahSimulatePayinRequest { paymentMethodId: string fiatAmount: string fiatCurrency: string } export interface NoahSimulatePayinResponseData { fiatDepositId: string reference?: string } export type NoahSimulatePayinResponse = PortalApiSuccessEnvelope // -- Payout countries -- export interface NoahGetPayoutCountriesResponseData { countries: Record } export type NoahGetPayoutCountriesResponse = PortalApiSuccessEnvelope // -- Payout channels -- export interface NoahGetPayoutChannelsRequest { cryptoCurrency: string country?: string fiatCurrency?: string fiatAmount?: string paymentMethodId?: string pageSize?: number pageToken?: string } export interface ChannelLimits { minLimit: string maxLimit?: string } export interface ChannelCalculated { totalFee: string } export interface Channel { id: string paymentMethodCategory: FiatPaymentMethodCategory paymentMethodType: NoahPaymentMethodType fiatCurrency: string country: string limits: ChannelLimits rate: string processingSeconds: number calculated?: ChannelCalculated processingTier?: NoahProcessingTier issuer?: string paymentMethods?: PaymentMethodDisplay[] } export interface NoahGetPayoutChannelsResponseData { items: Channel[] pageToken?: string } export type NoahGetPayoutChannelsResponse = PortalApiSuccessEnvelope export interface NoahGetPayoutChannelFormResponseData { formSchema?: Record formMetadata?: { contentHash: string } } export type NoahGetPayoutChannelFormResponse = PortalApiSuccessEnvelope // -- Payment methods -- export interface PaymentMethodDetails { type: FiatPaymentMethodDisplayType accountNumber?: string bankCode?: string routingNumber?: string swiftCode?: string bankingSystems?: string[] bankName?: string bankAddress?: NoahBankAddress last4?: string scheme?: string identifierType?: string identifier?: string } export interface PaymentMethodDisplay { id: string paymentMethodType: NoahPaymentMethodType details: PaymentMethodDetails accountHolderDetails?: AccountHolderDetails issuerDetails?: IssuerDetails } /** Name components for the account holder. */ export interface AccountHolderName { firstName: string lastName: string middleName?: string } export interface AccountHolderDetails { /** Structured name; use firstName/lastName rather than a flat string. */ name?: AccountHolderName } export interface IssuerDetails { name?: string } export interface PaymentMethod { id: string paymentMethodCategory: FiatPaymentMethodCategory paymentMethodType: NoahPaymentMethodType details: PaymentMethodDetails accountHolderDetails?: AccountHolderDetails issuerDetails?: IssuerDetails } export interface NoahGetPaymentMethodsRequest { pageSize?: number pageToken?: string capability?: 'PayoutFrom' | 'PayinTo' | 'PayoutTo' } export interface NoahGetPaymentMethodsResponseData { paymentMethods: PaymentMethod[] pageToken?: string } export type NoahGetPaymentMethodsResponse = PortalApiSuccessEnvelope // -- Payout quote -- export interface BasePayoutQuoteRequest { channelId: string cryptoCurrency: string form?: Record fiatCurrency?: string paymentMethodId?: string quoted?: boolean businessFee?: NoahBusinessFee } export type NoahGetPayoutQuoteRequest = | (BasePayoutQuoteRequest & { fiatAmount: string cryptoAmount?: never }) | (BasePayoutQuoteRequest & { cryptoAmount: string fiatAmount?: never }) export interface FormNextStep { stepId: 'Vop' | 'Cob' | 'PaymentDetails' stepType: 'Ack' | 'DataEntry' schema: Record } export interface NoahGetPayoutQuoteResponseData { payoutId: string totalFee: string cryptoAmountEstimate: string cryptoAuthorizedAmount: string formSessionId: string rate?: string breakdown?: TransactionBreakdownItem[] quote?: NoahSellQuote /** Disclosure: crypto currency for this quote. */ cryptoCurrency?: string /** Disclosure: fiat currency for this quote. */ fiatCurrency?: string /** Disclosure: fiat amount for this quote. */ fiatAmount?: string nextStep?: FormNextStep } export type NoahGetPayoutQuoteResponse = PortalApiSuccessEnvelope // -- Payout trigger & initiation -- export interface AmountCondition { comparisonOperator: NoahComparisonOperator value: string } export interface DepositSourceTriggerCondition { amountConditions: AmountCondition[] cryptoCurrency: string network: string /** Runtime value is always a plain string, not an object. */ destinationAddress: string } /** Supported Solana CAIP-2 IDs for payout deposit flows. */ export type NoahSolanaCaipId = | 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1' | 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' export type NoahOnchainDepositSourceTriggerType = | 'SingleOnchainDepositSourceTriggerInput' | 'PermanentOnchainDepositSourceTriggerInput' | 'QuotedOnchainDepositSourceTriggerInput' export interface NoahSingleOnchainDepositSourceTriggerInput { Type: 'SingleOnchainDepositSourceTriggerInput' Conditions: { AmountConditions: { ComparisonOperator: NoahComparisonOperator; Value: string }[] Network: string }[] SourceAddress: string Expiry: string Nonce: string } export interface NoahPermanentOnchainDepositSourceTriggerInput { Type: 'PermanentOnchainDepositSourceTriggerInput' Conditions: { AmountConditions: { ComparisonOperator: NoahComparisonOperator; Value: string }[] Network: string }[] SourceAddress: string Expiry: string Nonce: string } export interface NoahQuotedOnchainDepositSourceTriggerInput { Type: 'QuotedOnchainDepositSourceTriggerInput' Conditions: { AmountConditions: { ComparisonOperator: NoahComparisonOperator; Value: string }[] Network: string }[] SourceAddress: string Expiry: string Nonce: string } export type NoahOnchainDepositSourceTriggerInput = | NoahSingleOnchainDepositSourceTriggerInput | NoahPermanentOnchainDepositSourceTriggerInput | NoahQuotedOnchainDepositSourceTriggerInput export interface NoahInitiatePayoutRequest { payoutId: string sourceAddress: string expiry: string nonce: string network: string businessFee?: NoahBusinessFee fiatAmount?: string trigger?: NoahOnchainDepositSourceTriggerInput } export interface NoahInitiatePayoutResponseData { destinationAddress: string | null conditions: DepositSourceTriggerCondition[] ruleId?: string } export type NoahInitiatePayoutResponse = PortalApiSuccessEnvelope