getWallet()

This method retrieves the wallet information from the specified blockchain.

Method Signature

Future<Map<String, dynamic>> getWallet(String blockchain, String address);

Parameters

Name
Type
Description

blockchain

String

Blockchain address in hex

address

String

Wallet address in hex

Example

import 'package:circular_api/circular_api.dart';

void main() async {
    final circular = CircularAPI();

    final blockchain = "8a20baa40c45dc5055aeb26197c203e576ef389d9acb171bd62da11dc5ad72b2";
    final address = "0x248ea24763f3aeb2590114257b0b95ebc8fc40e287574aa25379bb24c6d661ec";
  
    final wallet = await circular.getWallet(blockchain, address);
}

Result

The result will be an object of type Map<String, dynamic>

{
    "Result": 200,
    "Response": {
        "Address": "8b1dd25076c04c5139acba458f86c69cd2d322c61d19bc28daa3bbd945083738",
        "Assets": [ // Owned assets on the specified blockchain
            {
                "Address": "",
                "Amount": "1989449.200000",
                "Description": "Circular Coin",
                "EnableSwap": 0,
                "Name": "CIRX",
                "Price": "1",
                "Royalties": "0",
                "Type": "C_TYPE_COIN",
                "URL": "",
                "URLType": ""
            }
        ],
        "ContractData": [],
        "Contracts": {
            "ContractData": [
                {
                    "Address": "2b71b51f05ea3233a14204e9645023fe5c5dea7bc0747485a5194b2e5c24b65e",
                    "Data": "7b2241646472657373223a22307838623164643235303736633034633531333961636261343538663836633639636432643332326336316431396263323864616133626264393435303833373338222c2254797065223a224d6f766544417070222c224e616d65223a224d6f766544417070222c2253796d626f6c223a224d4450222c224f776e6572223a22307838623164643235303736633034633531333961636261343538663836633639636432643332326336316431396263323864616133626264393435303833373338222c224e6f746573223a313733313830373633313030302c2242616c616e6365223a302c22416c6c6f77616e636573223a7b7d7d"
                },
                {
                    "Address": "67cdbc9ba3ec4ff2cb5af6b511e94eefd486d6cc831d220fa48a188880aeba54",
                    "Data": "7b2241646472657373223a22307838623164643235303736633034633531333961636261343538663836633639636432643332326336316431396263323864616133626264393435303833373338222c2254797065223a224d6f766544417070222c224e616d65223a224d6f766544417070222c2253796d626f6c223a224d4450222c224f776e6572223a22307838623164643235303736633034633531333961636261343538663836633639636432643332326336316431396263323864616133626264393435303833373338222c224e6f746573223a313733313831303138383030302c2242616c616e6365223a302c22416c6c6f77616e636573223a7b7d7d"
                },
            ]
        },
        "DateCreation": "2024:07:15-13:17:29", // Wallet creation date
        "LatestTransactions": [
            {
                "Amount": 1000000.0,
                "Asset": "CIRX",
                "BlockID": 1062,
                "ID": "2ac8078d535706118e17e99baff38dd485fc9281de8c23d7ccc13c374a7dd9b5",
                "Timestamp": "2024:07:15-19:10:07"
            },
            {
                "Amount": -1004.0,
                "Asset": "CIRX",
                "BlockID": 1083,
                "ID": "e99be1869fe1bd452c3c6950d11a674045f6f3a096f67f8cbcbd4bbd849c7697",
                "Timestamp": "2024:07:17-13:36:17"
            }
        ],
        "Nonce": 55,
        "PublicKey": "04b5aa6be8b2e3420fb5a8b22e80e64ace8271d88dc4c081436956b0848e7bcf4e864b35c59e218885ed3d839352b81f85872c9460732ca05b8c18dad29dbad00e",
        "Version": "1.0.1", // Wallet version
        "Vouchers": []
    },
    "Node": "7bb5bd50729d6857942701d5673ea70ca1625f883230d8543970a452d1abe1c4"
}

Last updated