constapi=awaitApiPromise.create();// Construct the keyring after the API (crypto has an async init)constkeyring=newKeyring({ type:'sr25519' });// Replace //Alice with your mnemonic phraseconstkeypair=keyring.addFromUri('//Alice');constsubnetId=1;conststakeToBeAdded=100;constextrinsic=api.tx.network.addToDelegateStake( subnetId, stakeToBeAdded );consthash=awaitextrinsic.signAndSend(keypair);