Supported Ethereum Chains
Etherspot's supported EVM chains and how to use them.
Etherspot supports the following EVM-compatible chains: Ethereum Mainnet, Polygon (formerly Matic), xDai, Binance Smart Chain and Fantom.
Etherspot is designed to support any EVM-based blockchain. Feel free to contact us to discuss other EVM-based blockchains.

Instantiating on all available chains

Use the same private key or authentication method when instantiating an instance of the Etherspot SDK to generate the same Ethereum address across all chains
πŸ’ͺ
Here we show you a basic example of how you could go about instantiating all the networks we support and make them available via a class. Feel free to copy and paste this code, and modify it how you wish.
1
import {
2
Sdk as EtherspotSdk,
3
NetworkNames,
4
} from 'etherspot';
5
​
6
class EtherspotService {
7
instances: { [network: string]: EtherspotSdk } = {};
8
9
init(privateKey: string): void {
10
/**
11
* You can use this space to do anything else
12
* you're application may require to run.
13
*/
14
15
// Mainnet
16
this.instances[NetworkNames.Mainnet] =
17
new EtherspotSdk(privateKey, { networkName: NetworkNames.Mainnet });
18
19
// xDai
20
this.instances[NetworkNames.Xdai] =
21
new EtherspotSdk(privateKey, { networkName: NetworkNames.Xdai });
22
23
// Binance Smart Chain
24
this.instances[NetworkNames.Bsc] =
25
new EtherspotSdk(privateKey, { networkName: NetworkNames.Bsc });
26
27
// Polygon, formerly known as Matic
28
this.instances[NetworkNames.Matic] =
29
new EtherspotSdk(privateKey, { networkName: NetworkNames.Matic });
30
31
// Fantom
32
this.instances[NetworkNames.Fantom] =
33
new EtherspotSdk(privateKey, { networkName: NetworkNames.Fantom });
34
}
35
}
Copied!

Instantiating on a single chain

Below is a basic example of how you would instantiate an instance on the Etherspot SDK on a single chain.
Mainnet
Polygon
xDai
Binance
Fantom
1
import { Sdk, NetworkNames, randomPrivateKey } from 'etherspot';
2
​
3
const privateKey = randomPrivateKey();
4
let sdk: Sdk
5
​
6
/**
7
* Replace `privateKey` with your own private key
8
* or Etherspot Authentication method.
9
*/
10
sdk = new Sdk({
11
privateKey,
12
}, {
13
networkName: 'mainnet' as NetworkNames,
14
});
15
​
16
console.info('SDK created');
Copied!
1
import { Sdk, NetworkNames, randomPrivateKey } from 'etherspot';
2
​
3
const privateKey = randomPrivateKey();
4
let sdk: Sdk
5
​
6
/**
7
* Replace `privateKey` with your own private key
8
* or Etherspot Authentication method.
9
*/
10
sdk = new Sdk({
11
privateKey,
12
}, {
13
networkName: 'matic' as NetworkNames,
14
});
15
​
16
console.info('SDK created');
Copied!
1
import { Sdk, NetworkNames, randomPrivateKey } from 'etherspot';
2
​
3
const privateKey = randomPrivateKey();
4
let sdk: Sdk
5
​
6
/**
7
* Replace `privateKey` with your own private key
8
* or Etherspot Authentication method.
9
*/
10
sdk = new Sdk({
11
privateKey,
12
}, {
13
networkName: 'xdai' as NetworkNames,
14
});
15
​
16
console.info('SDK created');
Copied!
1
import { Sdk, NetworkNames, randomPrivateKey } from 'etherspot';
2
​
3
const privateKey = randomPrivateKey();
4
let sdk: Sdk
5
​
6
/**
7
* Replace `privateKey` with your own private key
8
* or Etherspot Authentication method.
9
*/
10
sdk = new Sdk({
11
privateKey,
12
}, {
13
networkName: 'bsc' as NetworkNames,
14
});
15
​
16
console.info('SDK created');
Copied!
1
import { Sdk, NetworkNames, randomPrivateKey } from 'etherspot';
2
​
3
const privateKey = randomPrivateKey();
4
let sdk: Sdk
5
​
6
/**
7
* Replace `privateKey` with your own private key
8
* or Etherspot Authentication method.
9
*/
10
sdk = new Sdk({
11
privateKey,
12
}, {
13
networkName: 'fantom' as NetworkNames,
14
});
15
​
16
console.info('SDK created');
Copied!
Last modified 4mo ago