@haneullabs/wallet-sdk 0.1.0 → 0.1.1
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/CHANGELOG.md +47 -18
- package/dist/auto-approvals/analyzer.d.mts +83 -0
- package/dist/auto-approvals/analyzer.d.mts.map +1 -0
- package/dist/auto-approvals/analyzer.mjs +43 -0
- package/dist/auto-approvals/analyzer.mjs.map +1 -0
- package/dist/auto-approvals/index.d.mts +6 -0
- package/dist/auto-approvals/intent.d.mts +9 -0
- package/dist/auto-approvals/intent.d.mts.map +1 -0
- package/dist/auto-approvals/intent.mjs +40 -0
- package/dist/auto-approvals/intent.mjs.map +1 -0
- package/dist/auto-approvals/manager.d.mts +38 -0
- package/dist/auto-approvals/manager.d.mts.map +1 -0
- package/dist/auto-approvals/manager.mjs +192 -0
- package/dist/auto-approvals/manager.mjs.map +1 -0
- package/dist/auto-approvals/schemas/index.d.mts +2 -0
- package/dist/auto-approvals/schemas/policy.d.mts +149 -0
- package/dist/auto-approvals/schemas/policy.d.mts.map +1 -0
- package/dist/auto-approvals/schemas/policy.mjs +49 -0
- package/dist/auto-approvals/schemas/policy.mjs.map +1 -0
- package/dist/auto-approvals/schemas/state.d.mts +115 -0
- package/dist/auto-approvals/schemas/state.d.mts.map +1 -0
- package/dist/auto-approvals/schemas/state.mjs +20 -0
- package/dist/auto-approvals/schemas/state.mjs.map +1 -0
- package/dist/index.d.mts +16 -0
- package/dist/index.mjs +9 -0
- package/dist/transaction-analyzer/analyzer.d.mts +39 -0
- package/dist/transaction-analyzer/analyzer.d.mts.map +1 -0
- package/dist/transaction-analyzer/analyzer.mjs +46 -0
- package/dist/transaction-analyzer/analyzer.mjs.map +1 -0
- package/dist/transaction-analyzer/index.d.mts +8 -0
- package/dist/transaction-analyzer/rules/accessLevel.mjs +65 -0
- package/dist/transaction-analyzer/rules/accessLevel.mjs.map +1 -0
- package/dist/transaction-analyzer/rules/coin-flows.d.mts +12 -0
- package/dist/transaction-analyzer/rules/coin-flows.d.mts.map +1 -0
- package/dist/transaction-analyzer/rules/coin-flows.mjs +122 -0
- package/dist/transaction-analyzer/rules/coin-flows.mjs.map +1 -0
- package/dist/transaction-analyzer/rules/coin-value.d.mts +25 -0
- package/dist/transaction-analyzer/rules/coin-value.d.mts.map +1 -0
- package/dist/transaction-analyzer/rules/coin-value.mjs +36 -0
- package/dist/transaction-analyzer/rules/coin-value.mjs.map +1 -0
- package/dist/transaction-analyzer/rules/coins.d.mts +12 -0
- package/dist/transaction-analyzer/rules/coins.d.mts.map +1 -0
- package/dist/transaction-analyzer/rules/coins.mjs +48 -0
- package/dist/transaction-analyzer/rules/coins.mjs.map +1 -0
- package/dist/transaction-analyzer/rules/commands.d.mts +79 -0
- package/dist/transaction-analyzer/rules/commands.d.mts.map +1 -0
- package/dist/transaction-analyzer/rules/commands.mjs +141 -0
- package/dist/transaction-analyzer/rules/commands.mjs.map +1 -0
- package/dist/transaction-analyzer/rules/core.mjs +48 -0
- package/dist/transaction-analyzer/rules/core.mjs.map +1 -0
- package/dist/transaction-analyzer/rules/functions.mjs +31 -0
- package/dist/transaction-analyzer/rules/functions.mjs.map +1 -0
- package/dist/transaction-analyzer/rules/index.d.mts +2125 -0
- package/dist/transaction-analyzer/rules/index.d.mts.map +1 -0
- package/dist/transaction-analyzer/rules/index.mjs +34 -0
- package/dist/transaction-analyzer/rules/index.mjs.map +1 -0
- package/dist/transaction-analyzer/rules/inputs.d.mts +20 -0
- package/dist/transaction-analyzer/rules/inputs.d.mts.map +1 -0
- package/dist/transaction-analyzer/rules/inputs.mjs +38 -0
- package/dist/transaction-analyzer/rules/inputs.mjs.map +1 -0
- package/dist/transaction-analyzer/rules/objects.d.mts +12 -0
- package/dist/transaction-analyzer/rules/objects.d.mts.map +1 -0
- package/dist/transaction-analyzer/rules/objects.mjs +92 -0
- package/dist/transaction-analyzer/rules/objects.mjs.map +1 -0
- package/dist/util.d.mts +7 -0
- package/dist/util.d.mts.map +1 -0
- package/package.json +27 -25
- package/dist/cjs/auto-approvals/analyzer.d.ts +0 -71
- package/dist/cjs/auto-approvals/analyzer.js +0 -70
- package/dist/cjs/auto-approvals/analyzer.js.map +0 -7
- package/dist/cjs/auto-approvals/index.d.ts +0 -6
- package/dist/cjs/auto-approvals/index.js +0 -33
- package/dist/cjs/auto-approvals/index.js.map +0 -7
- package/dist/cjs/auto-approvals/intent.d.ts +0 -5
- package/dist/cjs/auto-approvals/intent.js +0 -65
- package/dist/cjs/auto-approvals/intent.js.map +0 -7
- package/dist/cjs/auto-approvals/manager.d.ts +0 -31
- package/dist/cjs/auto-approvals/manager.js +0 -328
- package/dist/cjs/auto-approvals/manager.js.map +0 -7
- package/dist/cjs/auto-approvals/schemas/index.d.ts +0 -4
- package/dist/cjs/auto-approvals/schemas/index.js +0 -28
- package/dist/cjs/auto-approvals/schemas/index.js.map +0 -7
- package/dist/cjs/auto-approvals/schemas/policy.d.ts +0 -145
- package/dist/cjs/auto-approvals/schemas/policy.js +0 -79
- package/dist/cjs/auto-approvals/schemas/policy.js.map +0 -7
- package/dist/cjs/auto-approvals/schemas/state.d.ts +0 -115
- package/dist/cjs/auto-approvals/schemas/state.js +0 -49
- package/dist/cjs/auto-approvals/schemas/state.js.map +0 -7
- package/dist/cjs/index.d.ts +0 -2
- package/dist/cjs/index.js +0 -20
- package/dist/cjs/index.js.map +0 -7
- package/dist/cjs/package.json +0 -5
- package/dist/cjs/transaction-analyzer/analyzer.d.ts +0 -34
- package/dist/cjs/transaction-analyzer/analyzer.js +0 -94
- package/dist/cjs/transaction-analyzer/analyzer.js.map +0 -7
- package/dist/cjs/transaction-analyzer/index.d.ts +0 -9
- package/dist/cjs/transaction-analyzer/index.js +0 -28
- package/dist/cjs/transaction-analyzer/index.js.map +0 -7
- package/dist/cjs/transaction-analyzer/rules/accessLevel.d.ts +0 -29
- package/dist/cjs/transaction-analyzer/rules/accessLevel.js +0 -106
- package/dist/cjs/transaction-analyzer/rules/accessLevel.js.map +0 -7
- package/dist/cjs/transaction-analyzer/rules/coin-flows.d.ts +0 -313
- package/dist/cjs/transaction-analyzer/rules/coin-flows.js +0 -179
- package/dist/cjs/transaction-analyzer/rules/coin-flows.js.map +0 -7
- package/dist/cjs/transaction-analyzer/rules/coin-value.d.ts +0 -42
- package/dist/cjs/transaction-analyzer/rules/coin-value.js +0 -60
- package/dist/cjs/transaction-analyzer/rules/coin-value.js.map +0 -7
- package/dist/cjs/transaction-analyzer/rules/coins.d.ts +0 -337
- package/dist/cjs/transaction-analyzer/rules/coins.js +0 -78
- package/dist/cjs/transaction-analyzer/rules/coins.js.map +0 -7
- package/dist/cjs/transaction-analyzer/rules/commands.d.ts +0 -366
- package/dist/cjs/transaction-analyzer/rules/commands.js +0 -148
- package/dist/cjs/transaction-analyzer/rules/commands.js.map +0 -7
- package/dist/cjs/transaction-analyzer/rules/core.d.ts +0 -314
- package/dist/cjs/transaction-analyzer/rules/core.js +0 -73
- package/dist/cjs/transaction-analyzer/rules/core.js.map +0 -7
- package/dist/cjs/transaction-analyzer/rules/functions.d.ts +0 -292
- package/dist/cjs/transaction-analyzer/rules/functions.js +0 -58
- package/dist/cjs/transaction-analyzer/rules/functions.js.map +0 -7
- package/dist/cjs/transaction-analyzer/rules/index.d.ts +0 -2244
- package/dist/cjs/transaction-analyzer/rules/index.js +0 -52
- package/dist/cjs/transaction-analyzer/rules/index.js.map +0 -7
- package/dist/cjs/transaction-analyzer/rules/inputs.d.ts +0 -313
- package/dist/cjs/transaction-analyzer/rules/inputs.js +0 -49
- package/dist/cjs/transaction-analyzer/rules/inputs.js.map +0 -7
- package/dist/cjs/transaction-analyzer/rules/objects.d.ts +0 -359
- package/dist/cjs/transaction-analyzer/rules/objects.js +0 -124
- package/dist/cjs/transaction-analyzer/rules/objects.js.map +0 -7
- package/dist/cjs/util.d.ts +0 -5
- package/dist/cjs/util.js +0 -17
- package/dist/cjs/util.js.map +0 -7
- package/dist/esm/auto-approvals/analyzer.d.ts +0 -71
- package/dist/esm/auto-approvals/analyzer.js +0 -50
- package/dist/esm/auto-approvals/analyzer.js.map +0 -7
- package/dist/esm/auto-approvals/index.d.ts +0 -6
- package/dist/esm/auto-approvals/index.js +0 -12
- package/dist/esm/auto-approvals/index.js.map +0 -7
- package/dist/esm/auto-approvals/intent.d.ts +0 -5
- package/dist/esm/auto-approvals/intent.js +0 -45
- package/dist/esm/auto-approvals/intent.js.map +0 -7
- package/dist/esm/auto-approvals/manager.d.ts +0 -31
- package/dist/esm/auto-approvals/manager.js +0 -308
- package/dist/esm/auto-approvals/manager.js.map +0 -7
- package/dist/esm/auto-approvals/schemas/index.d.ts +0 -4
- package/dist/esm/auto-approvals/schemas/index.js +0 -8
- package/dist/esm/auto-approvals/schemas/index.js.map +0 -7
- package/dist/esm/auto-approvals/schemas/policy.d.ts +0 -145
- package/dist/esm/auto-approvals/schemas/policy.js +0 -49
- package/dist/esm/auto-approvals/schemas/policy.js.map +0 -7
- package/dist/esm/auto-approvals/schemas/state.d.ts +0 -115
- package/dist/esm/auto-approvals/schemas/state.js +0 -19
- package/dist/esm/auto-approvals/schemas/state.js.map +0 -7
- package/dist/esm/index.d.ts +0 -2
- package/dist/esm/index.js +0 -3
- package/dist/esm/index.js.map +0 -7
- package/dist/esm/package.json +0 -5
- package/dist/esm/transaction-analyzer/analyzer.d.ts +0 -34
- package/dist/esm/transaction-analyzer/analyzer.js +0 -74
- package/dist/esm/transaction-analyzer/analyzer.js.map +0 -7
- package/dist/esm/transaction-analyzer/index.d.ts +0 -9
- package/dist/esm/transaction-analyzer/index.js +0 -8
- package/dist/esm/transaction-analyzer/index.js.map +0 -7
- package/dist/esm/transaction-analyzer/rules/accessLevel.d.ts +0 -29
- package/dist/esm/transaction-analyzer/rules/accessLevel.js +0 -86
- package/dist/esm/transaction-analyzer/rules/accessLevel.js.map +0 -7
- package/dist/esm/transaction-analyzer/rules/coin-flows.d.ts +0 -313
- package/dist/esm/transaction-analyzer/rules/coin-flows.js +0 -159
- package/dist/esm/transaction-analyzer/rules/coin-flows.js.map +0 -7
- package/dist/esm/transaction-analyzer/rules/coin-value.d.ts +0 -42
- package/dist/esm/transaction-analyzer/rules/coin-value.js +0 -40
- package/dist/esm/transaction-analyzer/rules/coin-value.js.map +0 -7
- package/dist/esm/transaction-analyzer/rules/coins.d.ts +0 -337
- package/dist/esm/transaction-analyzer/rules/coins.js +0 -58
- package/dist/esm/transaction-analyzer/rules/coins.js.map +0 -7
- package/dist/esm/transaction-analyzer/rules/commands.d.ts +0 -366
- package/dist/esm/transaction-analyzer/rules/commands.js +0 -128
- package/dist/esm/transaction-analyzer/rules/commands.js.map +0 -7
- package/dist/esm/transaction-analyzer/rules/core.d.ts +0 -314
- package/dist/esm/transaction-analyzer/rules/core.js +0 -53
- package/dist/esm/transaction-analyzer/rules/core.js.map +0 -7
- package/dist/esm/transaction-analyzer/rules/functions.d.ts +0 -292
- package/dist/esm/transaction-analyzer/rules/functions.js +0 -38
- package/dist/esm/transaction-analyzer/rules/functions.js.map +0 -7
- package/dist/esm/transaction-analyzer/rules/index.d.ts +0 -2244
- package/dist/esm/transaction-analyzer/rules/index.js +0 -32
- package/dist/esm/transaction-analyzer/rules/index.js.map +0 -7
- package/dist/esm/transaction-analyzer/rules/inputs.d.ts +0 -313
- package/dist/esm/transaction-analyzer/rules/inputs.js +0 -29
- package/dist/esm/transaction-analyzer/rules/inputs.js.map +0 -7
- package/dist/esm/transaction-analyzer/rules/objects.d.ts +0 -359
- package/dist/esm/transaction-analyzer/rules/objects.js +0 -104
- package/dist/esm/transaction-analyzer/rules/objects.js.map +0 -7
- package/dist/esm/util.d.ts +0 -5
- package/dist/esm/util.js +0 -1
- package/dist/esm/util.js.map +0 -7
- package/dist/tsconfig.esm.tsbuildinfo +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/transaction-analyzer/rules/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;cAaa;;;;;;;;MAAA,YAkBZ,EAAA,MAAA,GAAA,IAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { balanceChanges, bytes, data, digest, transactionResponse } from "./core.mjs";
|
|
2
|
+
import { objectIds, objects, objectsById, ownedObjects } from "./objects.mjs";
|
|
3
|
+
import { coins, gasCoins } from "./coins.mjs";
|
|
4
|
+
import { inputs } from "./inputs.mjs";
|
|
5
|
+
import { moveFunctions } from "./functions.mjs";
|
|
6
|
+
import { commands } from "./commands.mjs";
|
|
7
|
+
import { accessLevel } from "./accessLevel.mjs";
|
|
8
|
+
import { coinFlows } from "./coin-flows.mjs";
|
|
9
|
+
import { coinValues } from "./coin-value.mjs";
|
|
10
|
+
|
|
11
|
+
//#region src/transaction-analyzer/rules/index.ts
|
|
12
|
+
const analyzers = {
|
|
13
|
+
accessLevel,
|
|
14
|
+
balanceChanges,
|
|
15
|
+
bytes,
|
|
16
|
+
coinFlows,
|
|
17
|
+
coins,
|
|
18
|
+
coinValues,
|
|
19
|
+
commands,
|
|
20
|
+
data,
|
|
21
|
+
digest,
|
|
22
|
+
transactionResponse,
|
|
23
|
+
gasCoins,
|
|
24
|
+
inputs,
|
|
25
|
+
moveFunctions,
|
|
26
|
+
objectIds,
|
|
27
|
+
objects,
|
|
28
|
+
objectsById,
|
|
29
|
+
ownedObjects
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
export { analyzers };
|
|
34
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/transaction-analyzer/rules/index.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { accessLevel } from './accessLevel.js';\nimport { coinFlows } from './coin-flows.js';\nimport { coinValues } from './coin-value.js';\nimport { coins, gasCoins } from './coins.js';\nimport { commands } from './commands.js';\nimport { balanceChanges, bytes, data, digest, transactionResponse } from './core.js';\nimport { moveFunctions } from './functions.js';\nimport { inputs } from './inputs.js';\nimport { objectIds, objects, objectsById, ownedObjects } from './objects.js';\n\nexport const analyzers = {\n\taccessLevel,\n\tbalanceChanges,\n\tbytes,\n\tcoinFlows,\n\tcoins,\n\tcoinValues,\n\tcommands,\n\tdata,\n\tdigest,\n\ttransactionResponse,\n\tgasCoins,\n\tinputs,\n\tmoveFunctions,\n\tobjectIds,\n\tobjects,\n\tobjectsById,\n\townedObjects,\n};\n"],"mappings":";;;;;;;;;;;AAaA,MAAa,YAAY;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "../analyzer.mjs";
|
|
2
|
+
import { HaneulClientTypes } from "@haneullabs/haneul/client";
|
|
3
|
+
|
|
4
|
+
//#region src/transaction-analyzer/rules/inputs.d.ts
|
|
5
|
+
type AnalyzedCommandInput = {
|
|
6
|
+
$kind: 'Pure';
|
|
7
|
+
index: number;
|
|
8
|
+
bytes: string;
|
|
9
|
+
accessLevel: 'read' | 'mutate' | 'transfer';
|
|
10
|
+
} | {
|
|
11
|
+
$kind: 'Object';
|
|
12
|
+
index: number;
|
|
13
|
+
object: HaneulClientTypes.Object<{
|
|
14
|
+
content: true;
|
|
15
|
+
}>;
|
|
16
|
+
accessLevel: 'read' | 'mutate' | 'transfer';
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { AnalyzedCommandInput };
|
|
20
|
+
//# sourceMappingURL=inputs.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputs.d.mts","names":[],"sources":["../../../src/transaction-analyzer/rules/inputs.ts"],"sourcesContent":[],"mappings":";;;;KAQY,oBAAA;;;EAAA,KAAA,EAAA,MAAA;;;;;UAWD,iBAAA,CAAkB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createAnalyzer } from "../analyzer.mjs";
|
|
2
|
+
import { data } from "./core.mjs";
|
|
3
|
+
import { objectsById } from "./objects.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/transaction-analyzer/rules/inputs.ts
|
|
6
|
+
const inputs = createAnalyzer({
|
|
7
|
+
dependencies: {
|
|
8
|
+
data,
|
|
9
|
+
objectsById
|
|
10
|
+
},
|
|
11
|
+
analyze: () => ({ data: data$1, objectsById: objectsById$1 }) => {
|
|
12
|
+
return { result: data$1.inputs.map((input, index) => {
|
|
13
|
+
switch (input.$kind) {
|
|
14
|
+
case "Pure": return {
|
|
15
|
+
$kind: "Pure",
|
|
16
|
+
index,
|
|
17
|
+
bytes: input.Pure.bytes,
|
|
18
|
+
accessLevel: "transfer"
|
|
19
|
+
};
|
|
20
|
+
case "Object":
|
|
21
|
+
const objectId = input.Object.ImmOrOwnedObject?.objectId ?? input.Object.Receiving?.objectId ?? input.Object.SharedObject?.objectId;
|
|
22
|
+
const object = objectsById$1.get(objectId);
|
|
23
|
+
if (!object) throw new Error(`Missing object for id ${objectId}`);
|
|
24
|
+
return {
|
|
25
|
+
$kind: "Object",
|
|
26
|
+
index,
|
|
27
|
+
object,
|
|
28
|
+
accessLevel: "read"
|
|
29
|
+
};
|
|
30
|
+
default: throw new Error(`Unknown input type: ${JSON.stringify(input)}`);
|
|
31
|
+
}
|
|
32
|
+
}) };
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { inputs };
|
|
38
|
+
//# sourceMappingURL=inputs.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputs.mjs","names":["data","objectsById"],"sources":["../../../src/transaction-analyzer/rules/inputs.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { HaneulClientTypes } from '@haneullabs/haneul/client';\nimport { createAnalyzer } from '../analyzer.js';\nimport { data } from './core.js';\nimport { objectsById } from './objects.js';\n\nexport type AnalyzedCommandInput =\n\t| {\n\t\t\t$kind: 'Pure';\n\t\t\tindex: number;\n\t\t\tbytes: string; // base64 encoded\n\t\t\t// TODO: add parsed value and type\n\t\t\taccessLevel: 'read' | 'mutate' | 'transfer';\n\t }\n\t| {\n\t\t\t$kind: 'Object';\n\t\t\tindex: number;\n\t\t\tobject: HaneulClientTypes.Object<{ content: true }>;\n\t\t\taccessLevel: 'read' | 'mutate' | 'transfer';\n\t };\n\nexport const inputs = createAnalyzer({\n\tdependencies: { data, objectsById },\n\tanalyze:\n\t\t() =>\n\t\t({ data, objectsById }) => {\n\t\t\treturn {\n\t\t\t\tresult: data.inputs.map((input, index): AnalyzedCommandInput => {\n\t\t\t\t\tswitch (input.$kind) {\n\t\t\t\t\t\tcase 'Pure':\n\t\t\t\t\t\t\treturn { $kind: 'Pure', index, bytes: input.Pure.bytes!, accessLevel: 'transfer' };\n\t\t\t\t\t\tcase 'Object':\n\t\t\t\t\t\t\tconst objectId =\n\t\t\t\t\t\t\t\tinput.Object.ImmOrOwnedObject?.objectId ??\n\t\t\t\t\t\t\t\tinput.Object.Receiving?.objectId ??\n\t\t\t\t\t\t\t\tinput.Object.SharedObject?.objectId!;\n\n\t\t\t\t\t\t\tconst object = objectsById.get(objectId)!;\n\t\t\t\t\t\t\tif (!object) {\n\t\t\t\t\t\t\t\tthrow new Error(`Missing object for id ${objectId}`);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn { $kind: 'Object', index, object, accessLevel: 'read' };\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tthrow new Error(`Unknown input type: ${JSON.stringify(input)}`);\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t};\n\t\t},\n});\n"],"mappings":";;;;;AAuBA,MAAa,SAAS,eAAe;CACpC,cAAc;EAAE;EAAM;EAAa;CACnC,gBAEE,EAAE,cAAM,iCAAkB;AAC1B,SAAO,EACN,QAAQA,OAAK,OAAO,KAAK,OAAO,UAAgC;AAC/D,WAAQ,MAAM,OAAd;IACC,KAAK,OACJ,QAAO;KAAE,OAAO;KAAQ;KAAO,OAAO,MAAM,KAAK;KAAQ,aAAa;KAAY;IACnF,KAAK;KACJ,MAAM,WACL,MAAM,OAAO,kBAAkB,YAC/B,MAAM,OAAO,WAAW,YACxB,MAAM,OAAO,cAAc;KAE5B,MAAM,SAASC,cAAY,IAAI,SAAS;AACxC,SAAI,CAAC,OACJ,OAAM,IAAI,MAAM,yBAAyB,WAAW;AAGrD,YAAO;MAAE,OAAO;MAAU;MAAO;MAAQ,aAAa;MAAQ;IAC/D,QACC,OAAM,IAAI,MAAM,uBAAuB,KAAK,UAAU,MAAM,GAAG;;IAEhE,EACF;;CAEH,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "../analyzer.mjs";
|
|
2
|
+
import { HaneulClientTypes } from "@haneullabs/haneul/client";
|
|
3
|
+
|
|
4
|
+
//#region src/transaction-analyzer/rules/objects.d.ts
|
|
5
|
+
type AnalyzedObject = HaneulClientTypes.Object<{
|
|
6
|
+
content: true;
|
|
7
|
+
}> & {
|
|
8
|
+
ownerAddress: string | null;
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { AnalyzedObject };
|
|
12
|
+
//# sourceMappingURL=objects.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objects.d.mts","names":[],"sources":["../../../src/transaction-analyzer/rules/objects.ts"],"sourcesContent":[],"mappings":";;;;KASY,cAAA,GAAiB,iBAAA,CAAkB;;;EAAnC,YAAA,EAAA,MAAc,GAAA,IAAA"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { createAnalyzer } from "../analyzer.mjs";
|
|
2
|
+
import { data } from "./core.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/transaction-analyzer/rules/objects.ts
|
|
5
|
+
const objectIds = createAnalyzer({
|
|
6
|
+
dependencies: { data },
|
|
7
|
+
analyze: () => ({ data: data$1 }) => {
|
|
8
|
+
const issues = [];
|
|
9
|
+
const inputs = data$1.inputs.filter((input) => {
|
|
10
|
+
switch (input.$kind) {
|
|
11
|
+
case "UnresolvedObject":
|
|
12
|
+
case "UnresolvedPure":
|
|
13
|
+
issues.push({ message: `Unexpected unresolved input: ${JSON.stringify(input)}` });
|
|
14
|
+
return false;
|
|
15
|
+
case "Pure": return false;
|
|
16
|
+
case "Object": return true;
|
|
17
|
+
default:
|
|
18
|
+
issues.push({ message: `Unknown input type: ${JSON.stringify(input)}` });
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
}).map((input) => {
|
|
22
|
+
switch (input.Object.$kind) {
|
|
23
|
+
case "ImmOrOwnedObject": return input.Object.ImmOrOwnedObject.objectId;
|
|
24
|
+
case "SharedObject": return input.Object.SharedObject.objectId;
|
|
25
|
+
case "Receiving": return input.Object.Receiving.objectId;
|
|
26
|
+
default: throw new Error(`Unknown object type: ${JSON.stringify(input)}`);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
if (issues.length) return { issues };
|
|
30
|
+
const gasObjects = data$1.gasData.payment?.map((obj) => obj.objectId) || [];
|
|
31
|
+
return { result: Array.from(new Set([...inputs, ...gasObjects])) };
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const objects = createAnalyzer({
|
|
35
|
+
cacheKey: "objects@1.0.0",
|
|
36
|
+
dependencies: { objectIds },
|
|
37
|
+
analyze: ({ client }) => async ({ objectIds: objectIds$1 }) => {
|
|
38
|
+
const { objects: objects$1 } = await client.core.getObjects({
|
|
39
|
+
objectIds: objectIds$1,
|
|
40
|
+
include: { content: true }
|
|
41
|
+
});
|
|
42
|
+
const issues = [];
|
|
43
|
+
const result = objects$1.filter((obj) => {
|
|
44
|
+
if (obj instanceof Error) {
|
|
45
|
+
issues.push({
|
|
46
|
+
message: `Failed to fetch object: ${obj.message}`,
|
|
47
|
+
error: obj
|
|
48
|
+
});
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
return true;
|
|
52
|
+
}).map((obj) => {
|
|
53
|
+
let ownerAddress = null;
|
|
54
|
+
switch (obj.owner.$kind) {
|
|
55
|
+
case "AddressOwner":
|
|
56
|
+
ownerAddress = obj.owner.AddressOwner;
|
|
57
|
+
break;
|
|
58
|
+
case "ObjectOwner":
|
|
59
|
+
ownerAddress = obj.owner.ObjectOwner;
|
|
60
|
+
break;
|
|
61
|
+
case "ConsensusAddressOwner":
|
|
62
|
+
ownerAddress = obj.owner.ConsensusAddressOwner.owner;
|
|
63
|
+
break;
|
|
64
|
+
case "Shared":
|
|
65
|
+
case "Immutable":
|
|
66
|
+
ownerAddress = null;
|
|
67
|
+
break;
|
|
68
|
+
default: issues.push({ message: `Unknown owner type: ${JSON.stringify(obj.owner)}` });
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
...obj,
|
|
72
|
+
ownerAddress
|
|
73
|
+
};
|
|
74
|
+
});
|
|
75
|
+
if (issues.length) return { issues };
|
|
76
|
+
return { result };
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
const ownedObjects = createAnalyzer({
|
|
80
|
+
dependencies: { objects },
|
|
81
|
+
analyze: () => ({ objects: objects$1 }) => {
|
|
82
|
+
return { result: objects$1.filter((obj) => obj.ownerAddress !== null) };
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
const objectsById = createAnalyzer({
|
|
86
|
+
dependencies: { objects },
|
|
87
|
+
analyze: () => ({ objects: objects$1 }) => ({ result: new Map(objects$1.map((obj) => [obj.objectId, obj])) })
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
//#endregion
|
|
91
|
+
export { objectIds, objects, objectsById, ownedObjects };
|
|
92
|
+
//# sourceMappingURL=objects.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objects.mjs","names":["data","objects"],"sources":["../../../src/transaction-analyzer/rules/objects.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ClientWithCoreApi, HaneulClientTypes } from '@haneullabs/haneul/client';\nimport { createAnalyzer } from '../analyzer.js';\nimport type { TransactionAnalysisIssue } from '../analyzer.js';\n\nimport { data } from './core.js';\n\nexport type AnalyzedObject = HaneulClientTypes.Object<{\n\tcontent: true;\n}> & {\n\townerAddress: string | null;\n};\n\nexport const objectIds = createAnalyzer({\n\tdependencies: { data },\n\tanalyze:\n\t\t() =>\n\t\t({ data }) => {\n\t\t\tconst issues: TransactionAnalysisIssue[] = [];\n\n\t\t\tconst inputs = data.inputs\n\t\t\t\t.filter((input): input is Extract<typeof input, { $kind: 'Object' }> => {\n\t\t\t\t\tswitch (input.$kind) {\n\t\t\t\t\t\tcase 'UnresolvedObject':\n\t\t\t\t\t\tcase 'UnresolvedPure':\n\t\t\t\t\t\t\tissues.push({ message: `Unexpected unresolved input: ${JSON.stringify(input)}` });\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\tcase 'Pure':\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\tcase 'Object':\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tissues.push({ message: `Unknown input type: ${JSON.stringify(input)}` });\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.map((input) => {\n\t\t\t\t\tswitch (input.Object.$kind) {\n\t\t\t\t\t\tcase 'ImmOrOwnedObject':\n\t\t\t\t\t\t\treturn input.Object.ImmOrOwnedObject.objectId;\n\t\t\t\t\t\tcase 'SharedObject':\n\t\t\t\t\t\t\treturn input.Object.SharedObject.objectId;\n\t\t\t\t\t\tcase 'Receiving':\n\t\t\t\t\t\t\treturn input.Object.Receiving.objectId;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tthrow new Error(`Unknown object type: ${JSON.stringify(input)}`);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\tif (issues.length) {\n\t\t\t\treturn { issues };\n\t\t\t}\n\n\t\t\tconst gasObjects = data.gasData.payment?.map((obj) => obj.objectId) || [];\n\n\t\t\treturn {\n\t\t\t\tresult: Array.from(new Set([...inputs, ...gasObjects])),\n\t\t\t};\n\t\t},\n});\n\nexport const objects = createAnalyzer({\n\tcacheKey: 'objects@1.0.0',\n\tdependencies: { objectIds },\n\tanalyze:\n\t\t({ client }: { client: ClientWithCoreApi }) =>\n\t\tasync ({ objectIds }) => {\n\t\t\tconst { objects } = await client.core.getObjects({\n\t\t\t\tobjectIds,\n\t\t\t\tinclude: {\n\t\t\t\t\tcontent: true,\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tconst issues: TransactionAnalysisIssue[] = [];\n\n\t\t\tconst foundObjects = objects.filter(\n\t\t\t\t(\n\t\t\t\t\tobj,\n\t\t\t\t): obj is HaneulClientTypes.Object<{\n\t\t\t\t\tcontent: true;\n\t\t\t\t}> => {\n\t\t\t\t\tif (obj instanceof Error) {\n\t\t\t\t\t\tissues.push({ message: `Failed to fetch object: ${obj.message}`, error: obj });\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn true;\n\t\t\t\t},\n\t\t\t);\n\n\t\t\tconst result = foundObjects.map((obj) => {\n\t\t\t\tlet ownerAddress: string | null = null;\n\t\t\t\tswitch (obj.owner.$kind) {\n\t\t\t\t\tcase 'AddressOwner':\n\t\t\t\t\t\townerAddress = obj.owner.AddressOwner;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'ObjectOwner':\n\t\t\t\t\t\townerAddress = obj.owner.ObjectOwner;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'ConsensusAddressOwner':\n\t\t\t\t\t\townerAddress = obj.owner.ConsensusAddressOwner.owner;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'Shared':\n\t\t\t\t\tcase 'Immutable':\n\t\t\t\t\t\townerAddress = null;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tissues.push({ message: `Unknown owner type: ${JSON.stringify(obj.owner)}` });\n\t\t\t\t}\n\n\t\t\t\treturn { ...obj, ownerAddress };\n\t\t\t});\n\n\t\t\tif (issues.length) {\n\t\t\t\treturn { issues };\n\t\t\t}\n\n\t\t\treturn { result };\n\t\t},\n});\n\nexport const ownedObjects = createAnalyzer({\n\tdependencies: { objects },\n\tanalyze:\n\t\t() =>\n\t\t({ objects }) => {\n\t\t\treturn { result: objects.filter((obj) => obj.ownerAddress !== null) };\n\t\t},\n});\n\nexport const objectsById = createAnalyzer({\n\tdependencies: { objects },\n\tanalyze:\n\t\t() =>\n\t\t({ objects }) => ({\n\t\t\tresult: new Map(objects.map((obj) => [obj.objectId, obj])),\n\t\t}),\n});\n"],"mappings":";;;;AAeA,MAAa,YAAY,eAAe;CACvC,cAAc,EAAE,MAAM;CACtB,gBAEE,EAAE,mBAAW;EACb,MAAM,SAAqC,EAAE;EAE7C,MAAM,SAASA,OAAK,OAClB,QAAQ,UAA+D;AACvE,WAAQ,MAAM,OAAd;IACC,KAAK;IACL,KAAK;AACJ,YAAO,KAAK,EAAE,SAAS,gCAAgC,KAAK,UAAU,MAAM,IAAI,CAAC;AACjF,YAAO;IACR,KAAK,OACJ,QAAO;IACR,KAAK,SACJ,QAAO;IACR;AACC,YAAO,KAAK,EAAE,SAAS,uBAAuB,KAAK,UAAU,MAAM,IAAI,CAAC;AACxE,YAAO;;IAER,CACD,KAAK,UAAU;AACf,WAAQ,MAAM,OAAO,OAArB;IACC,KAAK,mBACJ,QAAO,MAAM,OAAO,iBAAiB;IACtC,KAAK,eACJ,QAAO,MAAM,OAAO,aAAa;IAClC,KAAK,YACJ,QAAO,MAAM,OAAO,UAAU;IAC/B,QACC,OAAM,IAAI,MAAM,wBAAwB,KAAK,UAAU,MAAM,GAAG;;IAEjE;AAEH,MAAI,OAAO,OACV,QAAO,EAAE,QAAQ;EAGlB,MAAM,aAAaA,OAAK,QAAQ,SAAS,KAAK,QAAQ,IAAI,SAAS,IAAI,EAAE;AAEzE,SAAO,EACN,QAAQ,MAAM,KAAK,IAAI,IAAI,CAAC,GAAG,QAAQ,GAAG,WAAW,CAAC,CAAC,EACvD;;CAEH,CAAC;AAEF,MAAa,UAAU,eAAe;CACrC,UAAU;CACV,cAAc,EAAE,WAAW;CAC3B,UACE,EAAE,aACH,OAAO,EAAE,6BAAgB;EACxB,MAAM,EAAE,uBAAY,MAAM,OAAO,KAAK,WAAW;GAChD;GACA,SAAS,EACR,SAAS,MACT;GACD,CAAC;EAEF,MAAM,SAAqC,EAAE;EAiB7C,MAAM,SAfeC,UAAQ,QAE3B,QAGK;AACL,OAAI,eAAe,OAAO;AACzB,WAAO,KAAK;KAAE,SAAS,2BAA2B,IAAI;KAAW,OAAO;KAAK,CAAC;AAC9E,WAAO;;AAGR,UAAO;IAER,CAE2B,KAAK,QAAQ;GACxC,IAAI,eAA8B;AAClC,WAAQ,IAAI,MAAM,OAAlB;IACC,KAAK;AACJ,oBAAe,IAAI,MAAM;AACzB;IACD,KAAK;AACJ,oBAAe,IAAI,MAAM;AACzB;IACD,KAAK;AACJ,oBAAe,IAAI,MAAM,sBAAsB;AAC/C;IACD,KAAK;IACL,KAAK;AACJ,oBAAe;AACf;IACD,QACC,QAAO,KAAK,EAAE,SAAS,uBAAuB,KAAK,UAAU,IAAI,MAAM,IAAI,CAAC;;AAG9E,UAAO;IAAE,GAAG;IAAK;IAAc;IAC9B;AAEF,MAAI,OAAO,OACV,QAAO,EAAE,QAAQ;AAGlB,SAAO,EAAE,QAAQ;;CAEnB,CAAC;AAEF,MAAa,eAAe,eAAe;CAC1C,cAAc,EAAE,SAAS;CACzB,gBAEE,EAAE,yBAAc;AAChB,SAAO,EAAE,QAAQA,UAAQ,QAAQ,QAAQ,IAAI,iBAAiB,KAAK,EAAE;;CAEvE,CAAC;AAEF,MAAa,cAAc,eAAe;CACzC,cAAc,EAAE,SAAS;CACzB,gBAEE,EAAE,0BAAe,EACjB,QAAQ,IAAI,IAAIA,UAAQ,KAAK,QAAQ,CAAC,IAAI,UAAU,IAAI,CAAC,CAAC,EAC1D;CACF,CAAC"}
|
package/dist/util.d.mts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/util.d.ts
|
|
2
|
+
type Defined = {} | null;
|
|
3
|
+
type Simplify<T> = { [K in keyof T]: T[K] } & {};
|
|
4
|
+
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { Defined, Simplify, UnionToIntersection };
|
|
7
|
+
//# sourceMappingURL=util.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.mts","names":[],"sources":["../src/util.ts"],"sourcesContent":[],"mappings":";KAGY,OAAA;AAAA,KACA,QADO,CAAA,CAAA,CAAA,GAAA,QACP,MAA4B,CAApB,GAAwB,CAAxB,CAA0B,CAA1B,CAAA,EAAoB,GAAA,CAAA,CAAA;AAAI,KAChC,mBADgC,CAAA,CAAA,CAAA,GAAA,CACN,CADM,SAAA,GAAA,GAAA,CAAA,CAAA,EACc,CADd,EAAA,GAAA,IAAA,GAAA,KAAA,CAAA,UAAA,CAAA,CAAA,EAAA,KAAA,EAAA,EAAA,GAAA,IAAA,IAAA,CAAA,GAAA,KAAA"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haneullabs/wallet-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"private": false,
|
|
5
|
-
"description": "Utilities for building
|
|
5
|
+
"description": "Utilities for building Haneul wallets",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
|
-
"author": "Haneul Labs <build@
|
|
8
|
-
"type": "
|
|
9
|
-
"main": "./dist/
|
|
10
|
-
"
|
|
11
|
-
"types": "./dist/cjs/index.d.ts",
|
|
7
|
+
"author": "Haneul Labs <build@haneul-labs.com>",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"main": "./dist/index.mjs",
|
|
10
|
+
"types": "./dist/index.d.mts",
|
|
12
11
|
"exports": {
|
|
13
12
|
".": {
|
|
14
|
-
"
|
|
15
|
-
"
|
|
13
|
+
"types": "./dist/index.d.mts",
|
|
14
|
+
"import": "./dist/index.mjs",
|
|
15
|
+
"default": "./dist/index.mjs"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"sideEffects": false,
|
|
@@ -22,38 +22,40 @@
|
|
|
22
22
|
],
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
25
|
-
"url": "git+https://github.com/GeunhwaJeong/
|
|
25
|
+
"url": "git+https://github.com/GeunhwaJeong/ts-sdks.git"
|
|
26
26
|
},
|
|
27
27
|
"bugs": {
|
|
28
|
-
"url": "https://github.com/
|
|
28
|
+
"url": "https://github.com/mystenlabs/ts-sdks/issues"
|
|
29
29
|
},
|
|
30
|
-
"homepage": "https://github.com/GeunhwaJeong/
|
|
30
|
+
"homepage": "https://github.com/GeunhwaJeong/ts-sdks/packages/wallet-sdk#readme",
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@types/node": "^
|
|
33
|
-
"msw": "^2.12.
|
|
32
|
+
"@types/node": "^25.0.8",
|
|
33
|
+
"msw": "^2.12.7",
|
|
34
34
|
"typescript": "^5.9.3",
|
|
35
|
-
"vitest": "^4.0.
|
|
36
|
-
"@haneullabs/dapp-kit-react": "
|
|
37
|
-
"@haneullabs/
|
|
35
|
+
"vitest": "^4.0.17",
|
|
36
|
+
"@haneullabs/dapp-kit-react": "^1.0.2",
|
|
37
|
+
"@haneullabs/haneul": "^2.4.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"valibot": "^1.2.0",
|
|
41
|
-
"@haneullabs/
|
|
42
|
-
"@haneullabs/wallet-standard": "0.1
|
|
43
|
-
|
|
41
|
+
"@haneullabs/bcs": "^2.0.2",
|
|
42
|
+
"@haneullabs/wallet-standard": "^0.20.1"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"@haneullabs/haneul": "*"
|
|
44
46
|
},
|
|
45
47
|
"scripts": {
|
|
46
48
|
"clean": "rm -rf tsconfig.tsbuildinfo ./dist",
|
|
47
|
-
"build": "
|
|
49
|
+
"build": "rm -rf dist && tsc --noEmit && tsdown",
|
|
48
50
|
"vitest": "vitest",
|
|
49
51
|
"test": "pnpm test:typecheck && pnpm test:unit",
|
|
50
52
|
"test:typecheck": "tsc -p ./test",
|
|
51
53
|
"test:unit": "vitest run",
|
|
52
54
|
"prettier:check": "prettier -c --ignore-unknown .",
|
|
53
55
|
"prettier:fix": "prettier -w --ignore-unknown .",
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"lint": "pnpm run
|
|
57
|
-
"lint:fix": "pnpm run
|
|
56
|
+
"oxlint:check": "oxlint .",
|
|
57
|
+
"oxlint:fix": "oxlint --fix",
|
|
58
|
+
"lint": "pnpm run oxlint:check && pnpm run prettier:check",
|
|
59
|
+
"lint:fix": "pnpm run oxlint:fix && pnpm run prettier:fix"
|
|
58
60
|
}
|
|
59
61
|
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import type { Analyzer, AnalyzerResult } from '../transaction-analyzer/analyzer.js';
|
|
2
|
-
export declare const autoApprovalAnalyzer: Analyzer<{
|
|
3
|
-
operationType: string | null;
|
|
4
|
-
bytes: Uint8Array<ArrayBufferLike>;
|
|
5
|
-
coinFlows: {
|
|
6
|
-
outflows: import("../transaction-analyzer/index.js").CoinFlow[];
|
|
7
|
-
};
|
|
8
|
-
accessLevel: Record<string, "read" | "mutate" | "transfer">;
|
|
9
|
-
ownedObjects: {
|
|
10
|
-
ownerAddress: string | null;
|
|
11
|
-
id: string;
|
|
12
|
-
version: string;
|
|
13
|
-
digest: string;
|
|
14
|
-
owner: import("@haneullabs/haneul/dist/cjs/experimental/types.js").Experimental_HaneulClientTypes.ObjectOwner;
|
|
15
|
-
type: string;
|
|
16
|
-
content: PromiseLike<Uint8Array>;
|
|
17
|
-
previousTransaction: string | null;
|
|
18
|
-
}[];
|
|
19
|
-
digest: string;
|
|
20
|
-
coinValues: {
|
|
21
|
-
total: number;
|
|
22
|
-
coinTypesWithoutPrice: string[];
|
|
23
|
-
coinTypes: {
|
|
24
|
-
coinType: string;
|
|
25
|
-
decimals: number;
|
|
26
|
-
price: number;
|
|
27
|
-
amount: bigint;
|
|
28
|
-
convertedAmount: number;
|
|
29
|
-
}[];
|
|
30
|
-
};
|
|
31
|
-
}, {
|
|
32
|
-
client: import("@haneullabs/haneul/dist/cjs/experimental/client.js").Experimental_BaseClient & {
|
|
33
|
-
core: import("@haneullabs/haneul/dist/cjs/experimental/core.js").Experimental_CoreClient;
|
|
34
|
-
};
|
|
35
|
-
getCoinPrices: (coinTypes: string[]) => Promise<{
|
|
36
|
-
coinType: string;
|
|
37
|
-
decimals: number;
|
|
38
|
-
price: number | null;
|
|
39
|
-
}[]>;
|
|
40
|
-
}, {
|
|
41
|
-
operationType: string | null;
|
|
42
|
-
bytes: Uint8Array<ArrayBufferLike>;
|
|
43
|
-
coinFlows: {
|
|
44
|
-
outflows: import("../transaction-analyzer/index.js").CoinFlow[];
|
|
45
|
-
};
|
|
46
|
-
coinValues: {
|
|
47
|
-
total: number;
|
|
48
|
-
coinTypesWithoutPrice: string[];
|
|
49
|
-
coinTypes: {
|
|
50
|
-
coinType: string;
|
|
51
|
-
decimals: number;
|
|
52
|
-
price: number;
|
|
53
|
-
amount: bigint;
|
|
54
|
-
convertedAmount: number;
|
|
55
|
-
}[];
|
|
56
|
-
};
|
|
57
|
-
accessLevel: Record<string, "read" | "mutate" | "transfer">;
|
|
58
|
-
ownedObjects: {
|
|
59
|
-
ownerAddress: string | null;
|
|
60
|
-
id: string;
|
|
61
|
-
version: string;
|
|
62
|
-
digest: string;
|
|
63
|
-
owner: import("@haneullabs/haneul/dist/cjs/experimental/types.js").Experimental_HaneulClientTypes.ObjectOwner;
|
|
64
|
-
type: string;
|
|
65
|
-
content: PromiseLike<Uint8Array>;
|
|
66
|
-
previousTransaction: string | null;
|
|
67
|
-
}[];
|
|
68
|
-
digest: string;
|
|
69
|
-
}>;
|
|
70
|
-
export type AutoApprovalAnalysis = typeof autoApprovalAnalyzer extends Analyzer<infer R, any, any> ? R : never;
|
|
71
|
-
export type AutoApprovalResult = AnalyzerResult<AutoApprovalAnalysis>;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var analyzer_exports = {};
|
|
20
|
-
__export(analyzer_exports, {
|
|
21
|
-
autoApprovalAnalyzer: () => autoApprovalAnalyzer
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(analyzer_exports);
|
|
24
|
-
var import_transaction_analyzer = require("../transaction-analyzer/index.js");
|
|
25
|
-
var import_transaction_analyzer2 = require("../transaction-analyzer/index.js");
|
|
26
|
-
var import_intent = require("./intent.js");
|
|
27
|
-
const operationType = (0, import_transaction_analyzer.createAnalyzer)({
|
|
28
|
-
dependencies: {
|
|
29
|
-
bytes: import_transaction_analyzer2.analyzers.bytes
|
|
30
|
-
},
|
|
31
|
-
analyze: (_options, tx) => {
|
|
32
|
-
let operationType2 = null;
|
|
33
|
-
tx.addIntentResolver(
|
|
34
|
-
import_intent.OPERATION_INTENT,
|
|
35
|
-
(0, import_intent.extractOperationType)((type) => {
|
|
36
|
-
operationType2 = type;
|
|
37
|
-
})
|
|
38
|
-
);
|
|
39
|
-
return async () => {
|
|
40
|
-
return {
|
|
41
|
-
result: operationType2
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
const autoApprovalAnalyzer = (0, import_transaction_analyzer.createAnalyzer)({
|
|
47
|
-
dependencies: {
|
|
48
|
-
operationType,
|
|
49
|
-
bytes: import_transaction_analyzer2.analyzers.bytes,
|
|
50
|
-
coinFlows: import_transaction_analyzer2.analyzers.coinFlows,
|
|
51
|
-
coinValues: import_transaction_analyzer2.analyzers.coinValues,
|
|
52
|
-
accessLevel: import_transaction_analyzer2.analyzers.accessLevel,
|
|
53
|
-
ownedObjects: import_transaction_analyzer2.analyzers.ownedObjects,
|
|
54
|
-
digest: import_transaction_analyzer2.analyzers.digest
|
|
55
|
-
},
|
|
56
|
-
analyze: () => async ({ bytes, coinFlows, accessLevel, ownedObjects, digest, operationType: operationType2, coinValues }) => {
|
|
57
|
-
return {
|
|
58
|
-
result: {
|
|
59
|
-
operationType: operationType2,
|
|
60
|
-
bytes,
|
|
61
|
-
coinFlows,
|
|
62
|
-
accessLevel,
|
|
63
|
-
ownedObjects,
|
|
64
|
-
digest,
|
|
65
|
-
coinValues
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
//# sourceMappingURL=analyzer.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/auto-approvals/analyzer.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { Analyzer, AnalyzerResult } from '../transaction-analyzer/analyzer.js';\nimport { createAnalyzer } from '../transaction-analyzer/index.js';\nimport { analyzers } from '../transaction-analyzer/index.js';\nimport { extractOperationType, OPERATION_INTENT } from './intent.js';\n\nconst operationType = createAnalyzer({\n\tdependencies: {\n\t\tbytes: analyzers.bytes,\n\t},\n\tanalyze: (_options, tx) => {\n\t\tlet operationType: string | null = null;\n\t\ttx.addIntentResolver(\n\t\t\tOPERATION_INTENT,\n\t\t\textractOperationType((type) => {\n\t\t\t\toperationType = type;\n\t\t\t}),\n\t\t);\n\n\t\treturn async () => {\n\t\t\treturn {\n\t\t\t\tresult: operationType,\n\t\t\t};\n\t\t};\n\t},\n});\n\nexport const autoApprovalAnalyzer = createAnalyzer({\n\tdependencies: {\n\t\toperationType,\n\t\tbytes: analyzers.bytes,\n\t\tcoinFlows: analyzers.coinFlows,\n\t\tcoinValues: analyzers.coinValues,\n\t\taccessLevel: analyzers.accessLevel,\n\t\townedObjects: analyzers.ownedObjects,\n\t\tdigest: analyzers.digest,\n\t},\n\tanalyze:\n\t\t() =>\n\t\tasync ({ bytes, coinFlows, accessLevel, ownedObjects, digest, operationType, coinValues }) => {\n\t\t\treturn {\n\t\t\t\tresult: {\n\t\t\t\t\toperationType,\n\t\t\t\t\tbytes,\n\t\t\t\t\tcoinFlows,\n\t\t\t\t\taccessLevel,\n\t\t\t\t\townedObjects,\n\t\t\t\t\tdigest,\n\t\t\t\t\tcoinValues,\n\t\t\t\t},\n\t\t\t};\n\t\t},\n});\n\nexport type AutoApprovalAnalysis =\n\ttypeof autoApprovalAnalyzer extends Analyzer<infer R, any, any> ? R : never;\nexport type AutoApprovalResult = AnalyzerResult<AutoApprovalAnalysis>;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,kCAA+B;AAC/B,IAAAA,+BAA0B;AAC1B,oBAAuD;AAEvD,MAAM,oBAAgB,4CAAe;AAAA,EACpC,cAAc;AAAA,IACb,OAAO,uCAAU;AAAA,EAClB;AAAA,EACA,SAAS,CAAC,UAAU,OAAO;AAC1B,QAAIC,iBAA+B;AACnC,OAAG;AAAA,MACF;AAAA,UACA,oCAAqB,CAAC,SAAS;AAC9B,QAAAA,iBAAgB;AAAA,MACjB,CAAC;AAAA,IACF;AAEA,WAAO,YAAY;AAClB,aAAO;AAAA,QACN,QAAQA;AAAA,MACT;AAAA,IACD;AAAA,EACD;AACD,CAAC;AAEM,MAAM,2BAAuB,4CAAe;AAAA,EAClD,cAAc;AAAA,IACb;AAAA,IACA,OAAO,uCAAU;AAAA,IACjB,WAAW,uCAAU;AAAA,IACrB,YAAY,uCAAU;AAAA,IACtB,aAAa,uCAAU;AAAA,IACvB,cAAc,uCAAU;AAAA,IACxB,QAAQ,uCAAU;AAAA,EACnB;AAAA,EACA,SACC,MACA,OAAO,EAAE,OAAO,WAAW,aAAa,cAAc,QAAQ,eAAAA,gBAAe,WAAW,MAAM;AAC7F,WAAO;AAAA,MACN,QAAQ;AAAA,QACP,eAAAA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACF,CAAC;",
|
|
6
|
-
"names": ["import_transaction_analyzer", "operationType"]
|
|
7
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { operationType, extractOperationType, OPERATION_INTENT } from './intent.js';
|
|
2
|
-
export { autoApprovalAnalyzer } from './analyzer.js';
|
|
3
|
-
export type { AutoApprovalResult, AutoApprovalAnalysis } from './analyzer.js';
|
|
4
|
-
export { AutoApprovalManager } from './manager.js';
|
|
5
|
-
export type { AutoApprovalIssue, AutoApprovalCheck } from './manager.js';
|
|
6
|
-
export * from './schemas/index.js';
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
var auto_approvals_exports = {};
|
|
21
|
-
__export(auto_approvals_exports, {
|
|
22
|
-
AutoApprovalManager: () => import_manager.AutoApprovalManager,
|
|
23
|
-
OPERATION_INTENT: () => import_intent.OPERATION_INTENT,
|
|
24
|
-
autoApprovalAnalyzer: () => import_analyzer.autoApprovalAnalyzer,
|
|
25
|
-
extractOperationType: () => import_intent.extractOperationType,
|
|
26
|
-
operationType: () => import_intent.operationType
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(auto_approvals_exports);
|
|
29
|
-
var import_intent = require("./intent.js");
|
|
30
|
-
var import_analyzer = require("./analyzer.js");
|
|
31
|
-
var import_manager = require("./manager.js");
|
|
32
|
-
__reExport(auto_approvals_exports, require("./schemas/index.js"), module.exports);
|
|
33
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/auto-approvals/index.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nexport { operationType, extractOperationType, OPERATION_INTENT } from './intent.js';\nexport { autoApprovalAnalyzer } from './analyzer.js';\nexport type { AutoApprovalResult, AutoApprovalAnalysis } from './analyzer.js';\n\nexport { AutoApprovalManager } from './manager.js';\nexport type { AutoApprovalIssue, AutoApprovalCheck } from './manager.js';\n\nexport * from './schemas/index.js';\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAsE;AACtE,sBAAqC;AAGrC,qBAAoC;AAGpC,mCAAc,+BAVd;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { Transaction, TransactionResult } from '@haneullabs/haneul/transactions';
|
|
2
|
-
import type { TransactionDataBuilder } from '@haneullabs/haneul/transactions';
|
|
3
|
-
export declare const OPERATION_INTENT = "@haneullabs/wallet-kit/AutoApprovalOperation";
|
|
4
|
-
export declare function operationType(operationType: string): (tx: Transaction) => TransactionResult;
|
|
5
|
-
export declare function extractOperationType(cb: (operationType: string) => void): (transactionData: TransactionDataBuilder, _options: unknown, next: () => Promise<void>) => Promise<void>;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var intent_exports = {};
|
|
20
|
-
__export(intent_exports, {
|
|
21
|
-
OPERATION_INTENT: () => OPERATION_INTENT,
|
|
22
|
-
extractOperationType: () => extractOperationType,
|
|
23
|
-
operationType: () => operationType
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(intent_exports);
|
|
26
|
-
var import_transactions = require("@haneullabs/haneul/transactions");
|
|
27
|
-
const OPERATION_INTENT = "@haneullabs/wallet-kit/AutoApprovalOperation";
|
|
28
|
-
function operationType(operationType2) {
|
|
29
|
-
return (tx) => {
|
|
30
|
-
tx.addIntentResolver(OPERATION_INTENT, (transactionData, _options, next) => {
|
|
31
|
-
replaceOperationTypeIntent(transactionData);
|
|
32
|
-
return next();
|
|
33
|
-
});
|
|
34
|
-
const result = tx.add(
|
|
35
|
-
import_transactions.Commands.Intent({
|
|
36
|
-
name: OPERATION_INTENT,
|
|
37
|
-
inputs: {},
|
|
38
|
-
data: { operationType: operationType2 }
|
|
39
|
-
})
|
|
40
|
-
);
|
|
41
|
-
return result;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
function extractOperationType(cb) {
|
|
45
|
-
return (transactionData, _options, next) => {
|
|
46
|
-
replaceOperationTypeIntent(transactionData, cb);
|
|
47
|
-
return next();
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
function replaceOperationTypeIntent(transactionData, cb) {
|
|
51
|
-
let intentFound = false;
|
|
52
|
-
for (let index = 0; index < transactionData.commands.length; index++) {
|
|
53
|
-
const command = transactionData.commands[index];
|
|
54
|
-
if (command.$kind === "$Intent" && command.$Intent.name === OPERATION_INTENT) {
|
|
55
|
-
if (intentFound) {
|
|
56
|
-
throw new Error("Multiple operation type intents found in transaction");
|
|
57
|
-
}
|
|
58
|
-
intentFound = true;
|
|
59
|
-
const operationType2 = command.$Intent.data.operationType;
|
|
60
|
-
transactionData.replaceCommand(index, []);
|
|
61
|
-
cb?.(operationType2);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
//# sourceMappingURL=intent.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/auto-approvals/intent.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { Transaction, TransactionResult } from '@haneullabs/haneul/transactions';\nimport type { TransactionDataBuilder } from '@haneullabs/haneul/transactions';\nimport { Commands } from '@haneullabs/haneul/transactions';\n\nexport const OPERATION_INTENT = '@haneullabs/wallet-kit/AutoApprovalOperation';\n\nexport function operationType(operationType: string) {\n\treturn (tx: Transaction): TransactionResult => {\n\t\ttx.addIntentResolver(OPERATION_INTENT, (transactionData, _options, next) => {\n\t\t\treplaceOperationTypeIntent(transactionData);\n\t\t\treturn next();\n\t\t});\n\n\t\tconst result = tx.add(\n\t\t\tCommands.Intent({\n\t\t\t\tname: OPERATION_INTENT,\n\t\t\t\tinputs: {},\n\t\t\t\tdata: { operationType },\n\t\t\t}),\n\t\t);\n\n\t\treturn result;\n\t};\n}\n\nexport function extractOperationType(cb: (operationType: string) => void) {\n\treturn (\n\t\ttransactionData: TransactionDataBuilder,\n\t\t_options: unknown,\n\t\tnext: () => Promise<void>,\n\t) => {\n\t\treplaceOperationTypeIntent(transactionData, cb);\n\t\treturn next();\n\t};\n}\n\nfunction replaceOperationTypeIntent(\n\ttransactionData: TransactionDataBuilder,\n\tcb?: (operationType: string) => void,\n) {\n\tlet intentFound = false;\n\tfor (let index = 0; index < transactionData.commands.length; index++) {\n\t\tconst command = transactionData.commands[index];\n\t\tif (command.$kind === '$Intent' && command.$Intent.name === OPERATION_INTENT) {\n\t\t\tif (intentFound) {\n\t\t\t\tthrow new Error('Multiple operation type intents found in transaction');\n\t\t\t}\n\t\t\tintentFound = true;\n\t\t\tconst operationType = command.$Intent.data.operationType as string;\n\t\t\ttransactionData.replaceCommand(index, []);\n\t\t\tcb?.(operationType);\n\t\t}\n\t}\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,0BAAyB;AAElB,MAAM,mBAAmB;AAEzB,SAAS,cAAcA,gBAAuB;AACpD,SAAO,CAAC,OAAuC;AAC9C,OAAG,kBAAkB,kBAAkB,CAAC,iBAAiB,UAAU,SAAS;AAC3E,iCAA2B,eAAe;AAC1C,aAAO,KAAK;AAAA,IACb,CAAC;AAED,UAAM,SAAS,GAAG;AAAA,MACjB,6BAAS,OAAO;AAAA,QACf,MAAM;AAAA,QACN,QAAQ,CAAC;AAAA,QACT,MAAM,EAAE,eAAAA,eAAc;AAAA,MACvB,CAAC;AAAA,IACF;AAEA,WAAO;AAAA,EACR;AACD;AAEO,SAAS,qBAAqB,IAAqC;AACzE,SAAO,CACN,iBACA,UACA,SACI;AACJ,+BAA2B,iBAAiB,EAAE;AAC9C,WAAO,KAAK;AAAA,EACb;AACD;AAEA,SAAS,2BACR,iBACA,IACC;AACD,MAAI,cAAc;AAClB,WAAS,QAAQ,GAAG,QAAQ,gBAAgB,SAAS,QAAQ,SAAS;AACrE,UAAM,UAAU,gBAAgB,SAAS,KAAK;AAC9C,QAAI,QAAQ,UAAU,aAAa,QAAQ,QAAQ,SAAS,kBAAkB;AAC7E,UAAI,aAAa;AAChB,cAAM,IAAI,MAAM,sDAAsD;AAAA,MACvE;AACA,oBAAc;AACd,YAAMA,iBAAgB,QAAQ,QAAQ,KAAK;AAC3C,sBAAgB,eAAe,OAAO,CAAC,CAAC;AACxC,WAAKA,cAAa;AAAA,IACnB;AAAA,EACD;AACD;",
|
|
6
|
-
"names": ["operationType"]
|
|
7
|
-
}
|