jmemo.min.js
<script src="jmemo.min.js"></script>
var mnemonic = jmemo.Wallet.GenerateMnemonic();
var child = jmemo.Wallet.GetHDChild(mnemonic, jmemo.Wallet.Path.MainAddressPath());
var address = jmemo.Wallet.GetAddress(child.publicKey).address;
var key;
jmemo.Client.Api.Key.New(function(response) {
key = response;
});
var fundAddress;
jmemo.Client.Basic.BalanceWithToken(address, key.token, key.secret, function(response) {
fundAddress = response.api_address;
});
var unsignedTx;
jmemo.Client.Create.Post(key.token, key.secret, address, "Example", function(tx) {
unsignedTx = tx;
});
var signedTx = jmemo.Wallet.Sign.SignTx(unsignedTx.raw, child);
jmemo.Client.Tx.Broadcast(signedTx.raw);
location.href = "https://memo.cash/explore/tx/" + signedTx.hash;
jmemo.Client.SetHost("https://v1.api.memo.sv");