slpjs-regtest
Version:
Simple Ledger Protocol (SLP) JavaScript Library
41 lines • 1.82 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SlpTokenType1 = void 0;
var slp_mdm_1 = require("slp-mdm");
var SlpTokenType1 = /** @class */ (function () {
function SlpTokenType1() {
}
Object.defineProperty(SlpTokenType1, "lokadIdHex", {
get: function () { return "534c5000"; },
enumerable: false,
configurable: true
});
SlpTokenType1.buildGenesisOpReturn = function (ticker, name, documentUrl, documentHashHex, decimals, batonVout, initialQuantity, type) {
if (type === void 0) { type = 0x01; }
if (decimals === null || decimals === undefined) {
throw Error("Decimals property must be in range 0 to 9");
}
if (ticker !== null && typeof ticker !== "string") {
throw Error("ticker must be a string");
}
if (name !== null && typeof name !== "string") {
throw Error("name must be a string");
}
var res = slp_mdm_1.TokenType1.genesis(ticker || "", name || "", documentUrl || "", documentHashHex || "", decimals || 0, batonVout, initialQuantity);
if (res.length > 223) {
throw Error("Script too long, must be less than or equal to 223 bytes.");
}
return res;
};
SlpTokenType1.buildSendOpReturn = function (tokenIdHex, outputQtyArray, type) {
if (type === void 0) { type = 0x01; }
return slp_mdm_1.TokenType1.send(tokenIdHex, outputQtyArray);
};
SlpTokenType1.buildMintOpReturn = function (tokenIdHex, batonVout, mintQuantity, type) {
if (type === void 0) { type = 0x01; }
return slp_mdm_1.TokenType1.mint(tokenIdHex, batonVout, mintQuantity);
};
return SlpTokenType1;
}());
exports.SlpTokenType1 = SlpTokenType1;
//# sourceMappingURL=slptokentype1.js.map