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:-

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

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

/getapprovaldata

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

Query Parameter

https://api.expand.network/chain/getapprovaldata?address=0xDdE53141420C90550e87dF0349D79B3a6161f6F6

/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

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

/createfeetransaction

This endpoint lets users collect fees on transactions via the Expand API or plug-in. By default, it deducts 5 basis points from the transaction value, but the fee can be customized.

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

Request Body

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

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

Last updated