- create folder,
vending_machine
, open VSCode - go to https://meshjs.dev/guides/nextjs, setup project and install Mesh
- go to https://meshjs.dev/react/ui-components
- add CardanoWallet component
- go to https://meshjs.dev/apis/browserwallet
- add button and get wallet address,
await wallet.getChangeAddress()
- create
create-mining-transaction.ts
file underpages/api
- get new wallet from https://meshjs.dev/apis/appwallet or your own wallet
- create koios provider instance
- initialize AppWallet
- go to https://meshjs.dev/guides/multisig-minting
- create ForgeScript
- create AssetMetadata
- create Transaction
- sign the Transaction
- install axios
- create
backend
folder and index.ts file - create
post()
function - create
createTransaction()
function - add
await wallet.getUtxos();
- add
await createTransaction(recipientAddress, utxos);
- add
await wallet.signTx(unsignedTx, true);
- add
await wallet.submitTx(signedTx);
- add
koiosProvider.onTxConfirmed
- add simple UI look and feel
- sign in Vercel
- create new project and link it