@haneullabs/haneulns 1.0.3 → 1.2.5
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/CHANGELOG.md +108 -0
- package/dist/constants.d.mts.map +1 -1
- package/dist/constants.mjs +20 -20
- package/dist/constants.mjs.map +1 -1
- package/dist/contracts/haneulns/controller.mjs +11 -4
- package/dist/contracts/haneulns/controller.mjs.map +1 -1
- package/dist/contracts/haneulns/deps/haneul/balance.mjs +2 -13
- package/dist/contracts/haneulns/deps/haneul/balance.mjs.map +1 -1
- package/dist/contracts/haneulns/deps/haneul/vec_map.mjs +1 -2
- package/dist/contracts/haneulns/deps/haneul/vec_map.mjs.map +1 -1
- package/dist/contracts/haneulns/deps/std/type_name.mjs +13 -10
- package/dist/contracts/haneulns/deps/std/type_name.mjs.map +1 -1
- package/dist/contracts/haneulns/domain.mjs +11 -16
- package/dist/contracts/haneulns/domain.mjs.map +1 -1
- package/dist/contracts/haneulns/haneulns.mjs +11 -8
- package/dist/contracts/haneulns/haneulns.mjs.map +1 -1
- package/dist/contracts/haneulns/name_record.mjs +14 -13
- package/dist/contracts/haneulns/name_record.mjs.map +1 -1
- package/dist/contracts/haneulns/payment.mjs +16 -17
- package/dist/contracts/haneulns/payment.mjs.map +1 -1
- package/dist/contracts/haneulns/pricing_config.mjs +1 -2
- package/dist/contracts/haneulns/pricing_config.mjs.map +1 -1
- package/dist/contracts/haneulns_coupons/coupon_house.mjs +4 -5
- package/dist/contracts/haneulns_coupons/coupon_house.mjs.map +1 -1
- package/dist/contracts/haneulns_coupons/data.mjs +2 -8
- package/dist/contracts/haneulns_coupons/data.mjs.map +1 -1
- package/dist/contracts/haneulns_coupons/deps/haneul/bag.mjs +4 -32
- package/dist/contracts/haneulns_coupons/deps/haneul/bag.mjs.map +1 -1
- package/dist/contracts/haneulns_discounts/deps/haneul/linked_table.mjs +5 -2
- package/dist/contracts/haneulns_discounts/deps/haneul/linked_table.mjs.map +1 -1
- package/dist/contracts/haneulns_discounts/deps/haneulns/pricing_config.mjs +2 -8
- package/dist/contracts/haneulns_discounts/deps/haneulns/pricing_config.mjs.map +1 -1
- package/dist/contracts/haneulns_discounts/discounts.mjs +3 -4
- package/dist/contracts/haneulns_discounts/discounts.mjs.map +1 -1
- package/dist/contracts/haneulns_discounts/free_claims.mjs +4 -5
- package/dist/contracts/haneulns_discounts/free_claims.mjs.map +1 -1
- package/dist/contracts/haneulns_payments/deps/haneul/vec_map.mjs +1 -2
- package/dist/contracts/haneulns_payments/deps/haneul/vec_map.mjs.map +1 -1
- package/dist/contracts/haneulns_payments/deps/std/type_name.mjs +13 -10
- package/dist/contracts/haneulns_payments/deps/std/type_name.mjs.map +1 -1
- package/dist/contracts/haneulns_payments/payments.mjs +4 -3
- package/dist/contracts/haneulns_payments/payments.mjs.map +1 -1
- package/dist/contracts/pyth/data_source.mjs +2 -8
- package/dist/contracts/pyth/data_source.mjs.map +1 -1
- package/dist/contracts/pyth/deps/0x0000000000000000000000000000000000000000000000000000000000000002/package.mjs +2 -8
- package/dist/contracts/pyth/deps/0x0000000000000000000000000000000000000000000000000000000000000002/package.mjs.map +1 -1
- package/dist/contracts/pyth/deps/0x0000000000000000000000000000000000000000000000000000000000000002/table.mjs +2 -8
- package/dist/contracts/pyth/deps/0x0000000000000000000000000000000000000000000000000000000000000002/table.mjs.map +1 -1
- package/dist/contracts/pyth/deps/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/bytes32.mjs +2 -8
- package/dist/contracts/pyth/deps/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/bytes32.mjs.map +1 -1
- package/dist/contracts/pyth/deps/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/consumed_vaas.mjs +2 -8
- package/dist/contracts/pyth/deps/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/consumed_vaas.mjs.map +1 -1
- package/dist/contracts/pyth/deps/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/external_address.mjs +2 -8
- package/dist/contracts/pyth/deps/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/external_address.mjs.map +1 -1
- package/dist/contracts/pyth/deps/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/set.mjs +2 -8
- package/dist/contracts/pyth/deps/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/set.mjs.map +1 -1
- package/dist/contracts/pyth/state.mjs +2 -8
- package/dist/contracts/pyth/state.mjs.map +1 -1
- package/dist/contracts/utils/index.mjs +97 -12
- package/dist/contracts/utils/index.mjs.map +1 -1
- package/dist/contracts/wormhole/bytes32.mjs +2 -8
- package/dist/contracts/wormhole/bytes32.mjs.map +1 -1
- package/dist/contracts/wormhole/consumed_vaas.mjs +2 -8
- package/dist/contracts/wormhole/consumed_vaas.mjs.map +1 -1
- package/dist/contracts/wormhole/deps/0x0000000000000000000000000000000000000000000000000000000000000002/balance.mjs +2 -8
- package/dist/contracts/wormhole/deps/0x0000000000000000000000000000000000000000000000000000000000000002/balance.mjs.map +1 -1
- package/dist/contracts/wormhole/deps/0x0000000000000000000000000000000000000000000000000000000000000002/package.mjs +2 -8
- package/dist/contracts/wormhole/deps/0x0000000000000000000000000000000000000000000000000000000000000002/package.mjs.map +1 -1
- package/dist/contracts/wormhole/deps/0x0000000000000000000000000000000000000000000000000000000000000002/table.mjs +2 -8
- package/dist/contracts/wormhole/deps/0x0000000000000000000000000000000000000000000000000000000000000002/table.mjs.map +1 -1
- package/dist/contracts/wormhole/external_address.mjs +2 -8
- package/dist/contracts/wormhole/external_address.mjs.map +1 -1
- package/dist/contracts/wormhole/fee_collector.mjs +2 -8
- package/dist/contracts/wormhole/fee_collector.mjs.map +1 -1
- package/dist/contracts/wormhole/set.mjs +2 -8
- package/dist/contracts/wormhole/set.mjs.map +1 -1
- package/dist/contracts/wormhole/state.mjs +2 -8
- package/dist/contracts/wormhole/state.mjs.map +1 -1
- package/dist/haneulns-client.d.mts.map +1 -1
- package/dist/haneulns-client.mjs +1 -2
- package/dist/haneulns-client.mjs.map +1 -1
- package/dist/haneulns-transaction.d.mts +1 -2
- package/dist/haneulns-transaction.d.mts.map +1 -1
- package/dist/haneulns-transaction.mjs +1 -2
- package/dist/haneulns-transaction.mjs.map +1 -1
- package/dist/helpers.d.mts.map +1 -1
- package/dist/helpers.mjs +1 -2
- package/dist/helpers.mjs.map +1 -1
- package/dist/index.mjs +1 -2
- package/dist/pyth/PriceServiceConnection.mjs +1 -2
- package/dist/pyth/PriceServiceConnection.mjs.map +1 -1
- package/dist/pyth/pyth-helpers.mjs +1 -1
- package/dist/pyth/pyth-helpers.mjs.map +1 -1
- package/dist/pyth/pyth.mjs +8 -6
- package/dist/pyth/pyth.mjs.map +1 -1
- package/dist/types.d.mts.map +1 -1
- package/package.json +8 -9
- package/src/constants.ts +19 -19
- package/src/contracts/haneulns/admin.ts +2 -2
- package/src/contracts/haneulns/config.ts +18 -18
- package/src/contracts/haneulns/controller.ts +95 -1
- package/src/contracts/haneulns/core_config.ts +19 -19
- package/src/contracts/haneulns/domain.ts +18 -20
- package/src/contracts/haneulns/haneulns.ts +5 -5
- package/src/contracts/haneulns/name_record.ts +22 -27
- package/src/contracts/haneulns/payment.ts +23 -23
- package/src/contracts/haneulns/pricing_config.ts +16 -16
- package/src/contracts/haneulns/registry.ts +53 -67
- package/src/contracts/haneulns_coupons/coupon_house.ts +13 -13
- package/src/contracts/haneulns_coupons/range.ts +7 -7
- package/src/contracts/haneulns_coupons/rules.ts +27 -27
- package/src/contracts/haneulns_discounts/discounts.ts +7 -7
- package/src/contracts/haneulns_discounts/free_claims.ts +7 -7
- package/src/contracts/haneulns_payments/payments.ts +13 -13
- package/src/contracts/utils/index.ts +185 -24
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
3
|
**************************************************************/
|
|
4
4
|
import { MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
|
|
5
|
-
import { type Transaction } from '@haneullabs/haneul/transactions';
|
|
5
|
+
import { type Transaction, type TransactionArgument } from '@haneullabs/haneul/transactions';
|
|
6
6
|
import * as table from './deps/haneul/table.js';
|
|
7
7
|
const $moduleName = '@haneulns/core::registry';
|
|
8
8
|
export const Registry = new MoveStruct({
|
|
@@ -40,8 +40,8 @@ export function _new(options: NewOptions) {
|
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
export interface AddRecordIgnoringGracePeriodArguments {
|
|
43
|
-
self:
|
|
44
|
-
domain:
|
|
43
|
+
self: TransactionArgument;
|
|
44
|
+
domain: TransactionArgument;
|
|
45
45
|
noYears: RawTransactionArgument<number>;
|
|
46
46
|
}
|
|
47
47
|
export interface AddRecordIgnoringGracePeriodOptions {
|
|
@@ -49,8 +49,8 @@ export interface AddRecordIgnoringGracePeriodOptions {
|
|
|
49
49
|
arguments:
|
|
50
50
|
| AddRecordIgnoringGracePeriodArguments
|
|
51
51
|
| [
|
|
52
|
-
self:
|
|
53
|
-
domain:
|
|
52
|
+
self: TransactionArgument,
|
|
53
|
+
domain: TransactionArgument,
|
|
54
54
|
noYears: RawTransactionArgument<number>,
|
|
55
55
|
];
|
|
56
56
|
}
|
|
@@ -72,8 +72,8 @@ export function addRecordIgnoringGracePeriod(options: AddRecordIgnoringGracePeri
|
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
export interface AddRecordArguments {
|
|
75
|
-
self:
|
|
76
|
-
domain:
|
|
75
|
+
self: TransactionArgument;
|
|
76
|
+
domain: TransactionArgument;
|
|
77
77
|
noYears: RawTransactionArgument<number>;
|
|
78
78
|
}
|
|
79
79
|
export interface AddRecordOptions {
|
|
@@ -81,8 +81,8 @@ export interface AddRecordOptions {
|
|
|
81
81
|
arguments:
|
|
82
82
|
| AddRecordArguments
|
|
83
83
|
| [
|
|
84
|
-
self:
|
|
85
|
-
domain:
|
|
84
|
+
self: TransactionArgument,
|
|
85
|
+
domain: TransactionArgument,
|
|
86
86
|
noYears: RawTransactionArgument<number>,
|
|
87
87
|
];
|
|
88
88
|
}
|
|
@@ -104,14 +104,14 @@ export function addRecord(options: AddRecordOptions) {
|
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
export interface BurnRegistrationObjectArguments {
|
|
107
|
-
self:
|
|
107
|
+
self: TransactionArgument;
|
|
108
108
|
nft: RawTransactionArgument<string>;
|
|
109
109
|
}
|
|
110
110
|
export interface BurnRegistrationObjectOptions {
|
|
111
111
|
package?: string;
|
|
112
112
|
arguments:
|
|
113
113
|
| BurnRegistrationObjectArguments
|
|
114
|
-
| [self:
|
|
114
|
+
| [self: TransactionArgument, nft: RawTransactionArgument<string>];
|
|
115
115
|
}
|
|
116
116
|
/**
|
|
117
117
|
* Attempts to burn an NFT and get storage rebates. Only works if the NFT has
|
|
@@ -130,14 +130,12 @@ export function burnRegistrationObject(options: BurnRegistrationObjectOptions) {
|
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
export interface WrapSubdomainArguments {
|
|
133
|
-
_:
|
|
133
|
+
_: TransactionArgument;
|
|
134
134
|
nft: RawTransactionArgument<string>;
|
|
135
135
|
}
|
|
136
136
|
export interface WrapSubdomainOptions {
|
|
137
137
|
package?: string;
|
|
138
|
-
arguments:
|
|
139
|
-
| WrapSubdomainArguments
|
|
140
|
-
| [_: RawTransactionArgument<string>, nft: RawTransactionArgument<string>];
|
|
138
|
+
arguments: WrapSubdomainArguments | [_: TransactionArgument, nft: RawTransactionArgument<string>];
|
|
141
139
|
}
|
|
142
140
|
/** Allow creation of subdomain wrappers only to authorized modules. */
|
|
143
141
|
export function wrapSubdomain(options: WrapSubdomainOptions) {
|
|
@@ -153,14 +151,14 @@ export function wrapSubdomain(options: WrapSubdomainOptions) {
|
|
|
153
151
|
});
|
|
154
152
|
}
|
|
155
153
|
export interface BurnSubdomainObjectArguments {
|
|
156
|
-
self:
|
|
154
|
+
self: TransactionArgument;
|
|
157
155
|
nft: RawTransactionArgument<string>;
|
|
158
156
|
}
|
|
159
157
|
export interface BurnSubdomainObjectOptions {
|
|
160
158
|
package?: string;
|
|
161
159
|
arguments:
|
|
162
160
|
| BurnSubdomainObjectArguments
|
|
163
|
-
| [self:
|
|
161
|
+
| [self: TransactionArgument, nft: RawTransactionArgument<string>];
|
|
164
162
|
}
|
|
165
163
|
/**
|
|
166
164
|
* Attempts to burn a subdomain registration object, and also invalidates any
|
|
@@ -179,8 +177,8 @@ export function burnSubdomainObject(options: BurnSubdomainObjectOptions) {
|
|
|
179
177
|
});
|
|
180
178
|
}
|
|
181
179
|
export interface AddLeafRecordArguments {
|
|
182
|
-
self:
|
|
183
|
-
domain:
|
|
180
|
+
self: TransactionArgument;
|
|
181
|
+
domain: TransactionArgument;
|
|
184
182
|
target: RawTransactionArgument<string>;
|
|
185
183
|
}
|
|
186
184
|
export interface AddLeafRecordOptions {
|
|
@@ -188,8 +186,8 @@ export interface AddLeafRecordOptions {
|
|
|
188
186
|
arguments:
|
|
189
187
|
| AddLeafRecordArguments
|
|
190
188
|
| [
|
|
191
|
-
self:
|
|
192
|
-
domain:
|
|
189
|
+
self: TransactionArgument,
|
|
190
|
+
domain: TransactionArgument,
|
|
193
191
|
target: RawTransactionArgument<string>,
|
|
194
192
|
];
|
|
195
193
|
}
|
|
@@ -222,14 +220,12 @@ export function addLeafRecord(options: AddLeafRecordOptions) {
|
|
|
222
220
|
});
|
|
223
221
|
}
|
|
224
222
|
export interface RemoveLeafRecordArguments {
|
|
225
|
-
self:
|
|
226
|
-
domain:
|
|
223
|
+
self: TransactionArgument;
|
|
224
|
+
domain: TransactionArgument;
|
|
227
225
|
}
|
|
228
226
|
export interface RemoveLeafRecordOptions {
|
|
229
227
|
package?: string;
|
|
230
|
-
arguments:
|
|
231
|
-
| RemoveLeafRecordArguments
|
|
232
|
-
| [self: RawTransactionArgument<string>, domain: RawTransactionArgument<string>];
|
|
228
|
+
arguments: RemoveLeafRecordArguments | [self: TransactionArgument, domain: TransactionArgument];
|
|
233
229
|
}
|
|
234
230
|
/**
|
|
235
231
|
* Can be used to remove a leaf record. Leaf records do not have any symmetrical
|
|
@@ -249,8 +245,8 @@ export function removeLeafRecord(options: RemoveLeafRecordOptions) {
|
|
|
249
245
|
});
|
|
250
246
|
}
|
|
251
247
|
export interface SetTargetAddressArguments {
|
|
252
|
-
self:
|
|
253
|
-
domain:
|
|
248
|
+
self: TransactionArgument;
|
|
249
|
+
domain: TransactionArgument;
|
|
254
250
|
newTarget: RawTransactionArgument<string | null>;
|
|
255
251
|
}
|
|
256
252
|
export interface SetTargetAddressOptions {
|
|
@@ -258,8 +254,8 @@ export interface SetTargetAddressOptions {
|
|
|
258
254
|
arguments:
|
|
259
255
|
| SetTargetAddressArguments
|
|
260
256
|
| [
|
|
261
|
-
self:
|
|
262
|
-
domain:
|
|
257
|
+
self: TransactionArgument,
|
|
258
|
+
domain: TransactionArgument,
|
|
263
259
|
newTarget: RawTransactionArgument<string | null>,
|
|
264
260
|
];
|
|
265
261
|
}
|
|
@@ -276,14 +272,14 @@ export function setTargetAddress(options: SetTargetAddressOptions) {
|
|
|
276
272
|
});
|
|
277
273
|
}
|
|
278
274
|
export interface UnsetReverseLookupArguments {
|
|
279
|
-
self:
|
|
275
|
+
self: TransactionArgument;
|
|
280
276
|
address: RawTransactionArgument<string>;
|
|
281
277
|
}
|
|
282
278
|
export interface UnsetReverseLookupOptions {
|
|
283
279
|
package?: string;
|
|
284
280
|
arguments:
|
|
285
281
|
| UnsetReverseLookupArguments
|
|
286
|
-
| [self:
|
|
282
|
+
| [self: TransactionArgument, address: RawTransactionArgument<string>];
|
|
287
283
|
}
|
|
288
284
|
export function unsetReverseLookup(options: UnsetReverseLookupOptions) {
|
|
289
285
|
const packageAddress = options.package ?? '@haneulns/core';
|
|
@@ -298,18 +294,18 @@ export function unsetReverseLookup(options: UnsetReverseLookupOptions) {
|
|
|
298
294
|
});
|
|
299
295
|
}
|
|
300
296
|
export interface SetReverseLookupArguments {
|
|
301
|
-
self:
|
|
297
|
+
self: TransactionArgument;
|
|
302
298
|
address: RawTransactionArgument<string>;
|
|
303
|
-
domain:
|
|
299
|
+
domain: TransactionArgument;
|
|
304
300
|
}
|
|
305
301
|
export interface SetReverseLookupOptions {
|
|
306
302
|
package?: string;
|
|
307
303
|
arguments:
|
|
308
304
|
| SetReverseLookupArguments
|
|
309
305
|
| [
|
|
310
|
-
self:
|
|
306
|
+
self: TransactionArgument,
|
|
311
307
|
address: RawTransactionArgument<string>,
|
|
312
|
-
domain:
|
|
308
|
+
domain: TransactionArgument,
|
|
313
309
|
];
|
|
314
310
|
}
|
|
315
311
|
/** Reverse lookup can only be set for the record that has the target address. */
|
|
@@ -326,9 +322,9 @@ export function setReverseLookup(options: SetReverseLookupOptions) {
|
|
|
326
322
|
});
|
|
327
323
|
}
|
|
328
324
|
export interface SetExpirationTimestampMsArguments {
|
|
329
|
-
self:
|
|
325
|
+
self: TransactionArgument;
|
|
330
326
|
nft: RawTransactionArgument<string>;
|
|
331
|
-
domain:
|
|
327
|
+
domain: TransactionArgument;
|
|
332
328
|
expirationTimestampMs: RawTransactionArgument<number | bigint>;
|
|
333
329
|
}
|
|
334
330
|
export interface SetExpirationTimestampMsOptions {
|
|
@@ -336,9 +332,9 @@ export interface SetExpirationTimestampMsOptions {
|
|
|
336
332
|
arguments:
|
|
337
333
|
| SetExpirationTimestampMsArguments
|
|
338
334
|
| [
|
|
339
|
-
self:
|
|
335
|
+
self: TransactionArgument,
|
|
340
336
|
nft: RawTransactionArgument<string>,
|
|
341
|
-
domain:
|
|
337
|
+
domain: TransactionArgument,
|
|
342
338
|
expirationTimestampMs: RawTransactionArgument<number | bigint>,
|
|
343
339
|
];
|
|
344
340
|
}
|
|
@@ -360,19 +356,15 @@ export function setExpirationTimestampMs(options: SetExpirationTimestampMsOption
|
|
|
360
356
|
});
|
|
361
357
|
}
|
|
362
358
|
export interface SetDataArguments {
|
|
363
|
-
self:
|
|
364
|
-
domain:
|
|
365
|
-
data:
|
|
359
|
+
self: TransactionArgument;
|
|
360
|
+
domain: TransactionArgument;
|
|
361
|
+
data: TransactionArgument;
|
|
366
362
|
}
|
|
367
363
|
export interface SetDataOptions {
|
|
368
364
|
package?: string;
|
|
369
365
|
arguments:
|
|
370
366
|
| SetDataArguments
|
|
371
|
-
| [
|
|
372
|
-
self: RawTransactionArgument<string>,
|
|
373
|
-
domain: RawTransactionArgument<string>,
|
|
374
|
-
data: RawTransactionArgument<string>,
|
|
375
|
-
];
|
|
367
|
+
| [self: TransactionArgument, domain: TransactionArgument, data: TransactionArgument];
|
|
376
368
|
}
|
|
377
369
|
/**
|
|
378
370
|
* Update the `data` of the given `NameRecord` using a `HaneulnsRegistration`. Use
|
|
@@ -393,14 +385,12 @@ export function setData(options: SetDataOptions) {
|
|
|
393
385
|
});
|
|
394
386
|
}
|
|
395
387
|
export interface HasRecordArguments {
|
|
396
|
-
self:
|
|
397
|
-
domain:
|
|
388
|
+
self: TransactionArgument;
|
|
389
|
+
domain: TransactionArgument;
|
|
398
390
|
}
|
|
399
391
|
export interface HasRecordOptions {
|
|
400
392
|
package?: string;
|
|
401
|
-
arguments:
|
|
402
|
-
| HasRecordArguments
|
|
403
|
-
| [self: RawTransactionArgument<string>, domain: RawTransactionArgument<string>];
|
|
393
|
+
arguments: HasRecordArguments | [self: TransactionArgument, domain: TransactionArgument];
|
|
404
394
|
}
|
|
405
395
|
/** Check whether the given `domain` is registered in the `Registry`. */
|
|
406
396
|
export function hasRecord(options: HasRecordOptions) {
|
|
@@ -416,14 +406,12 @@ export function hasRecord(options: HasRecordOptions) {
|
|
|
416
406
|
});
|
|
417
407
|
}
|
|
418
408
|
export interface LookupArguments {
|
|
419
|
-
self:
|
|
420
|
-
domain:
|
|
409
|
+
self: TransactionArgument;
|
|
410
|
+
domain: TransactionArgument;
|
|
421
411
|
}
|
|
422
412
|
export interface LookupOptions {
|
|
423
413
|
package?: string;
|
|
424
|
-
arguments:
|
|
425
|
-
| LookupArguments
|
|
426
|
-
| [self: RawTransactionArgument<string>, domain: RawTransactionArgument<string>];
|
|
414
|
+
arguments: LookupArguments | [self: TransactionArgument, domain: TransactionArgument];
|
|
427
415
|
}
|
|
428
416
|
/** Returns the `NameRecord` associated with the given domain or None. */
|
|
429
417
|
export function lookup(options: LookupOptions) {
|
|
@@ -439,14 +427,14 @@ export function lookup(options: LookupOptions) {
|
|
|
439
427
|
});
|
|
440
428
|
}
|
|
441
429
|
export interface ReverseLookupArguments {
|
|
442
|
-
self:
|
|
430
|
+
self: TransactionArgument;
|
|
443
431
|
address: RawTransactionArgument<string>;
|
|
444
432
|
}
|
|
445
433
|
export interface ReverseLookupOptions {
|
|
446
434
|
package?: string;
|
|
447
435
|
arguments:
|
|
448
436
|
| ReverseLookupArguments
|
|
449
|
-
| [self:
|
|
437
|
+
| [self: TransactionArgument, address: RawTransactionArgument<string>];
|
|
450
438
|
}
|
|
451
439
|
/** Returns the `domain_name` associated with the given address or None. */
|
|
452
440
|
export function reverseLookup(options: ReverseLookupOptions) {
|
|
@@ -462,14 +450,14 @@ export function reverseLookup(options: ReverseLookupOptions) {
|
|
|
462
450
|
});
|
|
463
451
|
}
|
|
464
452
|
export interface AssertNftIsAuthorizedArguments {
|
|
465
|
-
self:
|
|
453
|
+
self: TransactionArgument;
|
|
466
454
|
nft: RawTransactionArgument<string>;
|
|
467
455
|
}
|
|
468
456
|
export interface AssertNftIsAuthorizedOptions {
|
|
469
457
|
package?: string;
|
|
470
458
|
arguments:
|
|
471
459
|
| AssertNftIsAuthorizedArguments
|
|
472
|
-
| [self:
|
|
460
|
+
| [self: TransactionArgument, nft: RawTransactionArgument<string>];
|
|
473
461
|
}
|
|
474
462
|
/**
|
|
475
463
|
* Asserts that the provided NFT:
|
|
@@ -490,14 +478,12 @@ export function assertNftIsAuthorized(options: AssertNftIsAuthorizedOptions) {
|
|
|
490
478
|
});
|
|
491
479
|
}
|
|
492
480
|
export interface GetDataArguments {
|
|
493
|
-
self:
|
|
494
|
-
domain:
|
|
481
|
+
self: TransactionArgument;
|
|
482
|
+
domain: TransactionArgument;
|
|
495
483
|
}
|
|
496
484
|
export interface GetDataOptions {
|
|
497
485
|
package?: string;
|
|
498
|
-
arguments:
|
|
499
|
-
| GetDataArguments
|
|
500
|
-
| [self: RawTransactionArgument<string>, domain: RawTransactionArgument<string>];
|
|
486
|
+
arguments: GetDataArguments | [self: TransactionArgument, domain: TransactionArgument];
|
|
501
487
|
}
|
|
502
488
|
/** Returns the `data` associated with the given `Domain`. */
|
|
503
489
|
export function getData(options: GetDataOptions) {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
import { MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
|
|
17
17
|
import { bcs, type BcsType } from '@haneullabs/haneul/bcs';
|
|
18
|
-
import { type Transaction } from '@haneullabs/haneul/transactions';
|
|
18
|
+
import { type Transaction, type TransactionArgument } from '@haneullabs/haneul/transactions';
|
|
19
19
|
import * as data from './data.js';
|
|
20
20
|
const $moduleName = '@haneulns/coupons::coupon_house';
|
|
21
21
|
export const CouponsApp = new MoveStruct({
|
|
@@ -63,7 +63,7 @@ export function setup(options: SetupOptions) {
|
|
|
63
63
|
}
|
|
64
64
|
export interface ApplyCouponArguments {
|
|
65
65
|
haneulns: RawTransactionArgument<string>;
|
|
66
|
-
intent:
|
|
66
|
+
intent: TransactionArgument;
|
|
67
67
|
couponCode: RawTransactionArgument<string>;
|
|
68
68
|
}
|
|
69
69
|
export interface ApplyCouponOptions {
|
|
@@ -72,7 +72,7 @@ export interface ApplyCouponOptions {
|
|
|
72
72
|
| ApplyCouponArguments
|
|
73
73
|
| [
|
|
74
74
|
haneulns: RawTransactionArgument<string>,
|
|
75
|
-
intent:
|
|
75
|
+
intent: TransactionArgument,
|
|
76
76
|
couponCode: RawTransactionArgument<string>,
|
|
77
77
|
];
|
|
78
78
|
}
|
|
@@ -265,11 +265,11 @@ export function setVersion(options: SetVersionOptions) {
|
|
|
265
265
|
});
|
|
266
266
|
}
|
|
267
267
|
export interface AssertVersionIsValidArguments {
|
|
268
|
-
self:
|
|
268
|
+
self: TransactionArgument;
|
|
269
269
|
}
|
|
270
270
|
export interface AssertVersionIsValidOptions {
|
|
271
271
|
package?: string;
|
|
272
|
-
arguments: AssertVersionIsValidArguments | [self:
|
|
272
|
+
arguments: AssertVersionIsValidArguments | [self: TransactionArgument];
|
|
273
273
|
}
|
|
274
274
|
/** Validate that the version of the app is the latest. */
|
|
275
275
|
export function assertVersionIsValid(options: AssertVersionIsValidOptions) {
|
|
@@ -290,7 +290,7 @@ export interface AdminAddCouponArguments {
|
|
|
290
290
|
code: RawTransactionArgument<string>;
|
|
291
291
|
kind: RawTransactionArgument<number>;
|
|
292
292
|
amount: RawTransactionArgument<number | bigint>;
|
|
293
|
-
rules:
|
|
293
|
+
rules: TransactionArgument;
|
|
294
294
|
}
|
|
295
295
|
export interface AdminAddCouponOptions {
|
|
296
296
|
package?: string;
|
|
@@ -302,7 +302,7 @@ export interface AdminAddCouponOptions {
|
|
|
302
302
|
code: RawTransactionArgument<string>,
|
|
303
303
|
kind: RawTransactionArgument<number>,
|
|
304
304
|
amount: RawTransactionArgument<number | bigint>,
|
|
305
|
-
rules:
|
|
305
|
+
rules: TransactionArgument,
|
|
306
306
|
];
|
|
307
307
|
}
|
|
308
308
|
/**
|
|
@@ -355,22 +355,22 @@ export function adminRemoveCoupon(options: AdminRemoveCouponOptions) {
|
|
|
355
355
|
});
|
|
356
356
|
}
|
|
357
357
|
export interface AppAddCouponArguments {
|
|
358
|
-
data:
|
|
358
|
+
data: TransactionArgument;
|
|
359
359
|
code: RawTransactionArgument<string>;
|
|
360
360
|
kind: RawTransactionArgument<number>;
|
|
361
361
|
amount: RawTransactionArgument<number | bigint>;
|
|
362
|
-
rules:
|
|
362
|
+
rules: TransactionArgument;
|
|
363
363
|
}
|
|
364
364
|
export interface AppAddCouponOptions {
|
|
365
365
|
package?: string;
|
|
366
366
|
arguments:
|
|
367
367
|
| AppAddCouponArguments
|
|
368
368
|
| [
|
|
369
|
-
data:
|
|
369
|
+
data: TransactionArgument,
|
|
370
370
|
code: RawTransactionArgument<string>,
|
|
371
371
|
kind: RawTransactionArgument<number>,
|
|
372
372
|
amount: RawTransactionArgument<number | bigint>,
|
|
373
|
-
rules:
|
|
373
|
+
rules: TransactionArgument,
|
|
374
374
|
];
|
|
375
375
|
}
|
|
376
376
|
export function appAddCoupon(options: AppAddCouponOptions) {
|
|
@@ -389,14 +389,14 @@ export function appAddCoupon(options: AppAddCouponOptions) {
|
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
391
|
export interface AppRemoveCouponArguments {
|
|
392
|
-
data:
|
|
392
|
+
data: TransactionArgument;
|
|
393
393
|
code: RawTransactionArgument<string>;
|
|
394
394
|
}
|
|
395
395
|
export interface AppRemoveCouponOptions {
|
|
396
396
|
package?: string;
|
|
397
397
|
arguments:
|
|
398
398
|
| AppRemoveCouponArguments
|
|
399
|
-
| [data:
|
|
399
|
+
| [data: TransactionArgument, code: RawTransactionArgument<string>];
|
|
400
400
|
}
|
|
401
401
|
export function appRemoveCoupon(options: AppRemoveCouponOptions) {
|
|
402
402
|
const packageAddress = options.package ?? '@haneulns/coupons';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import { MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
|
|
8
8
|
import { bcs } from '@haneullabs/haneul/bcs';
|
|
9
|
-
import { type Transaction } from '@haneullabs/haneul/transactions';
|
|
9
|
+
import { type Transaction, type TransactionArgument } from '@haneullabs/haneul/transactions';
|
|
10
10
|
const $moduleName = '@haneulns/coupons::range';
|
|
11
11
|
export const Range = new MoveStruct({
|
|
12
12
|
name: `${$moduleName}::Range`,
|
|
@@ -38,14 +38,14 @@ export function _new(options: NewOptions) {
|
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
export interface IsInRangeArguments {
|
|
41
|
-
range:
|
|
41
|
+
range: TransactionArgument;
|
|
42
42
|
number: RawTransactionArgument<number>;
|
|
43
43
|
}
|
|
44
44
|
export interface IsInRangeOptions {
|
|
45
45
|
package?: string;
|
|
46
46
|
arguments:
|
|
47
47
|
| IsInRangeArguments
|
|
48
|
-
| [range:
|
|
48
|
+
| [range: TransactionArgument, number: RawTransactionArgument<number>];
|
|
49
49
|
}
|
|
50
50
|
export function isInRange(options: IsInRangeOptions) {
|
|
51
51
|
const packageAddress = options.package ?? '@haneulns/coupons';
|
|
@@ -60,11 +60,11 @@ export function isInRange(options: IsInRangeOptions) {
|
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
export interface FromArguments {
|
|
63
|
-
range:
|
|
63
|
+
range: TransactionArgument;
|
|
64
64
|
}
|
|
65
65
|
export interface FromOptions {
|
|
66
66
|
package?: string;
|
|
67
|
-
arguments: FromArguments | [range:
|
|
67
|
+
arguments: FromArguments | [range: TransactionArgument];
|
|
68
68
|
}
|
|
69
69
|
/** Get floor limit for the range. */
|
|
70
70
|
export function _from(options: FromOptions) {
|
|
@@ -80,11 +80,11 @@ export function _from(options: FromOptions) {
|
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
export interface ToArguments {
|
|
83
|
-
range:
|
|
83
|
+
range: TransactionArgument;
|
|
84
84
|
}
|
|
85
85
|
export interface ToOptions {
|
|
86
86
|
package?: string;
|
|
87
|
-
arguments: ToArguments | [range:
|
|
87
|
+
arguments: ToArguments | [range: TransactionArgument];
|
|
88
88
|
}
|
|
89
89
|
/** Get upper limit for the range. */
|
|
90
90
|
export function to(options: ToOptions) {
|