wowok 1.2.4 → 1.2.7

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.
Files changed (49) hide show
  1. package/dist/demand.d.ts +3 -2
  2. package/dist/demand.d.ts.map +1 -1
  3. package/dist/demand.js +21 -7
  4. package/dist/entity.d.ts +2 -1
  5. package/dist/entity.d.ts.map +1 -1
  6. package/dist/entity.js +23 -7
  7. package/dist/exception.d.ts +3 -1
  8. package/dist/exception.d.ts.map +1 -1
  9. package/dist/exception.js +3 -1
  10. package/dist/guard.js +1 -1
  11. package/dist/machine.js +2 -2
  12. package/dist/permission.d.ts +23 -7
  13. package/dist/permission.d.ts.map +1 -1
  14. package/dist/permission.js +149 -16
  15. package/dist/protocol.d.ts +35 -10
  16. package/dist/protocol.d.ts.map +1 -1
  17. package/dist/protocol.js +129 -21
  18. package/dist/repository.d.ts +6 -3
  19. package/dist/repository.d.ts.map +1 -1
  20. package/dist/repository.js +59 -40
  21. package/dist/resource.d.ts +20 -6
  22. package/dist/resource.d.ts.map +1 -1
  23. package/dist/resource.js +58 -21
  24. package/dist/reward.d.ts +6 -3
  25. package/dist/reward.d.ts.map +1 -1
  26. package/dist/reward.js +43 -19
  27. package/dist/service.d.ts +15 -9
  28. package/dist/service.d.ts.map +1 -1
  29. package/dist/service.js +94 -56
  30. package/dist/utils.d.ts +18 -4
  31. package/dist/utils.d.ts.map +1 -1
  32. package/dist/utils.js +218 -45
  33. package/dist/vote.d.ts +2 -2
  34. package/dist/vote.d.ts.map +1 -1
  35. package/dist/vote.js +14 -14
  36. package/package.json +1 -1
  37. package/src/demand.ts +22 -8
  38. package/src/entity.ts +25 -6
  39. package/src/exception.ts +3 -1
  40. package/src/guard.ts +1 -1
  41. package/src/machine.ts +2 -2
  42. package/src/permission.ts +168 -14
  43. package/src/protocol.ts +127 -17
  44. package/src/repository.ts +64 -44
  45. package/src/resource.ts +61 -20
  46. package/src/reward.ts +46 -23
  47. package/src/service.ts +100 -57
  48. package/src/utils.ts +186 -22
  49. package/src/vote.ts +14 -14
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, IsValidArgType, IsValidDesription, IsValidAddress, IsValidEndpoint, OptionNone, IsValidUint, IsValidInt, IsValidName, } from './utils';
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;
@@ -9,16 +9,17 @@ export var Service_Discount_Type;
9
9
  })(Service_Discount_Type || (Service_Discount_Type = {}));
10
10
  export var BuyRequiredEnum;
11
11
  (function (BuyRequiredEnum) {
12
- BuyRequiredEnum["address"] = "Address";
13
- BuyRequiredEnum["phone"] = "Phone";
14
- BuyRequiredEnum["name"] = "Name";
15
- BuyRequiredEnum["postcode"] = "Postcode";
12
+ BuyRequiredEnum["address"] = "address";
13
+ BuyRequiredEnum["phone"] = "phone";
14
+ BuyRequiredEnum["name"] = "name";
15
+ BuyRequiredEnum["postcode"] = "postcode";
16
16
  })(BuyRequiredEnum || (BuyRequiredEnum = {}));
