Is there any other way to get account?

Like in the aptos,

 const pvtKey = new Ed25519PrivateKey(privateKey);

    const aptosAccount = await aptos.deriveAccountFromPrivateKey({
      privateKey: pvtKey,
    });

Is there any similar way to do that in fuel?

Hi, @shivamlync is this what you are looking for ?

Fuel TS SDK | Fuel Docs

// #import { Provider, Wallet, FUEL_BETA_5_NETWORK_URL };
 
// Create a provider, with the Latest Testnet URL.
const provider = await Provider.create(FUEL_BETA_5_NETWORK_URL);
 
// Create our wallet (with a private key).
const PRIVATE_KEY = 'a1447cd75accc6b71a976fd3401a1f6ce318d27ba660b0315ee6ac347bf39568';
const wallet = Wallet.fromPrivateKey(PRIVATE_KEY, provider);
 
// Perform a balance check.
const balances = await wallet.getBalances();
// [{ assetId: '0x..', amount: bn(..) }, ..]

You might want to try out this featured guide Intro to Sway | Fuel Docs

1 Like

Hey @shivamlync just adding to what @crypt0mate has said you can also do that with the Rust SDK like so:

1 Like