@typus/typus-perp-sdk 1.0.51 → 1.0.52-upgrade
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/_dependencies/source/0x2/bag/structs.d.ts +61 -0
- package/dist/src/_dependencies/source/0x2/bag/structs.js +229 -0
- package/dist/src/_dependencies/source/0x2/balance/structs.d.ts +88 -0
- package/dist/src/_dependencies/source/0x2/balance/structs.js +386 -0
- package/dist/src/_dependencies/source/0x2/coin/structs.d.ts +460 -0
- package/dist/src/_dependencies/source/0x2/coin/structs.js +1247 -0
- package/dist/src/_dependencies/source/0x2/linked-table/structs.d.ts +153 -0
- package/dist/src/_dependencies/source/0x2/linked-table/structs.js +438 -0
- package/dist/src/_dependencies/source/0x2/sui/structs.d.ts +46 -0
- package/dist/src/_dependencies/source/0x2/sui/structs.js +222 -0
- package/dist/src/_dependencies/source/0x2/table/structs.d.ts +61 -0
- package/dist/src/_dependencies/source/0x2/table/structs.js +248 -0
- package/dist/src/_dependencies/source/0x2/table-vec/structs.d.ts +68 -0
- package/dist/src/_dependencies/source/0x2/table-vec/structs.js +274 -0
- package/dist/src/_dependencies/source/0x2/token/structs.d.ts +449 -0
- package/dist/src/_dependencies/source/0x2/token/structs.js +1095 -0
- package/dist/src/_dependencies/source/0x2/transfer-policy/structs.d.ts +370 -0
- package/dist/src/_dependencies/source/0x2/transfer-policy/structs.js +1091 -0
- package/dist/src/_dependencies/source/0x2/url/structs.d.ts +53 -0
- package/dist/src/_dependencies/source/0x2/url/structs.js +223 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/airdrop/structs.d.ts +489 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/airdrop/structs.js +1084 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/big-vector/structs.d.ts +147 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/big-vector/structs.js +456 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/critbit/structs.d.ts +239 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/critbit/structs.js +653 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/ecosystem/structs.d.ts +405 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/ecosystem/structs.js +899 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/index.d.ts +8 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/index.js +11 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/init.d.ts +2 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/init.js +102 -0
- package/dist/src/_dependencies/source/{0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277 → 0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a}/keyed-big-vector/structs.d.ts +70 -70
- package/dist/src/_dependencies/source/{0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277 → 0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a}/keyed-big-vector/structs.js +174 -174
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/leaderboard/structs.d.ts +699 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/leaderboard/structs.js +1459 -0
- package/dist/src/_dependencies/source/{0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277 → 0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a}/linked-object-table/structs.d.ts +62 -62
- package/dist/src/_dependencies/source/{0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277 → 0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a}/linked-object-table/structs.js +170 -170
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-set/structs.d.ts +147 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-set/structs.js +430 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tails-staking/structs.d.ts +1071 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tails-staking/structs.js +2261 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tgld/structs.d.ts +279 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tgld/structs.js +733 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/user/structs.d.ts +328 -0
- package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/user/structs.js +892 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/authority/structs.d.ts +88 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/authority/structs.js +263 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/balance-pool/structs.d.ts +347 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/balance-pool/structs.js +591 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/big-vector/structs.d.ts +73 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/big-vector/structs.js +258 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/dutch/structs.d.ts +876 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/dutch/structs.js +1721 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/i64/structs.d.ts +46 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/i64/structs.js +222 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/index.d.ts +3 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/index.js +6 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/init.d.ts +2 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/init.js +89 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/linked-list/structs.d.ts +155 -0
- package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/linked-list/structs.js +444 -0
- package/dist/src/_dependencies/source/{0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded → 0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274}/vault/structs.d.ts +84 -84
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/discount-mint/structs.d.ts +446 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/discount-mint/structs.js +844 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/index.d.ts +6 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/index.js +9 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/init.d.ts +2 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/init.js +69 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/royalty-rule/structs.d.ts +94 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/royalty-rule/structs.js +376 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/staking/structs.d.ts +454 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/staking/structs.js +881 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/table-vec/structs.d.ts +68 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/table-vec/structs.js +274 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/typus-nft/structs.d.ts +1117 -0
- package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/typus-nft/structs.js +2387 -0
- package/dist/src/api/sentio.js +4 -1
- package/dist/src/fetch.d.ts +1 -1
- package/dist/src/fetch.js +1 -1
- package/dist/src/index.js +17 -17
- package/dist/src/typus_perp/admin/structs.d.ts +67 -5
- package/dist/src/typus_perp/admin/structs.js +155 -1
- package/dist/src/typus_perp/escrow/functions.js +1 -1
- package/dist/src/typus_perp/escrow/structs.d.ts +2 -2
- package/dist/src/typus_perp/escrow/structs.js +1 -1
- package/dist/src/typus_perp/lp-pool/structs.d.ts +28 -28
- package/dist/src/typus_perp/position/functions.js +1 -1
- package/dist/src/typus_perp/position/structs.d.ts +6 -6
- package/dist/src/typus_perp/symbol/structs.d.ts +1 -1
- package/dist/src/typus_perp/tlp/structs.d.ts +2 -2
- package/dist/src/typus_perp/trading/functions.js +1 -1
- package/dist/src/typus_perp/trading/structs.d.ts +32 -32
- package/dist/src/typus_perp/trading/structs.js +2 -2
- package/dist/src/typus_perp/treasury-caps/structs.d.ts +1 -1
- package/dist/src/typus_stake_pool/admin/functions.d.ts +25 -25
- package/dist/src/typus_stake_pool/admin/functions.js +66 -53
- package/dist/src/typus_stake_pool/admin/structs.d.ts +191 -191
- package/dist/src/typus_stake_pool/admin/structs.js +179 -179
- package/dist/src/typus_stake_pool/stake-pool/functions.d.ts +50 -44
- package/dist/src/typus_stake_pool/stake-pool/functions.js +127 -88
- package/dist/src/typus_stake_pool/stake-pool/structs.d.ts +202 -202
- package/dist/src/typus_stake_pool/stake-pool/structs.js +432 -432
- package/package.json +1 -1
- package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/index.d.ts +0 -8
- package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/index.js +0 -11
- package/dist/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.d.ts +0 -3
- package/dist/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.js +0 -6
- package/dist/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/index.d.ts +0 -3
- package/dist/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/index.js +0 -6
- /package/dist/src/_dependencies/source/{0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded → 0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274}/vault/structs.js +0 -0
|
@@ -105,398 +105,38 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
105
105
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
106
106
|
};
|
|
107
107
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
108
|
-
exports.UpdateUnlockCountdownTsMsEvent = exports.UpdateIncentiveConfigEvent = exports.UnstakeEvent = exports.StakePoolRegistry = exports.StakePoolInfo = exports.StakePoolConfig = exports.StakePool = exports.StakeEvent = exports.RemoveIncentiveTokenEvent = exports.NewStakePoolEvent = exports.LpUserShare = exports.IncentiveInfo = exports.IncentiveConfig = exports.Incentive = exports.HarvestPerUserShareEvent = exports.DepositIncentiveEvent = exports.DeactivatingShares = exports.DeactivateIncentiveTokenEvent = exports.AddIncentiveTokenEvent = exports.ActivateIncentiveTokenEvent =
|
|
109
|
-
exports.
|
|
110
|
-
exports.
|
|
111
|
-
exports.
|
|
112
|
-
exports.
|
|
113
|
-
exports.
|
|
114
|
-
exports.
|
|
115
|
-
exports.
|
|
116
|
-
exports.
|
|
117
|
-
exports.
|
|
118
|
-
exports.
|
|
119
|
-
exports.
|
|
120
|
-
exports.
|
|
121
|
-
exports.
|
|
122
|
-
exports.
|
|
123
|
-
exports.
|
|
124
|
-
exports.
|
|
125
|
-
exports.
|
|
126
|
-
exports.
|
|
127
|
-
exports.
|
|
128
|
-
exports.
|
|
129
|
-
exports.
|
|
130
|
-
exports.
|
|
131
|
-
var reified = __importStar(require("../../_framework/reified"));
|
|
132
|
-
var structs_1 = require("../../_dependencies/source/0x1/type-name/structs");
|
|
133
|
-
var structs_2 = require("../../_dependencies/source/0x2/object/structs");
|
|
134
|
-
var structs_3 = require("../../_dependencies/source/0x2/vec-map/structs");
|
|
135
|
-
var reified_1 = require("../../_framework/reified");
|
|
136
|
-
var util_1 = require("../../_framework/util");
|
|
137
|
-
var index_1 = require("../index");
|
|
138
|
-
var bcs_1 = require("@mysten/sui/bcs");
|
|
139
|
-
var utils_1 = require("@mysten/sui/utils");
|
|
140
|
-
/* ============================== UnsubscribeEvent =============================== */
|
|
141
|
-
function isUnsubscribeEvent(type) {
|
|
142
|
-
type = (0, util_1.compressSuiType)(type);
|
|
143
|
-
return type === "".concat(index_1.PKG_V1, "::stake_pool::UnsubscribeEvent");
|
|
144
|
-
}
|
|
145
|
-
var UnsubscribeEvent = /** @class */ (function () {
|
|
146
|
-
function UnsubscribeEvent(typeArgs, fields) {
|
|
147
|
-
this.__StructClass = true;
|
|
148
|
-
this.$typeName = UnsubscribeEvent.$typeName;
|
|
149
|
-
this.$isPhantom = UnsubscribeEvent.$isPhantom;
|
|
150
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([UnsubscribeEvent.$typeName], __read(typeArgs), false));
|
|
151
|
-
this.$typeArgs = typeArgs;
|
|
152
|
-
this.sender = fields.sender;
|
|
153
|
-
this.index = fields.index;
|
|
154
|
-
this.lpTokenType = fields.lpTokenType;
|
|
155
|
-
this.userShareId = fields.userShareId;
|
|
156
|
-
this.unsubscribedShares = fields.unsubscribedShares;
|
|
157
|
-
this.unsubscribeTsMs = fields.unsubscribeTsMs;
|
|
158
|
-
this.unlockedTsMs = fields.unlockedTsMs;
|
|
159
|
-
this.u64Padding = fields.u64Padding;
|
|
160
|
-
}
|
|
161
|
-
UnsubscribeEvent.reified = function () {
|
|
162
|
-
var _this = this;
|
|
163
|
-
return {
|
|
164
|
-
typeName: UnsubscribeEvent.$typeName,
|
|
165
|
-
fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([UnsubscribeEvent.$typeName], [], false)),
|
|
166
|
-
typeArgs: [],
|
|
167
|
-
isPhantom: UnsubscribeEvent.$isPhantom,
|
|
168
|
-
reifiedTypeArgs: [],
|
|
169
|
-
fromFields: function (fields) { return UnsubscribeEvent.fromFields(fields); },
|
|
170
|
-
fromFieldsWithTypes: function (item) { return UnsubscribeEvent.fromFieldsWithTypes(item); },
|
|
171
|
-
fromBcs: function (data) { return UnsubscribeEvent.fromBcs(data); },
|
|
172
|
-
bcs: UnsubscribeEvent.bcs,
|
|
173
|
-
fromJSONField: function (field) { return UnsubscribeEvent.fromJSONField(field); },
|
|
174
|
-
fromJSON: function (json) { return UnsubscribeEvent.fromJSON(json); },
|
|
175
|
-
fromSuiParsedData: function (content) { return UnsubscribeEvent.fromSuiParsedData(content); },
|
|
176
|
-
fromSuiObjectData: function (content) { return UnsubscribeEvent.fromSuiObjectData(content); },
|
|
177
|
-
fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
178
|
-
return [2 /*return*/, UnsubscribeEvent.fetch(client, id)];
|
|
179
|
-
}); }); },
|
|
180
|
-
new: function (fields) {
|
|
181
|
-
return new UnsubscribeEvent([], fields);
|
|
182
|
-
},
|
|
183
|
-
kind: "StructClassReified",
|
|
184
|
-
};
|
|
185
|
-
};
|
|
186
|
-
Object.defineProperty(UnsubscribeEvent, "r", {
|
|
187
|
-
get: function () {
|
|
188
|
-
return UnsubscribeEvent.reified();
|
|
189
|
-
},
|
|
190
|
-
enumerable: false,
|
|
191
|
-
configurable: true
|
|
192
|
-
});
|
|
193
|
-
UnsubscribeEvent.phantom = function () {
|
|
194
|
-
return (0, reified_1.phantom)(UnsubscribeEvent.reified());
|
|
195
|
-
};
|
|
196
|
-
Object.defineProperty(UnsubscribeEvent, "p", {
|
|
197
|
-
get: function () {
|
|
198
|
-
return UnsubscribeEvent.phantom();
|
|
199
|
-
},
|
|
200
|
-
enumerable: false,
|
|
201
|
-
configurable: true
|
|
202
|
-
});
|
|
203
|
-
Object.defineProperty(UnsubscribeEvent, "bcs", {
|
|
204
|
-
get: function () {
|
|
205
|
-
return bcs_1.bcs.struct("UnsubscribeEvent", {
|
|
206
|
-
sender: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, utils_1.fromHEX)(val); }, output: function (val) { return (0, utils_1.toHEX)(val); } }),
|
|
207
|
-
index: bcs_1.bcs.u64(),
|
|
208
|
-
lp_token_type: structs_1.TypeName.bcs,
|
|
209
|
-
user_share_id: bcs_1.bcs.u64(),
|
|
210
|
-
unsubscribed_shares: bcs_1.bcs.u64(),
|
|
211
|
-
unsubscribe_ts_ms: bcs_1.bcs.u64(),
|
|
212
|
-
unlocked_ts_ms: bcs_1.bcs.u64(),
|
|
213
|
-
u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
214
|
-
});
|
|
215
|
-
},
|
|
216
|
-
enumerable: false,
|
|
217
|
-
configurable: true
|
|
218
|
-
});
|
|
219
|
-
UnsubscribeEvent.fromFields = function (fields) {
|
|
220
|
-
return UnsubscribeEvent.reified().new({
|
|
221
|
-
sender: (0, reified_1.decodeFromFields)("address", fields.sender),
|
|
222
|
-
index: (0, reified_1.decodeFromFields)("u64", fields.index),
|
|
223
|
-
lpTokenType: (0, reified_1.decodeFromFields)(structs_1.TypeName.reified(), fields.lp_token_type),
|
|
224
|
-
userShareId: (0, reified_1.decodeFromFields)("u64", fields.user_share_id),
|
|
225
|
-
unsubscribedShares: (0, reified_1.decodeFromFields)("u64", fields.unsubscribed_shares),
|
|
226
|
-
unsubscribeTsMs: (0, reified_1.decodeFromFields)("u64", fields.unsubscribe_ts_ms),
|
|
227
|
-
unlockedTsMs: (0, reified_1.decodeFromFields)("u64", fields.unlocked_ts_ms),
|
|
228
|
-
u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
|
|
229
|
-
});
|
|
230
|
-
};
|
|
231
|
-
UnsubscribeEvent.fromFieldsWithTypes = function (item) {
|
|
232
|
-
if (!isUnsubscribeEvent(item.type)) {
|
|
233
|
-
throw new Error("not a UnsubscribeEvent type");
|
|
234
|
-
}
|
|
235
|
-
return UnsubscribeEvent.reified().new({
|
|
236
|
-
sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
|
|
237
|
-
index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index),
|
|
238
|
-
lpTokenType: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.TypeName.reified(), item.fields.lp_token_type),
|
|
239
|
-
userShareId: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.user_share_id),
|
|
240
|
-
unsubscribedShares: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.unsubscribed_shares),
|
|
241
|
-
unsubscribeTsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.unsubscribe_ts_ms),
|
|
242
|
-
unlockedTsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.unlocked_ts_ms),
|
|
243
|
-
u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
|
|
244
|
-
});
|
|
245
|
-
};
|
|
246
|
-
UnsubscribeEvent.fromBcs = function (data) {
|
|
247
|
-
return UnsubscribeEvent.fromFields(UnsubscribeEvent.bcs.parse(data));
|
|
248
|
-
};
|
|
249
|
-
UnsubscribeEvent.prototype.toJSONField = function () {
|
|
250
|
-
return {
|
|
251
|
-
sender: this.sender,
|
|
252
|
-
index: this.index.toString(),
|
|
253
|
-
lpTokenType: this.lpTokenType.toJSONField(),
|
|
254
|
-
userShareId: this.userShareId.toString(),
|
|
255
|
-
unsubscribedShares: this.unsubscribedShares.toString(),
|
|
256
|
-
unsubscribeTsMs: this.unsubscribeTsMs.toString(),
|
|
257
|
-
unlockedTsMs: this.unlockedTsMs.toString(),
|
|
258
|
-
u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
259
|
-
};
|
|
260
|
-
};
|
|
261
|
-
UnsubscribeEvent.prototype.toJSON = function () {
|
|
262
|
-
return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
|
|
263
|
-
};
|
|
264
|
-
UnsubscribeEvent.fromJSONField = function (field) {
|
|
265
|
-
return UnsubscribeEvent.reified().new({
|
|
266
|
-
sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
|
|
267
|
-
index: (0, reified_1.decodeFromJSONField)("u64", field.index),
|
|
268
|
-
lpTokenType: (0, reified_1.decodeFromJSONField)(structs_1.TypeName.reified(), field.lpTokenType),
|
|
269
|
-
userShareId: (0, reified_1.decodeFromJSONField)("u64", field.userShareId),
|
|
270
|
-
unsubscribedShares: (0, reified_1.decodeFromJSONField)("u64", field.unsubscribedShares),
|
|
271
|
-
unsubscribeTsMs: (0, reified_1.decodeFromJSONField)("u64", field.unsubscribeTsMs),
|
|
272
|
-
unlockedTsMs: (0, reified_1.decodeFromJSONField)("u64", field.unlockedTsMs),
|
|
273
|
-
u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
|
|
274
|
-
});
|
|
275
|
-
};
|
|
276
|
-
UnsubscribeEvent.fromJSON = function (json) {
|
|
277
|
-
if (json.$typeName !== UnsubscribeEvent.$typeName) {
|
|
278
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
279
|
-
}
|
|
280
|
-
return UnsubscribeEvent.fromJSONField(json);
|
|
281
|
-
};
|
|
282
|
-
UnsubscribeEvent.fromSuiParsedData = function (content) {
|
|
283
|
-
if (content.dataType !== "moveObject") {
|
|
284
|
-
throw new Error("not an object");
|
|
285
|
-
}
|
|
286
|
-
if (!isUnsubscribeEvent(content.type)) {
|
|
287
|
-
throw new Error("object at ".concat(content.fields.id, " is not a UnsubscribeEvent object"));
|
|
288
|
-
}
|
|
289
|
-
return UnsubscribeEvent.fromFieldsWithTypes(content);
|
|
290
|
-
};
|
|
291
|
-
UnsubscribeEvent.fromSuiObjectData = function (data) {
|
|
292
|
-
if (data.bcs) {
|
|
293
|
-
if (data.bcs.dataType !== "moveObject" || !isUnsubscribeEvent(data.bcs.type)) {
|
|
294
|
-
throw new Error("object at is not a UnsubscribeEvent object");
|
|
295
|
-
}
|
|
296
|
-
return UnsubscribeEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
|
|
297
|
-
}
|
|
298
|
-
if (data.content) {
|
|
299
|
-
return UnsubscribeEvent.fromSuiParsedData(data.content);
|
|
300
|
-
}
|
|
301
|
-
throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
|
|
302
|
-
};
|
|
303
|
-
UnsubscribeEvent.fetch = function (client, id) {
|
|
304
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
305
|
-
var res;
|
|
306
|
-
var _a, _b;
|
|
307
|
-
return __generator(this, function (_c) {
|
|
308
|
-
switch (_c.label) {
|
|
309
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
|
|
310
|
-
case 1:
|
|
311
|
-
res = _c.sent();
|
|
312
|
-
if (res.error) {
|
|
313
|
-
throw new Error("error fetching UnsubscribeEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
314
|
-
}
|
|
315
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isUnsubscribeEvent(res.data.bcs.type)) {
|
|
316
|
-
throw new Error("object at id ".concat(id, " is not a UnsubscribeEvent object"));
|
|
317
|
-
}
|
|
318
|
-
return [2 /*return*/, UnsubscribeEvent.fromSuiObjectData(res.data)];
|
|
319
|
-
}
|
|
320
|
-
});
|
|
321
|
-
});
|
|
322
|
-
};
|
|
323
|
-
UnsubscribeEvent.$typeName = "".concat(index_1.PKG_V1, "::stake_pool::UnsubscribeEvent");
|
|
324
|
-
UnsubscribeEvent.$numTypeParams = 0;
|
|
325
|
-
UnsubscribeEvent.$isPhantom = [];
|
|
326
|
-
return UnsubscribeEvent;
|
|
327
|
-
}());
|
|
328
|
-
exports.UnsubscribeEvent = UnsubscribeEvent;
|
|
329
|
-
/* ============================== WithdrawIncentiveEvent =============================== */
|
|
330
|
-
function isWithdrawIncentiveEvent(type) {
|
|
331
|
-
type = (0, util_1.compressSuiType)(type);
|
|
332
|
-
return type === "".concat(index_1.PKG_V1, "::stake_pool::WithdrawIncentiveEvent");
|
|
333
|
-
}
|
|
334
|
-
var WithdrawIncentiveEvent = /** @class */ (function () {
|
|
335
|
-
function WithdrawIncentiveEvent(typeArgs, fields) {
|
|
336
|
-
this.__StructClass = true;
|
|
337
|
-
this.$typeName = WithdrawIncentiveEvent.$typeName;
|
|
338
|
-
this.$isPhantom = WithdrawIncentiveEvent.$isPhantom;
|
|
339
|
-
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([WithdrawIncentiveEvent.$typeName], __read(typeArgs), false));
|
|
340
|
-
this.$typeArgs = typeArgs;
|
|
341
|
-
this.sender = fields.sender;
|
|
342
|
-
this.index = fields.index;
|
|
343
|
-
this.incentiveTokenType = fields.incentiveTokenType;
|
|
344
|
-
this.withdrawalAmount = fields.withdrawalAmount;
|
|
345
|
-
this.u64Padding = fields.u64Padding;
|
|
346
|
-
}
|
|
347
|
-
WithdrawIncentiveEvent.reified = function () {
|
|
348
|
-
var _this = this;
|
|
349
|
-
return {
|
|
350
|
-
typeName: WithdrawIncentiveEvent.$typeName,
|
|
351
|
-
fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([WithdrawIncentiveEvent.$typeName], [], false)),
|
|
352
|
-
typeArgs: [],
|
|
353
|
-
isPhantom: WithdrawIncentiveEvent.$isPhantom,
|
|
354
|
-
reifiedTypeArgs: [],
|
|
355
|
-
fromFields: function (fields) { return WithdrawIncentiveEvent.fromFields(fields); },
|
|
356
|
-
fromFieldsWithTypes: function (item) { return WithdrawIncentiveEvent.fromFieldsWithTypes(item); },
|
|
357
|
-
fromBcs: function (data) { return WithdrawIncentiveEvent.fromBcs(data); },
|
|
358
|
-
bcs: WithdrawIncentiveEvent.bcs,
|
|
359
|
-
fromJSONField: function (field) { return WithdrawIncentiveEvent.fromJSONField(field); },
|
|
360
|
-
fromJSON: function (json) { return WithdrawIncentiveEvent.fromJSON(json); },
|
|
361
|
-
fromSuiParsedData: function (content) { return WithdrawIncentiveEvent.fromSuiParsedData(content); },
|
|
362
|
-
fromSuiObjectData: function (content) { return WithdrawIncentiveEvent.fromSuiObjectData(content); },
|
|
363
|
-
fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
364
|
-
return [2 /*return*/, WithdrawIncentiveEvent.fetch(client, id)];
|
|
365
|
-
}); }); },
|
|
366
|
-
new: function (fields) {
|
|
367
|
-
return new WithdrawIncentiveEvent([], fields);
|
|
368
|
-
},
|
|
369
|
-
kind: "StructClassReified",
|
|
370
|
-
};
|
|
371
|
-
};
|
|
372
|
-
Object.defineProperty(WithdrawIncentiveEvent, "r", {
|
|
373
|
-
get: function () {
|
|
374
|
-
return WithdrawIncentiveEvent.reified();
|
|
375
|
-
},
|
|
376
|
-
enumerable: false,
|
|
377
|
-
configurable: true
|
|
378
|
-
});
|
|
379
|
-
WithdrawIncentiveEvent.phantom = function () {
|
|
380
|
-
return (0, reified_1.phantom)(WithdrawIncentiveEvent.reified());
|
|
381
|
-
};
|
|
382
|
-
Object.defineProperty(WithdrawIncentiveEvent, "p", {
|
|
383
|
-
get: function () {
|
|
384
|
-
return WithdrawIncentiveEvent.phantom();
|
|
385
|
-
},
|
|
386
|
-
enumerable: false,
|
|
387
|
-
configurable: true
|
|
388
|
-
});
|
|
389
|
-
Object.defineProperty(WithdrawIncentiveEvent, "bcs", {
|
|
390
|
-
get: function () {
|
|
391
|
-
return bcs_1.bcs.struct("WithdrawIncentiveEvent", {
|
|
392
|
-
sender: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, utils_1.fromHEX)(val); }, output: function (val) { return (0, utils_1.toHEX)(val); } }),
|
|
393
|
-
index: bcs_1.bcs.u64(),
|
|
394
|
-
incentive_token_type: structs_1.TypeName.bcs,
|
|
395
|
-
withdrawal_amount: bcs_1.bcs.u64(),
|
|
396
|
-
u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
397
|
-
});
|
|
398
|
-
},
|
|
399
|
-
enumerable: false,
|
|
400
|
-
configurable: true
|
|
401
|
-
});
|
|
402
|
-
WithdrawIncentiveEvent.fromFields = function (fields) {
|
|
403
|
-
return WithdrawIncentiveEvent.reified().new({
|
|
404
|
-
sender: (0, reified_1.decodeFromFields)("address", fields.sender),
|
|
405
|
-
index: (0, reified_1.decodeFromFields)("u64", fields.index),
|
|
406
|
-
incentiveTokenType: (0, reified_1.decodeFromFields)(structs_1.TypeName.reified(), fields.incentive_token_type),
|
|
407
|
-
withdrawalAmount: (0, reified_1.decodeFromFields)("u64", fields.withdrawal_amount),
|
|
408
|
-
u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
|
|
409
|
-
});
|
|
410
|
-
};
|
|
411
|
-
WithdrawIncentiveEvent.fromFieldsWithTypes = function (item) {
|
|
412
|
-
if (!isWithdrawIncentiveEvent(item.type)) {
|
|
413
|
-
throw new Error("not a WithdrawIncentiveEvent type");
|
|
414
|
-
}
|
|
415
|
-
return WithdrawIncentiveEvent.reified().new({
|
|
416
|
-
sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
|
|
417
|
-
index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index),
|
|
418
|
-
incentiveTokenType: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.TypeName.reified(), item.fields.incentive_token_type),
|
|
419
|
-
withdrawalAmount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.withdrawal_amount),
|
|
420
|
-
u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
|
|
421
|
-
});
|
|
422
|
-
};
|
|
423
|
-
WithdrawIncentiveEvent.fromBcs = function (data) {
|
|
424
|
-
return WithdrawIncentiveEvent.fromFields(WithdrawIncentiveEvent.bcs.parse(data));
|
|
425
|
-
};
|
|
426
|
-
WithdrawIncentiveEvent.prototype.toJSONField = function () {
|
|
427
|
-
return {
|
|
428
|
-
sender: this.sender,
|
|
429
|
-
index: this.index.toString(),
|
|
430
|
-
incentiveTokenType: this.incentiveTokenType.toJSONField(),
|
|
431
|
-
withdrawalAmount: this.withdrawalAmount.toString(),
|
|
432
|
-
u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
433
|
-
};
|
|
434
|
-
};
|
|
435
|
-
WithdrawIncentiveEvent.prototype.toJSON = function () {
|
|
436
|
-
return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
|
|
437
|
-
};
|
|
438
|
-
WithdrawIncentiveEvent.fromJSONField = function (field) {
|
|
439
|
-
return WithdrawIncentiveEvent.reified().new({
|
|
440
|
-
sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
|
|
441
|
-
index: (0, reified_1.decodeFromJSONField)("u64", field.index),
|
|
442
|
-
incentiveTokenType: (0, reified_1.decodeFromJSONField)(structs_1.TypeName.reified(), field.incentiveTokenType),
|
|
443
|
-
withdrawalAmount: (0, reified_1.decodeFromJSONField)("u64", field.withdrawalAmount),
|
|
444
|
-
u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
|
|
445
|
-
});
|
|
446
|
-
};
|
|
447
|
-
WithdrawIncentiveEvent.fromJSON = function (json) {
|
|
448
|
-
if (json.$typeName !== WithdrawIncentiveEvent.$typeName) {
|
|
449
|
-
throw new Error("not a WithTwoGenerics json object");
|
|
450
|
-
}
|
|
451
|
-
return WithdrawIncentiveEvent.fromJSONField(json);
|
|
452
|
-
};
|
|
453
|
-
WithdrawIncentiveEvent.fromSuiParsedData = function (content) {
|
|
454
|
-
if (content.dataType !== "moveObject") {
|
|
455
|
-
throw new Error("not an object");
|
|
456
|
-
}
|
|
457
|
-
if (!isWithdrawIncentiveEvent(content.type)) {
|
|
458
|
-
throw new Error("object at ".concat(content.fields.id, " is not a WithdrawIncentiveEvent object"));
|
|
459
|
-
}
|
|
460
|
-
return WithdrawIncentiveEvent.fromFieldsWithTypes(content);
|
|
461
|
-
};
|
|
462
|
-
WithdrawIncentiveEvent.fromSuiObjectData = function (data) {
|
|
463
|
-
if (data.bcs) {
|
|
464
|
-
if (data.bcs.dataType !== "moveObject" || !isWithdrawIncentiveEvent(data.bcs.type)) {
|
|
465
|
-
throw new Error("object at is not a WithdrawIncentiveEvent object");
|
|
466
|
-
}
|
|
467
|
-
return WithdrawIncentiveEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
|
|
468
|
-
}
|
|
469
|
-
if (data.content) {
|
|
470
|
-
return WithdrawIncentiveEvent.fromSuiParsedData(data.content);
|
|
471
|
-
}
|
|
472
|
-
throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
|
|
473
|
-
};
|
|
474
|
-
WithdrawIncentiveEvent.fetch = function (client, id) {
|
|
475
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
476
|
-
var res;
|
|
477
|
-
var _a, _b;
|
|
478
|
-
return __generator(this, function (_c) {
|
|
479
|
-
switch (_c.label) {
|
|
480
|
-
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
|
|
481
|
-
case 1:
|
|
482
|
-
res = _c.sent();
|
|
483
|
-
if (res.error) {
|
|
484
|
-
throw new Error("error fetching WithdrawIncentiveEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
485
|
-
}
|
|
486
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isWithdrawIncentiveEvent(res.data.bcs.type)) {
|
|
487
|
-
throw new Error("object at id ".concat(id, " is not a WithdrawIncentiveEvent object"));
|
|
488
|
-
}
|
|
489
|
-
return [2 /*return*/, WithdrawIncentiveEvent.fromSuiObjectData(res.data)];
|
|
490
|
-
}
|
|
491
|
-
});
|
|
492
|
-
});
|
|
493
|
-
};
|
|
494
|
-
WithdrawIncentiveEvent.$typeName = "".concat(index_1.PKG_V1, "::stake_pool::WithdrawIncentiveEvent");
|
|
495
|
-
WithdrawIncentiveEvent.$numTypeParams = 0;
|
|
496
|
-
WithdrawIncentiveEvent.$isPhantom = [];
|
|
497
|
-
return WithdrawIncentiveEvent;
|
|
498
|
-
}());
|
|
499
|
-
exports.WithdrawIncentiveEvent = WithdrawIncentiveEvent;
|
|
108
|
+
exports.WithdrawIncentiveEvent = exports.UpdateUnlockCountdownTsMsEvent = exports.UpdateIncentiveConfigEvent = exports.UnsubscribeEvent = exports.UnstakeEvent = exports.StakePoolRegistry = exports.StakePoolInfo = exports.StakePoolConfig = exports.StakePool = exports.StakeEvent = exports.RemoveIncentiveTokenEvent = exports.NewStakePoolEvent = exports.LpUserShare = exports.IncentiveInfo = exports.IncentiveConfig = exports.Incentive = exports.HarvestPerUserShareEvent = exports.DepositIncentiveEvent = exports.DeactivatingShares = exports.DeactivateIncentiveTokenEvent = exports.AddIncentiveTokenEvent = exports.ActivateIncentiveTokenEvent = void 0;
|
|
109
|
+
exports.isActivateIncentiveTokenEvent = isActivateIncentiveTokenEvent;
|
|
110
|
+
exports.isAddIncentiveTokenEvent = isAddIncentiveTokenEvent;
|
|
111
|
+
exports.isDeactivateIncentiveTokenEvent = isDeactivateIncentiveTokenEvent;
|
|
112
|
+
exports.isDeactivatingShares = isDeactivatingShares;
|
|
113
|
+
exports.isDepositIncentiveEvent = isDepositIncentiveEvent;
|
|
114
|
+
exports.isHarvestPerUserShareEvent = isHarvestPerUserShareEvent;
|
|
115
|
+
exports.isIncentive = isIncentive;
|
|
116
|
+
exports.isIncentiveConfig = isIncentiveConfig;
|
|
117
|
+
exports.isIncentiveInfo = isIncentiveInfo;
|
|
118
|
+
exports.isLpUserShare = isLpUserShare;
|
|
119
|
+
exports.isNewStakePoolEvent = isNewStakePoolEvent;
|
|
120
|
+
exports.isRemoveIncentiveTokenEvent = isRemoveIncentiveTokenEvent;
|
|
121
|
+
exports.isStakeEvent = isStakeEvent;
|
|
122
|
+
exports.isStakePool = isStakePool;
|
|
123
|
+
exports.isStakePoolConfig = isStakePoolConfig;
|
|
124
|
+
exports.isStakePoolInfo = isStakePoolInfo;
|
|
125
|
+
exports.isStakePoolRegistry = isStakePoolRegistry;
|
|
126
|
+
exports.isUnstakeEvent = isUnstakeEvent;
|
|
127
|
+
exports.isUnsubscribeEvent = isUnsubscribeEvent;
|
|
128
|
+
exports.isUpdateIncentiveConfigEvent = isUpdateIncentiveConfigEvent;
|
|
129
|
+
exports.isUpdateUnlockCountdownTsMsEvent = isUpdateUnlockCountdownTsMsEvent;
|
|
130
|
+
exports.isWithdrawIncentiveEvent = isWithdrawIncentiveEvent;
|
|
131
|
+
var reified = __importStar(require("../../_framework/reified"));
|
|
132
|
+
var structs_1 = require("../../_dependencies/source/0x1/type-name/structs");
|
|
133
|
+
var structs_2 = require("../../_dependencies/source/0x2/object/structs");
|
|
134
|
+
var structs_3 = require("../../_dependencies/source/0x2/vec-map/structs");
|
|
135
|
+
var reified_1 = require("../../_framework/reified");
|
|
136
|
+
var util_1 = require("../../_framework/util");
|
|
137
|
+
var index_1 = require("../index");
|
|
138
|
+
var bcs_1 = require("@mysten/sui/bcs");
|
|
139
|
+
var utils_1 = require("@mysten/sui/utils");
|
|
500
140
|
/* ============================== ActivateIncentiveTokenEvent =============================== */
|
|
501
141
|
function isActivateIncentiveTokenEvent(type) {
|
|
502
142
|
type = (0, util_1.compressSuiType)(type);
|
|
@@ -3463,81 +3103,270 @@ var UnstakeEvent = /** @class */ (function () {
|
|
|
3463
3103
|
index: (0, reified_1.decodeFromFields)("u64", fields.index),
|
|
3464
3104
|
lpTokenType: (0, reified_1.decodeFromFields)(structs_1.TypeName.reified(), fields.lp_token_type),
|
|
3465
3105
|
userShareId: (0, reified_1.decodeFromFields)("u64", fields.user_share_id),
|
|
3466
|
-
unstakeAmount: (0, reified_1.decodeFromFields)("u64", fields.unstake_amount),
|
|
3467
|
-
unstakeTsMs: (0, reified_1.decodeFromFields)("u64", fields.unstake_ts_ms),
|
|
3106
|
+
unstakeAmount: (0, reified_1.decodeFromFields)("u64", fields.unstake_amount),
|
|
3107
|
+
unstakeTsMs: (0, reified_1.decodeFromFields)("u64", fields.unstake_ts_ms),
|
|
3108
|
+
u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
|
|
3109
|
+
});
|
|
3110
|
+
};
|
|
3111
|
+
UnstakeEvent.fromFieldsWithTypes = function (item) {
|
|
3112
|
+
if (!isUnstakeEvent(item.type)) {
|
|
3113
|
+
throw new Error("not a UnstakeEvent type");
|
|
3114
|
+
}
|
|
3115
|
+
return UnstakeEvent.reified().new({
|
|
3116
|
+
sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
|
|
3117
|
+
index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index),
|
|
3118
|
+
lpTokenType: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.TypeName.reified(), item.fields.lp_token_type),
|
|
3119
|
+
userShareId: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.user_share_id),
|
|
3120
|
+
unstakeAmount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.unstake_amount),
|
|
3121
|
+
unstakeTsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.unstake_ts_ms),
|
|
3122
|
+
u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
|
|
3123
|
+
});
|
|
3124
|
+
};
|
|
3125
|
+
UnstakeEvent.fromBcs = function (data) {
|
|
3126
|
+
return UnstakeEvent.fromFields(UnstakeEvent.bcs.parse(data));
|
|
3127
|
+
};
|
|
3128
|
+
UnstakeEvent.prototype.toJSONField = function () {
|
|
3129
|
+
return {
|
|
3130
|
+
sender: this.sender,
|
|
3131
|
+
index: this.index.toString(),
|
|
3132
|
+
lpTokenType: this.lpTokenType.toJSONField(),
|
|
3133
|
+
userShareId: this.userShareId.toString(),
|
|
3134
|
+
unstakeAmount: this.unstakeAmount.toString(),
|
|
3135
|
+
unstakeTsMs: this.unstakeTsMs.toString(),
|
|
3136
|
+
u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
3137
|
+
};
|
|
3138
|
+
};
|
|
3139
|
+
UnstakeEvent.prototype.toJSON = function () {
|
|
3140
|
+
return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
|
|
3141
|
+
};
|
|
3142
|
+
UnstakeEvent.fromJSONField = function (field) {
|
|
3143
|
+
return UnstakeEvent.reified().new({
|
|
3144
|
+
sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
|
|
3145
|
+
index: (0, reified_1.decodeFromJSONField)("u64", field.index),
|
|
3146
|
+
lpTokenType: (0, reified_1.decodeFromJSONField)(structs_1.TypeName.reified(), field.lpTokenType),
|
|
3147
|
+
userShareId: (0, reified_1.decodeFromJSONField)("u64", field.userShareId),
|
|
3148
|
+
unstakeAmount: (0, reified_1.decodeFromJSONField)("u64", field.unstakeAmount),
|
|
3149
|
+
unstakeTsMs: (0, reified_1.decodeFromJSONField)("u64", field.unstakeTsMs),
|
|
3150
|
+
u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
|
|
3151
|
+
});
|
|
3152
|
+
};
|
|
3153
|
+
UnstakeEvent.fromJSON = function (json) {
|
|
3154
|
+
if (json.$typeName !== UnstakeEvent.$typeName) {
|
|
3155
|
+
throw new Error("not a WithTwoGenerics json object");
|
|
3156
|
+
}
|
|
3157
|
+
return UnstakeEvent.fromJSONField(json);
|
|
3158
|
+
};
|
|
3159
|
+
UnstakeEvent.fromSuiParsedData = function (content) {
|
|
3160
|
+
if (content.dataType !== "moveObject") {
|
|
3161
|
+
throw new Error("not an object");
|
|
3162
|
+
}
|
|
3163
|
+
if (!isUnstakeEvent(content.type)) {
|
|
3164
|
+
throw new Error("object at ".concat(content.fields.id, " is not a UnstakeEvent object"));
|
|
3165
|
+
}
|
|
3166
|
+
return UnstakeEvent.fromFieldsWithTypes(content);
|
|
3167
|
+
};
|
|
3168
|
+
UnstakeEvent.fromSuiObjectData = function (data) {
|
|
3169
|
+
if (data.bcs) {
|
|
3170
|
+
if (data.bcs.dataType !== "moveObject" || !isUnstakeEvent(data.bcs.type)) {
|
|
3171
|
+
throw new Error("object at is not a UnstakeEvent object");
|
|
3172
|
+
}
|
|
3173
|
+
return UnstakeEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
|
|
3174
|
+
}
|
|
3175
|
+
if (data.content) {
|
|
3176
|
+
return UnstakeEvent.fromSuiParsedData(data.content);
|
|
3177
|
+
}
|
|
3178
|
+
throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
|
|
3179
|
+
};
|
|
3180
|
+
UnstakeEvent.fetch = function (client, id) {
|
|
3181
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3182
|
+
var res;
|
|
3183
|
+
var _a, _b;
|
|
3184
|
+
return __generator(this, function (_c) {
|
|
3185
|
+
switch (_c.label) {
|
|
3186
|
+
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
|
|
3187
|
+
case 1:
|
|
3188
|
+
res = _c.sent();
|
|
3189
|
+
if (res.error) {
|
|
3190
|
+
throw new Error("error fetching UnstakeEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
3191
|
+
}
|
|
3192
|
+
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isUnstakeEvent(res.data.bcs.type)) {
|
|
3193
|
+
throw new Error("object at id ".concat(id, " is not a UnstakeEvent object"));
|
|
3194
|
+
}
|
|
3195
|
+
return [2 /*return*/, UnstakeEvent.fromSuiObjectData(res.data)];
|
|
3196
|
+
}
|
|
3197
|
+
});
|
|
3198
|
+
});
|
|
3199
|
+
};
|
|
3200
|
+
UnstakeEvent.$typeName = "".concat(index_1.PKG_V1, "::stake_pool::UnstakeEvent");
|
|
3201
|
+
UnstakeEvent.$numTypeParams = 0;
|
|
3202
|
+
UnstakeEvent.$isPhantom = [];
|
|
3203
|
+
return UnstakeEvent;
|
|
3204
|
+
}());
|
|
3205
|
+
exports.UnstakeEvent = UnstakeEvent;
|
|
3206
|
+
/* ============================== UnsubscribeEvent =============================== */
|
|
3207
|
+
function isUnsubscribeEvent(type) {
|
|
3208
|
+
type = (0, util_1.compressSuiType)(type);
|
|
3209
|
+
return type === "".concat(index_1.PKG_V1, "::stake_pool::UnsubscribeEvent");
|
|
3210
|
+
}
|
|
3211
|
+
var UnsubscribeEvent = /** @class */ (function () {
|
|
3212
|
+
function UnsubscribeEvent(typeArgs, fields) {
|
|
3213
|
+
this.__StructClass = true;
|
|
3214
|
+
this.$typeName = UnsubscribeEvent.$typeName;
|
|
3215
|
+
this.$isPhantom = UnsubscribeEvent.$isPhantom;
|
|
3216
|
+
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([UnsubscribeEvent.$typeName], __read(typeArgs), false));
|
|
3217
|
+
this.$typeArgs = typeArgs;
|
|
3218
|
+
this.sender = fields.sender;
|
|
3219
|
+
this.index = fields.index;
|
|
3220
|
+
this.lpTokenType = fields.lpTokenType;
|
|
3221
|
+
this.userShareId = fields.userShareId;
|
|
3222
|
+
this.unsubscribedShares = fields.unsubscribedShares;
|
|
3223
|
+
this.unsubscribeTsMs = fields.unsubscribeTsMs;
|
|
3224
|
+
this.unlockedTsMs = fields.unlockedTsMs;
|
|
3225
|
+
this.u64Padding = fields.u64Padding;
|
|
3226
|
+
}
|
|
3227
|
+
UnsubscribeEvent.reified = function () {
|
|
3228
|
+
var _this = this;
|
|
3229
|
+
return {
|
|
3230
|
+
typeName: UnsubscribeEvent.$typeName,
|
|
3231
|
+
fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([UnsubscribeEvent.$typeName], [], false)),
|
|
3232
|
+
typeArgs: [],
|
|
3233
|
+
isPhantom: UnsubscribeEvent.$isPhantom,
|
|
3234
|
+
reifiedTypeArgs: [],
|
|
3235
|
+
fromFields: function (fields) { return UnsubscribeEvent.fromFields(fields); },
|
|
3236
|
+
fromFieldsWithTypes: function (item) { return UnsubscribeEvent.fromFieldsWithTypes(item); },
|
|
3237
|
+
fromBcs: function (data) { return UnsubscribeEvent.fromBcs(data); },
|
|
3238
|
+
bcs: UnsubscribeEvent.bcs,
|
|
3239
|
+
fromJSONField: function (field) { return UnsubscribeEvent.fromJSONField(field); },
|
|
3240
|
+
fromJSON: function (json) { return UnsubscribeEvent.fromJSON(json); },
|
|
3241
|
+
fromSuiParsedData: function (content) { return UnsubscribeEvent.fromSuiParsedData(content); },
|
|
3242
|
+
fromSuiObjectData: function (content) { return UnsubscribeEvent.fromSuiObjectData(content); },
|
|
3243
|
+
fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
3244
|
+
return [2 /*return*/, UnsubscribeEvent.fetch(client, id)];
|
|
3245
|
+
}); }); },
|
|
3246
|
+
new: function (fields) {
|
|
3247
|
+
return new UnsubscribeEvent([], fields);
|
|
3248
|
+
},
|
|
3249
|
+
kind: "StructClassReified",
|
|
3250
|
+
};
|
|
3251
|
+
};
|
|
3252
|
+
Object.defineProperty(UnsubscribeEvent, "r", {
|
|
3253
|
+
get: function () {
|
|
3254
|
+
return UnsubscribeEvent.reified();
|
|
3255
|
+
},
|
|
3256
|
+
enumerable: false,
|
|
3257
|
+
configurable: true
|
|
3258
|
+
});
|
|
3259
|
+
UnsubscribeEvent.phantom = function () {
|
|
3260
|
+
return (0, reified_1.phantom)(UnsubscribeEvent.reified());
|
|
3261
|
+
};
|
|
3262
|
+
Object.defineProperty(UnsubscribeEvent, "p", {
|
|
3263
|
+
get: function () {
|
|
3264
|
+
return UnsubscribeEvent.phantom();
|
|
3265
|
+
},
|
|
3266
|
+
enumerable: false,
|
|
3267
|
+
configurable: true
|
|
3268
|
+
});
|
|
3269
|
+
Object.defineProperty(UnsubscribeEvent, "bcs", {
|
|
3270
|
+
get: function () {
|
|
3271
|
+
return bcs_1.bcs.struct("UnsubscribeEvent", {
|
|
3272
|
+
sender: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, utils_1.fromHEX)(val); }, output: function (val) { return (0, utils_1.toHEX)(val); } }),
|
|
3273
|
+
index: bcs_1.bcs.u64(),
|
|
3274
|
+
lp_token_type: structs_1.TypeName.bcs,
|
|
3275
|
+
user_share_id: bcs_1.bcs.u64(),
|
|
3276
|
+
unsubscribed_shares: bcs_1.bcs.u64(),
|
|
3277
|
+
unsubscribe_ts_ms: bcs_1.bcs.u64(),
|
|
3278
|
+
unlocked_ts_ms: bcs_1.bcs.u64(),
|
|
3279
|
+
u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
3280
|
+
});
|
|
3281
|
+
},
|
|
3282
|
+
enumerable: false,
|
|
3283
|
+
configurable: true
|
|
3284
|
+
});
|
|
3285
|
+
UnsubscribeEvent.fromFields = function (fields) {
|
|
3286
|
+
return UnsubscribeEvent.reified().new({
|
|
3287
|
+
sender: (0, reified_1.decodeFromFields)("address", fields.sender),
|
|
3288
|
+
index: (0, reified_1.decodeFromFields)("u64", fields.index),
|
|
3289
|
+
lpTokenType: (0, reified_1.decodeFromFields)(structs_1.TypeName.reified(), fields.lp_token_type),
|
|
3290
|
+
userShareId: (0, reified_1.decodeFromFields)("u64", fields.user_share_id),
|
|
3291
|
+
unsubscribedShares: (0, reified_1.decodeFromFields)("u64", fields.unsubscribed_shares),
|
|
3292
|
+
unsubscribeTsMs: (0, reified_1.decodeFromFields)("u64", fields.unsubscribe_ts_ms),
|
|
3293
|
+
unlockedTsMs: (0, reified_1.decodeFromFields)("u64", fields.unlocked_ts_ms),
|
|
3468
3294
|
u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
|
|
3469
3295
|
});
|
|
3470
3296
|
};
|
|
3471
|
-
|
|
3472
|
-
if (!
|
|
3473
|
-
throw new Error("not a
|
|
3297
|
+
UnsubscribeEvent.fromFieldsWithTypes = function (item) {
|
|
3298
|
+
if (!isUnsubscribeEvent(item.type)) {
|
|
3299
|
+
throw new Error("not a UnsubscribeEvent type");
|
|
3474
3300
|
}
|
|
3475
|
-
return
|
|
3301
|
+
return UnsubscribeEvent.reified().new({
|
|
3476
3302
|
sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
|
|
3477
3303
|
index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index),
|
|
3478
3304
|
lpTokenType: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.TypeName.reified(), item.fields.lp_token_type),
|
|
3479
3305
|
userShareId: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.user_share_id),
|
|
3480
|
-
|
|
3481
|
-
|
|
3306
|
+
unsubscribedShares: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.unsubscribed_shares),
|
|
3307
|
+
unsubscribeTsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.unsubscribe_ts_ms),
|
|
3308
|
+
unlockedTsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.unlocked_ts_ms),
|
|
3482
3309
|
u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
|
|
3483
3310
|
});
|
|
3484
3311
|
};
|
|
3485
|
-
|
|
3486
|
-
return
|
|
3312
|
+
UnsubscribeEvent.fromBcs = function (data) {
|
|
3313
|
+
return UnsubscribeEvent.fromFields(UnsubscribeEvent.bcs.parse(data));
|
|
3487
3314
|
};
|
|
3488
|
-
|
|
3315
|
+
UnsubscribeEvent.prototype.toJSONField = function () {
|
|
3489
3316
|
return {
|
|
3490
3317
|
sender: this.sender,
|
|
3491
3318
|
index: this.index.toString(),
|
|
3492
3319
|
lpTokenType: this.lpTokenType.toJSONField(),
|
|
3493
3320
|
userShareId: this.userShareId.toString(),
|
|
3494
|
-
|
|
3495
|
-
|
|
3321
|
+
unsubscribedShares: this.unsubscribedShares.toString(),
|
|
3322
|
+
unsubscribeTsMs: this.unsubscribeTsMs.toString(),
|
|
3323
|
+
unlockedTsMs: this.unlockedTsMs.toString(),
|
|
3496
3324
|
u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
3497
3325
|
};
|
|
3498
3326
|
};
|
|
3499
|
-
|
|
3327
|
+
UnsubscribeEvent.prototype.toJSON = function () {
|
|
3500
3328
|
return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
|
|
3501
3329
|
};
|
|
3502
|
-
|
|
3503
|
-
return
|
|
3330
|
+
UnsubscribeEvent.fromJSONField = function (field) {
|
|
3331
|
+
return UnsubscribeEvent.reified().new({
|
|
3504
3332
|
sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
|
|
3505
3333
|
index: (0, reified_1.decodeFromJSONField)("u64", field.index),
|
|
3506
3334
|
lpTokenType: (0, reified_1.decodeFromJSONField)(structs_1.TypeName.reified(), field.lpTokenType),
|
|
3507
3335
|
userShareId: (0, reified_1.decodeFromJSONField)("u64", field.userShareId),
|
|
3508
|
-
|
|
3509
|
-
|
|
3336
|
+
unsubscribedShares: (0, reified_1.decodeFromJSONField)("u64", field.unsubscribedShares),
|
|
3337
|
+
unsubscribeTsMs: (0, reified_1.decodeFromJSONField)("u64", field.unsubscribeTsMs),
|
|
3338
|
+
unlockedTsMs: (0, reified_1.decodeFromJSONField)("u64", field.unlockedTsMs),
|
|
3510
3339
|
u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
|
|
3511
3340
|
});
|
|
3512
3341
|
};
|
|
3513
|
-
|
|
3514
|
-
if (json.$typeName !==
|
|
3342
|
+
UnsubscribeEvent.fromJSON = function (json) {
|
|
3343
|
+
if (json.$typeName !== UnsubscribeEvent.$typeName) {
|
|
3515
3344
|
throw new Error("not a WithTwoGenerics json object");
|
|
3516
3345
|
}
|
|
3517
|
-
return
|
|
3346
|
+
return UnsubscribeEvent.fromJSONField(json);
|
|
3518
3347
|
};
|
|
3519
|
-
|
|
3348
|
+
UnsubscribeEvent.fromSuiParsedData = function (content) {
|
|
3520
3349
|
if (content.dataType !== "moveObject") {
|
|
3521
3350
|
throw new Error("not an object");
|
|
3522
3351
|
}
|
|
3523
|
-
if (!
|
|
3524
|
-
throw new Error("object at ".concat(content.fields.id, " is not a
|
|
3352
|
+
if (!isUnsubscribeEvent(content.type)) {
|
|
3353
|
+
throw new Error("object at ".concat(content.fields.id, " is not a UnsubscribeEvent object"));
|
|
3525
3354
|
}
|
|
3526
|
-
return
|
|
3355
|
+
return UnsubscribeEvent.fromFieldsWithTypes(content);
|
|
3527
3356
|
};
|
|
3528
|
-
|
|
3357
|
+
UnsubscribeEvent.fromSuiObjectData = function (data) {
|
|
3529
3358
|
if (data.bcs) {
|
|
3530
|
-
if (data.bcs.dataType !== "moveObject" || !
|
|
3531
|
-
throw new Error("object at is not a
|
|
3359
|
+
if (data.bcs.dataType !== "moveObject" || !isUnsubscribeEvent(data.bcs.type)) {
|
|
3360
|
+
throw new Error("object at is not a UnsubscribeEvent object");
|
|
3532
3361
|
}
|
|
3533
|
-
return
|
|
3362
|
+
return UnsubscribeEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
|
|
3534
3363
|
}
|
|
3535
3364
|
if (data.content) {
|
|
3536
|
-
return
|
|
3365
|
+
return UnsubscribeEvent.fromSuiParsedData(data.content);
|
|
3537
3366
|
}
|
|
3538
3367
|
throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
|
|
3539
3368
|
};
|
|
3540
|
-
|
|
3369
|
+
UnsubscribeEvent.fetch = function (client, id) {
|
|
3541
3370
|
return __awaiter(this, void 0, void 0, function () {
|
|
3542
3371
|
var res;
|
|
3543
3372
|
var _a, _b;
|
|
@@ -3547,22 +3376,22 @@ var UnstakeEvent = /** @class */ (function () {
|
|
|
3547
3376
|
case 1:
|
|
3548
3377
|
res = _c.sent();
|
|
3549
3378
|
if (res.error) {
|
|
3550
|
-
throw new Error("error fetching
|
|
3379
|
+
throw new Error("error fetching UnsubscribeEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
3551
3380
|
}
|
|
3552
|
-
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !
|
|
3553
|
-
throw new Error("object at id ".concat(id, " is not a
|
|
3381
|
+
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isUnsubscribeEvent(res.data.bcs.type)) {
|
|
3382
|
+
throw new Error("object at id ".concat(id, " is not a UnsubscribeEvent object"));
|
|
3554
3383
|
}
|
|
3555
|
-
return [2 /*return*/,
|
|
3384
|
+
return [2 /*return*/, UnsubscribeEvent.fromSuiObjectData(res.data)];
|
|
3556
3385
|
}
|
|
3557
3386
|
});
|
|
3558
3387
|
});
|
|
3559
3388
|
};
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
return
|
|
3389
|
+
UnsubscribeEvent.$typeName = "".concat(index_1.PKG_V1, "::stake_pool::UnsubscribeEvent");
|
|
3390
|
+
UnsubscribeEvent.$numTypeParams = 0;
|
|
3391
|
+
UnsubscribeEvent.$isPhantom = [];
|
|
3392
|
+
return UnsubscribeEvent;
|
|
3564
3393
|
}());
|
|
3565
|
-
exports.
|
|
3394
|
+
exports.UnsubscribeEvent = UnsubscribeEvent;
|
|
3566
3395
|
/* ============================== UpdateIncentiveConfigEvent =============================== */
|
|
3567
3396
|
function isUpdateIncentiveConfigEvent(type) {
|
|
3568
3397
|
type = (0, util_1.compressSuiType)(type);
|
|
@@ -3905,3 +3734,174 @@ var UpdateUnlockCountdownTsMsEvent = /** @class */ (function () {
|
|
|
3905
3734
|
return UpdateUnlockCountdownTsMsEvent;
|
|
3906
3735
|
}());
|
|
3907
3736
|
exports.UpdateUnlockCountdownTsMsEvent = UpdateUnlockCountdownTsMsEvent;
|
|
3737
|
+
/* ============================== WithdrawIncentiveEvent =============================== */
|
|
3738
|
+
function isWithdrawIncentiveEvent(type) {
|
|
3739
|
+
type = (0, util_1.compressSuiType)(type);
|
|
3740
|
+
return type === "".concat(index_1.PKG_V1, "::stake_pool::WithdrawIncentiveEvent");
|
|
3741
|
+
}
|
|
3742
|
+
var WithdrawIncentiveEvent = /** @class */ (function () {
|
|
3743
|
+
function WithdrawIncentiveEvent(typeArgs, fields) {
|
|
3744
|
+
this.__StructClass = true;
|
|
3745
|
+
this.$typeName = WithdrawIncentiveEvent.$typeName;
|
|
3746
|
+
this.$isPhantom = WithdrawIncentiveEvent.$isPhantom;
|
|
3747
|
+
this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([WithdrawIncentiveEvent.$typeName], __read(typeArgs), false));
|
|
3748
|
+
this.$typeArgs = typeArgs;
|
|
3749
|
+
this.sender = fields.sender;
|
|
3750
|
+
this.index = fields.index;
|
|
3751
|
+
this.incentiveTokenType = fields.incentiveTokenType;
|
|
3752
|
+
this.withdrawalAmount = fields.withdrawalAmount;
|
|
3753
|
+
this.u64Padding = fields.u64Padding;
|
|
3754
|
+
}
|
|
3755
|
+
WithdrawIncentiveEvent.reified = function () {
|
|
3756
|
+
var _this = this;
|
|
3757
|
+
return {
|
|
3758
|
+
typeName: WithdrawIncentiveEvent.$typeName,
|
|
3759
|
+
fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([WithdrawIncentiveEvent.$typeName], [], false)),
|
|
3760
|
+
typeArgs: [],
|
|
3761
|
+
isPhantom: WithdrawIncentiveEvent.$isPhantom,
|
|
3762
|
+
reifiedTypeArgs: [],
|
|
3763
|
+
fromFields: function (fields) { return WithdrawIncentiveEvent.fromFields(fields); },
|
|
3764
|
+
fromFieldsWithTypes: function (item) { return WithdrawIncentiveEvent.fromFieldsWithTypes(item); },
|
|
3765
|
+
fromBcs: function (data) { return WithdrawIncentiveEvent.fromBcs(data); },
|
|
3766
|
+
bcs: WithdrawIncentiveEvent.bcs,
|
|
3767
|
+
fromJSONField: function (field) { return WithdrawIncentiveEvent.fromJSONField(field); },
|
|
3768
|
+
fromJSON: function (json) { return WithdrawIncentiveEvent.fromJSON(json); },
|
|
3769
|
+
fromSuiParsedData: function (content) { return WithdrawIncentiveEvent.fromSuiParsedData(content); },
|
|
3770
|
+
fromSuiObjectData: function (content) { return WithdrawIncentiveEvent.fromSuiObjectData(content); },
|
|
3771
|
+
fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
3772
|
+
return [2 /*return*/, WithdrawIncentiveEvent.fetch(client, id)];
|
|
3773
|
+
}); }); },
|
|
3774
|
+
new: function (fields) {
|
|
3775
|
+
return new WithdrawIncentiveEvent([], fields);
|
|
3776
|
+
},
|
|
3777
|
+
kind: "StructClassReified",
|
|
3778
|
+
};
|
|
3779
|
+
};
|
|
3780
|
+
Object.defineProperty(WithdrawIncentiveEvent, "r", {
|
|
3781
|
+
get: function () {
|
|
3782
|
+
return WithdrawIncentiveEvent.reified();
|
|
3783
|
+
},
|
|
3784
|
+
enumerable: false,
|
|
3785
|
+
configurable: true
|
|
3786
|
+
});
|
|
3787
|
+
WithdrawIncentiveEvent.phantom = function () {
|
|
3788
|
+
return (0, reified_1.phantom)(WithdrawIncentiveEvent.reified());
|
|
3789
|
+
};
|
|
3790
|
+
Object.defineProperty(WithdrawIncentiveEvent, "p", {
|
|
3791
|
+
get: function () {
|
|
3792
|
+
return WithdrawIncentiveEvent.phantom();
|
|
3793
|
+
},
|
|
3794
|
+
enumerable: false,
|
|
3795
|
+
configurable: true
|
|
3796
|
+
});
|
|
3797
|
+
Object.defineProperty(WithdrawIncentiveEvent, "bcs", {
|
|
3798
|
+
get: function () {
|
|
3799
|
+
return bcs_1.bcs.struct("WithdrawIncentiveEvent", {
|
|
3800
|
+
sender: bcs_1.bcs.bytes(32).transform({ input: function (val) { return (0, utils_1.fromHEX)(val); }, output: function (val) { return (0, utils_1.toHEX)(val); } }),
|
|
3801
|
+
index: bcs_1.bcs.u64(),
|
|
3802
|
+
incentive_token_type: structs_1.TypeName.bcs,
|
|
3803
|
+
withdrawal_amount: bcs_1.bcs.u64(),
|
|
3804
|
+
u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
3805
|
+
});
|
|
3806
|
+
},
|
|
3807
|
+
enumerable: false,
|
|
3808
|
+
configurable: true
|
|
3809
|
+
});
|
|
3810
|
+
WithdrawIncentiveEvent.fromFields = function (fields) {
|
|
3811
|
+
return WithdrawIncentiveEvent.reified().new({
|
|
3812
|
+
sender: (0, reified_1.decodeFromFields)("address", fields.sender),
|
|
3813
|
+
index: (0, reified_1.decodeFromFields)("u64", fields.index),
|
|
3814
|
+
incentiveTokenType: (0, reified_1.decodeFromFields)(structs_1.TypeName.reified(), fields.incentive_token_type),
|
|
3815
|
+
withdrawalAmount: (0, reified_1.decodeFromFields)("u64", fields.withdrawal_amount),
|
|
3816
|
+
u64Padding: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.u64_padding),
|
|
3817
|
+
});
|
|
3818
|
+
};
|
|
3819
|
+
WithdrawIncentiveEvent.fromFieldsWithTypes = function (item) {
|
|
3820
|
+
if (!isWithdrawIncentiveEvent(item.type)) {
|
|
3821
|
+
throw new Error("not a WithdrawIncentiveEvent type");
|
|
3822
|
+
}
|
|
3823
|
+
return WithdrawIncentiveEvent.reified().new({
|
|
3824
|
+
sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
|
|
3825
|
+
index: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.index),
|
|
3826
|
+
incentiveTokenType: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.TypeName.reified(), item.fields.incentive_token_type),
|
|
3827
|
+
withdrawalAmount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.withdrawal_amount),
|
|
3828
|
+
u64Padding: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.u64_padding),
|
|
3829
|
+
});
|
|
3830
|
+
};
|
|
3831
|
+
WithdrawIncentiveEvent.fromBcs = function (data) {
|
|
3832
|
+
return WithdrawIncentiveEvent.fromFields(WithdrawIncentiveEvent.bcs.parse(data));
|
|
3833
|
+
};
|
|
3834
|
+
WithdrawIncentiveEvent.prototype.toJSONField = function () {
|
|
3835
|
+
return {
|
|
3836
|
+
sender: this.sender,
|
|
3837
|
+
index: this.index.toString(),
|
|
3838
|
+
incentiveTokenType: this.incentiveTokenType.toJSONField(),
|
|
3839
|
+
withdrawalAmount: this.withdrawalAmount.toString(),
|
|
3840
|
+
u64Padding: (0, reified_1.fieldToJSON)("vector<u64>", this.u64Padding),
|
|
3841
|
+
};
|
|
3842
|
+
};
|
|
3843
|
+
WithdrawIncentiveEvent.prototype.toJSON = function () {
|
|
3844
|
+
return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
|
|
3845
|
+
};
|
|
3846
|
+
WithdrawIncentiveEvent.fromJSONField = function (field) {
|
|
3847
|
+
return WithdrawIncentiveEvent.reified().new({
|
|
3848
|
+
sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
|
|
3849
|
+
index: (0, reified_1.decodeFromJSONField)("u64", field.index),
|
|
3850
|
+
incentiveTokenType: (0, reified_1.decodeFromJSONField)(structs_1.TypeName.reified(), field.incentiveTokenType),
|
|
3851
|
+
withdrawalAmount: (0, reified_1.decodeFromJSONField)("u64", field.withdrawalAmount),
|
|
3852
|
+
u64Padding: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.u64Padding),
|
|
3853
|
+
});
|
|
3854
|
+
};
|
|
3855
|
+
WithdrawIncentiveEvent.fromJSON = function (json) {
|
|
3856
|
+
if (json.$typeName !== WithdrawIncentiveEvent.$typeName) {
|
|
3857
|
+
throw new Error("not a WithTwoGenerics json object");
|
|
3858
|
+
}
|
|
3859
|
+
return WithdrawIncentiveEvent.fromJSONField(json);
|
|
3860
|
+
};
|
|
3861
|
+
WithdrawIncentiveEvent.fromSuiParsedData = function (content) {
|
|
3862
|
+
if (content.dataType !== "moveObject") {
|
|
3863
|
+
throw new Error("not an object");
|
|
3864
|
+
}
|
|
3865
|
+
if (!isWithdrawIncentiveEvent(content.type)) {
|
|
3866
|
+
throw new Error("object at ".concat(content.fields.id, " is not a WithdrawIncentiveEvent object"));
|
|
3867
|
+
}
|
|
3868
|
+
return WithdrawIncentiveEvent.fromFieldsWithTypes(content);
|
|
3869
|
+
};
|
|
3870
|
+
WithdrawIncentiveEvent.fromSuiObjectData = function (data) {
|
|
3871
|
+
if (data.bcs) {
|
|
3872
|
+
if (data.bcs.dataType !== "moveObject" || !isWithdrawIncentiveEvent(data.bcs.type)) {
|
|
3873
|
+
throw new Error("object at is not a WithdrawIncentiveEvent object");
|
|
3874
|
+
}
|
|
3875
|
+
return WithdrawIncentiveEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
|
|
3876
|
+
}
|
|
3877
|
+
if (data.content) {
|
|
3878
|
+
return WithdrawIncentiveEvent.fromSuiParsedData(data.content);
|
|
3879
|
+
}
|
|
3880
|
+
throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
|
|
3881
|
+
};
|
|
3882
|
+
WithdrawIncentiveEvent.fetch = function (client, id) {
|
|
3883
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3884
|
+
var res;
|
|
3885
|
+
var _a, _b;
|
|
3886
|
+
return __generator(this, function (_c) {
|
|
3887
|
+
switch (_c.label) {
|
|
3888
|
+
case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
|
|
3889
|
+
case 1:
|
|
3890
|
+
res = _c.sent();
|
|
3891
|
+
if (res.error) {
|
|
3892
|
+
throw new Error("error fetching WithdrawIncentiveEvent object at id ".concat(id, ": ").concat(res.error.code));
|
|
3893
|
+
}
|
|
3894
|
+
if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isWithdrawIncentiveEvent(res.data.bcs.type)) {
|
|
3895
|
+
throw new Error("object at id ".concat(id, " is not a WithdrawIncentiveEvent object"));
|
|
3896
|
+
}
|
|
3897
|
+
return [2 /*return*/, WithdrawIncentiveEvent.fromSuiObjectData(res.data)];
|
|
3898
|
+
}
|
|
3899
|
+
});
|
|
3900
|
+
});
|
|
3901
|
+
};
|
|
3902
|
+
WithdrawIncentiveEvent.$typeName = "".concat(index_1.PKG_V1, "::stake_pool::WithdrawIncentiveEvent");
|
|
3903
|
+
WithdrawIncentiveEvent.$numTypeParams = 0;
|
|
3904
|
+
WithdrawIncentiveEvent.$isPhantom = [];
|
|
3905
|
+
return WithdrawIncentiveEvent;
|
|
3906
|
+
}());
|
|
3907
|
+
exports.WithdrawIncentiveEvent = WithdrawIncentiveEvent;
|