@ownables/platform-node 0.3.0 → 0.5.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/README.md +30 -0
- package/dist/core/src/index.d.ts +2 -0
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/index.js +2 -0
- package/dist/core/src/index.js.map +1 -1
- package/dist/core/src/interfaces/core.d.ts +5 -1
- package/dist/core/src/interfaces/core.d.ts.map +1 -1
- package/dist/core/src/ownableErrorMessage.d.ts +2 -0
- package/dist/core/src/ownableErrorMessage.d.ts.map +1 -0
- package/dist/core/src/ownableErrorMessage.js +20 -0
- package/dist/core/src/ownableErrorMessage.js.map +1 -0
- package/dist/core/src/services/EventChain.service.d.ts +2 -0
- package/dist/core/src/services/EventChain.service.d.ts.map +1 -1
- package/dist/core/src/services/EventChain.service.js +2 -1
- package/dist/core/src/services/EventChain.service.js.map +1 -1
- package/dist/core/src/services/Ownable.service.d.ts +7 -3
- package/dist/core/src/services/Ownable.service.d.ts.map +1 -1
- package/dist/core/src/services/Ownable.service.js +28 -18
- package/dist/core/src/services/Ownable.service.js.map +1 -1
- package/dist/core/src/services/Polling.service.js +1 -1
- package/dist/core/src/services/Polling.service.js.map +1 -1
- package/dist/core/src/services/WorkerRPC.service.d.ts +37 -0
- package/dist/core/src/services/WorkerRPC.service.d.ts.map +1 -0
- package/dist/core/src/services/WorkerRPC.service.js +219 -0
- package/dist/core/src/services/WorkerRPC.service.js.map +1 -0
- package/dist/core/src/services/workerSource.d.ts +2 -0
- package/dist/core/src/services/workerSource.d.ts.map +1 -0
- package/dist/core/src/services/workerSource.js +72 -0
- package/dist/core/src/services/workerSource.js.map +1 -0
- package/dist/core/src/types/EventChainStore.d.ts +1 -0
- package/dist/core/src/types/EventChainStore.d.ts.map +1 -1
- package/dist/core/src/types/OwnableRuntime.d.ts +3 -1
- package/dist/core/src/types/OwnableRuntime.d.ts.map +1 -1
- package/dist/core/src/types/TypedPackage.d.ts +3 -0
- package/dist/core/src/types/TypedPackage.d.ts.map +1 -1
- package/dist/platform-node/src/services/NodeSandboxOwnableRPC.service.d.ts +15 -12
- package/dist/platform-node/src/services/NodeSandboxOwnableRPC.service.d.ts.map +1 -1
- package/dist/platform-node/src/services/NodeSandboxOwnableRPC.service.js +114 -131
- package/dist/platform-node/src/services/NodeSandboxOwnableRPC.service.js.map +1 -1
- package/package.json +3 -2
|
@@ -1,165 +1,148 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { transformSync } from '@babel/core';
|
|
3
|
-
// @ts-expect-error - package has no shipped types
|
|
4
|
-
import removeImportExport from 'babel-plugin-remove-import-export';
|
|
5
|
-
import transformImportMetaUrl from '../babel/transformImportMetaUrl';
|
|
6
|
-
function attributesToDict(attributes) {
|
|
7
|
-
return Object.fromEntries(attributes.map(({ key, value }) => [key, value]));
|
|
8
|
-
}
|
|
9
|
-
function eventsToDict(events) {
|
|
10
|
-
return events.map(({ type, attributes }) => ({
|
|
11
|
-
type,
|
|
12
|
-
attributes: attributesToDict(attributes),
|
|
13
|
-
}));
|
|
14
|
-
}
|
|
15
|
-
function decodeBase64Json(encoded) {
|
|
16
|
-
const json = Buffer.from(encoded, 'base64').toString('utf8');
|
|
17
|
-
return JSON.parse(json);
|
|
18
|
-
}
|
|
1
|
+
import { decode, encode } from 'cbor-x';
|
|
19
2
|
export default class NodeSandboxOwnableRPC {
|
|
20
3
|
ownableId = '';
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
4
|
+
exportsRef = null;
|
|
5
|
+
memory = null;
|
|
6
|
+
widgetWindow = null;
|
|
7
|
+
_queue = Promise.resolve();
|
|
8
|
+
constructor(id = '') {
|
|
9
|
+
this.ownableId = id;
|
|
10
|
+
}
|
|
11
|
+
unpackPtrLen(packed) {
|
|
12
|
+
const value = typeof packed === 'bigint' ? packed : BigInt(packed);
|
|
13
|
+
const ptr = Number(value & 0xffffffffn);
|
|
14
|
+
const len = Number((value >> 32n) & 0xffffffffn);
|
|
15
|
+
return { ptr, len };
|
|
16
|
+
}
|
|
17
|
+
ensureInitialized() {
|
|
18
|
+
if (!this.exportsRef || !this.memory) {
|
|
29
19
|
throw new Error('Ownable runtime not initialized');
|
|
30
20
|
}
|
|
31
|
-
return this.
|
|
21
|
+
return this.exportsRef;
|
|
32
22
|
}
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
async initialize(_js, wasm) {
|
|
24
|
+
const instance = (await WebAssembly.instantiate(wasm, {}));
|
|
25
|
+
const exportsRef = instance.exports;
|
|
26
|
+
if (!exportsRef.memory ||
|
|
27
|
+
typeof exportsRef.ownable_alloc !== 'function' ||
|
|
28
|
+
typeof exportsRef.ownable_free !== 'function' ||
|
|
29
|
+
typeof exportsRef.ownable_instantiate !== 'function' ||
|
|
30
|
+
typeof exportsRef.ownable_execute !== 'function' ||
|
|
31
|
+
typeof exportsRef.ownable_query !== 'function' ||
|
|
32
|
+
typeof exportsRef.ownable_external_event !== 'function') {
|
|
33
|
+
throw new Error('Invalid ownable runtime exports');
|
|
37
34
|
}
|
|
35
|
+
this.exportsRef = exportsRef;
|
|
36
|
+
this.memory = exportsRef.memory;
|
|
37
|
+
}
|
|
38
|
+
setWidgetWindow(win) {
|
|
39
|
+
this.widgetWindow = win;
|
|
40
|
+
}
|
|
41
|
+
terminate() {
|
|
42
|
+
this.exportsRef = null;
|
|
43
|
+
this.memory = null;
|
|
44
|
+
this.widgetWindow = null;
|
|
45
|
+
}
|
|
46
|
+
invoke(type, inputBytes) {
|
|
47
|
+
const exportsRef = this.ensureInitialized();
|
|
48
|
+
const memory = this.memory;
|
|
49
|
+
const len = inputBytes.length >>> 0;
|
|
50
|
+
const inPtr = exportsRef.ownable_alloc(len);
|
|
51
|
+
if (len > 0)
|
|
52
|
+
new Uint8Array(memory.buffer, inPtr, len).set(inputBytes);
|
|
53
|
+
let packed;
|
|
38
54
|
try {
|
|
39
|
-
|
|
40
|
-
|
|
55
|
+
switch (type) {
|
|
56
|
+
case 'instantiate':
|
|
57
|
+
packed = exportsRef.ownable_instantiate(inPtr, len);
|
|
58
|
+
break;
|
|
59
|
+
case 'execute':
|
|
60
|
+
packed = exportsRef.ownable_execute(inPtr, len);
|
|
61
|
+
break;
|
|
62
|
+
case 'query':
|
|
63
|
+
packed = exportsRef.ownable_query(inPtr, len);
|
|
64
|
+
break;
|
|
65
|
+
case 'external_event':
|
|
66
|
+
packed = exportsRef.ownable_external_event(inPtr, len);
|
|
67
|
+
break;
|
|
68
|
+
default:
|
|
69
|
+
throw new Error(`unknown message type ${type}`);
|
|
70
|
+
}
|
|
41
71
|
}
|
|
42
72
|
finally {
|
|
43
|
-
|
|
44
|
-
delete sandbox[key];
|
|
45
|
-
}
|
|
46
|
-
delete sandbox.result;
|
|
73
|
+
exportsRef.ownable_free(inPtr, len);
|
|
47
74
|
}
|
|
75
|
+
const { ptr: outPtr, len: outLen } = this.unpackPtrLen(packed);
|
|
76
|
+
const output = outLen > 0
|
|
77
|
+
? new Uint8Array(new Uint8Array(memory.buffer, outPtr, outLen))
|
|
78
|
+
: new Uint8Array();
|
|
79
|
+
if (outLen > 0)
|
|
80
|
+
exportsRef.ownable_free(outPtr, outLen);
|
|
81
|
+
return output;
|
|
48
82
|
}
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
configFile: false,
|
|
54
|
-
plugins: [removeImportExport, transformImportMetaUrl],
|
|
55
|
-
});
|
|
56
|
-
if (!output?.code) {
|
|
57
|
-
throw new Error('Unable to transform ownable module source');
|
|
83
|
+
decodeEnvelope(output) {
|
|
84
|
+
const envelope = decode(output);
|
|
85
|
+
if (!envelope.success) {
|
|
86
|
+
throw new Error(`Ownable ABI call failed: ${envelope.error_code || 'UNKNOWN'} ${envelope.error_message || ''}`.trim());
|
|
58
87
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
syncState(result) {
|
|
62
|
-
const memJson = result.get('mem');
|
|
63
|
-
const mem = typeof memJson === 'string' ? JSON.parse(memJson) : { state_dump: this.stateDump };
|
|
64
|
-
this.stateDump = mem.state_dump;
|
|
65
|
-
return this.stateDump;
|
|
66
|
-
}
|
|
67
|
-
parseStateResult(result) {
|
|
68
|
-
const responseJson = result.has('state') ? result.get('state') : result.get('result');
|
|
69
|
-
if (typeof responseJson !== 'string') {
|
|
70
|
-
throw new Error('Invalid ownable runtime response');
|
|
71
|
-
}
|
|
72
|
-
return JSON.parse(responseJson);
|
|
88
|
+
const payload = envelope.payload ?? new Uint8Array();
|
|
89
|
+
return decode(payload);
|
|
73
90
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
setTimeout,
|
|
84
|
-
clearTimeout,
|
|
85
|
-
URL,
|
|
86
|
-
__filename: this.filename,
|
|
87
|
-
mem: { state_dump: [] },
|
|
91
|
+
workerCall(type, request, state) {
|
|
92
|
+
const call = async () => {
|
|
93
|
+
const input = encode(request);
|
|
94
|
+
const output = this.invoke(type, input);
|
|
95
|
+
const decoded = this.decodeEnvelope(output);
|
|
96
|
+
return {
|
|
97
|
+
response: decoded.result,
|
|
98
|
+
state: decoded.mem?.state_dump ?? state ?? [],
|
|
99
|
+
};
|
|
88
100
|
};
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
return await initFn(wasm);
|
|
101
|
+
const next = this._queue.then(call, call);
|
|
102
|
+
this._queue = next.catch(() => { });
|
|
103
|
+
return next;
|
|
104
|
+
}
|
|
105
|
+
attributesToDict(attributes) {
|
|
106
|
+
return Object.fromEntries(attributes.map((a) => [a.key, a.value]));
|
|
97
107
|
}
|
|
98
108
|
async instantiate(msg, info) {
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
payload.nft = undefined;
|
|
102
|
-
if (!('ownable_type' in payload))
|
|
103
|
-
payload.ownable_type = undefined;
|
|
104
|
-
if (typeof payload.network_id === 'string') {
|
|
105
|
-
payload.network_id = payload.network_id.charCodeAt(0);
|
|
106
|
-
}
|
|
107
|
-
const result = (await this.runInSandbox('instantiate_contract(msg, info)', {
|
|
108
|
-
msg: payload,
|
|
109
|
-
info,
|
|
110
|
-
}));
|
|
111
|
-
const response = this.parseStateResult(result);
|
|
112
|
-
const state = this.syncState(result);
|
|
109
|
+
const { response, state } = await this.workerCall('instantiate', { msg, info });
|
|
110
|
+
const parsed = decode(response);
|
|
113
111
|
return {
|
|
114
|
-
attributes: attributesToDict(
|
|
112
|
+
attributes: this.attributesToDict(parsed.attributes),
|
|
115
113
|
state,
|
|
116
114
|
};
|
|
117
115
|
}
|
|
118
|
-
|
|
119
|
-
const result = (await this.runInSandbox('execute_contract(msg, info, mem)', {
|
|
120
|
-
msg,
|
|
121
|
-
info,
|
|
122
|
-
mem: { state_dump: state },
|
|
123
|
-
}));
|
|
124
|
-
const response = this.parseStateResult(result);
|
|
125
|
-
const nextState = this.syncState(result);
|
|
116
|
+
toExecuteResult(response, state) {
|
|
126
117
|
return {
|
|
127
|
-
attributes: attributesToDict(response.attributes),
|
|
128
|
-
events:
|
|
129
|
-
|
|
130
|
-
|
|
118
|
+
attributes: this.attributesToDict(response.attributes),
|
|
119
|
+
events: (response.events || []).map((e) => ({
|
|
120
|
+
type: e.type,
|
|
121
|
+
attributes: this.attributesToDict(e.attributes),
|
|
122
|
+
})),
|
|
123
|
+
data: response.data ?? '',
|
|
124
|
+
state,
|
|
131
125
|
};
|
|
132
126
|
}
|
|
127
|
+
async execute(msg, info, state) {
|
|
128
|
+
const { response, state: newState } = await this.workerCall('execute', { msg, info, mem: { state_dump: state } }, state);
|
|
129
|
+
return this.toExecuteResult(decode(response), newState);
|
|
130
|
+
}
|
|
133
131
|
async externalEvent(msg, info, state) {
|
|
134
|
-
const
|
|
135
|
-
msg,
|
|
132
|
+
const { response, state: newState } = await this.workerCall('external_event', {
|
|
133
|
+
msg: msg.msg,
|
|
136
134
|
info,
|
|
137
135
|
ownable_id: this.ownableId,
|
|
138
136
|
mem: { state_dump: state },
|
|
139
|
-
})
|
|
140
|
-
|
|
141
|
-
const nextState = this.syncState(result);
|
|
142
|
-
return {
|
|
143
|
-
attributes: attributesToDict(response.attributes),
|
|
144
|
-
events: eventsToDict(response.events || []),
|
|
145
|
-
data: response.data,
|
|
146
|
-
state: nextState,
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
async queryRaw(msg, state) {
|
|
150
|
-
const result = (await this.runInSandbox('query_contract_state(msg, mem)', {
|
|
151
|
-
msg,
|
|
152
|
-
mem: { state_dump: state },
|
|
153
|
-
}));
|
|
154
|
-
const parsed = this.parseStateResult(result);
|
|
155
|
-
return parsed;
|
|
137
|
+
}, state);
|
|
138
|
+
return this.toExecuteResult(decode(response), newState);
|
|
156
139
|
}
|
|
157
140
|
async query(msg, state) {
|
|
158
|
-
const
|
|
159
|
-
return
|
|
141
|
+
const { response } = await this.workerCall('query', { msg, mem: { state_dump: state } }, state);
|
|
142
|
+
return JSON.parse(Buffer.from(response).toString('utf8'));
|
|
160
143
|
}
|
|
161
144
|
async refresh(_state) {
|
|
162
|
-
// Node runtime has no
|
|
145
|
+
// Node runtime has no widget window refresh target.
|
|
163
146
|
}
|
|
164
147
|
}
|
|
165
148
|
//# sourceMappingURL=NodeSandboxOwnableRPC.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeSandboxOwnableRPC.service.js","sourceRoot":"","sources":["../../../../src/services/NodeSandboxOwnableRPC.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"NodeSandboxOwnableRPC.service.js","sourceRoot":"","sources":["../../../../src/services/NodeSandboxOwnableRPC.service.ts"],"names":[],"mappings":"AAAA,O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AC,QAAQ,CAAgB,EAAE,QAAQ,CAAC,CAAC;IACzE,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,GAAc,EAAE,KAAgB;QAC1C,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;QAChG,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5D,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,MAAiB;QAC7B,oDAAoD;IACtD,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ownables/platform-node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
],
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@babel/core": "^7.28.4",
|
|
12
|
-
"@ownables/core": "0.
|
|
12
|
+
"@ownables/core": "0.5.1",
|
|
13
13
|
"any-bucket": "^0.1.6",
|
|
14
14
|
"babel-plugin-remove-import-export": "^1.1.1",
|
|
15
|
+
"cbor-x": "^1.6.0",
|
|
15
16
|
"jszip": "^3.10.1"
|
|
16
17
|
},
|
|
17
18
|
"scripts": {
|