getChainIdsFromNamespaces static method

List<String> getChainIdsFromNamespaces({
  1. required Map<String, Namespace> namespaces,
})

Gets the chainIds from the namespace.

Implementation

static List<String> getChainIdsFromNamespaces({
  required Map<String, Namespace> namespaces,
}) {
  Set<String> chainIds = {};

  namespaces.forEach((String ns, Namespace namespace) {
    chainIds.addAll(
      getChainIdsFromNamespace(
        nsOrChainId: ns,
        namespace: namespace,
      ),
    );
  });

  return chainIds.toList();
}