wowok 1.6.63 → 1.6.65

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 (81) hide show
  1. package/README.md +7 -6
  2. package/dist/arbitration.js +217 -219
  3. package/dist/demand.d.ts +2 -2
  4. package/dist/demand.d.ts.map +1 -1
  5. package/dist/demand.js +123 -127
  6. package/dist/entity.d.ts +2 -4
  7. package/dist/entity.d.ts.map +1 -1
  8. package/dist/entity.js +92 -96
  9. package/dist/exception.d.ts +2 -1
  10. package/dist/exception.d.ts.map +1 -1
  11. package/dist/exception.js +5 -8
  12. package/dist/guard.d.ts.map +1 -1
  13. package/dist/guard.js +469 -506
  14. package/dist/index.d.ts +6 -3
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +22 -37
  17. package/dist/machine.d.ts +1 -2
  18. package/dist/machine.d.ts.map +1 -1
  19. package/dist/machine.js +265 -283
  20. package/dist/passport.d.ts +0 -2
  21. package/dist/passport.d.ts.map +1 -1
  22. package/dist/passport.js +444 -569
  23. package/dist/payment.js +22 -26
  24. package/dist/permission.d.ts +41 -34
  25. package/dist/permission.d.ts.map +1 -1
  26. package/dist/permission.js +265 -264
  27. package/dist/progress.d.ts +4 -4
  28. package/dist/progress.d.ts.map +1 -1
  29. package/dist/progress.js +165 -166
  30. package/dist/protocol.d.ts +33 -35
  31. package/dist/protocol.d.ts.map +1 -1
  32. package/dist/protocol.js +264 -376
  33. package/dist/repository.d.ts +21 -7
  34. package/dist/repository.d.ts.map +1 -1
  35. package/dist/repository.js +315 -290
  36. package/dist/resource.d.ts +7 -5
  37. package/dist/resource.d.ts.map +1 -1
  38. package/dist/resource.js +89 -89
  39. package/dist/service.d.ts +3 -3
  40. package/dist/service.d.ts.map +1 -1
  41. package/dist/service.js +542 -544
  42. package/dist/treasury.js +183 -184
  43. package/dist/utils.d.ts +1 -1
  44. package/dist/utils.d.ts.map +1 -1
  45. package/dist/utils.js +254 -340
  46. package/dist/wowok.js +51 -54
  47. package/package.json +1 -1
  48. package/src/arbitration.ts +39 -39
  49. package/src/demand.ts +23 -26
  50. package/src/entity.ts +15 -16
  51. package/src/exception.ts +1 -0
  52. package/src/guard.ts +24 -14
  53. package/src/index.ts +9 -6
  54. package/src/machine.ts +47 -69
  55. package/src/passport.ts +15 -17
  56. package/src/payment.ts +2 -2
  57. package/src/permission.ts +47 -62
  58. package/src/progress.ts +46 -43
  59. package/src/protocol.ts +68 -69
  60. package/src/repository.ts +31 -31
  61. package/src/resource.ts +17 -16
  62. package/src/service.ts +96 -96
  63. package/src/treasury.ts +30 -30
  64. package/src/utils.ts +11 -5
  65. package/src/wowok.ts +8 -8
  66. package/dist/agent_call/call.d.ts +0 -30
  67. package/dist/agent_call/call.d.ts.map +0 -1
  68. package/dist/agent_call/call.js +0 -83
  69. package/dist/agent_query/events.d.ts +0 -61
  70. package/dist/agent_query/events.d.ts.map +0 -1
  71. package/dist/agent_query/events.js +0 -122
  72. package/dist/agent_query/objects.d.ts +0 -312
  73. package/dist/agent_query/objects.d.ts.map +0 -1
  74. package/dist/agent_query/objects.js +0 -492
  75. package/dist/agent_query/permission.d.ts +0 -14
  76. package/dist/agent_query/permission.d.ts.map +0 -1
  77. package/dist/agent_query/permission.js +0 -110
  78. package/src/agent_call/call.ts +0 -756
  79. package/src/agent_query/events.ts +0 -100
  80. package/src/agent_query/objects.ts +0 -608
  81. package/src/agent_query/permission.ts +0 -60
