@agoric/internal 0.3.3-dev-e68f280.0 → 0.3.3-dev-3679b4c.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/package.json +4 -4
- package/src/action-types.d.ts +1 -1
- package/src/action-types.d.ts.map +1 -1
- package/src/action-types.js +1 -1
- package/src/marshal.d.ts +1 -1
- package/src/marshal.d.ts.map +1 -1
- package/src/marshal.js +4 -3
- package/src/storage-test-utils.d.ts +4 -2
- package/src/storage-test-utils.d.ts.map +1 -1
- package/src/storage-test-utils.js +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/internal",
|
|
3
|
-
"version": "0.3.3-dev-
|
|
3
|
+
"version": "0.3.3-dev-3679b4c.0+3679b4c",
|
|
4
4
|
"description": "Externally unsupported utilities internal to agoric-sdk",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"lint:types": "tsc -p jsconfig.json"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@agoric/assert": "0.6.1-dev-
|
|
24
|
-
"@agoric/zone": "0.2.3-dev-
|
|
23
|
+
"@agoric/assert": "0.6.1-dev-3679b4c.0+3679b4c",
|
|
24
|
+
"@agoric/zone": "0.2.3-dev-3679b4c.0+3679b4c",
|
|
25
25
|
"@endo/far": "^0.2.19",
|
|
26
26
|
"@endo/init": "^0.5.57",
|
|
27
27
|
"@endo/marshal": "^0.8.6",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "3679b4c27eb270d3655a9d9b6d74f4eb810035e8"
|
|
48
48
|
}
|
package/src/action-types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const AG_COSMOS_INIT: "AG_COSMOS_INIT";
|
|
2
|
-
export const
|
|
2
|
+
export const SWING_STORE_EXPORT: "SWING_STORE_EXPORT";
|
|
3
3
|
export const BEGIN_BLOCK: "BEGIN_BLOCK";
|
|
4
4
|
export const CALCULATE_FEES_IN_BEANS: "CALCULATE_FEES_IN_BEANS";
|
|
5
5
|
export const CORE_EVAL: "CORE_EVAL";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-types.d.ts","sourceRoot":"","sources":["action-types.js"],"names":[],"mappings":"AAEA,8CAA+C;AAC/C,
|
|
1
|
+
{"version":3,"file":"action-types.d.ts","sourceRoot":"","sources":["action-types.js"],"names":[],"mappings":"AAEA,8CAA+C;AAC/C,sDAAuD;AACvD,wCAAyC;AACzC,gEAAiE;AACjE,oCAAqC;AACrC,gDAAiD;AACjD,oCAAqC;AACrC,0CAA2C;AAC3C,sDAAuD;AACvD,oCAAqC;AACrC,kDAAmD;AACnD,0DAA2D;AAC3D,4CAA6C;AAC7C,wDAAyD;AACzD,8CAA+C"}
|
package/src/action-types.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @jessie-check
|
|
2
2
|
|
|
3
3
|
export const AG_COSMOS_INIT = 'AG_COSMOS_INIT';
|
|
4
|
-
export const
|
|
4
|
+
export const SWING_STORE_EXPORT = 'SWING_STORE_EXPORT';
|
|
5
5
|
export const BEGIN_BLOCK = 'BEGIN_BLOCK';
|
|
6
6
|
export const CALCULATE_FEES_IN_BEANS = 'CALCULATE_FEES_IN_BEANS';
|
|
7
7
|
export const CORE_EVAL = 'CORE_EVAL';
|
package/src/marshal.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export function makeBoardRemote({ boardId, iface }: any): BoardRemote;
|
|
|
2
2
|
export function slotToBoardRemote(boardId: any, iface: any): BoardRemote;
|
|
3
3
|
export function boardValToSlot(val: any): any;
|
|
4
4
|
export function boardSlottingMarshaller(slotToVal?: ((slot: string, iface: string) => any) | undefined): Omit<import('@endo/marshal').Marshal<string>, 'serialize' | 'unserialize'>;
|
|
5
|
-
export function unmarshalFromVstorage(data: Map<string, string>, key: string, fromCapData: ReturnType<typeof import('@endo/marshal').makeMarshal>['fromCapData'], index
|
|
5
|
+
export function unmarshalFromVstorage(data: Map<string, string>, key: string, fromCapData: ReturnType<typeof import('@endo/marshal').makeMarshal>['fromCapData'], index: number): Passable;
|
|
6
6
|
export function makeHistoryReviver(entries: Array<[string, string]>, slotToVal?: ((slot: string, iface?: string) => any) | undefined): {
|
|
7
7
|
getItem: (key: any) => Passable;
|
|
8
8
|
children: (prefix: any) => string[];
|
package/src/marshal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marshal.d.ts","sourceRoot":"","sources":["marshal.js"],"names":[],"mappings":"AAgBO,0DAFM,WAAW,CAKvB;AAEM,yEAC8B;AAE9B,8CAKN;AAWM,4DAHW,MAAM,SAAS,MAAM,KAAK,GAAG,gBAClC,KAAK,OAAO,eAAe,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,CAMtF;AAyBM,4CALI,IAAI,MAAM,EAAE,MAAM,CAAC,OACnB,MAAM,eACN,WAAW,cAAc,eAAe,EAAE,WAAW,CAAC,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"marshal.d.ts","sourceRoot":"","sources":["marshal.js"],"names":[],"mappings":"AAgBO,0DAFM,WAAW,CAKvB;AAEM,yEAC8B;AAE9B,8CAKN;AAWM,4DAHW,MAAM,SAAS,MAAM,KAAK,GAAG,gBAClC,KAAK,OAAO,eAAe,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,CAMtF;AAyBM,4CALI,IAAI,MAAM,EAAE,MAAM,CAAC,OACnB,MAAM,eACN,WAAW,cAAc,eAAe,EAAE,WAAW,CAAC,CAAC,aAAa,CAAC,SACrE,MAAM,YAwBhB;AASM,4CAHI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,sBAChB,MAAM,UAAU,MAAM,KAAK,GAAG;;;;EAoB/C;;;;0BA7GY;IAAE,UAAU,EAAE,MAAM,MAAM,CAAA;CAAE"}
|
package/src/marshal.js
CHANGED
|
@@ -65,11 +65,12 @@ harden(assertCapData);
|
|
|
65
65
|
* @param {Map<string, string>} data
|
|
66
66
|
* @param {string} key
|
|
67
67
|
* @param {ReturnType<typeof import('@endo/marshal').makeMarshal>['fromCapData']} fromCapData
|
|
68
|
-
* @param {number}
|
|
68
|
+
* @param {number} index index of the desired value in a deserialized stream cell
|
|
69
69
|
*/
|
|
70
|
-
export const unmarshalFromVstorage = (data, key, fromCapData, index
|
|
70
|
+
export const unmarshalFromVstorage = (data, key, fromCapData, index) => {
|
|
71
71
|
const serialized = data.get(key) || Fail`no data for ${key}`;
|
|
72
72
|
assert.typeof(serialized, 'string');
|
|
73
|
+
assert.typeof(index, 'number');
|
|
73
74
|
|
|
74
75
|
const streamCell = JSON.parse(serialized);
|
|
75
76
|
if (!isStreamCell(streamCell)) {
|
|
@@ -102,7 +103,7 @@ export const makeHistoryReviver = (entries, slotToVal = undefined) => {
|
|
|
102
103
|
const vsMap = new Map(entries);
|
|
103
104
|
const fromCapData = (...args) =>
|
|
104
105
|
Reflect.apply(board.fromCapData, board, args);
|
|
105
|
-
const getItem = key => unmarshalFromVstorage(vsMap, key, fromCapData);
|
|
106
|
+
const getItem = key => unmarshalFromVstorage(vsMap, key, fromCapData, -1);
|
|
106
107
|
const children = prefix => {
|
|
107
108
|
prefix.endsWith('.') || Fail`prefix must end with '.'`;
|
|
108
109
|
return harden([
|
|
@@ -44,9 +44,10 @@ export function makeMockChainStorageRoot(): {
|
|
|
44
44
|
*
|
|
45
45
|
* @param {string} path
|
|
46
46
|
* @param {import('./lib-chainStorage.js').Marshaller} marshaller
|
|
47
|
+
* @param {number} [index]
|
|
47
48
|
* @returns {unknown}
|
|
48
49
|
*/
|
|
49
|
-
getBody: (path: string, marshaller?: import('./lib-chainStorage.js').Marshaller) => unknown;
|
|
50
|
+
getBody: (path: string, marshaller?: import('./lib-chainStorage.js').Marshaller, index?: number | undefined) => unknown;
|
|
50
51
|
keys: () => string[];
|
|
51
52
|
getPath(): string;
|
|
52
53
|
getStoreKey(): Promise<import("./lib-chainStorage.js").VStorageKey>;
|
|
@@ -63,9 +64,10 @@ export function makeMockChainStorageRoot(): {
|
|
|
63
64
|
*
|
|
64
65
|
* @param {string} path
|
|
65
66
|
* @param {import('./lib-chainStorage.js').Marshaller} marshaller
|
|
67
|
+
* @param {number} [index]
|
|
66
68
|
* @returns {unknown}
|
|
67
69
|
*/
|
|
68
|
-
getBody: (path: string, marshaller?: import('./lib-chainStorage.js').Marshaller) => unknown;
|
|
70
|
+
getBody: (path: string, marshaller?: import('./lib-chainStorage.js').Marshaller, index?: number | undefined) => unknown;
|
|
69
71
|
keys: () => string[];
|
|
70
72
|
getPath(): string;
|
|
71
73
|
getStoreKey(): Promise<import("./lib-chainStorage.js").VStorageKey>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-test-utils.d.ts","sourceRoot":"","sources":["storage-test-utils.js"],"names":[],"mappings":"AA+BO,yCAHI,MAAM,UACN,MAAM,wDAGC;AAElB;;;GAGG;AACH;;;;;EAEG;AAsBW,+CAAU,GAAG,GAAK,GAAG,CAAA;AAgC5B,6CAHI,MAAM,gBACN;;eAAwC,CAAC,CAAC;;;;;;;;;;;;;;;;;;yBAyBvC,OAAO,4BAA4B,EAAE,cAAc;;;;EAoFhE;AAIM;IAIH
|
|
1
|
+
{"version":3,"file":"storage-test-utils.d.ts","sourceRoot":"","sources":["storage-test-utils.js"],"names":[],"mappings":"AA+BO,yCAHI,MAAM,UACN,MAAM,wDAGC;AAElB;;;GAGG;AACH;;;;;EAEG;AAsBW,+CAAU,GAAG,GAAK,GAAG,CAAA;AAgC5B,6CAHI,MAAM,gBACN;;eAAwC,CAAC,CAAC;;;;;;;;;;;;;;;;;;yBAyBvC,OAAO,4BAA4B,EAAE,cAAc;;;;EAoFhE;AAIM;IAIH;;;;;;;;;;OAUG;oBAJQ,MAAM,eACN,OAAO,uBAAuB,EAAE,UAAU,iCAExC,OAAO;;;;;;;;;IATpB;;;;;;;;;;OAUG;oBAJQ,MAAM,eACN,OAAO,uBAAuB,EAAE,UAAU,iCAExC,OAAO;;;;;;;;GAWvB;;;;;;;;;;;;;;;;;;eApNiF,CAAC,KAAK,CAAC;;;6BA0L3E,WAAY,yBAAyB,CAAC;mCA2BtC,WAAW,+BAA+B,CAAC"}
|
|
@@ -215,14 +215,15 @@ export const makeMockChainStorageRoot = () => {
|
|
|
215
215
|
*
|
|
216
216
|
* @param {string} path
|
|
217
217
|
* @param {import('./lib-chainStorage.js').Marshaller} marshaller
|
|
218
|
+
* @param {number} [index]
|
|
218
219
|
* @returns {unknown}
|
|
219
220
|
*/
|
|
220
|
-
getBody: (path, marshaller = defaultMarshaller) => {
|
|
221
|
+
getBody: (path, marshaller = defaultMarshaller, index = -1) => {
|
|
221
222
|
data.size || Fail`no data in storage`;
|
|
222
223
|
/** @type {ReturnType<typeof import('@endo/marshal').makeMarshal>['fromCapData']} */
|
|
223
224
|
const fromCapData = (...args) =>
|
|
224
225
|
Reflect.apply(marshaller.fromCapData, marshaller, args);
|
|
225
|
-
return unmarshalFromVstorage(data, path, fromCapData);
|
|
226
|
+
return unmarshalFromVstorage(data, path, fromCapData, index);
|
|
226
227
|
},
|
|
227
228
|
keys: () => [...data.keys()],
|
|
228
229
|
});
|