wowok_agent 1.6.6 → 2.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of wowok_agent might be problematic. Click here for more details.
- package/README.md +20 -40
- package/dist/index.d.ts +13528 -27
- package/dist/index.js +1026 -27
- package/dist/schema/call/allocation.d.ts +1370 -0
- package/dist/schema/call/allocation.js +27 -0
- package/dist/schema/call/arbitration.d.ts +1902 -0
- package/dist/schema/call/arbitration.js +106 -0
- package/dist/schema/call/base.d.ts +6381 -0
- package/dist/schema/call/base.js +152 -0
- package/dist/schema/call/contact.d.ts +898 -0
- package/dist/schema/call/contact.js +41 -0
- package/dist/schema/call/demand.d.ts +1193 -0
- package/dist/schema/call/demand.js +51 -0
- package/dist/schema/call/guard.d.ts +819 -0
- package/dist/schema/call/guard.js +67 -0
- package/dist/schema/call/handler.d.ts +80 -0
- package/dist/schema/call/handler.js +177 -0
- package/dist/schema/call/index.d.ts +18 -0
- package/dist/schema/call/index.js +19 -0
- package/dist/schema/call/machine.d.ts +3906 -0
- package/dist/schema/call/machine.js +164 -0
- package/dist/schema/call/order.d.ts +994 -0
- package/dist/schema/call/order.js +39 -0
- package/dist/schema/call/payment.d.ts +408 -0
- package/dist/schema/call/payment.js +20 -0
- package/dist/schema/call/permission.d.ts +2945 -0
- package/dist/schema/call/permission.js +118 -0
- package/dist/schema/call/personal.d.ts +1498 -0
- package/dist/schema/call/personal.js +81 -0
- package/dist/schema/call/progress.d.ts +847 -0
- package/dist/schema/call/progress.js +37 -0
- package/dist/schema/call/proof.d.ts +328 -0
- package/dist/schema/call/proof.js +27 -0
- package/dist/schema/call/repository.d.ts +2220 -0
- package/dist/schema/call/repository.js +85 -0
- package/dist/schema/call/reward.d.ts +1178 -0
- package/dist/schema/call/reward.js +46 -0
- package/dist/schema/call/service.d.ts +3534 -0
- package/dist/schema/call/service.js +87 -0
- package/dist/schema/call/treasury.d.ts +2399 -0
- package/dist/schema/call/treasury.js +76 -0
- package/dist/schema/common/index.d.ts +623 -0
- package/dist/schema/common/index.js +331 -0
- package/dist/schema/index.d.ts +7 -0
- package/dist/schema/index.js +8 -0
- package/dist/schema/local/index.d.ts +7824 -0
- package/dist/schema/local/index.js +913 -0
- package/dist/schema/local/wip.d.ts +781 -0
- package/dist/schema/local/wip.js +229 -0
- package/dist/schema/messenger/index.d.ts +3624 -0
- package/dist/schema/messenger/index.js +407 -0
- package/dist/schema/query/index.d.ts +27176 -0
- package/dist/schema/query/index.js +1313 -0
- package/dist/schema/utils/guard-parser.d.ts +20 -0
- package/dist/schema/utils/guard-parser.js +410 -0
- package/dist/schema/utils/guard-query-utils.d.ts +5 -0
- package/dist/schema/utils/guard-query-utils.js +22 -0
- package/dist/schema/utils/node-parser.d.ts +59 -0
- package/dist/schema/utils/node-parser.js +382 -0
- package/dist/schema/utils/permission-index-utils.d.ts +2 -0
- package/dist/schema/utils/permission-index-utils.js +10 -0
- package/package.json +31 -49
- package/LICENSE +0 -201
- package/dist/call/arbitration.d.ts +0 -57
- package/dist/call/arbitration.d.ts.map +0 -1
- package/dist/call/arbitration.js +0 -245
- package/dist/call/arbitration.js.map +0 -1
- package/dist/call/base.d.ts +0 -85
- package/dist/call/base.d.ts.map +0 -1
- package/dist/call/base.js +0 -231
- package/dist/call/base.js.map +0 -1
- package/dist/call/call.d.ts +0 -95
- package/dist/call/call.d.ts.map +0 -1
- package/dist/call/call.js +0 -149
- package/dist/call/call.js.map +0 -1
- package/dist/call/demand.d.ts +0 -46
- package/dist/call/demand.d.ts.map +0 -1
- package/dist/call/demand.js +0 -201
- package/dist/call/demand.js.map +0 -1
- package/dist/call/guard.d.ts +0 -53
- package/dist/call/guard.d.ts.map +0 -1
- package/dist/call/guard.js +0 -386
- package/dist/call/guard.js.map +0 -1
- package/dist/call/machine.d.ts +0 -97
- package/dist/call/machine.d.ts.map +0 -1
- package/dist/call/machine.js +0 -342
- package/dist/call/machine.js.map +0 -1
- package/dist/call/object_permission.d.ts +0 -14
- package/dist/call/object_permission.d.ts.map +0 -1
- package/dist/call/object_permission.js +0 -59
- package/dist/call/object_permission.js.map +0 -1
- package/dist/call/permission.d.ts +0 -63
- package/dist/call/permission.d.ts.map +0 -1
- package/dist/call/permission.js +0 -137
- package/dist/call/permission.js.map +0 -1
- package/dist/call/personal.d.ts +0 -47
- package/dist/call/personal.d.ts.map +0 -1
- package/dist/call/personal.js +0 -119
- package/dist/call/personal.js.map +0 -1
- package/dist/call/repository.d.ts +0 -117
- package/dist/call/repository.d.ts.map +0 -1
- package/dist/call/repository.js +0 -408
- package/dist/call/repository.js.map +0 -1
- package/dist/call/service.d.ts +0 -115
- package/dist/call/service.d.ts.map +0 -1
- package/dist/call/service.js +0 -550
- package/dist/call/service.js.map +0 -1
- package/dist/call/treasury.d.ts +0 -46
- package/dist/call/treasury.d.ts.map +0 -1
- package/dist/call/treasury.js +0 -222
- package/dist/call/treasury.js.map +0 -1
- package/dist/common.d.ts +0 -12
- package/dist/common.d.ts.map +0 -1
- package/dist/common.js +0 -71
- package/dist/common.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/local/.d.ts +0 -20
- package/dist/local/.d.ts.map +0 -1
- package/dist/local/.js +0 -76
- package/dist/local/.js.map +0 -1
- package/dist/local/account.d.ts +0 -42
- package/dist/local/account.d.ts.map +0 -1
- package/dist/local/account.js +0 -335
- package/dist/local/account.js.map +0 -1
- package/dist/local/cache.d.ts +0 -32
- package/dist/local/cache.d.ts.map +0 -1
- package/dist/local/cache.js +0 -77
- package/dist/local/cache.js.map +0 -1
- package/dist/local/coin.d.ts +0 -22
- package/dist/local/coin.d.ts.map +0 -1
- package/dist/local/coin.js +0 -123
- package/dist/local/coin.js.map +0 -1
- package/dist/local/config.d.ts +0 -20
- package/dist/local/config.d.ts.map +0 -1
- package/dist/local/config.js +0 -75
- package/dist/local/config.js.map +0 -1
- package/dist/local/index.d.ts +0 -110
- package/dist/local/index.d.ts.map +0 -1
- package/dist/local/index.js +0 -122
- package/dist/local/index.js.map +0 -1
- package/dist/local/local.d.ts +0 -55
- package/dist/local/local.d.ts.map +0 -1
- package/dist/local/local.js +0 -248
- package/dist/local/local.js.map +0 -1
- package/dist/query/events.d.ts +0 -65
- package/dist/query/events.d.ts.map +0 -1
- package/dist/query/events.js +0 -75
- package/dist/query/events.js.map +0 -1
- package/dist/query/objects.d.ts +0 -346
- package/dist/query/objects.d.ts.map +0 -1
- package/dist/query/objects.js +0 -472
- package/dist/query/objects.js.map +0 -1
- package/dist/query/permission.d.ts +0 -15
- package/dist/query/permission.d.ts.map +0 -1
- package/dist/query/permission.js +0 -45
- package/dist/query/permission.js.map +0 -1
- package/dist/query/received.d.ts +0 -16
- package/dist/query/received.d.ts.map +0 -1
- package/dist/query/received.js +0 -16
- package/dist/query/received.js.map +0 -1
- package/dist/schema/call.d.ts +0 -13005
- package/dist/schema/call.d.ts.map +0 -1
- package/dist/schema/call.js +0 -997
- package/dist/schema/call.js.map +0 -1
- package/dist/schema/const.d.ts +0 -254
- package/dist/schema/const.d.ts.map +0 -1
- package/dist/schema/const.js +0 -305
- package/dist/schema/const.js.map +0 -1
- package/dist/schema/local.d.ts +0 -702
- package/dist/schema/local.d.ts.map +0 -1
- package/dist/schema/local.js +0 -150
- package/dist/schema/local.js.map +0 -1
- package/dist/schema/query.d.ts +0 -1465
- package/dist/schema/query.d.ts.map +0 -1
- package/dist/schema/query.js +0 -224
- package/dist/schema/query.js.map +0 -1
- package/dist/schema/util.d.ts +0 -71
- package/dist/schema/util.d.ts.map +0 -1
- package/dist/schema/util.js +0 -139
- package/dist/schema/util.js.map +0 -1
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { TypedPermissionObjectSchema, CoinParamSchema, NamedObjectSchema, CallEnvSchema, SubmissionCallSchema } from "./base.js";
|
|
3
|
+
import { VotingGuardSchema } from "../query/index.js";
|
|
4
|
+
import { BalanceTypeSchema, DescriptionSchema, LongNameSchema, NameOrAddressSchema, NameSchema, ReceivedObjectsOrRecentlySchema } from "../common/index.js";
|
|
5
|
+
// VotingGuardSchema is imported from ../query
|
|
6
|
+
// 定义dispute schema
|
|
7
|
+
export const DisputeSchema = z.object({
|
|
8
|
+
order: NameOrAddressSchema.describe("Order ID or name."),
|
|
9
|
+
description: DescriptionSchema.optional().describe("Dispute description."),
|
|
10
|
+
proposition: z.array(LongNameSchema).describe("List of dispute propositions."),
|
|
11
|
+
fee: CoinParamSchema.describe("Dispute processing fee."),
|
|
12
|
+
namedArb: NamedObjectSchema.optional().describe("Name for the newly created arbitration object.")
|
|
13
|
+
}).strict();
|
|
14
|
+
// 定义confirm schema
|
|
15
|
+
export const ConfirmSchema = z.object({
|
|
16
|
+
arb: NameOrAddressSchema,
|
|
17
|
+
voting_deadline: z.union([z.number().int().min(0), z.null()])
|
|
18
|
+
}).strict();
|
|
19
|
+
// 定义voting_deadline_change schema
|
|
20
|
+
export const VotingDeadlineChangeSchema = z.object({
|
|
21
|
+
arb: NameOrAddressSchema,
|
|
22
|
+
voting_deadline: z.union([z.number(), z.null()])
|
|
23
|
+
}).strict();
|
|
24
|
+
// 定义vote schema
|
|
25
|
+
export const VoteSchema = z.object({
|
|
26
|
+
arb: NameOrAddressSchema,
|
|
27
|
+
votes: z.array(z.number().int().min(0).max(255)),
|
|
28
|
+
voting_guard: NameOrAddressSchema.optional()
|
|
29
|
+
}).strict();
|
|
30
|
+
// 定义feedback schema
|
|
31
|
+
export const FeedbackSchema = z.object({
|
|
32
|
+
arb: NameOrAddressSchema,
|
|
33
|
+
feedback: DescriptionSchema.describe("Arbitration feedback."),
|
|
34
|
+
}).strict();
|
|
35
|
+
// 定义arbitration schema
|
|
36
|
+
export const ArbitrationActionSchema = z.object({
|
|
37
|
+
arb: NameOrAddressSchema,
|
|
38
|
+
feedback: DescriptionSchema.describe("Arbitration feedback."),
|
|
39
|
+
indemnity: z.number().int().min(0)
|
|
40
|
+
}).strict();
|
|
41
|
+
// 定义reset schema
|
|
42
|
+
export const ResetSchema = z.object({
|
|
43
|
+
arb: NameOrAddressSchema,
|
|
44
|
+
feedback: DescriptionSchema.describe("Arbitration feedback."),
|
|
45
|
+
}).strict();
|
|
46
|
+
// 定义arb_withdraw schema
|
|
47
|
+
export const ArbWithdrawSchema = z.object({
|
|
48
|
+
arb: NameOrAddressSchema,
|
|
49
|
+
}).strict();
|
|
50
|
+
// 定义fees_transfer的to schema
|
|
51
|
+
export const FeesTransferToSchema = z.union([
|
|
52
|
+
z.object({
|
|
53
|
+
allocation: NameOrAddressSchema.describe("Allocation object ID or name.")
|
|
54
|
+
}).strict(),
|
|
55
|
+
z.object({
|
|
56
|
+
treasury: NameOrAddressSchema.describe("Treasury object ID or name.")
|
|
57
|
+
}).strict()
|
|
58
|
+
]);
|
|
59
|
+
// 定义fees_transfer schema
|
|
60
|
+
export const FeesTransferSchema = z.object({
|
|
61
|
+
to: FeesTransferToSchema.describe("Transfer arbitration fees to the specified Allocation object or Treasury object."),
|
|
62
|
+
payment_remark: NameSchema.describe("Payment remark."),
|
|
63
|
+
payment_index: z.number().int().min(0).describe("Payment index."),
|
|
64
|
+
newPayment: NamedObjectSchema.optional().describe("Name for the newly created payment object.")
|
|
65
|
+
}).strict();
|
|
66
|
+
// 定义voting_guard schema
|
|
67
|
+
export const VotingGuardActionSchema = z.discriminatedUnion("op", [
|
|
68
|
+
z.object({
|
|
69
|
+
op: z.enum(["add", "set"]),
|
|
70
|
+
guards: z.array(VotingGuardSchema)
|
|
71
|
+
}).strict(),
|
|
72
|
+
z.object({
|
|
73
|
+
op: z.literal("remove"),
|
|
74
|
+
guards: z.array(NameOrAddressSchema)
|
|
75
|
+
}).strict(),
|
|
76
|
+
z.object({
|
|
77
|
+
op: z.literal("clear")
|
|
78
|
+
}).strict()
|
|
79
|
+
]);
|
|
80
|
+
// 定义CallArbitration_Data schema
|
|
81
|
+
export const CallArbitration_DataSchema = z.object({
|
|
82
|
+
object: TypedPermissionObjectSchema,
|
|
83
|
+
dispute: DisputeSchema.optional().describe("Create a new Arb object for the order."),
|
|
84
|
+
description: DescriptionSchema.optional().describe("Introduction of the Arbitration object."),
|
|
85
|
+
location: LongNameSchema.optional().describe("Arbitration location."),
|
|
86
|
+
fee: BalanceTypeSchema.optional().describe("Arbitration fee."),
|
|
87
|
+
pause: z.boolean().optional().describe("Whether to pause arbitration."),
|
|
88
|
+
confirm: ConfirmSchema.optional().describe("Confirm the materials submitted by the user for arbitration."),
|
|
89
|
+
voting_deadline_change: VotingDeadlineChangeSchema.optional().describe("Change the voting deadline."),
|
|
90
|
+
vote: VoteSchema.optional().describe("Vote on user propositions."),
|
|
91
|
+
feedback: FeedbackSchema.optional().describe("Arbitration feedback for the Arb object."),
|
|
92
|
+
arbitration: ArbitrationActionSchema.optional().describe("Provide a definitive arbitration result."),
|
|
93
|
+
reset: ResetSchema.optional().describe("User applies to resubmit materials and restart arbitration."),
|
|
94
|
+
arb_withdraw: ArbWithdrawSchema.optional().describe("Withdraw arbitration fees from the Arb object."),
|
|
95
|
+
fees_transfer: FeesTransferSchema.optional().describe("Distribute the withdrawn arbitration fees."),
|
|
96
|
+
usage_guard: z.union([NameOrAddressSchema, z.null()]).optional().describe("Set Guard for verification when users apply for arbitration; if Guard verification fails, users will not be able to apply for arbitration."),
|
|
97
|
+
voting_guard: VotingGuardActionSchema.optional().describe("Set Guard for verification during arbitration voting; if Guard verification fails, arbitration voting will fail."),
|
|
98
|
+
owner_receive: ReceivedObjectsOrRecentlySchema.optional().describe("Unwrap CoinWrapper objects and other objects received by this object and send them to the owner of its Permission object."),
|
|
99
|
+
um: z.union([NameOrAddressSchema, z.null()]).optional().describe("Contact object.")
|
|
100
|
+
}).strict().describe("On-chain Arbitration operations. USAGE: (1) CREATE NEW: Set 'object' field with {name, type, permission, ...} to create an Arbitration. NOTE:'name' goes INSIDE 'object', NOT at the data root level. 'permission' can be a new Permission object or reference an existing one - check 'object' field description for details. (2) OPERATE EXISTING: Set 'object' field with object ID or name. The 'object' field is CRITICAL and REQUIRED in both cases.");
|
|
101
|
+
// 定义输入schema
|
|
102
|
+
export const CallArbitration_InputSchema = z.object({
|
|
103
|
+
data: CallArbitration_DataSchema,
|
|
104
|
+
env: CallEnvSchema.optional(),
|
|
105
|
+
submission: SubmissionCallSchema.optional(),
|
|
106
|
+
}).strict();
|