@@ -1,116 +1,117 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Arbitration = void 0;
4
- var utils_1 = require("./utils");
5
- var protocol_1 = require("./protocol");
6
- var exception_1 = require("./exception");
7
- var Arbitration = /** @class */ (function () {
8
- function Arbitration(txb, pay_token_type, permission) {
1
+ import { IsValidArray, array_unique, IsValidTokenType, IsValidDesription, parseObjectType, IsValidAddress, IsValidEndpoint, IsValidU64, IsValidName, } from './utils';
2
+ import { Protocol } from './protocol';
3
+ import { ERROR, Errors } from './exception';
4
+ export class Arbitration {
5
+ pay_token_type;
6
+ permission;
7
+ object;
8
+ txb;
9
+ //static token2coin = (token:string) => { return '0x2::coin::Coin<' + token + '>'};
10
+ get_pay_type() { return this.pay_token_type; }
11
+ get_object() { return this.object; }
12
+ constructor(txb, pay_token_type, permission) {
9
13
  this.pay_token_type = pay_token_type;
10
14
  this.txb = txb;
11
15
  this.permission = permission;
12
16
  this.object = '';
13
17
  }
14
- //static token2coin = (token:string) => { return '0x2::coin::Coin<' + token + '>'};
15
- Arbitration.prototype.get_pay_type = function () { return this.pay_token_type; };
16
- Arbitration.prototype.get_object = function () { return this.object; };
17
- Arbitration.From = function (txb, token_type, permission, object) {
18
- var s = new Arbitration(txb, token_type, permission);
19
- s.object = protocol_1.Protocol.TXB_OBJECT(txb, object);
18
+ static From(txb, token_type, permission, object) {
19
+ let s = new Arbitration(txb, token_type, permission);
20
+ s.object = Protocol.TXB_OBJECT(txb, object);
20
21
  return s;
21
- };
22
- Arbitration.New = function (txb, token_type, permission, description, fee, withdrawTreasury, passport) {
23
- if (!protocol_1.Protocol.IsValidObjects([permission, withdrawTreasury])) {
24
- (0, exception_1.ERROR)(exception_1.Errors.IsValidObjects);
22
+ }
23
+ static New(txb, token_type, permission, description, fee, withdrawTreasury, passport) {
24
+ if (!Protocol.IsValidObjects([permission, withdrawTreasury])) {
25
+ ERROR(Errors.IsValidObjects);
25
26
  }
26
- if (!(0, utils_1.IsValidTokenType)(token_type)) {
27
- (0, exception_1.ERROR)(exception_1.Errors.IsValidTokenType, 'New.token_type');
27
+ if (!IsValidTokenType(token_type)) {
28
+ ERROR(Errors.IsValidTokenType, 'New.token_type');
28
29
  }
29
- if (!(0, utils_1.IsValidDesription)(description)) {
30
- (0, exception_1.ERROR)(exception_1.Errors.IsValidDesription);
30
+ if (!IsValidDesription(description)) {
31
+ ERROR(Errors.IsValidDesription);
31
32
  }
32
- if (!(0, utils_1.IsValidU64)(fee)) {
33
- (0, exception_1.ERROR)(exception_1.Errors.IsValidU64, 'New.fee');
33
+ if (!IsValidU64(fee)) {
34
+ ERROR(Errors.IsValidU64, 'New.fee');
34
35
  }
35
- var pay_token_type = token_type;
36
- var obj = new Arbitration(txb, pay_token_type, permission);
36
+ let pay_token_type = token_type;
37
+ let obj = new Arbitration(txb, pay_token_type, permission);
37
38
  if (passport) {
38
39
  obj.object = txb.moveCall({
39
- target: protocol_1.Protocol.Instance().ArbitrationFn('new_with_passport'),
40
- arguments: [passport, txb.pure.string(description), txb.pure.u64(fee), txb.object(withdrawTreasury), protocol_1.Protocol.TXB_OBJECT(txb, permission)],
40
+ target: Protocol.Instance().arbitrationFn('new_with_passport'),
41
+ arguments: [passport, txb.pure.string(description), txb.pure.u64(fee), txb.object(withdrawTreasury), Protocol.TXB_OBJECT(txb, permission)],
41
42
  typeArguments: [pay_token_type],
42
43
  });
43
44
  }
44
45
  else {
45
46
  obj.object = txb.moveCall({
46
- target: protocol_1.Protocol.Instance().ArbitrationFn('new'),
47
- arguments: [txb.pure.string(description), txb.pure.u64(fee), txb.object(withdrawTreasury), protocol_1.Protocol.TXB_OBJECT(txb, permission)],
47
+ target: Protocol.Instance().arbitrationFn('new'),
48
+ arguments: [txb.pure.string(description), txb.pure.u64(fee), txb.object(withdrawTreasury), Protocol.TXB_OBJECT(txb, permission)],
48
49
  typeArguments: [pay_token_type],
49
50
  });
50
51
  }
51
52
  return obj;
52
- };
53
- Arbitration.prototype.launch = function () {
53
+ }
54
+ launch() {
54
55
  return this.txb.moveCall({
55
- target: protocol_1.Protocol.Instance().ArbitrationFn('create'),
56
- arguments: [protocol_1.Protocol.TXB_OBJECT(this.txb, this.object)],
56
+ target: Protocol.Instance().arbitrationFn('create'),
57
+ arguments: [Protocol.TXB_OBJECT(this.txb, this.object)],
57
58
  typeArguments: [this.pay_token_type]
58
59
  });
59
- };
60
- Arbitration.prototype.set_description = function (description, passport) {
61
- if (!(0, utils_1.IsValidDesription)(description)) {
62
- (0, exception_1.ERROR)(exception_1.Errors.IsValidDesription, 'set_description.description');
60
+ }
61
+ set_description(description, passport) {
62
+ if (!IsValidDesription(description)) {
63
+ ERROR(Errors.IsValidDesription, 'set_description.description');
63
64
  }
64
65
  if (passport) {
65
66
  this.txb.moveCall({
66
- target: protocol_1.Protocol.Instance().ArbitrationFn('description_set_with_passport'),
67
- arguments: [passport, protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.string(description), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
67
+ target: Protocol.Instance().arbitrationFn('description_set_with_passport'),
68
+ arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.string(description), Protocol.TXB_OBJECT(this.txb, this.permission)],
68
69
  typeArguments: [this.pay_token_type]
69
70
  });
70
71
  }
71
72
  else {
72
73
  this.txb.moveCall({
73
- target: protocol_1.Protocol.Instance().ArbitrationFn('description_set'),
74
- arguments: [protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.string(description), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
74
+ target: Protocol.Instance().arbitrationFn('description_set'),
75
+ arguments: [Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.string(description), Protocol.TXB_OBJECT(this.txb, this.permission)],
75
76
  typeArguments: [this.pay_token_type]
76
77
  });
77
78
  }
78
- };
79
- Arbitration.prototype.set_fee = function (fee, passport) {
80
- if (!(0, utils_1.IsValidU64)(fee)) {
81
- (0, exception_1.ERROR)(exception_1.Errors.IsValidU64, 'set_fee.fee');
79
+ }
80
+ set_fee(fee, passport) {
81
+ if (!IsValidU64(fee)) {
82
+ ERROR(Errors.IsValidU64, 'set_fee.fee');
82
83
  }
83
84
  if (passport) {
84
85
  this.txb.moveCall({
85
- target: protocol_1.Protocol.Instance().ArbitrationFn('fee_set_with_passport'),
86
- arguments: [passport, protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.u64(fee), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
86
+ target: Protocol.Instance().arbitrationFn('fee_set_with_passport'),
87
+ arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.u64(fee), Protocol.TXB_OBJECT(this.txb, this.permission)],
87
88
  typeArguments: [this.pay_token_type]
88
89
  });
89
90
  }
90
91
  else {
91
92
  this.txb.moveCall({
92
- target: protocol_1.Protocol.Instance().ArbitrationFn('fee_set'),
93
- arguments: [protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.u64(fee), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
93
+ target: Protocol.Instance().arbitrationFn('fee_set'),
94
+ arguments: [Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.u64(fee), Protocol.TXB_OBJECT(this.txb, this.permission)],
94
95
  typeArguments: [this.pay_token_type]
95
96
  });
96
97
  }
97
- };
98
- Arbitration.prototype.set_endpoint = function (endpoint, passport) {
99
- if (endpoint && !(0, utils_1.IsValidEndpoint)(endpoint)) {
100
- (0, exception_1.ERROR)(exception_1.Errors.IsValidEndpoint, 'set_endpoint.endpoint');
98
+ }
99
+ set_endpoint(endpoint, passport) {
100
+ if (endpoint && !IsValidEndpoint(endpoint)) {
101
+ ERROR(Errors.IsValidEndpoint, 'set_endpoint.endpoint');
101
102
  }
102
103
  if (passport) {
103
104
  if (endpoint) {
104
105
  this.txb.moveCall({
105
- target: protocol_1.Protocol.Instance().ArbitrationFn('endpoint_set_with_passport'),
106
- arguments: [passport, protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.string(endpoint), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
106
+ target: Protocol.Instance().arbitrationFn('endpoint_set_with_passport'),
107
+ arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.string(endpoint), Protocol.TXB_OBJECT(this.txb, this.permission)],
107
108
  typeArguments: [this.pay_token_type]
108
109
  });
109
110
  }
110
111
  else {
111
112
  this.txb.moveCall({
112
- target: protocol_1.Protocol.Instance().ArbitrationFn('endpoint_none_with_passport'),
113
- arguments: [passport, protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
113
+ target: Protocol.Instance().arbitrationFn('endpoint_none_with_passport'),
114
+ arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object), Protocol.TXB_OBJECT(this.txb, this.permission)],
114
115
  typeArguments: [this.pay_token_type]
115
116
  });
116
117
  }
@@ -118,67 +119,66 @@ var Arbitration = /** @class */ (function () {
118
119
  else {
119
120
  if (endpoint) {
120
121
  this.txb.moveCall({
121
- target: protocol_1.Protocol.Instance().ArbitrationFn('endpoint_set'),
122
- arguments: [protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.string(endpoint), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
122
+ target: Protocol.Instance().arbitrationFn('endpoint_set'),
123
+ arguments: [Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.string(endpoint), Protocol.TXB_OBJECT(this.txb, this.permission)],
123
124
  typeArguments: [this.pay_token_type]
124
125
  });
125
126
  }
126
127
  else {
127
128
  this.txb.moveCall({
128
- target: protocol_1.Protocol.Instance().ArbitrationFn('endpoint_none'),
129
- arguments: [protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
129
+ target: Protocol.Instance().arbitrationFn('endpoint_none'),
130
+ arguments: [Protocol.TXB_OBJECT(this.txb, this.object), Protocol.TXB_OBJECT(this.txb, this.permission)],
130
131
  typeArguments: [this.pay_token_type]
131
132
  });
132
133
  }
133
134
  }
134
- };
135
- Arbitration.prototype.add_voting_guard = function (guard, passport) {
136
- var _this = this;
135
+ }
136
+ add_voting_guard(guard, passport) {
137
137
  if (guard.length === 0)
138
138
  return;
139
- if (!(0, utils_1.IsValidArray)(guard, function (g) { return protocol_1.Protocol.IsValidObjects([g.guard]) && (0, utils_1.IsValidU64)(g.voting_weight); })) {
140
- (0, exception_1.ERROR)(exception_1.Errors.IsValidArray, 'add_voting_guard.guard');
139
+ if (!IsValidArray(guard, (g) => Protocol.IsValidObjects([g.guard]) && IsValidU64(g.voting_weight))) {
140
+ ERROR(Errors.IsValidArray, 'add_voting_guard.guard');
141
141
  }
142
142
  if (passport) {
143
- guard.forEach(function (v) {
144
- _this.txb.moveCall({
145
- target: protocol_1.Protocol.Instance().ArbitrationFn('voting_guard_add_with_passport'),
146
- arguments: [passport, protocol_1.Protocol.TXB_OBJECT(_this.txb, _this.object), _this.txb.object(v.guard),
147
- _this.txb.pure.u64(v.voting_weight), protocol_1.Protocol.TXB_OBJECT(_this.txb, _this.permission)],
148
- typeArguments: [_this.pay_token_type]
143
+ guard.forEach(v => {
144
+ this.txb.moveCall({
145
+ target: Protocol.Instance().arbitrationFn('voting_guard_add_with_passport'),
146
+ arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(v.guard),
147
+ this.txb.pure.u64(v.voting_weight), Protocol.TXB_OBJECT(this.txb, this.permission)],
148
+ typeArguments: [this.pay_token_type]
149
149
  });
150
150
  });
151
151
  }
152
152
  else {
153
- guard.forEach(function (v) {
154
- _this.txb.moveCall({
155
- target: protocol_1.Protocol.Instance().ArbitrationFn('voting_guard_add'),
156
- arguments: [protocol_1.Protocol.TXB_OBJECT(_this.txb, _this.object), _this.txb.object(v.guard),
157
- _this.txb.pure.u64(v.voting_weight), protocol_1.Protocol.TXB_OBJECT(_this.txb, _this.permission)],
158
- typeArguments: [_this.pay_token_type]
153
+ guard.forEach(v => {
154
+ this.txb.moveCall({
155
+ target: Protocol.Instance().arbitrationFn('voting_guard_add'),
156
+ arguments: [Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(v.guard),
157
+ this.txb.pure.u64(v.voting_weight), Protocol.TXB_OBJECT(this.txb, this.permission)],
158
+ typeArguments: [this.pay_token_type]
159
159
  });
160
160
  });
161
161
  }
162
- };
163
- Arbitration.prototype.remove_voting_guard = function (guard, removeall, passport) {
162
+ }
163
+ remove_voting_guard(guard, removeall, passport) {
164
164
  if (!removeall && guard.length === 0)
165
165
  return;
166
- if (!(0, utils_1.IsValidArray)(guard, utils_1.IsValidAddress)) {
167
- (0, exception_1.ERROR)(exception_1.Errors.IsValidArray, 'remove_voting_guard.guard');
166
+ if (!IsValidArray(guard, IsValidAddress)) {
167
+ ERROR(Errors.IsValidArray, 'remove_voting_guard.guard');
168
168
  }
169
169
  if (passport) {
170
170
  if (removeall) {
171
171
  this.txb.moveCall({
172
- target: protocol_1.Protocol.Instance().ArbitrationFn('voting_guard_removeall_with_passport'),
173
- arguments: [passport, protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
172
+ target: Protocol.Instance().arbitrationFn('voting_guard_removeall_with_passport'),
173
+ arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object), Protocol.TXB_OBJECT(this.txb, this.permission)],
174
174
  typeArguments: [this.pay_token_type]
175
175
  });
176
176
  }
177
177
  else {
178
178
  this.txb.moveCall({
179
- target: protocol_1.Protocol.Instance().ArbitrationFn('voting_guard_remove_with_passport'),
180
- arguments: [passport, protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.vector('address', guard),
181
- protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
179
+ target: Protocol.Instance().arbitrationFn('voting_guard_remove_with_passport'),
180
+ arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.vector('address', guard),
181
+ Protocol.TXB_OBJECT(this.txb, this.permission)],
182
182
  typeArguments: [this.pay_token_type]
183
183
  });
184
184
  }
@@ -186,37 +186,37 @@ var Arbitration = /** @class */ (function () {
186
186
  else {
187
187
  if (removeall) {
188
188
  this.txb.moveCall({
189
- target: protocol_1.Protocol.Instance().ArbitrationFn('voting_guard_removeall'),
190
- arguments: [protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
189
+ target: Protocol.Instance().arbitrationFn('voting_guard_removeall'),
190
+ arguments: [Protocol.TXB_OBJECT(this.txb, this.object), Protocol.TXB_OBJECT(this.txb, this.permission)],
191
191
  typeArguments: [this.pay_token_type]
192
192
  });
193
193
  }
194
194
  else {
195
195
  this.txb.moveCall({
196
- target: protocol_1.Protocol.Instance().ArbitrationFn('voting_guard_remove'),
197
- arguments: [protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.vector('address', guard),
198
- protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
196
+ target: Protocol.Instance().arbitrationFn('voting_guard_remove'),
197
+ arguments: [Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.vector('address', guard),
198
+ Protocol.TXB_OBJECT(this.txb, this.permission)],
199
199
  typeArguments: [this.pay_token_type]
200
200
  });
201
201
  }
202
202
  }
203
- };
204
- Arbitration.prototype.set_guard = function (apply_guard, passport) {
205
- if (apply_guard && !(0, utils_1.IsValidAddress)(apply_guard)) {
206
- (0, exception_1.ERROR)(exception_1.Errors.IsValidAddress, 'set_guard.apply_guard');
203
+ }
204
+ set_guard(apply_guard, passport) {
205
+ if (apply_guard && !IsValidAddress(apply_guard)) {
206
+ ERROR(Errors.IsValidAddress, 'set_guard.apply_guard');
207
207
  }
208
208
  if (passport) {
209
209
  if (apply_guard) {
210
210
  this.txb.moveCall({
211
- target: protocol_1.Protocol.Instance().ArbitrationFn('usage_guard_set_with_passport'),
212
- arguments: [passport, protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(apply_guard), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
211
+ target: Protocol.Instance().arbitrationFn('usage_guard_set_with_passport'),
212
+ arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(apply_guard), Protocol.TXB_OBJECT(this.txb, this.permission)],
213
213
  typeArguments: [this.pay_token_type]
214
214
  });
215
215
  }
216
216
  else {
217
217
  this.txb.moveCall({
218
- target: protocol_1.Protocol.Instance().ArbitrationFn('usage_guard_none_with_passport'),
219
- arguments: [passport, protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
218
+ target: Protocol.Instance().arbitrationFn('usage_guard_none_with_passport'),
219
+ arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object), Protocol.TXB_OBJECT(this.txb, this.permission)],
220
220
  typeArguments: [this.pay_token_type]
221
221
  });
222
222
  }
@@ -224,136 +224,136 @@ var Arbitration = /** @class */ (function () {
224
224
  else {
225
225
  if (apply_guard) {
226
226
  this.txb.moveCall({
227
- target: protocol_1.Protocol.Instance().ArbitrationFn('usage_guard_set'),
228
- arguments: [protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(apply_guard), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
227
+ target: Protocol.Instance().arbitrationFn('usage_guard_set'),
228
+ arguments: [Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(apply_guard), Protocol.TXB_OBJECT(this.txb, this.permission)],
229
229
  typeArguments: [this.pay_token_type]
230
230
  });
231
231
  }
232
232
  else {
233
233
  this.txb.moveCall({
234
- target: protocol_1.Protocol.Instance().ArbitrationFn('usage_guard_none'),
235
- arguments: [protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
234
+ target: Protocol.Instance().arbitrationFn('usage_guard_none'),
235
+ arguments: [Protocol.TXB_OBJECT(this.txb, this.object), Protocol.TXB_OBJECT(this.txb, this.permission)],
236
236
  typeArguments: [this.pay_token_type]
237
237
  });
238
238
  }
239
239
  }
240
- };
241
- Arbitration.prototype.pause = function (pause, passport) {
240
+ }
241
+ pause(pause, passport) {
242
242
  if (passport) {
243
243
  this.txb.moveCall({
244
- target: protocol_1.Protocol.Instance().ArbitrationFn('pause_with_passport'),
245
- arguments: [passport, protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.bool(pause), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
244
+ target: Protocol.Instance().arbitrationFn('pause_with_passport'),
245
+ arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.bool(pause), Protocol.TXB_OBJECT(this.txb, this.permission)],
246
246
  typeArguments: [this.pay_token_type]
247
247
  });
248
248
  }
249
249
  else {
250
250
  this.txb.moveCall({
251
- target: protocol_1.Protocol.Instance().ArbitrationFn('pause'),
252
- arguments: [protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.bool(pause), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
251
+ target: Protocol.Instance().arbitrationFn('pause'),
252
+ arguments: [Protocol.TXB_OBJECT(this.txb, this.object), this.txb.pure.bool(pause), Protocol.TXB_OBJECT(this.txb, this.permission)],
253
253
  typeArguments: [this.pay_token_type]
254
254
  });
255
255
  }
256
- };
257
- Arbitration.prototype.vote = function (param, passport) {
258
- if (param.voting_guard && !protocol_1.Protocol.IsValidObjects([param.voting_guard])) {
259
- (0, exception_1.ERROR)(exception_1.Errors.IsValidObjects, 'vote.param.voting_guard');
256
+ }
257
+ vote(param, passport) {
258
+ if (param.voting_guard && !Protocol.IsValidObjects([param.voting_guard])) {
259
+ ERROR(Errors.IsValidObjects, 'vote.param.voting_guard');
260
260
  }
261
- if (!(0, utils_1.IsValidArray)(param.agrees, function (v) { return (0, utils_1.IsValidU64)(v) && v < Arbitration.MAX_PROPOSITION_COUNT; })) {
262
- (0, exception_1.ERROR)(exception_1.Errors.IsValidArray, 'vote.param.agrees');
261
+ if (!IsValidArray(param.agrees, (v) => IsValidU64(v) && v < Arbitration.MAX_PROPOSITION_COUNT)) {
262
+ ERROR(Errors.IsValidArray, 'vote.param.agrees');
263
263
  }
264
- if (!protocol_1.Protocol.IsValidObjects([param.arb])) {
265
- (0, exception_1.ERROR)(exception_1.Errors.IsValidObjects, 'vote.param.arb');
264
+ if (!Protocol.IsValidObjects([param.arb])) {
265
+ ERROR(Errors.IsValidObjects, 'vote.param.arb');
266
266
  }
267
- var clock = this.txb.sharedObjectRef(protocol_1.Protocol.CLOCK_OBJECT);
267
+ const clock = this.txb.sharedObjectRef(Protocol.CLOCK_OBJECT);
268
268
  if (passport) {
269
269
  if (param.voting_guard) {
270
270
  this.txb.moveCall({
271
- target: protocol_1.Protocol.Instance().ArbitrationFn('vote_with_passport'),
272
- arguments: [passport, this.txb.object(param.voting_guard), protocol_1.Protocol.TXB_OBJECT(this.txb, this.object),
271
+ target: Protocol.Instance().arbitrationFn('vote_with_passport'),
272
+ arguments: [passport, this.txb.object(param.voting_guard), Protocol.TXB_OBJECT(this.txb, this.object),
273
273
  this.txb.object(param.arb), this.txb.pure.vector('u8', param.agrees),
274
- this.txb.object(clock), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
274
+ this.txb.object(clock), Protocol.TXB_OBJECT(this.txb, this.permission)],
275
275
  typeArguments: [this.pay_token_type]
276
276
  });
277
277
  }
278
278
  else {
279
279
  this.txb.moveCall({
280
- target: protocol_1.Protocol.Instance().ArbitrationFn('vote2_with_passport'),
281
- arguments: [passport, protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(param.arb), this.txb.pure.vector('u8', param.agrees),
282
- this.txb.object(clock), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
280
+ target: Protocol.Instance().arbitrationFn('vote2_with_passport'),
281
+ arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(param.arb), this.txb.pure.vector('u8', param.agrees),
282
+ this.txb.object(clock), Protocol.TXB_OBJECT(this.txb, this.permission)],
283
283
  typeArguments: [this.pay_token_type]
284
284
  });
285
285
  }
286
286
  }
287
287
  else {
288
288
  this.txb.moveCall({
289
- target: protocol_1.Protocol.Instance().ArbitrationFn('vote'),
290
- arguments: [protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(param.arb), this.txb.pure.vector('u8', param.agrees),
291
- this.txb.object(clock), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
289
+ target: Protocol.Instance().arbitrationFn('vote'),
290
+ arguments: [Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(param.arb), this.txb.pure.vector('u8', param.agrees),
291
+ this.txb.object(clock), Protocol.TXB_OBJECT(this.txb, this.permission)],
292
292
  typeArguments: [this.pay_token_type]
293
293
  });
294
294
  }
295
- };
296
- Arbitration.prototype.arbitration = function (param, passport) {
297
- if (!(0, utils_1.IsValidDesription)(param.feedback)) {
298
- (0, exception_1.ERROR)(exception_1.Errors.IsValidDesription, 'arbitration.param.feedback');
295
+ }
296
+ arbitration(param, passport) {
297
+ if (!IsValidDesription(param.feedback)) {
298
+ ERROR(Errors.IsValidDesription, 'arbitration.param.feedback');
299
299
  }
300
- if (!protocol_1.Protocol.IsValidObjects([param.arb])) {
301
- (0, exception_1.ERROR)(exception_1.Errors.IsValidObjects, 'arbitration.param.arb');
300
+ if (!Protocol.IsValidObjects([param.arb])) {
301
+ ERROR(Errors.IsValidObjects, 'arbitration.param.arb');
302
302
  }
303
- if (param.indemnity && !(0, utils_1.IsValidU64)(param.indemnity)) {
304
- (0, exception_1.ERROR)(exception_1.Errors.IsValidU64, 'arbitration.param.indemnity');
303
+ if (param.indemnity && !IsValidU64(param.indemnity)) {
304
+ ERROR(Errors.IsValidU64, 'arbitration.param.indemnity');
305
305
  }
306
- var ind = this.txb.pure.option('u64', param.indemnity ? param.indemnity : undefined);
306
+ let ind = this.txb.pure.option('u64', param.indemnity ? param.indemnity : undefined);
307
307
  if (passport) {
308
308
  this.txb.moveCall({
309
- target: protocol_1.Protocol.Instance().ArbitrationFn('arbitration_with_passport'),
310
- arguments: [passport, protocol_1.Protocol.TXB_OBJECT(this.txb, this.object),
311
- this.txb.object(param.arb), this.txb.pure.string(param.feedback), ind, protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
309
+ target: Protocol.Instance().arbitrationFn('arbitration_with_passport'),
310
+ arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object),
311
+ this.txb.object(param.arb), this.txb.pure.string(param.feedback), ind, Protocol.TXB_OBJECT(this.txb, this.permission)],
312
312
  typeArguments: [this.pay_token_type]
313
313
  });
314
314
  }
315
315
  else {
316
316
  this.txb.moveCall({
317
- target: protocol_1.Protocol.Instance().ArbitrationFn('arbitration'),
318
- arguments: [protocol_1.Protocol.TXB_OBJECT(this.txb, this.object),
319
- this.txb.object(param.arb), this.txb.pure.string(param.feedback), ind, protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
317
+ target: Protocol.Instance().arbitrationFn('arbitration'),
318
+ arguments: [Protocol.TXB_OBJECT(this.txb, this.object),
319
+ this.txb.object(param.arb), this.txb.pure.string(param.feedback), ind, Protocol.TXB_OBJECT(this.txb, this.permission)],
320
320
  typeArguments: [this.pay_token_type]
321
321
  });
322
322
  }
323
- };
324
- Arbitration.prototype.withdraw_fee = function (arb, param, passport) {
325
- if (!protocol_1.Protocol.IsValidObjects([arb, param.treasury])) {
326
- (0, exception_1.ERROR)(exception_1.Errors.IsValidObjects, 'withdraw_fee.arb or treasury');
323
+ }
324
+ withdraw_fee(arb, param, passport) {
325
+ if (!Protocol.IsValidObjects([arb, param.treasury])) {
326
+ ERROR(Errors.IsValidObjects, 'withdraw_fee.arb or treasury');
327
327
  }
328
- if ((param === null || param === void 0 ? void 0 : param.for_guard) && !protocol_1.Protocol.IsValidObjects([param.for_guard])) {
329
- (0, exception_1.ERROR)(exception_1.Errors.IsValidObjects, 'withdraw_fee.param.for_guard');
328
+ if (param?.for_guard && !Protocol.IsValidObjects([param.for_guard])) {
329
+ ERROR(Errors.IsValidObjects, 'withdraw_fee.param.for_guard');
330
330
  }
331
- if ((param === null || param === void 0 ? void 0 : param.for_object) && !(0, utils_1.IsValidAddress)(param.for_object)) {
332
- (0, exception_1.ERROR)(exception_1.Errors.IsValidAddress, 'withdraw_fee.param.for_object');
331
+ if (param?.for_object && !IsValidAddress(param.for_object)) {
332
+ ERROR(Errors.IsValidAddress, 'withdraw_fee.param.for_object');
333
333
  }
334
- if (!(0, utils_1.IsValidDesription)(param.remark)) {
335
- (0, exception_1.ERROR)(exception_1.Errors.IsValidDesription, 'withdraw_fee.param.remark');
334
+ if (!IsValidDesription(param.remark)) {
335
+ ERROR(Errors.IsValidDesription, 'withdraw_fee.param.remark');
336
336
  }
337
- if (!(0, utils_1.IsValidU64)(param.index)) {
338
- (0, exception_1.ERROR)(exception_1.Errors.IsValidU64, 'withdraw_fee.param.index');
337
+ if (!IsValidU64(param.index)) {
338
+ ERROR(Errors.IsValidU64, 'withdraw_fee.param.index');
339
339
  }
340
- var for_obj = this.txb.pure.option('address', param.for_object ? param.for_object : undefined);
341
- var clock = this.txb.sharedObjectRef(protocol_1.Protocol.CLOCK_OBJECT);
340
+ const for_obj = this.txb.pure.option('address', param.for_object ? param.for_object : undefined);
341
+ const clock = this.txb.sharedObjectRef(Protocol.CLOCK_OBJECT);
342
342
  if (passport) {
343
343
  if (param.for_guard) {
344
344
  return this.txb.moveCall({
345
- target: protocol_1.Protocol.Instance().ArbitrationFn('withdraw_forGuard_with_passport'),
346
- arguments: [passport, protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(arb), this.txb.object(param.treasury),
345
+ target: Protocol.Instance().arbitrationFn('withdraw_forGuard_with_passport'),
346
+ arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(arb), this.txb.object(param.treasury),
347
347
  for_obj, this.txb.object(param.for_guard), this.txb.pure.u64(param.index), this.txb.pure.string(param.remark), this.txb.object(clock),
348
- protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
348
+ Protocol.TXB_OBJECT(this.txb, this.permission)],
349
349
  typeArguments: [this.pay_token_type]
350
350
  });
351
351
  }
352
352
  else {
353
353
  return this.txb.moveCall({
354
- target: protocol_1.Protocol.Instance().ArbitrationFn('withdraw_with_passport'),
355
- arguments: [passport, protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(arb), this.txb.object(param.treasury),
356
- for_obj, this.txb.pure.u64(param.index), this.txb.pure.string(param.remark), this.txb.object(clock), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
354
+ target: Protocol.Instance().arbitrationFn('withdraw_with_passport'),
355
+ arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(arb), this.txb.object(param.treasury),
356
+ for_obj, this.txb.pure.u64(param.index), this.txb.pure.string(param.remark), this.txb.object(clock), Protocol.TXB_OBJECT(this.txb, this.permission)],
357
357
  typeArguments: [this.pay_token_type]
358
358
  });
359
359
  }
@@ -361,71 +361,71 @@ var Arbitration = /** @class */ (function () {
361
361
  else {
362
362
  if (param.for_guard) {
363
363
  return this.txb.moveCall({
364
- target: protocol_1.Protocol.Instance().ArbitrationFn('withdraw_forGuard'),
365
- arguments: [protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(arb), this.txb.object(param.treasury),
364
+ target: Protocol.Instance().arbitrationFn('withdraw_forGuard'),
365
+ arguments: [Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(arb), this.txb.object(param.treasury),
366
366
  for_obj, this.txb.object(param.for_guard), this.txb.pure.u64(param.index), this.txb.pure.string(param.remark), this.txb.object(clock),
367
- protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
367
+ Protocol.TXB_OBJECT(this.txb, this.permission)],
368
368
  typeArguments: [this.pay_token_type]
369
369
  });
370
370
  }
371
371
  else {
372
372
  return this.txb.moveCall({
373
- target: protocol_1.Protocol.Instance().ArbitrationFn('withdraw'),
374
- arguments: [protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(arb), this.txb.object(param.treasury),
375
- for_obj, this.txb.pure.u64(param.index), this.txb.pure.string(param.remark), this.txb.object(clock), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
373
+ target: Protocol.Instance().arbitrationFn('withdraw'),
374
+ arguments: [Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(arb), this.txb.object(param.treasury),
375
+ for_obj, this.txb.pure.u64(param.index), this.txb.pure.string(param.remark), this.txb.object(clock), Protocol.TXB_OBJECT(this.txb, this.permission)],
376
376
  typeArguments: [this.pay_token_type]
377
377
  });
378
378
  }
379
379
  }
380
- };
381
- Arbitration.prototype.set_withdrawTreasury = function (treasury, passport) {
382
- if (!protocol_1.Protocol.IsValidObjects([treasury])) {
383
- (0, exception_1.ERROR)(exception_1.Errors.IsValidObjects, 'set_withdrawTreasury.treasury');
380
+ }
381
+ set_withdrawTreasury(treasury, passport) {
382
+ if (!Protocol.IsValidObjects([treasury])) {
383
+ ERROR(Errors.IsValidObjects, 'set_withdrawTreasury.treasury');
384
384
  }
385
385
  if (passport) {
386
386
  this.txb.moveCall({
387
- target: protocol_1.Protocol.Instance().ArbitrationFn('withdraw_treasury_set_with_passport'),
388
- arguments: [passport, protocol_1.Protocol.TXB_OBJECT(this.txb, this.object),
389
- this.txb.object(treasury), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
387
+ target: Protocol.Instance().arbitrationFn('withdraw_treasury_set_with_passport'),
388
+ arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object),
389
+ this.txb.object(treasury), Protocol.TXB_OBJECT(this.txb, this.permission)],
390
390
  typeArguments: [this.pay_token_type]
391
391
  });
392
392
  }
393
393
  else {
394
394
  this.txb.moveCall({
395
- target: protocol_1.Protocol.Instance().ArbitrationFn('withdraw_treasury_set'),
396
- arguments: [protocol_1.Protocol.TXB_OBJECT(this.txb, this.object),
397
- this.txb.object(treasury), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission)],
395
+ target: Protocol.Instance().arbitrationFn('withdraw_treasury_set'),
396
+ arguments: [Protocol.TXB_OBJECT(this.txb, this.object),
397
+ this.txb.object(treasury), Protocol.TXB_OBJECT(this.txb, this.permission)],
398
398
  typeArguments: [this.pay_token_type]
399
399
  });
400
400
  }
401
- };
402
- Arbitration.prototype.dispute = function (param, passport) {
403
- if (!protocol_1.Protocol.IsValidObjects([param.order])) {
404
- (0, exception_1.ERROR)(exception_1.Errors.IsValidObjects, 'dispute.param.order');
401
+ }
402
+ dispute(param, passport) {
403
+ if (!Protocol.IsValidObjects([param.order])) {
404
+ ERROR(Errors.IsValidObjects, 'dispute.param.order');
405
405
  }
406
- if (!(0, utils_1.IsValidTokenType)(param.order_token_type)) {
407
- (0, exception_1.ERROR)(exception_1.Errors.IsValidTokenType, 'dispute.param.order_token_type');
406
+ if (!IsValidTokenType(param.order_token_type)) {
407
+ ERROR(Errors.IsValidTokenType, 'dispute.param.order_token_type');
408
408
  }
409
- if (!(0, utils_1.IsValidDesription)(param.description)) {
410
- (0, exception_1.ERROR)(exception_1.Errors.IsValidDesription, 'dispute.param.description');
409
+ if (!IsValidDesription(param.description)) {
410
+ ERROR(Errors.IsValidDesription, 'dispute.param.description');
411
411
  }
412
- if (!(0, utils_1.IsValidArray)(param.votable_proposition, utils_1.IsValidName)) {
413
- (0, exception_1.ERROR)(exception_1.Errors.IsValidArray, 'dispute.param.votable_proposition');
412
+ if (!IsValidArray(param.votable_proposition, IsValidName)) {
413
+ ERROR(Errors.IsValidArray, 'dispute.param.votable_proposition');
414
414
  }
415
415
  if (passport) {
416
416
  if (param.fee) {
417
417
  return this.txb.moveCall({
418
- target: protocol_1.Protocol.Instance().ArbitrationFn('dispute_with_passport'),
419
- arguments: [passport, protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(param.order), this.txb.pure.string(param.description),
420
- this.txb.pure.vector('string', (0, utils_1.array_unique)(param.votable_proposition)), this.txb.object(param.fee)],
418
+ target: Protocol.Instance().arbitrationFn('dispute_with_passport'),
419
+ arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(param.order), this.txb.pure.string(param.description),
420
+ this.txb.pure.vector('string', array_unique(param.votable_proposition)), this.txb.object(param.fee)],
421
421
  typeArguments: [this.pay_token_type, param.order_token_type]
422
422
  });
423
423
  }
424
424
  else {
425
425
  return this.txb.moveCall({
426
- target: protocol_1.Protocol.Instance().ArbitrationFn('free_dispute_with_passport'),
427
- arguments: [passport, protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(param.order), this.txb.pure.string(param.description),
428
- this.txb.pure.vector('string', (0, utils_1.array_unique)(param.votable_proposition))],
426
+ target: Protocol.Instance().arbitrationFn('free_dispute_with_passport'),
427
+ arguments: [passport, Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(param.order), this.txb.pure.string(param.description),
428
+ this.txb.pure.vector('string', array_unique(param.votable_proposition))],
429
429
  typeArguments: [this.pay_token_type, param.order_token_type]
430
430
  });
431
431
  }
@@ -433,43 +433,41 @@ var Arbitration = /** @class */ (function () {
433
433
  else {
434
434
  if (param.fee) {
435
435
  return this.txb.moveCall({
436
- target: protocol_1.Protocol.Instance().ArbitrationFn('dispute'),
437
- arguments: [protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(param.order), this.txb.pure.string(param.description),
438
- this.txb.pure.vector('string', (0, utils_1.array_unique)(param.votable_proposition)), this.txb.object(param.fee)],
436
+ target: Protocol.Instance().arbitrationFn('dispute'),
437
+ arguments: [Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(param.order), this.txb.pure.string(param.description),
438
+ this.txb.pure.vector('string', array_unique(param.votable_proposition)), this.txb.object(param.fee)],
439
439
  typeArguments: [this.pay_token_type, param.order_token_type]
440
440
  });
441
441
  }
442
442
  else {
443
443
  return this.txb.moveCall({
444
- target: protocol_1.Protocol.Instance().ArbitrationFn('free_dispute'),
445
- arguments: [protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(param.order), this.txb.pure.string(param.description),
446
- this.txb.pure.vector('string', (0, utils_1.array_unique)(param.votable_proposition))],
444
+ target: Protocol.Instance().arbitrationFn('free_dispute'),
445
+ arguments: [Protocol.TXB_OBJECT(this.txb, this.object), this.txb.object(param.order), this.txb.pure.string(param.description),
446
+ this.txb.pure.vector('string', array_unique(param.votable_proposition))],
447
447
  typeArguments: [this.pay_token_type, param.order_token_type]
448
448
  });
449
449
  }
450
450
  }
451
- };
452
- Arbitration.prototype.change_permission = function (new_permission) {
453
- if (!protocol_1.Protocol.IsValidObjects([new_permission])) {
454
- (0, exception_1.ERROR)(exception_1.Errors.IsValidObjects);
451
+ }
452
+ change_permission(new_permission) {
453
+ if (!Protocol.IsValidObjects([new_permission])) {
454
+ ERROR(Errors.IsValidObjects);
455
455
  }
456
456
  this.txb.moveCall({
457
- target: protocol_1.Protocol.Instance().ArbitrationFn('permission_set'),
458
- arguments: [protocol_1.Protocol.TXB_OBJECT(this.txb, this.object), protocol_1.Protocol.TXB_OBJECT(this.txb, this.permission), protocol_1.Protocol.TXB_OBJECT(this.txb, new_permission)],
457
+ target: Protocol.Instance().arbitrationFn('permission_set'),
458
+ arguments: [Protocol.TXB_OBJECT(this.txb, this.object), Protocol.TXB_OBJECT(this.txb, this.permission), Protocol.TXB_OBJECT(this.txb, new_permission)],
459
459
  typeArguments: [this.pay_token_type]
460
460
  });
461
461
  this.permission = new_permission;
462
+ }
463
+ static parseObjectType = (chain_type) => {
464
+ return parseObjectType(chain_type, 'arbitration::Arbitration<');
462
465
  };
463
- Arbitration.parseObjectType = function (chain_type) {
464
- return (0, utils_1.parseObjectType)(chain_type, 'arbitration::Arbitration<');
465
- };
466
- Arbitration.parseArbObjectType = function (chain_type) {
467
- return (0, utils_1.parseObjectType)(chain_type, 'arb::Arb<');
466
+ static parseArbObjectType = (chain_type) => {
467
+ return parseObjectType(chain_type, 'arb::Arb<');
468
468
  };
469
- Arbitration.queryArbVoted = function () {
469
+ static queryArbVoted = () => {
470
470
  };
471
- Arbitration.MAX_PROPOSITION_COUNT = 16;
472
- Arbitration.MAX_VOTING_GUARD_COUNT = 16;
473
- return Arbitration;
474
- }());
475
- exports.Arbitration = Arbitration;
471
+ static MAX_PROPOSITION_COUNT = 16;
472
+ static MAX_VOTING_GUARD_COUNT = 16;
473
+ }