Sui
Note: Supported version - Node v18+
/getbalance
Get the balance or number of the given token in the requested public address.
GET
https://api.expand.network/chain/getbalance
Query Parameters
https://api.expand.network/chain/getbalance/?address=0x01e1877687e9beadee82f63df4d936b53e96ec3d4c81d28f47074e4cd182bce4&chainId=101
{
"status": 200,
"msg": "success",
"data": {
"balance": "172120"
}
}
/getblock
Get details of a block.
GET
https://api.expand.network/chain/getblock
Query Parameters
https://api.expand.network/chain/getblock?blockNumber=4925305&chainId=101
{
"status": 200,
"msg": "success",
"data": {
"difficulty": null,
"gasLimit": null,
"gasUsed": {
"computationFee": "319667546316",
"storageFee": "1667423348400",
"storageRebate": "1188416311632",
"nonRefundableStorageFee": "12004205168"
},
"hash": "gZArqpuwddYeuxyK582fs5tTYeagBw6NBU1RD314hzC",
"miner": null,
"nonce": null,
"number": "4925305",
"parentHash": "8cFaKwc7s52Mt8csDbcqRizCTXGzRLFFkUf8cpw7pb2D",
"size": null,
"timestamp": "1686567354670",
"totalDifficulty": null,
"transactions": [
"8SoUvGSix7Ds3qnLRh2Pe2dGHPsnMWM6wv7j8g2XBBs8",
"8zEWsQkgTdFtqzeGu6aBUgDe6Hysqdfv7LEhDxt4so8p",
"C8j1ZR3immv3a6bGRUwFnEZ8SNd794nKFL4acLu4pg1C",
"CaYL9Vg57rHSwsgaHhT8WoXXDfftcozbtaKiJVgk7qA7",
"Fkm8avKi2qxeTS8aDKeohyn4DT1psoC8Et8jPEXQuxhS",
"GECi5Pe5MNgUzPSUcwDp1CcBxUiHiZegs4LPvRb21wTU",
"JAznEFvDf3Wm3C8uyPi1kNEBJcj88x4HgfyPATUUjEGz"
],
"transactionsRoot": null,
"uncles": null
}
}
/getgasprice
Get the current gas price from the network.
GET
https://api.expand.network/chain/getgasprice
Query Parameters
https://api.expand.network/chain/getgasprice?chainId=101
{
"status": 200,
"msg": "success",
"data": {
"gasPrice": 820
}
}
/getstorage
Get data stored in the given slot.
GET
https://api.expand.network/chain/getstorage
Query Parameters
https://api.expand.network/chain/getstorage?chainId=101&address=0x2c0c60250556852f3391645418c3a1939557ef3f86197bfd8d5f08e42bf8a562
{
"status": 200,
"msg": "success",
"data": {
"data": {
"data": {
"objectId": "0x2c0c60250556852f3391645418c3a1939557ef3f86197bfd8d5f08e42bf8a562",
"version": "5832321",
"digest": "4U8VJLHhmwcSLQKZ4E94i3LpVkfTEgqTs2JvJnaHjAWE",
"type": "0x2::coin::Coin<0x2::sui::SUI>",
"owner": {
"AddressOwner": "0x4e6c09c10308e273b01f9be9f4eebc4cd47408156dcf580036946ca17468efbd"
},
"previousTransaction": "BTA1oPx1mxoh8eE7abaZjn68661kmK5HR778Xh5wnDhV",
"content": {
"dataType": "moveObject",
"type": "0x2::coin::Coin<0x2::sui::SUI>",
"hasPublicTransfer": true,
"fields": {
"balance": "3247896304",
"id": {
"id": "0x2c0c60250556852f3391645418c3a1939557ef3f86197bfd8d5f08e42bf8a562"
}
}
}
}
}
}
}
/gettransaction
Get details of a transaction.
GET
https://api.expand.network/chain/gettransaction
Query Parameters
https://api.expand.network/chain/gettransaction?chainId=101&transactionHash=fcT9BaBGgRXHo2ngJAVAPACnYVUPtu1qAmUqLACNGZ2
{
"status": 200,
"msg": "success",
"data": {
"hash": "fcT9BaBGgRXHo2ngJAVAPACnYVUPtu1qAmUqLACNGZ2",
"transactionStatus": "success",
"blockNumber": "5851982",
"timestamp": "1687511099697",
"from": "0x3171f5feed9f73a6ce73764c8c713816c8ad02b3cd2c72bfb46421bee417f488",
"to": null,
"value": null,
"transactionFees": {
"computationFee": "820000",
"storageFee": "8048400",
"storageRebate": "6568452",
"nonRefundableStorageFee": "66348"
},
"gas": {
"payment": [
{
"objectId": "0xe68aa8790c973b9b56de6082570aa24a6b07827e11e8d7c76de36c8a55f7e1a2",
"version": 5752185,
"digest": "DUGMzaGpSsQHS5DvcZmCTFupJxRWEmjm1H3YcCyNRv4p"
}
],
"owner": "0x1d632d46ff70491033fefc4e6398dceaa4943dcf62512b4d57378b5ab703bc5e",
"price": "820",
"budget": "10000000"
},
"gasPrice": 820,
"input": [
{
"type": "object",
"objectType": "sharedObject",
"objectId": "0xa12497d95f761a3d7337e1f690c4dbbee5bc6fa52302a97d10249e856062aee5",
"initialSharedVersion": "4338970",
"mutable": true
}
],
"nonce": null,
"network": null
}
}
/sendtransaction
Send transaction on the chain.
POST
https://api.expand.network/chain/sendtransaction
Request Body
{
"chainId": "101",
"rawTransaction": "AAACAAjoAwAAAAAAAAAgjoLsljoRhNzWIhv109/7Y5u+3rE+m3cIAS6+9fY1CV0CAgABAQAAAQEDAAAAAAEBAHU9KMxqJHko4cO7vudRc1fUWhlgTsWqhC49Sd/RqeJ3AWLHsjiaUXCf24QTPngz4YscltY7WXx8EEvwMWY3bQi2EgAAAAAAAAAgAnvVen24ygZdxuPGTP5c0y9v4Q6gBEBrVZToO1VwKO91PSjMaiR5KOHDu77nUXNX1FoZYE7FqoQuPUnf0anid+gDAAAAAAAAEJAtAAAAAAAA",
"signature": "AIZ7D4E4VKOy2biUd2O7Wayjjj+voVX1fUtX7Hx5Ga/twHIZ1BbfMrMoPDLIWU774K0199NZXrFIw+aILTTj7Q5Dii+a4T1FLWxQvLizpwhD6VXBW4qPG0vYYOJ2O0GuhQ=="
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "101",
"transactionHash": "67yEnYvTfkNnKPtxrLfYomhWoi5cH7XCPbVQtjJ3UAW9"
}
}