API Clients

Installation

We recommend using each languages' standards for dependency management and builds and attempt to make our SDKs compatible with current practices for each language.

Below are useful links to get started with each SDK:

    Development Setup

    If you want to contribute to the SDKs itself, follow this guide.

      Initialization

      Each API client is instantiated roughly the same. It requires a fully qualified URL pointing to the node used in the requests and allows for optional parameters providing more custom configurations.

      Each SDK attempts to return a response in an idiomatic way (i.e., using structs if appropriate) and a way to access the underlying HTTP response. You can use a public node in your API requests, such as the official explorer, but for security reasons, we recommend running your node.

        Blocks

        This service API grants access to the blocks resource. A block is a signed set of transactions created by a delegate and permanently committed to the ARK blockchain.

        You may query for:

        • All blocks, which is a paginated API due to the large number of existing blocks.
        • A specific block using its ID.
        • Query for transactions within a specific block.
        • Search for a block based on search parameters.

        It is not possible to POST a block through the public API. Relay Nodes accept only blocks posted by a delegate at the correct time through the internal API.

          List All Blocks

          Delegates

          The client SDK can be used to query the delegate resource.

          A delegate is a regular wallet that has broadcasted a registration transaction, acquired a sufficient number of votes, and has a Relay Node configured to forge new blocks through a forger module. At any time only 51 delegates are active. They are cost-efficient miners running the ARK network.

          Voters are wallets which have broadcasted a vote transaction on a delegate. A vote remains active until an un-vote transaction is sent (it does not have to be recast unless a wallet wishes to change from delegate). Voting for a delegate does not give the delegate access to the wallet nor does it lock the coins in it.

          You may query for:

          • All delegates through the paginated API.
          • A specific delegate using the username as ID.
          • All blocks forged by a specific delegate.
          • The voters of a specific delegate.

            Node

            The ARK network consists of different anonymous nodes (servers), maintaining the public ledger, validating transactions and blocks and providing APIs. The node resource allows for querying the health and configurations of the node used by the instantiated client.

            You may query for:

            • The node's network configuration.
            • The status of the node.
            • The syncing progress.

              Peers

              Each node is connected to a set of peers, which are Relay or Delegate Nodes as well. The peers resource provides access to all peers connected to our node.

              Peers have made their Public API available for use; however for mission-critical queries and transaction posting you should use a node which is under your control. We provide a guide to setting up a Relay Node here.

              You may query for:

              • All peers through the paginated API.
              • Obtain a specific peer by IP address.

                Transactions

                The heart of any blockchain is formed by its transactions; state-altering payloads signed by a wallet. Most likely you will be querying for transactions most often, using the transaction resource.

                A transaction is the only object which may be posted by a non-delegate. It requires a signature from a wallet containing a sufficient amount of ARK.

                Through this API you can:

                • Post a signed transaction to a Relay Node.
                • Obtain a transaction by ID.
                • List transactions through a paginated API.
                • List unconfirmed transactions (mempool).
                • Obtain an unconfirmed transaction by ID.
                • Search for transactions by search parameters.
                • Obtain all transaction types supported by the network.
                • Obtain non-dynamic fees for the network.

                  Votes

                  A vote is a transaction sub-type, where the asset field contains a votes object and the transaction.type is 3.

                  Through the votes resource, you can query for:

                  • All votes (paginated API).
                  • A specific vote by ID.

                    Wallets

                    The wallet resource provides access to:

                    • Wallets.
                    • Incoming and outgoing transactions per wallet.
                    • Each wallet's votes.