I've added a new chain with Lighnet graphql url to the Auro Wallet.
Then I use this script to send some funds to my Auro Wallet
import { AccountUpdate, Lightnet, Mina, PublicKey, UInt64 } from 'o1js';
// Network configuration
const network = Mina.Network({
mina: 'http://127.0.0.1:8080/graphql',
archive: 'http://127.0.0.1:8282',
lightnetAccountManager: 'http://127.0.0.1:8181',
});
Mina.setActiveInstance(network);
// Fee payer setup
const senderPrivateKey = (await Lightnet.acquireKeyPair()).privateKey;
const senderPublicKey = senderPrivateKey.toPublicKey();
// Release previously acquired key pair
const keyPairReleaseMessage = await Lightnet.releaseKeyPair({
publicKey: senderPublicKey.toBase58(),
});
if (keyPairReleaseMessage) console.log(keyPairReleaseMessage);
const senderUpdate = AccountUpdate.createSigned(senderPublicKey);
const tx = await Mina.transaction(
{
sender: senderPublicKey,
fee: 100000000,
},
async () => {
senderUpdate.send({
to: PublicKey.fromBase58(
MY_PUBLIC_ADDRESS
),
amount: 1000000000000000000,
});
}
);
await tx.prove();
await tx.sign([senderPrivateKey]);
let pendingTx = await tx.send();
console.log(`Got pending transaction with hash ${pendingTx.hash}`);
// wait until transaction is included in a block
await pendingTx.wait();
console.log(
`Transaction included in block!`
);
However, the balance in my Auro Wallet still zero for the Lightnet. Is something wrong?