wowok 1.1.5 → 1.2.0
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/README.md +7 -2
- package/dist/demand.d.ts +0 -2
- package/dist/demand.d.ts.map +1 -1
- package/dist/demand.js +0 -8
- package/dist/entity.d.ts +23 -0
- package/dist/entity.d.ts.map +1 -0
- package/dist/entity.js +71 -0
- package/dist/exception.d.ts +2 -1
- package/dist/exception.d.ts.map +1 -1
- package/dist/exception.js +1 -0
- package/dist/guard.d.ts +12 -12
- package/dist/guard.d.ts.map +1 -1
- package/dist/guard.js +65 -52
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/machine.d.ts +0 -2
- package/dist/machine.d.ts.map +1 -1
- package/dist/machine.js +0 -7
- package/dist/passport.d.ts +13 -9
- package/dist/passport.d.ts.map +1 -1
- package/dist/passport.js +60 -55
- package/dist/permission.d.ts +0 -2
- package/dist/permission.d.ts.map +1 -1
- package/dist/permission.js +0 -7
- package/dist/progress.d.ts +0 -2
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.js +9 -7
- package/dist/protocol.d.ts +15 -8
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +29 -26
- package/dist/repository.d.ts +0 -2
- package/dist/repository.d.ts.map +1 -1
- package/dist/repository.js +10 -9
- package/dist/resource.d.ts +2 -5
- package/dist/resource.d.ts.map +1 -1
- package/dist/resource.js +4 -30
- package/dist/reward.d.ts +0 -2
- package/dist/reward.d.ts.map +1 -1
- package/dist/reward.js +9 -7
- package/dist/service.d.ts +0 -2
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +10 -8
- package/dist/utils.d.ts +1 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +10 -0
- package/dist/vote.d.ts +0 -2
- package/dist/vote.d.ts.map +1 -1
- package/dist/vote.js +0 -7
- package/dist/wowok.d.ts +12 -0
- package/dist/wowok.d.ts.map +1 -0
- package/dist/wowok.js +48 -0
- package/package.json +10 -3
- package/src/demand.ts +1 -10
- package/src/entity.ts +27 -1
- package/src/guard.ts +55 -55
- package/src/index.ts +11 -8
- package/src/machine.ts +0 -8
- package/src/passport.ts +69 -65
- package/src/permission.ts +0 -8
- package/src/progress.ts +2 -2
- package/src/protocol.ts +28 -28
- package/src/repository.ts +2 -2
- package/src/resource.ts +3 -35
- package/src/reward.ts +2 -2
- package/src/service.ts +2 -2
- package/src/vote.ts +0 -8
package/dist/passport.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type Guard_Query_Object = {
|
|
|
6
6
|
types: string[];
|
|
7
7
|
id: string;
|
|
8
8
|
};
|
|
9
|
-
interface QueryInfo {
|
|
9
|
+
export interface QueryInfo {
|
|
10
10
|
identifier?: number;
|
|
11
11
|
index: number;
|
|
12
12
|
type: number;
|
|
@@ -16,15 +16,15 @@ interface QueryInfo {
|
|
|
16
16
|
interface GuardInfo {
|
|
17
17
|
id: string;
|
|
18
18
|
query_list: (string | QueryInfo)[];
|
|
19
|
-
|
|
19
|
+
constant: QueryInfo[];
|
|
20
20
|
input_witness: QueryInfo[];
|
|
21
21
|
}
|
|
22
|
-
interface
|
|
22
|
+
export interface DeGuardConstant {
|
|
23
23
|
type: number;
|
|
24
24
|
value: any;
|
|
25
25
|
identifier?: number;
|
|
26
26
|
}
|
|
27
|
-
interface DeGuardData {
|
|
27
|
+
export interface DeGuardData {
|
|
28
28
|
type: number;
|
|
29
29
|
value?: any;
|
|
30
30
|
identifier?: number;
|
|
@@ -32,12 +32,12 @@ interface DeGuardData {
|
|
|
32
32
|
child: DeGuardData[];
|
|
33
33
|
ret_type?: number;
|
|
34
34
|
}
|
|
35
|
-
interface FutrueFill {
|
|
35
|
+
export interface FutrueFill {
|
|
36
36
|
guard: string;
|
|
37
37
|
index: number;
|
|
38
38
|
future: string;
|
|
39
39
|
}
|
|
40
|
-
interface PassportQuery {
|
|
40
|
+
export interface PassportQuery {
|
|
41
41
|
guard: GuardObject[];
|
|
42
42
|
query: Guard_Query_Object[];
|
|
43
43
|
witness: Guard_Query_Object[];
|
|
@@ -50,13 +50,17 @@ export declare class GuardParser {
|
|
|
50
50
|
private get_index;
|
|
51
51
|
private constructor();
|
|
52
52
|
guardlist: () => GuardInfo[];
|
|
53
|
+
static DeGuardObject_FromData: (guard_constants: any, guard_input_bytes: any) => {
|
|
54
|
+
object: DeGuardData;
|
|
55
|
+
constant: DeGuardConstant[];
|
|
56
|
+
};
|
|
53
57
|
static DeGuardObject: (protocol: Protocol, guard: string) => Promise<{
|
|
54
58
|
object: DeGuardData;
|
|
55
|
-
|
|
59
|
+
constant: DeGuardConstant[];
|
|
56
60
|
}>;
|
|
57
|
-
static ResolveData: (
|
|
61
|
+
static ResolveData: (constants: DeGuardConstant[], stack: DeGuardData[], current: DeGuardData) => void;
|
|
58
62
|
static CreateAsync: (protocol: Protocol, guards: string[]) => Promise<GuardParser>;
|
|
59
|
-
|
|
63
|
+
parse_constant: (info: GuardInfo, constants: any) => void;
|
|
60
64
|
parse_bcs: (info: GuardInfo, chain_bytes: Uint8Array) => void;
|
|
61
65
|
private get_object;
|
|
62
66
|
done: (fill?: FutrueFill[]) => Promise<PassportQuery>;
|
package/dist/passport.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"passport.d.ts","sourceRoot":"","sources":["../src/passport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,sBAAsB,EAAU,MAAM,6BAA6B,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EACK,MAAM,YAAY,CAAC;AAMlE,MAAM,MAAM,kBAAkB,GAAG;IAC7B,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE,sBAAsB,CAAC;IAC/B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;CACd,CAAA;AAED,
|
|
1
|
+
{"version":3,"file":"passport.d.ts","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
package/dist/passport.js
CHANGED
|
@@ -15,27 +15,15 @@ export class GuardParser {
|
|
|
15
15
|
this.guards = guards.map(g => protocol.CurrentSession().object(g));
|
|
16
16
|
}
|
|
17
17
|
guardlist = () => { return this.guard_list; };
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
ERROR(Errors.IsValidAddress, 'GuardObject guard');
|
|
22
|
-
}
|
|
23
|
-
let res = await protocol.Query_Raw([guard]);
|
|
24
|
-
if (res.length == 0 || !res[0].data || res[0].data?.objectId != guard) {
|
|
25
|
-
ERROR(Errors.Fail, 'GuardObject query error');
|
|
26
|
-
}
|
|
27
|
-
// console.log(res[0].data?.content);
|
|
28
|
-
let content = res[0].data.content;
|
|
29
|
-
if (content?.type != protocol.Package() + '::guard::Guard') {
|
|
30
|
-
ERROR(Errors.Fail, 'GuardObject object invalid');
|
|
31
|
-
}
|
|
32
|
-
let variables = [];
|
|
33
|
-
content.fields.variables.forEach((v) => {
|
|
18
|
+
static DeGuardObject_FromData = (guard_constants, guard_input_bytes) => {
|
|
19
|
+
let constants = [];
|
|
20
|
+
guard_constants.forEach((c) => {
|
|
34
21
|
let value;
|
|
35
|
-
|
|
22
|
+
let v = c?.fields ?? c; // graphql dosnot 'fields', but rpcall has.
|
|
23
|
+
switch (v.type) {
|
|
36
24
|
case ContextType.TYPE_WITNESS_ID:
|
|
37
25
|
case ValueType.TYPE_ADDRESS:
|
|
38
|
-
value = '0x' + Bcs.getInstance().de(BCS.ADDRESS, Uint8Array.from(v.
|
|
26
|
+
value = '0x' + Bcs.getInstance().de(BCS.ADDRESS, Uint8Array.from(v.value)).toString();
|
|
39
27
|
break;
|
|
40
28
|
case ValueType.TYPE_BOOL:
|
|
41
29
|
case ValueType.TYPE_U8:
|
|
@@ -55,18 +43,19 @@ export class GuardParser {
|
|
|
55
43
|
case ValueType.TYPE_OPTION_U64:
|
|
56
44
|
case ValueType.TYPE_OPTION_U256:
|
|
57
45
|
case ValueType.TYPE_VEC_U256:
|
|
58
|
-
let de = SER_VALUE.find(s => s.type == v.
|
|
46
|
+
let de = SER_VALUE.find(s => s.type == v.type);
|
|
59
47
|
if (!de)
|
|
60
48
|
ERROR(Errors.Fail, 'GuardObject de error');
|
|
61
|
-
value = Bcs.getInstance().de(de.name, Uint8Array.from(v.
|
|
49
|
+
value = Bcs.getInstance().de(de.name, Uint8Array.from(v.value));
|
|
62
50
|
break;
|
|
63
51
|
default:
|
|
64
|
-
ERROR(Errors.Fail, 'GuardObject
|
|
52
|
+
ERROR(Errors.Fail, 'GuardObject constant type invalid');
|
|
65
53
|
}
|
|
66
|
-
|
|
54
|
+
constants.push({ identifier: v.identifier, type: v.type, value: value });
|
|
67
55
|
});
|
|
68
|
-
// console.log(
|
|
69
|
-
let
|
|
56
|
+
// console.log(constants)
|
|
57
|
+
let bytes = Uint8Array.from(guard_input_bytes);
|
|
58
|
+
let arr = [].slice.call(bytes.reverse());
|
|
70
59
|
let data = [];
|
|
71
60
|
while (arr.length > 0) {
|
|
72
61
|
let type = arr.shift();
|
|
@@ -88,10 +77,10 @@ export class GuardParser {
|
|
|
88
77
|
case OperatorType.TYPE_LOGIC_AND:
|
|
89
78
|
case OperatorType.TYPE_LOGIC_OR:
|
|
90
79
|
break;
|
|
91
|
-
case ContextType.
|
|
80
|
+
case ContextType.TYPE_CONSTANT:
|
|
92
81
|
identifier = arr.shift(); // identifier
|
|
93
82
|
break;
|
|
94
|
-
case ContextType.TYPE_WITNESS_ID: // add to
|
|
83
|
+
case ContextType.TYPE_WITNESS_ID: // add to constant
|
|
95
84
|
case ValueType.TYPE_ADDRESS:
|
|
96
85
|
value = '0x' + Bcs.getInstance().de(BCS.ADDRESS, Uint8Array.from(arr)).toString();
|
|
97
86
|
arr.splice(0, 32); // address
|
|
@@ -161,18 +150,18 @@ export class GuardParser {
|
|
|
161
150
|
value = addr;
|
|
162
151
|
cmd = arr.shift(); // cmd
|
|
163
152
|
}
|
|
164
|
-
else if (t[0] == ContextType.
|
|
153
|
+
else if (t[0] == ContextType.TYPE_CONSTANT) {
|
|
165
154
|
let id = arr.splice(0, 1); // key
|
|
166
|
-
let v =
|
|
155
|
+
let v = constants.find((v) => (v.identifier == id[0]) &&
|
|
167
156
|
((v.type == ValueType.TYPE_ADDRESS) || (v.type == ContextType.TYPE_WITNESS_ID)));
|
|
168
157
|
if (!v) {
|
|
169
|
-
ERROR(Errors.Fail, 'GuardObject: indentifier not in
|
|
158
|
+
ERROR(Errors.Fail, 'GuardObject: indentifier not in constant');
|
|
170
159
|
}
|
|
171
160
|
identifier = id[0];
|
|
172
161
|
cmd = arr.shift(); // cmd
|
|
173
162
|
}
|
|
174
163
|
else {
|
|
175
|
-
ERROR(Errors.Fail, 'GuardObject:
|
|
164
|
+
ERROR(Errors.Fail, 'GuardObject: constant type invalid');
|
|
176
165
|
}
|
|
177
166
|
break;
|
|
178
167
|
case ValueType.TYPE_OPTION_ADDRESS:
|
|
@@ -221,14 +210,30 @@ export class GuardParser {
|
|
|
221
210
|
ERROR(Errors.Fail, 'GuardObject: data parsed error');
|
|
222
211
|
let stack = [];
|
|
223
212
|
data.forEach((d) => {
|
|
224
|
-
this.ResolveData(
|
|
213
|
+
this.ResolveData(constants, stack, d);
|
|
225
214
|
});
|
|
226
215
|
if (stack.length != 1) {
|
|
227
216
|
ERROR(Errors.Fail, 'GuardObject: parse error');
|
|
228
217
|
}
|
|
229
|
-
return { object: stack.pop(),
|
|
218
|
+
return { object: stack.pop(), constant: constants };
|
|
219
|
+
};
|
|
220
|
+
/// convert guard-on-chain to js object
|
|
221
|
+
static DeGuardObject = async (protocol, guard) => {
|
|
222
|
+
if (!IsValidAddress(guard)) {
|
|
223
|
+
ERROR(Errors.IsValidAddress, 'GuardObject guard');
|
|
224
|
+
}
|
|
225
|
+
let res = await protocol.Query_Raw([guard]);
|
|
226
|
+
if (res.length == 0 || !res[0].data || res[0].data?.objectId != guard) {
|
|
227
|
+
ERROR(Errors.Fail, 'GuardObject query error');
|
|
228
|
+
}
|
|
229
|
+
// console.log(res[0].data?.content);
|
|
230
|
+
let content = res[0].data.content;
|
|
231
|
+
if (content?.type != protocol.Package() + '::guard::Guard') {
|
|
232
|
+
ERROR(Errors.Fail, 'GuardObject object invalid');
|
|
233
|
+
}
|
|
234
|
+
return GuardParser.DeGuardObject_FromData(content.fields.constants, content.fields.input.fields.bytes);
|
|
230
235
|
};
|
|
231
|
-
static ResolveData = (
|
|
236
|
+
static ResolveData = (constants, stack, current) => {
|
|
232
237
|
switch (current.type) {
|
|
233
238
|
case OperatorType.TYPE_LOGIC_ALWAYS_TRUE:
|
|
234
239
|
current.ret_type = ValueType.TYPE_BOOL;
|
|
@@ -359,8 +364,8 @@ export class GuardParser {
|
|
|
359
364
|
current.ret_type = ValueType.TYPE_ADDRESS;
|
|
360
365
|
stack.push(current);
|
|
361
366
|
return;
|
|
362
|
-
case ContextType.
|
|
363
|
-
let v =
|
|
367
|
+
case ContextType.TYPE_CONSTANT:
|
|
368
|
+
let v = constants.find((e) => e.identifier == current?.identifier);
|
|
364
369
|
if (!v)
|
|
365
370
|
ERROR(Errors.Fail, 'OperateParamCount: identifier invalid ' + current.type);
|
|
366
371
|
current.ret_type = v?.type;
|
|
@@ -387,8 +392,8 @@ export class GuardParser {
|
|
|
387
392
|
let index = protocol.WOWOK_OBJECTS_TYPE().findIndex(v => { return v.includes('guard::Guard') && v == c.type; });
|
|
388
393
|
if (index == -1)
|
|
389
394
|
return;
|
|
390
|
-
let info = { id: c.fields.id.id, query_list: [],
|
|
391
|
-
me.
|
|
395
|
+
let info = { id: c.fields.id.id, query_list: [], constant: [], input_witness: [] };
|
|
396
|
+
me.parse_constant(info, c.fields.constants);
|
|
392
397
|
if (c.fields.input.type == (protocol.Package() + '::bcs::BCS')) {
|
|
393
398
|
me.parse_bcs(info, Uint8Array.from(c.fields.input.fields.bytes));
|
|
394
399
|
}
|
|
@@ -396,12 +401,12 @@ export class GuardParser {
|
|
|
396
401
|
});
|
|
397
402
|
return me;
|
|
398
403
|
};
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
if (v.type == (this.protocol.Package() + '::guard::
|
|
404
|
+
parse_constant = (info, constants) => {
|
|
405
|
+
constants.forEach((v) => {
|
|
406
|
+
if (v.type == (this.protocol.Package() + '::guard::Constant')) {
|
|
402
407
|
// ValueType.TYPE_ADDRESS: Query_Cmd maybe used the address, so save it for using
|
|
403
408
|
if (v.fields.type == ContextType.TYPE_WITNESS_ID || v.fields.type == ValueType.TYPE_ADDRESS) {
|
|
404
|
-
info.
|
|
409
|
+
info.constant.push({ identifier: v.fields.identifier, index: this.get_index(), type: v.fields.type,
|
|
405
410
|
value_or_witness: '0x' + Bcs.getInstance().de(BCS.ADDRESS, Uint8Array.from(v.fields.value)) });
|
|
406
411
|
}
|
|
407
412
|
}
|
|
@@ -427,10 +432,10 @@ export class GuardParser {
|
|
|
427
432
|
case OperatorType.TYPE_LOGIC_AND:
|
|
428
433
|
case OperatorType.TYPE_LOGIC_OR:
|
|
429
434
|
break;
|
|
430
|
-
case ContextType.
|
|
431
|
-
arr.splice(0, 1); // identifier of
|
|
435
|
+
case ContextType.TYPE_CONSTANT:
|
|
436
|
+
arr.splice(0, 1); // identifier of constant
|
|
432
437
|
break;
|
|
433
|
-
case ContextType.TYPE_WITNESS_ID: // add to
|
|
438
|
+
case ContextType.TYPE_WITNESS_ID: // add to constant
|
|
434
439
|
let addr = '0x' + Bcs.getInstance().de(BCS.ADDRESS, Uint8Array.from(arr)).toString();
|
|
435
440
|
arr.splice(0, 32); // address
|
|
436
441
|
info.input_witness.push({ index: this.get_index(), type: ContextType.TYPE_WITNESS_ID, value_or_witness: addr });
|
|
@@ -467,22 +472,22 @@ export class GuardParser {
|
|
|
467
472
|
info.query_list.push({ index: this.get_index(), type: type[0], value_or_witness: addr });
|
|
468
473
|
}
|
|
469
474
|
}
|
|
470
|
-
else if (type[0] == ContextType.
|
|
475
|
+
else if (type[0] == ContextType.TYPE_CONSTANT) {
|
|
471
476
|
let identifer = arr.splice(0, 2); // key + cmd
|
|
472
|
-
let
|
|
477
|
+
let constant = info.constant.find((v) => (v.identifier == identifer[0]) &&
|
|
473
478
|
((v.type == ValueType.TYPE_ADDRESS) || (v.type == ContextType.TYPE_WITNESS_ID)));
|
|
474
|
-
if (!
|
|
475
|
-
ERROR(Errors.Fail, 'indentifier not in
|
|
479
|
+
if (!constant) {
|
|
480
|
+
ERROR(Errors.Fail, 'indentifier not in constant');
|
|
476
481
|
}
|
|
477
|
-
if (
|
|
478
|
-
info.query_list.push(
|
|
482
|
+
if (constant?.type == ValueType.TYPE_ADDRESS) {
|
|
483
|
+
info.query_list.push(constant.value_or_witness);
|
|
479
484
|
}
|
|
480
|
-
else if (
|
|
481
|
-
info.query_list.push({ identifier: identifer[0], type:
|
|
485
|
+
else if (constant?.type == ContextType.TYPE_WITNESS_ID) {
|
|
486
|
+
info.query_list.push({ identifier: identifer[0], type: constant.type, value_or_witness: constant.value_or_witness, index: this.get_index() });
|
|
482
487
|
}
|
|
483
488
|
}
|
|
484
489
|
else {
|
|
485
|
-
ERROR(Errors.Fail, '
|
|
490
|
+
ERROR(Errors.Fail, 'constant type invalid');
|
|
486
491
|
}
|
|
487
492
|
break;
|
|
488
493
|
default:
|
|
@@ -505,7 +510,7 @@ export class GuardParser {
|
|
|
505
510
|
done = async (fill) => {
|
|
506
511
|
let objects = [];
|
|
507
512
|
this.guard_list.forEach((g) => {
|
|
508
|
-
g.
|
|
513
|
+
g.constant.filter(v => v.type == ContextType.TYPE_WITNESS_ID).forEach((q) => {
|
|
509
514
|
objects.push(this.get_object(g.id, q, fill));
|
|
510
515
|
});
|
|
511
516
|
let list = g.query_list.map((q) => {
|
|
@@ -541,7 +546,7 @@ export class GuardParser {
|
|
|
541
546
|
query.push(object);
|
|
542
547
|
});
|
|
543
548
|
res.forEach(q => {
|
|
544
|
-
let r1 = g.
|
|
549
|
+
let r1 = g.constant.find(v => v.future == q.data?.objectId);
|
|
545
550
|
let r2 = g.input_witness.find(v => v.future == q.data?.objectId);
|
|
546
551
|
// not match r1 || r2 means query-cmd, not witness-cmd
|
|
547
552
|
if (r1 || r2) {
|
package/dist/permission.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TxbObject, PermissionAddress, GuardObject, Protocol } from './protocol';
|
|
2
|
-
import { Resource } from './resource';
|
|
3
2
|
export declare enum PermissionIndex {
|
|
4
3
|
repository = 100,
|
|
5
4
|
repository_set_description_set = 101,
|
|
@@ -99,7 +98,6 @@ export declare class Permission {
|
|
|
99
98
|
static New(protocol: Protocol, description: string): Permission;
|
|
100
99
|
launch(): PermissionAddress;
|
|
101
100
|
destroy(): void;
|
|
102
|
-
mark(like: 'like' | 'unlike', resource: Resource): void;
|
|
103
101
|
add_entity(entities: Permission_Entity[]): void;
|
|
104
102
|
set_guard(entity_address: string, index: PermissionIndexType, guard?: GuardObject): void;
|
|
105
103
|
remove_index(entity_address: string, index: PermissionIndexType[]): void;
|
package/dist/permission.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permission.d.ts","sourceRoot":"","sources":["../src/permission.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,SAAS,EAAoB,iBAAiB,EAAE,WAAW,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"permission.d.ts","sourceRoot":"","sources":["../src/permission.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,SAAS,EAAoB,iBAAiB,EAAE,WAAW,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAK9G,oBAAY,eAAe;IACvB,UAAU,MAAM;IAChB,8BAA8B,MAAM;IACpC,0BAA0B,MAAM;IAChC,uBAAuB,MAAM;IAC7B,0BAA0B,MAAM;IAChC,iCAAiC,MAAM;IACvC,gCAAgC,MAAM;IACtC,wBAAwB,MAAM;IAC9B,2BAA2B,MAAM;IACjC,8BAA8B,MAAM;IACpC,IAAI,MAAM;IACV,oBAAoB,MAAM;IAC1B,kBA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C,gBAAgB,SAAQ;IAC/B,MAAM,CAAC,0BAA0B,SAAO;IACxC,MAAM,CAAC,uBAAuB,UAAU,MAAM,aAE7C;IAED,MAAM,CAAC,sBAAsB,UAAU,mBAAmB,KAAI,OAAO,CAOpE;CACJ"}
|
package/dist/permission.js
CHANGED
|
@@ -123,13 +123,6 @@ export class Permission {
|
|
|
123
123
|
arguments: [Protocol.TXB_OBJECT(txb, this.object)],
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
|
-
mark(like, resource) {
|
|
127
|
-
let txb = this.protocol.CurrentSession();
|
|
128
|
-
txb.moveCall({
|
|
129
|
-
target: this.protocol.PermissionFn(like),
|
|
130
|
-
arguments: [Protocol.TXB_OBJECT(txb, resource.get_object()), Protocol.TXB_OBJECT(txb, this.object)],
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
126
|
add_entity(entities) {
|
|
134
127
|
if (!entities) {
|
|
135
128
|
ERROR(Errors.InvalidParam, 'entities');
|
package/dist/progress.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PermissionObject, RepositoryObject, PassportObject, MachineObject, ProgressObject, ProgressAddress, Protocol, TxbObject } from './protocol';
|
|
2
|
-
import { Resource } from './resource';
|
|
3
2
|
export type ProgressNext = {
|
|
4
3
|
next_node_name: string;
|
|
5
4
|
forward: string;
|
|
@@ -20,7 +19,6 @@ export declare class Progress {
|
|
|
20
19
|
launch(): ProgressAddress;
|
|
21
20
|
launch_as_child(parent: ProgressObject, parent_next: ProgressNext): ProgressAddress;
|
|
22
21
|
destroy(): void;
|
|
23
|
-
mark(like: 'like' | 'unlike', resource: Resource): void;
|
|
24
22
|
set_namedOperator(name: string, addresses: string[], passport?: PassportObject): void;
|
|
25
23
|
bind_task(task_address: string, passport?: PassportObject): void;
|
|
26
24
|
set_context_repository(repository?: RepositoryObject, passport?: PassportObject): void;
|
package/dist/progress.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../src/progress.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAClF,cAAc,EAAE,eAAe,EAAE,QAAQ,EACzC,SAAS,EAAC,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../src/progress.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAClF,cAAc,EAAE,eAAe,EAAE,QAAQ,EACzC,SAAS,EAAC,MAAM,YAAY,CAAC;AAKjC,MAAM,MAAM,YAAY,GAAG;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;CACnB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;CAC7B,CAAA;AAED,qBAAa,QAAQ;IACjB,SAAS,CAAC,UAAU,mBAAE;IACtB,SAAS,CAAC,OAAO,gBAAC;IAClB,SAAS,CAAC,MAAM,EAAG,SAAS,CAAC;IAC7B,SAAS,CAAC,QAAQ,WAAC;IAEnB,UAAU;IACV,OAAO;IAMP,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAC,QAAQ,EAAE,OAAO,EAAC,aAAa,EAAE,UAAU,EAAC,gBAAgB,EAAE,MAAM,EAAC,SAAS,GAAI,QAAQ;IAK/G,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAC,QAAQ,EAAE,OAAO,EAAC,aAAa,EAAE,UAAU,EAAC,gBAAgB,EAAE,QAAQ,CAAC,EAAC,cAAc,GAAI,QAAQ;IAsBtH,MAAM,IAAK,eAAe;IAQ1B,eAAe,CAAC,MAAM,EAAC,cAAc,EAAE,WAAW,EAAC,YAAY,GAAI,eAAe;IAelF,OAAO;IAgBP,iBAAiB,CAAC,IAAI,EAAC,MAAM,EAAE,SAAS,EAAC,MAAM,EAAE,EAAE,QAAQ,CAAC,EAAC,cAAc;IA0B3E,SAAS,CAAC,YAAY,EAAC,MAAM,EAAE,QAAQ,CAAC,EAAC,cAAc;IAqBvD,sBAAsB,CAAC,UAAU,CAAC,EAAC,gBAAgB,EAAE,QAAQ,CAAC,EAAC,cAAc;IAmC7E,MAAM,CAAC,IAAI,EAAC,YAAY,EAAE,QAAQ,CAAC,EAAC,cAAc;IAsBlD,MAAM,CAAC,MAAM,EAAC,cAAc,EAAE,QAAQ,CAAC,EAAC,cAAc;IAyCtD,IAAI,CAAC,IAAI,EAAC,YAAY,EAAE,oBAAoB,CAAC,EAAC,MAAM,EAAE,MAAM,CAAC,EAAC,MAAM,EAAE,QAAQ,CAAC,EAAC,cAAc;IAgC9F,IAAI,CAAC,IAAI,EAAC,YAAY,EAAE,IAAI,EAAC,OAAO;IAYpC,MAAM,CAAC,wBAAwB,SAAO;IACtC,MAAM,CAAC,mBAAmB,SAAS,YAAY,aAE9C;CAEJ"}
|
package/dist/progress.js
CHANGED
|
@@ -67,13 +67,15 @@ export class Progress {
|
|
|
67
67
|
arguments: [Protocol.TXB_OBJECT(txb, this.object)],
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
/* move to: Entity.mark
|
|
71
|
+
mark(like:'like' | 'unlike', resource:Resource) {
|
|
72
|
+
let txb = this.protocol.CurrentSession();
|
|
73
|
+
txb.moveCall({
|
|
74
|
+
target:this.protocol.ProgressFn(like) as FnCallType,
|
|
75
|
+
arguments: [Protocol.TXB_OBJECT(txb, resource.get_object()), Protocol.TXB_OBJECT(txb, this.object)],
|
|
76
|
+
})
|
|
77
|
+
}
|
|
78
|
+
*/
|
|
77
79
|
set_namedOperator(name, addresses, passport) {
|
|
78
80
|
if (!IsValidName(name)) {
|
|
79
81
|
ERROR(Errors.IsValidName, 'name');
|
package/dist/protocol.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SuiObjectResponse, SuiObjectDataOptions, SuiTransactionBlockResponseOptions, SuiTransactionBlockResponse } from '@mysten/sui.js/client';
|
|
2
2
|
import { TransactionBlock, TransactionResult } from '@mysten/sui.js/transactions';
|
|
3
|
-
import {
|
|
3
|
+
import { GuardConstant } from './guard';
|
|
4
4
|
export declare enum MODULES {
|
|
5
5
|
machine = "machine",
|
|
6
6
|
node = "node",
|
|
@@ -16,6 +16,7 @@ export declare enum MODULES {
|
|
|
16
16
|
reward = "reward",
|
|
17
17
|
service = "service",
|
|
18
18
|
resource = "resource",
|
|
19
|
+
entity = "entity",
|
|
19
20
|
wowok = "wowok"
|
|
20
21
|
}
|
|
21
22
|
export type PermissionAddress = TransactionResult;
|
|
@@ -43,7 +44,9 @@ export type VoteObject = TransactionResult | string;
|
|
|
43
44
|
export type VoteAddress = TransactionResult;
|
|
44
45
|
export type ResourceObject = TransactionResult | string;
|
|
45
46
|
export type ResourceAddress = TransactionResult;
|
|
46
|
-
export type
|
|
47
|
+
export type EntityObject = TransactionResult | string;
|
|
48
|
+
export type EntityAddress = TransactionResult;
|
|
49
|
+
export type TxbObject = string | TransactionResult | GuardObject | RepositoryObject | PermissionObject | MachineObject | PassportObject | DemandObject | ServiceObject | RewardObject | OrderObject | DiscountObject | VoteObject | DemandObject | ResourceObject | EntityObject;
|
|
47
50
|
export type WowokObject = TransactionResult;
|
|
48
51
|
export type FnCallType = `${string}::${string}::${string}`;
|
|
49
52
|
export declare enum OperatorType {
|
|
@@ -88,15 +91,16 @@ export declare const IsValidValueType: (type: number) => boolean;
|
|
|
88
91
|
interface ValueTypeString {
|
|
89
92
|
type: ValueType;
|
|
90
93
|
name: string;
|
|
94
|
+
description: string;
|
|
91
95
|
}
|
|
92
96
|
export declare const SER_VALUE: ValueTypeString[];
|
|
93
97
|
export declare enum ContextType {
|
|
94
98
|
TYPE_SIGNER = 60,
|
|
95
99
|
TYPE_CLOCK = 61,
|
|
96
100
|
TYPE_WITNESS_ID = 62,
|
|
97
|
-
|
|
101
|
+
TYPE_CONSTANT = 80
|
|
98
102
|
}
|
|
99
|
-
export type
|
|
103
|
+
export type ConstantType = ValueType | ContextType.TYPE_WITNESS_ID;
|
|
100
104
|
export type Data_Type = ValueType | OperatorType | ContextType;
|
|
101
105
|
export declare enum ENTRYPOINT {
|
|
102
106
|
mainnet = "mainnet",
|
|
@@ -108,13 +112,15 @@ export declare class Protocol {
|
|
|
108
112
|
protected network: string;
|
|
109
113
|
protected package: string;
|
|
110
114
|
protected signer: string;
|
|
111
|
-
protected
|
|
115
|
+
protected wowok_object: string;
|
|
116
|
+
protected entity_object: string;
|
|
112
117
|
protected graphql: string;
|
|
113
118
|
protected txb: TransactionBlock | undefined;
|
|
114
119
|
constructor(network?: ENTRYPOINT);
|
|
115
120
|
UseNetwork(network?: ENTRYPOINT): void;
|
|
116
121
|
Package(): string;
|
|
117
|
-
|
|
122
|
+
WowokObject(): string;
|
|
123
|
+
EntityObject(): string;
|
|
118
124
|
GraphqlUrl(): string;
|
|
119
125
|
NetworkUrl(): string;
|
|
120
126
|
MachineFn: (fn: any) => string;
|
|
@@ -131,6 +137,7 @@ export declare class Protocol {
|
|
|
131
137
|
RewardFn: (fn: any) => string;
|
|
132
138
|
ServiceFn: (fn: any) => string;
|
|
133
139
|
ResourceFn: (fn: any) => string;
|
|
140
|
+
EntityFn: (fn: any) => string;
|
|
134
141
|
WowokFn: (fn: any) => string;
|
|
135
142
|
Query: (objects: Query_Param[], options?: SuiObjectDataOptions) => Promise<SuiObjectResponse[]>;
|
|
136
143
|
Query_Raw: (objects: string[], options?: SuiObjectDataOptions) => Promise<SuiObjectResponse[]>;
|
|
@@ -175,9 +182,9 @@ export declare class RpcResultParser {
|
|
|
175
182
|
export type Query_Param = {
|
|
176
183
|
objectid: string;
|
|
177
184
|
callback: (protocol: Protocol, response: SuiObjectResponse, param: Query_Param, option: SuiObjectDataOptions) => void;
|
|
178
|
-
parser?: (result: any[], guardid: string, chain_sense_bsc: Uint8Array,
|
|
185
|
+
parser?: (result: any[], guardid: string, chain_sense_bsc: Uint8Array, constant?: GuardConstant) => boolean;
|
|
179
186
|
data?: any;
|
|
180
|
-
|
|
187
|
+
constants?: GuardConstant;
|
|
181
188
|
};
|
|
182
189
|
export {};
|
|
183
190
|
//# sourceMappingURL=protocol.d.ts.map
|
package/dist/protocol.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,iBAAiB,EAAE,oBAAoB,EAAE,kCAAkC,EAC3F,2BAA2B,EAAmB,MAAM,uBAAuB,CAAC;AAGhF,OAAO,EAAE,gBAAgB,EAAU,iBAAiB,EAAuB,MAAM,6BAA6B,CAAC;AAE/G,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGxC,oBAAY,OAAO;IACf,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,KAAK,UAAU;CAClB;AAED,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AAClD,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG,MAAM,CAAC;AAC1D,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AAClD,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG,MAAM,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAC;AAC7C,MAAM,MAAM,WAAW,GAAG,iBAAiB,GAAG,MAAM,CAAE;AACtD,MAAM,MAAM,cA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,EAAC,gBAAgB,EAAE,GAAG,EAAC,SAAS,GAAI,iBAAiB;IAI1E,MAAM,CAAC,cAAc,QAAQ,SAAS,EAAE,KAAI,OAAO,CAKlD;IACD,kBAAkB,iBAC6D;IAC/E,yBAAyB,iBACwB;IACjD,0BAA0B,cAAc,MAAM,KAAI,MAAM,CAcvD;CACJ;AAED,qBAAa,eAAe;IACxB,MAAM,CAAC,iBAAiB,iBAIvB;IACD,MAAM,CAAC,uBAAuB,aAAa,QAAQ,YAAW,2BAA2B,kBAAiB,IAAI,MAAM,EAAE,SAAS,EAAE,CAAC,KAAG,IAAI,MAAM,EAAE,SAAS,EAAE,CAAC,CA0B5J;CACJ;AAED,MAAM,MAAM,WAAW,GAAG;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,CAAC,QAAQ,EAAC,QAAQ,EAAE,QAAQ,EAAC,iBAAiB,EAAE,KAAK,EAAC,WAAW,EAAE,MAAM,EAAC,oBAAoB,KAAG,IAAI,CAAC;IAChH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAC,GAAG,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAC,UAAU,EAAE,QAAQ,CAAC,EAAC,aAAa,KAAM,OAAO,CAAC;IAC1G,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,SAAS,CAAC,EAAE,aAAa,CAAC;CAC7B,CAAC"}
|
package/dist/protocol.js
CHANGED
|
@@ -19,6 +19,7 @@ export var MODULES;
|
|
|
19
19
|
MODULES["reward"] = "reward";
|
|
20
20
|
MODULES["service"] = "service";
|
|
21
21
|
MODULES["resource"] = "resource";
|
|
22
|
+
MODULES["entity"] = "entity";
|
|
22
23
|
MODULES["wowok"] = "wowok";
|
|
23
24
|
})(MODULES || (MODULES = {}));
|
|
24
25
|
export var OperatorType;
|
|
@@ -63,32 +64,32 @@ export const ValueTypeArray = Object.values(ValueType).filter((v) => typeof (v)
|
|
|
63
64
|
export const IsValidOperatorType = (type) => { return OperatorTypeArray.includes(type); };
|
|
64
65
|
export const IsValidValueType = (type) => { return ValueTypeArray.includes(type); };
|
|
65
66
|
export const SER_VALUE = [
|
|
66
|
-
{ type: ValueType.TYPE_BOOL, name: 'bool' },
|
|
67
|
-
{ type: ValueType.TYPE_ADDRESS, name: 'address' },
|
|
68
|
-
{ type: ValueType.TYPE_U64, name: '
|
|
69
|
-
{ type: ValueType.TYPE_U8, name: '
|
|
70
|
-
{ type: ValueType.TYPE_VEC_U8, name: '
|
|
71
|
-
{ type: ValueType.TYPE_U128, name: '
|
|
72
|
-
{ type: ValueType.TYPE_VEC_ADDRESS, name: '
|
|
73
|
-
{ type: ValueType.TYPE_VEC_BOOL, name: '
|
|
74
|
-
{ type: ValueType.TYPE_VEC_VEC_U8, name: '
|
|
75
|
-
{ type: ValueType.TYPE_VEC_U64, name: '
|
|
76
|
-
{ type: ValueType.TYPE_VEC_U128, name: '
|
|
77
|
-
{ type: ValueType.TYPE_OPTION_ADDRESS, name: '
|
|
78
|
-
{ type: ValueType.TYPE_OPTION_BOOL, name: '
|
|
79
|
-
{ type: ValueType.TYPE_OPTION_U8, name: '
|
|
80
|
-
{ type: ValueType.TYPE_OPTION_U64, name: '
|
|
81
|
-
{ type: ValueType.TYPE_OPTION_U128, name: '
|
|
82
|
-
{ type: ValueType.TYPE_OPTION_U256, name: '
|
|
83
|
-
{ type: ValueType.TYPE_VEC_U256, name: '
|
|
84
|
-
{ type: ValueType.TYPE_U256, name: '
|
|
67
|
+
{ type: ValueType.TYPE_BOOL, name: 'bool', description: 'boolean. eg:true or false' },
|
|
68
|
+
{ type: ValueType.TYPE_ADDRESS, name: 'address', description: 'address or object-id. eg:0x6789af' },
|
|
69
|
+
{ type: ValueType.TYPE_U64, name: 'number', description: 'unsigned-64 number. eg:23870233' },
|
|
70
|
+
{ type: ValueType.TYPE_U8, name: 'number', description: 'unsigned-8 number. eg:255' },
|
|
71
|
+
{ type: ValueType.TYPE_VEC_U8, name: '[number]', description: 'unsigned-8 number array. eg:"wowok"' },
|
|
72
|
+
{ type: ValueType.TYPE_U128, name: 'number', description: 'unsigned-8 number. eg:12348900999' },
|
|
73
|
+
{ type: ValueType.TYPE_VEC_ADDRESS, name: '[address]', description: 'address array. eg:[0x2277f2, 0x3344af]' },
|
|
74
|
+
{ type: ValueType.TYPE_VEC_BOOL, name: '[bool]', description: 'boolean array. eg:[true, false, true]' },
|
|
75
|
+
{ type: ValueType.TYPE_VEC_VEC_U8, name: '[[number]]', description: 'array of unsigned-8 number array. eg:["i", "like", "wowok"]' },
|
|
76
|
+
{ type: ValueType.TYPE_VEC_U64, name: '[number]', description: 'unsigned-64 number array. eg:[123, 778888, 42312]' },
|
|
77
|
+
{ type: ValueType.TYPE_VEC_U128, name: '[number]', description: 'unsigned-128 number array. eg:[123, 778888, 42312]' },
|
|
78
|
+
{ type: ValueType.TYPE_OPTION_ADDRESS, name: 'option', description: 'option of address. eg:none or address' },
|
|
79
|
+
{ type: ValueType.TYPE_OPTION_BOOL, name: 'option', description: 'option of bool. eg:none or boolean value' },
|
|
80
|
+
{ type: ValueType.TYPE_OPTION_U8, name: 'option', description: 'option of u8. eg:none or u8 value' },
|
|
81
|
+
{ type: ValueType.TYPE_OPTION_U64, name: 'option', description: 'option of u64. eg:none or u64 value' },
|
|
82
|
+
{ type: ValueType.TYPE_OPTION_U128, name: 'option', description: 'option of u128. eg:none or u128 value' },
|
|
83
|
+
{ type: ValueType.TYPE_OPTION_U256, name: 'option', description: 'option of u256. eg:none or u256 value' },
|
|
84
|
+
{ type: ValueType.TYPE_VEC_U256, name: '[number]', description: 'unsigned-256 number array. eg:[123, 778888, 42312]' },
|
|
85
|
+
{ type: ValueType.TYPE_U256, name: 'number', description: 'unsigned-256 number. eg:12345678901233' },
|
|
85
86
|
];
|
|
86
87
|
export var ContextType;
|
|
87
88
|
(function (ContextType) {
|
|
88
89
|
ContextType[ContextType["TYPE_SIGNER"] = 60] = "TYPE_SIGNER";
|
|
89
90
|
ContextType[ContextType["TYPE_CLOCK"] = 61] = "TYPE_CLOCK";
|
|
90
91
|
ContextType[ContextType["TYPE_WITNESS_ID"] = 62] = "TYPE_WITNESS_ID";
|
|
91
|
-
ContextType[ContextType["
|
|
92
|
+
ContextType[ContextType["TYPE_CONSTANT"] = 80] = "TYPE_CONSTANT";
|
|
92
93
|
})(ContextType || (ContextType = {}));
|
|
93
94
|
export var ENTRYPOINT;
|
|
94
95
|
(function (ENTRYPOINT) {
|
|
@@ -101,7 +102,8 @@ export class Protocol {
|
|
|
101
102
|
network = '';
|
|
102
103
|
package = '';
|
|
103
104
|
signer = '';
|
|
104
|
-
|
|
105
|
+
wowok_object = '';
|
|
106
|
+
entity_object = '';
|
|
105
107
|
graphql = '';
|
|
106
108
|
txb;
|
|
107
109
|
constructor(network = ENTRYPOINT.testnet) {
|
|
@@ -112,14 +114,13 @@ export class Protocol {
|
|
|
112
114
|
this.network = network;
|
|
113
115
|
switch (network) {
|
|
114
116
|
case ENTRYPOINT.localnet:
|
|
115
|
-
this.package = "0xe9721254e97dd074e06c5efe5c57be169b64b39ae48939d89c00bf2f62b19e10";
|
|
116
|
-
this.everyone_guard = "0xb2a3fe7881cb883743c4e962b7e3c7716a1cd47a67adad01dc79795def4f769d";
|
|
117
117
|
break;
|
|
118
118
|
case ENTRYPOINT.devnet:
|
|
119
119
|
break;
|
|
120
120
|
case ENTRYPOINT.testnet:
|
|
121
|
-
this.package = "
|
|
122
|
-
this.
|
|
121
|
+
this.package = "0x2ac00805aa0ec3c62b575e412108bb295389bbfc86202fd7b73c69dbbb80769a";
|
|
122
|
+
this.wowok_object = '0x49d49fb41c63c3f6c838fca20c25741f20aa74a176391685446794bdaa9b7934';
|
|
123
|
+
this.entity_object = '0xd21d8d76f553b2db6c6d28a8b2ae3405bec92f2a300676d80fcc004ca40b0a77';
|
|
123
124
|
this.graphql = 'https://sui-testnet.mystenlabs.com/graphql';
|
|
124
125
|
break;
|
|
125
126
|
case ENTRYPOINT.mainnet:
|
|
@@ -128,7 +129,8 @@ export class Protocol {
|
|
|
128
129
|
;
|
|
129
130
|
}
|
|
130
131
|
Package() { return this.package; }
|
|
131
|
-
|
|
132
|
+
WowokObject() { return this.wowok_object; }
|
|
133
|
+
EntityObject() { return this.entity_object; }
|
|
132
134
|
GraphqlUrl() { return this.graphql; }
|
|
133
135
|
NetworkUrl() {
|
|
134
136
|
switch (this.network) {
|
|
@@ -159,6 +161,7 @@ export class Protocol {
|
|
|
159
161
|
RewardFn = (fn) => { return `${this.package}::${MODULES.reward}::${fn}`; };
|
|
160
162
|
ServiceFn = (fn) => { return `${this.package}::${MODULES.service}::${fn}`; };
|
|
161
163
|
ResourceFn = (fn) => { return `${this.package}::${MODULES.resource}::${fn}`; };
|
|
164
|
+
EntityFn = (fn) => { return `${this.package}::${MODULES.entity}::${fn}`; };
|
|
162
165
|
WowokFn = (fn) => { return `${this.package}::${MODULES.wowok}::${fn}`; };
|
|
163
166
|
Query = async (objects, options = { showContent: true }) => {
|
|
164
167
|
const client = new SuiClient({ url: this.NetworkUrl() });
|
package/dist/repository.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Protocol, ValueType, RepositoryAddress, PermissionObject, PassportObject, TxbObject } from './protocol';
|
|
2
2
|
import { PermissionIndexType } from './permission';
|
|
3
|
-
import { Resource } from './resource';
|
|
4
3
|
export declare enum Repository_Policy_Mode {
|
|
5
4
|
POLICY_MODE_FREE = 0,
|
|
6
5
|
POLICY_MODE_STRICT = 1
|
|
@@ -30,7 +29,6 @@ export declare class Repository {
|
|
|
30
29
|
static New(protocol: Protocol, permission: PermissionObject, description: string, policy_mode: Repository_Policy_Mode, passport?: PassportObject): Repository;
|
|
31
30
|
launch(): RepositoryAddress;
|
|
32
31
|
destroy(): false | undefined;
|
|
33
|
-
mark(like: 'like' | 'unlike', resource: Resource): false | undefined;
|
|
34
32
|
add_data(data: Repository_Policy_Data): void;
|
|
35
33
|
remove(address: string, key: string): void;
|
|
36
34
|
add_reference(references: string[], passport?: PassportObject): void;
|