17
17
  export class Service {
18
18
  pay_token_type;
19
19
  permission;
20
20
  object;
21
21
  protocol;
22
+ //static token2coin = (token:string) => { return '0x2::coin::Coin<' + token + '>'};
22
23
  get_pay_type() { return this.pay_token_type; }
23
24
  get_object() { return this.object; }
24
25
  constructor(protocol, pay_token_type, permission) {
@@ -27,17 +28,17 @@ export class Service {
27
28
  this.permission = permission;
28
29
  this.object = '';
29
30
  }
30
- static From(protocol, pay_token_type, permission, object) {
31
- let s = new Service(protocol, pay_token_type, permission);
31
+ static From(protocol, token_type, permission, object) {
32
+ let s = new Service(protocol, token_type, permission);
32
33
  s.object = Protocol.TXB_OBJECT(protocol.CurrentSession(), object);
33
34
  return s;
34
35
  }
35
- static New(protocol, pay_token_type, permission, description, payee_address, endpoint, passport) {
36
+ static New(protocol, token_type, permission, description, payee_address, endpoint, passport) {
36
37
  if (!Protocol.IsValidObjects([permission])) {
37
38
  ERROR(Errors.IsValidObjects);
38
39
  }
39
- if (!IsValidArgType(pay_token_type)) {
40
- ERROR(Errors.IsValidArgType, 'this.pay_token_type');
40
+ if (!IsValidTokenType(token_type)) {
41
+ ERROR(Errors.IsValidTokenType, 'New: pay_token_type');
41
42
  }
42
43
  if (!IsValidDesription(description)) {
43
44
  ERROR(Errors.IsValidDesription);
@@ -48,6 +49,7 @@ export class Service {
48
49
  if (endpoint && !IsValidEndpoint(endpoint)) {
49
50
  ERROR(Errors.IsValidEndpoint);
50
51
  }
52
+ let pay_token_type = token_type;
51
53
  let s = new Service(protocol, pay_token_type, permission);
52
54
  let txb = protocol.CurrentSession();
53
55
  let ep = endpoint ? txb.pure(Bcs.getInstance().ser(ValueType.TYPE_OPTION_STRING, endpoint)) : OptionNone(txb);
@@ -61,7 +63,7 @@ export class Service {
61
63
  else {
62
64
  s.object = txb.moveCall({
63
65
  target: protocol.ServiceFn('new'),
64
- arguments: [txb.pure(description), txb.pure(payee_address, BCS.ADDRESS), ep, Protocol.TXB_OBJECT(txb, permission)],
66
+ arguments: [txb.pure(description, BCS.STRING), txb.pure(payee_address, BCS.ADDRESS), ep, Protocol.TXB_OBJECT(txb, permission)],
65
67
  typeArguments: [pay_token_type],
66
68
  });
67
69
  }
@@ -203,6 +205,32 @@ export class Service {
203
205
  });
204
206
  }
205
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
+ }
206
234
  set_payee(payee, passport) {
207
235
  if (!IsValidAddress(payee)) {
208
236
  ERROR(Errors.IsValidAddress, 'payee');
@@ -224,10 +252,9 @@ export class Service {
224
252
  }
225
253
  }
226
254
  repository_add(repository, passport) {
227
- if (!Protocol.IsValidObjects([this.object, this.permission, repository]))
228
- return false;
229
- if (!IsValidArgType(this.pay_token_type))
230
- return false;
255
+ if (!Protocol.IsValidObjects([repository])) {
256
+ ERROR(Errors.IsValidObjects, 'repository_add');
257
+ }
231
258
  let txb = this.protocol.CurrentSession();
232
259
  if (passport) {
233
260
  txb.moveCall({
@@ -451,24 +478,30 @@ export class Service {
451
478
  });
452
479
  return bValid;
453
480
  }
454
- add_sale(sales, passport) {
481
+ add_sale(sales, bExistAssert = false, passport) {
455
482
  if (!sales || !this.is_valid_sale(sales)) {
456
- ERROR(Errors.InvalidParam, 'Service_Sale');
483
+ ERROR(Errors.InvalidParam, 'add_sale');
457
484
  }
458
485
  let names = [];
459
486
  let price = [];
460
487
  let stock = [];
488
+ let endpoint = [];
461
489
  sales.forEach((s) => {
490
+ if (s.endpoint && !IsValidEndpoint(s.endpoint)) {
491
+ ERROR(Errors.IsValidEndpoint, 'add_sale');
492
+ }
462
493
  names.push(s.item);
463
494
  price.push(s.price);
464
495
  stock.push(s.stock);
496
+ endpoint.push(s.endpoint ?? '');
465
497
  });
466
498
  let txb = this.protocol.CurrentSession();
467
499
  if (passport) {
468
500
  txb.moveCall({
469
501
  target: this.protocol.ServiceFn('sales_add_with_passport'),
470
502
  arguments: [passport, Protocol.TXB_OBJECT(txb, this.object), txb.pure(Bcs.getInstance().ser(ValueType.TYPE_VEC_STRING, names)),
471
- txb.pure(Bcs.getInstance().ser(ValueType.TYPE_VEC_U64, price)), txb.pure(Bcs.getInstance().ser(ValueType.TYPE_VEC_U64, stock)),
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)),
472
505
  Protocol.TXB_OBJECT(txb, this.permission)],
473
506
  typeArguments: [this.pay_token_type]
474
507
  });
@@ -477,14 +510,16 @@ export class Service {
477
510
  txb.moveCall({
478
511
  target: this.protocol.ServiceFn('sales_add'),
479
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)),
480
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)),
481
516
  Protocol.TXB_OBJECT(txb, this.permission)],
482
517
  typeArguments: [this.pay_token_type]
483
518
  });
484
519
  }
485
520
  }
486
- remove_sales(sales, removeall, passport) {
487
- if (!removeall && !sales) {
521
+ remove_sales(sales, passport) {
522
+ if (!sales) {
488
523
  ERROR(Errors.AllInvalid, 'sales & removeall');
489
524
  }
490
525
  if (sales && !IsValidArray(sales, IsValidName)) {
@@ -492,38 +527,20 @@ export class Service {
492
527
  }
493
528
  let txb = this.protocol.CurrentSession();
494
529
  if (passport) {
495
- if (removeall) {
496
- txb.moveCall({
497
- target: this.protocol.ServiceFn('sales_remove_all_with_passport'),
498
- arguments: [passport, Protocol.TXB_OBJECT(txb, this.object), Protocol.TXB_OBJECT(txb, this.permission)],
499
- typeArguments: [this.pay_token_type]
500
- });
501
- }
502
- else {
503
- txb.moveCall({
504
- target: this.protocol.ServiceFn('sales_remove_with_passport'),
505
- arguments: [passport, Protocol.TXB_OBJECT(txb, this.object), txb.pure(Bcs.getInstance().ser(ValueType.TYPE_VEC_STRING, array_unique(sales))),
506
- Protocol.TXB_OBJECT(txb, this.permission)],
507
- typeArguments: [this.pay_token_type]
508
- });
509
- }
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
+ });
510
536
  }
511
537
  else {
512
- if (removeall) {
513
- txb.moveCall({
514
- target: this.protocol.ServiceFn('sales_remove_all'),
515
- arguments: [Protocol.TXB_OBJECT(txb, this.object), Protocol.TXB_OBJECT(txb, this.permission)],
516
- typeArguments: [this.pay_token_type]
517
- });
518
- }
519
- else {
520
- txb.moveCall({
521
- target: this.protocol.ServiceFn('sales_remove'),
522
- arguments: [Protocol.TXB_OBJECT(txb, this.object), txb.pure(Bcs.getInstance().ser(ValueType.TYPE_VEC_STRING, array_unique(sales))),
523
- Protocol.TXB_OBJECT(txb, this.permission)],
524
- typeArguments: [this.pay_token_type]
525
- });
526
- }
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
+ });
527
544
  }
528
545
  }
529
546
  discount_transfer(discount_dispatch, passport) {
@@ -733,13 +750,14 @@ export class Service {
733
750
  if (!customer_required) {
734
751
  ERROR(Errors.InvalidParam, 'customer_required');
735
752
  }
753
+ let req = array_unique(customer_required);
736
754
  let txb = this.protocol.CurrentSession();
737
755
  if (passport) {
738
756
  txb.moveCall({
739
757
  target: this.protocol.ServiceFn('required_set_with_passport'),
740
758
  arguments: [passport, Protocol.TXB_OBJECT(txb, this.object),
741
- txb.pure(Bcs.getInstance().ser(ValueType.TYPE_VEC_VEC_U8, array_unique(customer_required))),
742
- txb.pure(pubkey, 'vector<u8>'), Protocol.TXB_OBJECT(txb, this.permission)],
759
+ txb.pure(Bcs.getInstance().ser(ValueType.TYPE_VEC_STRING, req)),
760
+ txb.pure(pubkey, BCS.STRING), Protocol.TXB_OBJECT(txb, this.permission)],
743
761
  typeArguments: [this.pay_token_type]
744
762
  });
745
763
  }
@@ -747,8 +765,8 @@ export class Service {
747
765
  txb.moveCall({
748
766
  target: this.protocol.ServiceFn('required_set'),
749
767
  arguments: [Protocol.TXB_OBJECT(txb, this.object),
750
- txb.pure(Bcs.getInstance().ser(ValueType.TYPE_VEC_VEC_U8, array_unique(customer_required))),
751
- txb.pure(pubkey, 'vector<u8>'), Protocol.TXB_OBJECT(txb, this.permission)],
768
+ txb.pure(Bcs.getInstance().ser(ValueType.TYPE_VEC_STRING, req)),
769
+ txb.pure(pubkey, BCS.STRING), Protocol.TXB_OBJECT(txb, this.permission)],
752
770
  typeArguments: [this.pay_token_type]
753
771
  });
754
772
  }
@@ -889,7 +907,7 @@ export class Service {
889
907
  names.push(v.item);
890
908
  });
891
909
  if (!bValid) {
892
- ERROR(Errors.InvalidParam, 'buy_items');
910
+ ERROR(Errors.InvalidParam, 'buy_items 2');
893
911
  }
894
912
  let name = [];
895
913
  let price = [];
@@ -983,5 +1001,25 @@ export class Service {
983
1001
  this.permission = new_permission;
984
1002
  }
985
1003
  static MAX_DISCOUNT_COUNT_ONCE = 200;
986
- static MAX_DISCOUNT_RECEIVER_COUNT = 200;
1004
+ static MAX_DISCOUNT_RECEIVER_COUNT = 20;
1005
+ static MAX_GUARD_COUNT = 16;
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
+ };
987
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
- export declare const IsValidUint: (value: number) => boolean;
49
- export declare const IsValidInt: (value: number) => boolean;
50
- export declare const IsValidPercent: (value: number) => boolean;
60
+ export declare const IsValidUint: (value: number | string) => boolean;
61
+ export declare const IsValidInt: (value: number | string) => boolean;
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;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,GAAG,EAAoE,MAAM,aAAa,CAAC;AACzG,OAAO,EAAE,gBAAgB,EAA6B,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAG/G,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAEtC,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,UAAU,QAAS,MAAM,EAAE,MAAK,SAAS,KAAI;IAAC,KAAK,EAAC,OAAO,CAAC;IAAC,KAAK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