particle_chains 1.2.4 copy "particle_chains: ^1.2.4" to clipboard
particle_chains: ^1.2.4 copied to clipboard

paritlce chains

example/particle_chains_example.dart

import 'package:particle_chains/particle_chains.dart';

void main() {
  print(ChainInfo.Ethereum); // Instance of 'ChainInfo'
  print(ChainInfo.Ethereum.runtimeType); // 'ChainInfo'
  print(ChainInfo.Ethereum.id); // 1
  print(ChainInfo.Ethereum.name); // 'Ethereum'
  print(ChainInfo.PlatON.id); // 210425

  print(ChainInfo.Ethereum.isEvmChain()); // true
  print(ChainInfo.SolanaTestnet.isEvmChain()); // false

  print(ChainInfo.Ethereum.isEIP1559Supported()); // true
  print(ChainInfo.BNBChain.isEIP1559Supported()); // false

  print(ChainInfo.Ethereum.isSupportWalletConnect()); // true
  print(ChainInfo.Tron.isSupportWalletConnect()); // false

  // print(ChainInfo.ParticleChains);
  // print(ChainInfo.getAllChains());

  print(ChainInfo.getChain(1, 'Ethereum')); // Instance of 'ChainInfo'

  print(ChainInfo.getEvmChain(1)); // Instance of 'ChainInfo'
  print(ChainInfo.getEvmChain(102)); // null
  print(ChainInfo.getEvmChain(1234567)); // null

  print(ChainInfo.getSolanaChain(1)); // null
  print(ChainInfo.getSolanaChain(102)); // Instance of 'ChainInfo'
  print(ChainInfo.getSolanaChain(1234567)); // null

  // https://rpc.particle.network/evm-chain?chainId=123&projectUuid=aaa&projectKey=bbb
  print(ChainInfo.getParticleNode(123, 'aaa', 'bbb'));
}