URLBuilder.blockchain constructor

URLBuilder.blockchain(
  1. String apiKey,
  2. SupportedBlockchain chain,
  3. String rpcUrl,
  4. MagicLocale locale,
)

Implementation

URLBuilder.blockchain(
    this.apiKey, SupportedBlockchain chain, String rpcUrl, this.locale) {
  String key;

  /// Compatible blockchain name mapping
  switch (chain) {
    case SupportedBlockchain.tezos:
      key = 'taquito';
      break;
    default:
      key = chain.toString().split('.').last;
  }

  _ext = {
    key: {"rpcUrl": rpcUrl}
  };
}