Open Imdavyking opened 2 years ago
also i want to use a default address for all transaction both receive and change
My apologies. I've had limited time to work on this recently. I did manage to update the blockfrost API (a prerequisite for future work). Currently wallet balances are working, but transaction submittal is not.
As for your specific question. To obtain the default address, just call unusedReceiveAddresses() without arguments and grab the first address in the list:
test('Get the default (first) address from wallet', () {
final wallet = (WalletBuilder()
..network = Networks.testnet
..testnetAdapterKey = blockfrostKey
..mnemonic = mnemonic)
.build()
.unwrap();
final ShelleyReceiveKit addr0 =
wallet.account.unusedReceiveAddresses()[0];
logger.info("${addr0.chain}: ${addr0.address}");
//m/1852'/1815'/0'/0/0: addr_test1qputeu63ld6c0cd526w90ry2r9upc5ac8y3zetcg85xs5l924fm4c4hnud6cw53zj8v48kdwmeykn0knf74ag68tmf9sutu8kq
});
Good morning please how do i use prepod as testnet with the api.