@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 • 999 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.clawbackClaimableBalance = void 0;
const xdr_1 = __importDefault(require("../xdr"));
const claim_claimable_balance_1 = require("./claim_claimable_balance");
function clawbackClaimableBalance(opts = {}) {
(0, claim_claimable_balance_1.validateClaimableBalanceId)(opts.balanceId);
const attributes = {
balanceId: xdr_1.default.ClaimableBalanceId.fromXDR(opts.balanceId, 'hex')
};
const opAttributes = {
body: xdr_1.default.OperationBody.clawbackClaimableBalance(new xdr_1.default.ClawbackClaimableBalanceOp(attributes))
};
this.setSourceAccount(opAttributes, opts);
return new xdr_1.default.Operation(opAttributes);
}
exports.clawbackClaimableBalance = clawbackClaimableBalance;
//# sourceMappingURL=clawback_claimable_balance.js.map