@wowok/agent-mcp 2.2.13 → 2.2.15
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 +19 -11
- package/dist/index.js +44 -100
- package/dist/schema/query/index.js +1 -1
- package/dist/schema-query/index.d.ts +29 -0
- package/dist/schema-query/index.js +149 -0
- package/dist/schemas/account_operation.schema.json +255 -0
- package/dist/schemas/guard2file.schema.json +71 -0
- package/dist/schemas/index.json +139 -0
- package/dist/schemas/local_info_operation.schema.json +142 -0
- package/dist/schemas/local_mark_operation.schema.json +119 -0
- package/dist/schemas/machineNode2file.schema.json +71 -0
- package/dist/schemas/messenger_operation.schema.json +1393 -0
- package/dist/schemas/onchain_events.schema.json +113 -0
- package/dist/schemas/onchain_operations.schema.json +376 -0
- package/dist/schemas/onchain_operations_allocation.schema.json +914 -0
- package/dist/schemas/onchain_operations_arbitration.schema.json +1166 -0
- package/dist/schemas/onchain_operations_contact.schema.json +853 -0
- package/dist/schemas/onchain_operations_demand.schema.json +984 -0
- package/dist/schemas/onchain_operations_gen_passport.schema.json +1141 -0
- package/dist/schemas/onchain_operations_guard.schema.json +713 -0
- package/dist/schemas/onchain_operations_machine.schema.json +1347 -0
- package/dist/schemas/onchain_operations_order.schema.json +830 -0
- package/dist/schemas/onchain_operations_payment.schema.json +717 -0
- package/dist/schemas/onchain_operations_permission.schema.json +1088 -0
- package/dist/schemas/onchain_operations_personal.schema.json +1282 -0
- package/dist/schemas/onchain_operations_progress.schema.json +751 -0
- package/dist/schemas/onchain_operations_repository.schema.json +1572 -0
- package/dist/schemas/onchain_operations_reward.schema.json +955 -0
- package/dist/schemas/onchain_operations_service.schema.json +1411 -0
- package/dist/schemas/onchain_operations_treasury.schema.json +1155 -0
- package/dist/schemas/onchain_table_data.schema.json +35 -0
- package/dist/schemas/query_toolkit.schema.json +32 -0
- package/dist/schemas/schema_query.schema.json +33 -0
- package/dist/schemas/wip_file.schema.json +27 -0
- package/dist/schemas/wowok_buildin_info.schema.json +487 -0
- package/package.json +7 -5
- package/dist/docs/index.d.ts +0 -3
- package/dist/docs/index.js +0 -2
- package/dist/docs/loader.d.ts +0 -12
- package/dist/docs/loader.js +0 -177
- package/dist/docs/search.d.ts +0 -17
- package/dist/docs/search.js +0 -325
- package/dist/docs/types.d.ts +0 -55
- package/dist/docs/types.js +0 -1
- package/docs/README.md +0 -249
- package/docs/WIP.md +0 -388
- package/docs/WTS.md +0 -536
- package/docs/docs/account.md +0 -914
- package/docs/docs/allocation.md +0 -635
- package/docs/docs/arbitration.md +0 -1804
- package/docs/docs/arbitration_state_machine.md +0 -270
- package/docs/docs/contact.md +0 -709
- package/docs/docs/demand.md +0 -948
- package/docs/docs/guard.md +0 -1465
- package/docs/docs/localinfo.md +0 -432
- package/docs/docs/localmark.md +0 -583
- package/docs/docs/machine.md +0 -2490
- package/docs/docs/messenger.md +0 -2098
- package/docs/docs/onchain_events.md +0 -267
- package/docs/docs/order.md +0 -1001
- package/docs/docs/payment.md +0 -512
- package/docs/docs/permission.md +0 -1438
- package/docs/docs/personal.md +0 -742
- package/docs/docs/progress.md +0 -1748
- package/docs/docs/query.md +0 -467
- package/docs/docs/repository.md +0 -1043
- package/docs/docs/reward.md +0 -833
- package/docs/docs/service.md +0 -2130
- package/docs/docs/stage-01-introduction.md +0 -243
- package/docs/docs/stage-02-trust.md +0 -302
- package/docs/docs/stage-03-collaboration.md +0 -337
- package/docs/docs/stage-04-transaction.md +0 -277
- package/docs/docs/stage-05-business.md +0 -151
- package/docs/docs/stage-06-personal.md +0 -203
- package/docs/docs/stage-07-query.md +0 -572
- package/docs/docs/stage-08-examples.md +0 -184
- package/docs/docs/treasury.md +0 -1149
- package/docs/docs/wowok_buildin_info.md +0 -740
- package/docs/examples/Insurance/Insurance.md +0 -594
- package/docs/examples/Insurance/Insurance_TestResults.md +0 -481
- package/docs/examples/Insurance/insurance_complete_guard_v1.json +0 -50
- package/docs/examples/MyShop/MyShop.md +0 -1353
- package/docs/examples/MyShop/MyShop_TestResults.md +0 -1003
- package/docs/examples/MyShop_Advanced/MyShop_Advanced.md +0 -1898
- package/docs/examples/MyShop_Advanced/MyShop_Advanced_MerchantSystem_TestResults.md +0 -1297
- package/docs/examples/MyShop_Advanced/MyShop_Advanced_OrderFlow_TestResults.md +0 -743
- package/docs/examples/MyShop_Advanced/machine_nodes.json +0 -222
- package/docs/examples/ThreeBody_Signature/ThreeBody_Signature.md +0 -776
- package/docs/examples/ThreeBody_Signature/ThreeBody_Signature_TestResults.md +0 -599
- package/docs/examples/Travel/Travel.md +0 -1157
- package/docs/examples/Travel/Travel_TestResults.md +0 -743
- package/docs/examples/Travel/calc-weather-timestamps.js +0 -8
- package/docs/examples/Travel/travel_machine_v2_export.json +0 -104
- package/docs/examples/Travel/weather_check_guard_v1.json +0 -51
- package/docs/skills/WOWOK.md +0 -650
- package/docs/skills/onchain_operations/_common.md +0 -406
- package/docs/skills/onchain_operations/_index.md +0 -196
- package/docs/skills/onchain_operations/allocation.md +0 -28
- package/docs/skills/onchain_operations/arbitration.md +0 -106
- package/docs/skills/onchain_operations/contact.md +0 -40
- package/docs/skills/onchain_operations/demand.md +0 -53
- package/docs/skills/onchain_operations/gen_passport.md +0 -23
- package/docs/skills/onchain_operations/guard.md +0 -56
- package/docs/skills/onchain_operations/machine.md +0 -89
- package/docs/skills/onchain_operations/order.md +0 -56
- package/docs/skills/onchain_operations/payment.md +0 -24
- package/docs/skills/onchain_operations/permission.md +0 -68
- package/docs/skills/onchain_operations/personal.md +0 -58
- package/docs/skills/onchain_operations/progress.md +0 -38
- package/docs/skills/onchain_operations/repository.md +0 -70
- package/docs/skills/onchain_operations/reward.md +0 -38
- package/docs/skills/onchain_operations/service.md +0 -78
- package/docs/skills/onchain_operations/treasury.md +0 -68
- package/docs/skills/schema-account_operation.md +0 -402
- package/docs/skills/schema-guard2file.md +0 -153
- package/docs/skills/schema-local_info_operation.md +0 -160
- package/docs/skills/schema-local_mark_operation.md +0 -148
- package/docs/skills/schema-machineNode2file.md +0 -155
- package/docs/skills/schema-messenger_operation.md +0 -547
- package/docs/skills/schema-onchain_events.md +0 -201
- package/docs/skills/schema-onchain_table_data.md +0 -334
- package/docs/skills/schema-query_toolkit.md +0 -395
- package/docs/skills/schema-wip_file.md +0 -240
- package/docs/skills/schema-wowok_buildin_info.md +0 -296
- package/docs/wip-examples/three_body.html +0 -57
- package/docs/wip-examples/three_body.wip +0 -30
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
# onchain_operations / repository
|
|
2
|
-
|
|
3
|
-
Define trusted data sources with typed policies, data read/write rules, and contribution incentives.
|
|
4
|
-
|
|
5
|
-
> **CREATE vs MODIFY**: See [_common.md](./_common.md) for the unified pattern.
|
|
6
|
-
> Repository uses `WithPermissionObject`: object shape = CREATE, string = MODIFY.
|
|
7
|
-
|
|
8
|
-
## Data Schema
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
CallRepository_Data {
|
|
12
|
-
// Object reference - string (existing) or object (create new)
|
|
13
|
-
// See _common.md: WithPermissionObject
|
|
14
|
-
object: WithPermissionObject;
|
|
15
|
-
|
|
16
|
-
description?: string; // Repository description (max 4000 bcs chars)
|
|
17
|
-
|
|
18
|
-
// Policy rules (discriminated union)
|
|
19
|
-
policies?: {
|
|
20
|
-
op: "add" | "set";
|
|
21
|
-
policy: PolicyRule[]; // Policy rule list
|
|
22
|
-
} | {
|
|
23
|
-
op: "remove";
|
|
24
|
-
policy: string[]; // Policy rule names to remove
|
|
25
|
-
} | {
|
|
26
|
-
op: "clear";
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
// Add data
|
|
30
|
-
data_add?:
|
|
31
|
-
| {
|
|
32
|
-
name: string; // Data item name (must match PolicyRule)
|
|
33
|
-
write_guard?: NameOrAddress; // Guard for write permissions
|
|
34
|
-
data: SupportedValue; // Data value (ID = timestamp or signer)
|
|
35
|
-
}
|
|
36
|
-
| {
|
|
37
|
-
name: string; // Data item name
|
|
38
|
-
items: {
|
|
39
|
-
data: {
|
|
40
|
-
id: AccountOrMark_Address | number; // Data item ID
|
|
41
|
-
data: SupportedValue; // Data value
|
|
42
|
-
}[];
|
|
43
|
-
write_guard?: NameOrAddress; // Guard for write permissions
|
|
44
|
-
}[];
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
// Remove data
|
|
48
|
-
data_remove?:
|
|
49
|
-
| {
|
|
50
|
-
name: string; // Data item name
|
|
51
|
-
write_guard?: NameOrAddress; // Guard for verifying deletion permission
|
|
52
|
-
}
|
|
53
|
-
| {
|
|
54
|
-
name: string;
|
|
55
|
-
items: {
|
|
56
|
-
id: (AccountOrMark_Address | number)[]; // Data item IDs
|
|
57
|
-
write_guard?: NameOrAddress; // Guard for verifying deletion permission
|
|
58
|
-
}[];
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
rewards?: ObjectsOp; // Reward object list (contribution incentives)
|
|
62
|
-
owner_receive?: ReceivedObjectsOrRecently;
|
|
63
|
-
um?: NameOrAddress | null; // Contact object
|
|
64
|
-
}
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
See [_common.md](./_common.md) for shared types: CallEnv, SubmissionCall, WithPermissionObject, ObjectsOp, ReceivedObjectsOrRecently.
|
|
70
|
-
`PolicyRule` schema is defined in the MCP source at `src/schema/query/index.ts`.
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# onchain_operations / reward
|
|
2
|
-
|
|
3
|
-
Create and manage token rewards with Guards and distribution rules.
|
|
4
|
-
|
|
5
|
-
> **CREATE vs MODIFY**: See [_common.md](./_common.md) for the unified pattern.
|
|
6
|
-
> Reward uses `TypedPermissionObject`: object shape = CREATE, string = MODIFY.
|
|
7
|
-
|
|
8
|
-
## Data Schema
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
CallReward_Data {
|
|
12
|
-
// Object reference - string (existing) or object (create new)
|
|
13
|
-
// See _common.md: TypedPermissionObject
|
|
14
|
-
object: TypedPermissionObject;
|
|
15
|
-
|
|
16
|
-
claim?: NameOrAddress; // Guard object ID — verify Guard to trigger reward distribution
|
|
17
|
-
|
|
18
|
-
description?: string; // Reward description (max 4000 bcs chars)
|
|
19
|
-
|
|
20
|
-
coin_add?: CoinParam; // Add amount to Reward object
|
|
21
|
-
|
|
22
|
-
// Unwrap received CoinWrappers and store in pending balance
|
|
23
|
-
receive?: ReceivedBalanceOrRecently;
|
|
24
|
-
|
|
25
|
-
guard_add?: RewardGuard[]; // Add Guard to Reward object
|
|
26
|
-
|
|
27
|
-
guard_remove_expired?: boolean; // Whether to remove expired Guards
|
|
28
|
-
|
|
29
|
-
guard_expiration_time?: number | null; // Expiration time (ms, >= 1) — blocks new Guard additions until expired
|
|
30
|
-
|
|
31
|
-
owner_receive?: ReceivedObjectsOrRecently;
|
|
32
|
-
um?: NameOrAddress | null; // Contact object
|
|
33
|
-
}
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
See [_common.md](./_common.md) for shared types: CallEnv, SubmissionCall, TypedPermissionObject, CoinParam, RewardGuard, ReceivedBalanceOrRecently, ReceivedObjectsOrRecently.
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
# onchain_operations / service
|
|
2
|
-
|
|
3
|
-
Create and manage product/service listings with transparent promises, bind workflow templates, set pricing, issue discount coupons.
|
|
4
|
-
|
|
5
|
-
> **CREATE vs MODIFY**: See [_common.md](./_common.md) for the unified pattern.
|
|
6
|
-
> Service uses `TypedPermissionObject`: object shape = CREATE, string = MODIFY.
|
|
7
|
-
|
|
8
|
-
## Data Schema
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
CallService_Data {
|
|
12
|
-
// Object reference - string (existing) or object (create new)
|
|
13
|
-
// See _common.md: TypedPermissionObject
|
|
14
|
-
object: TypedPermissionObject;
|
|
15
|
-
|
|
16
|
-
// Create new order (customer purchase)
|
|
17
|
-
order_new?: {
|
|
18
|
-
buy: {
|
|
19
|
-
items: {
|
|
20
|
-
name: string; // Product name (max 256 bcs chars)
|
|
21
|
-
stock: string | number; // Quantity
|
|
22
|
-
wip_hash: string; // WIP file hash
|
|
23
|
-
}[];
|
|
24
|
-
total_pay: CoinParam; // Payment amount
|
|
25
|
-
discount?: string; // Discount object ID
|
|
26
|
-
payment_remark?: string; // Payment remark
|
|
27
|
-
payment_index?: number; // Payment index
|
|
28
|
-
};
|
|
29
|
-
agents?: ManyAccountOrMark_Address; // Order agents
|
|
30
|
-
order_required_info?: string; // Contact object ID or WTS Proof
|
|
31
|
-
transfer?: AccountOrMark_Address; // New order owner
|
|
32
|
-
namedNewOrder?: NamedObject; // Name for new Order
|
|
33
|
-
namedNewAllocation?: NamedObject; // Name for new Allocation
|
|
34
|
-
namedNewProgress?: NamedObject; // Name for new Progress
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
description?: string; // Service description (max 4000 bcs chars)
|
|
38
|
-
location?: string; // Service location (max 256 bcs chars)
|
|
39
|
-
|
|
40
|
-
// Sales operations (discriminated union)
|
|
41
|
-
sales?: {
|
|
42
|
-
op: "add" | "set";
|
|
43
|
-
sales: ServiceSale[]; // Array of sale items (REQUIRED for add/set)
|
|
44
|
-
} | {
|
|
45
|
-
op: "remove";
|
|
46
|
-
sales_name: string[]; // Sale names to remove (REQUIRED) (each max 256 bcs chars)
|
|
47
|
-
} | {
|
|
48
|
-
op: "clear";
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
repositories?: ObjectsOp; // Repository operations
|
|
52
|
-
rewards?: ObjectsOp; // Reward operations
|
|
53
|
-
arbitrations?: ObjectsOp; // Arbitration operations
|
|
54
|
-
machine?: NameOrAddress | null; // Machine object ID
|
|
55
|
-
|
|
56
|
-
// Discount coupon
|
|
57
|
-
discount?: Discount;
|
|
58
|
-
|
|
59
|
-
discount_destroy?: NameOrAddress[]; // Discount IDs to destroy
|
|
60
|
-
customer_required?: NotEmptyName[]; // Required info names (non-empty strings)
|
|
61
|
-
|
|
62
|
-
// Order fund allocators
|
|
63
|
-
order_allocators?: Allocators | null;
|
|
64
|
-
|
|
65
|
-
buy_guard?: NameOrAddress | null; // Purchase Guard ID or name
|
|
66
|
-
compensation_fund_add?: CoinParam; // Compensation fund
|
|
67
|
-
setting_locked_time_add?: number; // Additional lock time (ms), extends 30-day default
|
|
68
|
-
compensation_fund_receive?: ReceivedBalanceOrRecently;
|
|
69
|
-
owner_receive?: ReceivedObjectsOrRecently;
|
|
70
|
-
um?: NameOrAddress | null; // Contact object ID or name
|
|
71
|
-
pause?: boolean; // Pause new orders
|
|
72
|
-
publish?: boolean; // Publish service (immutable after)
|
|
73
|
-
}
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
---
|
|
77
|
-
|
|
78
|
-
See [_common.md](./_common.md) for shared types: CallEnv, SubmissionCall, TypedPermissionObject, NamedObject, CoinParam, ObjectsOp, ServiceSale, Discount, Allocators, AccountOrMark_Address, ManyAccountOrMark_Address, ReceivedBalanceOrRecently, ReceivedObjectsOrRecently.
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# onchain_operations / treasury
|
|
2
|
-
|
|
3
|
-
Create secure shared pools for managing deposits, withdrawals, and fund allocation scheduling.
|
|
4
|
-
|
|
5
|
-
> **CREATE vs MODIFY**: See [_common.md](./_common.md) for the unified pattern.
|
|
6
|
-
> Treasury uses `TypedPermissionObject`: object shape = CREATE, string = MODIFY.
|
|
7
|
-
|
|
8
|
-
## Data Schema
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
CallTreasury_Data {
|
|
12
|
-
// Object reference - string (existing) or object (create new)
|
|
13
|
-
// See _common.md: TypedPermissionObject
|
|
14
|
-
object: TypedPermissionObject;
|
|
15
|
-
|
|
16
|
-
description?: string; // Treasury description (max 4000 bcs chars)
|
|
17
|
-
|
|
18
|
-
// Unwrap and deposit received CoinWrappers
|
|
19
|
-
receive?: ReceivedBalanceOrRecently;
|
|
20
|
-
|
|
21
|
-
// Deposit to Treasury
|
|
22
|
-
deposit?: {
|
|
23
|
-
coin: CoinParam; // Asset to deposit
|
|
24
|
-
by_external_deposit_guard?: string; // Deposit via Guard verification (not Permission)
|
|
25
|
-
payment_info: PaymentInfo;
|
|
26
|
-
namedNewPayment?: NamedObject; // Name for new Payment object
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
// Withdraw from Treasury
|
|
30
|
-
withdraw?: {
|
|
31
|
-
amount:
|
|
32
|
-
| { fixed: string | number } // Fixed amount (Permission-based)
|
|
33
|
-
| { by_external_withdraw_guard: string }; // Guard-based (amount from Guard index)
|
|
34
|
-
recipient: AccountOrMark_Address; // Recipient ID or account
|
|
35
|
-
payment_info: PaymentInfo;
|
|
36
|
-
namedNewPayment?: NamedObject; // Name for new Payment object
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
// External deposit Guard operations
|
|
40
|
-
external_deposit_guard?: {
|
|
41
|
-
op: "add" | "set";
|
|
42
|
-
guards: AmountFromDepositGuard[]; // Deposit Guard list
|
|
43
|
-
} | {
|
|
44
|
-
op: "remove";
|
|
45
|
-
guards: NameOrAddress[]; // Guard IDs or names to remove
|
|
46
|
-
} | {
|
|
47
|
-
op: "clear";
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
// External withdraw Guard operations
|
|
51
|
-
external_withdraw_guard?: {
|
|
52
|
-
op: "add" | "set";
|
|
53
|
-
guards: AmountFromWithdrawGuard[]; // Withdraw Guard list
|
|
54
|
-
} | {
|
|
55
|
-
op: "remove";
|
|
56
|
-
guards: NameOrAddress[]; // Guard IDs or names to remove
|
|
57
|
-
} | {
|
|
58
|
-
op: "clear";
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
owner_receive?: ReceivedObjectsOrRecently;
|
|
62
|
-
um?: NamedObject | null; // Contact object ({ name?, tags?, onChain?, replaceExistName? })
|
|
63
|
-
}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
See [_common.md](./_common.md) for shared types: CallEnv, SubmissionCall, TypedPermissionObject, CoinParam, NamedObject, PaymentInfo, AccountOrMark_Address, AmountFromDepositGuard, AmountFromWithdrawGuard, ReceivedBalanceOrRecently, ReceivedObjectsOrRecently.
|
|
@@ -1,402 +0,0 @@
|
|
|
1
|
-
# Schema: account_operation
|
|
2
|
-
|
|
3
|
-
> 100% LOCAL, NEVER ON-CHAIN - Manage WoWok accounts locally on device: generate, suspend, resume, faucet-test, operate assets, sign data, etc.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Top-Level Structure
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
AccountOperation {
|
|
11
|
-
// Exactly ONE operation type must be specified
|
|
12
|
-
gen?: GenOperation;
|
|
13
|
-
faucet?: FaucetOperation;
|
|
14
|
-
suspend?: SuspendOperation;
|
|
15
|
-
resume?: ResumeOperation;
|
|
16
|
-
rename?: RenameOperation;
|
|
17
|
-
swap_name?: SwapNameOperation;
|
|
18
|
-
transfer?: TransferOperation;
|
|
19
|
-
get?: GetOperation;
|
|
20
|
-
signData?: SignDataOperation;
|
|
21
|
-
messenger?: MessengerOperation;
|
|
22
|
-
}
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Operation Types
|
|
28
|
-
|
|
29
|
-
### gen
|
|
30
|
-
|
|
31
|
-
Generate a new account.
|
|
32
|
-
|
|
33
|
-
```typescript
|
|
34
|
-
GenOperation {
|
|
35
|
-
name?: string; // Account name (max 64 chars). Empty = default account
|
|
36
|
-
replaceExistName?: boolean; // Force claim existing name
|
|
37
|
-
m?: string | null; // Messenger name to enable. Null = disable
|
|
38
|
-
}
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
**Result**:
|
|
42
|
-
|
|
43
|
-
```typescript
|
|
44
|
-
GenResult {
|
|
45
|
-
address: string; // New account ID
|
|
46
|
-
name?: string; // Account name
|
|
47
|
-
m?: string | null; // Messenger name if enabled
|
|
48
|
-
}
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
### faucet
|
|
54
|
-
|
|
55
|
-
Distribute test coins from faucet.
|
|
56
|
-
|
|
57
|
-
```typescript
|
|
58
|
-
FaucetOperation {
|
|
59
|
-
name_or_address?: string; // Account name or address. Empty = default
|
|
60
|
-
network: "localnet" | "testnet";
|
|
61
|
-
}
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
**Result**:
|
|
65
|
-
|
|
66
|
-
```typescript
|
|
67
|
-
FaucetResult {
|
|
68
|
-
name_or_address?: string;
|
|
69
|
-
result: {
|
|
70
|
-
amount: number;
|
|
71
|
-
id: string;
|
|
72
|
-
transferTxDigest: string;
|
|
73
|
-
}[];
|
|
74
|
-
network: "localnet" | "testnet";
|
|
75
|
-
}
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
### suspend
|
|
81
|
-
|
|
82
|
-
Remove account from active list (cannot sign transactions).
|
|
83
|
-
|
|
84
|
-
```typescript
|
|
85
|
-
SuspendOperation {
|
|
86
|
-
name_or_address?: string; // Account name or address. Empty = default
|
|
87
|
-
}
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
**Result**:
|
|
91
|
-
|
|
92
|
-
```typescript
|
|
93
|
-
SuspendResult {
|
|
94
|
-
name_or_address?: string;
|
|
95
|
-
success: boolean;
|
|
96
|
-
}
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
---
|
|
100
|
-
|
|
101
|
-
### resume
|
|
102
|
-
|
|
103
|
-
Add account back to active list.
|
|
104
|
-
|
|
105
|
-
```typescript
|
|
106
|
-
ResumeOperation {
|
|
107
|
-
address: string; // Account ID (0x + 64 hex chars)
|
|
108
|
-
name?: string; // New name for resumed account
|
|
109
|
-
}
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
**Result**:
|
|
113
|
-
|
|
114
|
-
```typescript
|
|
115
|
-
ResumeResult {
|
|
116
|
-
address: string;
|
|
117
|
-
name?: string;
|
|
118
|
-
success: boolean;
|
|
119
|
-
}
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
### rename
|
|
125
|
-
|
|
126
|
-
Rename an account.
|
|
127
|
-
|
|
128
|
-
```typescript
|
|
129
|
-
RenameOperation {
|
|
130
|
-
name_or_address?: string; // Source account. Empty = default
|
|
131
|
-
new_name: string; // New account name (max 64 chars)
|
|
132
|
-
}
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
**Result**:
|
|
136
|
-
|
|
137
|
-
```typescript
|
|
138
|
-
RenameResult {
|
|
139
|
-
name_or_address?: string;
|
|
140
|
-
new_name: string;
|
|
141
|
-
success: boolean;
|
|
142
|
-
}
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
---
|
|
146
|
-
|
|
147
|
-
### swap_name
|
|
148
|
-
|
|
149
|
-
Swap names between two accounts.
|
|
150
|
-
|
|
151
|
-
```typescript
|
|
152
|
-
SwapNameOperation {
|
|
153
|
-
name1?: string; // First account name. Empty = default
|
|
154
|
-
name2?: string; // Second account name. Empty = default
|
|
155
|
-
}
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
**Result**:
|
|
159
|
-
|
|
160
|
-
```typescript
|
|
161
|
-
SwapNameResult {
|
|
162
|
-
name1?: string;
|
|
163
|
-
name2?: string;
|
|
164
|
-
success: boolean;
|
|
165
|
-
}
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
---
|
|
169
|
-
|
|
170
|
-
### transfer
|
|
171
|
-
|
|
172
|
-
Transfer tokens between accounts.
|
|
173
|
-
|
|
174
|
-
```typescript
|
|
175
|
-
TransferOperation {
|
|
176
|
-
name_or_address_from?: string; // Sender. Empty = default
|
|
177
|
-
name_or_address_to?: string; // Recipient. Empty = default
|
|
178
|
-
amount: number | string; // Amount to transfer
|
|
179
|
-
token_type?: string; // Default: 0x2::wow::WOW
|
|
180
|
-
network?: "localnet" | "testnet";
|
|
181
|
-
}
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
**Result**: `WowTransactionBlockResponse` (see Transaction Response Schema)
|
|
185
|
-
|
|
186
|
-
---
|
|
187
|
-
|
|
188
|
-
### get
|
|
189
|
-
|
|
190
|
-
Generate new coin object by required amount.
|
|
191
|
-
|
|
192
|
-
```typescript
|
|
193
|
-
GetOperation {
|
|
194
|
-
name_or_address?: string; // Account. Empty = default
|
|
195
|
-
balance_required: number | string;
|
|
196
|
-
token_type?: string; // Default: 0x2::wow::WOW
|
|
197
|
-
network?: "localnet" | "testnet";
|
|
198
|
-
}
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
**Result**:
|
|
202
|
-
|
|
203
|
-
```typescript
|
|
204
|
-
GetResult {
|
|
205
|
-
coin_address?: string; // New coin object ID
|
|
206
|
-
name_or_address?: string;
|
|
207
|
-
balance_required: number | string;
|
|
208
|
-
token_type?: string;
|
|
209
|
-
network?: "localnet" | "testnet";
|
|
210
|
-
}
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
---
|
|
214
|
-
|
|
215
|
-
### signData
|
|
216
|
-
|
|
217
|
-
Sign data with account's private key.
|
|
218
|
-
|
|
219
|
-
```typescript
|
|
220
|
-
SignDataOperation {
|
|
221
|
-
name_or_address?: string; // Account. Empty = default
|
|
222
|
-
data: string; // Data to sign
|
|
223
|
-
data_encoding?: "utf8" | "base64" | "hex"; // Default: utf8
|
|
224
|
-
}
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
**Result**:
|
|
228
|
-
|
|
229
|
-
```typescript
|
|
230
|
-
SignDataResult {
|
|
231
|
-
name_or_address?: string;
|
|
232
|
-
signature: string; // Signature in hex
|
|
233
|
-
publicKey: string; // Public key in hex
|
|
234
|
-
address: string; // Account address
|
|
235
|
-
}
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
---
|
|
239
|
-
|
|
240
|
-
### messenger
|
|
241
|
-
|
|
242
|
-
Enable or disable messenger for an account.
|
|
243
|
-
|
|
244
|
-
```typescript
|
|
245
|
-
MessengerOperation {
|
|
246
|
-
name_or_account?: string; // Account. Empty = default
|
|
247
|
-
m: string | null; // Messenger name. Null = disable
|
|
248
|
-
}
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
**Result**:
|
|
252
|
-
|
|
253
|
-
```typescript
|
|
254
|
-
MessengerResult {
|
|
255
|
-
name_or_account?: string;
|
|
256
|
-
m: string | null;
|
|
257
|
-
}
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
---
|
|
261
|
-
|
|
262
|
-
## Common Sub-Schemas
|
|
263
|
-
|
|
264
|
-
### WowTransactionBlockResponse
|
|
265
|
-
|
|
266
|
-
```typescript
|
|
267
|
-
WowTransactionBlockResponse {
|
|
268
|
-
digest: string;
|
|
269
|
-
effects?: TransactionEffects;
|
|
270
|
-
events?: WowEvent[];
|
|
271
|
-
balanceChanges?: BalanceChange[];
|
|
272
|
-
objectChanges?: WowObjectChange[];
|
|
273
|
-
errors?: string[];
|
|
274
|
-
// ... additional fields
|
|
275
|
-
}
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
### TransactionEffects
|
|
279
|
-
|
|
280
|
-
```typescript
|
|
281
|
-
TransactionEffects {
|
|
282
|
-
status: {
|
|
283
|
-
status: "success" | "failure";
|
|
284
|
-
error?: string;
|
|
285
|
-
};
|
|
286
|
-
gasUsed: {
|
|
287
|
-
computationCost: string;
|
|
288
|
-
storageCost: string;
|
|
289
|
-
storageRebate: string;
|
|
290
|
-
nonRefundableStorageFee: string;
|
|
291
|
-
};
|
|
292
|
-
gasObject: OwnedObjectRef;
|
|
293
|
-
created?: OwnedObjectRef[];
|
|
294
|
-
mutated?: OwnedObjectRef[];
|
|
295
|
-
deleted?: WowObjectRef[];
|
|
296
|
-
// ... additional fields
|
|
297
|
-
}
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
### WowEvent
|
|
301
|
-
|
|
302
|
-
```typescript
|
|
303
|
-
WowEvent {
|
|
304
|
-
id: {
|
|
305
|
-
eventSeq: string;
|
|
306
|
-
txDigest: string;
|
|
307
|
-
};
|
|
308
|
-
packageId: string;
|
|
309
|
-
transactionModule: string;
|
|
310
|
-
sender: string;
|
|
311
|
-
type: string;
|
|
312
|
-
parsedJson: Record<string, string | number | boolean>;
|
|
313
|
-
bcs: string;
|
|
314
|
-
bcsEncoding: "base64" | "base58";
|
|
315
|
-
timestampMs?: string;
|
|
316
|
-
}
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
### BalanceChange
|
|
320
|
-
|
|
321
|
-
```typescript
|
|
322
|
-
BalanceChange {
|
|
323
|
-
amount: string; // Negative for spending, positive for receiving
|
|
324
|
-
coinType: string;
|
|
325
|
-
owner: ObjectOwner;
|
|
326
|
-
}
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
### WowObjectChange
|
|
330
|
-
|
|
331
|
-
```typescript
|
|
332
|
-
WowObjectChange =
|
|
333
|
-
| { type: "created"; objectId: string; objectType: string; owner: ObjectOwner; sender: string; version: string | number; digest: string }
|
|
334
|
-
| { type: "mutated"; objectId: string; objectType: string; owner: ObjectOwner | null; sender: string; version: string | number; digest: string; previousVersion: string | number }
|
|
335
|
-
| { type: "deleted"; objectId: string; objectType: string; sender: string; version: string | number }
|
|
336
|
-
| { type: "transferred"; objectId: string; objectType: string; recipient: ObjectOwner; sender: string; version: string | number; digest: string }
|
|
337
|
-
| { type: "wrapped"; objectId: string; objectType: string; sender: string; version: string | number }
|
|
338
|
-
| { type: "published"; packageId: string; version: string | number; digest: string; modules: string[] };
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
### ObjectOwner
|
|
342
|
-
|
|
343
|
-
```typescript
|
|
344
|
-
ObjectOwner =
|
|
345
|
-
| { AddressOwner: string }
|
|
346
|
-
| { ObjectOwner: string }
|
|
347
|
-
| { Shared: { initial_shared_version: number } }
|
|
348
|
-
| "Immutable";
|
|
349
|
-
```
|
|
350
|
-
|
|
351
|
-
### WowObjectRef
|
|
352
|
-
|
|
353
|
-
```typescript
|
|
354
|
-
WowObjectRef {
|
|
355
|
-
objectId: string;
|
|
356
|
-
version: string | number;
|
|
357
|
-
digest: string;
|
|
358
|
-
}
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
### OwnedObjectRef
|
|
362
|
-
|
|
363
|
-
```typescript
|
|
364
|
-
OwnedObjectRef {
|
|
365
|
-
owner: ObjectOwner;
|
|
366
|
-
reference: WowObjectRef;
|
|
367
|
-
}
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
---
|
|
371
|
-
|
|
372
|
-
## Output Structure
|
|
373
|
-
|
|
374
|
-
```typescript
|
|
375
|
-
AccountOperationOutput {
|
|
376
|
-
status: "success" | "error";
|
|
377
|
-
data?: AccountOperationResult; // Present when status = "success"
|
|
378
|
-
error?: string; // Present when status = "error"
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
// Wrapped format
|
|
382
|
-
{
|
|
383
|
-
result: AccountOperationOutput;
|
|
384
|
-
}
|
|
385
|
-
```
|
|
386
|
-
|
|
387
|
-
### AccountOperationResult
|
|
388
|
-
|
|
389
|
-
```typescript
|
|
390
|
-
AccountOperationResult {
|
|
391
|
-
gen?: GenResult;
|
|
392
|
-
faucet?: FaucetResult;
|
|
393
|
-
suspend?: SuspendResult;
|
|
394
|
-
resume?: ResumeResult;
|
|
395
|
-
rename?: RenameResult;
|
|
396
|
-
swap_name?: SwapNameResult;
|
|
397
|
-
transfer?: WowTransactionBlockResponse;
|
|
398
|
-
get?: GetResult;
|
|
399
|
-
signData?: SignDataResult;
|
|
400
|
-
messenger?: MessengerResult;
|
|
401
|
-
}
|
|
402
|
-
```
|