⚡Blockchains

We support all major public blockchains

expand.network provides connectivity to various EVM and Non-EVM based chains for both, query(Read) and transaction(Write). So now, the developer does not need to worry about how different blockchains work. The developer will be required to know only the chainID to perform multiple operations on different chains.

For example, if a developer wants to send two transactions, one on the Ethereum mainnet and another on Solana, then they just need to call the sendtransaction API with different chain IDs in the request body.

Following are the common APIs implemented for all the various chains:-

NameTypeDescription

getbalance

Read

Get the balance or number of the given token in the requested public address.

getblock

Read

Get details of a block.

getgasprice

Read

Get the current gas price from the network.

getstorage

Read

Get data stored in the given slot.

gettransaction

Read

Get details of a transaction.

Read

Get the RPC of required chain.

getgasfees

Read

Retrieves gas fee spent in a particular range.

getusertransactions

Read

Get the historical transaction details for a specific user address. Available on Ethereum, Binance Smart Chain, Avalanche - P/C/X, Polygon, Fantom, Stellar and TON.

gethistoricalrewards

Read

Get the historical transaction details focusing on staking rewards for a specific user address. Available on Avax-P.

getevents

Read

Get a filtered list of events emitted by a given ledger range, within a maximum 24 hours of recent ledgers. Currently available on Stellar.

getlatestledger

Read

Get details for the current latest known ledger of the node. Currently available on Stellar.

portfolio

Read

Get detailed information about the verified assets or tokens currently associated with a user's wallet address. Available on Ethereum as well as Arbitrum, Avalanche, Base, Binance Smart Chain, Cronos, Fantom, Near, Optimism, Polygon, Stellar and Solana.

getflashbotblocks

Read

Get details of the flashbot blocks.

getflashbottransactions

Read

Get details of the flashbot transactions.

getflashbotbundle

Read

Get details of the specified flashbot bundle.

gettokenmarketdata

Read

Get the market data for a given asset on the Ethereum chain.

gettokenmapping

Read

Get the top 40 popular tokens on the EVM chains

getapprovaldata

Read

Retrieves approval-related information for a specified address, including token details, amount approved, spender, risk factor, value at risk, and timestamp. Currently supported for Ethereum chain.

createfeetransaction

Write

Creates a fee transaction for any prepared transaction going through Expand

estimategas

Write

Generates and returns an estimate of how much gas would be necessary to complete a transaction.

settrustline

Write

Implement a trustline between issuer and distributor. Currently available on Stellar.

rwa/issue

Write

Executes a payment operation to create (or mint) an asset on the Stellar network.

rwa/freeze

Write

Executes a transaction to revoke an existing trustline’s authorization, thereby freezing the asset held by an account on the Stellar network.

rwa/burn

Write

Executes a transaction to burn or delete an asset on the Stellar network.

rwa/transfer

Write

Trigger a payment operation to send an amount in a specific asset (XLM or non-XLM) to a destination account on the Stellar network.

sendtransaction

Write

Sign and send transactions on the chain.

createaccount

write

Initiates a transaction to fund a newly created account using the public key as the account ID.

simulatetransaction

write

Submit a trial contract invocation to simulate how it would be executed by the network. This endpoint calculates the effective transaction data, required authorizations, and minimal resource fee. It provides a way to test and analyze the potential outcomes of a transaction without actually submitting it to the Stellar network.

genericsmartcontractmethod

Write

Calls read functions of verified smart contracts. Available on ethereum.

decodetransaction

Write

Get the decoded transaction for the provided raw transaction. Available on ethereum, binance, avalanche, polygon, cronos, arbitrum, fantom, optimism, solana, stellar and near.

Every chain requires a different set of parameters to perform the common operations. Please refer to the sub-sections for details.

To perform sendtransaction() successfully, the user needs to sign the transaction first.

For more details, click here.

If the user wants to pass the RPC manually, the user can either use their own RPC or use our provided RPC, by using /getpublicrpc endpoint.

/getpublicrpc

Get the RPC of required chain.

GET https://api.expand.network/chain/getpublicrpc

Query Parameters

NameTypeDescription

chainId*

String

Refer to the Chain ID page for details.

https://api.expand.network/chain/getpublicrpc?chainId=1000

/estimategas

Generates and returns an estimate of how much gas would be necessary to complete a transaction. This is currently available for EVM chains

POST https://api.expand.network/chain/estimategas

Request Body

NameTypeDescription

chainId

String

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

data*

String

Encoded function call data.

from*

String

Address of the sender of the token.

to*

String

Address of the recipient of the token.

value

String

Amount being sent with the transaction.

rpc

String

Remote procedural call URL.

{
  "chainId": "1",
  "data": "0xb6f9de9500000000000000000000000000000000000000000000000000027504c2d159000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000b999e0cb5f5e075b11239093e82703dbf0e561d60000000000000000000000000000000000000000000000000000018ef59ee21e0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000c3705517b4002ecd90185e07a9fcdfe8e93e9248",
  "from": "0x56Eddb7aa87536c09CCc2793473599fD21A8b17F",
  "to": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
  "value": "160000000000000000"
}

/gettokenmapping

GET https://api.expand.network/chain/gettokenmapping

Query Parameters

NameTypeDescription

rpc

string

Remote procedural call URL.

chainId*

String

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

https://api.expand.network/chain/gettokenmapping?chainId=1

/createfeetransaction

The endpoint generates a fee transaction for any prepared transaction through Expand. For a transaction with a value, the fee is calculated as 5 basis points of the transaction value.

POST https://api.expand.network/chain/createfeetransaction

Request Body

NameTypeDescription

rpc

string

Remote procedural call URL.

chainId*

String

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

from*

String

Address of the sender

to*

String

Address of the recipient

gas*

String

Maximum gas limit provided by the sender, for the transaction.

value*

String

Amount being sent with the transaction.

data

String

Encoded function call data.

gasPrice

String

The price per unit of gas

{
        "chainId": "1",
        "from": "0xDdE53141420C90550e87dF0349D79B3a6161f6F6",
        "to": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
        "value": "0",
        "gas": "173376",
        "data": "0x095ea7b3000000000000000000000000dde53141420c90550e87df0349d79b3a6161f6f600000000000000000000000000000000000000000000000000038d7ea4c68000"
}

Following is a sequence diagram for sendTransaction() process in chains:-

Last updated