wowok_agent 0.1.14 → 0.1.16
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 +17 -0
- package/dist/124.index.js +1 -0
- package/dist/account.d.ts +38 -0
- package/dist/account.d.ts.map +1 -0
- package/dist/account.js +273 -0
- package/dist/agent/empty.d.ts +1 -0
- package/dist/agent/empty.d.ts.map +1 -0
- package/dist/agent/src/account.d.ts +38 -0
- package/dist/agent/src/account.d.ts.map +1 -0
- package/dist/agent/src/cache.d.ts +46 -0
- package/dist/agent/src/cache.d.ts.map +1 -0
- package/dist/agent/src/call/arbitration.d.ts +63 -0
- package/dist/agent/src/call/arbitration.d.ts.map +1 -0
- package/dist/agent/src/call/base.d.ts +34 -0
- package/dist/agent/src/call/base.d.ts.map +1 -0
- package/dist/agent/src/call/demand.d.ts +55 -0
- package/dist/agent/src/call/demand.d.ts.map +1 -0
- package/dist/agent/src/call/guard.d.ts +44 -0
- package/dist/agent/src/call/guard.d.ts.map +1 -0
- package/dist/agent/src/call/machine.d.ts +109 -0
- package/dist/agent/src/call/machine.d.ts.map +1 -0
- package/dist/agent/src/call/object_permission.d.ts +13 -0
- package/dist/agent/src/call/object_permission.d.ts.map +1 -0
- package/dist/agent/src/call/permission.d.ts +47 -0
- package/dist/agent/src/call/permission.d.ts.map +1 -0
- package/dist/agent/src/call/personal.d.ts +43 -0
- package/dist/agent/src/call/personal.d.ts.map +1 -0
- package/dist/agent/src/call/repository.d.ts +53 -0
- package/dist/agent/src/call/repository.d.ts.map +1 -0
- package/dist/agent/src/call/service.d.ts +134 -0
- package/dist/agent/src/call/service.d.ts.map +1 -0
- package/dist/agent/src/call/treasury.d.ts +53 -0
- package/dist/agent/src/call/treasury.d.ts.map +1 -0
- package/dist/agent/src/call.d.ts +24 -0
- package/dist/agent/src/call.d.ts.map +1 -0
- package/dist/agent/src/events.d.ts +65 -0
- package/dist/agent/src/events.d.ts.map +1 -0
- package/dist/agent/src/index.d.ts +19 -0
- package/dist/agent/src/index.d.ts.map +1 -0
- package/dist/agent/src/objects.d.ts +308 -0
- package/dist/agent/src/objects.d.ts.map +1 -0
- package/dist/agent/src/permission.d.ts +12 -0
- package/dist/agent/src/permission.d.ts.map +1 -0
- package/dist/agent/src/private_info.d.ts +26 -0
- package/dist/agent/src/private_info.d.ts.map +1 -0
- package/dist/cache.d.ts +46 -0
- package/dist/cache.d.ts.map +1 -0
- package/dist/cache.js +59 -0
- package/dist/call/arbitration.d.ts +63 -0
- package/dist/call/arbitration.d.ts.map +1 -0
- package/dist/call/arbitration.js +182 -0
- package/dist/call/base.d.ts +34 -0
- package/dist/call/base.d.ts.map +1 -0
- package/dist/call/base.js +131 -0
- package/dist/call/demand.d.ts +55 -0
- package/dist/call/demand.d.ts.map +1 -0
- package/dist/call/demand.js +135 -0
- package/dist/call/guard.d.ts +44 -0
- package/dist/call/guard.d.ts.map +1 -0
- package/dist/call/guard.js +244 -0
- package/dist/call/machine.d.ts +109 -0
- package/dist/call/machine.d.ts.map +1 -0
- package/dist/call/machine.js +210 -0
- package/dist/call/object_permission.d.ts +13 -0
- package/dist/call/object_permission.d.ts.map +1 -0
- package/dist/call/object_permission.js +49 -0
- package/dist/call/permission.d.ts +47 -0
- package/dist/call/permission.d.ts.map +1 -0
- package/dist/call/permission.js +95 -0
- package/dist/call/personal.d.ts +43 -0
- package/dist/call/personal.d.ts.map +1 -0
- package/dist/call/personal.js +60 -0
- package/dist/call/repository.d.ts +53 -0
- package/dist/call/repository.d.ts.map +1 -0
- package/dist/call/repository.js +125 -0
- package/dist/call/service.d.ts +134 -0
- package/dist/call/service.d.ts.map +1 -0
- package/dist/call/service.js +340 -0
- package/dist/call/treasury.d.ts +53 -0
- package/dist/call/treasury.d.ts.map +1 -0
- package/dist/call/treasury.js +161 -0
- package/dist/call.d.ts +24 -0
- package/dist/call.d.ts.map +1 -0
- package/dist/call.js +58 -0
- package/dist/empty.d.ts +1 -0
- package/dist/empty.d.ts.map +1 -0
- package/dist/empty.js +1 -0
- package/dist/events.d.ts +65 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +59 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/dist/objects.d.ts +308 -0
- package/dist/objects.d.ts.map +1 -0
- package/dist/objects.js +448 -0
- package/dist/permission.d.ts +12 -0
- package/dist/permission.d.ts.map +1 -0
- package/dist/permission.js +40 -0
- package/dist/private_info.d.ts +26 -0
- package/dist/private_info.d.ts.map +1 -0
- package/dist/private_info.js +243 -0
- package/dist/src/account.d.ts +38 -0
- package/dist/src/account.d.ts.map +1 -0
- package/dist/src/account.js +273 -0
- package/dist/src/cache.d.ts +46 -0
- package/dist/src/cache.d.ts.map +1 -0
- package/dist/src/cache.js +59 -0
- package/dist/src/call/arbitration.d.ts +63 -0
- package/dist/src/call/arbitration.d.ts.map +1 -0
- package/dist/src/call/arbitration.js +182 -0
- package/dist/src/call/base.d.ts +34 -0
- package/dist/src/call/base.d.ts.map +1 -0
- package/dist/src/call/base.js +131 -0
- package/dist/src/call/demand.d.ts +55 -0
- package/dist/src/call/demand.d.ts.map +1 -0
- package/dist/src/call/demand.js +135 -0
- package/dist/src/call/guard.d.ts +44 -0
- package/dist/src/call/guard.d.ts.map +1 -0
- package/dist/src/call/guard.js +244 -0
- package/dist/src/call/machine.d.ts +109 -0
- package/dist/src/call/machine.d.ts.map +1 -0
- package/dist/src/call/machine.js +210 -0
- package/dist/src/call/object_permission.d.ts +13 -0
- package/dist/src/call/object_permission.d.ts.map +1 -0
- package/dist/src/call/object_permission.js +49 -0
- package/dist/src/call/permission.d.ts +47 -0
- package/dist/src/call/permission.d.ts.map +1 -0
- package/dist/src/call/permission.js +95 -0
- package/dist/src/call/personal.d.ts +43 -0
- package/dist/src/call/personal.d.ts.map +1 -0
- package/dist/src/call/personal.js +60 -0
- package/dist/src/call/repository.d.ts +53 -0
- package/dist/src/call/repository.d.ts.map +1 -0
- package/dist/src/call/repository.js +125 -0
- package/dist/src/call/service.d.ts +134 -0
- package/dist/src/call/service.d.ts.map +1 -0
- package/dist/src/call/service.js +340 -0
- package/dist/src/call/treasury.d.ts +53 -0
- package/dist/src/call/treasury.d.ts.map +1 -0
- package/dist/src/call/treasury.js +161 -0
- package/dist/src/call.d.ts +24 -0
- package/dist/src/call.d.ts.map +1 -0
- package/dist/src/call.js +58 -0
- package/dist/src/events.d.ts +65 -0
- package/dist/src/events.d.ts.map +1 -0
- package/dist/src/events.js +59 -0
- package/dist/src/index.d.ts +19 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +18 -0
- package/dist/src/objects.d.ts +308 -0
- package/dist/src/objects.d.ts.map +1 -0
- package/dist/src/objects.js +448 -0
- package/dist/src/permission.d.ts +12 -0
- package/dist/src/permission.d.ts.map +1 -0
- package/dist/src/permission.js +40 -0
- package/dist/src/private_info.d.ts +26 -0
- package/dist/src/private_info.d.ts.map +1 -0
- package/dist/src/private_info.js +243 -0
- package/dist/webpack.config.d.ts +2 -0
- package/dist/webpack.config.d.ts.map +1 -0
- package/dist/webpack.config.js +17 -0
- package/dist/wowok/src/arbitration.d.ts +63 -0
- package/dist/wowok/src/arbitration.d.ts.map +1 -0
- package/dist/wowok/src/demand.d.ts +26 -0
- package/dist/wowok/src/demand.d.ts.map +1 -0
- package/dist/wowok/src/entity.d.ts +27 -0
- package/dist/wowok/src/entity.d.ts.map +1 -0
- package/dist/wowok/src/exception.d.ts +31 -0
- package/dist/wowok/src/exception.d.ts.map +1 -0
- package/dist/wowok/src/guard.d.ts +79 -0
- package/dist/wowok/src/guard.d.ts.map +1 -0
- package/dist/wowok/src/index.d.ts +35 -0
- package/dist/wowok/src/index.d.ts.map +1 -0
- package/dist/wowok/src/machine.d.ts +67 -0
- package/dist/wowok/src/machine.d.ts.map +1 -0
- package/dist/wowok/src/passport.d.ts +86 -0
- package/dist/wowok/src/passport.d.ts.map +1 -0
- package/dist/wowok/src/payment.d.ts +16 -0
- package/dist/wowok/src/payment.d.ts.map +1 -0
- package/dist/wowok/src/permission.d.ts +150 -0
- package/dist/wowok/src/permission.d.ts.map +1 -0
- package/dist/wowok/src/progress.d.ts +72 -0
- package/dist/wowok/src/progress.d.ts.map +1 -0
- package/dist/wowok/src/protocol.d.ts +226 -0
- package/dist/wowok/src/protocol.d.ts.map +1 -0
- package/dist/wowok/src/repository.d.ts +83 -0
- package/dist/wowok/src/repository.d.ts.map +1 -0
- package/dist/wowok/src/resource.d.ts +35 -0
- package/dist/wowok/src/resource.d.ts.map +1 -0
- package/dist/wowok/src/service.d.ts +138 -0
- package/dist/wowok/src/service.d.ts.map +1 -0
- package/dist/wowok/src/treasury.d.ts +55 -0
- package/dist/wowok/src/treasury.d.ts.map +1 -0
- package/dist/wowok/src/utils.d.ts +93 -0
- package/dist/wowok/src/utils.d.ts.map +1 -0
- package/dist/wowok/src/wowok.d.ts +15 -0
- package/dist/wowok/src/wowok.d.ts.map +1 -0
- package/dist/wowok_agent/empty.d.ts +1 -0
- package/dist/wowok_agent/empty.d.ts.map +1 -0
- package/dist/wowok_agent/src/account.d.ts +38 -0
- package/dist/wowok_agent/src/account.d.ts.map +1 -0
- package/dist/wowok_agent/src/cache.d.ts +46 -0
- package/dist/wowok_agent/src/cache.d.ts.map +1 -0
- package/dist/wowok_agent/src/call/arbitration.d.ts +63 -0
- package/dist/wowok_agent/src/call/arbitration.d.ts.map +1 -0
- package/dist/wowok_agent/src/call/base.d.ts +34 -0
- package/dist/wowok_agent/src/call/base.d.ts.map +1 -0
- package/dist/wowok_agent/src/call/demand.d.ts +55 -0
- package/dist/wowok_agent/src/call/demand.d.ts.map +1 -0
- package/dist/wowok_agent/src/call/guard.d.ts +44 -0
- package/dist/wowok_agent/src/call/guard.d.ts.map +1 -0
- package/dist/wowok_agent/src/call/machine.d.ts +109 -0
- package/dist/wowok_agent/src/call/machine.d.ts.map +1 -0
- package/dist/wowok_agent/src/call/object_permission.d.ts +13 -0
- package/dist/wowok_agent/src/call/object_permission.d.ts.map +1 -0
- package/dist/wowok_agent/src/call/permission.d.ts +47 -0
- package/dist/wowok_agent/src/call/permission.d.ts.map +1 -0
- package/dist/wowok_agent/src/call/personal.d.ts +43 -0
- package/dist/wowok_agent/src/call/personal.d.ts.map +1 -0
- package/dist/wowok_agent/src/call/repository.d.ts +53 -0
- package/dist/wowok_agent/src/call/repository.d.ts.map +1 -0
- package/dist/wowok_agent/src/call/service.d.ts +134 -0
- package/dist/wowok_agent/src/call/service.d.ts.map +1 -0
- package/dist/wowok_agent/src/call/treasury.d.ts +53 -0
- package/dist/wowok_agent/src/call/treasury.d.ts.map +1 -0
- package/dist/wowok_agent/src/call.d.ts +24 -0
- package/dist/wowok_agent/src/call.d.ts.map +1 -0
- package/dist/wowok_agent/src/events.d.ts +65 -0
- package/dist/wowok_agent/src/events.d.ts.map +1 -0
- package/dist/wowok_agent/src/index.d.ts +19 -0
- package/dist/wowok_agent/src/index.d.ts.map +1 -0
- package/dist/wowok_agent/src/objects.d.ts +308 -0
- package/dist/wowok_agent/src/objects.d.ts.map +1 -0
- package/dist/wowok_agent/src/permission.d.ts +12 -0
- package/dist/wowok_agent/src/permission.d.ts.map +1 -0
- package/dist/wowok_agent/src/private_info.d.ts +26 -0
- package/dist/wowok_agent/src/private_info.d.ts.map +1 -0
- package/empty.ts +0 -0
- package/package.json +12 -3
- package/src/account.ts +26 -21
- package/src/call/arbitration.ts +40 -19
- package/src/call/base.ts +13 -15
- package/src/call/demand.ts +8 -7
- package/src/call/guard.ts +1 -1
- package/src/call/machine.ts +56 -35
- package/src/call/repository.ts +17 -15
- package/src/call/service.ts +87 -55
- package/src/call/treasury.ts +11 -10
- package/src/call.ts +3 -3
- package/src/index.ts +1 -1
- package/tsconfig.json +6 -2
- package/webpack.config.cjs +26 -0
package/README.md
CHANGED
|
@@ -20,4 +20,21 @@ The protocol address may change due to protocol upgrade. Please update the SDK t
|
|
|
20
20
|
- *Integrate queries and operations.*
|
|
21
21
|
- *Simplifies and supports JSON-driven operations.*
|
|
22
22
|
|
|
23
|
+
### Examples
|
|
24
|
+
#### [An airdrop collection system for different behaviors, allowing three collection mechanisms:](https://github.com/wowok-ai/examples/tree/main/airdrop)
|
|
25
|
+
* New users can claim 300 tokens
|
|
26
|
+
* Each user can claim 100 tokens per day
|
|
27
|
+
* After 10 claims, each user can claim 200 tokens per day
|
|
28
|
+
|
|
29
|
+
#### [A complete e-commerce system similar to Amazon:](https://github.com/wowok-ai/examples/tree/main/e-commerce)
|
|
30
|
+
* Pre-sales, after-sales, finance, express and other multi-role cooperation
|
|
31
|
+
* Encrypted personal information transfer and order management
|
|
32
|
+
* Support compensation and dispute voting arbitration
|
|
33
|
+
|
|
34
|
+
#### [How can social resources collaborate to meet an Iceland personalized travel dream](https://github.com/wowok-ai/examples/tree/main/travel)
|
|
35
|
+
* Service + Machine/Progress + Order + Permission + Treasury + Arbitration
|
|
36
|
+
* Multi-Services, and Travel's supply chain is integrated with the purchase of insurance on behalf of Travel
|
|
37
|
+
|
|
38
|
+
#### [See more examples...](https://github.com/wowok-ai/examples)
|
|
39
|
+
|
|
23
40
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[124],{124:()=>{}}]);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Ed25519Keypair, TransactionBlock } from 'wowok';
|
|
2
|
+
import { type CoinBalance, type CoinStruct } from '@mysten/sui/client';
|
|
3
|
+
import { type TransactionResult } from '@mysten/sui/transactions';
|
|
4
|
+
export interface AccountData {
|
|
5
|
+
name: string;
|
|
6
|
+
default?: boolean;
|
|
7
|
+
key: string;
|
|
8
|
+
}
|
|
9
|
+
export interface AccountData_Show {
|
|
10
|
+
name: string;
|
|
11
|
+
default?: boolean;
|
|
12
|
+
address: string;
|
|
13
|
+
}
|
|
14
|
+
export declare class Account {
|
|
15
|
+
constructor(storage?: 'File' | 'Explorer');
|
|
16
|
+
static _instance: any;
|
|
17
|
+
static Instance(): Account;
|
|
18
|
+
private storage;
|
|
19
|
+
private _add;
|
|
20
|
+
private _default;
|
|
21
|
+
private _get;
|
|
22
|
+
private _rename;
|
|
23
|
+
set_storage(storage?: 'File' | 'Explorer'): void;
|
|
24
|
+
gen(name: string, bDefault?: boolean): Promise<void>;
|
|
25
|
+
default(): Promise<AccountData | undefined>;
|
|
26
|
+
get(name?: string, bNotFoundReturnDefault?: boolean): Promise<AccountData | undefined>;
|
|
27
|
+
rename(oldName: string, newName: string, bSwapIfExisted?: boolean): Promise<boolean>;
|
|
28
|
+
get_address(name?: string, bNotFoundReturnDefault?: boolean): Promise<string | undefined>;
|
|
29
|
+
get_pubkey(name?: string, bNotFoundReturnDefault?: boolean): Promise<string | undefined>;
|
|
30
|
+
get_pair(name?: string, bNotFoundReturnDefault?: boolean): Promise<Ed25519Keypair | undefined>;
|
|
31
|
+
list(): Promise<AccountData_Show[]>;
|
|
32
|
+
faucet(name?: string): Promise<void>;
|
|
33
|
+
balance: (name?: string, token_type?: string) => Promise<CoinBalance | undefined>;
|
|
34
|
+
coin: (name?: string, token_type?: string) => Promise<CoinStruct[] | undefined>;
|
|
35
|
+
get_coin_object: (txb: TransactionBlock, balance_required: string | bigint | number, name?: string, token_type?: string) => Promise<TransactionResult | undefined>;
|
|
36
|
+
coin_with_balance: (balance_required: string | bigint | number, account?: string, token_type?: string) => Promise<string | undefined>;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=account.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../src/account.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAiD,gBAAgB,EAAmB,MAAM,OAAO,CAAC;AAEzH,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAA4B,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC5F,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AAS,CAAC;IAOzF,IAAI,IAAK,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAmBpC,MAAM,CAAC,IAAI,CAAC,EAAC,MAAM;IAUzB,OAAO,GAAU,OAAM,MAAM,EAAE,aAAY,MAAM,KAAI,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CAKpF;IAGD,IAAI,GAAU,OAAM,MAAM,EAAE,aAAY,MAAM,KAAI,OAAO,CAAC,UAAU,EAAE,GAAG,SAAS,CAAC,CAKlF;IAED,eAAe,GAAU,KAAK,gBAAgB,EAAE,kBAAiB,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,OAAM,MAAM,EAAE,aAAY,MAAM,KAAI,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CA2BpK;IACD,iBAAiB,GAAS,kBAAiB,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,UAAS,MAAM,EAAE,aAAY,MAAM,KAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAgBtI;CACJ"}
|
package/dist/account.js
ADDED
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { Ed25519Keypair, fromHEX, toHEX, decodeSuiPrivateKey, Protocol, TransactionBlock, ERROR, Errors, } from 'wowok';
|
|
2
|
+
import { getFaucetHost, requestSuiFromFaucetV0 } from 'wowok';
|
|
3
|
+
const Account_FileName = 'wowok.acc.dat';
|
|
4
|
+
const Account_Key = 'wowok-acc-v1';
|
|
5
|
+
export class Account {
|
|
6
|
+
constructor(storage = 'File') {
|
|
7
|
+
this.storage = storage;
|
|
8
|
+
}
|
|
9
|
+
static _instance;
|
|
10
|
+
static Instance() {
|
|
11
|
+
if (!Account._instance) {
|
|
12
|
+
Account._instance = new Account();
|
|
13
|
+
}
|
|
14
|
+
;
|
|
15
|
+
return Account._instance;
|
|
16
|
+
}
|
|
17
|
+
storage = 'File';
|
|
18
|
+
_add(buffer, name, bDefault) {
|
|
19
|
+
var data;
|
|
20
|
+
var key = '0x' + toHEX(decodeSuiPrivateKey(Ed25519Keypair.generate().getSecretKey()).secretKey);
|
|
21
|
+
try {
|
|
22
|
+
if (buffer) {
|
|
23
|
+
data = JSON.parse(buffer);
|
|
24
|
+
if (data) {
|
|
25
|
+
const f = data.find(v => v.name === name);
|
|
26
|
+
if (f) {
|
|
27
|
+
f.default = bDefault;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
if (bDefault) {
|
|
31
|
+
data.forEach(v => v.default = false);
|
|
32
|
+
}
|
|
33
|
+
data.push({ name: name, key: key, default: bDefault });
|
|
34
|
+
}
|
|
35
|
+
return data;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
catch (e) { /*console.log(e)*/ }
|
|
40
|
+
return [{ name: name, key: key, default: bDefault }];
|
|
41
|
+
}
|
|
42
|
+
_default(buffer) {
|
|
43
|
+
var data;
|
|
44
|
+
try {
|
|
45
|
+
if (buffer) {
|
|
46
|
+
data = JSON.parse(buffer);
|
|
47
|
+
if (data) {
|
|
48
|
+
const f = data.find(v => v.default);
|
|
49
|
+
if (f) {
|
|
50
|
+
return f;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
catch (e) { /*console.log(e)*/ }
|
|
56
|
+
}
|
|
57
|
+
_get(buffer, name, bNotFoundReturnDefault) {
|
|
58
|
+
var data;
|
|
59
|
+
try {
|
|
60
|
+
if (buffer) {
|
|
61
|
+
data = JSON.parse(buffer);
|
|
62
|
+
if (data) {
|
|
63
|
+
const f = data.find(v => v.name === name);
|
|
64
|
+
if (f) {
|
|
65
|
+
return f;
|
|
66
|
+
}
|
|
67
|
+
if (bNotFoundReturnDefault) {
|
|
68
|
+
return data.find(v => v.default);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
catch (e) { /*console.log(e)*/ }
|
|
74
|
+
}
|
|
75
|
+
_rename(buffer, oldName, newName, bSwapIfExisted = true) {
|
|
76
|
+
var data;
|
|
77
|
+
try {
|
|
78
|
+
if (buffer) {
|
|
79
|
+
data = JSON.parse(buffer);
|
|
80
|
+
}
|
|
81
|
+
if (data) {
|
|
82
|
+
const f1 = data.find(v => v.name === oldName);
|
|
83
|
+
if (!f1)
|
|
84
|
+
return undefined;
|
|
85
|
+
const f2 = data.find(v => v.name === newName);
|
|
86
|
+
if (f2) {
|
|
87
|
+
if (bSwapIfExisted) {
|
|
88
|
+
f1.name = newName;
|
|
89
|
+
f2.name = oldName;
|
|
90
|
+
return data;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
f1.name = newName;
|
|
95
|
+
return data;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
catch (e) { /*console.log(e)*/ }
|
|
100
|
+
}
|
|
101
|
+
set_storage(storage = 'File') {
|
|
102
|
+
this.storage = storage;
|
|
103
|
+
}
|
|
104
|
+
async gen(name, bDefault) {
|
|
105
|
+
try {
|
|
106
|
+
if (this.storage === 'File') {
|
|
107
|
+
const [fs, os, path] = await Promise.all([import('fs'), import('os'), import('path')]);
|
|
108
|
+
const filePath = path.join(os.homedir(), Account_FileName);
|
|
109
|
+
fs.readFile(filePath, 'utf-8', (err, d) => {
|
|
110
|
+
const data = this._add(d, name, bDefault);
|
|
111
|
+
fs.writeFileSync(filePath, JSON.stringify(data), 'utf-8');
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
else if (this.storage === 'Explorer') {
|
|
115
|
+
const data = this._add(localStorage.getItem(Account_Key), name, bDefault);
|
|
116
|
+
localStorage.setItem(Account_Key, JSON.stringify(data));
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
catch (e) { /*console.log(e)*/ }
|
|
120
|
+
}
|
|
121
|
+
async default() {
|
|
122
|
+
try {
|
|
123
|
+
if (this.storage === 'File') {
|
|
124
|
+
const [fs, os, path] = await Promise.all([import('fs'), import('os'), import('path')]);
|
|
125
|
+
const filePath = path.join(os.homedir(), Account_FileName);
|
|
126
|
+
return this._default(fs.readFileSync(filePath, 'utf-8'));
|
|
127
|
+
}
|
|
128
|
+
else if (this.storage === 'Explorer') {
|
|
129
|
+
return this._default(localStorage.getItem(Account_Key));
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
catch (e) { /*console.log(e)*/ }
|
|
133
|
+
}
|
|
134
|
+
async get(name, bNotFoundReturnDefault = true) {
|
|
135
|
+
try {
|
|
136
|
+
if (this.storage === 'File') {
|
|
137
|
+
const [fs, os, path] = await Promise.all([import('fs'), import('os'), import('path')]);
|
|
138
|
+
const filePath = path.join(os.homedir(), Account_FileName);
|
|
139
|
+
return this._get(fs.readFileSync(filePath, 'utf-8'), name, bNotFoundReturnDefault);
|
|
140
|
+
}
|
|
141
|
+
else if (this.storage === 'Explorer') {
|
|
142
|
+
return this._get(localStorage.getItem(Account_Key), name, bNotFoundReturnDefault);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
catch (e) { /*console.log(e)*/ }
|
|
146
|
+
}
|
|
147
|
+
async rename(oldName, newName, bSwapIfExisted = true) {
|
|
148
|
+
var res;
|
|
149
|
+
try {
|
|
150
|
+
if (this.storage === 'File') {
|
|
151
|
+
const [fs, os, path] = await Promise.all([import('fs'), import('os'), import('path')]);
|
|
152
|
+
const filePath = path.join(os.homedir(), Account_FileName);
|
|
153
|
+
res = this._rename(fs.readFileSync(filePath, 'utf-8'), oldName, newName, bSwapIfExisted);
|
|
154
|
+
if (res) {
|
|
155
|
+
fs.writeFileSync(filePath, JSON.stringify(res), 'utf-8');
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
else if (this.storage === 'Explorer') {
|
|
159
|
+
res = this._rename(localStorage.getItem(Account_Key), oldName, newName, bSwapIfExisted);
|
|
160
|
+
if (res)
|
|
161
|
+
localStorage.setItem(Account_Key, JSON.stringify(res));
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
catch (e) { /*console.log(e)*/ }
|
|
165
|
+
return res ? true : false;
|
|
166
|
+
}
|
|
167
|
+
async get_address(name, bNotFoundReturnDefault = true) {
|
|
168
|
+
const a = await this.get(name, bNotFoundReturnDefault);
|
|
169
|
+
if (a) {
|
|
170
|
+
return Ed25519Keypair.fromSecretKey(fromHEX(a.key)).getPublicKey().toSuiAddress();
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
async get_pubkey(name, bNotFoundReturnDefault = true) {
|
|
174
|
+
const a = await this.get(name, bNotFoundReturnDefault);
|
|
175
|
+
if (a) {
|
|
176
|
+
return Ed25519Keypair.fromSecretKey(fromHEX(a.key)).getPublicKey().toSuiPublicKey();
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
async get_pair(name, bNotFoundReturnDefault = true) {
|
|
180
|
+
const a = await this.get(name, bNotFoundReturnDefault);
|
|
181
|
+
if (a) {
|
|
182
|
+
return Ed25519Keypair.fromSecretKey(fromHEX(a.key));
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
async list() {
|
|
186
|
+
try {
|
|
187
|
+
if (this.storage === 'File') {
|
|
188
|
+
const [fs, os, path] = await Promise.all([import('fs'), import('os'), import('path')]);
|
|
189
|
+
const filePath = path.join(os.homedir(), Account_FileName);
|
|
190
|
+
const a = JSON.parse(fs.readFileSync(filePath, 'utf-8'));
|
|
191
|
+
return a.map(v => {
|
|
192
|
+
return { name: v.name, default: v?.default, address: Ed25519Keypair.fromSecretKey(fromHEX(v.key)).getPublicKey().toSuiAddress() };
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
else if (this.storage === 'Explorer') {
|
|
196
|
+
const a = JSON.parse(localStorage.getItem(Account_Key) ?? '');
|
|
197
|
+
return a.map(v => {
|
|
198
|
+
return { name: v.name, default: v?.default, address: Ed25519Keypair.fromSecretKey(fromHEX(v.key)).getPublicKey().toSuiAddress() };
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
catch (e) { /*console.log(e)*/ }
|
|
203
|
+
return [];
|
|
204
|
+
}
|
|
205
|
+
async faucet(name) {
|
|
206
|
+
const address = await this.get_address(name, true);
|
|
207
|
+
if (address) {
|
|
208
|
+
await requestSuiFromFaucetV0({ host: getFaucetHost('testnet'), recipient: address }).catch(e => {
|
|
209
|
+
//console.log(e)
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
// token_type is 0x2::sui::SUI, if not specified.
|
|
214
|
+
balance = async (name, token_type) => {
|
|
215
|
+
const addr = await this.get_address(name);
|
|
216
|
+
if (addr) {
|
|
217
|
+
return await Protocol.Client().getBalance({ owner: addr, coinType: token_type });
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
// token_type is 0x2::sui::SUI, if not specified.
|
|
221
|
+
coin = async (name, token_type) => {
|
|
222
|
+
const addr = await this.get_address(name);
|
|
223
|
+
if (addr) {
|
|
224
|
+
return (await Protocol.Client().getCoins({ owner: addr, coinType: token_type })).data;
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
get_coin_object = async (txb, balance_required, name, token_type) => {
|
|
228
|
+
const addr = await this.get_address(name);
|
|
229
|
+
const b = BigInt(balance_required);
|
|
230
|
+
if (addr && b > BigInt(0)) {
|
|
231
|
+
if (!token_type || token_type === '0x2::sui::SUI' || token_type === '0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI') {
|
|
232
|
+
return txb.splitCoins(txb.gas, [balance_required]);
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
const r = await Protocol.Client().getCoins({ owner: addr, coinType: token_type });
|
|
236
|
+
const objects = [];
|
|
237
|
+
var current = BigInt(0);
|
|
238
|
+
for (let i = 0; i < r.data.length; ++i) {
|
|
239
|
+
current += BigInt(r.data[i].balance);
|
|
240
|
+
objects.push(r.data[i].coinObjectId);
|
|
241
|
+
if (current >= b) {
|
|
242
|
+
break;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
if (objects.length === 1) {
|
|
246
|
+
return txb.splitCoins(objects[0], [b]);
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
const ret = objects.pop();
|
|
250
|
+
txb.mergeCoins(ret, objects);
|
|
251
|
+
return txb.splitCoins(ret, [b]);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
coin_with_balance = async (balance_required, account, token_type) => {
|
|
257
|
+
const pair = await this.get_pair(account, true);
|
|
258
|
+
if (!pair)
|
|
259
|
+
ERROR(Errors.Fail, 'account invalid');
|
|
260
|
+
const txb = new TransactionBlock();
|
|
261
|
+
const res = await Account.Instance().get_coin_object(txb, balance_required, account, token_type);
|
|
262
|
+
if (res) {
|
|
263
|
+
txb.transferObjects([res], pair?.toSuiAddress());
|
|
264
|
+
const r = await Protocol.Client().signAndExecuteTransaction({
|
|
265
|
+
transaction: txb,
|
|
266
|
+
signer: pair,
|
|
267
|
+
options: { showObjectChanges: true },
|
|
268
|
+
});
|
|
269
|
+
const t = token_type ?? '0x2::sui::SUI';
|
|
270
|
+
return r?.objectChanges.find((v) => v?.type === 'created' && (v?.objectType).includes(t))?.objectId;
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=empty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["../../empty.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Ed25519Keypair, TransactionBlock } from 'wowok';
|
|
2
|
+
import { type CoinBalance, type CoinStruct } from '@mysten/sui/client';
|
|
3
|
+
import { type TransactionResult } from '@mysten/sui/transactions';
|
|
4
|
+
export interface AccountData {
|
|
5
|
+
name: string;
|
|
6
|
+
default?: boolean;
|
|
7
|
+
key: string;
|
|
8
|
+
}
|
|
9
|
+
export interface AccountData_Show {
|
|
10
|
+
name: string;
|
|
11
|
+
default?: boolean;
|
|
12
|
+
address: string;
|
|
13
|
+
}
|
|
14
|
+
export declare class Account {
|
|
15
|
+
constructor(storage?: 'File' | 'Explorer');
|
|
16
|
+
static _instance: any;
|
|
17
|
+
static Instance(): Account;
|
|
18
|
+
private storage;
|
|
19
|
+
private _add;
|
|
20
|
+
private _default;
|
|
21
|
+
private _get;
|
|
22
|
+
private _rename;
|
|
23
|
+
set_storage(storage?: 'File' | 'Explorer'): void;
|
|
24
|
+
gen(name: string, bDefault?: boolean): Promise<void>;
|
|
25
|
+
default(): Promise<AccountData | undefined>;
|
|
26
|
+
get(name?: string, bNotFoundReturnDefault?: boolean): Promise<AccountData | undefined>;
|
|
27
|
+
rename(oldName: string, newName: string, bSwapIfExisted?: boolean): Promise<boolean>;
|
|
28
|
+
get_address(name?: string, bNotFoundReturnDefault?: boolean): Promise<string | undefined>;
|
|
29
|
+
get_pubkey(name?: string, bNotFoundReturnDefault?: boolean): Promise<string | undefined>;
|
|
30
|
+
get_pair(name?: string, bNotFoundReturnDefault?: boolean): Promise<Ed25519Keypair | undefined>;
|
|
31
|
+
list(): Promise<AccountData_Show[]>;
|
|
32
|
+
faucet(name?: string): Promise<void>;
|
|
33
|
+
balance: (name?: string, token_type?: string) => Promise<CoinBalance | undefined>;
|
|
34
|
+
coin: (name?: string, token_type?: string) => Promise<CoinStruct[] | undefined>;
|
|
35
|
+
get_coin_object: (txb: TransactionBlock, balance_required: string | bigint | number, name?: string, token_type?: string) => Promise<TransactionResult | undefined>;
|
|
36
|
+
coin_with_balance: (balance_required: string | bigint | number, account?: string, token_type?: string) => Promise<string | undefined>;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=account.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/account.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAiD,gBAAgB,EAAmB,MAAM,OAAO,CAAC;AAEzH,OAAO,EA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,CAAC,MAAM,GAAG,SAAS,CAAC;IAMnF,QAAQ,CAAC,IAAI,CAAC,EAAC,MAAM,EAAE,sBAAsB,UAAK,GAAI,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC;IAOzF,IAAI,IAAK,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAmBpC,MAAM,CAAC,IAAI,CAAC,EAAC,MAAM;IAUzB,OAAO,GAAU,OAAM,MAAM,EAAE,aAAY,MAAM,KAAI,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CAKpF;IAGD,IAAI,GAAU,OAAM,MAAM,EAAE,aAAY,MAAM,KAAI,OAAO,CAAC,UAAU,EAAE,GAAG,SAAS,CAAC,CAKlF;IAED,eAAe,GAAU,KAAK,gBAAgB,EAAE,kBAAiB,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,OAAM,MAAM,EAAE,aAAY,MAAM,KAAI,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CA2BpK;IACD,iBAAiB,GAAS,kBAAiB,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,UAAS,MAAM,EAAE,aAAY,MAAM,KAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAgBtI;CACJ"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export type CacheExpire = number | 'INFINITE';
|
|
2
|
+
export interface CachedData {
|
|
3
|
+
expire: number | 'INFINITE';
|
|
4
|
+
data: string | any;
|
|
5
|
+
}
|
|
6
|
+
export declare abstract class CacheData {
|
|
7
|
+
constructor(expire: number);
|
|
8
|
+
abstract load(key: string): string | null | undefined;
|
|
9
|
+
abstract save(key: string, data: string): void;
|
|
10
|
+
abstract remove(key: string): void;
|
|
11
|
+
expire_time(): number;
|
|
12
|
+
protected expire: number;
|
|
13
|
+
}
|
|
14
|
+
export declare enum CacheName {
|
|
15
|
+
object = "OBJECT",
|
|
16
|
+
personal = "PERSONAL",
|
|
17
|
+
table = "TABLE"
|
|
18
|
+
}
|
|
19
|
+
export declare const OBJECT_KEY: (object_address: string, name: CacheName) => string;
|
|
20
|
+
export interface PersonalResouceCache {
|
|
21
|
+
address: string;
|
|
22
|
+
resource: string;
|
|
23
|
+
time_expire?: CacheExpire;
|
|
24
|
+
}
|
|
25
|
+
export declare class MemeryCache extends CacheData {
|
|
26
|
+
constructor(expire?: number);
|
|
27
|
+
protected data: Map<string, string>;
|
|
28
|
+
load(key: string): string | null | undefined;
|
|
29
|
+
save(key: string, data: string): void;
|
|
30
|
+
remove(key: string): void;
|
|
31
|
+
}
|
|
32
|
+
export declare class LocalStorageCache extends CacheData {
|
|
33
|
+
constructor(expire?: number);
|
|
34
|
+
load(key: string): string | null | undefined;
|
|
35
|
+
save(key: string, data: string): void;
|
|
36
|
+
remove(key: string): void;
|
|
37
|
+
}
|
|
38
|
+
export declare class WowokCache {
|
|
39
|
+
static _instance: any;
|
|
40
|
+
private cache;
|
|
41
|
+
constructor();
|
|
42
|
+
static Instance(): WowokCache;
|
|
43
|
+
set(name: string | CacheName, cache: CacheData | undefined): void;
|
|
44
|
+
get(name: string | CacheName): CacheData | undefined;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/cache.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,UAAU,CAAC;AAE9C,MAAM,WAAW,UAAU;IACvB,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC;IAC5B,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED,8BAAsB,SAAS;gBACf,MAAM,EAAE,MAAM;IAC1B,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,GAAI,MAAM,GAAG,IAAI,GAAG,SAAS;IACtD,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAC,MAAM,GAAI,IAAI;IAC9C,QAAQ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CAGvD"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { TransactionBlock, PassportObject, Dispute, VotingGuard, WithdrawFee } from 'wowok';
|
|
2
|
+
import { CallBase, CallResult, Namedbject } from "./base";
|
|
3
|
+
export { BCS, getSuiMoveConfig, } from '@mysten/bcs';
|
|
4
|
+
export interface CallArbitration_Data {
|
|
5
|
+
type_parameter: string;
|
|
6
|
+
object?: {
|
|
7
|
+
address: string;
|
|
8
|
+
} | {
|
|
9
|
+
namedNew: Namedbject;
|
|
10
|
+
};
|
|
11
|
+
permission?: {
|
|
12
|
+
address: string;
|
|
13
|
+
} | {
|
|
14
|
+
namedNew: Namedbject;
|
|
15
|
+
description?: string;
|
|
16
|
+
};
|
|
17
|
+
description?: string;
|
|
18
|
+
endpoint?: string;
|
|
19
|
+
fee?: string;
|
|
20
|
+
fee_treasury?: {
|
|
21
|
+
address: string;
|
|
22
|
+
} | {
|
|
23
|
+
namedNew: Namedbject;
|
|
24
|
+
description?: string;
|
|
25
|
+
};
|
|
26
|
+
arb_new?: {
|
|
27
|
+
data: Dispute;
|
|
28
|
+
guard?: string | 'fetch';
|
|
29
|
+
namedNew?: Namedbject;
|
|
30
|
+
};
|
|
31
|
+
arb_withdraw_fee?: {
|
|
32
|
+
arb?: string;
|
|
33
|
+
data: WithdrawFee;
|
|
34
|
+
};
|
|
35
|
+
arb_vote?: {
|
|
36
|
+
arb?: string;
|
|
37
|
+
voting_guard?: string;
|
|
38
|
+
agrees: number[];
|
|
39
|
+
};
|
|
40
|
+
arb_arbitration?: {
|
|
41
|
+
arb?: string;
|
|
42
|
+
feedback: string;
|
|
43
|
+
indemnity?: string;
|
|
44
|
+
};
|
|
45
|
+
usage_guard?: string;
|
|
46
|
+
voting_guard?: {
|
|
47
|
+
op: 'add' | 'set';
|
|
48
|
+
data: VotingGuard[];
|
|
49
|
+
} | {
|
|
50
|
+
op: 'remove';
|
|
51
|
+
guards: string[];
|
|
52
|
+
} | {
|
|
53
|
+
op: 'removeall';
|
|
54
|
+
};
|
|
55
|
+
bPaused?: boolean;
|
|
56
|
+
}
|
|
57
|
+
export declare class CallArbitration extends CallBase {
|
|
58
|
+
data: CallArbitration_Data;
|
|
59
|
+
constructor(data: CallArbitration_Data);
|
|
60
|
+
call(account?: string): Promise<CallResult>;
|
|
61
|
+
protected operate(txb: TransactionBlock, passport?: PassportObject, account?: string): Promise<void>;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=arbitration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arbitration.d.ts","sourceRoot":"","sources":["../../../../src/call/arbitration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAkB,cAAc,EACT,OAAO,EAAkB,WAAW,EAAE,WAAW,EAEhG,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAC,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAE,GAAG,EAAE,gBAAgB,GAAG,MAAM,aAAa,CAAC;AAGrD,MAAM,WAAW,oBAAoB;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE;QAAC,OAAO,EAAC,MAAM,CAAA;KAAC,GAAG;QAAC,QAAQ,EAAE,UAAU,CAAA;KAAC,CAAC;IACnD,UAAU,CAAC,EAAE;QAAC,OAAO,EAAC,MAAM,CAAA;KAAC,GAAG;QAAC,QAAQ,EAAE,UAAU,CAAC;QAAC,WAAW,CAAC,EAAC,MAAM,CAAA;KAAC,CAAC;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE;QAAC,OAAO,EAAC,MAAM,CAAA;KAAC,GAAG;QAAC,QAAQ,EAAE,UAAU,CAAC;QAAC,WAAW,CAAC,EAAC,MAAM,CAAA;KAAC,CAAC;IAC9E,OAAO,CA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ObjectBase } from '../objects';
|
|
3
|
+
import { Transaction as TransactionBlock } from '@mysten/sui/transactions';
|
|
4
|
+
import { type SuiTransactionBlockResponse as CallResponse } from '@mysten/sui/client';
|
|
5
|
+
export interface Namedbject {
|
|
6
|
+
name?: string;
|
|
7
|
+
tags?: string[];
|
|
8
|
+
}
|
|
9
|
+
export interface AddressMark {
|
|
10
|
+
address: TxbAddress;
|
|
11
|
+
name?: string;
|
|
12
|
+
tags: string[];
|
|
13
|
+
}
|
|
14
|
+
export interface ResponseData extends ObjectBase {
|
|
15
|
+
change: 'created' | 'mutated' | string;
|
|
16
|
+
}
|
|
17
|
+
export interface GuardInfo_forCall {
|
|
18
|
+
guard: string[];
|
|
19
|
+
witness: WitnessFill[];
|
|
20
|
+
}
|
|
21
|
+
export type CallResult = GuardInfo_forCall | CallResponse | undefined;
|
|
22
|
+
export declare function ResponseData(response: CallResponse | undefined): ResponseData[];
|
|
23
|
+
export declare class CallBase {
|
|
24
|
+
resouceObject: ResourceObject | undefined;
|
|
25
|
+
protected operate(txb: TransactionBlock, passport?: PassportObject, account?: string): Promise<void>;
|
|
26
|
+
constructor();
|
|
27
|
+
call(account?: string): Promise<CallResult>;
|
|
28
|
+
call_with_witness(info: GuardInfo_forCall, account?: string): Promise<CallResponse | undefined>;
|
|
29
|
+
protected check_permission_and_call(permission: string, permIndex: PermissionIndexType[], guards_needed: string[], checkOwner?: boolean, checkAdmin?: boolean, account?: string): Promise<CallResult>;
|
|
30
|
+
protected exec(account?: string): Promise<CallResponse>;
|
|
31
|
+
protected new_with_mark(txb: TransactionBlock, object: TxbAddress, named_new?: Namedbject, account?: string, innerTags?: string[]): Promise<void>;
|
|
32
|
+
protected sign_and_commit(txb: TransactionBlock, account?: string): Promise<CallResponse>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/call/base.ts"],"names":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,SAAS,CAAC;cAoBtF,yBAAyB,CAAE,UAAU,EAAC,MAAM,EAAE,SAAS,EAAE,mBAAmB,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,EACnH,UAAU,CAAC,EAAC,OAAO,EAAE,UAAU,CAAC,EAAC,OAAO,EAAE,OAAO,CAAC,EAAC,MAAM,GAAI,OAAO,CAAC,UAAU,CAAC;cA4CpE,IAAI,CAAE,OAAO,CAAC,EAAC,MAAM,GAAI,OAAO,CAAC,YAAY,CAAC;cAM9C,aAAa,CAAC,GAAG,EAAC,gBAAgB,EAAE,MAAM,EAAC,UAAU,EAAE,SAAS,CAAC,EAAC,UAAU,EAAE,OAAO,CAAC,EAAC,MAAM,EAAE,SAAS,GAAC,MAAM,EAAmB;cAqBlI,eAAe,CAAC,GAAG,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,MAAM,GAAI,OAAO,CAAC,YAAY,CAAC;CAenG"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { TransactionBlock } from 'wowok';
|
|
2
|
+
import { PassportObject } from 'wowok';
|
|
3
|
+
import { CallBase, CallResult, Namedbject } from "./base";
|
|
4
|
+
export interface CallDemand_Data {
|
|
5
|
+
type_parameter: string;
|
|
6
|
+
object?: {
|
|
7
|
+
address: string;
|
|
8
|
+
} | {
|
|
9
|
+
namedNew: Namedbject;
|
|
10
|
+
};
|
|
11
|
+
permission?: {
|
|
12
|
+
address: string;
|
|
13
|
+
} | {
|
|
14
|
+
namedNew: Namedbject;
|
|
15
|
+
description?: string;
|
|
16
|
+
};
|
|
17
|
+
description?: string;
|
|
18
|
+
time_expire?: {
|
|
19
|
+
op: 'duration';
|
|
20
|
+
minutes: number;
|
|
21
|
+
} | {
|
|
22
|
+
op: 'set';
|
|
23
|
+
time: number;
|
|
24
|
+
};
|
|
25
|
+
bounty?: {
|
|
26
|
+
op: 'add';
|
|
27
|
+
object: {
|
|
28
|
+
address: string;
|
|
29
|
+
} | {
|
|
30
|
+
balance: string | number;
|
|
31
|
+
};
|
|
32
|
+
} | {
|
|
33
|
+
op: 'reward';
|
|
34
|
+
service: string;
|
|
35
|
+
} | {
|
|
36
|
+
op: 'refund';
|
|
37
|
+
};
|
|
38
|
+
present?: {
|
|
39
|
+
service: string | number;
|
|
40
|
+
recommend_words: string;
|
|
41
|
+
service_pay_type: string;
|
|
42
|
+
guard?: string | 'fetch';
|
|
43
|
+
};
|
|
44
|
+
guard?: {
|
|
45
|
+
address: string;
|
|
46
|
+
service_id_in_guard?: number;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export declare class CallDemand extends CallBase {
|
|
50
|
+
data: CallDemand_Data;
|
|
51
|
+
constructor(data: CallDemand_Data);
|
|
52
|
+
call(account?: string): Promise<CallResult>;
|
|
53
|
+
protected operate(txb: TransactionBlock, passport?: PassportObject, account?: string): Promise<void>;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=demand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"demand.d.ts","sourceRoot":"","sources":["../../../../src/call/demand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAA6D,MAAM,OAAO,CAAC;AACpG,OAAO,EAAE,cAAc,EACW,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAI1D,MAAM,WAAW,eAAe;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE;QAAC,OAAO,EAAC,MAAM,CAAA;KAAC,GAAG;QAAC,QAAQ,EAAE,UAAU,CAAA;KAAC,CAAC;IACnD,UAAU,CAAC,EAAE;QAAC,OAAO,EAAC,MAAM,CAAA;KAAC,GAAG;QAAC,QAAQ,EAAE,UAAU,CAAC;QAAC,WAAW,CAAC,EAAC,MAAM,CAAA;KAAC,CAAC;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE;QAAC,EAAE,EAAE,UAAU,CAAC;QAAC,OAAO,EAAC,MAAM,CAAA;KAAC,GAAG;QAAC,EAAE,EAAC,KAAK,CAAC;QAAC,IAAI,EAAC,MAAM,CAAA;KAAC,CAAC;IACzE,MAAM,CAAC,EAAE;QAAC,EAAE,EAAC,KAAK,CAAC;QAAC,MAAM,EAAC;YAAC,OAAO,EAAC,MAAM,CAAA;SAAC,GAAC;YAAC,OAAO,EAAC,MAAM,GAAC,MAAM,CAAA;SAAC,CAAA;KAAC,GAAG;QAAC,EAAE,EAAC,QAAQ,CAAC;QAAC,OAAO,EAAC,MAAM,CAAA;KAAC,GAAG;QAAC,EAAE,EAAC,QAAQ,CAAA;KAAC,CAAE;IACtH,OAAO,CAAC,EAAE;QAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,eAAe,EAAC,MAAM,CAAC;QAAC,gBAAgB,EAAC,MAAM,CAAC;QAAC,KAAK,CAAC,EAAC,MAAM,GAAG,OAAO,CAAA;KAAC,CAAC;IAC/G,KAAK,CAAC,EAAE;QAAC,OAAO,EAAC,MAAM,CAAC;QAAC,mBAAmB,CAAC,EAAC,MAAM,CAAA;KAAC,CAAC;CACzD;AAED,qBAAa,UAAW,SAAQ,QAAQ;IACpC,IAAI,EAAE,eAAe,CAAC;gBACV,IAAI,EAAE,eAAe;IAI3B,IAAI,CAAC,OAAO,CAAC,EAAC,MAAM,GAAI,OAAO,CAAC,UAAU,CAAC;cAoDjC,OAAO,CAAC,GAAG,EAAC,gBAAgB,EAAE,QAAQ,CAAC,EAAC,cAAc,EAAE,OAAO,CAAC,EAAC,MAAM;CAoE1F"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* generate and launch a guard
|
|
3
|
+
*/
|
|
4
|
+
import { ContextType, OperatorType, ValueType, TransactionBlock, PassportObject } from "wowok";
|
|
5
|
+
import { CallBase, CallResult, Namedbject } from "./base";
|
|
6
|
+
export interface GuardConst {
|
|
7
|
+
identifier: number;
|
|
8
|
+
bWitness: boolean;
|
|
9
|
+
value_type: ValueType;
|
|
10
|
+
value?: any;
|
|
11
|
+
}
|
|
12
|
+
export type GuardNode = {
|
|
13
|
+
identifier: number;
|
|
14
|
+
} | {
|
|
15
|
+
query: number | string;
|
|
16
|
+
object: string | number;
|
|
17
|
+
parameters: GuardNode[];
|
|
18
|
+
} | {
|
|
19
|
+
logic: OperatorType.TYPE_LOGIC_AS_U256_GREATER | OperatorType.TYPE_LOGIC_AS_U256_GREATER_EQUAL | OperatorType.TYPE_LOGIC_AS_U256_LESSER | OperatorType.TYPE_LOGIC_AS_U256_LESSER_EQUAL | OperatorType.TYPE_LOGIC_AS_U256_EQUAL | OperatorType.TYPE_LOGIC_EQUAL | OperatorType.TYPE_LOGIC_HAS_SUBSTRING | OperatorType.TYPE_LOGIC_NOT | OperatorType.TYPE_LOGIC_AND | OperatorType.TYPE_LOGIC_OR;
|
|
20
|
+
parameters: GuardNode[];
|
|
21
|
+
} | {
|
|
22
|
+
calc: OperatorType.TYPE_NUMBER_ADD | OperatorType.TYPE_NUMBER_DEVIDE | OperatorType.TYPE_NUMBER_MOD | OperatorType.TYPE_NUMBER_MULTIPLY | OperatorType.TYPE_NUMBER_SUBTRACT;
|
|
23
|
+
parameters: GuardNode[];
|
|
24
|
+
} | {
|
|
25
|
+
value_type: ValueType;
|
|
26
|
+
value: any;
|
|
27
|
+
} | {
|
|
28
|
+
identifier: number;
|
|
29
|
+
} | {
|
|
30
|
+
context: ContextType.TYPE_CLOCK | ContextType.TYPE_GUARD | ContextType.TYPE_SIGNER;
|
|
31
|
+
};
|
|
32
|
+
export interface CallGuard_Data {
|
|
33
|
+
namedNew?: Namedbject;
|
|
34
|
+
description: string;
|
|
35
|
+
table?: GuardConst[];
|
|
36
|
+
root: GuardNode;
|
|
37
|
+
}
|
|
38
|
+
export declare class CallGuard extends CallBase {
|
|
39
|
+
data: CallGuard_Data;
|
|
40
|
+
constructor(data: CallGuard_Data);
|
|
41
|
+
call(account?: string): Promise<CallResult>;
|
|
42
|
+
protected operate(txb: TransactionBlock, passport?: PassportObject, account?: string): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=guard.d.ts.map
|