openapi: 3.1.0
info:
  title: Portal Client API
  version: '3.0'
  description: >
    The Portal Client API provides endpoints for managing wallets, building
    transactions,

    and interacting with blockchain networks. All endpoints require
    authentication via a

    Client API Key or Client Session Token (CST) passed as a Bearer token.


    ## Base URL

    `https://api.portalhq.io/api/v3`


    ## Authentication

    Include your Client API Key or Client Session Token as a Bearer token in the

    `Authorization` header of every request.


    ## Chain ID Format

    Chain parameters use either friendly names (e.g. `ethereum`, `solana`) or
    CAIP-2 format

    (e.g. `eip155:1`, `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`). When using
    CAIP-2 format

    in URLs, ensure the colon is URI-encoded (`%3A`).
servers:
  - url: https://api.portalhq.io/api/v3
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Clients
    description: Core client management endpoints
  - name: Wallet
    description: >-
      Read wallet state — balances, NFTs, transaction history, capabilities, and
      transaction details
  - name: Transactions
    description: Build, broadcast, and evaluate blockchain transactions
  - name: Funding
    description: Fund wallets with testnet tokens
  - name: Wallet Shares
    description: Manage signing and backup share pairs
  - name: Delegations
    description: Manage token approvals, revocations, and delegated transfers
  - name: Session Keys
    description: Manage EIP-7702 session keys for smart accounts
  - name: 0x
    description: Token swap endpoints powered by the 0x protocol
  - name: Yield.xyz
    description: Yield opportunities and staking actions powered by Yield.xyz
  - name: Li.Fi
    description: Cross-chain swaps and bridging powered by Li.Fi
  - name: Blockaid
    description: Transaction and address security scanning powered by Blockaid
  - name: Hypernative
    description: >-
      Transaction, address, token, and NFT security scanning powered by
      Hypernative
  - name: Noah
    description: KYC onboarding, payins, and payouts powered by Noah
  - name: Meld
    description: Buy and sell crypto with fiat through aggregated providers powered by Meld
  - name: Due
    description: Payins, payouts, virtual accounts, and FX powered by Due
  - name: EIP-7702
    description: EIP-7702 account type detection and authorization management
  - name: Deprecated
    description: >-
      Legacy endpoints scheduled for removal. Use the newer equivalents listed
      in each endpoint's description.
