wowok 1.2.5 → 1.2.8
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/demand.d.ts +3 -2
- package/dist/demand.d.ts.map +1 -1
- package/dist/demand.js +21 -7
- package/dist/entity.d.ts +2 -1
- package/dist/entity.d.ts.map +1 -1
- package/dist/entity.js +23 -7
- package/dist/exception.d.ts +3 -1
- package/dist/exception.d.ts.map +1 -1
- package/dist/exception.js +3 -1
- package/dist/guard.js +1 -1
- package/dist/machine.js +2 -2
- package/dist/permission.d.ts +20 -4
- package/dist/permission.d.ts.map +1 -1
- package/dist/permission.js +146 -13
- package/dist/protocol.d.ts +30 -6
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +124 -17
- package/dist/repository.d.ts +6 -3
- package/dist/repository.d.ts.map +1 -1
- package/dist/repository.js +59 -40
- package/dist/resource.d.ts +20 -6
- package/dist/resource.d.ts.map +1 -1
- package/dist/resource.js +58 -21
- package/dist/reward.d.ts +6 -3
- package/dist/reward.d.ts.map +1 -1
- package/dist/reward.js +43 -19
- package/dist/service.d.ts +6 -3
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +76 -44
- package/dist/utils.d.ts +15 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +150 -13
- package/dist/vote.d.ts +2 -2
- package/dist/vote.d.ts.map +1 -1
- package/dist/vote.js +14 -14
- package/package.json +1 -1
- package/src/demand.ts +26 -12
- package/src/entity.ts +33 -6
- package/src/exception.ts +3 -1
- package/src/guard.ts +2 -2
- package/src/machine.ts +207 -55
- package/src/permission.ts +168 -41
- package/src/progress.ts +101 -43
- package/src/protocol.ts +129 -20
- package/src/repository.ts +160 -53
- package/src/resource.ts +75 -24
- package/src/reward.ts +53 -32
- package/src/service.ts +109 -74
- package/src/utils.ts +174 -22
- package/src/vote.ts +30 -33
- package/src/wowok.ts +2 -2
package/dist/reward.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reward.d.ts","sourceRoot":"","sources":["../src/reward.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"reward.d.ts","sourceRoot":"","sources":["../src/reward.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,KAAK,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAE5G,OAAO,EAAc,WAAW,EAAE,cAAc,EAAE,gBAAgB,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAG,MAAM,YAAY,CAAC;AAK5H,MAAM,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAC3C,MAAM,MAAM,mBAAmB,GAAG;IAC9B,KAAK,EAAC,WAAW,CAAC;IAClB,QAAQ,EAAC,MAAM,CAAC;CACnB,CAAA;AAED,qBAAa,MAAM;IACf,SAAS,CAAC,YAAY,SAAC;IACvB,SAAS,CAAC,UAAU,mBAAE;IACtB,SAAS,CAAC,MAAM,EAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,QAAQ,WAAC;IAEnB,gBAAgB;IAChB,UAAU;IACV,OAAO;IAMP,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAC,QAAQ,EAAE,YAAY,EAAC,MAAM,EAAE,UAAU,EAAC,gBAAgB,EAAE,MAAM,EAAC,SAAS,GAAI,MAAM;IAK3G,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAC,QAAQ,EAAE,YAAY,EAAC,MAAM,EAAE,UAAU,EAAC,gBAAgB,EAAE,WAAW,EAAC,MAAM,EAC9F,SAAS,EAAC,OAAO,EAAE,IAAI,EAAC,MAAM,EAAE,QAAQ,CAAC,EAAC,cAAc,GAAI,MAAM;IAmCtE,MAAM,IAAI,aAAa;IASvB,OAAO;IAQP,MAAM,CAAC,QAAQ,CAAC,EAAC,cAAc;IAiB/B,WAAW,CAAC,SAAS,EAAC,OAAO,EAAE,IAAI,EAAC,MAAM,EAAE,QAAQ,CAAC,EAAC,cAAc;IAwBpE,SAAS,CAAC,MAAM,EAAC,mBAAmB,EAAE,EAAE,QAAQ,CAAC,EAAC,cAAc;IAqChE,YAAY,CAAC,MAAM,EAAC,MAAM,EAAE,EAAE,SAAS,CAAC,EAAC,OAAO,EAAE,QAAQ,CAAC,EAAC,cAAc;IA2C1E,kBAAkB,CAAC,kBAAkB,EAAC,OAAO,EAAE,QAAQ,CAAC,EAAC,cAAc;IAmBvE,eAAe,CAAC,WAAW,EAAC,MAAM,EAAE,QAAQ,CAAC,EAAC,cAAc;IAqB5D,WAAW,CAAC,QAAQ,CAAC,EAAC,cAAc;IAiBpC,KAAK,CAAC,QAAQ,CAAC,EAAC,cAAc;IAiB9B,OAAO,CAAC,OAAO,EAAC,iBAAiB,EAAE;IAanC,WAAW,CAAC,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAC,cAAc;IAkB1D,iBAAiB,CAAC,cAAc,EAAC,gBAAgB;IAajD,MAAM,CAAC,eAAe,eAAe,MAAM,KAAI,MAAM,CAUpD;IACD,MAAM,CAAC,kBAAkB,SAAO;IAChC,MAAM,CAAC,eAAe,SAAM;CAC/B"}
|
package/dist/reward.js
CHANGED
|
@@ -20,7 +20,7 @@ export class Reward {
|
|
|
20
20
|
r.object = Protocol.TXB_OBJECT(protocol.CurrentSession(), object);
|
|
21
21
|
return r;
|
|
22
22
|
}
|
|
23
|
-
static New(protocol, earnest_type, permission, description,
|
|
23
|
+
static New(protocol, earnest_type, permission, description, ms_expand, time, passport) {
|
|
24
24
|
if (!Protocol.IsValidObjects([permission])) {
|
|
25
25
|
ERROR(Errors.IsValidObjects, 'permission');
|
|
26
26
|
}
|
|
@@ -30,15 +30,15 @@ export class Reward {
|
|
|
30
30
|
if (!IsValidDesription(description)) {
|
|
31
31
|
ERROR(Errors.IsValidDesription);
|
|
32
32
|
}
|
|
33
|
-
if (!IsValidUint(
|
|
34
|
-
ERROR(Errors.IsValidUint, '
|
|
33
|
+
if (!IsValidUint(time)) {
|
|
34
|
+
ERROR(Errors.IsValidUint, 'time');
|
|
35
35
|
}
|
|
36
36
|
let r = new Reward(protocol, earnest_type, permission);
|
|
37
37
|
let txb = protocol.CurrentSession();
|
|
38
38
|
if (passport) {
|
|
39
39
|
r.object = txb.moveCall({
|
|
40
40
|
target: protocol.RewardFn('new_with_passport'),
|
|
41
|
-
arguments: [passport, txb.pure(description), txb.pure(
|
|
41
|
+
arguments: [passport, txb.pure(description), txb.pure(ms_expand, BCS.BOOL), txb.pure(time, BCS.U64),
|
|
42
42
|
txb.object(Protocol.CLOCK_OBJECT), Protocol.TXB_OBJECT(txb, permission)],
|
|
43
43
|
typeArguments: [earnest_type]
|
|
44
44
|
});
|
|
@@ -46,7 +46,7 @@ export class Reward {
|
|
|
46
46
|
else {
|
|
47
47
|
r.object = txb.moveCall({
|
|
48
48
|
target: protocol.RewardFn('new'),
|
|
49
|
-
arguments: [txb.pure(description), txb.pure(
|
|
49
|
+
arguments: [txb.pure(description), txb.pure(ms_expand, BCS.BOOL), txb.pure(time, BCS.U64),
|
|
50
50
|
txb.object(Protocol.CLOCK_OBJECT), Protocol.TXB_OBJECT(txb, permission)],
|
|
51
51
|
typeArguments: [earnest_type]
|
|
52
52
|
});
|
|
@@ -68,15 +68,6 @@ export class Reward {
|
|
|
68
68
|
arguments: [Protocol.TXB_OBJECT(txb, this.object)],
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
-
/*
|
|
72
|
-
mark(like:'like' | 'unlike', resource:Resource) {
|
|
73
|
-
let txb = this.protocol.CurrentSession();
|
|
74
|
-
txb.moveCall({
|
|
75
|
-
target:this.protocol.RewardFn(like) as FnCallType,
|
|
76
|
-
arguments: [Protocol.TXB_OBJECT(txb, resource.get_object()), Protocol.TXB_OBJECT(txb, this.object)],
|
|
77
|
-
})
|
|
78
|
-
}
|
|
79
|
-
*/
|
|
80
71
|
refund(passport) {
|
|
81
72
|
let txb = this.protocol.CurrentSession();
|
|
82
73
|
if (passport) {
|
|
@@ -94,22 +85,24 @@ export class Reward {
|
|
|
94
85
|
});
|
|
95
86
|
}
|
|
96
87
|
}
|
|
97
|
-
expand_time(
|
|
98
|
-
if (!IsValidUint(
|
|
88
|
+
expand_time(ms_expand, time, passport) {
|
|
89
|
+
if (!IsValidUint(time)) {
|
|
99
90
|
ERROR(Errors.IsValidUint, 'minutes_expand');
|
|
100
91
|
}
|
|
101
92
|
let txb = this.protocol.CurrentSession();
|
|
102
93
|
if (passport) {
|
|
103
94
|
txb.moveCall({
|
|
104
95
|
target: this.protocol.RewardFn('time_expand_with_passport'),
|
|
105
|
-
arguments: [passport, Protocol.TXB_OBJECT(txb, this.object), txb.pure(
|
|
96
|
+
arguments: [passport, Protocol.TXB_OBJECT(txb, this.object), txb.pure(ms_expand, BCS.BOOL),
|
|
97
|
+
txb.pure(time, BCS.U64), Protocol.TXB_OBJECT(txb, this.permission)],
|
|
106
98
|
typeArguments: [this.earnest_type]
|
|
107
99
|
});
|
|
108
100
|
}
|
|
109
101
|
else {
|
|
110
102
|
txb.moveCall({
|
|
111
103
|
target: this.protocol.RewardFn('time_expand'),
|
|
112
|
-
arguments: [Protocol.TXB_OBJECT(txb, this.object), txb.pure(
|
|
104
|
+
arguments: [Protocol.TXB_OBJECT(txb, this.object), txb.pure(ms_expand, BCS.BOOL),
|
|
105
|
+
txb.pure(time, BCS.U64), Protocol.TXB_OBJECT(txb, this.permission)],
|
|
113
106
|
typeArguments: [this.earnest_type]
|
|
114
107
|
});
|
|
115
108
|
}
|
|
@@ -265,6 +258,7 @@ export class Reward {
|
|
|
265
258
|
;
|
|
266
259
|
}
|
|
267
260
|
deposit(rewards) {
|
|
261
|
+
console.log(rewards);
|
|
268
262
|
if (!rewards || !Protocol.IsValidObjects(rewards)) {
|
|
269
263
|
ERROR(Errors.IsValidArray);
|
|
270
264
|
}
|
|
@@ -275,17 +269,47 @@ export class Reward {
|
|
|
275
269
|
typeArguments: [this.earnest_type]
|
|
276
270
|
});
|
|
277
271
|
}
|
|
272
|
+
allow_claim(bAllowClaim, passport) {
|
|
273
|
+
let txb = this.protocol.CurrentSession();
|
|
274
|
+
if (passport) {
|
|
275
|
+
txb.moveCall({
|
|
276
|
+
target: this.protocol.RewardFn('allow_claim_with_passport'),
|
|
277
|
+
arguments: [passport, Protocol.TXB_OBJECT(txb, this.object), Protocol.TXB_OBJECT(txb, this.permission),
|
|
278
|
+
txb.pure(bAllowClaim, BCS.BOOL)],
|
|
279
|
+
typeArguments: [this.earnest_type]
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
txb.moveCall({
|
|
284
|
+
target: this.protocol.RewardFn('allow_claim'),
|
|
285
|
+
arguments: [Protocol.TXB_OBJECT(txb, this.object), Protocol.TXB_OBJECT(txb, this.permission), txb.pure(bAllowClaim, BCS.BOOL)],
|
|
286
|
+
typeArguments: [this.earnest_type]
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
}
|
|
278
290
|
change_permission(new_permission) {
|
|
279
291
|
if (!Protocol.IsValidObjects([new_permission])) {
|
|
280
292
|
ERROR(Errors.IsValidObjects);
|
|
281
293
|
}
|
|
282
294
|
let txb = this.protocol.CurrentSession();
|
|
283
295
|
txb.moveCall({
|
|
284
|
-
target: this.protocol.RewardFn('
|
|
296
|
+
target: this.protocol.RewardFn('permission_set'),
|
|
285
297
|
arguments: [Protocol.TXB_OBJECT(txb, this.object), Protocol.TXB_OBJECT(txb, this.permission), Protocol.TXB_OBJECT(txb, new_permission)],
|
|
286
298
|
typeArguments: [this.earnest_type]
|
|
287
299
|
});
|
|
288
300
|
this.permission = new_permission;
|
|
289
301
|
}
|
|
302
|
+
static parseObjectType = (chain_type) => {
|
|
303
|
+
if (chain_type) {
|
|
304
|
+
const s = 'reward::Reward<';
|
|
305
|
+
const i = chain_type.indexOf(s);
|
|
306
|
+
if (i > 0) {
|
|
307
|
+
let r = chain_type.slice(i + s.length, chain_type.length - 1);
|
|
308
|
+
return r;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
return '';
|
|
312
|
+
};
|
|
290
313
|
static MAX_PORTIONS_COUNT = 255;
|
|
314
|
+
static MAX_GUARD_COUNT = 16;
|
|
291
315
|
}
|
package/dist/service.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export type Service_Sale = {
|
|
|
7
7
|
item: string;
|
|
8
8
|
price: number;
|
|
9
9
|
stock: number;
|
|
10
|
+
endpoint?: string;
|
|
10
11
|
};
|
|
11
12
|
export declare enum Service_Discount_Type {
|
|
12
13
|
ratio = 0,
|
|
@@ -50,7 +51,6 @@ export declare class Service {
|
|
|
50
51
|
protected permission: PermissionObject;
|
|
51
52
|
protected object: TxbObject;
|
|
52
53
|
protected protocol: Protocol;
|
|
53
|
-
static token2coin: (token: string) => string;
|
|
54
54
|
get_pay_type(): string;
|
|
55
55
|
get_object(): TxbObject;
|
|
56
56
|
private constructor();
|
|
@@ -63,6 +63,7 @@ export declare class Service {
|
|
|
63
63
|
set_stock(item: string, stock: number, bNotFoundAssert?: boolean, passport?: PassportObject): void;
|
|
64
64
|
add_stock(item: string, stock_add: number, bNotFoundAssert?: boolean, passport?: PassportObject): void;
|
|
65
65
|
reduce_stock(item: string, stock_reduce: number, bNotFoundAssert?: boolean, passport?: PassportObject): void;
|
|
66
|
+
set_sale_endpoint(item: string, endpoint?: string, bNotFoundAssert?: boolean, passport?: PassportObject): void;
|
|
66
67
|
set_payee(payee: string, passport?: PassportObject): void;
|
|
67
68
|
repository_add(repository: RepositoryObject, passport?: PassportObject): void;
|
|
68
69
|
repository_remove(repository_address?: string[], removeall?: boolean, passport?: PassportObject): void;
|
|
@@ -71,8 +72,8 @@ export declare class Service {
|
|
|
71
72
|
add_refund_guards(guards: Service_Guard_Percent[], passport?: PassportObject): void;
|
|
72
73
|
remove_refund_guards(guard_address?: string[], removeall?: boolean, passport?: PassportObject): void;
|
|
73
74
|
is_valid_sale(sales: Service_Sale[]): boolean;
|
|
74
|
-
add_sale(sales: Service_Sale[], passport?: PassportObject): void;
|
|
75
|
-
remove_sales(sales?: string[],
|
|
75
|
+
add_sale(sales: Service_Sale[], bExistAssert?: boolean, passport?: PassportObject): void;
|
|
76
|
+
remove_sales(sales?: string[], passport?: PassportObject): void;
|
|
76
77
|
discount_transfer(discount_dispatch: DicountDispatch[], passport?: PassportObject): void;
|
|
77
78
|
withdraw(order: OrderObject, passport?: PassportObject): void;
|
|
78
79
|
set_buy_guard(guard?: GuardObject, passport?: PassportObject): void;
|
|
@@ -94,5 +95,7 @@ export declare class Service {
|
|
|
94
95
|
static MAX_DISCOUNT_RECEIVER_COUNT: number;
|
|
95
96
|
static MAX_GUARD_COUNT: number;
|
|
96
97
|
static MAX_REPOSITORY_COUNT: number;
|
|
98
|
+
static parseObjectType: (chain_type: string | undefined | null) => string;
|
|
99
|
+
static endpoint: (service_endpoint: string, item_endpoint: string, item_name: string) => string | undefined;
|
|
97
100
|
}
|
|
98
101
|
//# sourceMappingURL=service.d.ts.map
|
package/dist/service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAc,WAAW,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,cAAc,EAC/G,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAC9E,SAAS,EAAC,MAAM,YAAY,CAAC;AAIjC,MAAM,MAAM,qBAAqB,GAAG;IAChC,KAAK,EAAC,WAAW,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACnB,CAAA;AACD,MAAM,MAAM,YAAY,GAAG;IACvB,IAAI,EAAC,MAAM,CAAC;IACZ,KAAK,EAAC,MAAM,CAAC;IACb,KAAK,EAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAc,WAAW,EAAE,cAAc,EAAE,gBAAgB,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AAM;IAEjC,MAAM,CAAC,eAAe,eAAe,MAAM,GAAG,SAAS,GAAG,IAAI,KAAI,MAAM,CASvE;IACD,MAAM,CAAC,QAAQ,qBAAqB,MAAM,iBAAgB,MAAM,aAAY,MAAM,wBAMjF;CAEJ"}
|
package/dist/service.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BCS } from '@mysten/bcs';
|
|
2
|
-
import { IsValidArray, IsValidPercent, IsValidName_AllowEmpty, Bcs, array_unique,
|
|
2
|
+
import { IsValidArray, IsValidPercent, IsValidName_AllowEmpty, Bcs, array_unique, IsValidTokenType, IsValidDesription, IsValidAddress, IsValidEndpoint, OptionNone, IsValidUint, IsValidInt, IsValidName, } from './utils';
|
|
3
3
|
import { Protocol, ValueType } from './protocol';
|
|
4
4
|
import { ERROR, Errors } from './exception';
|
|
5
5
|
export var Service_Discount_Type;
|
|
@@ -19,7 +19,7 @@ export class Service {
|
|
|
19
19
|
permission;
|
|
20
20
|
object;
|
|
21
21
|
protocol;
|
|
22
|
-
static token2coin = (token) => { return '0x2::coin::Coin<' + token + '>'
|
|
22
|
+
//static token2coin = (token:string) => { return '0x2::coin::Coin<' + token + '>'};
|
|
23
23
|
get_pay_type() { return this.pay_token_type; }
|
|
24
24
|
get_object() { return this.object; }
|
|
25
25
|
constructor(protocol, pay_token_type, permission) {
|
|
@@ -29,7 +29,7 @@ export class Service {
|
|
|
29
29
|
this.object = '';
|
|
30
30
|
}
|
|
31
31
|
static From(protocol, token_type, permission, object) {
|
|
32
|
-
let s = new Service(protocol,
|
|
32
|
+
let s = new Service(protocol, token_type, permission);
|
|
33
33
|
s.object = Protocol.TXB_OBJECT(protocol.CurrentSession(), object);
|
|
34
34
|
return s;
|
|
35
35
|
}
|
|
@@ -37,8 +37,8 @@ export class Service {
|
|
|
37
37
|
if (!Protocol.IsValidObjects([permission])) {
|
|
38
38
|
ERROR(Errors.IsValidObjects);
|
|
39
39
|
}
|
|
40
|
-
if (!
|
|
41
|
-
ERROR(Errors.
|
|
40
|
+
if (!IsValidTokenType(token_type)) {
|
|
41
|
+
ERROR(Errors.IsValidTokenType, 'New: pay_token_type');
|
|
42
42
|
}
|
|
43
43
|
if (!IsValidDesription(description)) {
|
|
44
44
|
ERROR(Errors.IsValidDesription);
|
|
@@ -49,7 +49,7 @@ export class Service {
|
|
|
49
49
|
if (endpoint && !IsValidEndpoint(endpoint)) {
|
|
50
50
|
ERROR(Errors.IsValidEndpoint);
|
|
51
51
|
}
|
|
52
|
-
let pay_token_type =
|
|
52
|
+
let pay_token_type = token_type;
|
|
53
53
|
let s = new Service(protocol, pay_token_type, permission);
|
|
54
54
|
let txb = protocol.CurrentSession();
|
|
55
55
|
let ep = endpoint ? txb.pure(Bcs.getInstance().ser(ValueType.TYPE_OPTION_STRING, endpoint)) : OptionNone(txb);
|
|
@@ -205,6 +205,32 @@ export class Service {
|
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
+
set_sale_endpoint(item, endpoint, bNotFoundAssert = true, passport) {
|
|
209
|
+
if (!IsValidName(item)) {
|
|
210
|
+
ERROR(Errors.IsValidName, 'set_sale_endpoint');
|
|
211
|
+
}
|
|
212
|
+
if (endpoint && !IsValidEndpoint(endpoint)) {
|
|
213
|
+
ERROR(Errors.IsValidEndpoint, 'set_sale_endpoint');
|
|
214
|
+
}
|
|
215
|
+
let txb = this.protocol.CurrentSession();
|
|
216
|
+
let ep = endpoint ? txb.pure(Bcs.getInstance().ser(ValueType.TYPE_OPTION_STRING, endpoint)) : OptionNone(txb);
|
|
217
|
+
if (passport) {
|
|
218
|
+
txb.moveCall({
|
|
219
|
+
target: this.protocol.ServiceFn('sale_endpoint_set_with_passport'),
|
|
220
|
+
arguments: [passport, Protocol.TXB_OBJECT(txb, this.object), txb.pure(item), ep,
|
|
221
|
+
txb.pure(bNotFoundAssert, BCS.BOOL), Protocol.TXB_OBJECT(txb, this.permission)],
|
|
222
|
+
typeArguments: [this.pay_token_type]
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
txb.moveCall({
|
|
227
|
+
target: this.protocol.ServiceFn('sale_endpoint_set'),
|
|
228
|
+
arguments: [Protocol.TXB_OBJECT(txb, this.object), txb.pure(item), ep,
|
|
229
|
+
txb.pure(bNotFoundAssert, BCS.BOOL), Protocol.TXB_OBJECT(txb, this.permission)],
|
|
230
|
+
typeArguments: [this.pay_token_type]
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
}
|
|
208
234
|
set_payee(payee, passport) {
|
|
209
235
|
if (!IsValidAddress(payee)) {
|
|
210
236
|
ERROR(Errors.IsValidAddress, 'payee');
|
|
@@ -452,24 +478,30 @@ export class Service {
|
|
|
452
478
|
});
|
|
453
479
|
return bValid;
|
|
454
480
|
}
|
|
455
|
-
add_sale(sales, passport) {
|
|
481
|
+
add_sale(sales, bExistAssert = false, passport) {
|
|
456
482
|
if (!sales || !this.is_valid_sale(sales)) {
|
|
457
|
-
ERROR(Errors.InvalidParam, '
|
|
483
|
+
ERROR(Errors.InvalidParam, 'add_sale');
|
|
458
484
|
}
|
|
459
485
|
let names = [];
|
|
460
486
|
let price = [];
|
|
461
487
|
let stock = [];
|
|
488
|
+
let endpoint = [];
|
|
462
489
|
sales.forEach((s) => {
|
|
490
|
+
if (s.endpoint && !IsValidEndpoint(s.endpoint)) {
|
|
491
|
+
ERROR(Errors.IsValidEndpoint, 'add_sale');
|
|
492
|
+
}
|
|
463
493
|
names.push(s.item);
|
|
464
494
|
price.push(s.price);
|
|
465
495
|
stock.push(s.stock);
|
|
496
|
+
endpoint.push(s.endpoint ?? '');
|
|
466
497
|
});
|
|
467
498
|
let txb = this.protocol.CurrentSession();
|
|
468
499
|
if (passport) {
|
|
469
500
|
txb.moveCall({
|
|
470
501
|
target: this.protocol.ServiceFn('sales_add_with_passport'),
|
|
471
502
|
arguments: [passport, Protocol.TXB_OBJECT(txb, this.object), txb.pure(Bcs.getInstance().ser(ValueType.TYPE_VEC_STRING, names)),
|
|
472
|
-
txb.pure(Bcs.getInstance().ser(ValueType.
|
|
503
|
+
txb.pure(Bcs.getInstance().ser(ValueType.TYPE_VEC_STRING, endpoint)), txb.pure(Bcs.getInstance().ser(ValueType.TYPE_VEC_U64, price)),
|
|
504
|
+
txb.pure(Bcs.getInstance().ser(ValueType.TYPE_VEC_U64, stock)), txb.pure(Bcs.getInstance().ser(ValueType.TYPE_BOOL, bExistAssert)),
|
|
473
505
|
Protocol.TXB_OBJECT(txb, this.permission)],
|
|
474
506
|
typeArguments: [this.pay_token_type]
|
|
475
507
|
});
|
|
@@ -478,14 +510,16 @@ export class Service {
|
|
|
478
510
|
txb.moveCall({
|
|
479
511
|
target: this.protocol.ServiceFn('sales_add'),
|
|
480
512
|
arguments: [Protocol.TXB_OBJECT(txb, this.object), txb.pure(Bcs.getInstance().ser(ValueType.TYPE_VEC_STRING, names)),
|
|
513
|
+
txb.pure(Bcs.getInstance().ser(ValueType.TYPE_VEC_STRING, endpoint)),
|
|
481
514
|
txb.pure(Bcs.getInstance().ser(ValueType.TYPE_VEC_U64, price)), txb.pure(Bcs.getInstance().ser(ValueType.TYPE_VEC_U64, stock)),
|
|
515
|
+
txb.pure(Bcs.getInstance().ser(ValueType.TYPE_BOOL, bExistAssert)),
|
|
482
516
|
Protocol.TXB_OBJECT(txb, this.permission)],
|
|
483
517
|
typeArguments: [this.pay_token_type]
|
|
484
518
|
});
|
|
485
519
|
}
|
|
486
520
|
}
|
|
487
|
-
remove_sales(sales,
|
|
488
|
-
if (!
|
|
521
|
+
remove_sales(sales, passport) {
|
|
522
|
+
if (!sales) {
|
|
489
523
|
ERROR(Errors.AllInvalid, 'sales & removeall');
|
|
490
524
|
}
|
|
491
525
|
if (sales && !IsValidArray(sales, IsValidName)) {
|
|
@@ -493,38 +527,20 @@ export class Service {
|
|
|
493
527
|
}
|
|
494
528
|
let txb = this.protocol.CurrentSession();
|
|
495
529
|
if (passport) {
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
}
|
|
503
|
-
else {
|
|
504
|
-
txb.moveCall({
|
|
505
|
-
target: this.protocol.ServiceFn('sales_remove_with_passport'),
|
|
506
|
-
arguments: [passport, Protocol.TXB_OBJECT(txb, this.object), txb.pure(Bcs.getInstance().ser(ValueType.TYPE_VEC_STRING, array_unique(sales))),
|
|
507
|
-
Protocol.TXB_OBJECT(txb, this.permission)],
|
|
508
|
-
typeArguments: [this.pay_token_type]
|
|
509
|
-
});
|
|
510
|
-
}
|
|
530
|
+
txb.moveCall({
|
|
531
|
+
target: this.protocol.ServiceFn('sales_remove_with_passport'),
|
|
532
|
+
arguments: [passport, Protocol.TXB_OBJECT(txb, this.object), txb.pure(Bcs.getInstance().ser(ValueType.TYPE_VEC_STRING, array_unique(sales))),
|
|
533
|
+
Protocol.TXB_OBJECT(txb, this.permission)],
|
|
534
|
+
typeArguments: [this.pay_token_type]
|
|
535
|
+
});
|
|
511
536
|
}
|
|
512
537
|
else {
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
}
|
|
520
|
-
else {
|
|
521
|
-
txb.moveCall({
|
|
522
|
-
target: this.protocol.ServiceFn('sales_remove'),
|
|
523
|
-
arguments: [Protocol.TXB_OBJECT(txb, this.object), txb.pure(Bcs.getInstance().ser(ValueType.TYPE_VEC_STRING, array_unique(sales))),
|
|
524
|
-
Protocol.TXB_OBJECT(txb, this.permission)],
|
|
525
|
-
typeArguments: [this.pay_token_type]
|
|
526
|
-
});
|
|
527
|
-
}
|
|
538
|
+
txb.moveCall({
|
|
539
|
+
target: this.protocol.ServiceFn('sales_remove'),
|
|
540
|
+
arguments: [Protocol.TXB_OBJECT(txb, this.object), txb.pure(Bcs.getInstance().ser(ValueType.TYPE_VEC_STRING, array_unique(sales))),
|
|
541
|
+
Protocol.TXB_OBJECT(txb, this.permission)],
|
|
542
|
+
typeArguments: [this.pay_token_type]
|
|
543
|
+
});
|
|
528
544
|
}
|
|
529
545
|
}
|
|
530
546
|
discount_transfer(discount_dispatch, passport) {
|
|
@@ -735,8 +751,6 @@ export class Service {
|
|
|
735
751
|
ERROR(Errors.InvalidParam, 'customer_required');
|
|
736
752
|
}
|
|
737
753
|
let req = array_unique(customer_required);
|
|
738
|
-
console.log(req);
|
|
739
|
-
console.log(this.pay_token_type);
|
|
740
754
|
let txb = this.protocol.CurrentSession();
|
|
741
755
|
if (passport) {
|
|
742
756
|
txb.moveCall({
|
|
@@ -893,7 +907,7 @@ export class Service {
|
|
|
893
907
|
names.push(v.item);
|
|
894
908
|
});
|
|
895
909
|
if (!bValid) {
|
|
896
|
-
ERROR(Errors.InvalidParam, 'buy_items');
|
|
910
|
+
ERROR(Errors.InvalidParam, 'buy_items 2');
|
|
897
911
|
}
|
|
898
912
|
let name = [];
|
|
899
913
|
let price = [];
|
|
@@ -990,4 +1004,22 @@ export class Service {
|
|
|
990
1004
|
static MAX_DISCOUNT_RECEIVER_COUNT = 20;
|
|
991
1005
|
static MAX_GUARD_COUNT = 16;
|
|
992
1006
|
static MAX_REPOSITORY_COUNT = 16;
|
|
1007
|
+
static parseObjectType = (chain_type) => {
|
|
1008
|
+
if (chain_type) {
|
|
1009
|
+
const s = 'service::Service<';
|
|
1010
|
+
const i = chain_type.indexOf(s);
|
|
1011
|
+
if (i > 0) {
|
|
1012
|
+
return chain_type.slice(i + s.length, chain_type.length - 1);
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
return '';
|
|
1016
|
+
};
|
|
1017
|
+
static endpoint = (service_endpoint, item_endpoint, item_name) => {
|
|
1018
|
+
if (item_endpoint) {
|
|
1019
|
+
return item_endpoint;
|
|
1020
|
+
}
|
|
1021
|
+
else if (service_endpoint) {
|
|
1022
|
+
return service_endpoint + '/sales/' + encodeURI(item_name);
|
|
1023
|
+
}
|
|
1024
|
+
};
|
|
993
1025
|
}
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { BCS } from '@mysten/bcs';
|
|
2
2
|
import { TransactionBlock, TransactionArgument } from '@mysten/sui.js/transactions';
|
|
3
|
-
import { ValueType } from './protocol';
|
|
3
|
+
import { RepositoryValueType, ValueType } from './protocol';
|
|
4
|
+
export declare const MAX_U8: bigint;
|
|
5
|
+
export declare const MAX_U64: bigint;
|
|
6
|
+
export declare const MAX_U128: bigint;
|
|
7
|
+
export declare const MAX_U256: bigint;
|
|
4
8
|
export declare const OPTION_NONE = 0;
|
|
9
|
+
export declare const ValueTypeConvert: (type: ValueType | null | undefined) => RepositoryValueType | number;
|
|
10
|
+
export declare const ResolveRepositoryData: (dataType: RepositoryValueType, data: Uint8Array) => {
|
|
11
|
+
type: ValueType;
|
|
12
|
+
data: Uint8Array;
|
|
13
|
+
} | undefined;
|
|
5
14
|
export declare const readOption: (arr: number[], de: ValueType) => {
|
|
6
15
|
bNone: boolean;
|
|
7
16
|
value: any;
|
|
@@ -31,6 +40,8 @@ export declare class Bcs {
|
|
|
31
40
|
static getInstance(): Bcs;
|
|
32
41
|
ser(type: ValueType, data: Uint8Array | any): Uint8Array;
|
|
33
42
|
de(type: ValueType, data: Uint8Array | any): any;
|
|
43
|
+
de_ent(data: Uint8Array): any;
|
|
44
|
+
de_entInfo(data: Uint8Array): any;
|
|
34
45
|
}
|
|
35
46
|
export declare function stringToUint8Array(str: string): Uint8Array;
|
|
36
47
|
export declare function numToUint8Array(num: number): Uint8Array;
|
|
@@ -44,11 +55,14 @@ export declare const IsValidName: (name: string) => boolean;
|
|
|
44
55
|
export declare const IsValidName_AllowEmpty: (name: string) => boolean;
|
|
45
56
|
export declare const IsValidEndpoint: (endpoint: string) => boolean;
|
|
46
57
|
export declare const IsValidAddress: (addr: string) => boolean;
|
|
58
|
+
export declare const IsValidTokenType: (argType: string) => boolean;
|
|
47
59
|
export declare const IsValidArgType: (argType: string) => boolean;
|
|
48
60
|
export declare const IsValidUint: (value: number | string) => boolean;
|
|
49
61
|
export declare const IsValidInt: (value: number | string) => boolean;
|
|
50
62
|
export declare const IsValidPercent: (value: number | string) => boolean;
|
|
51
63
|
export declare const IsValidArray: (arr: any[], validFunc: any) => boolean;
|
|
64
|
+
export declare const ResolveU64: (value: bigint) => bigint;
|
|
65
|
+
export declare const ResolveBalance: (balance: string, decimals: number) => string;
|
|
52
66
|
export declare const OptionNone: (txb: TransactionBlock) => TransactionArgument;
|
|
53
67
|
export type ArgType = {
|
|
54
68
|
isCoin: boolean;
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,GAAG,EAAyD,MAAM,aAAa,CAAC;AAC9F,OAAO,EAAE,gBAAgB,EAA6B,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAG/G,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAE3D,eAAO,MAAM,MAAM,QAAgB,CAAC;AACpC,eAAO,MAAM,OAAO,QAAiC,CAAC;AACtD,eAAO,MAAM,QAAQ,QAAoD,CAAC;AAC1E,eAAO,MAAM,QAAQ,QAA2F,CAAC;AAEjH,eAAO,MAAM,WAAW,IAAI,CAAC;AAE7B,eAAO,MAAM,gBAAgB,SAAS,SAAS,GAAG,IAAI,GAAG,SAAS,KAAI,mBAAmB,GAAG,MAiB3F,CAAA;AAED,eAAO,MAAM,qBAAqB,aAAa,mBAAmB,QAAO,UAAU;UAAU,SAAS;UAAQ,UAAU;aA2BvH,CAAA;AAED,eAAO,MAAM,UAAU,QAAS,MAAM,EAAE,MAAK,SAAS,KAAI;IAAC,KAAK,EAAC,OAAO,CAAC;IAAC,KAAK,EAAC,GAAG,CAA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