@ownables/platform-node 0.3.0 → 0.6.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 +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 +12 -2
- 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 +23 -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 +18 -5
- package/dist/core/src/services/Ownable.service.d.ts.map +1 -1
- package/dist/core/src/services/Ownable.service.js +96 -36
- 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 +45 -0
- package/dist/core/src/services/WorkerRPC.service.d.ts.map +1 -0
- package/dist/core/src/services/WorkerRPC.service.js +290 -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 +74 -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 +33 -2
- 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 +25 -14
- package/dist/platform-node/src/services/NodeSandboxOwnableRPC.service.d.ts.map +1 -1
- package/dist/platform-node/src/services/NodeSandboxOwnableRPC.service.js +140 -130
- package/dist/platform-node/src/services/NodeSandboxOwnableRPC.service.js.map +1 -1
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeSandboxOwnableRPC.service.d.ts","sourceRoot":"","sources":["../../../../src/services/NodeSandboxOwnableRPC.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NodeSandboxOwnableRPC.service.d.ts","sourceRoot":"","sources":["../../../../src/services/NodeSandboxOwnableRPC.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,UAAU,EAEV,kBAAkB,EAClB,SAAS,EACV,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,SAAS,MAAM,gCAAgC,CAAC;AAgC5D,MAAM,CAAC,OAAO,OAAO,qBAAsB,YAAW,UAAU;IAC9D,OAAO,CAAC,SAAS,CAAM;IACvB,OAAO,CAAC,UAAU,CAA2B;IAC7C,OAAO,CAAC,MAAM,CAAmC;IACjD,OAAO,CAAC,YAAY,CAAwB;IAC5C,OAAO,CAAC,MAAM,CAAmC;gBAErC,EAAE,SAAK;IAInB,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,iBAAiB;IAOnB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAsB9D,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,GAAG,IAAI;IAI1C,SAAS,IAAI,IAAI;IAMjB,OAAO,CAAC,MAAM;IA8Cd,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,UAAU;IAoBlB,OAAO,CAAC,aAAa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OAAO,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAGhD"}
|
|
@@ -1,165 +1,175 @@
|
|
|
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_register !== 'function' ||
|
|
33
|
+
typeof exportsRef.ownable_ingest !== 'function' ||
|
|
34
|
+
typeof exportsRef.ownable_encode_public_event !== 'function') {
|
|
35
|
+
throw new Error('Invalid ownable runtime exports');
|
|
37
36
|
}
|
|
37
|
+
this.exportsRef = exportsRef;
|
|
38
|
+
this.memory = exportsRef.memory;
|
|
39
|
+
}
|
|
40
|
+
setWidgetWindow(win) {
|
|
41
|
+
this.widgetWindow = win;
|
|
42
|
+
}
|
|
43
|
+
terminate() {
|
|
44
|
+
this.exportsRef = null;
|
|
45
|
+
this.memory = null;
|
|
46
|
+
this.widgetWindow = null;
|
|
47
|
+
}
|
|
48
|
+
invoke(type, inputBytes) {
|
|
49
|
+
const exportsRef = this.ensureInitialized();
|
|
50
|
+
const memory = this.memory;
|
|
51
|
+
const len = inputBytes.length >>> 0;
|
|
52
|
+
const inPtr = exportsRef.ownable_alloc(len);
|
|
53
|
+
if (len > 0)
|
|
54
|
+
new Uint8Array(memory.buffer, inPtr, len).set(inputBytes);
|
|
55
|
+
let packed;
|
|
38
56
|
try {
|
|
39
|
-
|
|
40
|
-
|
|
57
|
+
switch (type) {
|
|
58
|
+
case 'instantiate':
|
|
59
|
+
packed = exportsRef.ownable_instantiate(inPtr, len);
|
|
60
|
+
break;
|
|
61
|
+
case 'execute':
|
|
62
|
+
packed = exportsRef.ownable_execute(inPtr, len);
|
|
63
|
+
break;
|
|
64
|
+
case 'query':
|
|
65
|
+
packed = exportsRef.ownable_query(inPtr, len);
|
|
66
|
+
break;
|
|
67
|
+
case 'register':
|
|
68
|
+
packed = exportsRef.ownable_register(inPtr, len);
|
|
69
|
+
break;
|
|
70
|
+
case 'ingest':
|
|
71
|
+
packed = exportsRef.ownable_ingest(inPtr, len);
|
|
72
|
+
break;
|
|
73
|
+
case 'encode_public_event':
|
|
74
|
+
packed = exportsRef.ownable_encode_public_event(inPtr, len);
|
|
75
|
+
break;
|
|
76
|
+
default:
|
|
77
|
+
throw new Error(`unknown message type ${type}`);
|
|
78
|
+
}
|
|
41
79
|
}
|
|
42
80
|
finally {
|
|
43
|
-
|
|
44
|
-
delete sandbox[key];
|
|
45
|
-
}
|
|
46
|
-
delete sandbox.result;
|
|
81
|
+
exportsRef.ownable_free(inPtr, len);
|
|
47
82
|
}
|
|
83
|
+
const { ptr: outPtr, len: outLen } = this.unpackPtrLen(packed);
|
|
84
|
+
const output = outLen > 0
|
|
85
|
+
? new Uint8Array(new Uint8Array(memory.buffer, outPtr, outLen))
|
|
86
|
+
: new Uint8Array();
|
|
87
|
+
if (outLen > 0)
|
|
88
|
+
exportsRef.ownable_free(outPtr, outLen);
|
|
89
|
+
return output;
|
|
48
90
|
}
|
|
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');
|
|
91
|
+
decodeEnvelope(output) {
|
|
92
|
+
const envelope = decode(output);
|
|
93
|
+
if (!envelope.success) {
|
|
94
|
+
throw new Error(`Ownable ABI call failed: ${envelope.error_code || 'UNKNOWN'} ${envelope.error_message || ''}`.trim());
|
|
58
95
|
}
|
|
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);
|
|
96
|
+
const payload = envelope.payload ?? new Uint8Array();
|
|
97
|
+
return decode(payload);
|
|
73
98
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
setTimeout,
|
|
84
|
-
clearTimeout,
|
|
85
|
-
URL,
|
|
86
|
-
__filename: this.filename,
|
|
87
|
-
mem: { state_dump: [] },
|
|
99
|
+
workerCall(type, request, state) {
|
|
100
|
+
const call = async () => {
|
|
101
|
+
const input = encode(request);
|
|
102
|
+
const output = this.invoke(type, input);
|
|
103
|
+
const decoded = this.decodeEnvelope(output);
|
|
104
|
+
return {
|
|
105
|
+
response: decoded.result,
|
|
106
|
+
state: decoded.mem?.state_dump ?? state ?? [],
|
|
107
|
+
};
|
|
88
108
|
};
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
109
|
+
const next = this._queue.then(call, call);
|
|
110
|
+
this._queue = next.catch(() => { });
|
|
111
|
+
return next;
|
|
112
|
+
}
|
|
113
|
+
invokePayload(type, request) {
|
|
114
|
+
const input = encode(request);
|
|
115
|
+
const output = this.invoke(type, input);
|
|
116
|
+
const envelope = decode(output);
|
|
117
|
+
if (!envelope.success) {
|
|
118
|
+
throw new Error(`Ownable ABI call failed: ${envelope.error_code || 'UNKNOWN'} ${envelope.error_message || ''}`.trim());
|
|
95
119
|
}
|
|
96
|
-
return
|
|
120
|
+
return envelope.payload ?? new Uint8Array();
|
|
121
|
+
}
|
|
122
|
+
attributesToDict(attributes) {
|
|
123
|
+
return Object.fromEntries(attributes.map((a) => [a.key, a.value]));
|
|
97
124
|
}
|
|
98
125
|
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);
|
|
126
|
+
const { response, state } = await this.workerCall('instantiate', { msg, info });
|
|
127
|
+
const parsed = decode(response);
|
|
113
128
|
return {
|
|
114
|
-
attributes: attributesToDict(
|
|
129
|
+
attributes: this.attributesToDict(parsed.attributes),
|
|
115
130
|
state,
|
|
116
131
|
};
|
|
117
132
|
}
|
|
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);
|
|
133
|
+
toExecuteResult(response, state) {
|
|
126
134
|
return {
|
|
127
|
-
attributes: attributesToDict(response.attributes),
|
|
128
|
-
events:
|
|
129
|
-
|
|
130
|
-
|
|
135
|
+
attributes: this.attributesToDict(response.attributes),
|
|
136
|
+
events: (response.events || []).map((e) => ({
|
|
137
|
+
type: e.type,
|
|
138
|
+
attributes: this.attributesToDict(e.attributes),
|
|
139
|
+
})),
|
|
140
|
+
data: response.data ?? '',
|
|
141
|
+
state,
|
|
131
142
|
};
|
|
132
143
|
}
|
|
133
|
-
async
|
|
134
|
-
const
|
|
135
|
-
|
|
144
|
+
async execute(msg, info, state) {
|
|
145
|
+
const { response, state: newState } = await this.workerCall('execute', { msg, info, mem: { state_dump: state } }, state);
|
|
146
|
+
return this.toExecuteResult(decode(response), newState);
|
|
147
|
+
}
|
|
148
|
+
async register(event, info, state) {
|
|
149
|
+
const { response, state: newState } = await this.workerCall('register', {
|
|
150
|
+
msg: event,
|
|
136
151
|
info,
|
|
137
|
-
ownable_id: this.ownableId,
|
|
138
152
|
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
|
-
};
|
|
153
|
+
}, state);
|
|
154
|
+
return this.toExecuteResult(decode(response), newState);
|
|
148
155
|
}
|
|
149
|
-
async
|
|
150
|
-
const
|
|
151
|
-
msg,
|
|
156
|
+
async ingest(event, info, state) {
|
|
157
|
+
const { response, state: newState } = await this.workerCall('ingest', {
|
|
158
|
+
msg: event,
|
|
159
|
+
info,
|
|
152
160
|
mem: { state_dump: state },
|
|
153
|
-
})
|
|
154
|
-
|
|
155
|
-
|
|
161
|
+
}, state);
|
|
162
|
+
return this.toExecuteResult(decode(response), newState);
|
|
163
|
+
}
|
|
164
|
+
async encodePublicEvent(eventType, payload) {
|
|
165
|
+
return this.invokePayload('encode_public_event', { eventType, data: payload });
|
|
156
166
|
}
|
|
157
167
|
async query(msg, state) {
|
|
158
|
-
const
|
|
159
|
-
return
|
|
168
|
+
const { response } = await this.workerCall('query', { msg, mem: { state_dump: state } }, state);
|
|
169
|
+
return JSON.parse(Buffer.from(response).toString('utf8'));
|
|
160
170
|
}
|
|
161
171
|
async refresh(_state) {
|
|
162
|
-
// Node runtime has no
|
|
172
|
+
// Node runtime has no widget window refresh target.
|
|
163
173
|
}
|
|
164
174
|
}
|
|
165
175
|
//# 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,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AA0CxC,MAAM,CAAC,OAAO,OAAO,qBAAqB;IAChC,SAAS,GAAG,EAAE,CAAC;IACf,UAAU,GAAsB,IAAI,CAAC;IACrC,MAAM,GAA8B,IAAI,CAAC;IACzC,YAAY,GAAmB,IAAI,CAAC;IACpC,MAAM,GAAiB,OAAO,CAAC,OAAO,EAAE,CAAC;IAEjD,YAAY,EAAE,GAAG,EAAE;QACjB,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACtB,CAAC;IAEO,YAAY,CAAC,MAAuB;QAC1C,MAAM,KAAK,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACnE,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,GAAG,WAAW,CAAC,CAAC;QACxC,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,KAAK,IAAI,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC;QACjD,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IACtB,CAAC;IAEO,iBAAiB;QACvB,IAAI,CAAC,IA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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.6.0",
|
|
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": {
|