@steerprotocol/app-loader 3.0.5 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -0
- package/lib/browser.d.ts +5 -2
- package/lib/browser.mjs +253 -73
- package/lib/browser.mjs.map +1 -1
- package/lib/index.cjs +3693 -108
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +5 -2
- package/lib/index.mjs +3693 -108
- package/lib/index.mjs.map +1 -1
- package/lib/internal/asyncHostCalls.d.ts +37 -0
- package/lib/internal/instantiate.d.ts +3 -4
- package/lib/internal/loadOptions.d.ts +1 -0
- package/lib/internal/panoptic/deps.d.ts +24 -0
- package/lib/internal/panoptic/dynamicJobs/fragments.d.ts +10 -0
- package/lib/internal/panoptic/dynamicJobs/renderExecuteJob.d.ts +8 -0
- package/lib/internal/panoptic/fragments/collateral.d.ts +5 -0
- package/lib/internal/panoptic/fragments/erc20.d.ts +3 -0
- package/lib/internal/panoptic/fragments/hypovault.d.ts +12 -0
- package/lib/internal/panoptic/fragments/merkle.d.ts +22 -0
- package/lib/internal/panoptic/fragments/panoptic.d.ts +17 -0
- package/lib/internal/panoptic/fragments/permit2.d.ts +3 -0
- package/lib/internal/panoptic/fragments/support.d.ts +16 -0
- package/lib/internal/panoptic/fragments/uniswap.d.ts +10 -0
- package/lib/internal/panoptic/fragments/weth.d.ts +19 -0
- package/lib/internal/panoptic/handlers.d.ts +27 -0
- package/lib/internal/panoptic/protocol.d.ts +29 -0
- package/lib/internal/panoptic/reads/account.d.ts +11 -0
- package/lib/internal/panoptic/reads/greeks.d.ts +5 -0
- package/lib/internal/panoptic/reads/hypovault.d.ts +7 -0
- package/lib/internal/panoptic/reads/pool.d.ts +10 -0
- package/lib/internal/panoptic/reads/uniswap.d.ts +6 -0
- package/lib/internal/panoptic/support.d.ts +20 -0
- package/lib/internal/panopticBrowserRuntime.d.ts +6 -0
- package/lib/internal/panopticDtos.d.ts +72 -0
- package/lib/internal/panopticHostEnvelope.d.ts +2 -0
- package/lib/internal/panopticHostImport.d.ts +17 -0
- package/lib/internal/panopticJsonArgs.d.ts +26 -0
- package/lib/internal/panopticRuntime.d.ts +12 -0
- package/lib/internal/panopticScalars.d.ts +10 -0
- package/lib/internal/panopticSerialization.d.ts +19 -0
- package/lib/internal/panopticSources.d.ts +22 -0
- package/lib/loadOptions.d.ts +5 -0
- package/lib/node.cjs +3640 -73
- package/lib/node.cjs.map +1 -1
- package/lib/node.d.ts +5 -2
- package/lib/node.mjs +3640 -73
- package/lib/node.mjs.map +1 -1
- package/lib/panoptic.cjs +19 -0
- package/lib/panoptic.cjs.map +1 -0
- package/lib/panoptic.d.ts +56 -0
- package/lib/panoptic.mjs +1 -0
- package/lib/panoptic.mjs.map +1 -0
- package/package.json +44 -3
package/lib/panoptic.cjs
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/panoptic.ts
|
|
17
|
+
var panoptic_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(panoptic_exports);
|
|
19
|
+
//# sourceMappingURL=panoptic.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/panoptic.ts"],"sourcesContent":["type PanopticJsonValue = string | number | boolean | null | PanopticJsonValue[] | { [key: string]: PanopticJsonValue };\n\ntype PanopticSubgraphSource = {\n sourceId: string;\n url?: string;\n label?: string;\n};\n\ntype PanopticRpcSource = {\n sourceId: string;\n chainId: string;\n rpcUrl: string;\n label?: string;\n overrideable?: boolean;\n allowedOverrideHosts?: string[];\n allowLocalhostOverrides?: boolean;\n clientOptions?: PanopticJsonValue;\n subgraph?: PanopticSubgraphSource;\n};\n\ntype PanopticSourceRegistry = {\n sources: PanopticRpcSource[];\n devMode?: boolean;\n allowedOverrideHosts?: string[];\n};\n\ntype SourceMeta = {\n chainId: string;\n blockNumber?: string;\n preflightBlockNumber?: string;\n rpcSourceId: string;\n subgraphSourceId?: string;\n subgraphBlockNumber?: string;\n blockNumberRole?: 'pinned' | 'sdkResult' | 'preflight' | 'staticReference';\n reconciled?: boolean;\n};\n\ntype PanopticAuditEvent = {\n label: string;\n status: 'success' | 'failure';\n attempt: number;\n durationMs: number;\n error?: string;\n};\n\ntype PanopticOperationOptions = {\n timeoutMs?: number;\n retries?: number;\n signal?: AbortSignal;\n onAudit?: (event: PanopticAuditEvent) => void;\n};\n\ntype PanopticClientCacheOptions = {\n maxEntries?: number;\n};\n\ntype PanopticRuntimeOptions = {\n sourceRegistry?: PanopticSourceRegistry;\n operation?: PanopticOperationOptions;\n clientCache?: PanopticClientCacheOptions;\n};\n\nexport type {\n PanopticAuditEvent,\n PanopticClientCacheOptions,\n PanopticJsonValue,\n PanopticOperationOptions,\n PanopticRpcSource,\n PanopticRuntimeOptions,\n PanopticSourceRegistry,\n PanopticSubgraphSource,\n SourceMeta,\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
type PanopticJsonValue = string | number | boolean | null | PanopticJsonValue[] | {
|
|
2
|
+
[key: string]: PanopticJsonValue;
|
|
3
|
+
};
|
|
4
|
+
type PanopticSubgraphSource = {
|
|
5
|
+
sourceId: string;
|
|
6
|
+
url?: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
};
|
|
9
|
+
type PanopticRpcSource = {
|
|
10
|
+
sourceId: string;
|
|
11
|
+
chainId: string;
|
|
12
|
+
rpcUrl: string;
|
|
13
|
+
label?: string;
|
|
14
|
+
overrideable?: boolean;
|
|
15
|
+
allowedOverrideHosts?: string[];
|
|
16
|
+
allowLocalhostOverrides?: boolean;
|
|
17
|
+
clientOptions?: PanopticJsonValue;
|
|
18
|
+
subgraph?: PanopticSubgraphSource;
|
|
19
|
+
};
|
|
20
|
+
type PanopticSourceRegistry = {
|
|
21
|
+
sources: PanopticRpcSource[];
|
|
22
|
+
devMode?: boolean;
|
|
23
|
+
allowedOverrideHosts?: string[];
|
|
24
|
+
};
|
|
25
|
+
type SourceMeta = {
|
|
26
|
+
chainId: string;
|
|
27
|
+
blockNumber?: string;
|
|
28
|
+
preflightBlockNumber?: string;
|
|
29
|
+
rpcSourceId: string;
|
|
30
|
+
subgraphSourceId?: string;
|
|
31
|
+
subgraphBlockNumber?: string;
|
|
32
|
+
blockNumberRole?: 'pinned' | 'sdkResult' | 'preflight' | 'staticReference';
|
|
33
|
+
reconciled?: boolean;
|
|
34
|
+
};
|
|
35
|
+
type PanopticAuditEvent = {
|
|
36
|
+
label: string;
|
|
37
|
+
status: 'success' | 'failure';
|
|
38
|
+
attempt: number;
|
|
39
|
+
durationMs: number;
|
|
40
|
+
error?: string;
|
|
41
|
+
};
|
|
42
|
+
type PanopticOperationOptions = {
|
|
43
|
+
timeoutMs?: number;
|
|
44
|
+
retries?: number;
|
|
45
|
+
signal?: AbortSignal;
|
|
46
|
+
onAudit?: (event: PanopticAuditEvent) => void;
|
|
47
|
+
};
|
|
48
|
+
type PanopticClientCacheOptions = {
|
|
49
|
+
maxEntries?: number;
|
|
50
|
+
};
|
|
51
|
+
type PanopticRuntimeOptions = {
|
|
52
|
+
sourceRegistry?: PanopticSourceRegistry;
|
|
53
|
+
operation?: PanopticOperationOptions;
|
|
54
|
+
clientCache?: PanopticClientCacheOptions;
|
|
55
|
+
};
|
|
56
|
+
export type { PanopticAuditEvent, PanopticClientCacheOptions, PanopticJsonValue, PanopticOperationOptions, PanopticRpcSource, PanopticRuntimeOptions, PanopticSourceRegistry, PanopticSubgraphSource, SourceMeta, };
|
package/lib/panoptic.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=panoptic.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steerprotocol/app-loader",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "App Loader for Steer Protocol",
|
|
5
5
|
"main": "./lib/index.cjs",
|
|
6
6
|
"module": "./lib/index.mjs",
|
|
@@ -26,6 +26,12 @@
|
|
|
26
26
|
"import": "./lib/node.mjs",
|
|
27
27
|
"require": "./lib/node.cjs",
|
|
28
28
|
"default": "./lib/node.mjs"
|
|
29
|
+
},
|
|
30
|
+
"./panoptic": {
|
|
31
|
+
"types": "./lib/panoptic.d.ts",
|
|
32
|
+
"import": "./lib/panoptic.mjs",
|
|
33
|
+
"require": "./lib/panoptic.cjs",
|
|
34
|
+
"default": "./lib/panoptic.mjs"
|
|
29
35
|
}
|
|
30
36
|
},
|
|
31
37
|
"publishConfig": {
|
|
@@ -39,8 +45,12 @@
|
|
|
39
45
|
"lint:fix": "eslint src --fix --ext .js,.ts",
|
|
40
46
|
"test": "jest --config jest.config.js",
|
|
41
47
|
"test:consumers": "node scripts/test-consumers.mjs",
|
|
48
|
+
"test:panoptic-sdk-smoke": "node scripts/test-panoptic-sdk-smoke.mjs",
|
|
49
|
+
"setup:as-fixtures": "npm --prefix test/fixtures/as-panoptic-runtime install",
|
|
50
|
+
"build:as-fixtures": "npm --prefix test/fixtures/as-panoptic-runtime run build",
|
|
51
|
+
"verify:phase0": "npx tsc --noEmit --pretty false && npm run lint && npm run build:as-fixtures && npm test -- --runInBand src/__tests__/panopticRuntime.test.ts src/__tests__/panopticSources.test.ts src/__tests__/instantiate.test.ts && npm run build && npm run test:consumers && npm run test:panoptic-sdk-smoke",
|
|
42
52
|
"prepare": "npm run build",
|
|
43
|
-
"prepublishOnly": "npm
|
|
53
|
+
"prepublishOnly": "npm run verify:phase0",
|
|
44
54
|
"preversion": "npm run lint",
|
|
45
55
|
"version": "npm run format && git add -A src",
|
|
46
56
|
"postversion": "git push && git push --tags"
|
|
@@ -73,14 +83,17 @@
|
|
|
73
83
|
"@types/node": "24.7.2",
|
|
74
84
|
"@typescript-eslint/eslint-plugin": "6.8.0",
|
|
75
85
|
"@typescript-eslint/parser": "6.8.0",
|
|
86
|
+
"assemblyscript": "^0.25.2",
|
|
76
87
|
"eslint": "8.51.0",
|
|
77
88
|
"eslint-plugin-jest": "27.4.2",
|
|
78
89
|
"jest": "29.7.0",
|
|
90
|
+
"json-as": "^0.5.67",
|
|
79
91
|
"prettier": "3.0.3",
|
|
80
92
|
"semantic-release": "^25.0.3",
|
|
81
93
|
"ts-jest": "29.1.1",
|
|
82
94
|
"tsup": "^8.5.0",
|
|
83
|
-
"typescript": "5.2.2"
|
|
95
|
+
"typescript": "5.2.2",
|
|
96
|
+
"visitor-as": "^0.11.4"
|
|
84
97
|
},
|
|
85
98
|
"files": [
|
|
86
99
|
"lib/**/*"
|
|
@@ -88,5 +101,33 @@
|
|
|
88
101
|
"dependencies": {
|
|
89
102
|
"ccxt": "^4.1.19",
|
|
90
103
|
"ethers": "^6.12.1"
|
|
104
|
+
},
|
|
105
|
+
"peerDependencies": {
|
|
106
|
+
"@panoptic-eng/sdk": "1.0.15",
|
|
107
|
+
"@tanstack/react-query": "^5.45.0",
|
|
108
|
+
"react": "^18.2.0 || ^19.0.0",
|
|
109
|
+
"react-dom": "^18.2.0 || ^19.0.0",
|
|
110
|
+
"viem": "^2.41.0",
|
|
111
|
+
"wagmi": "^2.14.0"
|
|
112
|
+
},
|
|
113
|
+
"peerDependenciesMeta": {
|
|
114
|
+
"@panoptic-eng/sdk": {
|
|
115
|
+
"optional": true
|
|
116
|
+
},
|
|
117
|
+
"@tanstack/react-query": {
|
|
118
|
+
"optional": true
|
|
119
|
+
},
|
|
120
|
+
"react": {
|
|
121
|
+
"optional": true
|
|
122
|
+
},
|
|
123
|
+
"react-dom": {
|
|
124
|
+
"optional": true
|
|
125
|
+
},
|
|
126
|
+
"viem": {
|
|
127
|
+
"optional": true
|
|
128
|
+
},
|
|
129
|
+
"wagmi": {
|
|
130
|
+
"optional": true
|
|
131
|
+
}
|
|
91
132
|
}
|
|
92
133
|
}
|