Hello, I have used the web SDK with the Polkadot chain, but in the Flutter documentation I only see the Ethereum and Solana options, and no options for other chains. Can the Flutter SDK be used with other chains as long as they use ED25519
or SECP256K1
curves for account generation?
@boo_0x Welcome Aboard!
The Flutter SDK supports all blockchains following the secp256k1
& ed25519
curves . Please follow our reference for Ethereum, and similarly use corresponding blockchain libraries that support the platforms to use the private key and make blockchain calls accordingly.
For Polkadot, we will use the libraries @polkadot/keyring
and @polkadot/util-crypto
to create the Polkadot address.
// Polkadot
import { Keyring } from "@polkadot/api";
import { cryptoWaitReady } from "@polkadot/util-crypto";
/*
Use code from the above Initializing Provider here
*/
const keyring = new Keyring({ ss58Format: 42, type: "sr25519" });
const privateKey = provider.request({ method: "eth_private_key" });
const keyPair = keyring.addFromUri("0x" + privateKey);
const address = keyPair.address;
For multi-chain support, you can refer to this documentation:
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.