Sui

Sui Extended API API

Extended query methods (suix_ prefix)

OpenAPI Specification

sui-extended-api-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Sui JSON-RPC Coin Query API Extended API API
  description: Sui JSON-RPC API for interaction with Sui Full node. Make RPC calls using https://fullnode.NETWORK.sui.io:443, where NETWORK is the network you want to use (testnet, devnet, mainnet). By default, local networks use port 9000.
  contact:
    name: Mysten Labs
    url: https://mystenlabs.com
    email: build@mystenlabs.com
  license:
    name: Apache-2.0
    url: https://raw.githubusercontent.com/MystenLabs/sui/main/LICENSE
  version: 1.74.0
servers:
- url: https://fullnode.mainnet.sui.io:443
  description: Sui Mainnet
- url: https://fullnode.testnet.sui.io:443
  description: Sui Testnet
- url: https://fullnode.devnet.sui.io:443
  description: Sui Devnet
- url: http://localhost:9000
  description: Local node (default port)
tags:
- name: Extended API
  description: Extended query methods (suix_ prefix)
paths:
  /#suix_getDynamicFieldObject:
    post:
      operationId: suix_getDynamicFieldObject
      summary: suix_getDynamicFieldObject
      description: Return the dynamic field object information for a specified object
      tags:
      - Extended API
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - jsonrpc
              - id
              - method
              properties:
                jsonrpc:
                  type: string
                  enum:
                  - '2.0'
                  example: '2.0'
                id:
                  type: integer
                  example: 1
                method:
                  type: string
                  enum:
                  - suix_getDynamicFieldObject
                params:
                  type: array
                  description: Parameters as positional array
                  items: {}
            examples:
              example:
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: suix_getDynamicFieldObject
                  params:
                  - '0x3ddea0f8c3da994d9ead562ce76e36fdef6a382da344930c73d1298b0e9644b8'
                  - type: 0x0000000000000000000000000000000000000000000000000000000000000009::test::TestField
                    value: some_value
      responses:
        '200':
          description: JSON-RPC response
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    enum:
                    - '2.0'
                  id:
                    type: integer
                  result:
                    $ref: '#/components/schemas/SuiObjectResponse'
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                      data: {}
  /#suix_getDynamicFields:
    post:
      operationId: suix_getDynamicFields
      summary: suix_getDynamicFields
      description: Return the list of dynamic field objects owned by an object.
      tags:
      - Extended API
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - jsonrpc
              - id
              - method
              properties:
                jsonrpc:
                  type: string
                  enum:
                  - '2.0'
                  example: '2.0'
                id:
                  type: integer
                  example: 1
                method:
                  type: string
                  enum:
                  - suix_getDynamicFields
                params:
                  type: array
                  description: Parameters as positional array
                  items: {}
            examples:
              example:
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: suix_getDynamicFields
                  params:
                  - '0x5612581eba57ebe7e594b809ccceec2be4dac6ff6945d49b3ecc043d049611f6'
                  - '0x671832358f25bfacde706e528df4e15bb8de6dadd21835dfe44f4973139c15f9'
                  - 3
      responses:
        '200':
          description: JSON-RPC response
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    enum:
                    - '2.0'
                  id:
                    type: integer
                  result:
                    $ref: '#/components/schemas/Page_for_DynamicFieldInfo_and_ObjectID'
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                      data: {}
  /#suix_getOwnedObjects:
    post:
      operationId: suix_getOwnedObjects
      summary: suix_getOwnedObjects
      description: Return the list of objects owned by an address. Note that if the address owns more than `QUERY_MAX_RESULT_LIMIT` objects, the pagination is not accurate, because previous page may have been updated when the next page is fetched. Please use suix_queryObjects if this is a concern.
      tags:
      - Extended API
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - jsonrpc
              - id
              - method
              properties:
                jsonrpc:
                  type: string
                  enum:
                  - '2.0'
                  example: '2.0'
                id:
                  type: integer
                  example: 1
                method:
                  type: string
                  enum:
                  - suix_getOwnedObjects
                params:
                  type: array
                  description: Parameters as positional array
                  items: {}
            examples:
              example:
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: suix_getOwnedObjects
                  params:
                  - '0xdbc9abc01a87906b033a75750e741edb2df5ea5d55c96a611371d22799d26827'
                  - filter:
                      MatchAll:
                      - StructType: 0x2::coin::Coin<0x2::sui::SUI>
                      - AddressOwner: '0xdbc9abc01a87906b033a75750e741edb2df5ea5d55c96a611371d22799d26827'
                      - Version: '13488'
                    options:
                      showType: true
                      showOwner: true
                      showPreviousTransaction: true
                      showDisplay: false
                      showContent: false
                      showBcs: false
                      showStorageRebate: false
                  - '0x0cd4bb4d4f520fe9bbf0cf1cebe3f2549412826c3c9261bff9786c240123749f'
                  - 3
      responses:
        '200':
          description: JSON-RPC response
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    enum:
                    - '2.0'
                  id:
                    type: integer
                  result:
                    $ref: '#/components/schemas/Page_for_SuiObjectResponse_and_ObjectID'
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                      data: {}
  /#suix_queryEvents:
    post:
      operationId: suix_queryEvents
      summary: suix_queryEvents
      description: Return list of events for a specified query criteria.
      tags:
      - Extended API
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - jsonrpc
              - id
              - method
              properties:
                jsonrpc:
                  type: string
                  enum:
                  - '2.0'
                  example: '2.0'
                id:
                  type: integer
                  example: 1
                method:
                  type: string
                  enum:
                  - suix_queryEvents
                params:
                  type: array
                  description: Parameters as positional array
                  items: {}
            examples:
              example:
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: suix_queryEvents
                  params:
                  - MoveModule:
                      package: '0xa395759ca37c6e1ffc179184e98a6f9a2da5d78f6e34b0e5044ed52a6bc0a1bc'
                      module: test
                  - txDigest: Eg3ynETJfTfPKyvJzq3VLG6MngURYHPMjjUJ3Xt1t7tf
                    eventSeq: '1'
                  - 100
                  - false
      responses:
        '200':
          description: JSON-RPC response
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    enum:
                    - '2.0'
                  id:
                    type: integer
                  result:
                    $ref: '#/components/schemas/Page_for_Event_and_EventID'
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                      data: {}
  /#suix_queryTransactionBlocks:
    post:
      operationId: suix_queryTransactionBlocks
      summary: suix_queryTransactionBlocks
      description: Return list of transactions for a specified query criteria.
      tags:
      - Extended API
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - jsonrpc
              - id
              - method
              properties:
                jsonrpc:
                  type: string
                  enum:
                  - '2.0'
                  example: '2.0'
                id:
                  type: integer
                  example: 1
                method:
                  type: string
                  enum:
                  - suix_queryTransactionBlocks
                params:
                  type: array
                  description: Parameters as positional array
                  items: {}
            examples:
              example:
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: suix_queryTransactionBlocks
                  params:
                  - filter:
                      InputObject: '0x93633829fcba6d6e0ccb13d3dbfe7614b81ea76b255e5d435032cd8595f37eb8'
                    options: null
                  - HxidAfFfyr4kXSiWeVq1J6Tk526YUVDoSUY5PSnS4tEJ
                  - 100
                  - false
      responses:
        '200':
          description: JSON-RPC response
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    enum:
                    - '2.0'
                  id:
                    type: integer
                  result:
                    $ref: '#/components/schemas/Page_for_TransactionBlockResponse_and_TransactionDigest'
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                      data: {}
  /#suix_resolveNameServiceAddress:
    post:
      operationId: suix_resolveNameServiceAddress
      summary: suix_resolveNameServiceAddress
      description: Return the resolved address given resolver and name
      tags:
      - Extended API
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - jsonrpc
              - id
              - method
              properties:
                jsonrpc:
                  type: string
                  enum:
                  - '2.0'
                  example: '2.0'
                id:
                  type: integer
                  example: 1
                method:
                  type: string
                  enum:
                  - suix_resolveNameServiceAddress
                params:
                  type: array
                  description: Parameters as positional array
                  items: {}
            examples:
              example:
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: suix_resolveNameServiceAddress
                  params:
                  - example.sui
      responses:
        '200':
          description: JSON-RPC response
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    enum:
                    - '2.0'
                  id:
                    type: integer
                  result:
                    $ref: '#/components/schemas/SuiAddress'
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                      data: {}
  /#suix_resolveNameServiceNames:
    post:
      operationId: suix_resolveNameServiceNames
      summary: suix_resolveNameServiceNames
      description: Return the resolved names given address, if multiple names are resolved, the first one is the primary name.
      tags:
      - Extended API
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - jsonrpc
              - id
              - method
              properties:
                jsonrpc:
                  type: string
                  enum:
                  - '2.0'
                  example: '2.0'
                id:
                  type: integer
                  example: 1
                method:
                  type: string
                  enum:
                  - suix_resolveNameServiceNames
                params:
                  type: array
                  description: Parameters as positional array
                  items: {}
            examples:
              example:
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: suix_resolveNameServiceNames
                  params:
                  - '0x5cd6fa76ed1d18f05f15e35075252ddec4fb83621d55952d9172fcfcb72feae2'
                  - '0xd22bbb46f892c42d9ec0ae4de93e02c75973a51c17180798237326a58694a2cf'
                  - 3
      responses:
        '200':
          description: JSON-RPC response
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    enum:
                    - '2.0'
                  id:
                    type: integer
                  result:
                    $ref: '#/components/schemas/Page_for_String_and_ObjectID'
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                      data: {}
  /#suix_subscribeEvent:
    post:
      operationId: suix_subscribeEvent
      summary: suix_subscribeEvent
      description: Subscribe to a stream of Sui event
      tags:
      - Extended API
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - jsonrpc
              - id
              - method
              properties:
                jsonrpc:
                  type: string
                  enum:
                  - '2.0'
                  example: '2.0'
                id:
                  type: integer
                  example: 1
                method:
                  type: string
                  enum:
                  - suix_subscribeEvent
                params:
                  type: array
                  description: Parameters as positional array
                  items: {}
            examples: {}
      responses:
        '200':
          description: JSON-RPC response
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    enum:
                    - '2.0'
                  id:
                    type: integer
                  result:
                    $ref: '#/components/schemas/Event'
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                      data: {}
  /#suix_subscribeTransaction:
    post:
      operationId: suix_subscribeTransaction
      summary: suix_subscribeTransaction
      description: Subscribe to a stream of Sui transaction effects
      tags:
      - Extended API
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - jsonrpc
              - id
              - method
              properties:
                jsonrpc:
                  type: string
                  enum:
                  - '2.0'
                  example: '2.0'
                id:
                  type: integer
                  example: 1
                method:
                  type: string
                  enum:
                  - suix_subscribeTransaction
                params:
                  type: array
                  description: Parameters as positional array
                  items: {}
            examples: {}
      responses:
        '200':
          description: JSON-RPC response
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    enum:
                    - '2.0'
                  id:
                    type: integer
                  result:
                    $ref: '#/components/schemas/TransactionBlockEffects'
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                      data: {}
components:
  schemas:
    ZkLoginAuthenticatorAsBytes:
      $ref: '#/components/schemas/Base64'
    Base58:
      type: string
    TransactionEventsDigest:
      $ref: '#/components/schemas/Digest'
    ObjectResponseError:
      oneOf:
      - type: object
        required:
        - code
        - object_id
        properties:
          code:
            type: string
            enum:
            - notExists
          object_id:
            $ref: '#/components/schemas/ObjectID'
      - type: object
        required:
        - code
        - parent_object_id
        properties:
          code:
            type: string
            enum:
            - dynamicFieldNotFound
          parent_object_id:
            $ref: '#/components/schemas/ObjectID'
      - type: object
        required:
        - code
        - digest
        - object_id
        - version
        properties:
          code:
            type: string
            enum:
            - deleted
          digest:
            description: Base64 string representing the object digest
            allOf:
            - $ref: '#/components/schemas/ObjectDigest'
          object_id:
            $ref: '#/components/schemas/ObjectID'
          version:
            description: Object version.
            allOf:
            - $ref: '#/components/schemas/SequenceNumber2'
      - type: object
        required:
        - code
        properties:
          code:
            type: string
            enum:
            - unknown
      - type: object
        required:
        - code
        - error
        properties:
          code:
            type: string
            enum:
            - displayError
          error:
            type: string
    MoveStruct:
      anyOf:
      - type: array
        items:
          $ref: '#/components/schemas/MoveValue'
      - type: object
        required:
        - fields
        - type
        properties:
          fields:
            type: object
            additionalProperties:
              $ref: '#/components/schemas/MoveValue'
          type:
            type: string
      - type: object
        additionalProperties:
          $ref: '#/components/schemas/MoveValue'
    MoveValue:
      anyOf:
      - type: integer
        format: uint32
        minimum: 0.0
      - type: boolean
      - $ref: '#/components/schemas/SuiAddress'
      - type: array
        items:
          $ref: '#/components/schemas/MoveValue'
      - type: string
      - type: object
        required:
        - id
        properties:
          id:
            $ref: '#/components/schemas/ObjectID'
      - $ref: '#/components/schemas/MoveStruct'
      - anyOf:
        - $ref: '#/components/schemas/MoveValue'
        - type: 'null'
      - $ref: '#/components/schemas/MoveVariant'
    Secp256r1SuiSignature:
      $ref: '#/components/schemas/Base64'
    TransactionBlockData:
      oneOf:
      - type: object
        required:
        - gasData
        - messageVersion
        - sender
        - transaction
        properties:
          gasData:
            $ref: '#/components/schemas/GasData'
          messageVersion:
            type: string
            enum:
            - v1
          sender:
            $ref: '#/components/schemas/SuiAddress'
          transaction:
            $ref: '#/components/schemas/TransactionBlockKind'
    MultiSigPublicKeyLegacy:
      description: Deprecated, use [struct MultiSigPublicKey] instead. The struct that contains the public key used for authenticating a MultiSig.
      type: object
      required:
      - pk_map
      - threshold
      properties:
        pk_map:
          description: A list of public key and its corresponding weight.
          type: array
          items:
            type: array
            items:
            - $ref: '#/components/schemas/PublicKey'
            - type: integer
              format: uint8
              minimum: 0.0
            maxItems: 2
            minItems: 2
        threshold:
          description: If the total weight of the public keys corresponding to verified signatures is larger than threshold, the MultiSig is verified.
          type: integer
          format: uint16
          minimum: 0.0
    SequenceNumber2:
      $ref: '#/components/schemas/BigInt_for_uint64'
    AccumulatorValue:
      oneOf:
      - type: object
        required:
        - integer
        properties:
          integer:
            type: integer
            format: uint64
            minimum: 0.0
        additionalProperties: false
      - type: object
        required:
        - integerTuple
        properties:
          integerTuple:
            type: array
            items:
            - type: integer
              format: uint64
              minimum: 0.0
            - type: integer
              format: uint64
              minimum: 0.0
            maxItems: 2
            minItems: 2
        additionalProperties: false
      - type: object
        required:
        - eventDigest
        properties:
          eventDigest:
            type: array
            items:
              type: array
              items:
              - type: integer
                format: uint64
                minimum: 0.0
              - $ref: '#/components/schemas/Digest'
              maxItems: 2
              minItems: 2
        additionalProperties: false
    SuiJsonValue: {}
    ZkLoginInputs:
      description: All inputs required for the zk login proof verification and other public inputs.
      type: object
      required:
      - addressSeed
      - headerBase64
      - issBase64Details
      - proofPoints
      properties:
        addressSeed:
          $ref: '#/components/schemas/Bn254FrElement'
        headerBase64:
          type: string
        issBase64Details:
          $ref: '#/components/schemas/Claim'
        proofPoints:
          $ref: '#/components/schemas/ZkLoginProof'
    PublicKey:
      oneOf:
      - type: object
        required:
        - Ed25519
        properties:
          Ed25519:
            $ref: '#/components/schemas/Base64'
        additionalProperties: false
      - type: object
        required:
        - Secp256k1
        properties:
          Secp256k1:
            $ref: '#/components/schemas/Base64'
        additionalProperties: false
      - type: object
        required:
        - Secp256r1
        properties:
          Secp256r1:
            $ref: '#/components/schemas/Base64'
        additionalProperties: false
      - type: object
        required:
        - ZkLogin
        properties:
          ZkLogin:
            $ref: '#/components/schemas/ZkLoginPublicIdentifier'
        additionalProperties: false
      - type: object
        required:
        - Passkey
        properties:
          Passkey:
            $ref: '#/components/schemas/Base64'
        additionalProperties: false
    Page_for_SuiObjectResponse_and_ObjectID:
      description: '`next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first item.'
      type: object
      required:
      - data
      - hasNextPage
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/SuiObjectResponse'
        hasNextPage:
          type: boolean
        nextCursor:
          anyOf:
          - $ref: '#/components/schemas/ObjectID'
          - type: 'null'
    GenericSignature:
      description: Due to the incompatibility of [enum Signature] (which dispatches a trait that assumes signature and pubkey bytes for verification), here we add a wrapper enum where member can just implement a lightweight [trait AuthenticatorTrait]. This way MultiSig (and future Authenticators) can implement its own `verify`.
      oneOf:
      - type: object
        required:
        - MultiSig
        properties:
          MultiSig:
            $ref: '#/components/schemas/MultiSig'
        additionalProperties: false
      - type: object
        required:
        - MultiSigLegacy
        properties:
          MultiSigLegacy:
            $ref: '#/components/schemas/MultiSigLegacy'
        additionalProperties: false
      - type: object
        required:
        - Signature
        properties:
          Signature:
            $ref: '#/components/schemas/Signature'
        additionalProperties: false
      - type: object
        required:
        - ZkLoginAuthenticator
        properties:
          ZkLoginAuthenticator:
            $ref: '#/components/schemas/ZkLoginAuthenticator'
        additionalProperties: false
      - type: object
        required:
        - PasskeyAuthenticator
        properties:
          PasskeyAuthenticator:
            $ref: '#/components/schemas/PasskeyAuthenticator'
        additionalProperties: false
    ObjectChange:
      description: ObjectChange are derived from the object mutations in the TransactionEffect to provide richer object information.
      oneOf:
      - description: Module published
        type: object
        required:
        - digest
        - modules
        - packageId
        - type
        - version
        properties:
          digest:
            $ref: '#/components/schemas/ObjectDigest'
          modules:
            type: array
            items:
              type: string
          packageId:
            $ref: '#/components/schemas/ObjectID'
          type:
            type: string
            enum:
            - published
          version:
            $ref: '#/components/schemas/SequenceNumber'
      - description: Transfer objects to new address / wrap in another object
        type: object
        required:
        - digest
        - objectId
        - objectType
        - recipient
        - sender
        - type
        - version
        properties:
          digest:
            $ref: '#/components/schemas/ObjectDigest'
          objectId:
            $ref: '#/components/schemas/ObjectID'
          objectType:
            type: string
          recipient:
            $ref: '#/components/schemas/Owner'
          sender:
            $ref: '#/components/schemas/SuiAddress'
          type:
            type: string
            enum:
            - transferred
          version:
            $ref: '#/components/schemas/SequenceNumber'
      - description: Object mutated.
        type: object
        required:
        - digest
        - objectId
        - objectType
        - owner
        - previousVersion
        - sender
        - type
        - version
        properties:
          digest:
            $ref: '#/components/schemas/ObjectDigest'
          objectId:
            $ref: '#/components/schemas/ObjectID'
          objectType:
            type: string
          owner:
            $ref: '#/components/schemas/Owner'
          previousVersion:
            $ref: '#/components/schemas/SequenceNumber'
          sender:
            $ref: '#/components/schemas/SuiAddress'
          type:
            type: string
            enum:
            - mutated
          version:
            $ref: '#/components/schemas/SequenceNumber'
      - description: Delete object
        type: object
        required:
        - objectId
        - objectType
        - sender
        - type
        - version
        properties:
          objectId:
            $ref: '#/components/schemas/ObjectID'
          objectType:
            type: string
          sender:
            $ref: '#/components/schemas/SuiAddress'
          type:
            type: string
            enum:
            - deleted
          version:
            $ref: '#/components/schemas/SequenceNumber'
      - description: Wrapped object
        type: object
        required:
        - objectId
        - objectType
        - sender
        - type
        - version
        properties:
          objectId:
            $ref: '#/components/schemas/ObjectID'
          objectType:
            type: string
          sender:
            $ref: '#/components/schemas/SuiAddress'
          type:
            type: string
            enum:
            - wrapped
          version:
            $ref: '#/components/schemas/SequenceNumber'
      - description: New object creation
        type: object
        required:
        - digest
        - objectId
        - objectType
        - owner
        - sender
        - type
        - version
        properties:
          digest:
            $ref: '#/components/schemas/ObjectDigest'
          objectId:
            $ref: '#/components/schemas/ObjectID'
          objectType:
            type: string
          owner:
            $ref: '#/components/schemas/Owner'
          sender:
            $ref: '#/components/schemas/SuiAddress'
          type:
            type: string
            e

# --- truncated at 32 KB (85 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/sui/refs/heads/main/openapi/sui-extended-api-api-openapi.yml