randlabs / myalgo-connect-test

Using MyAlgo Connect in React (example)
https://test.myalgo.com
Apache License 2.0
5 stars 2 forks source link

ASSET CREATION DEMO #1

Open kcelestinomaria opened 3 years ago

kcelestinomaria commented 3 years ago

Hello @Alex99y @JCibeira Is it possible to create an algorand asset from scratch using myalgo-connect? I see it on the myalgo-connect README demo page but I don't see a demo of it in the myalgo-connect example you have given. Is it possible if you could add this piece as well? Thank you.

Alex99y commented 3 years ago

Hello @kcelestinomaria ! Of course, it is possible. Using the last version of MyAlgo Connect package (v1.1.0)

const algosdk = require("algosdk");
const MyAlgoConnect = require( "@randlabs/myalgo-connect");

const txn = algosdk.makeAssetCreateTxnWithSuggestedParamsFromObject({ ...assetCreateParams });

const myalgoWallet = new MyAlgoConnect();
const signedTx = await myalgoWallet.signTransaction(txn.toByte());