@iota/iota-names-sdk
Version:
IOTA-Names SDK
70 lines (69 loc) • 2.44 kB
JavaScript
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var bcs_exports = {};
__export(bcs_exports, {
CouponBcs: () => CouponBcs,
CouponHouseBcs: () => CouponHouseBcs,
DummyFieldBcs: () => DummyFieldBcs,
NameBcs: () => NameBcs
});
module.exports = __toCommonJS(bcs_exports);
var import_bcs = require("@iota/iota-sdk/bcs");
const DummyFieldBcs = import_bcs.bcs.struct("DummyFieldObj", {
dummy_field: import_bcs.bcs.bool()
});
const NameBcs = import_bcs.bcs.struct("Name", {
labels: import_bcs.bcs.vector(import_bcs.bcs.string())
});
const RangeBcs = import_bcs.bcs.struct("Range", {
from: import_bcs.bcs.u8(),
to: import_bcs.bcs.u8()
});
const CouponRulesBcs = import_bcs.bcs.struct("CouponRules", {
length: import_bcs.bcs.option(RangeBcs),
available_claims: import_bcs.bcs.option(import_bcs.bcs.u64()),
user: import_bcs.bcs.option(import_bcs.bcs.Address),
expiration: import_bcs.bcs.option(import_bcs.bcs.u64()),
years: import_bcs.bcs.option(RangeBcs),
can_stack: import_bcs.bcs.bool()
});
const CouponHouseBcs = import_bcs.bcs.struct("CouponHouse", {
coupons: import_bcs.bcs.struct("Coupons", {
coupons: import_bcs.bcs.struct("Table", {
id: import_bcs.bcs.struct("UID", {
id: import_bcs.bcs.struct("ID", {
bytes: import_bcs.bcs.Address
})
}),
size: import_bcs.bcs.u64()
})
}),
version: import_bcs.bcs.u8(),
id: import_bcs.bcs.struct("UID", {
id: import_bcs.bcs.struct("ID", {
bytes: import_bcs.bcs.Address
})
})
});
const CouponBcs = import_bcs.bcs.struct("Coupon", {
kind: import_bcs.bcs.u8(),
amount: import_bcs.bcs.u64(),
rules: CouponRulesBcs
});
//# sourceMappingURL=bcs.js.map