update js lib, add stake nft

This commit is contained in:
CounterFire2023 2023-08-23 14:12:11 +08:00
parent 1cd508af00
commit 039b7da4f0
2 changed files with 27 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -569,6 +569,27 @@ function beginGoogleBuy(funId, productId, orderId) {
}
// end of in-app pay
// begin of staking
function stakeNfts(funId, nfts, tokenIds, staketimes, gas, estimate) {
nfts = JSON.parse(nfts);
tokenIds = JSON.parse(tokenIds);
staketimes = JSON.parse(staketimes);
promiseCb(funId, jc.wallet.jcStandard.stakeNfts({ nfts, tokenIds, staketimes, gas, estimate }), (v) =>
JSON.stringify(v)
);
}
function redeemNfts(funId, nfts, tokenIds, gas, estimate) {
nfts = JSON.parse(nfts);
tokenIds = JSON.parse(tokenIds);
promiseCb(funId, jc.wallet.jcStandard.redeemNfts({ nfts, tokenIds, gas, estimate }), (v) => JSON.stringify(v));
}
function nftStakeInfo(funId, nft, tokenId) {
promiseCb(funId, jc.wallet.jcStandard.nftStakeInfo({ nft, tokenId }));
}
// end of staking
function deleteAccount(funId) {
promiseCb(funId, jc.wallet.deleteAccount());
}