AB Connect
Basic Information
AB is a blockchain network built on a Hybrid Blockchain architecture. With AB Core as the main chain, it connects multiple dedicated sidechains (AB IoT) via AB Connect, which serves as the primary component to enable efficient transfers of AB tokens between AB Core and each dedicated sidechain.
AB Connect, operated in a distributed manner through multiple nodes, establishes a decentralized network architecture to ensure security, reliability, and efficiency.
In simple terms, AB Connect, as the core connector, links AB Core and the dedicated sidechains, enabling efficient and decentralized transfers of AB tokens across the chains.
API
API Service Endpoints:
- Mainnet (MainNet):
- Testnet (TestNet):
Struct
Blockchain
name value desc networkABCore,ABIoT,ABCoreTestnet,ABIoTTestnetblockchain network name of AB network chain_id1,1012ormain,testget from rpc, eth_chainIdfor evmbase_chainEthereum,NewChainBase chain sluguuid, one of abcore,abiot,abcoretestnet,abiottestnetuid
Example
network chain_id base_chain slug ABIoT 1012 NewChain abiot ABCore 36888 Ethereum abcore ABIoTTestnet 1007 NewChain abiottestnet ABCoreTestnet 26888 Ethereum abcoretestnet
Asset
name desc asset empty for native coin or address for token name name symbol symbol decimals 0-18, for AB is 18 asset_type Coin,ERC-20,NRC-6,BRC-20network Blockchain.network chain_id Blockchain.chain_id base_chain Blockchain.base_chain Slug Blockchain.slug
Example
asset name symbol decimal asset_type network chain_id base_chain slug desc AB AB 18 Coin ABIoT 1012 NewChain abiot AB IoT native asset AB AB 18 Coin ABCore 36888 Ethereum abcore AB Core native asset
API
GET /v1/networks (get networks)
GET /v1/connects (get connects)
Parameters
None
Responses
name value desc bc1Blockchainblockchain a bc2Blockchainblockchain b
Example cURL
curl http://localhost:9699/v1/connects
{
"connects": [
{
"bc1": {
"network": "ABCore",
"chain_id": "36888",
"base_chain": "Ethereum",
"slug": "abcore"
},
"bc2": {
"network": "ABIoT",
"chain_id": "1012",
"base_chain": "NewChain",
"slug": "abiot"
}
}
]
}
GET /v1/pairs (get pairs)
Parameters
None
Responses
name value desc idpair id the id of pair asset_a_idasset id the id of asset A asset_b_idasset id the id of asset B asset_aAssetasset_a asset_bAssetasset_b a2b_min_deposit_amountstring, unit is AB min deposit amount for asset a to b b2a_min_deposit_amountstring, unit is AB min deposit amount for asset b to a a2b_fee_percentfloat, base on 10000 fee percent for asset a to b b2a_fee_percentfloat, base on 10000 fee percent for asset b to a a2b_fee_min_amountstring, unit is AB min fee for asset a to b b2a_fee_min_amountstring, unit is AB min fee for asset b to a b2a_fee_min_amountstring, unit is AB min fee for asset b to a connect_pairstring merge of blockchain slug for a-b
Example cURL
curl http://localhost:9699/v1/pairs
{
"pairs": [
{
"id": "1",
"asset_a_id": "1",
"asset_b_id": "2",
"asset_a": {
"id": "1",
"asset": "",
"name": "AB",
"symbol": "AB",
"decimals": 18,
"asset_type": "Coin",
"network": "ABCore",
"chain_id": "36888",
"base_chain": "Ethereum",
"slug": "abcore"
},
"asset_b": {
"id": "2",
"asset": "",
"name": "AB",
"symbol": "AB",
"decimals": 18,
"asset_type": "Coin",
"network": "ABIoT",
"chain_id": "1012",
"base_chain": "NewChain",
"slug": "abiot"
},
"a2b_min_deposit_amount": "12",
"b2a_min_deposit_amount": "12",
"a2b_fee_percent": "0.000000",
"b2a_fee_percent": "0.000000",
"a2b_fee_min_amount": "11.55",
"b2a_fee_min_amount": "11.55",
"connect_pair": "abcore-abiot"
}
]
}
GET /v1/account (get account's deposit address)
Parameters
name value desc recipient_addressaddressrecipient address on recipient blockchain, user's address to receive asset recipient_blockchainslugslug of recipient blockchain deposit_blockchainslugslug of deposit blockchain
if recipient blockchain is AB Core network, the address must be in checksum.
Responses
name value desc recipient_addressaddressrecipient address on recipient blockchain, user's address to receive asset recipient_blockchainslugslug of recipient blockchain deposit_blockchainslugslug of deposit blockchain deposit_addressaddressdeposit address on deposit blockchain, which used for use to send asset to
Example cURL
curl http://127.0.0.1:9699/v1/account?recipient_address=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045&recipient_blockchain=abcore&deposit_blockchain=abiot
{
"recipient_address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"recipient_blockchain": "abcore",
"deposit_address": "NEW17zWPekqx7GKGQFvzk3wqF4SbYFgv1xoCpMo",
"deposit_blockchain": "abiot"
}
GET /v1/history (get all history or account's history)
Parameters
name value desc page_iduint64 Optional, page id, default 0page_size50 Optional, page size, default 50source_deposit_addressaddressonsource_blockchaindeposit_addressget byv1/accountsource_senderaddressonsource_blockchainthe address who send AB to deposit_addresssource_blockchainslugofblockchainslug of blockchain, get by v1/networksdestination_addressaddressondestination_blockchaindeposit_addressget byv1/accountdestination_blockchainslugofblockchainslug of blockchain
if address and blockchain is empty, return all history
Responses
name value desc statusDeposit,Pending,Confirmedcurrent status listHistoryhistory list
the History is as follow:
| Name | Type | Description |
|---|---|---|
| id | integer | Unique ID of the history record |
| pair_id | integer | Pair ID related to this transfer |
| source_slug | string | Slug of the source blockchain |
| source_network | string | Source network name |
| source_chain_id | string | Source blockchain chain ID |
| source_base_chain | string | Source blockchain base chain |
| destination_slug | string | Slug of the destination blockchain |
| destination_network | string | Destination network name |
| destination_chain_id | string | Destination blockchain chain ID |
| destination_base_chain | string | Destination blockchain base chain |
| source_deposit_address | string | Deposit address on the source blockchain |
| source_sender | string | Sender address on the source blockchain |
| destination_address | string | Destination address on the destination blockchain |
| source_block_number | string | Block number of source blockchain transaction |
| destination_block_number | string | Block number of destination blockchain transaction |
| source_block_timestamp | string | Block timestamp of source blockchain transaction |
| destination_block_timestamp | string | Block timestamp of destination blockchain transaction |
| source_tx_hash | string | Transaction hash on the source blockchain |
| destination_tx_hash | string | Transaction hash on the destination blockchain |
| source_asset_id | integer | Asset ID |
| source_asset_address | string | Asset address on the source blockchain (empty if native) |
| source_asset_name | string | Asset name |
| source_asset_symbol | string | Asset symbol |
| source_asset_decimals | integer | Asset decimals |
| source_asset_type | string | Asset type (e.g., Coin, ERC20) |
| destination_asset_id | integer | Asset ID |
| destination_asset_address | string | Asset address on the destination blockchain (empty if native) |
| destination_asset_name | string | Asset name |
| destination_asset_symbol | string | Asset symbol |
| destination_asset_decimals | integer | Asset decimals |
| destination_asset_type | string | Asset type (e.g., Coin, ERC-20) |
| source_amount | string | Amount sent on the source blockchain |
| destination_amount | string | Amount received on the destination blockchain |
| fee | string | Fee amount charged during the transfer |
| status | string | Status of the transfer (Deposit,Pending,Confirmed,Error) |
Example cURL
curl http://localhost:9699/v1/history
{
"page_id": "1",
"page_size": "1",
"total_page": "4",
"total_history": "3",
"list": [
{
"id": "3",
"pair_id": "1",
"source_slug": "abiot",
"source_network": "ABIoT",
"source_chain_id": "1012",
"source_base_chain": "NewChain",
"destination_slug": "abcore",
"destination_network": "ABCore",
"destination_chain_id": "36888",
"destination_base_chain": "Ethereum",
"source_deposit_address": "NEW17zVctFa42dC1rBNFPf775Bq34yiwWLz4GM1",
"source_sender": "NEW17zS9ZvgGV1EaT8KT2tLjqRvQbcApjFot8xj",
"destination_address": "0x7EdC0CaDD6c20811058D4FB3EDA6F9218cCC7332",
"source_block_number": "15368195",
"destination_block_number": "4579902",
"source_block_timestamp": "1746118154",
"destination_block_timestamp": "1746118194",
"source_tx_hash": "0x7abaedaaed2f2da1ebc9c0622e06a80725149db5adf1df363c92011644de0b0f",
"destination_tx_hash": "0xd4d5cea2d5ae6b89a70257cff068587938c367c6f5729a4929b974060ac3db1b",
"source_asset_id": "2",
"source_asset_address": "",
"source_asset_name": "AB",
"source_asset_symbol": "AB",
"source_asset_decimals": 18,
"source_asset_type": "Coin",
"destination_asset_id": "1",
"destination_asset_address": "",
"destination_asset_name": "AB",
"destination_asset_symbol": "AB",
"destination_asset_decimals": 18,
"destination_asset_type": "Coin",
"source_amount": "100",
"destination_amount": "88.45",
"fee": "11.55",
"status": "Confirmed"
}
],
"source_deposit_address": "",
"source_sender": "",
"source_blockchain": "",
"source_asset_id": "",
"destination_address": "",
"destination_blockchain": "",
"destination_asset_id": "",
"pairId": "",
"status": ""
}
GET /v1/ab (get supply of AB)
Parameters
None
Responses
name value desc chainsChainchain list
the Chain is as follow:
name value desc slugabcore,abiotslug of blockchain, get by /v1/networksnetworkABCore,ABIoTnetwork of blockchain chain_idstring, 1,1012ormain,testget from rpc, eth_chainIdbase_chainEthereum,NewChainBase chain statusOK,STUCK,OFFLINE,SYNCINGstatus of chain latest_heightnumber latest block number nameABthe name of AB in this chain symbolABthe symbol of AB in this chain decimals18the decimals of AB in this chain supplystring the amount of AB in unit AB
The totalSupply of AB is the sum of the supply from each chain.
Example cURL
curl http://localhost:9699/v1/ab
{
"chains": [
{
"slug": "abcore",
"network": "ABCore",
"chain_id": "36888",
"base_chain": "Ethereum",
"status": "OK",
"latest_height": "4648796",
"name": "AB",
"symbol": "AB",
"decimals": 18,
"supply": "80.05"
},
{
"slug": "abiot",
"network": "ABIoT",
"chain_id": "1012",
"base_chain": "NewChain",
"status": "OK",
"latest_height": "15391173",
"name": "AB",
"symbol": "AB",
"decimals": 18,
"supply": "99999999919.95"
}
]
}