paths:
  /clients/me:
    get:
      operationId: getClientDetails
      summary: Get the client's details
      description: |
        Retrieves the details of the current client, including information about
        associated wallets, backup share pairs, and signing share pairs.
      tags:
        - Clients
      responses:
        '200':
          description: Client details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientDetails'
              example:
                createdAt: '2024-04-16T21:15:06.443Z'
                custodian:
                  id: custodianId
                  name: Custodian Name
                ejectedAt: null
                environment:
                  id: environmentId
                  name: Development
                  backupWithPortalEnabled: true
                  isMultiBackupEnabled: false
                id: clientId
                isAccountAbstracted: false
                metadata:
                  namespaces:
                    eip155:
                      address: '0x0f3f5cea9784e254972d915695dbc9bc2a395faf'
                      curve: SECP256K1
                    solana:
                      address: BrGo1hFAL8MpudNQ6K4YWDaFB838uboUcCpm8C9uyC4R
                      curve: ED25519
                    bip122:
                      address: ''
                      curve: SECP256K1
                      bitcoin:
                        p2wpkh:
                          mainnet: bc1qpl54na90wlmdxj5z4wtz7cpp6p32dc9th54w0m
                          testnet: tb1qpl54na90wlmdxj5z4wtz7cpp6p32dc9tajwa5g
                    stellar:
                      address: GCQTIL5333ASTDBXAJYDIAFRWXYGMR2KPGUNIDNSHOMBINTAMPZJFOKT
                      curve: ED25519
                    tron:
                      address: TBMq3UK8JNvauSc7sPUp7fkoSzTN4PZhP2
                      curve: SECP256K1
                wallets:
                  - createdAt: '2024-04-16T21:15:45.144Z'
                    curve: SECP256K1
                    id: walletId
                    ejectableUntil: null
                    publicKey: '{"x":"...","y":"..."}'
                    backupSharePairs:
                      - backupMethod: PASSWORD
                        createdAt: '2024-04-16T21:15:45.144Z'
                        id: backupSharePairId
                        status: completed
                    signingSharePairs:
                      - createdAt: '2024-04-16T21:15:45.144Z'
                        id: signingSharePairId
                        status: completed
        '400':
          description: Bad request - client, custodian, or environment not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/assets/send/build-transaction:
    post:
      operationId: buildTransaction
      summary: Build a transaction
      description: >
        Creates an unsigned transaction for transferring assets to another
        address on a

        specific chain. You can then use this unsigned transaction to sign and
        submit

        the transaction.


        The response shape varies depending on the chain type (EIP-155, Solana,
        Bitcoin,

        Stellar, or Tron).
      tags:
        - Transactions
      parameters:
        - $ref: '#/components/parameters/chain'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BuildTransactionRequest'
            example:
              to: '0xdFd8302f44727A6348F702fF7B594f127dE3A902'
              token: USDC
              amount: '0.01'
      responses:
        '200':
          description: >
            Unsigned transaction built successfully. The response structure
            depends on the

            chain type.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/Eip155TransactionResult'
                  - $ref: '#/components/schemas/SolanaTransactionResult'
                  - $ref: '#/components/schemas/BitcoinTransactionResult'
                  - $ref: '#/components/schemas/StellarTransactionResult'
                  - $ref: '#/components/schemas/TronTransactionResult'
              examples:
                eip155:
                  summary: EIP-155 (Ethereum, Polygon, Base, etc.)
                  value:
                    transaction:
                      from: '0x54968898742c08da211a1cd355447cd1f37f0649'
                      to: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
                      data: >-
                        0xa9059cbb000000000000000000000000dfd8302f44727a6348f702ff7b594f127de3a9020000000000000000000000000000000000000000000000000000000000002710
                    metadata:
                      amount: '0.01'
                      fromAddress: '0x54968898742c08da211a1cd355447cd1f37f0649'
                      toAddress: '0xdFd8302f44727A6348F702fF7B594f127dE3A902'
                      tokenAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
                      tokenDecimals: 6
                      rawAmount: '10000'
                solana:
                  summary: Solana
                  value:
                    transaction: >-
                      AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAUIXIcyVRnqtuJq4VAVZQPX4M5MFtpcAzLmaNCC62aV...
                    metadata:
                      amount: '0.01'
                      fromAddress: 7EC5TEEAcDseLH6PyqKkPiBasVnsdmrRbRHjN3zkkHFW
                      toAddress: 8APEEA4SHrfGteABQcUmH2yEHy7nEe8DqgvmKGAStHR
                      tokenMintAddress: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                      tokenDecimals: 6
                      tokenProgramId: TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
                      tokenExtensions:
                        - ConfidentialTransferAccount
                        - ConfidentialTransferMint
                      rawAmount: '10000'
                      lastValidBlockHeight: '260129177'
                      serializedTransactionBase64Encoded: AQAAAAAAAAAA...
                      serializedTransactionBase58Encoded: 4c5ErVEQWyXMS...
                bitcoin:
                  summary: Bitcoin
                  value:
                    transaction:
                      publicKey: >-
                        02a1633cafcc01ebfb6d78e39f687a1f0995c62fc95f51ead10a02ee0be551b5dc
                      rawTxHex: 70736274ff0100...
                      signatureHashes:
                        - >-
                          e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
                    metadata:
                      chainId: bip122:000000000019d6689c085ae165831e93
                      amount: '0.001'
                      fromAddress: bc1qpl54na90wlmdxj5z4wtz7cpp6p32dc9th54w0m
                      toAddress: bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh
                      rawAmount: '100000'
                      tokenDecimals: 8
                      tokenSymbol: BTC
                      feeInSatoshis: '1500'
                      changeInSatoshis: '48500'
                stellar:
                  summary: Stellar
                  value:
                    transaction:
                      xdr: AAAAAgAAAABKp4...
                      networkPassphrase: Public Global Stellar Network ; September 2015
                    metadata:
                      amount: '10'
                      fromAddress: GCQTIL5333ASTDBXAJYDIAFRWXYGMR2KPGUNIDNSHOMBINTAMPZJFOKT
                      toAddress: GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTPE7JI5DJCDMKZ5HPKA7D
                      assetCode: USDC
                      assetIssuer: GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN
                      rawAmount: '100000000'
                tron:
                  summary: Tron
                  value:
                    transaction:
                      id: txn_abc123...
                      network: mainnet
                    metadata:
                      amount: '10'
                      fromAddress: TBMq3UK8JNvauSc7sPUp7fkoSzTN4PZhP2
                      toAddress: TDqKCpMnLBPP7LMsq22d9RVCxQcMKN4sAQ
                      tokenSymbol: USDT
                      contractAddress: TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t
        '400':
          description: |
            Bad request - invalid parameters. Common causes include:
            - Invalid destination address format
            - Amount must be greater than zero
            - Sender and recipient addresses are the same
            - Unsupported chain
            - Token not supported on the specified chain
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Wallet not found for the specified chain
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/assets/send/broadcast-transaction:
    post:
      operationId: broadcastTransaction
      summary: Broadcast a signed transaction
      description: >
        Broadcasts a signed transaction to the network. Currently only supports
        Bitcoin

        (bip122 P2WPKH) chains. Returns 400 for all other chain types.
      tags:
        - Transactions
      parameters:
        - $ref: '#/components/parameters/chain'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BroadcastTransactionRequest'
            example:
              rawTxHex: 70736274ff0100...
              signatures:
                - 304402207e...
      responses:
        '200':
          description: Transaction broadcast successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BroadcastTransactionResponse'
              example:
                data:
                  txHash: a1b2c3d4e5f6...
                metadata:
                  chainId: bip122:000000000019d6689c085ae165831e93
                  clientId: clientId
        '400':
          description: |
            Bad request. Common causes:
            - Chain is not Bitcoin (bip122 P2WPKH)
            - Missing or invalid rawTxHex or signatures
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/assets:
    get:
      operationId: getAssets
      summary: Get wallet balances
      description: >
        Retrieves the native balance, token balances, and optionally NFTs for
        the client's

        wallet on the specified chain.
      tags:
        - Wallet
      parameters:
        - $ref: '#/components/parameters/chain'
        - name: includeNfts
          in: query
          required: false
          description: Set to `"true"` to include NFTs in the response.
          schema:
            type: string
        - name: address
          in: query
          required: false
          description: |
            Override the wallet address used for balance lookup (EVM only).
            Must match the client's known EOA or smart contract address.
          schema:
            type: string
      responses:
        '200':
          description: Assets retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetsResponse'
              example:
                nativeBalance:
                  balance: '1.5'
                  decimals: 18
                  name: Ethereum
                  rawBalance: '1500000000000000000'
                  symbol: ETH
                  metadata: {}
                tokenBalances:
                  - balance: '100.0'
                    decimals: 6
                    name: USD Coin
                    rawBalance: '100000000'
                    symbol: USDC
                    metadata: {}
        '400':
          description: Bad request - invalid chain or wallet not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/assets/nfts:
    get:
      operationId: getNftAssets
      summary: Get wallet NFTs
      description: >
        Retrieves all NFTs owned by the client's wallet on the specified chain.

        Only returns results for EVM (EIP-155) chains. Returns an empty array
        for

        non-EVM chains.
      tags:
        - Wallet
      parameters:
        - $ref: '#/components/parameters/chain'
      responses:
        '200':
          description: NFTs retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PrettyNFT'
              example:
                - nftId: nft_abc123
                  name: 'Cool NFT #1'
                  description: A cool NFT
                  imageUrl: https://example.com/nft.png
                  chainId: eip155:1
                  contractAddress: '0x1234567890abcdef1234567890abcdef12345678'
                  tokenId: '1'
                  collection:
                    name: Cool Collection
                    description: A collection of cool NFTs
                    imageUrl: https://example.com/collection.png
                  rarity:
                    rank: 100
                    score: 85.5
                  floorPrice: '0.5'
                  detailedInfo:
                    ownerCount: 5000
                    tokenCount: 10000
                    attributes: []
                    owners: []
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/transactions:
    get:
      operationId: getTransactions
      summary: Get wallet transactions
      description: >
        Retrieves transaction history for the client's wallet on the specified
        chain.

        Supports EVM (EIP-155), Solana, Bitcoin, Tron, and Stellar chains.


        **Response format varies by chain:**

        - **Solana** returns the legacy format with `signature`, `blockTime`,
        `tokenMint`,
          and nested `transactionDetails` (containing `transaction`, `signatureDetails`, `metadata`).
          This format will be migrated to the unified format in a future release.
        - **All other chains** (EVM, Bitcoin, Tron, Stellar) return the unified
          `TransactionHistoryItem` format with `hash`, `from`, `to`, `value`,
          `blockNumber`, `blockTimestamp`, `status`, `chainId`, and optional token/UserOp fields.

        For EVM chains with Account Abstraction enabled, UserOperations can be

        included, excluded, or fetched exclusively using the `userOperations`
        parameter.


        UserOperation items in the response include the bundler transaction
        hash, sender,

        entry point, gas costs, and `userOpHash` — but not the decoded `to`,
        `value`, or

        `callData`. To retrieve full UserOperation details, use the single
        transaction

        lookup endpoint (`GET
        /clients/me/chains/{chain}/transactions/{userOpHash}`).


        **Note:** For EVM chains, this endpoint returns asset transfer history
        (native tokens,

        ERC-20, ERC-721, ERC-1155). Contract interactions that do not transfer
        assets — such

        as approvals, delegations, or governance votes — will not appear in the
        results.

        UserOperations from AA wallets are an exception and will appear
        regardless of

        whether they involve a token transfer.
      tags:
        - Wallet
      parameters:
        - $ref: '#/components/parameters/chain'
        - name: limit
          in: query
          required: false
          description: |
            Maximum number of transactions to return. Defaults to 50.
            Capped at 1000 for EVM chains and 15 for Solana.
          schema:
            type: integer
            default: 50
        - name: offset
          in: query
          required: false
          description: Number of transactions to skip (default 0).
          schema:
            type: integer
            default: 0
        - name: order
          in: query
          required: false
          description: Sort order for transactions.
          schema:
            type: string
            enum:
              - asc
              - desc
        - name: address
          in: query
          required: false
          description: |
            Override the wallet address used for the query (EVM only).
            Must match the client's known EOA or smart contract address.
          schema:
            type: string
        - name: userOperations
          in: query
          required: false
          description: >
            Filter for ERC-4337 UserOperations (EVM only). Defaults to
            `include`.

            - `include` — return both regular transactions and UserOperations

            - `only` — return only UserOperations

            - `exclude` — return only regular transactions
          schema:
            type: string
            enum:
              - include
              - only
              - exclude
            default: include
      responses:
        '200':
          description: Transactions retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionsResponse'
              examples:
                evm:
                  summary: EVM transaction history (unified format)
                  value:
                    data:
                      transactions:
                        - type: transaction
                          hash: 0x8f594b1dc3675827...
                          from: 0xdfd8302f44...
                          to: 0x92321be819...
                          value: '0.01'
                          blockNumber: '10605799'
                          blockTimestamp: 1775533644
                          status: success
                          chainId: eip155:11155111
                          asset: USDC
                          tokenAddress: '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'
                          tokenDecimals: 6
                    metadata:
                      address: '0x92321be819198e13ce7e6be6c76588e5c7aa9ab2'
                      chainId: eip155:11155111
                      clientId: clientId
                      limit: 50
                      offset: 0
                      count: 1
                evmUserOperation:
                  summary: EVM UserOperation (unified format)
                  value:
                    data:
                      transactions:
                        - type: userOperation
                          hash: 0xde2c244221c3a51d...
                          from: 0xbf888d2b7748...
                          to: null
                          value: '0'
                          blockNumber: '10606747'
                          blockTimestamp: 1775533704
                          status: success
                          chainId: eip155:11155111
                          userOpHash: 0xed4f56745a4935e0...
                          entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789'
                          actualGasCost: '259587616990900'
                          actualGasUsed: '149285'
                    metadata:
                      address: '0xBf888D2B7748De136d851C3cf1D4136B1294016F'
                      chainId: eip155:11155111
                      clientId: clientId
                      limit: 50
                      offset: 0
                      count: 1
                solana:
                  summary: Solana transaction history (legacy format)
                  value:
                    data:
                      transactions:
                        - blockTime: 1741126345
                          error: null
                          signature: 3J7cMNTCks3d...
                          status: finalized
                          tokenMint: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                          transactionDetails:
                            transaction:
                              message:
                                accountKeys:
                                  - Gpixjk4j...
                                  - 8LqMx7E5...
                                  - TokenkegQfeZyi...
                                header:
                                  numReadonlySignedAccounts: 0
                                  numReadonlyUnsignedAccounts: 1
                                  numRequiredSignatures: 1
                                instructions:
                                  - accounts:
                                      - 0
                                      - 1
                                    data: 3Bxs4Bc3VYuGVB19
                                    programIdIndex: 2
                                    stackHeight: 1
                                recentBlockhash: 94x5LakBUZ...
                              signatures:
                                - 3J7cMNTCks3d...
                            signatureDetails:
                              blockTime: 1741126345
                              confirmationStatus: finalized
                              error: null
                              memo: null
                              signature: 3J7cMNTCks3d...
                              slot: 365141926
                            metadata:
                              blockTime: 1741126345
                              slot: 365141926
                              error: null
                              fee: 5000
                              logMessages:
                                - Program 11111111... invoke [1]
                                - Program 11111111... success
                              postBalances:
                                - 7990000
                                - 9610486252
                                - 1
                              preBalances:
                                - 8995000
                                - 9609486252
                                - 1
                              status:
                                Ok: null
                              version: legacy
                    metadata:
                      address: 948bvg9PoEr2AB92s4e8YUkXDAfcQb8f17nAtN7RxfRX
                      chainId: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
                      clientId: clientId
                      limit: 15
                      offset: 0
                      count: 1
                bitcoin:
                  summary: Bitcoin transaction history (unified format)
                  value:
                    data:
                      transactions:
                        - type: transaction
                          hash: e6e0a5359ec6b795...
                          from: ''
                          to: bc1qfcn2cuqvhgkxn0...
                          value: '113943'
                          blockNumber: '4909433'
                          blockTimestamp: 1775531598
                          status: confirmed
                          chainId: bip122:000000000019d6689c085ae165831e93-p2wpkh
                    metadata:
                      address: bc1qfcn2cuqvhgkxn0gnkyeaflrps5a68punwpkw6q
                      chainId: bip122:000000000019d6689c085ae165831e93-p2wpkh
                      clientId: clientId
                      limit: 50
                      offset: 0
                      count: 1
        '400':
          description: |
            Bad request. Common causes:
            - Unsupported chain
            - Invalid query parameters
            - Address override does not match client's known addresses
            - Invalid `userOperations` value
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/wallet_getCapabilities:
    get:
      operationId: getWalletCapabilities
      summary: Get wallet capabilities
      description: >
        Returns the EIP-5792 wallet capabilities for the client. If the client
        uses

        account abstraction, returns the supported capabilities (e.g. paymaster
        service)

        keyed by hex chain ID. Returns an empty object if account abstraction is
        not enabled.
      tags:
        - Wallet
      responses:
        '200':
          description: Wallet capabilities retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletCapabilities'
              examples:
                withAA:
                  summary: Account abstraction enabled
                  value:
                    '0x1':
                      paymasterService:
                        supported: true
                    '0x89':
                      paymasterService:
                        supported: true
                withoutAA:
                  summary: Account abstraction not enabled
                  value: {}
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/signing-share-pairs:
    patch:
      operationId: updateSigningSharePairs
      summary: Update signing share pair statuses
      description: >
        Updates the status of one or more signing share pairs to
        `STORED_CLIENT`.

        This confirms that the client has stored its signing share locally.
      tags:
        - Wallet Shares
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSigningSharePairsRequest'
            example:
              signingSharePairIds:
                - ssp_abc123
                - ssp_def456
              status: STORED_CLIENT
      responses:
        '204':
          description: Signing share pairs updated successfully (no content)
        '400':
          description: Bad request - invalid share pair IDs or status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/backup-share-pairs:
    patch:
      operationId: updateBackupSharePairs
      summary: Update backup share pair statuses
      description: >
        Updates the status of one or more backup share pairs. Valid target
        statuses:


        - `STORED_CLIENT_BACKUP_SHARE_KEY` — requires current status to be
          `STORED_CUSTODIAN_BACKUP_SHARE`
        - `STORED_CLIENT_BACKUP_SHARE` — accepts current status of
          `STORED_CUSTODIAN_BACKUP_SHARE` or `STORED_CLIENT_BACKUP_SHARE_KEY`
      tags:
        - Wallet Shares
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateBackupSharePairsRequest'
            example:
              backupSharePairIds:
                - bsp_abc123
                - bsp_def456
              status: STORED_CLIENT_BACKUP_SHARE
      responses:
        '204':
          description: Backup share pairs updated successfully (no content)
        '400':
          description: >-
            Bad request - invalid share pair IDs, status, or invalid state
            transition
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/backup-share-pairs/{backupSharePairId}:
    patch:
      operationId: updateBackupSharePairCipherText
      summary: Update a backup share pair's cipher text
      description: >
        Sets the client cipher text on a specific backup share pair and forces
        its

        status to `STORED_CLIENT_BACKUP_SHARE` unconditionally.
      tags:
        - Wallet Shares
      parameters:
        - $ref: '#/components/parameters/backupSharePairId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateBackupSharePairCipherTextRequest'
            example:
              clientCipherText: encrypted_data_here...
      responses:
        '200':
          description: Backup share pair cipher text updated successfully
        '400':
          description: Bad request - missing or invalid clientCipherText
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/backup-share-pairs/{backupSharePairId}/cipher-text:
    get:
      operationId: getBackupSharePairCipherText
      summary: Get a backup share pair's cipher text
      description: |
        Retrieves the stored cipher text for a specific backup share pair.
      tags:
        - Wallet Shares
      parameters:
        - $ref: '#/components/parameters/backupSharePairId'
      responses:
        '200':
          description: Cipher text retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CipherTextResponse'
              example:
                cipherText: encrypted_data_here...
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Backup share pair not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/simulate-transaction:
    post:
      operationId: simulateTransaction
      summary: Simulate a transaction
      deprecated: true
      description: >
        Simulates an EVM transaction and returns the expected state changes and
        gas usage.

        Only supports EIP-155 chains.


        **Deprecated:** Use the `evaluate-transaction` endpoint instead.
      tags:
        - Deprecated
      parameters:
        - name: chainId
          in: query
          required: true
          description: >
            Chain ID in CAIP-2 format (EIP-155 only). For example, `eip155:1`
            for

            Ethereum mainnet.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimulateTransactionRequest'
            example:
              to: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
              data: 0xa9059cbb000000000000000000000000...
              value: '0x0'
      responses:
        '200':
          description: Transaction simulated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulateTransactionResponse'
              examples:
                success:
                  summary: Successful simulation
                  value:
                    changes:
                      - type: transfer
                        from: '0x54968898742c08da211a1cd355447cd1f37f0649'
                        to: '0xdFd8302f44727A6348F702fF7B594f127dE3A902'
                        amount: '10000'
                        token: USDC
                    gasUsed: '65000'
                error:
                  summary: Simulation error
                  value:
                    error:
                      message: execution reverted
        '400':
          description: |
            Validation error. Common causes:
            - Missing or invalid chainId
            - Chain is not EIP-155
            - Missing `to` address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulateTransactionErrorResponse'
              example:
                requestError:
                  message: chainId must be in CAIP-2 format (e.g. eip155:1)
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/fund:
    post:
      operationId: fundClient
      summary: Fund the client's wallet with testnet tokens
      description: >
        Requests testnet tokens for the client's wallet on a supported testnet
        chain.

        Rate-limited to one request per 24 hours per client.


        **Supported testnet chains:** Sepolia, Base Sepolia, Monad Testnet, Celo
        Alfajores,

        Solana Devnet, Tron Nile, Tron Shasta, Stellar Testnet, Bitcoin Segwit
        Testnet.
      tags:
        - Funding
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FundRequest'
            example:
              chainId: eip155:11155111
              token: USDC
              amount: '10'
      responses:
        '200':
          description: >
            Fund request processed. The response contains either `data` (on
            success) or

            `error` (on failure), but not both.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FundResponse'
              examples:
                success:
                  summary: Successful funding
                  value:
                    data:
                      explorerUrl: https://sepolia.etherscan.io/tx/0xabc123...
                      txHash: 0xabc123...
                    metadata:
                      amount: '10'
                      chainId: eip155:11155111
                      clientId: clientId
                      custodianId: custodianId
                      environmentId: environmentId
                      token: USDC
                error:
                  summary: Funding error
                  value:
                    error:
                      id: fund_error
                      message: Insufficient faucet balance
                    metadata:
                      amount: '10'
                      chainId: eip155:11155111
                      clientId: clientId
                      custodianId: custodianId
                      environmentId: environmentId
                      token: USDC
        '400':
          description: Bad request - invalid chain, token, or amount
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited - only one fund request per 24 hours per client
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/evaluate-transaction:
    post:
      operationId: evaluateTransaction
      summary: Evaluate a transaction for risks
      description: >
        Evaluates a transaction using validation and/or simulation to assess
        risk before

        signing. Supports both EVM (EIP-155) and Solana chains. The request body
        format

        differs by chain type.


        For **EVM chains**, provide the transaction fields (`to`, `data`,
        `value`, etc.).

        For **Solana**, provide an array of base58-encoded transactions.
      tags:
        - Transactions
      parameters:
        - name: chainId
          in: query
          required: true
          description: >
            Chain ID in CAIP-2 format. For example, `eip155:1` for Ethereum
            mainnet

            or `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` for Solana.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/EvaluateTransactionEip155Request'
                - $ref: '#/components/schemas/EvaluateTransactionSolanaRequest'
            examples:
              evm:
                summary: EVM transaction evaluation
                value:
                  to: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
                  data: 0xa9059cbb000000000000000000000000...
                  value: '0x0'
                  operationType: all
              solana:
                summary: Solana transaction evaluation
                value:
                  transactions:
                    - 5xGh7Abc...
                  operationType: simulation
      responses:
        '200':
          description: Transaction evaluated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EvaluateTransactionResponse'
              examples:
                evm:
                  summary: EVM evaluation result
                  value:
                    chain: eip155:1
                    validation:
                      status: Success
                      resultType: Benign
                      description: The transaction is safe
                      reason: ''
                      classification: ''
                      features: []
                    simulation:
                      status: Success
                      assetsDiffs: []
                      totalUsdDiff: '0'
                      exposures: []
                      totalUsdExposure: '0'
                      addressDetails: {}
                      accountSummary: {}
                solana:
                  summary: Solana evaluation result
                  value:
                    chain: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
                    validation:
                      status: Success
                      resultType: Benign
                      description: The transaction is safe
                    simulation:
                      status: Success
                      assetsDiffs: []
                      totalUsdDiff: '0'
                      exposures: []
                      totalUsdExposure: '0'
        '400':
          description: |
            Bad request. Common causes:
            - Missing or invalid chainId
            - Invalid transaction fields
            - Mismatched chain type and request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/assets/{token}/approvals:
    post:
      operationId: approveDelegation
      summary: Approve a token delegation
      description: >
        Builds a transaction to approve a delegate address to spend a specified
        amount

        of the given token on behalf of the client. The response format differs
        between

        EVM and Solana chains.


        For **EVM chains**, returns unsigned transaction objects.

        For **Solana**, returns base58/base64-encoded transactions.
      tags:
        - Delegations
      parameters:
        - $ref: '#/components/parameters/chain'
        - $ref: '#/components/parameters/token'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApproveDelegationRequest'
            example:
              delegateAddress: '0xdFd8302f44727A6348F702fF7B594f127dE3A902'
              amount: '100'
      responses:
        '200':
          description: >
            Approval transaction built successfully. Response format depends on
            the chain type.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/DelegationTransactionEvmResponse'
                  - $ref: '#/components/schemas/DelegationTransactionSolanaResponse'
              examples:
                evm:
                  summary: EVM approval transaction
                  value:
                    transactions:
                      - from: '0x54968898742c08da211a1cd355447cd1f37f0649'
                        to: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
                        data: 0x095ea7b3000000000000000000000000...
                    metadata:
                      chainId: eip155:1
                      delegateAmount: '100'
                      delegateAmountRaw: '100000000'
                      delegateAddress: '0xdFd8302f44727A6348F702fF7B594f127dE3A902'
                      tokenSymbol: USDC
                      tokenAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
                      ownerAddress: '0x54968898742c08da211a1cd355447cd1f37f0649'
                      tokenDecimals: 6
                solana:
                  summary: Solana approval transaction
                  value:
                    encodedTransactions:
                      - 4c5ErVEQWyXMS...
                    metadata:
                      chainId: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
                      delegateAmount: '100'
                      delegateAmountRaw: '100000000'
                      delegateAddress: 8APEEA4SHrfGteABQcUmH2yEHy7nEe8DqgvmKGAStHR
                      tokenSymbol: USDC
                      tokenMint: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                      tokenAccount: BrGo1hFAL8MpudNQ6K4YWDaFB838uboUcCpm8C9uyC4R
                      ownerAddress: 7EC5TEEAcDseLH6PyqKkPiBasVnsdmrRbRHjN3zkkHFW
                      tokenDecimals: 6
                      lastValidBlockHeight: '260129177'
                      serializedTransactionBase58Encoded: 4c5ErVEQWyXMS...
        '400':
          description: >-
            Bad request - invalid delegate address, amount, or unsupported
            chain/token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/assets/{token}/revocations:
    post:
      operationId: revokeDelegation
      summary: Revoke a token delegation
      description: >
        Builds a transaction to revoke a delegate address's approval to spend
        the given

        token on behalf of the client. The response format differs between EVM
        and Solana chains.
      tags:
        - Delegations
      parameters:
        - $ref: '#/components/parameters/chain'
        - $ref: '#/components/parameters/token'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RevokeDelegationRequest'
            example:
              delegateAddress: '0xdFd8302f44727A6348F702fF7B594f127dE3A902'
      responses:
        '200':
          description: >
            Revocation transaction built successfully. Response format depends
            on the chain type.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/DelegationTransactionEvmResponse'
                  - $ref: '#/components/schemas/DelegationTransactionSolanaResponse'
              examples:
                evm:
                  summary: EVM revocation transaction
                  value:
                    transactions:
                      - from: '0x54968898742c08da211a1cd355447cd1f37f0649'
                        to: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
                        data: 0x095ea7b3000000000000000000000000...
                    metadata:
                      chainId: eip155:1
                      revokedAddress: '0xdFd8302f44727A6348F702fF7B594f127dE3A902'
                      tokenSymbol: USDC
                      tokenAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
                      ownerAddress: '0x54968898742c08da211a1cd355447cd1f37f0649'
                solana:
                  summary: Solana revocation transaction
                  value:
                    encodedTransactions:
                      - 4c5ErVEQWyXMS...
                    metadata:
                      chainId: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
                      revokedAddress: 8APEEA4SHrfGteABQcUmH2yEHy7nEe8DqgvmKGAStHR
                      tokenSymbol: USDC
                      tokenAccount: BrGo1hFAL8MpudNQ6K4YWDaFB838uboUcCpm8C9uyC4R
                      ownerAddress: 7EC5TEEAcDseLH6PyqKkPiBasVnsdmrRbRHjN3zkkHFW
        '400':
          description: Bad request - invalid delegate address or unsupported chain/token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/assets/{token}/delegations:
    get:
      operationId: getDelegationStatus
      summary: Get delegation status for a token
      description: |
        Retrieves the current delegation status for a specific token, including
        the balance and active delegations. See the delegateAddress parameter
        for per-chain behavior.
      tags:
        - Delegations
      parameters:
        - $ref: '#/components/parameters/chain'
        - $ref: '#/components/parameters/token'
        - name: delegateAddress
          in: query
          required: false
          description: >
            The delegate address to query delegations for. Required on EVM

            (eip155) chains, where the response returns the allowance for that

            spender; omitting it there returns a 400. Optional on Solana chains:
            when

            omitted, the response returns the account's current delegate (SPL

            token accounts have at most one), and when supplied, the response

            is filtered to that address, with an empty delegations array if it

            is not the current delegate.
          schema:
            type: string
      responses:
        '200':
          description: Delegation status retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DelegationStatusResponse'
              example:
                chainId: eip155:1
                token: USDC
                tokenAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
                balance: '1000'
                balanceRaw: '1000000000'
                delegations:
                  - address: '0xdFd8302f44727A6348F702fF7B594f127dE3A902'
                    delegateAmount: '100'
                    delegateAmountRaw: '100000000'
        '400':
          description: Bad request - invalid delegate address or unsupported chain/token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/assets/{token}/delegations/transfers:
    post:
      operationId: transferAsDelegate
      summary: Transfer tokens as a delegate
      description: >
        Builds a transaction to transfer tokens from one address to another
        using the

        delegate's approval. The response format differs between EVM and Solana
        chains.
      tags:
        - Delegations
      parameters:
        - $ref: '#/components/parameters/chain'
        - $ref: '#/components/parameters/token'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransferAsDelegateRequest'
            example:
              fromAddress: '0x54968898742c08da211a1cd355447cd1f37f0649'
              toAddress: '0xdFd8302f44727A6348F702fF7B594f127dE3A902'
              amount: '50'
      responses:
        '200':
          description: >
            Delegated transfer transaction built successfully. Response format
            depends on

            the chain type.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/DelegationTransactionEvmResponse'
                  - $ref: '#/components/schemas/DelegationTransactionSolanaResponse'
              examples:
                evm:
                  summary: EVM delegated transfer
                  value:
                    transactions:
                      - from: '0x54968898742c08da211a1cd355447cd1f37f0649'
                        to: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
                        data: 0x23b872dd000000000000000000000000...
                    metadata:
                      amount: '50'
                      amountRaw: '50000000'
                      chainId: eip155:1
                      delegateAddress: '0x54968898742c08da211a1cd355447cd1f37f0649'
                      ownerAddress: '0x54968898742c08da211a1cd355447cd1f37f0649'
                      recipientAddress: '0xdFd8302f44727A6348F702fF7B594f127dE3A902'
                      tokenAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
                      tokenSymbol: USDC
                      tokenDecimals: 6
                solana:
                  summary: Solana delegated transfer
                  value:
                    encodedTransactions:
                      - 4c5ErVEQWyXMS...
                    metadata:
                      amount: '50'
                      amountRaw: '50000000'
                      chainId: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
                      delegateAddress: 7EC5TEEAcDseLH6PyqKkPiBasVnsdmrRbRHjN3zkkHFW
                      ownerAddress: 7EC5TEEAcDseLH6PyqKkPiBasVnsdmrRbRHjN3zkkHFW
                      recipientAddress: 8APEEA4SHrfGteABQcUmH2yEHy7nEe8DqgvmKGAStHR
                      tokenSymbol: USDC
                      tokenDecimals: 6
                      lastValidBlockHeight: '260129177'
                      needsRecipientTokenAccount: false
                      serializedTransactionBase58Encoded: 4c5ErVEQWyXMS...
                      serializedTransactionBase64Encoded: AQAAAAAAAAAA...
        '400':
          description: >-
            Bad request - invalid addresses, amount, or insufficient delegation
            allowance
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/wallet/session-keys/build-add-transaction:
    post:
      operationId: buildAddSessionKeyTransaction
      summary: Build a transaction to add a session key
      description: >
        Builds a transaction to register a session key with specified
        permissions on the

        client's EIP-7702 smart account. Only available on EIP-155 chains for
        secp256k1 wallets.


        The client's account must be an EIP-7702 smart account. Returns 400 if
        not.
      tags:
        - Session Keys
      parameters:
        - $ref: '#/components/parameters/chain'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BuildAddSessionKeyRequest'
            example:
              sessionKeyAddress: '0x1234567890abcdef1234567890abcdef12345678'
              permissions:
                - type: erc20-transfer
                  tokenAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
                  spendLimit: '1000'
                  allowedAddresses:
                    - '0xdFd8302f44727A6348F702fF7B594f127dE3A902'
              expiresAt: 1735689600
      responses:
        '200':
          description: Session key add transaction built successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionKeyTransactionResponse'
              example:
                data:
                  transaction:
                    to: 0x5678...
                    data: 0xabcdef...
                    value: '0x0'
                metadata:
                  chainId: eip155:1
                  sessionKeyValidatorAddress: 0x9abc...
                  eoaAddress: '0x54968898742c08da211a1cd355447cd1f37f0649'
        '400':
          description: |
            Bad request. Common causes:
            - Account is not an EIP-7702 smart account
            - Invalid session key address
            - Empty permissions array
            - Chain is not EIP-155
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/wallet/session-keys/build-revoke-transaction:
    post:
      operationId: buildRevokeSessionKeyTransaction
      summary: Build a transaction to revoke a session key
      description: >
        Builds a transaction to revoke (deregister) a session key from the
        client's

        EIP-7702 smart account. Only available on EIP-155 chains for secp256k1
        wallets.


        The client's account must be an EIP-7702 smart account. Returns 400 if
        not.
      tags:
        - Session Keys
      parameters:
        - $ref: '#/components/parameters/chain'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RevokeSessionKeyRequest'
            example:
              sessionKeyAddress: '0x1234567890abcdef1234567890abcdef12345678'
      responses:
        '200':
          description: Session key revoke transaction built successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionKeyTransactionResponse'
              example:
                data:
                  transaction:
                    to: 0x5678...
                    data: 0xabcdef...
                    value: '0x0'
                metadata:
                  chainId: eip155:1
                  sessionKeyValidatorAddress: 0x9abc...
                  eoaAddress: '0x54968898742c08da211a1cd355447cd1f37f0649'
        '400':
          description: |
            Bad request. Common causes:
            - Account is not an EIP-7702 smart account
            - Invalid session key address
            - Chain is not EIP-155
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/wallet/session-keys/status:
    get:
      operationId: getSessionKeyStatus
      summary: Get the status of a session key
      description: >
        Retrieves the registration and activation status of a session key on the
        client's

        EIP-7702 smart account. Only available on EIP-155 chains for secp256k1
        wallets.


        The client's account must be an EIP-7702 smart account. Returns 400 if
        not.
      tags:
        - Session Keys
      parameters:
        - $ref: '#/components/parameters/chain'
        - name: sessionKeyAddress
          in: query
          required: true
          description: The EIP-155 address of the session key to query.
          schema:
            type: string
      responses:
        '200':
          description: Session key status retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionKeyStatusResponse'
              example:
                data:
                  sessionKeyAddress: '0x1234567890abcdef1234567890abcdef12345678'
                  isRegistered: true
                  isActive: true
                  merkleRoot: 0xabcdef...
                  validAfter: 1700000000
                  validUntil: 1735689600
                  paymaster: '0x0000000000000000000000000000000000000000'
                  nonce: '1'
                metadata:
                  chainId: eip155:1
                  sessionKeyValidatorAddress: 0x9abc...
                  eoaAddress: '0x54968898742c08da211a1cd355447cd1f37f0649'
        '400':
          description: |
            Bad request. Common causes:
            - Account is not an EIP-7702 smart account
            - Invalid session key address
            - Chain is not EIP-155
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/wallets/{walletId}/ejectable-backup-shares:
    get:
      operationId: getEjectableBackupShares
      summary: Get ejectable backup shares for a wallet
      description: >
        Retrieves the ejectable backup shares for a wallet that is in an
        ejectable state.

        The wallet must have `ejectableUntil` set and not expired. On successful
        retrieval,

        the `ejectableUntil` field is cleared (side effect).
      tags:
        - Wallet Shares
      parameters:
        - $ref: '#/components/parameters/walletId'
        - name: backupMethod
          in: query
          required: true
          description: The backup method to retrieve shares for.
          schema:
            type: string
            enum:
              - GDRIVE
              - ICLOUD
              - PASSWORD
              - PASSKEY
      responses:
        '200':
          description: Ejectable backup shares retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EjectableBackupSharesResponse'
              example:
                data:
                  encryptedClientBackupShare: encrypted_share_data...
                  custodianBackupShare: custodian_share_data...
        '400':
          description: |
            Bad request. Common causes:
            - Wallet is not in an ejectable state
            - ejectableUntil has expired
            - Invalid backup method
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Wallet not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/0x/swap/sources:
    post:
      operationId: getSwapSources
      summary: Get available swap sources
      description: |
        Retrieves the available swap liquidity sources for a specific chain.
        Optionally provide your own 0x API key via `zeroXApiKey`, otherwise
        Portal uses a managed key if available.
      tags:
        - 0x
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ZeroXSwapSourcesRequest'
      responses:
        '200':
          description: Swap sources retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZeroXSwapSourcesResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/0x/swap/quote:
    post:
      operationId: getSwapQuote
      summary: Get a swap quote
      description: |
        Retrieves a swap quote with full transaction details for trading tokens
        on a specific chain. Use this endpoint when you are ready to execute a
        swap and need the complete transaction to sign and broadcast.
      tags:
        - 0x
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ZeroXSwapQuoteRequest'
      responses:
        '200':
          description: Swap quote retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZeroXSwapQuoteResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/0x/swap/price:
    post:
      operationId: getSwapPrice
      summary: Get a swap price estimate
      description: >
        Retrieves a swap price estimate for trading tokens on a specific chain

        without building a complete transaction. Use this endpoint for
        displaying

        price quotes to users before they commit to a swap.
      tags:
        - 0x
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ZeroXSwapPriceRequest'
      responses:
        '200':
          description: Swap price retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZeroXSwapQuoteResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/0x/cross-chain/quotes:
    post:
      operationId: getCrossChainQuotes
      summary: Get cross-chain swap quotes
      description: >
        Retrieves quotes for a cross-chain swap across EVM chains. Returns

        multiple quotes with different bridge providers and routing options.


        **Experimental:** This endpoint requires explicit enablement by the

        Portal and 0x teams before it can be used.


        The `sellToken` and `buyToken` parameters accept contract addresses,

        native token keywords (`NATIVE`, `ETH`, `AVAX`, `SOL`, etc.), or

        supported token symbols (`USDC`, `USDT`).


        Each quote includes a Portal-formatted `transaction` object ready to

        sign and broadcast. If token approval is needed, an
        `approvalTransaction`

        is also included — sign and submit it before the main transaction.


        For more details on the underlying 0x cross-chain API, see the

        [0x Cross-Chain API
        docs](https://0x-docs.gitbook.io/0x-cross-chain-api-beta/api-reference/cross-chain).
      tags:
        - 0x
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ZeroXCrossChainQuotesRequest'
      responses:
        '200':
          description: Cross-chain quotes retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZeroXCrossChainQuotesResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/0x/cross-chain/status:
    get:
      operationId: getCrossChainStatus
      summary: Get cross-chain transaction status
      description: |
        Tracks the status of a cross-chain transaction from origin chain
        submission through bridge completion.
      tags:
        - 0x
      parameters:
        - name: originChain
          in: query
          required: true
          schema:
            type: string
          description: The origin chain ID (e.g. `8453` for Base).
        - name: originTxHash
          in: query
          required: true
          schema:
            type: string
          description: The transaction hash on the origin chain.
        - name: quoteId
          in: query
          required: false
          schema:
            type: string
          description: The quote ID from the original quote response.
        - name: zeroXApiKey
          in: query
          required: false
          schema:
            type: string
          description: Optional 0x API key.
      responses:
        '200':
          description: Transaction status retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZeroXCrossChainStatusResponse'
        '404':
          description: Transaction not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/0x/cross-chain/sources:
    get:
      operationId: getCrossChainSources
      summary: List cross-chain bridge and swap sources
      description: |
        Lists all available bridge providers and DEX sources for cross-chain
        swaps, including their supported chain pairs. Chain IDs are returned
        in CAIP-2 format.
      tags:
        - 0x
      parameters:
        - name: zeroXApiKey
          in: query
          required: false
          schema:
            type: string
          description: Optional 0x API key.
      responses:
        '200':
          description: Sources retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZeroXCrossChainSourcesResponse'
  /clients/me/integrations/0x/cross-chain/tx-history:
    get:
      operationId: getCrossChainTxHistory
      summary: Get cross-chain transaction history
      description: |
        Retrieves cross-chain transaction history for a wallet address.
        Supports pagination via cursor.
      tags:
        - 0x
      parameters:
        - name: user
          in: query
          required: true
          schema:
            type: string
          description: The wallet address to get history for.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
          description: Maximum number of transactions to return.
        - name: cursor
          in: query
          required: false
          schema:
            type: string
          description: Pagination cursor from a previous response.
        - name: zeroXApiKey
          in: query
          required: false
          schema:
            type: string
          description: Optional 0x API key.
      responses:
        '200':
          description: Transaction history retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZeroXCrossChainTxHistoryResponse'
  /clients/me/chains/{chain}/assets/swap/sources:
    post:
      operationId: getSwapSourcesDeprecated
      summary: Get available swap sources (deprecated)
      deprecated: true
      description: |
        **Deprecated.** Use `/clients/me/integrations/0x/swap/sources` instead.

        Retrieves the available swap liquidity sources for a specific chain.
      tags:
        - 0x
      parameters:
        - $ref: '#/components/parameters/chain'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ZeroXSwapSourcesRequest'
      responses:
        '200':
          description: Swap sources retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZeroXSwapSourcesResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/assets/swap/quote:
    post:
      operationId: getSwapQuoteDeprecated
      summary: Get a swap quote (deprecated)
      deprecated: true
      description: |
        **Deprecated.** Use `/clients/me/integrations/0x/swap/quote` instead.

        Retrieves a swap quote with full transaction details for trading tokens.
      tags:
        - 0x
      parameters:
        - $ref: '#/components/parameters/chain'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ZeroXSwapQuoteRequest'
      responses:
        '200':
          description: Swap quote retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZeroXSwapQuoteResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/assets/swap/price:
    post:
      operationId: getSwapPriceDeprecated
      summary: Get a swap price estimate (deprecated)
      deprecated: true
      description: |
        **Deprecated.** Use `/clients/me/integrations/0x/swap/price` instead.

        Retrieves a swap price estimate for trading tokens.
      tags:
        - 0x
      parameters:
        - $ref: '#/components/parameters/chain'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ZeroXSwapPriceRequest'
      responses:
        '200':
          description: Swap price retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZeroXSwapQuoteResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/yield-xyz/yields:
    get:
      operationId: getYieldOpportunities
      summary: Get yield opportunities
      description: >
        Retrieves a paginated list of available yield opportunities across all

        supported networks and protocols.


        This is a proxy to the Yield.xyz `GET /yields` endpoint. The response

        is wrapped under `data.rawResponse` and `network` fields are converted

        to CAIP-2 format. For the full upstream response schema see

        [docs.yield.xyz](https://docs.yield.xyz/reference/yieldscontroller_getyields).
      tags:
        - Yield.xyz
      parameters:
        - name: offset
          in: query
          schema:
            type: integer
          description: Number of results to skip. Defaults to 0.
        - name: limit
          in: query
          schema:
            type: integer
          description: Maximum number of results to return. Defaults to 100.
        - name: network
          in: query
          schema:
            type: string
          description: Network identifier in CAIP-2 format (e.g. `eip155:1`).
        - name: networks
          in: query
          schema:
            type: array
            items:
              type: string
          description: Filter by multiple networks (CAIP-2 format).
        - name: yieldId
          in: query
          schema:
            type: string
          description: Filter by a specific yield opportunity ID.
        - name: yieldIds
          in: query
          schema:
            type: array
            items:
              type: string
          description: Filter by multiple yield opportunity IDs.
        - name: type
          in: query
          schema:
            type: string
            enum:
              - staking
              - restaking
              - lending
              - vault
              - fixed_yield
              - real_world_asset
          description: Type of yield mechanism.
        - name: types
          in: query
          schema:
            type: array
            items:
              type: string
              enum:
                - staking
                - restaking
                - lending
                - vault
                - fixed_yield
                - real_world_asset
          description: Filter by multiple yield mechanism types.
        - name: hasCooldownPeriod
          in: query
          schema:
            type: boolean
          description: Filter to opportunities with (or without) a cooldown period.
        - name: hasWarmupPeriod
          in: query
          schema:
            type: boolean
          description: Filter to opportunities with (or without) a warmup period.
        - name: token
          in: query
          schema:
            type: string
          description: Token contract address to filter by.
        - name: inputToken
          in: query
          schema:
            type: string
          description: Input token symbol or address.
        - name: inputTokens
          in: query
          schema:
            type: array
            items:
              type: string
          description: Filter by multiple input tokens (symbols or addresses).
        - name: provider
          in: query
          schema:
            type: string
          description: Protocol provider (e.g. `aave`, `compound`).
        - name: providers
          in: query
          schema:
            type: array
            items:
              type: string
          description: Filter by multiple providers.
        - name: search
          in: query
          schema:
            type: string
          description: Search term for yield opportunities.
        - name: sort
          in: query
          schema:
            type: string
            enum:
              - statusEnterAsc
              - statusEnterDesc
              - statusExitAsc
              - statusExitDesc
          description: Sorting criteria.
      responses:
        '200':
          description: Yield opportunities retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YieldOpportunitiesResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/yield-xyz/yields/balances:
    post:
      operationId: getYieldBalances
      summary: Get yield balances
      description: >
        Retrieves yield balances for the client's positions across staking,

        lending, and vault opportunities.


        This is a proxy to the Yield.xyz `POST /yields/balances` endpoint.

        The response is wrapped under `data.rawResponse` and `network` fields

        are converted to CAIP-2 format. For the full upstream response schema

        see
        [docs.yield.xyz](https://docs.yield.xyz/reference/yieldscontroller_getaggregatebalances).
      tags:
        - Yield.xyz
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/YieldBalancesRequest'
      responses:
        '200':
          description: Yield balances retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YieldBalancesResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/yield-xyz/actions/enter:
    post:
      operationId: enterYieldPosition
      summary: Enter a yield position
      description: >
        Builds transactions for entering a yield position (staking, lending, or

        vault deposit).


        This is a proxy to the Yield.xyz `POST /actions/enter` endpoint. The

        response is wrapped under `data.rawResponse` and `network` fields on

        transactions are converted to CAIP-2 format. For Solana yields where a

        gas sponsor is configured for the environment,
        `arguments.feePayerAddress`

        is auto-populated. For the full upstream response schema see

        [docs.yield.xyz](https://docs.yield.xyz/reference/actionscontroller_enteryield).
      tags:
        - Yield.xyz
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/YieldEnterRequest'
      responses:
        '200':
          description: Enter transactions built successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YieldActionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/yield-xyz/actions/exit:
    post:
      operationId: exitYieldPosition
      summary: Exit a yield position
      description: >
        Builds transactions for exiting a yield position (unstaking,
        withdrawing,

        or redeeming).


        This is a proxy to the Yield.xyz `POST /actions/exit` endpoint. The

        response is wrapped under `data.rawResponse` and `network` fields on

        transactions are converted to CAIP-2 format. For Solana yields where a

        gas sponsor is configured for the environment,
        `arguments.feePayerAddress`

        is auto-populated. For the full upstream response schema see

        [docs.yield.xyz](https://docs.yield.xyz/reference/actionscontroller_exityield).
      tags:
        - Yield.xyz
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/YieldExitRequest'
      responses:
        '200':
          description: Exit transactions built successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YieldActionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/yield-xyz/actions/manage:
    post:
      operationId: manageYieldPosition
      summary: Manage a yield position
      description: >
        Builds transactions for managing an existing yield position, such as

        claiming rewards, restaking, or withdrawing unstaked tokens.


        This is a proxy to the Yield.xyz `POST /actions/manage` endpoint. The

        response is wrapped under `data.rawResponse` and `network` fields on

        transactions are converted to CAIP-2 format. For the full upstream

        response schema see

        [docs.yield.xyz](https://docs.yield.xyz/reference/actionscontroller_manageyield).
      tags:
        - Yield.xyz
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/YieldManageRequest'
      responses:
        '200':
          description: Manage transactions built successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YieldActionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/yield-xyz/transactions/{transactionId}/submit-hash:
    put:
      operationId: submitYieldTransactionHash
      summary: Submit a transaction hash
      description: >
        Submits the on-chain transaction hash for a pending yield transaction

        after signing and broadcasting it. If `chainId` is provided alongside

        a user-operation hash, Portal resolves the underlying transaction

        hash before forwarding to Yield.xyz.


        This is a proxy to the Yield.xyz `PUT
        /transactions/{transactionId}/submit-hash`

        endpoint. The response is wrapped under `data.rawResponse`. For the

        full upstream response schema see

        [docs.yield.xyz](https://docs.yield.xyz/reference/transactionscontroller_submittransactionhash).
      tags:
        - Yield.xyz
      parameters:
        - $ref: '#/components/parameters/transactionId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - hash
              properties:
                hash:
                  type: string
                  description: >-
                    The on-chain transaction hash, or a user-operation hash if
                    `chainId` is also provided.
                chainId:
                  type: string
                  description: >-
                    Optional chain identifier in CAIP-2 format (e.g.
                    `eip155:1`). When provided alongside a user-operation hash,
                    the API resolves the underlying transaction hash before
                    submitting to Yield.xyz.
      responses:
        '200':
          description: Hash submitted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YieldTransactionStatusResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/yield-xyz/transactions/{transactionId}:
    get:
      operationId: getYieldTransaction
      summary: Get a yield transaction
      description: >
        Retrieves the status and details of a specific yield transaction.


        This is a proxy to the Yield.xyz `GET /transactions/{transactionId}`

        endpoint. The response is wrapped under `data.rawResponse` and

        `network` fields are converted to CAIP-2 format. For the full upstream

        response schema see

        [docs.yield.xyz](https://docs.yield.xyz/reference/transactionscontroller_gettransaction).
      tags:
        - Yield.xyz
      parameters:
        - $ref: '#/components/parameters/transactionId'
      responses:
        '200':
          description: Transaction details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YieldTransactionDetailResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/yield-xyz/actions:
    get:
      operationId: getYieldActions
      summary: Get yield action history
      description: >
        Retrieves a paginated list of yield actions performed by the client.


        This is a proxy to the Yield.xyz `GET /actions` endpoint. The response

        is wrapped under `data.rawResponse` and `network` fields on

        transactions are converted to CAIP-2 format. For the full upstream

        response schema see

        [docs.yield.xyz](https://docs.yield.xyz/reference/actionscontroller_getactions).
      tags:
        - Yield.xyz
      parameters:
        - name: offset
          in: query
          schema:
            type: integer
          description: Number of results to skip. Defaults to 0.
        - name: limit
          in: query
          schema:
            type: integer
          description: Maximum number of results to return.
        - name: address
          in: query
          schema:
            type: string
          description: Filter by wallet address.
        - name: status
          in: query
          schema:
            type: string
            enum:
              - CANCELED
              - CREATED
              - WAITING_FOR_NEXT
              - PROCESSING
              - FAILED
              - SUCCESS
              - STALE
          description: Filter by action status.
        - name: intent
          in: query
          schema:
            type: string
            enum:
              - enter
              - manage
              - exit
          description: Filter by action intent.
        - name: type
          in: query
          schema:
            type: string
            enum:
              - STAKE
              - UNSTAKE
              - CLAIM_REWARDS
              - RESTAKE_REWARDS
              - WITHDRAW
              - WITHDRAW_ALL
              - RESTAKE
              - CLAIM_UNSTAKED
              - UNLOCK_LOCKED
              - STAKE_LOCKED
              - VOTE
              - REVOKE
              - VOTE_LOCKED
              - REVOTE
              - REBOND
              - MIGRATE
              - VERIFY_WITHDRAW_CREDENTIALS
              - DELEGATE
          description: Filter by action type.
        - name: yieldId
          in: query
          schema:
            type: string
          description: Filter by yield opportunity ID.
      responses:
        '200':
          description: Actions retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YieldActionsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/yield-xyz/yields/defaults:
    get:
      operationId: getDefaultYieldOpportunities
      summary: Get default yield opportunities
      description: |
        Returns Portal's recommended yield opportunities per chain and token.
        By default, returns only the yield IDs (lightweight). Pass
        `includeOpportunities=true` to enrich each entry with live data
        (APY, status, mechanics, etc.) from Yield.xyz. Entries with no
        recommendation return `null` for both `yieldId` and `opportunity`.
      tags:
        - Yield.xyz
      parameters:
        - name: chainId
          in: query
          schema:
            type: string
          description: >-
            Filter by chain in CAIP-2 format (e.g. `eip155:1`,
            `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`).
        - name: token
          in: query
          schema:
            type: string
          description: Filter by token symbol (e.g. `ETH`, `USDC`). Case-insensitive.
        - name: includeOpportunities
          in: query
          schema:
            type: string
            enum:
              - 'true'
          description: >-
            Set to `true` to enrich each entry with live yield opportunity
            details from Yield.xyz. Omit for a lightweight response with yield
            IDs only.
      responses:
        '200':
          description: Default yield opportunities retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: >
                      Object keyed by `{caip2ChainId}:{tokenSymbol}` (e.g.
                      `eip155:1:ETH`).

                      Access entries directly by key — no iteration needed.
                    additionalProperties:
                      type: object
                      properties:
                        yieldId:
                          type: string
                          nullable: true
                          description: >-
                            The recommended Yield.xyz yield ID, or `null` if no
                            recommendation exists.
                        opportunity:
                          nullable: true
                          description: >-
                            Full yield opportunity details from Yield.xyz.
                            Always `null` unless `includeOpportunities=true` is
                            passed.
                          $ref: '#/components/schemas/YieldOpportunity'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/yield-xyz/yields/{yieldId}/validators:
    get:
      operationId: getYieldValidators
      summary: Get yield validators
      description: >
        Retrieves a paginated list of validators available for staking or

        delegation for a specific yield opportunity. Required for yields where

        `mechanics.requiresValidatorSelection` is `true` (e.g. native staking).

        Pass the chosen validator's address as `validatorAddress` in the enter

        action arguments.


        This is a proxy to the Yield.xyz `GET /yields/{yieldId}/validators`

        endpoint. For the full upstream response schema see

        [docs.yield.xyz](https://docs.yield.xyz/reference/yieldscontroller_getyieldvalidators).
      tags:
        - Yield.xyz
      parameters:
        - name: yieldId
          in: path
          required: true
          schema:
            type: string
          description: The yield opportunity ID (e.g. `monad-testnet-mon-native-staking`).
        - name: offset
          in: query
          schema:
            type: integer
            default: 0
          description: Number of results to skip.
        - name: limit
          in: query
          schema:
            type: integer
            default: 20
            maximum: 100
          description: Maximum number of results to return.
        - name: name
          in: query
          schema:
            type: string
          description: Filter by validator name (case-insensitive, partial match).
        - name: address
          in: query
          schema:
            type: string
          description: Filter by validator address.
        - name: provider
          in: query
          schema:
            type: string
          description: Filter by provider ID.
        - name: status
          in: query
          schema:
            type: string
          description: Filter by validator status (e.g. `active`).
        - name: preferred
          in: query
          schema:
            type: boolean
          description: Filter by preferred flag.
      responses:
        '200':
          description: Validators retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      rawResponse:
                        type: object
                        properties:
                          items:
                            type: array
                            items:
                              $ref: '#/components/schemas/YieldValidator'
                          total:
                            type: integer
                            description: Total number of validators available.
                          offset:
                            type: integer
                          limit:
                            type: integer
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Yield not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/lifi/quote:
    post:
      operationId: getLifiQuote
      summary: Get a Li.Fi swap/bridge quote
      description: |
        Retrieves a quote for a cross-chain or same-chain swap via Li.Fi,
        including the transaction request to execute.
      tags:
        - Li.Fi
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LifiQuoteRequest'
      responses:
        '200':
          description: Quote retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LifiQuoteResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/lifi/routes:
    post:
      operationId: getLifiRoutes
      summary: Get Li.Fi swap/bridge routes
      description: |
        Retrieves multiple possible routes for a cross-chain or same-chain swap,
        each with different trade-offs (speed, cost, safety).
      tags:
        - Li.Fi
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LifiRoutesRequest'
      responses:
        '200':
          description: Routes retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LifiRoutesResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/lifi/route-step-details:
    post:
      operationId: getLifiRouteStepDetails
      summary: Get details for a route step
      description: >
        Enriches a route step with full transaction details and updated
        estimates.

        Pass a step object from a previous routes response as the request body

        (not wrapped under any key).
      tags:
        - Li.Fi
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LifiStepRequest'
      responses:
        '200':
          description: Step details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LifiStepResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/lifi/status:
    get:
      operationId: getLifiStatus
      summary: Get Li.Fi transaction status
      description: |
        Checks the status of a Li.Fi cross-chain or same-chain swap transaction.
      tags:
        - Li.Fi
      parameters:
        - name: txHash
          in: query
          required: true
          schema:
            type: string
          description: The transaction hash to check status for.
        - name: bridge
          in: query
          schema:
            type: string
          description: The bridge used (if applicable).
        - name: fromChain
          in: query
          schema:
            type: string
          description: The source chain ID.
        - name: toChain
          in: query
          schema:
            type: string
          description: The destination chain ID.
      responses:
        '200':
          description: Status retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LifiStatusResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/lifi/tokens:
    get:
      operationId: getLifiTokens
      summary: Get Li.Fi supported tokens
      description: |
        Retrieves the list of tokens supported by Li.Fi, optionally filtered by
        chain, chain type, minimum USD price, or tags.
      tags:
        - Li.Fi
      parameters:
        - name: chains
          in: query
          schema:
            type: string
          description: >-
            Comma-separated list of Li.Fi chain keys (e.g. `ETH,POL,ARB`) or
            numeric chain IDs to filter by.
        - name: chainTypes
          in: query
          schema:
            type: string
          description: Comma-separated list of chain types to filter by (e.g. `EVM,SVM`).
        - name: minPriceUSD
          in: query
          schema:
            type: string
          description: Minimum token price in USD as a numeric string (e.g. `0.01`).
        - name: tags
          in: query
          schema:
            type: string
          description: Comma-separated list of token tags to filter by.
      responses:
        '200':
          description: Tokens retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LifiTokensResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/blockaid/evm/scan:
    post:
      operationId: scanEvmTransactionBlockaid
      summary: Scan an EVM transaction
      description: |
        Scans an EVM transaction for security risks using Blockaid. Returns
        risk assessment and simulation results.
      tags:
        - Blockaid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BlockaidEvmScanRequest'
      responses:
        '200':
          description: Scan completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockaidScanResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/blockaid/solana/scan:
    post:
      operationId: scanSolanaTransactionBlockaid
      summary: Scan Solana transactions
      description: |
        Scans Solana transactions for security risks using Blockaid.
      tags:
        - Blockaid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BlockaidSolanaScanRequest'
      responses:
        '200':
          description: Scan completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockaidScanResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/blockaid/tron/scan:
    post:
      operationId: scanTronTransactionBlockaid
      summary: Scan a TRON transaction
      description: |
        Scans a TRON transaction for security risks using Blockaid. Only TRON
        mainnet is supported; testnet chain IDs are rejected.
      tags:
        - Blockaid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BlockaidTronScanRequest'
      responses:
        '200':
          description: Scan completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockaidScanResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/blockaid/address/scan:
    post:
      operationId: scanAddressBlockaid
      summary: Scan an address
      description: |
        Scans a blockchain address for malicious activity using Blockaid.
      tags:
        - Blockaid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BlockaidAddressScanRequest'
      responses:
        '200':
          description: Scan completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockaidAddressScanResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/blockaid/tokens/scan:
    post:
      operationId: scanTokensBlockaid
      summary: Scan tokens
      description: |
        Scans one or more tokens for malicious characteristics using Blockaid.
      tags:
        - Blockaid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BlockaidTokensScanRequest'
      responses:
        '200':
          description: Scan completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockaidTokensScanResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/blockaid/url/scan:
    post:
      operationId: scanUrlBlockaid
      summary: Scan a URL
      description: |
        Scans a URL for phishing or malicious content using Blockaid.
      tags:
        - Blockaid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BlockaidUrlScanRequest'
      responses:
        '200':
          description: Scan completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockaidUrlScanResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/hypernative/addresses/scan:
    post:
      operationId: scanAddressesHypernative
      summary: Scan addresses
      description: |
        Scans one or more blockchain addresses for risk using Hypernative.
      tags:
        - Hypernative
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HypernativeAddressesScanRequest'
      responses:
        '200':
          description: Scan completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HypernativeAddressesScanResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/hypernative/evm/scan:
    post:
      operationId: scanEvmTransactionHypernative
      summary: Scan an EVM transaction
      description: |
        Scans an EVM transaction for security risks using Hypernative.
      tags:
        - Hypernative
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HypernativeEvmScanRequest'
      responses:
        '200':
          description: Scan completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HypernativeEvmScanResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/hypernative/eip-712/scan:
    post:
      operationId: scanEip712MessageHypernative
      summary: Scan an EIP-712 message
      description: >
        Scans an EIP-712 typed data message for security risks using
        Hypernative.
      tags:
        - Hypernative
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HypernativeEip712ScanRequest'
      responses:
        '200':
          description: Scan completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HypernativeEvmScanResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/hypernative/solana/scan:
    post:
      operationId: scanSolanaTransactionHypernative
      summary: Scan a Solana transaction
      description: |
        Scans a Solana transaction for security risks using Hypernative.
      tags:
        - Hypernative
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HypernativeSolanaScanRequest'
      responses:
        '200':
          description: Scan completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HypernativeSolanaScanResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/hypernative/nfts/scan:
    post:
      operationId: scanNftsHypernative
      summary: Scan NFTs
      description: |
        Scans one or more NFTs for risk using Hypernative.
      tags:
        - Hypernative
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HypernativeNftsScanRequest'
      responses:
        '200':
          description: Scan completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HypernativeNftsScanResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/hypernative/tokens/scan:
    post:
      operationId: scanTokensHypernative
      summary: Scan tokens
      description: |
        Scans one or more tokens for risk using Hypernative.
      tags:
        - Hypernative
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HypernativeTokensScanRequest'
      responses:
        '200':
          description: Scan completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HypernativeTokensScanResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/hypernative/url/scan:
    post:
      operationId: scanUrlHypernative
      summary: Scan a URL
      description: |
        Scans a URL for phishing or malicious content using Hypernative.
      tags:
        - Hypernative
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HypernativeUrlScanRequest'
      responses:
        '200':
          description: Scan completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HypernativeUrlScanResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/noah/customers/kyc:
    post:
      operationId: initiateNoahKyc
      summary: Initiate KYC onboarding
      description: >
        Creates or retrieves a Noah hosted onboarding session for the
        authenticated

        client.
      tags:
        - Noah
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NoahInitiateKycRequest'
      responses:
        '200':
          description: KYC onboarding session retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoahInitiateKycResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/noah/payins:
    post:
      operationId: initiateNoahPayin
      summary: Initiate payin
      description: >
        Creates a bank-deposit-to-onchain payin workflow and returns bank
        details.
      tags:
        - Noah
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NoahInitiatePayinRequest'
      responses:
        '200':
          description: Payin workflow created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoahInitiatePayinResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/noah/payins/simulate:
    post:
      operationId: simulateNoahFiatDeposit
      summary: Simulate fiat deposit
      description: >
        Simulates a fiat deposit for a Noah payment method in sandbox
        environments.
      tags:
        - Noah
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NoahSimulateFiatDepositRequest'
      responses:
        '200':
          description: Fiat deposit simulated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoahSimulateFiatDepositResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/noah/payouts/countries:
    get:
      operationId: getNoahPayoutCountries
      summary: Get payout countries
      description: Lists supported payout countries and fiat currencies.
      tags:
        - Noah
      responses:
        '200':
          description: Countries retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoahPayoutCountriesResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/noah/payouts/channels:
    get:
      operationId: getNoahPayoutChannels
      summary: Get payout channels
      description: >
        Retrieves payout channels for a country, crypto currency, and fiat
        currency.
      tags:
        - Noah
      parameters:
        - name: cryptoCurrency
          in: query
          required: true
          schema:
            type: string
          description: >-
            Crypto currency symbol. In Noah sandbox, tickers must be suffixed
            with `_TEST` (e.g. `USDC_TEST`); use the unsuffixed ticker in
            production. See [Noah's sandbox naming
            convention](https://docs.noah.com/products/global-payouts-api/#sandbox-cryptocurrency-naming-convention).
        - name: country
          in: query
          required: false
          schema:
            type: string
          description: Optional ISO-3166-1 alpha-2 country code.
        - name: fiatCurrency
          in: query
          required: false
          schema:
            type: string
          description: Optional ISO-4217 fiat currency code.
        - name: fiatAmount
          in: query
          required: false
          schema:
            type: string
          description: Optional fiat amount used for pricing context.
        - name: paymentMethodId
          in: query
          required: false
          schema:
            type: string
          description: Filters channels compatible with a specific saved payment method.
        - name: pageSize
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
          description: Number of channels to return per page.
        - name: pageToken
          in: query
          required: false
          schema:
            type: string
          description: Optional pagination token from a previous channels response.
      responses:
        '200':
          description: Channels retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoahPayoutChannelsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/noah/payouts/channels/{channelId}/form:
    get:
      operationId: getNoahPayoutChannelForm
      summary: Get payout channel form
      description: Retrieves dynamic form schema for a payout channel.
      tags:
        - Noah
      parameters:
        - name: channelId
          in: path
          required: true
          schema:
            type: string
          description: Noah channel ID.
      responses:
        '200':
          description: Form schema retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoahPayoutChannelFormResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/noah/payouts/quote:
    post:
      operationId: quoteNoahPayout
      summary: Quote payout
      description: >
        Validates payout form input and returns quote details plus a payout
        intent ID.
      tags:
        - Noah
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NoahQuotePayoutRequest'
      responses:
        '200':
          description: Payout quote created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoahQuotePayoutResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/noah/payouts:
    post:
      operationId: initiateNoahPayout
      summary: Initiate payout
      description: >
        Initiates an onchain-deposit-to-payment-method workflow from a prepared
        payout intent.
      tags:
        - Noah
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NoahInitiatePayoutRequest'
      responses:
        '200':
          description: Payout initiated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoahInitiatePayoutResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/noah/payouts/payment-methods:
    get:
      operationId: getNoahPaymentMethods
      summary: List payment methods
      description: Retrieves Noah payment methods for the authenticated client.
      tags:
        - Noah
      parameters:
        - name: pageSize
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
          description: Number of payment methods to return per page.
        - name: pageToken
          in: query
          required: false
          schema:
            type: string
          description: Pagination token from the previous page.
        - name: capability
          in: query
          required: false
          schema:
            type: string
            enum:
              - PayoutFrom
              - PayinTo
              - PayoutTo
          description: Filter payment methods by capability.
      responses:
        '200':
          description: Payment methods retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoahPaymentMethodsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/meld/customers:
    post:
      operationId: createMeldCustomer
      summary: Create Meld customer
      description: |
        Registers the authenticated Portal client as a Meld customer. Returns
        `409 Conflict` if a Meld customer already exists for this client — use
        `GET /customers` instead.
      tags:
        - Meld
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MeldCreateCustomerRequest'
      responses:
        '200':
          description: Meld customer created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeldCustomerResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Meld customer already exists for this client
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeldCustomerConflictResponse'
    get:
      operationId: searchMeldCustomer
      summary: Get Meld customer
      description: >
        Looks up the Meld customer registered to the authenticated Portal
        client.
      tags:
        - Meld
      responses:
        '200':
          description: Meld customer retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeldCustomerSearchResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/meld/retail/quote:
    post:
      operationId: getMeldQuote
      summary: Get quote
      description: |
        Returns live pricing across available service providers for a buy, sell,
        or transfer transaction.
      tags:
        - Meld
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MeldQuoteRequest'
      responses:
        '200':
          description: Quote retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeldQuoteResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/meld/retail/widget:
    post:
      operationId: createMeldWidgetSession
      summary: Create widget session
      description: >
        Creates a Meld widget session for the chosen service provider and
        returns

        the embeddable `widgetUrl` plus a single-use session `token`.
      tags:
        - Meld
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MeldWidgetSessionRequest'
      responses:
        '200':
          description: Widget session created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeldWidgetSessionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/meld/retail/transactions:
    get:
      operationId: searchMeldTransactions
      summary: List transactions
      description: Lists Meld transactions for the authenticated Portal client.
      tags:
        - Meld
      responses:
        '200':
          description: Transactions retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeldTransactionSearchResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/meld/retail/transactions/{id}:
    get:
      operationId: getMeldTransaction
      summary: Get transaction
      description: Retrieves a single Meld transaction by its Meld transaction ID.
      tags:
        - Meld
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Meld transaction ID.
      responses:
        '200':
          description: Transaction retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeldTransactionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/meld/retail/transactions/sessions/{sessionId}:
    get:
      operationId: getMeldTransactionBySession
      summary: Get transaction by session
      description: Retrieves the Meld transaction associated with a widget session ID.
      tags:
        - Meld
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
          description: Widget session ID returned by `POST /retail/widget`.
      responses:
        '200':
          description: Transaction retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeldTransactionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/meld/discovery/service-providers:
    get:
      operationId: getMeldServiceProviders
      summary: List service providers
      description: Lists Meld service providers available to the current account.
      tags:
        - Meld
      responses:
        '200':
          description: Service providers retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeldServiceProvidersResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/meld/discovery/countries:
    get:
      operationId: getMeldCountries
      summary: List countries
      description: Lists Meld-supported countries (with regions when applicable).
      tags:
        - Meld
      responses:
        '200':
          description: Countries retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeldCountriesResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/meld/discovery/fiat-currencies:
    get:
      operationId: getMeldFiatCurrencies
      summary: List fiat currencies
      description: Lists Meld-supported fiat currencies.
      tags:
        - Meld
      responses:
        '200':
          description: Fiat currencies retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeldFiatCurrenciesResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/meld/discovery/crypto-currencies:
    get:
      operationId: getMeldCryptoCurrencies
      summary: List crypto currencies
      description: Lists Meld-supported crypto currencies and their chains.
      tags:
        - Meld
      responses:
        '200':
          description: Crypto currencies retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeldCryptoCurrenciesResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/meld/discovery/payment-methods:
    get:
      operationId: getMeldPaymentMethods
      summary: List payment methods
      description: Lists Meld-supported payment methods.
      tags:
        - Meld
      responses:
        '200':
          description: Payment methods retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeldPaymentMethodsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/meld/discovery/defaults:
    get:
      operationId: getMeldCountryDefaults
      summary: List country defaults
      description: |
        Returns the default fiat currency and payment methods per country.
      tags:
        - Meld
      responses:
        '200':
          description: Country defaults retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeldCountryDefaultsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/meld/discovery/buy-limits:
    get:
      operationId: getMeldBuyLimits
      summary: List buy limits
      description: Lists per-fiat min/max/default purchase amounts.
      tags:
        - Meld
      responses:
        '200':
          description: Buy limits retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeldBuyLimitsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/meld/discovery/sell-limits:
    get:
      operationId: getMeldSellLimits
      summary: List sell limits
      description: Lists per-crypto min/max/default sell amounts.
      tags:
        - Meld
      responses:
        '200':
          description: Sell limits retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeldSellLimitsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/meld/discovery/kyc-limits:
    get:
      operationId: getMeldKycLimits
      summary: List KYC limits
      description: >-
        Lists daily, weekly, monthly, yearly, and per-transaction limits per KYC
        tier.
      tags:
        - Meld
      responses:
        '200':
          description: KYC limits retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeldKycLimitsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/wallet/account-type:
    get:
      operationId: getAccountType
      summary: Get account type
      description: |
        Detects whether the client's wallet on the specified chain is a standard
        EOA, a smart contract, or an EIP-7702 delegated EOA.
      tags:
        - EIP-7702
      parameters:
        - $ref: '#/components/parameters/chain'
      responses:
        '200':
          description: Account type retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountTypeResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/wallet/build-authorization-list:
    post:
      operationId: buildAuthorizationList
      summary: Build an EIP-7702 authorization
      description: |
        Builds an EIP-7702 authorization hash for the client to sign. This
        delegates the EOA to a smart contract implementation.
      tags:
        - EIP-7702
      parameters:
        - $ref: '#/components/parameters/chain'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BuildAuthorizationListRequest'
      responses:
        '200':
          description: Authorization built successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuildAuthorizationListResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/wallet/build-authorization-transaction:
    post:
      operationId: buildAuthorizationTransaction
      summary: Build an EIP-7702 authorization transaction
      description: |
        Builds a complete EIP-7702 transaction with the signed authorization.
        Can optionally be subsidized (gas paid by Portal).
      tags:
        - EIP-7702
      parameters:
        - $ref: '#/components/parameters/chain'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BuildAuthorizationTransactionRequest'
      responses:
        '200':
          description: Transaction built successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuildAuthorizationTransactionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/delegation/init-system-account:
    post:
      operationId: initDelegationSystemAccount
      summary: Initialize a delegation system account
      description: |
        Initializes a Solana system account for delegation operations.
      tags:
        - Delegations
      parameters:
        - $ref: '#/components/parameters/chain'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - delegateAddress
              properties:
                delegateAddress:
                  type: string
                  description: The delegate's address.
      responses:
        '200':
          description: System account initialized successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolanaDelegationTransactionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/delegation/init-token-account:
    post:
      operationId: initDelegationTokenAccount
      summary: Initialize a delegation token account
      description: |
        Initializes a Solana token account for delegation operations.
      tags:
        - Delegations
      parameters:
        - $ref: '#/components/parameters/chain'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - ownerAddress
              properties:
                ownerAddress:
                  type: string
                  description: The owner's address.
      responses:
        '200':
          description: Token account initialized successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolanaDelegationTransactionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/delegation/approve:
    post:
      operationId: approveSolanaDelegation
      summary: Approve a Solana delegation
      description: |
        Builds a transaction to approve a Solana token delegation.
      tags:
        - Delegations
      parameters:
        - $ref: '#/components/parameters/chain'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApproveDelegationRequest'
      responses:
        '200':
          description: Approval transaction built successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolanaDelegationTransactionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/delegation/transfer:
    post:
      operationId: transferSolanaDelegation
      summary: Transfer as a Solana delegate
      description: |
        Builds a transaction to transfer tokens as a delegate on Solana.
      tags:
        - Delegations
      parameters:
        - $ref: '#/components/parameters/chain'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - ownerAddress
                - recipientAddress
                - amount
              properties:
                ownerAddress:
                  type: string
                  description: The token owner's address.
                recipientAddress:
                  type: string
                  description: The recipient's address.
                amount:
                  type: string
                  description: The amount to transfer.
      responses:
        '200':
          description: Transfer transaction built successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolanaDelegationTransactionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/delegation/status:
    get:
      operationId: getSolanaDelegationStatus
      summary: Get Solana delegation status
      description: |
        Retrieves the delegation status for the client's Solana token account,
        including current balance and active delegations.
      tags:
        - Delegations
      parameters:
        - $ref: '#/components/parameters/chain'
      responses:
        '200':
          description: Delegation status retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolanaDelegationStatusResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/delegation/revoke:
    post:
      operationId: revokeSolanaDelegation
      summary: Revoke a Solana delegation
      description: |
        Builds a transaction to revoke all Solana token delegations.
      tags:
        - Delegations
      parameters:
        - $ref: '#/components/parameters/chain'
      responses:
        '200':
          description: Revoke transaction built successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolanaDelegationTransactionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/sdk/metrics:
    post:
      operationId: submitSdkMetrics
      summary: Submit SDK metrics
      description: |
        Submits SDK performance metrics for monitoring and diagnostics.
      tags:
        - Clients
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SdkMetricsRequest'
      responses:
        '200':
          description: Metrics submitted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SdkMetricsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/eject:
    post:
      operationId: markClientAsEjected
      summary: Mark client as ejected
      description: >
        Marks the client and its wallets as ejected by setting the `ejectedAt`
        timestamp.

        This is a status update that should be called after the eject operation
        completes

        on the SDK/MPC side. This is irreversible.
      tags:
        - Clients
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                clientPlatform:
                  type: string
                  description: The client platform identifier.
                clientPlatformVersion:
                  type: string
                  description: The client platform version.
      responses:
        '204':
          description: Client ejected successfully
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/primes:
    get:
      operationId: getClientPrimes
      summary: Get client primes
      description: |
        Retrieves prime values for the client, used internally by SDKs for
        cryptographic operations.
      tags:
        - Clients
      parameters:
        - name: public_key
          in: query
          required: true
          schema:
            type: string
          description: The client's public key.
      responses:
        '200':
          description: Primes retrieved successfully
          content:
            application/json:
              schema:
                type: object
                description: Prime values from the prime service.
                additionalProperties: true
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/jwt:
    get:
      operationId: getClientJwt
      summary: Get a JWT
      description: |
        Generates a short-lived JWT (1 hour expiry, HS256) for the client.
      tags:
        - Clients
      responses:
        '200':
          description: JWT generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                    description: The JWT token string.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/wallets/{walletId}/signing-share-pairs/{signingSharePairId}:
    delete:
      operationId: deleteSigningSharePair
      summary: Delete a signing share pair
      description: |
        Deletes a specific signing share pair from a wallet.
      tags:
        - Wallet Shares
      parameters:
        - $ref: '#/components/parameters/walletId'
        - $ref: '#/components/parameters/signingSharePairId'
      responses:
        '204':
          description: Signing share pair deleted successfully
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/wallets/{walletId}/backup-share-pairs:
    get:
      operationId: getBackupSharePairs
      summary: Get backup share pairs
      description: |
        Retrieves the backup share pairs for a specific wallet.
      tags:
        - Wallet Shares
      parameters:
        - $ref: '#/components/parameters/walletId'
      responses:
        '200':
          description: Backup share pairs retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BackupSharePairSummary'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Wallet not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/wallets/{walletId}/signing-share-pairs:
    get:
      operationId: getSigningSharePairs
      summary: Get signing share pairs
      description: |
        Retrieves the signing share pairs for a specific wallet.
      tags:
        - Wallet Shares
      parameters:
        - $ref: '#/components/parameters/walletId'
      responses:
        '200':
          description: Signing share pairs retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SigningSharePairSummary'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Wallet not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/wallets/{walletId}/complete-eject:
    patch:
      operationId: completeEject
      summary: Complete wallet ejection
      description: |
        Completes the ejection process for a wallet.
      tags:
        - Wallet Shares
      parameters:
        - $ref: '#/components/parameters/walletId'
      responses:
        '204':
          description: Ejection completed successfully
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Wallet not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/wallets/{walletId}/prepare-eject:
    post:
      operationId: prepareEject
      summary: Prepare wallet ejection (deprecated)
      deprecated: true
      description: |
        **Deprecated.** Use the ejectable-backup-shares endpoint instead.

        Prepares the wallet for ejection by retrieving backup shares.
      tags:
        - Wallet Shares
      parameters:
        - $ref: '#/components/parameters/walletId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - backupMethod
              properties:
                backupMethod:
                  type: string
                  description: The backup method to use for ejection.
      responses:
        '200':
          description: Ejection prepared successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrepareEjectResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/transactions:
    get:
      operationId: getTransactionsDeprecated
      summary: Get transactions (deprecated)
      deprecated: true
      description: >
        **Deprecated.** Use `/clients/me/chains/{chain}/transactions` instead.

        Sunset date: 2026-12-31. Responses include `Deprecation`, `Sunset`, and
        `Link` headers.


        Retrieves EIP-155 transaction history for the client.
      tags:
        - Deprecated
      parameters:
        - name: chainId
          in: query
          required: true
          schema:
            type: string
          description: The chain ID in CAIP-2 format (e.g. `eip155:1`).
        - name: limit
          in: query
          schema:
            type: integer
          description: Maximum number of results to return.
        - name: offset
          in: query
          schema:
            type: integer
          description: Number of results to skip.
        - name: order
          in: query
          schema:
            type: string
          description: Sort order.
      responses:
        '200':
          description: Transactions retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/nfts:
    get:
      operationId: getNftsDeprecated
      summary: Get NFTs (deprecated)
      deprecated: true
      description: >
        **Deprecated.** Use `/clients/me/chains/{chain}/assets/nfts` instead.

        Sunset date: 2026-12-31. Responses include `Deprecation`, `Sunset`, and
        `Link` headers.


        Retrieves NFTs owned by the client on a specific chain.
      tags:
        - Deprecated
      parameters:
        - name: chainId
          in: query
          required: true
          schema:
            type: string
          description: The chain ID in CAIP-2 format (e.g. `eip155:1`).
      responses:
        '200':
          description: NFTs retrieved successfully
          content:
            application/json:
              schema:
                type: object
                description: NFT data for the specified chain.
                additionalProperties: true
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/balances:
    get:
      operationId: getBalancesDeprecated
      summary: Get balances (deprecated)
      deprecated: true
      description: >
        **Deprecated.** Use `/clients/me/chains/{chain}/assets` instead.

        Sunset date: 2026-12-31. Responses include `Deprecation`, `Sunset`, and
        `Link` headers.


        Retrieves token balances for the client on a specific chain.
      tags:
        - Deprecated
      parameters:
        - name: chainId
          in: query
          required: true
          schema:
            type: string
          description: The chain ID in CAIP-2 format (e.g. `eip155:1`).
      responses:
        '200':
          description: Balances retrieved successfully
          content:
            application/json:
              schema:
                type: object
                description: Balance data for the specified chain.
                additionalProperties: true
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /swaps/quote:
    post:
      operationId: getSwapsQuoteDeprecated
      summary: Get a swap quote (deprecated)
      deprecated: true
      description: |
        **Deprecated.** Use `/clients/me/integrations/0x/swap/quote` instead.

        Retrieves a swap quote via the legacy swaps endpoint.
      tags:
        - 0x
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ZeroXSwapQuoteRequest'
      responses:
        '200':
          description: Swap quote retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZeroXSwapQuoteResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/chains/{chain}/transactions/{signature}:
    get:
      operationId: getTransactionBySignature
      summary: Get transaction details by signature
      description: >
        Look up a transaction or user operation by its hash or signature.
        Supports EVM

        (transaction hash or user operation hash), Solana (signature), Bitcoin
        (txid),

        Stellar (hash), and Tron (txid).
      tags:
        - Wallet
      parameters:
        - $ref: '#/components/parameters/chain'
        - name: signature
          in: path
          required: true
          description: >
            The transaction hash, signature, or txid to look up. The format
            depends on the

            chain type (e.g. EVM transaction hash, Solana signature, Bitcoin
            txid).
          schema:
            type: string
      responses:
        '200':
          description: Transaction details retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/TransactionLookupResponse'
                  metadata:
                    type: object
                    properties:
                      chainId:
                        type: string
                        description: CAIP-2 chain identifier (e.g. "eip155:10143")
                      signature:
                        type: string
                        description: The input signature/hash echoed back
        '400':
          description: Bad request - invalid chain format or parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Transaction not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /swaps/sources:
    post:
      operationId: getSwapsSourcesDeprecated
      summary: Get swap sources (deprecated)
      deprecated: true
      description: |
        **Deprecated.** Use `/clients/me/integrations/0x/swap/sources` instead.

        Retrieves available swap sources via the legacy swaps endpoint.
      tags:
        - 0x
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ZeroXSwapSourcesRequest'
      responses:
        '200':
          description: Swap sources retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZeroXSwapSourcesResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/customers:
    post:
      operationId: provisionDueCustomer
      summary: Provision Due customer
      description: |
        Provisions the Due customer for the authenticated client. Idempotent:
        calling it again for the same client returns the existing customer.
      tags:
        - Due
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DueProvisionCustomerRequest'
      responses:
        '200':
          description: Due customer provisioned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueCustomerResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    get:
      operationId: getDueCustomer
      summary: Get Due customer
      description: Returns the Due customer for the authenticated client.
      tags:
        - Due
      responses:
        '200':
          description: Due customer retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueCustomerResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/channels:
    get:
      operationId: listDueChannels
      summary: List channels
      description: |
        Lists the rails and currencies available to the customer. Pass
        `onlyAvailable=true` to filter to channels the customer can use today.
      tags:
        - Due
      parameters:
        - name: onlyAvailable
          in: query
          required: false
          schema:
            type: boolean
          description: Filter to channels the customer can use today.
      responses:
        '200':
          description: Channels retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueChannelsResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/financial-institutions/{country2}/{schema}:
    get:
      operationId: listDueFinancialInstitutions
      summary: List financial institutions
      description: Lists financial institutions for a country and bank schema.
      tags:
        - Due
      parameters:
        - name: country2
          in: path
          required: true
          schema:
            type: string
          description: ISO-3166-1 alpha-2 country code.
        - name: schema
          in: path
          required: true
          schema:
            type: string
          description: Bank schema (for example `bank_us`, `bank_sepa`).
      responses:
        '200':
          description: Financial institutions retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueFinancialInstitutionsResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/financial-institutions/{financialInstitutionId}:
    get:
      operationId: getDueFinancialInstitution
      summary: Get financial institution
      description: Returns a single financial institution by id.
      tags:
        - Due
      parameters:
        - name: financialInstitutionId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Financial institution retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueFinancialInstitutionResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/kyc:
    post:
      operationId: startDueKycSubmission
      summary: Start KYC submission
      description: Starts an API-driven KYC submission for the customer.
      tags:
        - Due
      responses:
        '200':
          description: Submission started
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueKycSubmissionResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    get:
      operationId: getDueKycStatus
      summary: Get KYC status
      description: Returns the customer's KYC state and outstanding requirements.
      tags:
        - Due
      responses:
        '200':
          description: KYC state retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueKycStateResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/kyc/session:
    post:
      operationId: startDueKycSession
      summary: Start hosted KYC session
      description: Creates a hosted KYC session and returns a URL to redirect the user to.
      tags:
        - Due
      responses:
        '200':
          description: Session created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueKycSessionResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/kyc/submissions/{id}:
    get:
      operationId: getDueKycSubmission
      summary: Get KYC submission
      description: Returns a KYC submission and its required fields.
      tags:
        - Due
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Submission retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueKycSubmissionResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/kyc/submissions/{id}/info:
    post:
      operationId: submitDueKycInfo
      summary: Submit KYC information
      description: >
        Submits collected information for a KYC submission. Due validates the

        payload and returns field-level errors for anything missing or
        malformed.
      tags:
        - Due
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DueKycInfoRequest'
      responses:
        '200':
          description: Information submitted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueKycSubmissionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/kyc/submissions/{id}/documents:
    post:
      operationId: createDueKycDocument
      summary: Create KYC document
      description: Registers a document against a submission and returns an upload token.
      tags:
        - Due
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DueKycDocumentRequest'
      responses:
        '200':
          description: Document created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueKycDocumentResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/kyc/submissions/documents/{token}:
    post:
      operationId: uploadDueKycDocument
      summary: Upload KYC document
      description: |
        Uploads a document's bytes using the token from create document. The
        decoded file can be up to 10MB; the MIME type is inferred from the
        filename extension or supplied explicitly.
      tags:
        - Due
      parameters:
        - name: token
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DueKycDocumentUploadRequest'
      responses:
        '200':
          description: Document uploaded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueGenericResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/kyc/submissions/{id}/complete:
    post:
      operationId: completeDueKycSubmission
      summary: Complete KYC submission
      description: Submits a KYC submission for review.
      tags:
        - Due
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Submission completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueKycSubmissionResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/kyc/endorsements:
    get:
      operationId: listDueEndorsements
      summary: List endorsements
      description: Lists the customer's endorsements.
      tags:
        - Due
      responses:
        '200':
          description: Endorsements retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueEndorsementsResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/kyc/endorsements/{code}:
    post:
      operationId: createDueEndorsement
      summary: Request endorsement
      description: |
        Requests an endorsement by code. Returns `409 Conflict` when the
        endorsement already exists; treat it as already in progress and fetch
        its state instead.
      tags:
        - Due
      parameters:
        - name: code
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Endorsement requested
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueEndorsementResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Endorsement already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    get:
      operationId: getDueEndorsement
      summary: Get endorsement
      description: Returns an endorsement's state and any extra requirements it adds.
      tags:
        - Due
      parameters:
        - name: code
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Endorsement retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueEndorsementResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/tos/{token}:
    get:
      operationId: getDueTos
      summary: Get terms of service
      description: Fetches a terms of service document by token.
      tags:
        - Due
      parameters:
        - name: token
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Terms of service retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueTosResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      operationId: acceptDueTos
      summary: Accept terms of service
      description: Records the end user's acceptance of a terms of service document.
      tags:
        - Due
      parameters:
        - name: token
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DueTosAcceptRequest'
      responses:
        '200':
          description: Acceptance recorded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueTosResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/usage:
    get:
      operationId: getDueUsage
      summary: Get usage
      description: Returns the customer's Due usage records.
      tags:
        - Due
      responses:
        '200':
          description: Usage retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueGenericResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/transfers/quote:
    post:
      operationId: createDueTransferQuote
      summary: Create transfer quote
      description: >
        Prices a transfer. `source` and `destination` each carry a rail,

        currency, and amount. Application fees are enforced server-side from the

        custodian's configuration; any client-supplied `applicationFee*` is
        stripped.
      tags:
        - Due
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DueTransferQuoteRequest'
      responses:
        '200':
          description: Quote created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueTransferQuoteResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/transfers/estimate:
    post:
      operationId: estimateDueTransfer
      summary: Estimate transfer
      description: Returns an indicative estimate without creating a quote token.
      tags:
        - Due
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DueTransferEstimateRequest'
      responses:
        '200':
          description: Estimate created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueTransferEstimateResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/transfers:
    get:
      operationId: listDueTransfers
      summary: List transfers
      description: Lists the customer's transfers.
      tags:
        - Due
      responses:
        '200':
          description: Transfers retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueTransfersResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      operationId: createDueTransfer
      summary: Create transfer
      description: Creates a transfer from a quote token and a recipient.
      tags:
        - Due
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
          description: Optional key to deduplicate retries.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DueTransferCreateRequest'
      responses:
        '200':
          description: Transfer created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueTransferResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/transfers/{id}:
    get:
      operationId: getDueTransfer
      summary: Get transfer
      description: Returns a transfer's current state.
      tags:
        - Due
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Transfer retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueTransferResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/transfers/{id}/transfer-intent:
    post:
      operationId: createDueTransferIntent
      summary: Create transfer intent
      description: Creates a transfer intent for a crypto-source transfer.
      tags:
        - Due
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DueTransferIntentRequest'
      responses:
        '200':
          description: Transfer intent created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueTransferIntentResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/transfers/{id}/funding-address:
    post:
      operationId: createDueFundingAddress
      summary: Create funding address
      description: |
        Returns the funding instructions for a transfer. For a payin these are
        fiat bank details; for a payout, the onchain deposit address.
      tags:
        - Due
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Funding address created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueFundingAddressResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/fx/quote:
    post:
      operationId: createDueFxQuote
      summary: Create FX quote
      description: Returns an FX quote for a currency pair.
      tags:
        - Due
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DueFxQuoteRequest'
      responses:
        '200':
          description: FX quote created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueFxQuoteResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/fx/markets:
    get:
      operationId: listDueFxMarkets
      summary: List FX markets
      description: Lists available FX markets and rates.
      tags:
        - Due
      responses:
        '200':
          description: Markets retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueFxMarketsResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/fx/markets/{base}/{quote}:
    get:
      operationId: getDueFxMarket
      summary: Get FX market
      description: Returns the FX market for a base and quote currency.
      tags:
        - Due
      parameters:
        - name: base
          in: path
          required: true
          schema:
            type: string
        - name: quote
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Market retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueFxMarketResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/fx/markets/{base}/{quote}/history:
    get:
      operationId: getDueFxMarketHistory
      summary: Get FX market history
      description: Returns historical rates for a base and quote currency.
      tags:
        - Due
      parameters:
        - name: base
          in: path
          required: true
          schema:
            type: string
        - name: quote
          in: path
          required: true
          schema:
            type: string
        - name: interval
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Market history retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueFxMarketHistoryResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/recipients:
    get:
      operationId: listDueRecipients
      summary: List recipients
      description: Lists the customer's recipients.
      tags:
        - Due
      responses:
        '200':
          description: Recipients retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueRecipientsResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      operationId: createDueRecipient
      summary: Create recipient
      description: |
        Creates a recipient. For onchain recipients, pass a CAIP-2 `chainId` and
        omit the address to default it to the client's Portal wallet. For a fiat
        beneficiary, set `isExternal: true` and provide the bank `details`.
      tags:
        - Due
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
          description: Optional key to deduplicate retries.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DueRecipientCreateRequest'
      responses:
        '200':
          description: Recipient created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueRecipientResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Recipient already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/recipients/{id}:
    get:
      operationId: getDueRecipient
      summary: Get recipient
      description: Returns a recipient by id.
      tags:
        - Due
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Recipient retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueRecipientResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      operationId: deleteDueRecipient
      summary: Delete recipient
      description: Deletes a recipient by id.
      tags:
        - Due
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Recipient deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueGenericResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/wallets:
    post:
      operationId: registerDueWallet
      summary: Register wallet
      description: Registers the client's Portal wallet address with Due.
      tags:
        - Due
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DueWalletCreateRequest'
      responses:
        '200':
          description: Wallet registered
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueWalletResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    get:
      operationId: listDueWallets
      summary: List wallets
      description: Lists the client's wallets registered with Due.
      tags:
        - Due
      responses:
        '200':
          description: Wallets retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueWalletsResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/wallets/{walletId}/balance:
    get:
      operationId: getDueWalletBalance
      summary: Get wallet balance
      description: Returns balances for a registered wallet.
      tags:
        - Due
      parameters:
        - name: walletId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Balance retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueWalletBalanceResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/virtual-accounts:
    post:
      operationId: createDueVirtualAccount
      summary: Create virtual account
      description: |
        Creates a persistent virtual account that auto-converts fiat deposits to
        crypto in the destination wallet.
      tags:
        - Due
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DueVirtualAccountCreateRequest'
      responses:
        '200':
          description: Virtual account created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueVirtualAccountResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    get:
      operationId: getDueVirtualAccountByQuery
      summary: Get virtual account by query
      description: Returns a virtual account matching the supplied query parameters.
      tags:
        - Due
      parameters:
        - name: destination
          in: query
          required: false
          schema:
            type: string
        - name: schemaIn
          in: query
          required: false
          schema:
            type: string
        - name: currencyIn
          in: query
          required: false
          schema:
            type: string
        - name: railOut
          in: query
          required: false
          schema:
            type: string
        - name: currencyOut
          in: query
          required: false
          schema:
            type: string
        - name: reference
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Virtual account retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueVirtualAccountResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/virtual-accounts/list:
    get:
      operationId: listDueVirtualAccounts
      summary: List virtual accounts
      description: Lists the customer's virtual accounts.
      tags:
        - Due
      responses:
        '200':
          description: Virtual accounts retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueVirtualAccountsResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /clients/me/integrations/due/virtual-accounts/key/{key}:
    get:
      operationId: getDueVirtualAccount
      summary: Get virtual account
      description: |
        Returns a virtual account by its composite key,
        `destination/schemaIn/currencyIn/railOut/currencyOut/reference`.
      tags:
        - Due
      parameters:
        - name: key
          in: path
          required: true
          schema:
            type: string
          description: Composite key with each segment URL-encoded.
      responses:
        '200':
          description: Virtual account retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueVirtualAccountResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      operationId: updateDueVirtualAccount
      summary: Update virtual account
      description: |
        Updates a virtual account by its composite key. Application fees are
        enforced server-side; any client-supplied `applicationFee*` is stripped.
      tags:
        - Due
      parameters:
        - name: key
          in: path
          required: true
          schema:
            type: string
          description: Composite key with each segment URL-encoded.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DueVirtualAccountUpdateRequest'
      responses:
        '200':
          description: Virtual account updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DueVirtualAccountResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Client API Key or Client Session Token (CST). Pass as a Bearer token in
        the

        Authorization header.
  parameters:
    chain:
      name: chain
      in: path
      required: true
      description: >
        The blockchain chain identifier. Use either a friendly name or CAIP-2
        format.

        When using CAIP-2 format in URLs, ensure the colon (`:`) is URI-encoded
        as `%3A`.


        **Supported chains:**

        - `ethereum` (`eip155:1`)

        - `sepolia` (`eip155:11155111`)

        - `base` (`eip155:8453`)

        - `base-sepolia` (`eip155:84532`)

        - `polygon` (`eip155:137`)

        - `polygon-mumbai` (`eip155:80001`)

        - `celo` (`eip155:42220`)

        - `celo-alfajores` (`eip155:44787`)

        - `monad` (`eip155:143`)

        - `monad-testnet` (`eip155:10143`)

        - `solana` (`solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`)

        - `solana-devnet` (`solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1`)

        - `tron` (`tron:mainnet`)

        - `tron-nile` (`tron:nile`)

        - `tron-shasta` (`tron:shasta`)

        - `stellar` (`stellar:pubnet`)

        - `stellar-testnet` (`stellar:testnet`)

        - `bitcoin-segwit` (`bip122:000000000019d6689c085ae165831e93-p2wpkh`)

        - `bitcoin-segwit-testnet`
        (`bip122:000000000933ea01ad0ee984209779ba-p2wpkh`)

        - `bitcoin-p2wpkh` (`bip122:000000000019d6689c085ae165831e93-p2wpkh`)

        - `bitcoin-p2wpkh-testnet`
        (`bip122:000000000933ea01ad0ee984209779ba-p2wpkh`)
      schema:
        type: string
      examples:
        ethereum:
          value: ethereum
          summary: Ethereum mainnet (friendly name)
        eip155:
          value: eip155:1
          summary: Ethereum mainnet (CAIP-2)
        solana:
          value: solana
          summary: Solana mainnet (friendly name)
        bitcoin:
          value: bitcoin-segwit
          summary: Bitcoin segwit (friendly name)
    backupSharePairId:
      name: backupSharePairId
      in: path
      required: true
      description: The unique identifier of the backup share pair.
      schema:
        type: string
    token:
      name: token
      in: path
      required: true
      description: >
        The token symbol (e.g. `USDC`, `ETH`) or contract/mint address on the
        specified chain.
      schema:
        type: string
      examples:
        symbol:
          value: USDC
          summary: Token symbol
        contractAddress:
          value: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
          summary: ERC-20 contract address
    walletId:
      name: walletId
      in: path
      required: true
      description: The unique identifier of the wallet.
      schema:
        type: string
    transactionId:
      name: transactionId
      in: path
      required: true
      description: The unique identifier of the yield transaction.
      schema:
        type: string
    signingSharePairId:
      name: signingSharePairId
      in: path
      required: true
      description: The unique identifier of the signing share pair.
      schema:
        type: string
  schemas:
    TransactionLookupResponse:
      type: object
      description: >
        Exactly one of the chain-specific fields will be non-null, depending on
        the chain

        namespace of the requested transaction.
      properties:
        evmTransaction:
          $ref: '#/components/schemas/EvmTransactionLookupResult'
          nullable: true
        evmUserOperation:
          $ref: '#/components/schemas/EvmUserOperationLookupResult'
          nullable: true
        solanaTransaction:
          $ref: '#/components/schemas/SolanaTransactionDetails'
          nullable: true
        bitcoinTransaction:
          $ref: '#/components/schemas/BitcoinTransactionLookupResult'
          nullable: true
        stellarTransaction:
          $ref: '#/components/schemas/StellarTransactionLookupResult'
          nullable: true
        tronTransaction:
          $ref: '#/components/schemas/TronTransactionLookupResult'
          nullable: true
    EvmTransactionLookupResult:
      type: object
      properties:
        hash:
          type: string
        from:
          type: string
        to:
          type: string
          nullable: true
        value:
          type: string
        nonce:
          type: string
        blockNumber:
          type: string
          nullable: true
        blockHash:
          type: string
          nullable: true
        transactionIndex:
          type: string
          nullable: true
        gas:
          type: string
        gasPrice:
          type: string
          nullable: true
        maxFeePerGas:
          type: string
          nullable: true
        maxPriorityFeePerGas:
          type: string
          nullable: true
        input:
          type: string
        type:
          type: string
        status:
          type: string
          nullable: true
          description: From receipt
        gasUsed:
          type: string
          nullable: true
          description: From receipt
        effectiveGasPrice:
          type: string
          nullable: true
          description: From receipt
        logs:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/EvmTransactionLog'
          description: From receipt
        contractAddress:
          type: string
          nullable: true
          description: From receipt
    EvmTransactionLog:
      type: object
      properties:
        address:
          type: string
        topics:
          type: array
          items:
            type: string
        data:
          type: string
        blockNumber:
          type: string
        transactionHash:
          type: string
        logIndex:
          type: string
    EvmUserOperationLookupResult:
      type: object
      properties:
        sender:
          type: string
        nonce:
          type: string
        callData:
          type: string
        callGasLimit:
          type: string
        verificationGasLimit:
          type: string
        preVerificationGas:
          type: string
        maxFeePerGas:
          type: string
        maxPriorityFeePerGas:
          type: string
        signature:
          type: string
        entryPoint:
          type: string
        success:
          type: boolean
          nullable: true
        actualGasCost:
          type: string
          nullable: true
          description: >-
            Actual gas cost in Wei, hex-encoded with `0x` prefix. Only populated
            for AA user operations.
        formattedActualGasCost:
          type: string
          nullable: true
          description: >-
            Actual gas cost in Wei as a base-10 string. Same value as
            `actualGasCost`, formatted for convenience. Only populated for AA
            user operations; reflects the gas sponsored when a gas policy is
            enabled for the chain.
        actualGasUsed:
          type: string
          nullable: true
        receipt:
          $ref: '#/components/schemas/EvmTransactionLookupResult'
          nullable: true
          description: The underlying bundler transaction
    BitcoinTransactionLookupResult:
      type: object
      properties:
        txid:
          type: string
        version:
          type: number
        size:
          type: number
        weight:
          type: number
        locktime:
          type: number
        fee:
          type: number
        status:
          type: object
          properties:
            confirmed:
              type: boolean
            blockHeight:
              type: number
              nullable: true
            blockHash:
              type: string
              nullable: true
            blockTime:
              type: number
              nullable: true
        vin:
          type: array
          items:
            type: object
            properties:
              txid:
                type: string
              vout:
                type: number
              prevout:
                type: object
                nullable: true
                properties:
                  scriptpubkey:
                    type: string
                  scriptpubkey_address:
                    type: string
                  value:
                    type: number
              scriptsig:
                type: string
              witness:
                type: array
                items:
                  type: string
              sequence:
                type: number
        vout:
          type: array
          items:
            type: object
            properties:
              scriptpubkey:
                type: string
              scriptpubkey_address:
                type: string
              value:
                type: number
    StellarTransactionLookupResult:
      type: object
      properties:
        id:
          type: string
        hash:
          type: string
        ledger:
          type: number
        createdAt:
          type: string
        sourceAccount:
          type: string
        feeCharged:
          type: string
        maxFee:
          type: string
        operationCount:
          type: number
        successful:
          type: boolean
        memo:
          type: string
          nullable: true
        memoType:
          type: string
        operations:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              type:
                type: string
              sourceAccount:
                type: string
    TronTransactionLookupResult:
      type: object
      properties:
        txID:
          type: string
        blockNumber:
          type: number
          nullable: true
        blockTimeStamp:
          type: number
          nullable: true
        contractResult:
          type: array
          items:
            type: string
        receipt:
          type: object
          nullable: true
          properties:
            result:
              type: string
              nullable: true
            energyUsage:
              type: number
              nullable: true
            energyUsageTotal:
              type: number
              nullable: true
            netUsage:
              type: number
              nullable: true
        contractType:
          type: string
          nullable: true
        contractData:
          type: object
          nullable: true
          description: Contract call data; structure varies by contract type
        result:
          type: string
          nullable: true
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message describing what went wrong
    BuildTransactionRequest:
      type: object
      required:
        - to
        - token
        - amount
      properties:
        to:
          type: string
          description: |
            The recipient's wallet address. Format depends on the chain
            (e.g. `0x...` for EVM, base58 for Solana, `T...` for Tron).
        token:
          type: string
          description: |
            The token symbol (e.g. `USDC`, `ETH`) or contract/mint address.
            For native token transfers, use `NATIVE`.
        amount:
          type: string
          description: >
            The amount to transfer as a string in the token's primary
            denomination.

            Must be greater than zero. For example, `"0.01"` is 1 cent of USDC.
    ClientDetails:
      type: object
      properties:
        createdAt:
          type: string
          format: date-time
          description: When the client was created
        custodian:
          type: object
          properties:
            id:
              type: string
              description: Custodian ID
            name:
              type: string
              description: Custodian name
        ejectedAt:
          type: string
          format: date-time
          nullable: true
          description: When the client was ejected, or null if not ejected
        environment:
          type: object
          properties:
            id:
              type: string
              description: Environment ID
            name:
              type: string
              description: Environment name (e.g. "Development", "Production")
            backupWithPortalEnabled:
              type: boolean
              description: Whether Portal-managed backups are enabled
            isMultiBackupEnabled:
              type: boolean
              description: Whether multi-backup is enabled
        id:
          type: string
          description: Client ID
        isAccountAbstracted:
          type: boolean
          description: Whether the client uses account abstraction (EIP-7702)
        metadata:
          type: object
          properties:
            namespaces:
              type: object
              description: >
                Chain-keyed map of wallet addresses and metadata. Keys are chain

                namespaces (e.g. `eip155`, `solana`, `bip122`, `stellar`,
                `tron`).
              additionalProperties:
                type: object
                properties:
                  address:
                    type: string
                    description: Wallet address on this chain
                  curve:
                    type: string
                    enum:
                      - SECP256K1
                      - ED25519
                    description: Cryptographic curve used for this chain
        wallets:
          type: array
          items:
            $ref: '#/components/schemas/Wallet'
    Wallet:
      type: object
      properties:
        createdAt:
          type: string
          format: date-time
        curve:
          type: string
          enum:
            - SECP256K1
            - ED25519
          description: Cryptographic curve
        id:
          type: string
          description: Wallet ID
        ejectableUntil:
          type: string
          format: date-time
          nullable: true
          description: Deadline until which the wallet can be ejected, or null
        publicKey:
          type: string
          nullable: true
          description: JSON-stringified public key
        backupSharePairs:
          type: array
          items:
            $ref: '#/components/schemas/BackupSharePair'
        signingSharePairs:
          type: array
          items:
            $ref: '#/components/schemas/SigningSharePair'
    BackupSharePair:
      type: object
      properties:
        backupMethod:
          type: string
          enum:
            - CUSTOM
            - GDRIVE
            - ICLOUD
            - PASSWORD
            - PASSKEY
            - UNKNOWN
          description: Backup method used
        createdAt:
          type: string
          format: date-time
        id:
          type: string
          description: Backup share pair ID
        status:
          type: string
          enum:
            - completed
            - incomplete
            - STORED_CLIENT_BACKUP_SHARE
            - STORED_CLIENT_BACKUP_SHARE_KEY
            - STORED_CUSTODIAN_BACKUP_SHARE
            - UNKNOWN
          description: Current status of the backup share pair
    SigningSharePair:
      type: object
      properties:
        createdAt:
          type: string
          format: date-time
        id:
          type: string
          description: Signing share pair ID
        status:
          type: string
          enum:
            - completed
            - incomplete
            - STORED_DATABASE
            - STORED_CLIENT
          description: Current status of the signing share pair
    Eip155TransactionResult:
      type: object
      description: Response for EIP-155 compatible chains (Ethereum, Polygon, Base, etc.)
      properties:
        transaction:
          type: object
          properties:
            from:
              type: string
              description: Sender's checksummed address
            to:
              type: string
              description: >
                Token contract address (for ERC-20 transfers) or recipient
                address

                (for native transfers)
            data:
              type: string
              description: Encoded function call data (for ERC-20 transfers)
            value:
              type: string
              description: Hex-encoded value in wei (for native transfers)
        metadata:
          type: object
          properties:
            amount:
              type: string
              description: Human-readable amount
            fromAddress:
              type: string
              description: Sender's address
            toAddress:
              type: string
              description: Recipient's address
            tokenAddress:
              type: string
              description: Token contract address (ERC-20 only)
            tokenDecimals:
              type: integer
              description: Token decimal places
            tokenSymbol:
              type: string
              description: Token symbol (e.g. "USDC")
            rawAmount:
              type: string
              description: Amount in smallest unit (e.g. wei)
    SolanaTransactionResult:
      type: object
      description: Response for Solana chains
      properties:
        transaction:
          type: string
          description: Base58-encoded serialized transaction
        metadata:
          type: object
          properties:
            amount:
              type: string
              description: Human-readable amount
            fromAddress:
              type: string
              description: Sender's Solana address
            toAddress:
              type: string
              description: Recipient's Solana address
            tokenMintAddress:
              type: string
              description: SPL token mint address (omitted for native SOL)
            tokenDecimals:
              type: integer
              description: Token decimal places
            tokenProgramId:
              type: string
              description: Token program ID (TOKEN_PROGRAM_ID or TOKEN_2022_PROGRAM_ID)
            tokenExtensions:
              type: array
              items:
                type: string
              description: Token-2022 extensions (if applicable)
            tokenSymbol:
              type: string
              description: Token symbol
            rawAmount:
              type: string
              description: Amount in smallest unit (lamports or token base units)
            lastValidBlockHeight:
              type: string
              description: Last valid block height for the transaction
            serializedTransactionBase64Encoded:
              type: string
              description: Base64-encoded serialized transaction
            serializedTransactionBase58Encoded:
              type: string
              description: Base58-encoded serialized transaction
    BitcoinTransactionResult:
      type: object
      description: Response for Bitcoin (BIP-122) chains
      properties:
        transaction:
          type: object
          properties:
            publicKey:
              type: string
              description: Wallet public key
            rawTxHex:
              type: string
              description: Partially Signed Bitcoin Transaction (PSBT) as hex
            signatureHashes:
              type: array
              items:
                type: string
              description: Array of hashes to be signed (one per input)
        metadata:
          type: object
          properties:
            chainId:
              type: string
              description: Full CAIP-2 chain ID
            amount:
              type: string
              description: Amount in BTC
            fromAddress:
              type: string
              description: Sender's P2WPKH address
            toAddress:
              type: string
              description: Recipient's address
            rawAmount:
              type: string
              description: Amount in satoshis
            tokenDecimals:
              type: integer
              description: Always 8 for Bitcoin
            tokenSymbol:
              type: string
              description: Always "BTC"
            feeInSatoshis:
              type: string
              description: Network fee in satoshis
            changeInSatoshis:
              type: string
              description: Change amount in satoshis
    StellarTransactionResult:
      type: object
      description: Response for Stellar chains
      properties:
        transaction:
          type: object
          properties:
            xdr:
              type: string
              description: Transaction in XDR format
            networkPassphrase:
              type: string
              description: Stellar network passphrase
        metadata:
          type: object
          properties:
            amount:
              type: string
              description: Amount in stroops (smallest unit)
            fromAddress:
              type: string
              description: Sender's Stellar public key
            toAddress:
              type: string
              description: Recipient's Stellar public key
            assetCode:
              type: string
              description: Asset code (e.g. "XLM", "USDC")
            assetIssuer:
              type: string
              nullable: true
              description: Asset issuer public key (null for native XLM)
            rawAmount:
              type: string
              description: Amount in stroops
    TronTransactionResult:
      type: object
      description: Response for Tron chains
      properties:
        transaction:
          type: object
          properties:
            id:
              type: string
              description: Transaction ID
            network:
              type: string
              enum:
                - mainnet
                - nile
                - shasta
              description: Tron network
        metadata:
          type: object
          properties:
            amount:
              type: string
              description: Human-readable amount
            fromAddress:
              type: string
              description: Sender's base58 Tron address
            toAddress:
              type: string
              description: Recipient's base58 Tron address
            tokenSymbol:
              type: string
              description: Token symbol (e.g. "TRX", "USDT")
            contractAddress:
              type: string
              nullable: true
              description: TRC-20 contract address (null for native TRX)
    BroadcastTransactionRequest:
      type: object
      required:
        - rawTxHex
        - signatures
      properties:
        rawTxHex:
          type: string
          description: The raw transaction hex (PSBT) to broadcast.
        signatures:
          type: array
          items:
            type: string
          description: Array of signatures for each transaction input.
    BroadcastTransactionResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            txHash:
              type: string
              description: The broadcast transaction hash.
        metadata:
          type: object
          properties:
            chainId:
              type: string
              description: The CAIP-2 chain ID.
            clientId:
              type: string
              description: The client ID.
    AssetBalance:
      type: object
      properties:
        balance:
          type: string
          description: Human-readable balance.
        decimals:
          type: integer
          description: Number of decimal places.
        name:
          type: string
          description: Token name.
        rawBalance:
          type: string
          description: Balance in the smallest unit.
        symbol:
          type: string
          description: Token symbol (e.g. "ETH", "USDC").
        metadata:
          type: object
          description: Additional token metadata.
    AssetsResponse:
      type: object
      properties:
        nativeBalance:
          $ref: '#/components/schemas/AssetBalance'
        tokenBalances:
          type: array
          items:
            $ref: '#/components/schemas/AssetBalance'
        nfts:
          type: array
          items:
            $ref: '#/components/schemas/PrettyNFT'
          description: NFT assets. Only present when `includeNfts=true`.
    PrettyNFT:
      type: object
      properties:
        nftId:
          type: string
          description: Unique NFT identifier.
        name:
          type: string
          description: NFT name.
        description:
          type: string
          description: NFT description.
        imageUrl:
          type: string
          description: URL of the NFT image.
        chainId:
          type: string
          description: CAIP-2 chain ID where the NFT lives.
        contractAddress:
          type: string
          description: NFT contract address.
        tokenId:
          type: string
          description: Token ID within the contract.
        collection:
          type: object
          properties:
            name:
              type: string
              description: Collection name.
            description:
              type: string
              nullable: true
              description: Collection description.
            imageUrl:
              type: string
              description: Collection image URL.
        lastSale:
          type: object
          nullable: true
          description: Last sale information, if available.
        rarity:
          type: object
          properties:
            rank:
              type: integer
              nullable: true
              description: Rarity rank within the collection.
            score:
              type: number
              nullable: true
              description: Rarity score.
        floorPrice:
          type: string
          nullable: true
          description: Current floor price for the collection.
        detailedInfo:
          type: object
          properties:
            ownerCount:
              type: integer
              description: Number of unique owners.
            tokenCount:
              type: integer
              description: Total number of tokens in the collection.
            createdDate:
              type: string
              nullable: true
              description: Collection creation date.
            attributes:
              type: array
              items:
                type: object
              description: NFT attributes/traits.
            owners:
              type: array
              items:
                type: object
              description: List of owners.
    SolanaTransactionDetails:
      type: object
      properties:
        blockTime:
          type: integer
          description: Unix timestamp of the block.
        error:
          type: string
          nullable: true
          description: Transaction error as JSON string, or null if successful.
        signature:
          type: string
          description: Transaction signature.
        status:
          type: string
          description: Transaction status (e.g. "finalized", "confirmed", "processed").
        tokenMint:
          type: string
          nullable: true
          description: SPL token mint address, or null for native SOL transactions.
        transactionDetails:
          type: object
          nullable: true
          properties:
            transaction:
              type: object
              nullable: true
              description: Parsed transaction data.
              properties:
                message:
                  type: object
                  properties:
                    accountKeys:
                      type: array
                      items:
                        type: string
                    header:
                      type: object
                    instructions:
                      type: array
                      items:
                        type: object
                    recentBlockhash:
                      type: string
                signatures:
                  type: array
                  items:
                    type: string
            signatureDetails:
              type: object
              nullable: true
              description: Signature verification details.
              properties:
                blockTime:
                  type: integer
                confirmationStatus:
                  type: string
                error:
                  type: object
                  nullable: true
                memo:
                  type: string
                  nullable: true
                signature:
                  type: string
                slot:
                  type: integer
            metadata:
              type: object
              nullable: true
              description: Additional transaction metadata.
              properties:
                blockTime:
                  type: integer
                  nullable: true
                slot:
                  type: integer
                  nullable: true
                error:
                  type: object
                  nullable: true
                fee:
                  type: integer
                  nullable: true
                innerInstructions:
                  type: array
                  nullable: true
                  items:
                    type: object
                loadedAddresses:
                  type: object
                  nullable: true
                  properties:
                    readonly:
                      type: array
                      items:
                        type: string
                    writable:
                      type: array
                      items:
                        type: string
                logMessages:
                  type: array
                  nullable: true
                  items:
                    type: string
                postBalances:
                  type: array
                  nullable: true
                  items:
                    type: number
                postTokenBalances:
                  type: array
                  nullable: true
                  items:
                    type: object
                preBalances:
                  type: array
                  nullable: true
                  items:
                    type: number
                preTokenBalances:
                  type: array
                  nullable: true
                  items:
                    type: object
                rewards:
                  type: array
                  nullable: true
                  items:
                    type: object
                status:
                  type: object
                  nullable: true
                version:
                  type: string
                  nullable: true
                  description: Transaction version (e.g. "legacy" or a version number)
    TransactionHistoryItem:
      type: object
      description: Unified transaction item returned across all chains.
      properties:
        type:
          type: string
          enum:
            - transaction
            - userOperation
          description: Whether this is a regular transaction or an ERC-4337 UserOperation.
        hash:
          type: string
          description: Transaction hash (or UserOp bundler tx hash).
        from:
          type: string
          description: Sender address.
        to:
          type: string
          nullable: true
          description: Recipient address.
        value:
          type: string
          description: Transfer value as a decimal string.
        blockNumber:
          type: string
          nullable: true
          description: Block number as a decimal string.
        blockTimestamp:
          type: number
          nullable: true
          description: Unix timestamp in seconds.
        status:
          type: string
          nullable: true
          description: >-
            Transaction status (e.g. "confirmed", "pending", "success",
            "failed").
        chainId:
          type: string
          description: CAIP-2 chain ID.
        asset:
          type: string
          nullable: true
          description: Token symbol (e.g. "ETH", "USDC") or contract address if unknown.
        tokenAddress:
          type: string
          nullable: true
          description: Token contract address (EVM only).
        tokenDecimals:
          type: integer
          nullable: true
          description: Token decimals (EVM only).
        userOpHash:
          type: string
          nullable: true
          description: UserOperation hash (EVM UserOperations only).
        entryPoint:
          type: string
          nullable: true
          description: EntryPoint contract address (EVM UserOperations only).
        actualGasCost:
          type: string
          nullable: true
          description: Actual gas cost in wei (EVM UserOperations only).
        actualGasUsed:
          type: string
          nullable: true
          description: Actual gas units used (EVM UserOperations only).
    TransactionsResponse:
      type: object
      description: >
        Response format varies by chain:

        - **Solana**: transactions are `SolanaTransactionDetails` objects
        (legacy format with
          `signature`, `blockTime`, `tokenMint`, and nested `transactionDetails`).
        - **All other chains**: transactions are `TransactionHistoryItem`
        objects (unified format
          with `hash`, `from`, `to`, `value`, `blockNumber`, `blockTimestamp`, `status`, `chainId`).
        Solana will be migrated to the unified format in a future release.
      properties:
        data:
          type: object
          properties:
            transactions:
              type: array
              description: >
                Array of transaction items. Format depends on chain — see
                `TransactionHistoryItem`

                for EVM/Bitcoin/Tron/Stellar or `SolanaTransactionDetails` for
                Solana.
              items:
                oneOf:
                  - $ref: '#/components/schemas/TransactionHistoryItem'
                  - $ref: '#/components/schemas/SolanaTransactionDetails'
        metadata:
          type: object
          properties:
            address:
              type: string
              description: Wallet address used for the query.
            chainId:
              type: string
              description: CAIP-2 chain ID.
            clientId:
              type: string
              description: Client ID.
            limit:
              type: integer
              description: Max transactions requested.
            offset:
              type: integer
              description: Offset used for pagination.
            count:
              type: integer
              description: Total number of transactions returned.
    WalletCapabilities:
      type: object
      description: |
        EIP-5792 wallet capabilities keyed by hex chain ID (e.g. `"0x1"`).
        Returns an empty object if account abstraction is not enabled.
      additionalProperties:
        type: object
        properties:
          paymasterService:
            type: object
            properties:
              supported:
                type: boolean
                description: Whether paymaster service is supported on this chain.
    UpdateSigningSharePairsRequest:
      type: object
      required:
        - signingSharePairIds
        - status
      properties:
        signingSharePairIds:
          type: array
          items:
            type: string
          description: Array of signing share pair IDs to update.
        status:
          type: string
          enum:
            - STORED_CLIENT
          description: Target status. Only `STORED_CLIENT` is valid.
    UpdateBackupSharePairsRequest:
      type: object
      required:
        - backupSharePairIds
        - status
      properties:
        backupSharePairIds:
          type: array
          items:
            type: string
          description: Array of backup share pair IDs to update.
        status:
          type: string
          enum:
            - STORED_CLIENT_BACKUP_SHARE
            - STORED_CLIENT_BACKUP_SHARE_KEY
          description: >
            Target status. Valid values:

            - `STORED_CLIENT_BACKUP_SHARE_KEY` — requires current status
            `STORED_CUSTODIAN_BACKUP_SHARE`

            - `STORED_CLIENT_BACKUP_SHARE` — accepts
            `STORED_CUSTODIAN_BACKUP_SHARE` or `STORED_CLIENT_BACKUP_SHARE_KEY`
    UpdateBackupSharePairCipherTextRequest:
      type: object
      required:
        - clientCipherText
      properties:
        clientCipherText:
          type: string
          description: The encrypted cipher text to store on the backup share pair.
    CipherTextResponse:
      type: object
      properties:
        cipherText:
          type: string
          description: The stored cipher text for the backup share pair.
    SimulateTransactionRequest:
      type: object
      required:
        - to
      properties:
        to:
          type: string
          description: The target contract or recipient address.
        data:
          type: string
          description: Encoded transaction data (hex string).
        value:
          type: string
          description: Value to send in wei (hex string).
        gas:
          type: string
          description: Gas limit.
        gasPrice:
          type: string
          description: Gas price in wei.
        maxFeePerGas:
          type: string
          description: Maximum fee per gas (EIP-1559).
        maxPriorityFeePerGas:
          type: string
          description: Maximum priority fee per gas (EIP-1559).
    SimulateTransactionResponse:
      type: object
      properties:
        changes:
          type: array
          items:
            type: object
          description: Array of state changes from the simulation.
        gasUsed:
          type: string
          nullable: true
          description: Amount of gas used by the simulation.
        error:
          type: object
          properties:
            message:
              type: string
              description: Error message if the simulation failed.
    SimulateTransactionErrorResponse:
      type: object
      properties:
        requestError:
          type: object
          properties:
            message:
              type: string
              description: Validation error message.
    FundRequest:
      type: object
      required:
        - chainId
        - token
        - amount
      properties:
        chainId:
          type: string
          description: >
            The testnet chain ID in CAIP-2 format (e.g. `eip155:11155111` for
            Sepolia).
        token:
          type: string
          description: The token symbol to fund (e.g. `USDC`, `ETH`).
        amount:
          type: string
          description: The amount to fund as a numeric string. Must be greater than zero.
    FundResponse:
      type: object
      properties:
        data:
          type: object
          nullable: true
          description: Present on success, null on failure.
          properties:
            explorerUrl:
              type: string
              description: URL to view the funding transaction on a block explorer.
            txHash:
              type: string
              description: The funding transaction hash.
        error:
          type: object
          nullable: true
          description: Present on failure, null on success.
          properties:
            id:
              type: string
              description: Error identifier.
            message:
              type: string
              description: Human-readable error message.
        metadata:
          type: object
          properties:
            amount:
              type: string
              description: The requested amount.
            chainId:
              type: string
              description: The chain ID.
            clientId:
              type: string
              description: The client ID.
            custodianId:
              type: string
              description: The custodian ID.
            environmentId:
              type: string
              description: The environment ID.
            token:
              type: string
              description: The requested token.
    EvaluateTransactionEip155Request:
      type: object
      description: Request body for evaluating an EVM (EIP-155) transaction.
      required:
        - to
      properties:
        to:
          type: string
          description: The target contract or recipient address.
        data:
          type: string
          description: Encoded transaction data (hex string).
        value:
          type: string
          description: Value to send in wei (hex string).
        gas:
          type: string
          description: Gas limit.
        gasPrice:
          type: string
          description: Gas price in wei.
        maxFeePerGas:
          type: string
          description: Maximum fee per gas (EIP-1559).
        maxPriorityFeePerGas:
          type: string
          description: Maximum priority fee per gas (EIP-1559).
        operationType:
          type: string
          enum:
            - validation
            - simulation
            - all
          description: >
            The type of evaluation to perform. Defaults to `all` if not
            specified.

            - `validation` — risk assessment only

            - `simulation` — state change simulation only

            - `all` — both validation and simulation
    EvaluateTransactionSolanaRequest:
      type: object
      description: Request body for evaluating Solana transactions.
      required:
        - transactions
      properties:
        transactions:
          type: array
          items:
            type: string
          description: Array of base58-encoded Solana transactions to evaluate.
        operationType:
          type: string
          enum:
            - validation
            - simulation
            - all
          description: >
            The type of evaluation to perform. Defaults to `all` if not
            specified.
    EvaluateTransactionResponse:
      type: object
      description: >
        Evaluation result containing validation and/or simulation results
        depending on

        the requested `operationType`.
      properties:
        chain:
          type: string
          description: The CAIP-2 chain ID.
        validation:
          type: object
          description: >-
            Risk validation results (present when operationType is `validation`
            or `all`).
          properties:
            status:
              type: string
              description: Validation status (e.g. "Success").
            resultType:
              type: string
              description: Risk classification (e.g. "Benign", "Warning", "Malicious").
            description:
              type: string
              description: Human-readable description of the validation result.
            reason:
              type: string
              description: Reason for the classification.
            classification:
              type: string
              description: Detailed classification category.
            features:
              type: array
              items:
                type: object
              description: Feature flags from the validation engine.
        simulation:
          type: object
          description: >-
            Simulation results (present when operationType is `simulation` or
            `all`).
          properties:
            status:
              type: string
              description: Simulation status (e.g. "Success").
            assetsDiffs:
              type: array
              items:
                type: object
              description: Asset balance changes from the simulation.
            totalUsdDiff:
              type: string
              description: Total USD value change.
            exposures:
              type: array
              items:
                type: object
              description: Token approval exposures.
            totalUsdExposure:
              type: string
              description: Total USD exposure.
            addressDetails:
              type: object
              description: Details about addresses involved in the transaction.
            accountSummary:
              type: object
              description: Account summary after simulation.
    ApproveDelegationRequest:
      type: object
      required:
        - delegateAddress
        - amount
      properties:
        delegateAddress:
          type: string
          description: The address to delegate spending authority to.
        amount:
          type: string
          description: The amount to approve for delegation. Must be greater than zero.
    RevokeDelegationRequest:
      type: object
      required:
        - delegateAddress
      properties:
        delegateAddress:
          type: string
          description: The delegate address whose approval should be revoked.
    TransferAsDelegateRequest:
      type: object
      required:
        - fromAddress
        - toAddress
        - amount
      properties:
        fromAddress:
          type: string
          description: The address to transfer tokens from (the token owner).
        toAddress:
          type: string
          description: The address to transfer tokens to.
        amount:
          type: string
          description: The amount to transfer. Must be greater than zero.
    DelegationTransactionEvmResponse:
      type: object
      description: Delegation transaction response for EVM chains.
      properties:
        transactions:
          type: array
          items:
            type: object
            properties:
              from:
                type: string
                description: Sender's address.
              to:
                type: string
                description: Contract address.
              data:
                type: string
                description: Encoded function call data.
              value:
                type: string
                description: Hex-encoded value in wei.
          description: Array of unsigned transactions to sign and submit.
        metadata:
          type: object
          description: >
            Transaction metadata. Fields vary depending on the operation
            (approval,

            revocation, or transfer).
          additionalProperties: true
    DelegationTransactionSolanaResponse:
      type: object
      description: Delegation transaction response for Solana chains.
      properties:
        encodedTransactions:
          type: array
          items:
            type: string
          description: Array of encoded Solana transactions.
        metadata:
          type: object
          description: >
            Transaction metadata. Fields vary depending on the operation. May
            include

            `lastValidBlockHeight`, `serializedTransactionBase58Encoded`, and
            other

            Solana-specific fields.
          additionalProperties: true
    DelegationStatusResponse:
      type: object
      properties:
        chainId:
          type: string
          description: The CAIP-2 chain ID.
        token:
          type: string
          description: The token symbol.
        tokenAddress:
          type: string
          description: The token contract address (EVM).
        tokenAccount:
          type: string
          nullable: true
          description: The token account address (Solana only).
        balance:
          type: string
          description: Human-readable token balance.
        balanceRaw:
          type: string
          description: Token balance in the smallest unit.
        delegations:
          type: array
          items:
            type: object
            properties:
              address:
                type: string
                description: The delegate's address.
              delegateAmount:
                type: string
                description: Human-readable delegated amount.
              delegateAmountRaw:
                type: string
                description: Delegated amount in the smallest unit.
    SessionKeyPermission:
      type: object
      description: >
        A permission to grant to a session key. Uses a discriminated union on
        the `type` field.
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - erc20-transfer
            - native-transfer
          description: >
            The type of permission:

            - `erc20-transfer` — allows ERC-20 token transfers (requires
            `tokenAddress`)

            - `native-transfer` — allows native token (ETH) transfers
        tokenAddress:
          type: string
          description: >-
            The ERC-20 token contract address. Required when `type` is
            `erc20-transfer`.
        spendLimit:
          type: string
          description: Maximum amount the session key can spend.
        allowedAddresses:
          type: array
          items:
            type: string
          description: List of addresses the session key is allowed to send to.
    BuildAddSessionKeyRequest:
      type: object
      required:
        - sessionKeyAddress
        - permissions
      properties:
        sessionKeyAddress:
          type: string
          description: The EIP-155 address of the session key to register.
        permissions:
          type: array
          items:
            $ref: '#/components/schemas/SessionKeyPermission'
          minItems: 1
          description: Non-empty array of permissions to grant to the session key.
        expiresAt:
          type: integer
          description: >
            Optional expiration time as a Unix timestamp in seconds. If not
            provided,

            the session key does not expire.
    RevokeSessionKeyRequest:
      type: object
      required:
        - sessionKeyAddress
      properties:
        sessionKeyAddress:
          type: string
          description: The EIP-155 address of the session key to revoke.
    SessionKeyTransactionResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            transaction:
              type: object
              properties:
                to:
                  type: string
                  description: Target contract address.
                data:
                  type: string
                  description: Encoded function call data.
                value:
                  type: string
                  description: Always `"0x0"` for session key operations.
        metadata:
          type: object
          properties:
            chainId:
              type: string
              description: The CAIP-2 chain ID.
            sessionKeyValidatorAddress:
              type: string
              description: The session key validator contract address.
            eoaAddress:
              type: string
              description: The client's EOA address.
    SessionKeyStatusResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            sessionKeyAddress:
              type: string
              description: The session key address.
            isRegistered:
              type: boolean
              description: Whether the session key is registered.
            isActive:
              type: boolean
              description: Whether the session key is currently active.
            merkleRoot:
              type: string
              description: The Merkle root of the session key's permissions.
            validAfter:
              type: integer
              description: Unix timestamp after which the session key is valid.
            validUntil:
              type: integer
              description: Unix timestamp until which the session key is valid.
            paymaster:
              type: string
              description: The paymaster address (zero address if none).
            nonce:
              type: string
              description: The session key's nonce.
        metadata:
          type: object
          properties:
            chainId:
              type: string
              description: The CAIP-2 chain ID.
            sessionKeyValidatorAddress:
              type: string
              description: The session key validator contract address.
            eoaAddress:
              type: string
              description: The client's EOA address.
    EjectableBackupSharesResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            encryptedClientBackupShare:
              type: string
              nullable: true
              description: |
                The encrypted client backup share, or null if not available for
                the requested backup method.
            custodianBackupShare:
              type: string
              description: The custodian's backup share.
    ZeroXSwapSourcesRequest:
      type: object
      required:
        - chainId
      properties:
        chainId:
          type: string
          description: Chain ID in CAIP-2 format (e.g. `eip155:1`).
        zeroXApiKey:
          type: string
          description: Optional 0x API key. If not provided, Portal uses a managed key.
    ZeroXSwapSourcesResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              properties:
                sources:
                  type: array
                  items:
                    type: string
                  description: List of available liquidity source names.
                zid:
                  type: string
                  description: 0x request ID.
    ZeroXSwapQuoteRequest:
      type: object
      required:
        - chainId
        - buyToken
        - sellToken
        - sellAmount
      properties:
        chainId:
          type: string
          description: Chain ID in CAIP-2 format (e.g. `eip155:1`).
        buyToken:
          type: string
          description: Token symbol or address to buy (e.g. `USDC`).
        sellToken:
          type: string
          description: Token symbol or address to sell (e.g. `ETH`).
        sellAmount:
          type: string
          description: Amount to sell in the smallest unit (e.g. wei).
        zeroXApiKey:
          type: string
          description: Optional 0x API key.
        slippageBps:
          type: number
          description: Maximum acceptable slippage in basis points (e.g. 100 = 1%).
        excludedSources:
          type: string
          description: Comma-separated list of liquidity sources to exclude.
        swapFeeRecipient:
          type: string
          description: Address to receive swap fees.
        swapFeeBps:
          type: number
          description: Swap fee in basis points.
        swapFeeToken:
          type: string
          description: Token to collect fees in.
    ZeroXSwapPriceRequest:
      type: object
      required:
        - chainId
        - buyToken
        - sellToken
        - sellAmount
      properties:
        chainId:
          type: string
          description: Chain ID in CAIP-2 format (e.g. `eip155:1`).
        buyToken:
          type: string
          description: Token symbol or address to buy.
        sellToken:
          type: string
          description: Token symbol or address to sell.
        sellAmount:
          type: string
          description: Amount to sell in the smallest unit.
        zeroXApiKey:
          type: string
          description: Optional 0x API key.
        slippageBps:
          type: number
          description: Maximum acceptable slippage in basis points.
        excludedSources:
          type: string
          description: Comma-separated list of liquidity sources to exclude.
    ZeroXSwapQuoteResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              description: Raw 0x API response containing quote or price details.
              properties:
                blockNumber:
                  type: string
                  description: Block number at which the quote was generated.
                buyAmount:
                  type: string
                  description: Amount of buy token received.
                buyToken:
                  type: string
                  description: Buy token address.
                fees:
                  type: object
                  description: Fee breakdown (integrator, 0x, gas).
                  additionalProperties: true
                issues:
                  type: object
                  description: Any issues with the swap (allowance, balance).
                  additionalProperties: true
                liquidityAvailable:
                  type: boolean
                  description: Whether sufficient liquidity is available.
                minBuyAmount:
                  type: string
                  description: Minimum buy amount after slippage.
                route:
                  type: object
                  description: Routing information (fills and tokens).
                  additionalProperties: true
                sellAmount:
                  type: string
                  description: Amount of sell token spent.
                sellToken:
                  type: string
                  description: Sell token address.
                tokenMetadata:
                  type: object
                  description: Tax metadata for buy and sell tokens.
                  additionalProperties: true
                totalNetworkFee:
                  type: string
                  description: Total network fee in wei.
                transaction:
                  type: object
                  description: Transaction details to sign and broadcast (quote only).
                  properties:
                    to:
                      type: string
                    data:
                      type: string
                    gas:
                      type: string
                    gasPrice:
                      type: string
                    value:
                      type: string
                    from:
                      type: string
    ZeroXCrossChainQuotesRequest:
      type: object
      required:
        - originChain
        - destinationChain
        - sellToken
        - buyToken
        - sellAmount
        - sortQuotesBy
      properties:
        originChain:
          type: string
          description: Origin chain in CAIP-2 format (e.g. `eip155:8453`).
        destinationChain:
          type: string
          description: Destination chain in CAIP-2 format (e.g. `eip155:42161`).
        sellToken:
          type: string
          description: |
            Token to sell on the origin chain. Accepts a contract address
            (e.g. `0x833589...`), a native token keyword (`NATIVE`, `ETH`,
            `AVAX`, `SOL`, etc.), or a supported token symbol (`USDC`).
        buyToken:
          type: string
          description: |
            Token to buy on the destination chain. Same formats as `sellToken`.
        sellAmount:
          type: string
          description: Amount of `sellToken` in base units to sell.
        sortQuotesBy:
          type: string
          enum:
            - speed
            - price
          description: Sort quotes by `speed` or `price`.
        originAddress:
          type: string
          description: >-
            Wallet address on origin chain. Defaults to the client's EIP-155
            address.
        destinationAddress:
          type: string
          description: Wallet address to receive tokens. Defaults to `originAddress`.
        slippageBps:
          type: number
          description: Maximum slippage in basis points (100 = 1%). Defaults to 100.
        maxNumQuotes:
          type: integer
          minimum: 1
          maximum: 10
          description: Maximum number of quotes to return. Defaults to 3.
        excludedBridges:
          type: string
          description: Comma-separated bridge providers to exclude.
        includedBridges:
          type: string
          description: Comma-separated bridge providers to include.
        excludedSwapSources:
          type: string
          description: Comma-separated DEX sources to exclude.
        feeBps:
          type: string
          description: Integrator fee in basis points.
        feeRecipient:
          type: string
          description: Address to receive integrator fees.
        feeToken:
          type: string
          description: Token for fee collection (defaults to sell token).
        zeroXApiKey:
          type: string
          description: Optional 0x API key.
    ZeroXCrossChainQuotesResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              properties:
                liquidityAvailable:
                  type: boolean
                  description: Whether liquidity exists for the cross-chain swap.
                allowanceTarget:
                  type: string
                  nullable: true
                  description: Contract address to set allowance on.
                originChainId:
                  type: string
                  description: Origin chain in CAIP-2 format.
                originChain:
                  type: string
                  description: Origin chain name.
                destinationChainId:
                  type: string
                  description: Destination chain in CAIP-2 format.
                destinationChain:
                  type: string
                  description: Destination chain name.
                sellToken:
                  type: string
                  description: Sell token address on origin chain.
                buyToken:
                  type: string
                  description: Buy token address on destination chain.
                issues:
                  type: object
                  description: Allowance and balance requirements.
                  properties:
                    allowance:
                      type: object
                      nullable: true
                      properties:
                        actual:
                          type: string
                        spender:
                          type: string
                    balance:
                      type: object
                      nullable: true
                      properties:
                        token:
                          type: string
                        actual:
                          type: string
                        expected:
                          type: string
                    simulationIncomplete:
                      type: boolean
                zid:
                  type: string
                  description: 0x request tracking ID.
                quotes:
                  type: array
                  description: Array of available cross-chain quotes.
                  items:
                    type: object
                    properties:
                      sellAmount:
                        type: string
                        description: Amount of sell token in base units.
                      buyAmount:
                        type: string
                        description: Estimated buy token amount in base units.
                      minBuyAmount:
                        type: string
                        description: Minimum guaranteed buy amount after slippage.
                      fees:
                        type: object
                        description: Fee breakdown (integrator, 0x, bridge).
                        additionalProperties: true
                      gasCosts:
                        type: object
                        description: Estimated gas costs on origin chain.
                        additionalProperties: true
                      steps:
                        type: array
                        description: Sequential steps (swap, bridge, wrap/unwrap).
                        items:
                          type: object
                          additionalProperties: true
                      transaction:
                        type: object
                        description: >
                          Portal-formatted transaction to sign and broadcast.

                          Includes `from`, `to`, `data`, `gas`, `gasPrice`,
                          `value`.
                        properties:
                          from:
                            type: string
                          to:
                            type: string
                          data:
                            type: string
                          gas:
                            type: string
                          gasPrice:
                            type: string
                          value:
                            type: string
                      approvalTransaction:
                        type: object
                        description: >
                          Portal-formatted ERC20 approval transaction. Present
                          when

                          token allowance is needed. Sign and submit this
                          **before**

                          the main `transaction`. The `gas` and `gasPrice`
                          fields are

                          optional — when omitted, they should be derived at
                          signing time.
                        required:
                          - from
                          - to
                          - data
                          - value
                        properties:
                          from:
                            type: string
                          to:
                            type: string
                          data:
                            type: string
                          gas:
                            type: string
                            description: >-
                              Optional. Omitted when gas should be estimated at
                              signing time.
                          gasPrice:
                            type: string
                            description: >-
                              Optional. Omitted when gas price should be
                              estimated at signing time.
                          value:
                            type: string
                      estimatedTimeSeconds:
                        type: number
                        nullable: true
                        description: Estimated time for the swap to complete.
                      issues:
                        type: object
                        description: Quote-level allowance and balance issues.
                        additionalProperties: true
                      quoteId:
                        type: string
                        description: Unique ID for this quote.
    ZeroXCrossChainStatusResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - origin_tx_pending
                    - origin_tx_succeeded
                    - origin_tx_confirmed
                    - origin_tx_reverted
                    - bridge_pending
                    - bridge_filled
                    - bridge_failed
                    - unknown
                  description: Current status of the cross-chain transaction.
                bridge:
                  type: string
                  description: Bridge provider handling the transfer.
                steps:
                  type: array
                  description: Steps involved in the cross-chain transaction.
                  items:
                    type: object
                    additionalProperties: true
                failure:
                  type: object
                  nullable: true
                  description: Failure details including recovery options.
                  properties:
                    reason:
                      type: string
                    status:
                      type: string
                    recovery:
                      type: object
                      nullable: true
                      additionalProperties: true
                transactions:
                  type: array
                  description: All blockchain transactions across chains.
                  items:
                    type: object
                    properties:
                      chainId:
                        type: string
                        description: Chain in CAIP-2 format.
                      chain:
                        type: string
                      txHash:
                        type: string
                        nullable: true
                      timestamp:
                        type: integer
                zid:
                  type: string
    ZeroXCrossChainSourcesResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              properties:
                bridges:
                  type: array
                  description: Available bridge providers.
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      chainPairs:
                        type: array
                        items:
                          type: object
                          properties:
                            originChainId:
                              type: string
                              description: Origin chain in CAIP-2 format.
                            destinationChainId:
                              type: string
                              description: Destination chain in CAIP-2 format.
                swapSources:
                  type: array
                  description: Available DEX sources.
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      chainIds:
                        type: array
                        items:
                          type: string
                        description: Supported chains in CAIP-2 format.
                zid:
                  type: string
    ZeroXCrossChainTxHistoryResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              properties:
                transactions:
                  type: array
                  items:
                    type: object
                    properties:
                      originChain:
                        type: string
                        description: Origin chain in CAIP-2 format.
                      originTx:
                        type: string
                      destinationChain:
                        type: string
                        nullable: true
                        description: Destination chain in CAIP-2 format.
                      destinationTx:
                        type: string
                        nullable: true
                      status:
                        type: string
                      bridge:
                        type: string
                        nullable: true
                pagination:
                  type: object
                  properties:
                    limit:
                      type: integer
                    nextCursor:
                      type: string
                      nullable: true
                    hasMore:
                      type: boolean
                zid:
                  type: string
    YieldOpportunitiesResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: array
              items:
                type: object
                description: Yield opportunity object.
                additionalProperties: true
              description: Array of yield opportunity objects.
    YieldBalancesRequest:
      type: object
      required:
        - queries
      properties:
        queries:
          type: array
          items:
            type: object
            required:
              - address
              - network
            properties:
              address:
                type: string
                description: Wallet address to query balances for.
              network:
                type: string
                description: Network identifier in CAIP-2 format (e.g. `eip155:1`).
              yieldId:
                type: string
                description: >
                  Yield opportunity ID (e.g.
                  `ethereum-sepolia-link-aave-v3-lending`).

                  Recommended on every query. When specified, Yield.xyz can
                  resolve

                  balances directly, so you don't need to call the `track`
                  endpoint

                  after entering or exiting positions.
          description: Array of balance queries, one per address/network combination.
    YieldBalancesResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              properties:
                items:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                    properties:
                      yieldId:
                        type: string
                        description: The yield opportunity ID.
                      balances:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
                          description: >-
                            A balance entry (active, claimable, locked, etc.)
                            with token info, amount, and any pending actions.
                  description: Array of yield balances grouped by yieldId.
                errors:
                  type: array
                  items:
                    type: object
                    properties:
                      yieldId:
                        type: string
                      error:
                        type: string
                  description: >-
                    Errors encountered while fetching balances for specific
                    yields.
    YieldArguments:
      type: object
      description: >-
        Optional yield-specific arguments. Which fields are supported depends on
        the yield opportunity's mechanics.
      properties:
        amount:
          type: string
          description: >-
            Amount in token units (not raw). Optional for some yields (e.g.
            claim-rewards).
        validatorAddress:
          type: string
          description: Target validator address.
        validatorAddresses:
          type: array
          items:
            type: string
          description: Multiple target validator addresses.
        providerId:
          type: string
          description: Provider identifier (e.g. for staking providers).
        duration:
          type: number
          description: Lock duration in seconds.
        inputToken:
          type: string
          description: Input token symbol or address.
        subnetId:
          type: number
          description: Subnet ID (Avalanche only).
        tronResource:
          type: string
          enum:
            - BANDWIDTH
            - ENERGY
          description: Tron resource type (Tron only).
        feeConfigurationId:
          type: string
          description: Fee configuration ID for the action.
        cosmosPubKey:
          type: string
          description: Cosmos public key (Cosmos chains only).
        tezosPubKey:
          type: string
          description: Tezos public key (Tezos only).
        cAddressBech:
          type: string
          description: Avalanche C-Chain Bech32 address.
        pAddressBech:
          type: string
          description: Avalanche P-Chain Bech32 address.
        executionMode:
          type: string
          enum:
            - individual
            - batched
          description: Whether to execute transactions individually or batched.
        ledgerWalletApiCompatible:
          type: boolean
          description: Whether the action must be Ledger Wallet API compatible.
        skipPrechecks:
          type: boolean
          description: Skip pre-execution checks.
        feePayerAddress:
          type: string
          description: >-
            Fee payer address. For Solana yields, this is auto-populated from
            the environment's gas sponsor when enabled.
    YieldEnterRequest:
      type: object
      required:
        - yieldId
        - address
      properties:
        yieldId:
          type: string
          description: The yield opportunity ID to enter.
        address:
          type: string
          description: Wallet address entering the yield position.
        arguments:
          $ref: '#/components/schemas/YieldArguments'
    YieldExitRequest:
      type: object
      required:
        - yieldId
        - address
      properties:
        yieldId:
          type: string
          description: The yield opportunity ID to exit.
        address:
          type: string
          description: Wallet address exiting the yield position.
        arguments:
          $ref: '#/components/schemas/YieldArguments'
    YieldManageRequest:
      type: object
      required:
        - yieldId
        - address
        - action
        - passthrough
      properties:
        yieldId:
          type: string
          description: The yield opportunity ID.
        address:
          type: string
          description: Wallet address managing the yield position.
        action:
          type: string
          enum:
            - STAKE
            - UNSTAKE
            - CLAIM_REWARDS
            - RESTAKE_REWARDS
            - WITHDRAW
            - WITHDRAW_ALL
            - RESTAKE
            - CLAIM_UNSTAKED
            - UNLOCK_LOCKED
            - STAKE_LOCKED
            - VOTE
            - REVOKE
            - VOTE_LOCKED
            - REVOTE
            - REBOND
            - MIGRATE
            - VERIFY_WITHDRAW_CREDENTIALS
            - DELEGATE
          description: The type of management action to perform.
        passthrough:
          type: string
          description: >-
            Opaque token from a prior balance query's `pendingActions` entry,
            identifying the specific pending action to execute.
        arguments:
          $ref: '#/components/schemas/YieldArguments'
    YieldActionResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              properties:
                transactions:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                  description: Array of transactions to sign and submit.
                yieldId:
                  type: string
                  description: The yield opportunity ID.
    YieldTransactionStatusResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              properties:
                type:
                  type: string
                  description: Transaction type.
                hash:
                  type: string
                  description: On-chain transaction hash.
                status:
                  type: string
                  description: Transaction status.
    YieldTransactionDetailResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              description: >-
                Full transaction details including status, hash, and explorer
                URL.
              properties:
                type:
                  type: string
                status:
                  type: string
                hash:
                  type: string
                signedTransaction:
                  type: string
                  nullable: true
                unsignedTransaction:
                  type: string
                  nullable: true
                stakeId:
                  type: string
                  nullable: true
                explorerUrl:
                  type: string
                  nullable: true
              additionalProperties: true
    YieldActionsResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              properties:
                total:
                  type: integer
                  description: Total number of action records available.
                offset:
                  type: integer
                  description: Number of results skipped.
                limit:
                  type: integer
                  description: Maximum number of results returned.
                items:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                  description: Array of action records.
    YieldOpportunity:
      type: object
      description: >-
        A yield opportunity with live data from Yield.xyz including rates,
        status, mechanics, and token info.
      additionalProperties: true
      properties:
        id:
          type: string
          description: Unique yield opportunity identifier.
          example: ethereum-usdc-aave-v3-lending
        network:
          type: string
          description: Network in CAIP-2 format.
          example: eip155:1
        token:
          type: object
          description: Primary token for this yield.
          additionalProperties: true
        rewardRate:
          type: object
          description: Current reward rate breakdown.
          additionalProperties: true
        status:
          type: object
          properties:
            enter:
              type: boolean
            exit:
              type: boolean
        mechanics:
          type: object
          description: >-
            Yield mechanics (type, warmup/cooldown, validator requirements,
            etc.).
          additionalProperties: true
    YieldValidator:
      type: object
      description: A validator available for staking delegation.
      additionalProperties: true
      properties:
        address:
          type: string
          description: Validator address or ID.
          example: 0xvalidator123...
        name:
          type: string
          description: Validator display name.
          example: Portal Validator
        commission:
          type: number
          description: Commission rate (0-1).
          example: 0.05
        preferred:
          type: boolean
          description: Whether this validator is flagged as preferred.
        status:
          type: string
          description: Validator status (e.g. `active`, `jailed`).
          example: active
        rewardRate:
          type: object
          description: Validator-specific reward rate breakdown.
          additionalProperties: true
    LifiQuoteRequest:
      type: object
      required:
        - fromChain
        - toChain
        - fromToken
        - toToken
        - fromAmount
        - fromAddress
      properties:
        fromChain:
          type: string
          description: Source chain ID in CAIP-2 format (e.g. `eip155:1`).
        toChain:
          type: string
          description: Destination chain ID in CAIP-2 format (e.g. `eip155:137`).
        fromToken:
          type: string
          description: Source token address or symbol.
        toToken:
          type: string
          description: Destination token address or symbol.
        fromAmount:
          type: string
          description: Amount to swap in the smallest unit of the source token.
        fromAddress:
          type: string
          description: Sender address. Must be a valid address for the source chain.
        toAddress:
          type: string
          description: Recipient address. Defaults to `fromAddress` when omitted.
        fromAmountForGas:
          type: string
          description: >-
            Amount of the source token to swap into destination-chain gas before
            bridging.
        integrator:
          type: string
          description: Override the integrator identifier for this request.
        fee:
          type: number
          description: Integrator fee as a decimal (e.g. `0.005` for 0.5%).
        maxPriceImpact:
          type: number
          description: Maximum acceptable price impact as a decimal.
        order:
          type: string
          enum:
            - RECOMMENDED
            - FASTEST
            - CHEAPEST
          description: Route ordering preference.
        slippage:
          type: number
          description: Maximum slippage as a decimal (e.g. `0.01` for 1%).
        referrer:
          type: string
          description: Referrer address for fee attribution.
        allowBridges:
          type: array
          items:
            type: string
          description: Bridges to include.
        denyBridges:
          type: array
          items:
            type: string
          description: Bridges to exclude.
        preferBridges:
          type: array
          items:
            type: string
          description: Bridges to prefer when ranking routes.
        allowExchanges:
          type: array
          items:
            type: string
          description: >-
            Exchanges to include (allowlist). Restricting exchanges makes
            routing more predictable. On Solana it helps avoid intermittent
            `ComputationalBudgetExceeded` failures from heavier multi-hop
            routes, for example limiting to lighter routes like `jupiter` or
            `fly` for stablecoin swaps.
        denyExchanges:
          type: array
          items:
            type: string
          description: >-
            Exchanges to exclude (blocklist). On Solana, useful to block heavier
            multi-hop routes that can fail with `ComputationalBudgetExceeded`.
        preferExchanges:
          type: array
          items:
            type: string
          description: Exchanges to prefer when ranking routes.
        svmSponsor:
          type: string
          description: >-
            Solana (SVM) only. Public key used as the transaction fee payer and
            the funder for in-route account creation (e.g. the intermediate WSOL
            account), so a wallet holding no SOL does not fail on rent. When
            omitted, Portal fills it with the environment's Solana gas sponsor
            (if enabled) for Solana source chains. Must be a valid Solana
            address; invalid values fall back to the environment gas sponsor.
    LifiRoutesRequest:
      type: object
      required:
        - fromChainId
        - toChainId
        - fromTokenAddress
        - toTokenAddress
        - fromAmount
      properties:
        fromChainId:
          type: string
          description: Source chain ID in CAIP-2 format (e.g. `eip155:1`).
        toChainId:
          type: string
          description: Destination chain ID in CAIP-2 format (e.g. `eip155:137`).
        fromTokenAddress:
          type: string
          description: Source token contract address.
        toTokenAddress:
          type: string
          description: Destination token contract address.
        fromAmount:
          type: string
          description: Amount to swap in the smallest unit of the source token.
        fromAddress:
          type: string
          description: Sender address.
        toAddress:
          type: string
          description: Recipient address.
        fromAmountForGas:
          type: string
          description: >-
            Amount of the source token to swap into destination-chain gas before
            bridging.
        options:
          type: object
          description: Optional routing preferences.
          properties:
            integrator:
              type: string
              description: Override the integrator identifier for this request.
            fee:
              type: number
              description: Integrator fee as a decimal (e.g. `0.005` for 0.5%).
            maxPriceImpact:
              type: number
              description: Maximum acceptable price impact as a decimal.
            order:
              type: string
              enum:
                - RECOMMENDED
                - FASTEST
                - CHEAPEST
              description: Route ordering preference.
            slippage:
              type: number
              description: Maximum slippage as a decimal (e.g. `0.01` for 1%).
            referrer:
              type: string
              description: Referrer address for fee attribution.
            allowSwitchChain:
              type: boolean
              description: Whether to allow routes that require a wallet chain switch.
            allowDestinationCall:
              type: boolean
              description: >-
                Whether to allow routes that perform a destination-chain
                contract call.
            bridges:
              type: object
              description: Bridge filtering preferences.
              properties:
                allow:
                  type: array
                  items:
                    type: string
                deny:
                  type: array
                  items:
                    type: string
                prefer:
                  type: array
                  items:
                    type: string
            exchanges:
              type: object
              description: Exchange filtering preferences.
              properties:
                allow:
                  type: array
                  items:
                    type: string
                deny:
                  type: array
                  items:
                    type: string
                prefer:
                  type: array
                  items:
                    type: string
            svmSponsor:
              type: string
              description: >-
                Solana (SVM) only. Sponsor public key (fee payer and funder for
                in-route account creation). Li.Fi bakes it into the returned
                steps, so `/lifi/route-step-details` inherits it. When omitted,
                Portal fills it with the environment's Solana gas sponsor (if
                enabled) for Solana source chains. Must be a valid Solana
                address; invalid values fall back to the environment gas
                sponsor.
    LifiQuoteResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              description: >-
                Li.Fi quote response with route, estimate, and transaction
                request.
              additionalProperties: true
    LifiRoutesResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              properties:
                routes:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                  description: Array of possible routes with steps, estimates, and tags.
    LifiStatusResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              description: >-
                Transaction status with sending, receiving, tool, status, and
                substatus.
              properties:
                sending:
                  type: object
                  additionalProperties: true
                receiving:
                  type: object
                  additionalProperties: true
                tool:
                  type: string
                status:
                  type: string
                substatus:
                  type: string
              additionalProperties: true
    LifiTokensResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              properties:
                tokens:
                  type: object
                  additionalProperties:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                  description: Tokens keyed by chain ID in CAIP-2 format.
    LifiStepRequest:
      type: object
      description: |
        A step object as returned by `/lifi/routes` (or `/lifi/quote`). The body
        is the step itself, not wrapped under a `step` key. Chain ID fields use
        CAIP-2 format on input, matching what Portal returned to you.
      required:
        - id
        - type
        - tool
        - toolDetails
        - action
      additionalProperties: true
      properties:
        id:
          type: string
          description: Unique step identifier from the prior routes/quote response.
        type:
          type: string
          description: Step type (e.g. `swap`, `cross`, `lifi`).
        tool:
          type: string
          description: Identifier of the tool/protocol executing the step.
        toolDetails:
          type: object
          required:
            - key
            - name
            - logoURI
          properties:
            key:
              type: string
            name:
              type: string
            logoURI:
              type: string
        action:
          type: object
          required:
            - fromChainId
            - toChainId
            - fromAmount
            - fromToken
            - toToken
          properties:
            fromChainId:
              type: string
              description: Source chain ID in CAIP-2 format.
            toChainId:
              type: string
              description: Destination chain ID in CAIP-2 format.
            fromAmount:
              type: string
            fromToken:
              type: object
              required:
                - address
                - symbol
                - decimals
                - chainId
                - name
              properties:
                address:
                  type: string
                symbol:
                  type: string
                decimals:
                  type: integer
                chainId:
                  type: string
                  description: Chain ID in CAIP-2 format.
                name:
                  type: string
                coinKey:
                  type: string
                priceUSD:
                  type: string
                logoURI:
                  type: string
            toToken:
              type: object
              required:
                - address
                - symbol
                - decimals
                - chainId
                - name
              properties:
                address:
                  type: string
                symbol:
                  type: string
                decimals:
                  type: integer
                chainId:
                  type: string
                  description: Chain ID in CAIP-2 format.
                name:
                  type: string
                coinKey:
                  type: string
                priceUSD:
                  type: string
                logoURI:
                  type: string
            fromAddress:
              type: string
            toAddress:
              type: string
            slippage:
              type: number
        estimate:
          type: object
          additionalProperties: true
        integrator:
          type: string
        includedSteps:
          type: array
          items:
            type: object
            additionalProperties: true
        referrer:
          type: string
        execution:
          type: object
          additionalProperties: true
        transactionRequest:
          type: object
          additionalProperties: true
    LifiStepResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              description: >-
                Enriched step with `transactionRequest` and updated `estimate`.
                Chain ID fields are returned in CAIP-2 format.
              additionalProperties: true
    BlockaidEvmScanRequest:
      type: object
      required:
        - chainId
        - transaction
      properties:
        chainId:
          type: string
          description: Chain ID in CAIP-2 format.
        transaction:
          type: object
          required:
            - from
            - to
            - data
            - value
          properties:
            from:
              type: string
              description: Sender address.
            to:
              type: string
              description: Recipient/contract address.
            data:
              type: string
              description: Encoded transaction data.
            value:
              type: string
              description: Value in wei.
    BlockaidSolanaScanRequest:
      type: object
      required:
        - transactions
        - chainId
      properties:
        transactions:
          type: array
          items:
            type: string
          description: Array of base58-encoded Solana transactions.
        chainId:
          type: string
          description: Chain ID in CAIP-2 format.
    BlockaidTronScanRequest:
      type: object
      required:
        - chain
        - data
      properties:
        chain:
          type: string
          description: Chain ID in CAIP-2 format. Only `tron:mainnet` is supported.
        account_address:
          type: string
          description: >-
            The TRON account address (base58) the transaction relates to.
            Optional. Defaults to the client's TRON address, falling back to
            `data.from`. If none of `account_address`, `data.from`, or a client
            TRON address is available, the request is rejected.
        data:
          type: object
          properties:
            from:
              type: string
              description: >-
                Sender address (TRON base58). Optional. Defaults to the resolved
                `account_address`.
            to:
              type: string
              description: Recipient/contract address (TRON base58).
            data:
              type: string
              description: Encoded call data (hex string).
            value:
              type: string
              description: Value in sun (hex string).
        metadata:
          description: >-
            Optional context about the request origin, forwarded to Blockaid.
            Provide either `domain` (dApp requests) or `non_dapp` (non-dApp
            requests), but not both. When omitted entirely, a default domain of
            `https://portalhq.io` is applied. Note: if you supply a `metadata`
            object, the default is not applied, so a dApp request must include
            `domain`.
          oneOf:
            - type: object
              required:
                - domain
              properties:
                domain:
                  type: string
                  description: Domain associated with the dApp initiating the transaction.
            - type: object
              required:
                - non_dapp
              properties:
                non_dapp:
                  type: boolean
                  description: >-
                    Set to `true` when the request does not originate from a
                    dApp.
        options:
          type: array
          items:
            type: string
          description: Response sections to include (e.g. validation, simulation).
    BlockaidScanResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              description: Scan result with validation and simulation data.
              properties:
                validation:
                  type: object
                  additionalProperties: true
                  description: Risk assessment results.
                simulation:
                  type: object
                  additionalProperties: true
                  description: Transaction simulation results.
              additionalProperties: true
    BlockaidAddressScanRequest:
      type: object
      required:
        - address
      properties:
        address:
          type: string
          description: The blockchain address to scan.
        chainId:
          type: string
          description: Chain ID in CAIP-2 format.
        metadata:
          type: object
          properties:
            domain:
              type: string
              description: Domain associated with the address.
    BlockaidAddressScanResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              properties:
                result_type:
                  type: string
                  description: Classification result type.
                malicious_score:
                  type: string
                  description: Maliciousness score.
                details:
                  type: object
                  additionalProperties: true
                  description: Detailed scan results.
    BlockaidTokensScanRequest:
      type: object
      required:
        - tokens
      properties:
        tokens:
          type: array
          items:
            type: object
            required:
              - address
              - chainId
            properties:
              address:
                type: string
                description: Token contract address.
              chainId:
                type: string
                description: Chain ID in CAIP-2 format.
    BlockaidTokensScanResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: array
              items:
                type: object
                properties:
                  is_malicious:
                    type: boolean
                  attack_types:
                    type: object
                    additionalProperties: true
                  details:
                    type: object
                    additionalProperties: true
                additionalProperties: true
              description: Array of token scan results.
    BlockaidUrlScanRequest:
      type: object
      required:
        - url
      properties:
        url:
          type: string
          description: The URL to scan.
    BlockaidUrlScanResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              properties:
                is_malicious:
                  type: boolean
                result_type:
                  type: string
                malicious_score:
                  type: string
                attack_types:
                  type: object
                  additionalProperties: true
    HypernativeAddressesScanRequest:
      type: object
      required:
        - addresses
      properties:
        addresses:
          type: array
          items:
            type: string
          description: Array of blockchain addresses to scan.
        screenerPolicyId:
          type: string
          description: Optional screener policy ID.
    HypernativeAddressesScanResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: array
              items:
                type: object
                properties:
                  address:
                    type: string
                  recommendation:
                    type: string
                  severity:
                    type: string
                  totalIncomingUsd:
                    type: string
                  policyId:
                    type: string
                  timestamp:
                    type: string
                  flags:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
    HypernativeEvmScanRequest:
      type: object
      required:
        - transaction
      properties:
        transaction:
          type: object
          required:
            - chain
            - fromAddress
            - toAddress
          properties:
            chain:
              type: string
              description: Chain ID in CAIP-2 format.
            fromAddress:
              type: string
              description: Sender address.
            toAddress:
              type: string
              description: Recipient/contract address.
            input:
              type: string
              description: Encoded transaction input data.
            value:
              oneOf:
                - type: number
                - type: string
              description: Value to send.
            nonce:
              oneOf:
                - type: number
                - type: string
            hash:
              type: string
            gas:
              oneOf:
                - type: number
                - type: string
            gasPrice:
              oneOf:
                - type: number
                - type: string
            maxPriorityFeePerGas:
              oneOf:
                - type: number
                - type: string
            maxFeePerGas:
              oneOf:
                - type: number
                - type: string
        url:
          type: string
          description: Optional URL context.
        blockNumber:
          type: number
          description: Optional block number.
        validateNonce:
          type: boolean
          description: Whether to validate the nonce.
        showFullFindings:
          type: boolean
          description: Whether to return full finding details.
        policy:
          type: string
          description: Optional policy identifier.
    HypernativeEvmScanResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              description: Assessment result with recommendation and optional findings.
              properties:
                assessmentId:
                  type: string
                assessmentTimestamp:
                  type: string
                recommendation:
                  type: string
                expectedStatus:
                  type: string
                  nullable: true
                findings:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                  nullable: true
                involvedAssets:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                  nullable: true
                balanceChanges:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                  nullable: true
                parsedActions:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                  nullable: true
                trace:
                  type: array
                  description: Execution trace for the simulated transaction.
                  items:
                    type: object
                    properties:
                      from:
                        type: string
                      to:
                        type: string
                      funcId:
                        type: string
                      callType:
                        type: string
                      value:
                        oneOf:
                          - type: string
                          - type: number
                      traceAddress:
                        type: array
                        items:
                          type: integer
                      status:
                        type: boolean
                        description: >-
                          Whether the trace step reported success. May be
                          omitted.
                      callInput:
                        type: string
                      extraInfo:
                        type: object
                        additionalProperties: true
                  nullable: true
              additionalProperties: true
    HypernativeEip712ScanRequest:
      type: object
      required:
        - walletAddress
        - chainId
        - eip712Message
      properties:
        walletAddress:
          type: string
          description: The wallet address signing the message.
        chainId:
          type: string
          description: Chain ID in CAIP-2 format.
        eip712Message:
          type: object
          required:
            - primaryType
            - types
            - domain
            - message
          properties:
            primaryType:
              type: string
            types:
              type: object
              additionalProperties: true
            domain:
              type: object
              additionalProperties: true
            message:
              type: object
              additionalProperties: true
        showFullFindings:
          type: boolean
        policy:
          type: string
    HypernativeSolanaScanRequest:
      type: object
      required:
        - transaction
      properties:
        transaction:
          type: object
          properties:
            message:
              type: object
              properties:
                accountKeys:
                  type: array
                  items:
                    type: string
                header:
                  type: object
                  additionalProperties: true
                instructions:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                addressTableLookups:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                  nullable: true
                recentBlockhash:
                  type: string
            signatures:
              type: array
              items:
                type: string
              nullable: true
            rawTransaction:
              type: string
              description: Base64-encoded raw transaction.
            version:
              type: string
              enum:
                - legacy
                - '0'
        url:
          type: string
        validateRecentBlockHash:
          type: boolean
        showFullFindings:
          type: boolean
        policy:
          type: string
    HypernativeSolanaScanResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              description: Assessment with recommendation and optional findings.
              properties:
                recommendation:
                  type: string
                expectedStatus:
                  type: string
                  nullable: true
                findings:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                  nullable: true
                involvedAssets:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                  nullable: true
                balanceChanges:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                  nullable: true
                parsedActions:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                  nullable: true
                trace:
                  type: array
                  description: Execution trace for the simulated transaction.
                  items:
                    type: object
                    properties:
                      from:
                        type: string
                      to:
                        type: string
                      funcId:
                        type: string
                      callType:
                        type: string
                      value:
                        type: number
                      traceAddress:
                        type: array
                        items:
                          type: integer
                      status:
                        type: string
                        description: Trace step status ("True" or "False").
                      callInput:
                        type: object
                        properties:
                          type:
                            type: string
                          info:
                            oneOf:
                              - type: string
                              - type: object
                                additionalProperties: true
                      extraInfo:
                        type: object
                        additionalProperties: true
                  nullable: true
              additionalProperties: true
    HypernativeNftsScanRequest:
      type: object
      required:
        - nfts
      properties:
        nfts:
          type: array
          items:
            type: object
            required:
              - address
            properties:
              address:
                type: string
                description: NFT contract address.
              chain:
                type: string
                description: Chain ID in CAIP-2 format.
              evmChainId:
                oneOf:
                  - type: number
                  - type: string
                description: EVM chain ID.
    HypernativeNftsScanResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              properties:
                nfts:
                  type: array
                  items:
                    type: object
                    properties:
                      address:
                        type: string
                      chain:
                        type: string
                      evmChainId:
                        oneOf:
                          - type: number
                          - type: string
                      accept:
                        type: boolean
    HypernativeTokensScanRequest:
      type: object
      required:
        - tokens
      properties:
        tokens:
          type: array
          items:
            type: object
            required:
              - address
            properties:
              address:
                type: string
                description: Token contract address.
              chain:
                type: string
                description: Chain ID in CAIP-2 format.
              evmChainId:
                oneOf:
                  - type: number
                  - type: string
                description: EVM chain ID.
    HypernativeTokensScanResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              properties:
                tokens:
                  type: array
                  items:
                    type: object
                    properties:
                      address:
                        type: string
                      chain:
                        type: string
                      reputation:
                        type: object
                        properties:
                          recommendation:
                            type: string
    HypernativeUrlScanRequest:
      type: object
      required:
        - url
      properties:
        url:
          type: string
          description: The URL to scan.
    HypernativeUrlScanResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              properties:
                isMalicious:
                  type: boolean
                deepScanTriggered:
                  type: boolean
                  nullable: true
    NoahInitiateKycRequest:
      type: object
      required:
        - returnUrl
      properties:
        returnUrl:
          type: string
          format: uri
          pattern: ^https://
          description: HTTPS return URL used after hosted onboarding.
        fiatOptions:
          type: array
          description: Optional list of fiat options for onboarding.
          items:
            type: object
            required:
              - fiatCurrencyCode
            properties:
              fiatCurrencyCode:
                type: string
        customerType:
          type: string
          enum:
            - Individual
            - Business
        metadata:
          type: object
          additionalProperties: true
        form:
          type: object
          additionalProperties: true
    NoahInitiateKycResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            hostedUrl:
              type: string
    NoahInitiatePayinRequest:
      type: object
      required:
        - fiatCurrency
        - cryptoCurrency
        - network
        - destinationAddress
      properties:
        fiatCurrency:
          type: string
          description: Fiat currency code.
        cryptoCurrency:
          type: string
          description: >-
            Crypto currency symbol. In Noah sandbox, tickers must be suffixed
            with `_TEST` (e.g. `USDC_TEST`); use the unsuffixed ticker in
            production. See [Noah's sandbox naming
            convention](https://docs.noah.com/products/global-payouts-api/#sandbox-cryptocurrency-naming-convention).
        network:
          type: string
          description: CAIP-2 chain ID.
        destinationAddress:
          type: string
          description: Onchain destination address.
    NoahInitiatePayinResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            payinId:
              type: string
            bankDetails:
              $ref: '#/components/schemas/NoahBankDetails'
    NoahSimulateFiatDepositRequest:
      type: object
      required:
        - paymentMethodId
        - fiatAmount
        - fiatCurrency
      properties:
        paymentMethodId:
          type: string
          description: Noah payment method ID.
        fiatAmount:
          type: string
          description: Positive fiat amount to simulate.
        fiatCurrency:
          type: string
          description: ISO-4217 fiat currency code.
    NoahSimulateFiatDepositResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            fiatDepositId:
              type: string
            reference:
              type: string
              description: Reference echoed for the simulated deposit.
    NoahBankDetails:
      type: object
      properties:
        paymentMethodId:
          type: string
        paymentMethodType:
          $ref: '#/components/schemas/NoahPaymentMethodType'
        accountNumber:
          type: string
        cryptoCurrency:
          type: string
          description: Crypto currency symbol echoed from the request.
        network:
          type: string
        fee:
          $ref: '#/components/schemas/NoahFeeDetails'
        accountHolderName:
          type: string
          nullable: true
        bankCode:
          type: string
          nullable: true
        bankName:
          type: string
          nullable: true
        bankAddress:
          allOf:
            - $ref: '#/components/schemas/NoahBankAddress'
        reference:
          type: string
          nullable: true
        relatedPaymentMethods:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/NoahRelatedPaymentMethod'
    NoahPayoutCountriesResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            countries:
              type: object
              description: Map of country code to supported fiat currencies.
              additionalProperties:
                type: array
                items:
                  type: string
    NoahPayoutChannelsResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            items:
              type: array
              items:
                type: object
                additionalProperties: true
            pageToken:
              type: string
              nullable: true
    NoahPayoutChannelFormResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            formSchema:
              type: object
              additionalProperties: true
            formMetadata:
              type: object
              additionalProperties: true
    NoahQuotePayoutRequest:
      type: object
      required:
        - channelId
        - cryptoCurrency
      description: |
        Exactly one of `fiatAmount` or `cryptoAmount` must be provided. They are
        mutually exclusive — passing both (or neither) returns 400.
      oneOf:
        - required:
            - fiatAmount
        - required:
            - cryptoAmount
      properties:
        channelId:
          type: string
        cryptoCurrency:
          type: string
          description: >-
            Crypto currency symbol. In Noah sandbox, tickers must be suffixed
            with `_TEST` (e.g. `USDC_TEST`); use the unsuffixed ticker in
            production. See [Noah's sandbox naming
            convention](https://docs.noah.com/products/global-payouts-api/#sandbox-cryptocurrency-naming-convention).
        fiatAmount:
          type: string
          description: Fiat amount to receive. Mutually exclusive with `cryptoAmount`.
        cryptoAmount:
          type: string
          description: >-
            Exact crypto amount the depositor will send. Mutually exclusive with
            `fiatAmount`.
        quoted:
          type: boolean
          description: |
            When `true` and all form steps are complete, the response includes a
            `quote` whose `signedQuote` locks the conversion rate and recipient
            payout for the resulting payout transaction.
          default: false
        fiatCurrency:
          type: string
        form:
          type: object
          additionalProperties: true
        formSessionId:
          type: string
          format: uuid
          description: Optional form session ID continuing a multi-step form.
        paymentMethodId:
          type: string
    NoahQuotePayoutResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            payoutId:
              type: string
            formSessionId:
              type: string
            cryptoAmountEstimate:
              type: string
            cryptoAuthorizedAmount:
              type: string
              description: Maximum crypto amount that can be charged for this transaction.
            totalFee:
              type: string
            cryptoCurrency:
              type: string
              description: Crypto currency disclosure; locked when `quote` is present.
            fiatCurrency:
              type: string
              description: Fiat currency disclosure; locked when `quote` is present.
            fiatAmount:
              type: string
              description: >-
                Net fiat amount the recipient receives; locked when `quote` is
                present.
            rate:
              type: string
              description: Composite crypto→fiat rate; locked when `quote` is present.
            breakdown:
              type: array
              description: Per-type payment breakdown in `cryptoCurrency`.
              items:
                $ref: '#/components/schemas/NoahPayoutBreakdownItem'
            quote:
              description: |
                Fixed-rate quote. Present only when `quoted: true` was requested
                and all form steps are complete.
              nullable: true
              allOf:
                - $ref: '#/components/schemas/NoahPayoutQuote'
            nextStep:
              type: object
              additionalProperties: true
              nullable: true
    NoahInitiatePayoutRequest:
      type: object
      required:
        - payoutId
        - sourceAddress
        - expiry
        - nonce
        - network
      properties:
        payoutId:
          type: string
        sourceAddress:
          type: string
        expiry:
          type: string
          format: date-time
        nonce:
          type: string
          maxLength: 36
          description: >-
            Unique idempotency nonce for the payout request. Must not be reused
            across different transactions.
        network:
          type: string
          description: CAIP-2 chain ID.
        fiatAmount:
          type: string
          description: >-
            Fiat amount for the payout. Only applicable when trigger.Type is
            SingleOnchainDepositSourceTriggerInput.
        trigger:
          $ref: '#/components/schemas/NoahTriggerInput'
    NoahTriggerInput:
      type: object
      description: |
        Defines when and how the automated sell rule fires. Three variants
        discriminated by `Type` (each with slightly different shape):

        - `SingleOnchainDepositSourceTriggerInput` — executes once.
          `Conditions[*]` must include `AmountConditions`. The persisted
          `fiatAmount` from the quote is forwarded.
        - `PermanentOnchainDepositSourceTriggerInput` — fires on every matching
          deposit; the entire deposited crypto amount is always sold.
          `Conditions[*]` carries `Network` only — `AmountConditions` must be
          omitted. Optional `NetworkAgnostic` flag matches any network.
        - `QuotedOnchainDepositSourceTriggerInput` — executes once and locks
          the conversion rate from a prior `SellQuote`. Requires `SignedQuote`
          (from `quote.signedQuote` on `POST /payouts/quote`). `Conditions[*]`
          carries `Network` only — `AmountConditions` must be omitted. `Expiry`
          is optional and defaults to the bound quote's expiry.
      required:
        - Type
        - Conditions
        - SourceAddress
        - Nonce
      properties:
        Type:
          type: string
          enum:
            - SingleOnchainDepositSourceTriggerInput
            - PermanentOnchainDepositSourceTriggerInput
            - QuotedOnchainDepositSourceTriggerInput
        Conditions:
          type: array
          items:
            $ref: '#/components/schemas/NoahTriggerConditionInput'
        SourceAddress:
          type: string
        Expiry:
          type: string
          format: date-time
          description: >-
            Required on Single/Permanent. Optional on Quoted (defaults to the
            bound quote's Expiry).
        Nonce:
          type: string
        SignedQuote:
          type: string
          description: |
            Required when `Type` is `QuotedOnchainDepositSourceTriggerInput`.
            Opaque bearer returned in `quote.signedQuote` from
            `POST /payouts/quote` when `quoted: true` was requested. Pass back
            unchanged — Noah verifies the signature and rejects tampered or
            expired quotes.
        NetworkAgnostic:
          type: boolean
          default: false
          description: >
            Optional. Only valid for
            `PermanentOnchainDepositSourceTriggerInput`.

            When `true`, match deposits to the destination address from any
            network.
    NoahTriggerConditionInput:
      type: object
      required:
        - Network
      properties:
        AmountConditions:
          type: array
          description: |
            Required for `SingleOnchainDepositSourceTriggerInput`. Must be
            omitted for `PermanentOnchainDepositSourceTriggerInput` and
            `QuotedOnchainDepositSourceTriggerInput` (amount/currency are
            derived server-side from the bound quote / matched on the full
            deposit).
          items:
            $ref: '#/components/schemas/NoahAmountCondition'
        Network:
          type: string
    NoahAmountCondition:
      type: object
      required:
        - ComparisonOperator
        - Value
      properties:
        ComparisonOperator:
          type: string
          enum:
            - EQ
            - LTEQ
            - GTEQ
          description: |
            Comparison operator for the field value:
            - `EQ` (Equals)
            - `LTEQ` (Less Than Or Equals)
            - `GTEQ` (Greater Than Or Equals)
        Value:
          type: string
    NoahPaymentMethodType:
      type: string
      description: Specific type of payment method.
      enum:
        - BankAch
        - BankFedNow
        - BankFedwire
        - BankLocal
        - BankSepa
        - BankSortCode
        - BankSwift
        - IdentifierAlias
        - IdentifierMerchantID
        - IdentifierMobileMoney
        - IdentifierPix
        - IdentifierQr
        - TokenizedCard
    NoahFeeDetails:
      type: object
      description: Fee schedule attached to a payment method.
      required:
        - fiatCurrencyCode
        - totalFeePct
        - totalFeeBase
        - totalFeeMin
      properties:
        fiatCurrencyCode:
          type: string
        totalFeePct:
          type: string
        totalFeeBase:
          type: string
        totalFeeMin:
          type: string
    NoahBankAddress:
      type: object
      required:
        - street
        - city
        - postCode
        - state
        - country
      properties:
        street:
          type: string
        street2:
          type: string
        city:
          type: string
        postCode:
          type: string
        state:
          type: string
          description: For USA/Canada, ISO 3166-2 state code (e.g. `CA`).
        country:
          type: string
          description: ISO 3166-1 alpha-2 country code.
    NoahRelatedPaymentMethod:
      type: object
      required:
        - paymentMethodId
        - paymentMethodType
        - fee
        - details
      properties:
        paymentMethodId:
          type: string
        paymentMethodType:
          $ref: '#/components/schemas/NoahPaymentMethodType'
        fee:
          $ref: '#/components/schemas/NoahFeeDetails'
        details:
          type: object
          properties:
            accountNumber:
              type: string
            bankCode:
              type: string
    NoahPayoutBreakdownItem:
      type: object
      description: |
        Per-type payment breakdown item in `cryptoCurrency`. Items are additive:
        `ChannelFee + BusinessFee + Remaining = cryptoAmountEstimate`.
      required:
        - type
        - amount
      properties:
        type:
          type: string
          enum:
            - ChannelFee
            - BusinessFee
            - Remaining
        amount:
          type: string
    NoahPayoutQuote:
      type: object
      description: |
        Fixed-rate quote. Pass `signedQuote` back unchanged when creating the
        payout rule/transaction.
      required:
        - signedQuote
        - expiry
      properties:
        signedQuote:
          type: string
          description: Opaque bearer token encoding all binding claims for the quote.
        expiry:
          type: string
          format: date-time
          description: >-
            Deadline by which the deposit must be observed AND fully cleared for
            this quote to apply.
    NoahInitiatePayoutResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            destinationAddress:
              type: string
              nullable: true
            conditions:
              type: array
              items:
                type: object
                properties:
                  amountConditions:
                    type: array
                    items:
                      type: object
                      properties:
                        comparisonOperator:
                          type: string
                        value:
                          type: string
                  cryptoCurrency:
                    type: string
                  network:
                    type: string
                  destinationAddress:
                    oneOf:
                      - type: string
                      - type: object
                        properties:
                          address:
                            type: string
                additionalProperties: true
    NoahPaymentMethodsResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            paymentMethods:
              type: array
              items:
                type: object
                required:
                  - id
                  - paymentMethodCategory
                  - displayDetails
                  - country
                properties:
                  id:
                    type: string
                  paymentMethodCategory:
                    type: string
                  displayDetails:
                    type: object
                    properties:
                      type:
                        type: string
                      accountNumber:
                        type: string
                        nullable: true
                      bankCode:
                        type: string
                        nullable: true
                      last4:
                        type: string
                        nullable: true
                      scheme:
                        type: string
                        nullable: true
                      identifierType:
                        type: string
                        nullable: true
                      identifier:
                        type: string
                        nullable: true
                    additionalProperties: true
                  country:
                    type: string
                  customerId:
                    type: string
                    nullable: true
                  capabilities:
                    type: object
                    properties:
                      payoutFrom:
                        type: boolean
                      payinTo:
                        type: boolean
                      payoutTo:
                        type: boolean
                    nullable: true
                  accountHolderDetails:
                    type: object
                    properties:
                      name:
                        type: object
                        properties:
                          firstName:
                            type: string
                          lastName:
                            type: string
                        additionalProperties: true
                    additionalProperties: true
                    nullable: true
                  issuerDetails:
                    type: object
                    additionalProperties: true
                    nullable: true
                additionalProperties: true
            pageToken:
              type: string
              nullable: true
              description: Optional pagination token. May be omitted when not paginated.
    MeldCustomerConflictResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable conflict message.
        details:
          type: object
          properties:
            meldCustomerId:
              type: string
              description: The existing Meld customer ID for this Portal client.
    MeldCustomerName:
      type: object
      properties:
        firstName:
          type: string
        lastName:
          type: string
    MeldCreateCustomerRequest:
      type: object
      description: All fields are optional.
      properties:
        name:
          $ref: '#/components/schemas/MeldCustomerName'
        email:
          type: string
          format: email
        phone:
          type: string
          description: E.164-formatted phone number.
        dateOfBirth:
          type: string
          format: date
          description: ISO-8601 calendar date (YYYY-MM-DD).
        type:
          type: string
          enum:
            - INDIVIDUAL
            - BUSINESS
    MeldCustomerAddressDetails:
      type: object
      properties:
        lineOne:
          type: string
        lineTwo:
          type: string
        city:
          type: string
        region:
          type: string
        postalCode:
          type: string
        country:
          type: string
    MeldCustomerAddress:
      type: object
      properties:
        id:
          type: string
        customerId:
          type: string
        type:
          type: string
          enum:
            - BILLING
            - SHIPPING
            - RESIDENCE
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
        addressDetails:
          $ref: '#/components/schemas/MeldCustomerAddressDetails'
    MeldCustomer:
      type: object
      required:
        - id
        - accountId
        - externalId
      properties:
        id:
          type: string
        accountId:
          type: string
        externalId:
          type: string
        name:
          $ref: '#/components/schemas/MeldCustomerName'
        email:
          type: string
        phone:
          type: string
        dateOfBirth:
          type: string
        type:
          type: string
          enum:
            - INDIVIDUAL
            - BUSINESS
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/MeldCustomerAddress'
        serviceProviders:
          type: object
          additionalProperties: true
    MeldCustomerResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/MeldCustomer'
    MeldCustomerSearchResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            customers:
              type: array
              items:
                $ref: '#/components/schemas/MeldCustomer'
            count:
              type: integer
            remaining:
              type: integer
    MeldQuoteRequest:
      type: object
      required:
        - countryCode
        - sourceCurrencyCode
        - destinationCurrencyCode
        - sourceAmount
      properties:
        countryCode:
          type: string
          description: ISO-3166-1 alpha-2 country code.
        sourceCurrencyCode:
          type: string
        destinationCurrencyCode:
          type: string
        sourceAmount:
          type: number
        walletAddress:
          type: string
        customerId:
          type: string
        paymentMethodType:
          type: string
        serviceProviders:
          type: array
          items:
            type: string
        subdivision:
          type: string
    MeldRampIntelligence:
      type: object
      properties:
        rampScore:
          type: number
          nullable: true
        lowKyc:
          type: boolean
          nullable: true
        previouslyUsed:
          type: boolean
          nullable: true
    MeldQuote:
      type: object
      properties:
        transactionType:
          type: string
        sourceAmount:
          type: number
        sourceAmountWithoutFees:
          type: number
          nullable: true
        sourceCurrencyCode:
          type: string
        destinationAmount:
          type: number
        destinationAmountWithoutFees:
          type: number
          nullable: true
        destinationCurrencyCode:
          type: string
        exchangeRate:
          type: number
        transactionFee:
          type: number
        networkFee:
          type: number
          nullable: true
        partnerFee:
          type: number
          nullable: true
        totalFee:
          type: number
        fiatAmountWithoutFees:
          type: number
          nullable: true
        paymentMethodType:
          type: string
        serviceProvider:
          type: string
        countryCode:
          type: string
        customerScore:
          type: number
          nullable: true
        institutionName:
          type: string
          nullable: true
        isNativeAvailable:
          type: boolean
          nullable: true
        rampIntelligence:
          $ref: '#/components/schemas/MeldRampIntelligence'
    MeldQuoteResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            quotes:
              type: array
              items:
                $ref: '#/components/schemas/MeldQuote'
            message:
              type: string
              nullable: true
            error:
              type: string
              nullable: true
            timestamp:
              type: string
              nullable: true
    MeldSessionData:
      type: object
      required:
        - countryCode
        - serviceProvider
        - sourceCurrencyCode
        - sourceAmount
        - destinationCurrencyCode
      properties:
        countryCode:
          type: string
        serviceProvider:
          type: string
        sourceCurrencyCode:
          type: string
        sourceAmount:
          type: string
          description: Source amount as a string-encoded decimal.
        destinationCurrencyCode:
          type: string
        walletAddress:
          type: string
        walletTag:
          type: string
        paymentMethodType:
          type: string
        redirectUrl:
          type: string
          format: uri
        lockFields:
          type: array
          items:
            type: string
    MeldWidgetSessionRequest:
      type: object
      required:
        - sessionType
        - sessionData
      properties:
        sessionType:
          type: string
          enum:
            - BUY
            - SELL
            - TRANSFER
        sessionData:
          $ref: '#/components/schemas/MeldSessionData'
        externalSessionId:
          type: string
        customerId:
          type: string
        bypassKyc:
          type: boolean
    MeldWidgetSession:
      type: object
      required:
        - id
        - token
        - widgetUrl
      properties:
        id:
          type: string
        token:
          type: string
        customerId:
          type: string
        externalCustomerId:
          type: string
        externalSessionId:
          type: string
        widgetUrl:
          type: string
          format: uri
    MeldWidgetSessionResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/MeldWidgetSession'
    MeldTransaction:
      type: object
      required:
        - id
        - sessionId
        - status
        - transactionType
        - serviceProvider
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
        sessionId:
          type: string
        externalSessionId:
          type: string
          nullable: true
        externalCustomerId:
          type: string
          nullable: true
        status:
          type: string
        transactionType:
          type: string
        serviceProvider:
          type: string
        sourceAmount:
          type: number
          nullable: true
        sourceCurrencyCode:
          type: string
          nullable: true
        destinationAmount:
          type: number
          nullable: true
        destinationCurrencyCode:
          type: string
          nullable: true
        destinationWalletAddress:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        paymentMethodType:
          type: string
          nullable: true
        cryptoPurchaseDetails:
          type: object
          additionalProperties: true
          nullable: true
        serviceProviderDetails:
          type: object
          additionalProperties: true
          nullable: true
      additionalProperties: true
    MeldTransactionResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            transaction:
              $ref: '#/components/schemas/MeldTransaction'
    MeldTransactionSearchResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            count:
              type: integer
            remaining:
              type: integer
            totalCount:
              type: integer
            transactions:
              type: array
              items:
                $ref: '#/components/schemas/MeldTransaction'
    MeldServiceProviderLogos:
      type: object
      properties:
        dark:
          type: string
        light:
          type: string
        darkShort:
          type: string
        lightShort:
          type: string
    MeldServiceProvider:
      type: object
      required:
        - serviceProvider
        - name
      properties:
        serviceProvider:
          type: string
        name:
          type: string
        status:
          type: string
        categories:
          type: array
          items:
            type: string
        categoryStatuses:
          type: object
          additionalProperties:
            type: string
        websiteUrl:
          type: string
        customerSupportUrl:
          type: string
        logos:
          $ref: '#/components/schemas/MeldServiceProviderLogos'
    MeldServiceProvidersResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/MeldServiceProvider'
    MeldRegion:
      type: object
      properties:
        regionCode:
          type: string
        name:
          type: string
    MeldCountry:
      type: object
      required:
        - countryCode
        - name
      properties:
        countryCode:
          type: string
        name:
          type: string
        flagImageUrl:
          type: string
        regions:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/MeldRegion'
    MeldCountriesResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/MeldCountry'
    MeldFiatCurrency:
      type: object
      required:
        - currencyCode
        - name
      properties:
        currencyCode:
          type: string
        name:
          type: string
        symbolImageUrl:
          type: string
    MeldFiatCurrenciesResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/MeldFiatCurrency'
    MeldCryptoCurrency:
      type: object
      required:
        - currencyCode
        - name
      properties:
        currencyCode:
          type: string
        name:
          type: string
        chainCode:
          type: string
        chainName:
          type: string
        chainId:
          type: string
          nullable: true
        contractAddress:
          type: string
        symbolImageUrl:
          type: string
    MeldCryptoCurrenciesResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/MeldCryptoCurrency'
    MeldPaymentMethod:
      type: object
      required:
        - paymentMethod
        - name
      properties:
        paymentMethod:
          type: string
        name:
          type: string
        paymentType:
          type: string
        logos:
          type: object
          properties:
            dark:
              type: string
            light:
              type: string
    MeldPaymentMethodsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/MeldPaymentMethod'
    MeldCountryDefault:
      type: object
      required:
        - countryCode
        - defaultCurrencyCode
        - defaultPaymentMethods
      properties:
        countryCode:
          type: string
        defaultCurrencyCode:
          type: string
        defaultPaymentMethods:
          type: array
          items:
            type: string
    MeldCountryDefaultsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/MeldCountryDefault'
    MeldFiatCurrencyPurchaseLimit:
      type: object
      required:
        - currencyCode
        - minimumAmount
        - maximumAmount
      properties:
        currencyCode:
          type: string
        defaultAmount:
          type: number
          nullable: true
        minimumAmount:
          type: number
        maximumAmount:
          type: number
    MeldBuyLimitsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/MeldFiatCurrencyPurchaseLimit'
    MeldCryptoCurrencySellLimit:
      type: object
      required:
        - currencyCode
        - minimumAmount
        - maximumAmount
      properties:
        currencyCode:
          type: string
        chainCode:
          type: string
          nullable: true
        defaultAmount:
          type: number
          nullable: true
        minimumAmount:
          type: number
        maximumAmount:
          type: number
    MeldSellLimitsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/MeldCryptoCurrencySellLimit'
    MeldKycLimitTier:
      type: object
      properties:
        dailyLimit:
          type: number
          nullable: true
        weeklyLimit:
          type: number
          nullable: true
        monthlyLimit:
          type: number
          nullable: true
        yearlyLimit:
          type: number
          nullable: true
        transactionLimit:
          type: number
          nullable: true
    MeldKycFiatLevel:
      type: object
      required:
        - currencyCode
      properties:
        currencyCode:
          type: string
        level1:
          $ref: '#/components/schemas/MeldKycLimitTier'
        level2:
          $ref: '#/components/schemas/MeldKycLimitTier'
        level3:
          $ref: '#/components/schemas/MeldKycLimitTier'
    MeldKycLimitsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/MeldKycFiatLevel'
    AccountTypeResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            status:
              type: string
              enum:
                - EIP_155_EOA
                - SMART_CONTRACT
                - EIP_7702_EOA
              description: The account type.
        metadata:
          type: object
          properties:
            chainId:
              type: string
            eoaAddress:
              type: string
            smartContractAddress:
              type: string
    BuildAuthorizationListRequest:
      type: object
      required:
        - subsidize
      properties:
        contractAddress:
          type: string
          description: Target smart contract address for delegation.
        nonce:
          oneOf:
            - type: number
            - type: string
          description: Optional nonce.
        subsidize:
          type: boolean
          description: Whether Portal should subsidize gas for this authorization.
    BuildAuthorizationListResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            hash:
              type: string
              description: Authorization hash to sign.
        metadata:
          type: object
          properties:
            authorization:
              type: object
              properties:
                contractAddress:
                  type: string
                chainId:
                  type: string
                  description: Hex-encoded chain ID.
                nonce:
                  type: string
                  description: Hex-encoded nonce.
            chainId:
              type: string
              description: CAIP-2 chain ID.
    BuildAuthorizationTransactionRequest:
      type: object
      required:
        - signature
      properties:
        signature:
          type: string
          description: Hex-encoded signature of the authorization hash.
        subsidize:
          type: boolean
          description: Whether Portal should subsidize gas.
        contractAddress:
          type: string
        nonce:
          oneOf:
            - type: number
            - type: string
        txNonce:
          oneOf:
            - type: number
            - type: string
          description: Transaction nonce.
        to:
          type: string
        value:
          type: string
        data:
          type: string
        gas:
          type: string
        gasLimit:
          type: string
        maxFeePerGas:
          type: string
        maxPriorityFeePerGas:
          type: string
    BuildAuthorizationTransactionResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            transaction:
              type: object
              properties:
                type:
                  type: string
                  description: Always `eip7702`.
                from:
                  type: string
                to:
                  type: string
                value:
                  type: string
                data:
                  type: string
                nonce:
                  type: string
                chainId:
                  type: string
                gas:
                  type: string
                  nullable: true
                gasLimit:
                  type: string
                  nullable: true
                maxFeePerGas:
                  type: string
                  nullable: true
                maxPriorityFeePerGas:
                  type: string
                  nullable: true
                authorizationList:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
            transactionHash:
              type: string
              nullable: true
              description: Present if the transaction was subsidized and already submitted.
        metadata:
          type: object
          properties:
            authorization:
              type: object
              additionalProperties: true
            chainId:
              type: string
            subsidized:
              type: boolean
    SolanaDelegationTransactionResponse:
      type: object
      properties:
        transaction:
          type: object
          description: Solana transaction to sign and submit.
          additionalProperties: true
    SolanaDelegationStatusResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            balance:
              type: string
              description: Human-readable token balance.
            balanceRaw:
              type: string
              description: Token balance in the smallest unit.
            chainId:
              type: string
              description: CAIP-2 chain ID.
            delegations:
              type: array
              items:
                type: object
                properties:
                  address:
                    type: string
                    description: Delegate address.
                  delegateAmount:
                    type: string
                    description: Human-readable delegated amount.
                  delegateAmountRaw:
                    type: string
                    description: Delegated amount in smallest unit.
            token:
              type: string
              description: Token symbol.
            tokenAddress:
              type: string
              description: Token mint address.
            tokenAccount:
              type: string
              nullable: true
              description: Token account address.
        metadata:
          type: object
          properties:
            chainId:
              type: string
    SdkMetricsRequest:
      type: object
      required:
        - operation
      properties:
        operation:
          type: string
          description: Operation name (e.g. `sign`).
        chainId:
          type: string
        deviceModel:
          type: string
        hasError:
          type: boolean
        osVersion:
          type: string
        platform:
          type: string
        sdkBinaryConnectMs:
          type: number
        sdkBinaryDnsLookupMs:
          type: number
        sdkBinaryFirstResponseMs:
          type: number
        sdkBinaryOperationMs:
          type: number
        sdkBinaryTlsHandshakeMs:
          type: number
        sdkBinaryWSConnectMs:
          type: number
        sdkOperationMs:
          type: number
        sdkPostOperationMs:
          type: number
        sdkPreOperationMs:
          type: number
        sdkVersion:
          type: string
        signingMethod:
          type: string
        traceId:
          type: string
    SdkMetricsResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            success:
              type: boolean
        metadata:
          type: object
          properties:
            metrics:
              type: object
              additionalProperties: true
    BackupSharePairSummary:
      type: object
      properties:
        id:
          type: string
          description: Backup share pair ID.
        backupMethod:
          type: string
          description: Backup method used.
        status:
          type: string
          description: Current status.
        createdAt:
          type: string
          description: Creation timestamp.
    SigningSharePairSummary:
      type: object
      properties:
        id:
          type: string
          description: Signing share pair ID.
        status:
          type: string
          description: Current status.
        createdAt:
          type: string
          description: Creation timestamp.
    PrepareEjectResponse:
      type: object
      properties:
        encryptedClientBackupShare:
          type: string
          nullable: true
          description: Encrypted client backup share, or null.
        custodianBackupShare:
          type: string
          description: The custodian's backup share.
    DueGenericResponse:
      type: object
      description: >-
        Portal forwards Due's response verbatim; the shape depends on the
        endpoint.
      properties:
        data:
          type: object
          additionalProperties: true
    DueProvisionCustomerRequest:
      type: object
      required:
        - type
        - name
        - email
        - country
        - category
      properties:
        type:
          type: string
          enum:
            - individual
            - business
        name:
          type: string
        email:
          type: string
          format: email
        country:
          type: string
          description: ISO country code.
        category:
          type: string
          description: Customer category (for example `self_employed`).
        kycReturnUrl:
          type: string
          description: Where a hosted KYC session sends the user afterwards.
    DueCustomer:
      type: object
      additionalProperties: true
      required:
        - id
        - type
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - individual
            - business
        name:
          type: string
        email:
          type: string
        country:
          type: string
        category:
          type: string
        status:
          type: string
        kyc:
          type: object
          properties:
            status:
              type: string
            link:
              type: string
        createdAt:
          type: string
    DueCustomerResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/DueCustomer'
    DueChannel:
      type: object
      additionalProperties: true
      required:
        - rail
        - currencyCode
        - type
      properties:
        rail:
          type: string
        currencyCode:
          type: string
        type:
          type: string
        accountType:
          type: string
        feeBps:
          type: integer
        feeFixed:
          type: string
        limitMin:
          type: string
        limitMax:
          type: string
        kycLevels:
          type: array
          items:
            type: string
        purposeCodes:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        endorsementsRequired:
          type: array
          items:
            type: string
    DueChannelsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/DueChannel'
    DueFinancialInstitution:
      type: object
      additionalProperties: true
      required:
        - id
        - name
        - country2
        - currency
        - schemas
      properties:
        id:
          type: string
        name:
          type: string
        country2:
          type: string
        currency:
          type: string
        schemas:
          type: array
          items:
            type: string
    DueFinancialInstitutionsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/DueFinancialInstitution'
    DueFinancialInstitutionResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/DueFinancialInstitution'
    DueKycState:
      type: object
      additionalProperties: true
      required:
        - status
      properties:
        id:
          type: string
        type:
          type: string
        status:
          type: string
          description: >-
            KYC status (for example `pending`, `passed`, `failed`,
            `resubmission_required`).
        country:
          type: string
        token:
          type: string
        applicantId:
          type: string
        externalLink:
          type: string
    DueKycStateResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/DueKycState'
    DueKycSubmission:
      type: object
      additionalProperties: true
      required:
        - id
        - status
      properties:
        id:
          type: string
        status:
          type: string
        applicantId:
          type: string
        info:
          type: object
          additionalProperties: true
        requirements:
          type: array
          items:
            type: object
            additionalProperties: true
        documents:
          type: array
          items:
            type: object
            additionalProperties: true
    DueKycSubmissionResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/DueKycSubmission'
    DueKycSession:
      type: object
      additionalProperties: true
      required:
        - link
      properties:
        link:
          type: string
        accessToken:
          type: string
    DueKycSessionResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/DueKycSession'
    DueKycInfoRequest:
      type: object
      additionalProperties: true
      description: Collected KYC field values as key-value pairs; Due validates them.
    DueKycDocumentRequest:
      type: object
      additionalProperties: true
      description: Document metadata (for example `kind` or `type`) forwarded to Due.
    DueKycDocumentResponse:
      type: object
      properties:
        data:
          type: object
          additionalProperties: true
          properties:
            token:
              type: string
              description: Upload token for the subsequent document upload.
    DueKycDocumentUploadRequest:
      type: object
      required:
        - dataBase64
      properties:
        dataBase64:
          type: string
          description: Base64-encoded file bytes. The decoded file can be up to 10MB.
        filename:
          type: string
          description: >-
            Filename used to infer the MIME type (jpg, jpeg, png, webp, heic,
            pdf).
        contentType:
          type: string
          description: Explicit MIME type, if not inferring from the filename.
    DueEndorsement:
      type: object
      additionalProperties: true
      required:
        - code
        - status
      properties:
        code:
          type: string
        status:
          type: string
        submission:
          $ref: '#/components/schemas/DueKycSubmission'
    DueEndorsementsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/DueEndorsement'
    DueEndorsementResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/DueEndorsement'
    DueTosAcceptRequest:
      type: object
      required:
        - ipAddress
      properties:
        ipAddress:
          type: string
          description: The end user's IP address, not your server's.
    DueTosResponse:
      type: object
      properties:
        data:
          type: object
          additionalProperties: true
          properties:
            id:
              type: string
            entityName:
              type: string
            status:
              type: string
            link:
              type: string
            acceptedAt:
              type: string
    DueTransferSide:
      type: object
      required:
        - rail
        - currency
        - amount
      properties:
        rail:
          type: string
        currency:
          type: string
        amount:
          type: string
          description: >-
            Amount as a decimal string. Use "0" on one side to let Due compute
            it.
    DueTransferResultSide:
      type: object
      additionalProperties: true
      properties:
        rail:
          type: string
        currency:
          type: string
        amount:
          type: string
        fee:
          type: string
        applicationFee:
          type: string
        totalFee:
          type: string
    DueTransferQuoteRequest:
      type: object
      required:
        - source
        - destination
      properties:
        source:
          $ref: '#/components/schemas/DueTransferSide'
        destination:
          $ref: '#/components/schemas/DueTransferSide'
    DueTransferQuote:
      type: object
      additionalProperties: true
      properties:
        token:
          type: string
        fxRate:
          type: number
        fxMarkup:
          type: number
        expiresAt:
          type: string
        source:
          $ref: '#/components/schemas/DueTransferResultSide'
        destination:
          $ref: '#/components/schemas/DueTransferResultSide'
    DueTransferQuoteResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/DueTransferQuote'
    DueTransferEstimateRequest:
      type: object
      required:
        - source
        - destination
      properties:
        source:
          $ref: '#/components/schemas/DueTransferSide'
        destination:
          $ref: '#/components/schemas/DueTransferSide'
    DueTransferEstimate:
      type: object
      additionalProperties: true
      properties:
        fxRate:
          type: number
        fxMarkup:
          type: number
        source:
          $ref: '#/components/schemas/DueTransferResultSide'
        destination:
          $ref: '#/components/schemas/DueTransferResultSide'
    DueTransferEstimateResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/DueTransferEstimate'
    DueTransferCreateRequest:
      type: object
      required:
        - quote
        - recipient
      properties:
        quote:
          type: string
          description: The quote token from create transfer quote.
        recipient:
          type: string
          description: The recipient id.
        memo:
          type: string
        purposeCode:
          type: string
    DueTransfer:
      type: object
      additionalProperties: true
      required:
        - id
        - status
      properties:
        id:
          type: string
        status:
          type: string
          description: >-
            One of awaiting_funds, funds_received, approved, payment_submitted,
            payment_processed, failed, canceled, refund_submitted,
            refund_processed, manual_review.
        fxRate:
          type: number
        fxMarkup:
          type: number
        transferInstructions:
          type: object
          additionalProperties: true
        createdAt:
          type: string
        expiresAt:
          type: string
    DueTransferResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/DueTransfer'
    DueTransfersResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/DueTransfer'
    DueTransferIntentRequest:
      type: object
      properties:
        authorizationMode:
          type: string
    DueTransferIntent:
      type: object
      additionalProperties: true
      required:
        - id
      properties:
        id:
          type: string
        sender:
          type: string
        amountIn:
          type: string
        token:
          type: string
        signables:
          type: array
          items:
            type: object
            additionalProperties: true
        nonce:
          type: string
        hash:
          type: string
        expiresAt:
          type: string
    DueTransferIntentResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/DueTransferIntent'
    DueFundingAddress:
      type: object
      additionalProperties: true
      required:
        - kind
      properties:
        kind:
          type: string
          description: >-
            For example `bank_account` (payin) or `onchain_address` /
            `external_action` (payout).
        details:
          type: object
          additionalProperties: true
    DueFundingAddressResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/DueFundingAddress'
    DueFxQuoteRequest:
      type: object
      required:
        - currencyIn
        - currencyOut
      properties:
        currencyIn:
          type: string
        currencyOut:
          type: string
        amountIn:
          type: string
        amountOut:
          type: string
    DueFxQuote:
      type: object
      additionalProperties: true
      properties:
        currencyIn:
          type: string
        currencyOut:
          type: string
        amountIn:
          type: string
        amountOut:
          type: string
        rate:
          type: number
        markupBps:
          type: number
        createdAt:
          type: string
    DueFxQuoteResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/DueFxQuote'
    DueFxMarket:
      type: object
      additionalProperties: true
      properties:
        pair:
          type: object
          properties:
            Base:
              type: string
            Quote:
              type: string
        rate:
          type: number
        markupBps:
          type: number
        updatedAt:
          type: string
    DueFxMarketsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/DueFxMarket'
    DueFxMarketResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/DueFxMarket'
    DueFxMarketHistoryResponse:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            additionalProperties: true
            properties:
              date:
                type: string
              rate:
                type: number
    DueRecipientCreateRequest:
      type: object
      required:
        - name
        - details
      properties:
        name:
          type: string
        details:
          type: object
          additionalProperties: true
          description: >
            Recipient details. For onchain recipients, `schema` and `address`
            are

            defaulted from `chainId` when omitted; provide them explicitly for
            an

            external wallet. For fiat beneficiaries, include the bank schema and

            account fields.
          properties:
            address:
              type: string
              description: |
                The recipient address as a string in the chain's native format:
                `0x`-hex for EVM, base58 for Solana, base58check for Tron.
            schema:
              type: string
              description: >
                Due recipient schema. For onchain recipients one of `evm`,

                `solana`, `tron`; for fiat, the bank schema (for example
                `bank_us`,

                `bank_sepa`).
        chainId:
          type: string
          description: >-
            CAIP-2 chain id used to default an onchain recipient's schema and
            address.
        isExternal:
          type: boolean
          description: >-
            Set true for external wallets and fiat beneficiaries; disables
            Portal-wallet defaulting.
    DueRecipient:
      type: object
      additionalProperties: true
      required:
        - id
      properties:
        id:
          type: string
        label:
          type: string
        details:
          type: object
          additionalProperties: true
        isExternal:
          type: boolean
        isActive:
          type: boolean
        isValid:
          type: boolean
    DueRecipientResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/DueRecipient'
    DueRecipientsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/DueRecipient'
    DueWalletCreateRequest:
      type: object
      required:
        - address
      properties:
        address:
          type: string
          description: The Portal wallet address to register with Due.
    DueWallet:
      type: object
      additionalProperties: true
      required:
        - id
      properties:
        id:
          type: string
        address:
          type: string
        preferences:
          type: object
          properties:
            selectedNetworks:
              type: array
              items:
                type: string
    DueWalletResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/DueWallet'
    DueWalletsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/DueWallet'
    DueWalletBalanceResponse:
      type: object
      properties:
        data:
          type: object
          additionalProperties: true
          properties:
            balances:
              type: array
              items:
                type: object
                additionalProperties: true
                properties:
                  networkId:
                    type: string
                  token:
                    type: string
                  balance:
                    type: string
    DueVirtualAccountCreateRequest:
      type: object
      required:
        - destination
        - schemaIn
        - railOut
        - currencyOut
        - reference
      properties:
        destination:
          type: string
          description: The registered wallet id (wlt_*) that receives converted crypto.
        schemaIn:
          type: string
          description: Fiat deposit bank schema (for example `bank_sepa`, `bank_us`).
        currencyIn:
          type: string
          description: Fiat currency accepted for deposits.
        railOut:
          type: string
          description: Crypto destination rail.
        currencyOut:
          type: string
          description: Crypto asset funds convert to.
        reference:
          type: string
          description: Your label for the account, also used to build its key.
    DueVirtualAccountUpdateRequest:
      type: object
      description: >-
        Application fees are enforced server-side; client-supplied values are
        stripped.
      properties:
        applicationFeeBps:
          type: integer
        applicationFeeAmount:
          type: string
    DueVirtualAccount:
      type: object
      additionalProperties: true
      required:
        - id
      properties:
        id:
          type: string
        key:
          type: string
          description: >-
            Composite key
            destination/schemaIn/currencyIn/railOut/currencyOut/reference.
        walletId:
          type: string
        destination:
          type: string
        schemaIn:
          type: string
        currencyIn:
          type: string
        railOut:
          type: string
        currencyOut:
          type: string
        reference:
          type: string
        details:
          type: object
          additionalProperties: true
          description: Bank routing details, populated once the account is active.
        isActive:
          type: boolean
        createdAt:
          type: string
    DueVirtualAccountResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/DueVirtualAccount'
    DueVirtualAccountsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/DueVirtualAccount'
