wish to create an account on a private stellar network. The network was created using this docker image https://github.com/stellar/docker-stellar-core-horizon, with the --standalone flag. When i attempt to create a network in the following way i recieve the error Network.current(...).networkId is not a function. The sdk is connected to the network and i am able to get the network information using
StellarSdk.Network.current()
stellarServer
.loadAccount(sourceKey.publicKey())
.then(sourceAccount => {
transaction = new StellarSdk.TransactionBuilder(sourceAccount)
.addOperation(
StellarSdk.Operation.createAccount({
destination: dest,
startingBalance: "100"
})
)
.build();
transaction.sign(sourceKey);
return stellarServer.submitTransaction(transaction);
})
.then(result => {
console.log("success" + JSON.stringify(result, undefined, 2));
})
.catch(error => {
console.log("error" + error);
});