Anonymous Wallet
Using quras-js
, you can get balance and history. Then let's see this example.
import * as Quras from 'quras-js'
myAnonymousAccount.getBalance(Quras.CONST.QURAS_NETWORK.DEV)
.then((res) => {
console.log(res);
});
myAnonymousAccount.getTransactionHistory(Quras.CONST.QURAS_NETWORK.DEV)
.then((res) => {
console.log(res);
});
Using quras-js
, you can make a private transaction from anonymous wallet. Both A->T, A->A are possible. Then let's see this example.
import * as Quras from 'quras-js'
myAnonymousAccount.sendPrivateTx(Quras.CONST.QURAS_NETWORK.DEV, "JUpbSEpXFoG9Xz7mcSqipeWZPuZR8XdC224bEJZvBYdnTApKCPpH8TLjMNCtUxGpbU8daAu4tMpxYWMAooccWRPpiv74Qs", Quras.CONST.ASSET_ID.XQG, 200)
.then((res) => {
console.log(res);
});
Stealth Wallet
Using quras-js
, you can get balance and history. Then let's see this example.
import * as Quras from 'quras-js'
myStealthAccount.getBalance(Quras.CONST.QURAS_NETWORK.DEV)
.then((res) => {
console.log(res);
});
myStealthAccount.getTransactionHistory(Quras.CONST.QURAS_NETWORK.DEV)
.then((res) => {
console.log(res);
});
Using quras-js
, you can make a private transaction from stealth wallet. Both S->T, S->S are possible. Then let's see this example.
import * as Quras from 'quras-js'
myStealthAccount.sendPrivateTx(Quras.CONST.QURAS_NETWORK.DEV, "DoipjQ6D9FQnAvZF6nE7ce9UTws6geAhvh", Quras.CONST.ASSET_ID.XQG, 100)
.then((res) => {
console.log(res);
});
Making a transaction from transparent wallet to private wallet
Using quras-js
, you can generate a transaction which is from transparent wallet to anonymous or stealth wallet. Then let's see this example.
import * as Quras from 'quras-js'
var testAccount = new Quras.wallet.Account('7d7c8957f6a289b227614b1172572650eb35ac4b8d454856809c4f8210683d47');
testAccount.sendPrivateTx(Quras.CONST.QURAS_NETWORK.DEV, "JMcHgnTJMGE3YeP7yPTL5GLXYJMJ5gkXWaqRKrU2E2y61J5pPHebooBqUoJAedJgmDPRCUuxWYhrTCjdPSmV7KoGKk3D7r", Quras.CONST.ASSET_ID.XQC, 1)
.then((res) => {
console.log(res);
})
.catch((error) => {
console.log(error);
});