openapi: 3.0.4
info:
  title: TaoFi - OpenAPI 3.0
  description: |-
    TaoFi is a decentralized finance (DeFi) platform that enables users to swap, bridge and stake alpha tokens across different subnets in the TAO ecosystem. This API provides endpoints for getting quotes, getting transactions call data, checking balances, and handling refunds.
  version: 1.0.0
externalDocs:
  description: Find out more about TaoFi
  url: https://docs.taofi.com/
servers:
  - url: https://taofi-api.web.app/
paths:
  /getBuyQuote:
    post:
      tags:
        - BuyQuote
      summary: Get a quote to buy alpha token
      description: |
        Use any ERC20 or ETH to buy alpha token on Base. Includes price impact.
        - "referralInfo" (optional) can be passed to set a fee and receiver address
      operationId: getBuyQuote
      requestBody:
        description: Get a quote to buy SN10 with USDT on Base.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BuyQuote'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuyQuoteResponse'
  /getBuyCall:
    post:
      tags:
        - BuyCall
      summary: Get transaction call data to buy alpha token
      description: |
        Use any ERC20 or ETH to buy alpha token on Base.
        - For convenience, you can use the list of subnets here - https://www.taofi.com/api/subnets and use the ones with the hotkey "0xacf34e305f1474e4817a66352af736fe6b0bcf5cdfeef18c441e24645c742339"
        - For ERC20 tokens you need to approve the wrapper contract at 0xC3697b332688b762bCBA6765A5b16fe5E8D8034F
        - Minimum trade size is 0.01 TAO
        - Pass in the "expectedAlphaAmount" (with 9 decimal places) from the quote response.
        - Use hyperlaneFee as the gas fee for the transaction.
        - When using native ETH, ensure to include enough for gas.
        - Make sure to simulate the transaction before sending it (using estimateGas).
        - "referralInfo" (optional) can be passed to set a fee and receiver address
      operationId: getBuyCall
      requestBody:
        description: Get transaction call data to buy SN10 with USDT on Base
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BuyCall'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuyCallResponse'
  /getSellQuote:
    post:
      tags:
        - SellQuote
      summary: Get a quote for selling alpha token
      description: |
        You can sell alpha token to USDC only on Base network. Includes price impact.
        - "fromAmount" is the alpha amount (with 9 decimal places)
        - "referralInfo" (optional) can be passed to set a fee and receiver address
      operationId: getSellQuote
      requestBody:
        description: Get a quote to SN10 token to USDC
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SellQuote'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema: 
                $ref: '#/components/schemas/SellQuoteResponse'
  /getSellCall:
    post:
      tags:
        - SellCall
      summary: Get transaction data to sell alpha token
      description: |
        You can sell alpha token to USDC only on Base network.
        - For convenience, you can use the list of subnets here - https://www.taofi.com/api/subnets and use the ones with the hotkey "0xacf34e305f1474e4817a66352af736fe6b0bcf5cdfeef18c441e24645c742339"
        - "fromAmount" is the alpha amount (with 9 decimal places)
        - Minimum trade size is 0.01 TAO
        - Pass in the "expectedToAmount" from the quote response.
        - Use hyperlaneFee as the gas fee for the transaction.
        - Make sure to simulate the transaction before sending it (using estimateGas).
        - "referralInfo" (optional) can be passed to set a fee and receiver address
      operationId: getSellCall
      requestBody:
        description: Get transaction call data to sell SN10 with USDC on Base.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SellCall'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SellCallResponse'
  /getRefundCall:
    post:
      tags:
        - RefundCall
      summary: Get transaction call data to refund USDC for failed buy order
      description: |
        You can refund USDC only on Base network.
        - Make sure the user has USDC to refund (the balances response returns the USDC balance).
        - Use hyperlaneFee as the gas fee for the transaction.
        - Make sure to simulate the transaction before sending it (using estimateGas).
      operationId: getRefundCall
      requestBody:
        description: Get transaction call data to refund USDC
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefundCall'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundCallResponse'
  /getBalance:
    post:
      tags:
        - GetBalance
      summary: Get user alpha token balances
      description: In addition to the specified alpha token balances, it also returns the TAO/USDC balance of the user.
      operationId: getBalance
      requestBody:
        description: Get the specified alpha token balances and TAO/USDC balance of user
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Balance'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalanceResponse'
  /getNativeTaoQuote:
    post:
      tags:
        - NativeTaoQuote
      summary: Get a quote to buy TAO on the bittensor wallet
      description: |
        Use any ERC20 or ETH to buy TAO on Base. Includes price impact.
        - "referralInfo" (optional) can be passed to set a fee and receiver address
      operationId: getNativeTaoQuote
      requestBody:
        description: Get a quote to buy TAO with USDT on Base.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NativeTaoQuote'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NativeTaoQuoteResponse'
  /getNativeTaoCall:
    post:
      tags:
        - NativeTaoCall
      summary: Get transaction call data to buy TAO on the bittensor wallet
      description: |
        Use any ERC20 or ETH to buy TAO on Base.
        - For ERC20 tokens you need to approve the wrapper contract at 0xC3697b332688b762bCBA6765A5b16fe5E8D8034F
        - Minimum trade size is 0.01 TAO
        - Pass in the "expectedTaoAmount" (with 18 decimal places) from the quote response.
        - Use hyperlaneFee as the gas fee for the transaction.
        - When using native ETH, ensure to include enough for gas.
        - Make sure to simulate the transaction before sending it (using estimateGas).
        - "referralInfo" (optional) can be passed to set a fee and receiver address
      operationId: getNativeTaoCall
      requestBody:
        description: Get transaction call data to buy TAO with USDT on Base
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NativeTaoCall'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NativeTaoCallResponse'
components:
  schemas:
    BuyQuote:
      type: object
      required:
        - subnetuid
        - fromTokenInfo
      properties:
        subnetuid:
          type: integer
          description: Subnet id
          format: uint32
          example: 10
        fromTokenInfo:
          type: object
          properties:
            address:
              type: string
              description: selling token address
              example: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
            decimals:
              type: integer
              description: selling token decimals
              format: uint32
              example: 6
            amount:
              type: string
              description: selling token amount
              example: "1000000"
        referralInfo:
          properties:
            receiver:
              type: string
              description: referral address
              example: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
            fee: 
              type: string
              description: referral fee percent, , 1% = 100
              example: "100"
    BuyQuoteResponse:
      type: object
      properties:
        message:
          type: string
          example: "success"
        priceImpact:
          type: number
          description: priceImpact percentage
          example: 1.5
        expectedAlphaAmount:
          type: string
          description: expected buying token amount (with 9 decimal places)
          example: "124569439"
        expectedAlphaPrice:
          type: string
          description: the price in TAO to buy one alpha token (with 9 decimal places)
          example: "13485938"
        hyperlaneFee: 
          type: string
          description: the gas fee for the transaction
          example: "1905383109718746"
    BuyCall:
      type: object
      required:
        - sender
        - subnetInfo
        - fromTokenInfo
        - expectedAlphaAmount
        - slippage
      properties:
        sender:
          type: string
          description: transaction sender address
          example: "0x9C14ca2486E824eCcC0e0f95969D1DF22DA9D207"
        subnetInfo:
          properties:
            netuid:
              type: integer
              description: Subnet id
              format: uint32
              example: 10
            hotkey:
              type: string
              description: The validator's hotkey in subnet
              example: "0xacf34e305f1474e4817a66352af736fe6b0bcf5cdfeef18c441e24645c742339"
        fromTokenInfo:
          type: object
          properties:
            address:
              type: string
              description: selling token address
              example: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
            decimals:
              type: integer
              description: selling token decimals
              format: uint32
              example: 6
            amount:
              type: string
              description: selling token amount
              example: "1000000"
        expectedAlphaAmount:
          type: string
          description: the expected alpha token amount (with 9 decimal places)
          example: "13485938"
        slippage:
          type: integer
          format: uint256
          description: the slippage in percent, 1% = 100
          example: 200
        referralInfo:
          properties:
            receiver:
              type: string
              description: referral address
              example: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
            fee: 
              type: string
              description: referral fee percent, , 1% = 100
              example: "100"          
    BuyCallResponse:
      type: object
      properties:
        message:
          type: string
          example: "success"
        lifi_quote:
          type: object
          description: Li.Fi swap data
        to:
          type: string
          description: transaction target address
          example: "0xC3697b332688b762bCBA6765A5b16fe5E8D8034F"
        data:
          type: string
          description: transaction data
          example: "0x40cbf136000000000000000000000000fde4c96c8593536e31f229ea8f37b2ada2699bb200000000000000000000000000000000000000000000000000000000000f42400000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae0000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000062000000000000000000000000000000000000000000000000000000000000005244666fc80f720a2f1e7d99330df266e5c71e3e658ac6e708c6f384a8c5a8b491bb4976b4100000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000002add3ef96cdafbc423d49cab15bb50f55956545e00000000000000000000000000000000000000000000000000000000000f1b32000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000086c6966692d73646b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783030303030303030303030303030303030303030303030303030303030303030303030303030303000000000000000000000000000000000000000000000000000000000000000000000ac4c6e212a361c968f1725b4d055b47e63f80b75000000000000000000000000ac4c6e212a361c968f1725b4d055b47e63f80b75000000000000000000000000fde4c96c8593536e31f229ea8f37b2ada2699bb2000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000002a45f3bd1c8000000000000000000000000fde4c96c8593536e31f229ea8f37b2ada2699bb200000000000000000000000000000000000000000000000000000000000f42400000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000f1b310000000000000000000000003ced11c610556e5292fbc2e75d68c3899098c14c00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001846be92b89000000000000000000000000fde4c96c8593536e31f229ea8f37b2ada2699bb200000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000f42420000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004301fde4c96c8593536e31f229ea8f37b2ada2699bb201ffff01e8598ada6b7a1a41f78c54a51cf15bd2eb79a8e0003ced11c610556e5292fbc2e75d68c3899098c14c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000745f399194094562d00c5ee971cd1ef5eb82616d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000003e0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000b833e8137fedf80de7e908dc6fea43a029142f20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000be7736ab0d60c9d5f686dc8c1abfcaa127fa0244ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000be7736ab0d60c9d5f686dc8c1abfcaa127fa0244000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000184868ec9c3000000000000000000000000b833e8137fedf80de7e908dc6fea43a029142f200000000000000000000000009dc08c6e2bf0f1eed1e00670f80df39145529f810000000000000000000000000000000000000000000000000000000000000bb8000000000000000000000000be7736ab0d60c9d5f686dc8c1abfcaa127fa0244000000000000000000000000000000000000000000000000000000006854d3a10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007e58acb69a0d56dbca120b30f1b743f3f68920cbd97acef18fa085897d384f73000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000118ec7f1bf18b4ab2e1b1bacd4e0b972542fa31df47fad0b4156110ee79d3453ff2e1d200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005600010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a1202532c3d363306fa6d625e4cbad996bcf534e815400000000000000000000"
        hyperlaneFee:
          type: string
          description: the gas fee for the transaction
          example: "1905383109718746"
    SellQuote:
      type: object
      required:
        - subnetuid
        - fromAmount
      properties:
        subnetuid:
          type: integer
          description: Subnet id
          format: uint32
          example: 10
        fromAmount:
          type: string
          description: selling alpha token amount (with 9 decimal places)
          example: "1000000000"
        referralInfo:
          properties:
            receiver:
              type: string
              description: referral address
              example: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
            fee: 
              type: string
              description: referral fee percent, , 1% = 100
              example: "100"          
    SellQuoteResponse:
      type: object
      properties:
        message:
          type: string
          example: "success"
        priceImpact:
          type: number
          description: priceImpact percentage
          example: 1.5
        expectedToAmount:
          type: string
          description: expected buying token amount
          example: "1245698"
        expectedAlphaPrice:
          type: string
          description: the price in TAO to buy one alpha token (with 9 decimal places)
          example: "13485938"
        hyperlaneFee:
          type: string
          description: the gas fee for the transaction
          example: "1433699946555093"
    SellCall:
      type: object
      required:
        - receiver
        - subnetInfo
        - fromAmount
        - expectedToAmount
        - slippage
      properties:
        receiver:
          type: string
          description: receiver address
          example: "0x9C14ca2486E824eCcC0e0f95969D1DF22DA9D207"
        subnetInfo:
          properties:
            netuid:
              type: integer
              description: Subnet id
              format: uint32
              example: 10
            hotkey:
              type: string
              description: The validator's hotkey in subnet
              example: "0xacf34e305f1474e4817a66352af736fe6b0bcf5cdfeef18c441e24645c742339"
        fromAmount:
          type: string
          description: selling alpha token amount (with 9 decimal places)
          example: "1000000000"
        expectedToAmount:
          type: string
          description: the expected toToken amount
          example: "13485938"
        slippage:
          type: integer
          format: uint256
          description: the slippage in percent, 1% = 100
          example: 200
        referralInfo:
          properties:
            receiver:
              type: string
              description: referral address
              example: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
            fee: 
              type: string
              description: referral fee percent, , 1% = 100
              example: "100"          
    SellCallResponse:
      type: object
      properties:
        message:
          type: string
          example: "success"
        to:
          type: string
          description: transaction target address
          example: "0xC3697b332688b762bCBA6765A5b16fe5E8D8034F"
        data:
          type: string
          description: transaction data
          example: "0x40cbf136000000000000000000000000fde4c96c8593536e31f229ea8f37b2ada2699bb200000000000000000000000000000000000000000000000000000000000f42400000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae0000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000062000000000000000000000000000000000000000000000000000000000000005244666fc80f720a2f1e7d99330df266e5c71e3e658ac6e708c6f384a8c5a8b491bb4976b4100000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000002add3ef96cdafbc423d49cab15bb50f55956545e00000000000000000000000000000000000000000000000000000000000f1b32000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000086c6966692d73646b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783030303030303030303030303030303030303030303030303030303030303030303030303030303000000000000000000000000000000000000000000000000000000000000000000000ac4c6e212a361c968f1725b4d055b47e63f80b75000000000000000000000000ac4c6e212a361c968f1725b4d055b47e63f80b75000000000000000000000000fde4c96c8593536e31f229ea8f37b2ada2699bb2000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000002a45f3bd1c8000000000000000000000000fde4c96c8593536e31f229ea8f37b2ada2699bb200000000000000000000000000000000000000000000000000000000000f42400000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000f1b310000000000000000000000003ced11c610556e5292fbc2e75d68c3899098c14c00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001846be92b89000000000000000000000000fde4c96c8593536e31f229ea8f37b2ada2699bb200000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000f42420000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004301fde4c96c8593536e31f229ea8f37b2ada2699bb201ffff01e8598ada6b7a1a41f78c54a51cf15bd2eb79a8e0003ced11c610556e5292fbc2e75d68c3899098c14c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000745f399194094562d00c5ee971cd1ef5eb82616d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000003e0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000b833e8137fedf80de7e908dc6fea43a029142f20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000be7736ab0d60c9d5f686dc8c1abfcaa127fa0244ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000be7736ab0d60c9d5f686dc8c1abfcaa127fa0244000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000184868ec9c3000000000000000000000000b833e8137fedf80de7e908dc6fea43a029142f200000000000000000000000009dc08c6e2bf0f1eed1e00670f80df39145529f810000000000000000000000000000000000000000000000000000000000000bb8000000000000000000000000be7736ab0d60c9d5f686dc8c1abfcaa127fa0244000000000000000000000000000000000000000000000000000000006854d3a10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007e58acb69a0d56dbca120b30f1b743f3f68920cbd97acef18fa085897d384f73000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000118ec7f1bf18b4ab2e1b1bacd4e0b972542fa31df47fad0b4156110ee79d3453ff2e1d200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005600010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a1202532c3d363306fa6d625e4cbad996bcf534e815400000000000000000000"
        hyperlaneFee:
          type: string
          description: the gas fee for the transaction
          example: "1433699946555093"
    RefundCall:
      type: object
      required:
        - receiver
        - amount
      properties:
        receiver:
          type: string
          description: receiver address
          example: "0x9C14ca2486E824eCcC0e0f95969D1DF22DA9D207"
        amount:
          type: string
          description: refund token amount
          example: "1000000"
    RefundCallResponse:
      type: object
      properties:
        message:
          type: string
          example: "success"
        to:
          type: string
          description: transaction target address
          example: "0xC3697b332688b762bCBA6765A5b16fe5E8D8034F"
        data:
          type: string
          description: transaction data
          example: "0x40cbf136000000000000000000000000fde4c96c8593536e31f229ea8f37b2ada2699bb200000000000000000000000000000000000000000000000000000000000f42400000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae0000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000062000000000000000000000000000000000000000000000000000000000000005244666fc80f720a2f1e7d99330df266e5c71e3e658ac6e708c6f384a8c5a8b491bb4976b4100000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000002add3ef96cdafbc423d49cab15bb50f55956545e00000000000000000000000000000000000000000000000000000000000f1b32000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000086c6966692d73646b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783030303030303030303030303030303030303030303030303030303030303030303030303030303000000000000000000000000000000000000000000000000000000000000000000000ac4c6e212a361c968f1725b4d055b47e63f80b75000000000000000000000000ac4c6e212a361c968f1725b4d055b47e63f80b75000000000000000000000000fde4c96c8593536e31f229ea8f37b2ada2699bb2000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000002a45f3bd1c8000000000000000000000000fde4c96c8593536e31f229ea8f37b2ada2699bb200000000000000000000000000000000000000000000000000000000000f42400000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000f1b310000000000000000000000003ced11c610556e5292fbc2e75d68c3899098c14c00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001846be92b89000000000000000000000000fde4c96c8593536e31f229ea8f37b2ada2699bb200000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000f42420000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004301fde4c96c8593536e31f229ea8f37b2ada2699bb201ffff01e8598ada6b7a1a41f78c54a51cf15bd2eb79a8e0003ced11c610556e5292fbc2e75d68c3899098c14c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000745f399194094562d00c5ee971cd1ef5eb82616d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000003e0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000b833e8137fedf80de7e908dc6fea43a029142f20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000be7736ab0d60c9d5f686dc8c1abfcaa127fa0244ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000be7736ab0d60c9d5f686dc8c1abfcaa127fa0244000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000184868ec9c3000000000000000000000000b833e8137fedf80de7e908dc6fea43a029142f200000000000000000000000009dc08c6e2bf0f1eed1e00670f80df39145529f810000000000000000000000000000000000000000000000000000000000000bb8000000000000000000000000be7736ab0d60c9d5f686dc8c1abfcaa127fa0244000000000000000000000000000000000000000000000000000000006854d3a10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007e58acb69a0d56dbca120b30f1b743f3f68920cbd97acef18fa085897d384f73000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000118ec7f1bf18b4ab2e1b1bacd4e0b972542fa31df47fad0b4156110ee79d3453ff2e1d200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005600010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a1202532c3d363306fa6d625e4cbad996bcf534e815400000000000000000000"
        hyperlaneFee:
          type: string
          description: the gas fee for the transaction
          example: "1433699946555093"          
    Balance:
      type: object
      required:
        - userAddress
        - subnetinfos
      properties:
        userAddress:
          type: string
          description: user address to get balance
          example: "0x9C14ca2486E824eCcC0e0f95969D1DF22DA9D207"
        subnetinfos:
          type: array
          description: Subnet info
          items: {}
          example: [{ netuid: 1, hotkey: "0x7e58acb69a0d56dbca120b30f1b743f3f68920cbd97acef18fa085897d384f73" }, { netuid: 64, hotkey: "0x547d66a553083ab6949d02d153423ee65d90d3d237f098cc4699461e1b67c17c" }]
    BalanceResponse:
      type: object
      properties:
        message:
          type: string
          example: "success"
        balances:
          type: object
          items:
            type: object
            properties:
              token:
                oneOf:
                  - type: string
                  - type: object
                    properties:
                      netuid:
                        type: integer
                      hotkey:
                        type: string
              balance:
                type: string
          example:
            - token:
                netuid: 1
                hotkey: "0x7e58acb69a0d56dbca120b30f1b743f3f68920cbd97acef18fa085897d384f73"
              balance: "0"
            - token:
                netuid: 64
                hotkey: "0x547d66a553083ab6949d02d153423ee65d90d3d237f098cc4699461e1b67c17c"
              balance: "123457"
            - token: "USDC"
              balance: "1203958"
            - token: "TAO"
              balance: "120395856394"
    NativeTaoQuote:
      type: object
      required:
        - fromTokenInfo
      properties:
        fromTokenInfo:
          type: object
          properties:
            address:
              type: string
              description: selling token address
              example: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
            decimals:
              type: integer
              description: selling token decimals
              format: uint32
              example: 6
            amount:
              type: string
              description: selling token amount
              example: "1000000"
        referralInfo:
          properties:
            receiver:
              type: string
              description: referral address
              example: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
            fee: 
              type: string
              description: referral fee percent, , 1% = 100
              example: "100"
    NativeTaoQuoteResponse:
      type: object
      properties:
        message:
          type: string
          example: "success"
        priceImpact:
          type: number
          description: priceImpact percentage
          example: 1.5
        expectedTaoAmount:
          type: string
          description: expected TAO amount (with 18 decimal places)
          example: "124569439038203759"
        hyperlaneFee: 
          type: string
          description: the gas fee for the transaction
          example: "1905383109718746"
    NativeTaoCall:
      type: object
      required:
        - sender
        - receiver
        - fromTokenInfo
        - expectedTaoAmount
        - slippage
      properties:
        sender:
          type: string
          description: transaction sender address
          example: "0x9C14ca2486E824eCcC0e0f95969D1DF22DA9D207"
        receiver:
          type: string
          description: bittensor wallet receiver address in bytes32
          example: "0x3e86a0c14dcb46407a7c75e12059765b0779688543cf254471aa5a246f175d0e"
        fromTokenInfo:
          type: object
          properties:
            address:
              type: string
              description: selling token address
              example: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
            decimals:
              type: integer
              description: selling token decimals
              format: uint32
              example: 6
            amount:
              type: string
              description: selling token amount
              example: "1000000"
        expectedTaoAmount:
          type: string
          description: the expected TAO amount (with 18 decimal places)
          example: "13485938083452938"
        slippage:
          type: integer
          format: uint256
          description: the slippage in percent, 1% = 100
          example: 200
        referralInfo:
          properties:
            receiver:
              type: string
              description: referral address
              example: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
            fee: 
              type: string
              description: referral fee percent, , 1% = 100
              example: "100"          
    NativeTaoCallResponse:
      type: object
      properties:
        message:
          type: string
          example: "success"
        lifi_quote:
          type: object
          description: Li.Fi swap data
        to:
          type: string
          description: transaction target address
          example: "0xC3697b332688b762bCBA6765A5b16fe5E8D8034F"
        data:
          type: string
          description: transaction data
          example: "0x40cbf136000000000000000000000000fde4c96c8593536e31f229ea8f37b2ada2699bb200000000000000000000000000000000000000000000000000000000000f42400000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae0000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000062000000000000000000000000000000000000000000000000000000000000005244666fc80f720a2f1e7d99330df266e5c71e3e658ac6e708c6f384a8c5a8b491bb4976b4100000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000002add3ef96cdafbc423d49cab15bb50f55956545e00000000000000000000000000000000000000000000000000000000000f1b32000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000086c6966692d73646b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783030303030303030303030303030303030303030303030303030303030303030303030303030303000000000000000000000000000000000000000000000000000000000000000000000ac4c6e212a361c968f1725b4d055b47e63f80b75000000000000000000000000ac4c6e212a361c968f1725b4d055b47e63f80b75000000000000000000000000fde4c96c8593536e31f229ea8f37b2ada2699bb2000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000002a45f3bd1c8000000000000000000000000fde4c96c8593536e31f229ea8f37b2ada2699bb200000000000000000000000000000000000000000000000000000000000f42400000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000f1b310000000000000000000000003ced11c610556e5292fbc2e75d68c3899098c14c00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001846be92b89000000000000000000000000fde4c96c8593536e31f229ea8f37b2ada2699bb200000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda0291300000000000000000000000000000000000000000000000000000000000f42420000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004301fde4c96c8593536e31f229ea8f37b2ada2699bb201ffff01e8598ada6b7a1a41f78c54a51cf15bd2eb79a8e0003ced11c610556e5292fbc2e75d68c3899098c14c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000745f399194094562d00c5ee971cd1ef5eb82616d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000003e0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000b833e8137fedf80de7e908dc6fea43a029142f20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000be7736ab0d60c9d5f686dc8c1abfcaa127fa0244ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000be7736ab0d60c9d5f686dc8c1abfcaa127fa0244000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000184868ec9c3000000000000000000000000b833e8137fedf80de7e908dc6fea43a029142f200000000000000000000000009dc08c6e2bf0f1eed1e00670f80df39145529f810000000000000000000000000000000000000000000000000000000000000bb8000000000000000000000000be7736ab0d60c9d5f686dc8c1abfcaa127fa0244000000000000000000000000000000000000000000000000000000006854d3a10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007e58acb69a0d56dbca120b30f1b743f3f68920cbd97acef18fa085897d384f73000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000118ec7f1bf18b4ab2e1b1bacd4e0b972542fa31df47fad0b4156110ee79d3453ff2e1d200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005600010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a1202532c3d363306fa6d625e4cbad996bcf534e815400000000000000000000"
        hyperlaneFee:
          type: string
          description: the gas fee for the transaction
          example: "1905383109718746"