This project provides an API and a simple web UI to query blockchain data related to accounts and transfers in the Dock blockchain.
- Node.js (v14 or higher)
- npm (v6 or higher)
- 
Clone the repository: git clone https://github.com/your-username/dock-blockchain-archives.git cd dock-blockchain-archives
- 
Install the dependencies: npm install 
- 
Start the development server: npm run dev 
- 
The server will start on http://localhost:3000.
- 
URL: /api/query
- 
Method: GET
- 
Query Parameters: - accountId(required): The account ID to query.
- type(required): The type of data to query. Can be either- accountor- transfer.
 
- 
Example Request: curl "http://localhost:3000/api/query?accountId=0x123&type=account"
- 
Example Response: [ { "account_display": { "address": "3Gry8Y6tjNvNVM9u4gpvjXAChHvbZNzmZzNDbmGs15W7g4Ci" }, "address": "3Gry8Y6tjNvNVM9u4gpvjXAChHvbZNzmZzNDbmGs15W7g4Ci", "balance": "1000", "balance_lock": "0", "count_extrinsic": 0, "derive_token": null, "is_erc20": false, "is_evm_contract": false, "lock": "0", "registrar_info": null } ]
- pages/api/query.js: The main API endpoint for querying blockchain data.
- archives/poa: Directory containing JSON files with blockchain data.
- Ensure that the archives/poadirectory contains the necessary JSON files (dock-poa-accounts.jsonanddock-poa-transfers.json) for the API to function correctly.
This project is licensed under the MIT License.