UNPKG

@okxweb3/coin-stellar

Version:

@ok/coin-stellar is a Stellar SDK for building Web3 wallets and applications. It supports Stellar and PI blockchains, enabling private key management, address generation, transaction signing, trustline creation, and asset transfers

21 lines 864 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.accountMerge = void 0; const xdr_1 = __importDefault(require("../xdr")); const decode_encode_muxed_account_1 = require("../util/decode_encode_muxed_account"); function accountMerge(opts) { const opAttributes = {}; try { opAttributes.body = xdr_1.default.OperationBody.accountMerge((0, decode_encode_muxed_account_1.decodeAddressToMuxedAccount)(opts.destination)); } catch (e) { throw new Error('destination is invalid'); } this.setSourceAccount(opAttributes, opts); return new xdr_1.default.Operation(opAttributes); } exports.accountMerge = accountMerge; //# sourceMappingURL=account_merge.js.map