Using the Public Mint blockchain
Transactions in the Public Mint blockchain are quite similar to Ethereum, with one key difference: for now the USD token is the same as native blockchain token.
Read on to learn your way around the basics.
After that, it's simple:
const web3 = new PublicMint(2019) // test network
} = web3.pm
// Add first account
const walletAccountPrivateKey1 = "0xba6cdfcc795484a9774eb98e756983da822ef3481b37d4ba649864e2d1ab4e5e";
And that's it - keep them safe and don't show anyone. Please DO NOT send funds into the addresses above as they are published on the internet, taken from the web3.js documentation.
Let's use PublicMint-web3.js to get the balance of a Public Mint address.
const myBalance = await web3.pm.wallet.accounts.getBalance("address in wallet");
Here is what you need to do to send funds to another Public Mint address.
Follow the steps above to get a wallet and check your balance. Here's the code snippet to transfer tokens:
toToken// Convert 'USD'/'ETHER' into small blockchain unit 'wei'
} = web3.pm.utils
const transferReceipt = await web3.pm.wallet.accounts.transfer(<destinyAccount>, toToken(10))