Goodmorning everyone,
I am developing an Algorand Wallet on a Flutter mobile application in dart.
Right now I’m trying to connect to the kmd service of a node in order to get more addresses for a wallet from the same seedphrease.
The node has started and kmd also but when I try to use the algorithm library method.kmd I get an error like:
DioError [DioErrorType.other]: SocketException: OS Error: Connection refused, errno = 111, address = 127.0.0.1, port = 44824
# 0
below I attach the code that reports this error every time the algorithm.kmd.createWallet () method is presented :
Future<String> createNewAddress() async {
final walletRequest = (CreateWalletRequestBuilder()
..walletName = 'wallet'
..walletPassword = 'test'
..walletDriverName = '')
.build();
final handleTokenRequest = (InitWalletHandleTokenRequestBuilder()
..walletId = 'wallet'
..walletPassword = 'test')
.build();
final keyRequest = (GenerateKeyRequestBuilder()
..displayMnemonic = true
..walletHandleToken = 'aa')
.build();
final response = await algorand.kmd.createWallet(createWalletRequest: walletRequest);
final handleToken = await algorand.kmd.initWalletHandleToken(initializeWalletHandleTokenRequest: handleTokenRequest);
final address = await algorand.kmd.generateKey(generateKeyRequest: keyRequest);
return address.toString();
}
would anyone know how to help me and explain why and how to fix this error? thanks a lot !
