UNPKG

aftermath-ts-sdk

Version:
31 lines (30 loc) 1.04 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FaucetApiCasting = void 0; class FaucetApiCasting { } exports.FaucetApiCasting = FaucetApiCasting; // ========================================================================= // Events // ========================================================================= FaucetApiCasting.faucetMintCoinEventFromOnChain = (eventOnChain) => { const fields = eventOnChain.parsedJson; return { minter: fields.user, coinMinted: fields.type, balanceMinted: BigInt(fields.amount), timestamp: eventOnChain.timestampMs, txnDigest: eventOnChain.id.txDigest, type: eventOnChain.type, }; }; FaucetApiCasting.faucetAddCoinEventFromOnChain = (eventOnChain) => { const fields = eventOnChain.parsedJson; return { coinSymbol: fields.symbol, coinType: fields.type, timestamp: eventOnChain.timestampMs, txnDigest: eventOnChain.id.txDigest, type: eventOnChain.type, }; };