UNPKG

@radixdlt/atom-transaction-mapping

Version:
15 lines 888 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.collectUpParticles = exports.transferrableTokensParticleFromOther = void 0; const atom_1 = require("@radixdlt/atom"); const transferrableTokensParticleFromOther = (address, amount, from) => atom_1.TransferrableTokensParticle.create(Object.assign(Object.assign({}, from), { permissions: from.permissions.permissions, amount, address, nonce: undefined })); exports.transferrableTokensParticleFromOther = transferrableTokensParticleFromOther; const collectUpParticles = (input) => { return atom_1.spunParticles(input.upParticles) .transferrableTokensParticles(atom_1.Spin.UP) .filter((sp) => sp.particle.address.equals(input.addressOfActiveAccount)) .map((sp) => atom_1.asUpParticle(sp)); }; exports.collectUpParticles = collectUpParticles; //# sourceMappingURL=utils.js.map