@agoric/internal 0.5.0-u23.0 → 0.5.0-u23.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/package.json +7 -3
- package/src/action-types.d.ts +89 -0
- package/src/action-types.d.ts.map +1 -0
- package/src/ava-force-exit.d.mts +2 -0
- package/src/ava-force-exit.d.mts.map +1 -0
- package/src/batched-deliver.d.ts +22 -0
- package/src/batched-deliver.d.ts.map +1 -0
- package/src/build-cache-types.d.ts +33 -0
- package/src/build-cache-types.d.ts.map +1 -0
- package/src/build-cache.d.ts +12 -0
- package/src/build-cache.d.ts.map +1 -0
- package/src/callback.d.ts +28 -0
- package/src/callback.d.ts.map +1 -0
- package/src/chain-storage-paths.d.ts +15 -0
- package/src/chain-storage-paths.d.ts.map +1 -0
- package/src/chain-utils.d.ts +27 -0
- package/src/chain-utils.d.ts.map +1 -0
- package/src/cli-utils.d.ts +2 -0
- package/src/cli-utils.d.ts.map +1 -0
- package/src/config.d.ts +54 -0
- package/src/config.d.ts.map +1 -0
- package/src/debug.d.ts +5 -0
- package/src/debug.d.ts.map +1 -0
- package/src/errors.d.ts +2 -0
- package/src/errors.d.ts.map +1 -0
- package/src/hex.d.ts +15 -0
- package/src/hex.d.ts.map +1 -0
- package/src/index.d.ts +16 -0
- package/src/index.d.ts.map +1 -0
- package/src/install-ses-debug.d.ts +2 -0
- package/src/install-ses-debug.d.ts.map +1 -0
- package/src/js-utils.d.ts +44 -0
- package/src/js-utils.d.ts.map +1 -0
- package/src/keyMirror.d.ts +3 -0
- package/src/keyMirror.d.ts.map +1 -0
- package/src/kv-store.d.ts +33 -0
- package/src/kv-store.d.ts.map +1 -0
- package/src/lib-chainStorage.d.ts +182 -0
- package/src/lib-chainStorage.d.ts.map +1 -0
- package/src/lib-nodejs/ava-unhandled-rejection.d.ts +28 -0
- package/src/lib-nodejs/ava-unhandled-rejection.d.ts.map +1 -0
- package/src/lib-nodejs/engine-gc.d.ts +3 -0
- package/src/lib-nodejs/engine-gc.d.ts.map +1 -0
- package/src/lib-nodejs/gc-and-finalize.d.ts +2 -0
- package/src/lib-nodejs/gc-and-finalize.d.ts.map +1 -0
- package/src/lib-nodejs/spawnSubprocessWorker.d.ts +13 -0
- package/src/lib-nodejs/spawnSubprocessWorker.d.ts.map +1 -0
- package/src/lib-nodejs/waitUntilQuiescent.d.ts +5 -0
- package/src/lib-nodejs/waitUntilQuiescent.d.ts.map +1 -0
- package/src/lib-nodejs/worker-protocol.d.ts +4 -0
- package/src/lib-nodejs/worker-protocol.d.ts.map +1 -0
- package/src/magic-cookie-test-only.d.ts +2 -0
- package/src/magic-cookie-test-only.d.ts.map +1 -0
- package/src/marshal/board-client-utils.d.ts +19 -0
- package/src/marshal/board-client-utils.d.ts.map +1 -0
- package/src/marshal/cap-data.d.ts +11 -0
- package/src/marshal/cap-data.d.ts.map +1 -0
- package/src/marshal/inaccessible-val.d.ts +2 -0
- package/src/marshal/inaccessible-val.d.ts.map +1 -0
- package/src/marshal/pure-data.d.ts +8 -0
- package/src/marshal/pure-data.d.ts.map +1 -0
- package/src/marshal/wrap-marshaller.d.ts +60 -0
- package/src/marshal/wrap-marshaller.d.ts.map +1 -0
- package/src/method-tools.d.ts +4 -0
- package/src/method-tools.d.ts.map +1 -0
- package/src/metrics.d.ts +183 -0
- package/src/metrics.d.ts.map +1 -0
- package/src/module-utils.d.ts +3 -0
- package/src/module-utils.d.ts.map +1 -0
- package/src/natural-sort.d.ts +2 -0
- package/src/natural-sort.d.ts.map +1 -0
- package/src/netstring.d.ts +24 -0
- package/src/netstring.d.ts.map +1 -0
- package/src/node/buffer-line-transform.d.ts +50 -0
- package/src/node/buffer-line-transform.d.ts.map +1 -0
- package/src/node/createBundles.d.ts +4 -0
- package/src/node/createBundles.d.ts.map +1 -0
- package/src/node/fs-stream.d.ts +13 -0
- package/src/node/fs-stream.d.ts.map +1 -0
- package/src/node/read-json.d.ts +2 -0
- package/src/node/read-json.d.ts.map +1 -0
- package/src/node/shutdown.d.ts +6 -0
- package/src/node/shutdown.d.ts.map +1 -0
- package/src/priority-senders.d.ts +33 -0
- package/src/priority-senders.d.ts.map +1 -0
- package/src/queue.d.ts +2 -0
- package/src/queue.d.ts.map +1 -0
- package/src/scratch.d.ts +19 -0
- package/src/scratch.d.ts.map +1 -0
- package/src/ses-utils.d.ts +90 -0
- package/src/ses-utils.d.ts.map +1 -0
- package/src/storage-test-utils.d.ts +76 -0
- package/src/storage-test-utils.d.ts.map +1 -0
- package/src/testing-utils.d.ts +8 -0
- package/src/testing-utils.d.ts.map +1 -0
- package/src/tmpDir.d.ts +2 -0
- package/src/tmpDir.d.ts.map +1 -0
- package/src/tokens.d.ts +34 -0
- package/src/tokens.d.ts.map +1 -0
- package/src/typeCheck.d.ts +9 -0
- package/src/typeCheck.d.ts.map +1 -0
- package/src/typeGuards.d.ts +23 -0
- package/src/typeGuards.d.ts.map +1 -0
- package/src/types.d.ts +100 -0
- package/src/types.d.ts.map +1 -0
- package/src/upgrade-api.d.ts +18 -0
- package/src/upgrade-api.d.ts.map +1 -0
- package/src/work-pool.d.ts +13 -0
- package/src/work-pool.d.ts.map +1 -0
- package/vendor/anylogger.d.ts +1 -0
- package/vendor/anylogger.d.ts.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"netstring.d.ts","sourceRoot":"","sources":["netstring.js"],"names":[],"mappings":"AASA;;;GAGG;AACH,6BAHW,MAAM,GACJ,MAAM,CAMlB;AAGD,oDAsBC;AAED;;;;;;GAMG;AACH,6BANW,MAAM,oBAEN,MAAM,GACJ;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAmCpD;AAED;;;GAGG;AAEH,yDAJW,MAAM,GACJ,SAAS,CAqCrB;0BAxHyB,aAAa"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import {TransformOptions} from 'node:stream';
|
|
3
|
+
* @import {TransformCallback} from 'node:stream';
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @typedef {object} BufferLineTransformOptions
|
|
7
|
+
* @property {Buffer | string | number} [break] line break matcher for
|
|
8
|
+
* Buffer.indexOf() (default: 10)
|
|
9
|
+
* @property {BufferEncoding} [breakEncoding] if break is a string, the encoding
|
|
10
|
+
* to use
|
|
11
|
+
*/
|
|
12
|
+
export default class BufferLineTransform extends Transform {
|
|
13
|
+
/**
|
|
14
|
+
* The BufferLineTransform is reading String or Buffer content from a Readable
|
|
15
|
+
* stream and writing each line as a Buffer in object mode
|
|
16
|
+
*
|
|
17
|
+
* @param {TransformOptions & BufferLineTransformOptions} [options]
|
|
18
|
+
*/
|
|
19
|
+
constructor(options?: TransformOptions & BufferLineTransformOptions);
|
|
20
|
+
_breakValue: string | number | Buffer<ArrayBufferLike>;
|
|
21
|
+
_breakEncoding: BufferEncoding | undefined;
|
|
22
|
+
_breakLength: number;
|
|
23
|
+
/** @type {Buffer[]} */
|
|
24
|
+
_chunks: Buffer[];
|
|
25
|
+
/**
|
|
26
|
+
* @param {any} chunk
|
|
27
|
+
* @param {BufferEncoding | 'buffer'} encoding
|
|
28
|
+
* @param {TransformCallback} cb
|
|
29
|
+
* @override
|
|
30
|
+
*/
|
|
31
|
+
override _transform(chunk: any, encoding: BufferEncoding | "buffer", cb: TransformCallback): void;
|
|
32
|
+
/** @param {Buffer} line */
|
|
33
|
+
_writeItem(line: Buffer): void;
|
|
34
|
+
}
|
|
35
|
+
export type BufferLineTransformOptions = {
|
|
36
|
+
/**
|
|
37
|
+
* line break matcher for
|
|
38
|
+
* Buffer.indexOf() (default: 10)
|
|
39
|
+
*/
|
|
40
|
+
break?: string | number | Buffer<ArrayBufferLike> | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* if break is a string, the encoding
|
|
43
|
+
* to use
|
|
44
|
+
*/
|
|
45
|
+
breakEncoding?: BufferEncoding | undefined;
|
|
46
|
+
};
|
|
47
|
+
import { Transform } from 'node:stream';
|
|
48
|
+
import type { TransformCallback } from 'node:stream';
|
|
49
|
+
import type { TransformOptions } from 'node:stream';
|
|
50
|
+
//# sourceMappingURL=buffer-line-transform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buffer-line-transform.d.ts","sourceRoot":"","sources":["buffer-line-transform.js"],"names":[],"mappings":"AAKA;;;GAGG;AAEH;;;;;;GAMG;AAEH;IACE;;;;;OAKG;IACH,sBAFW,gBAAgB,GAAG,0BAA0B,EAyBvD;IAhBC,uDAAmC;IACnC,2CAAmC;IAWnC,qBAA+B;IAE/B,uBAAuB;IACvB,SADW,MAAM,EAAE,CACF;IAGnB;;;;;OAKG;IACH,2BALW,GAAG,YACH,cAAc,GAAG,QAAQ,MACzB,iBAAiB,QAiD3B;IAeD,2BAA2B;IAC3B,iBADY,MAAM,QAOjB;CACF;;;;;;;;;;;;;0BA1HyB,aAAa;uCAIH,aAAa;sCADd,aAAa"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export function createBundlesFromAbsolute(sourceBundles: any): Promise<void>;
|
|
2
|
+
export function createBundles(sourceBundles: any, dirname?: string): Promise<void>;
|
|
3
|
+
export function extractProposalBundles(dirProposalBuilder: any, dirname?: string): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=createBundles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createBundles.d.ts","sourceRoot":"","sources":["createBundles.js"],"names":[],"mappings":"AAUO,6EAgCN;AAEM,mFAMN;AAEM,iGAkCN"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function fsStreamReady(stream: StreamLike): Promise<void>;
|
|
2
|
+
export function makeFsStreamWriter(filePath: string | undefined | null): Promise<{
|
|
3
|
+
write: (data: any) => Promise<void>;
|
|
4
|
+
flush: () => Promise<void>;
|
|
5
|
+
close: () => Promise<void>;
|
|
6
|
+
} | undefined>;
|
|
7
|
+
export type StreamLike = ReadStream | WriteStream | Socket;
|
|
8
|
+
export type EventName = "drain" | "ready";
|
|
9
|
+
export type FsStreamWriter = NonNullable<Awaited<ReturnType<typeof makeFsStreamWriter>>>;
|
|
10
|
+
import type { ReadStream } from 'fs';
|
|
11
|
+
import type { WriteStream } from 'fs';
|
|
12
|
+
import type { Socket } from 'net';
|
|
13
|
+
//# sourceMappingURL=fs-stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs-stream.d.ts","sourceRoot":"","sources":["fs-stream.js"],"names":[],"mappings":"AAiBO,sCAHI,UAAU,GACR,OAAO,CAAC,IAAI,CAAC,CAgCtB;AA8GG,6CADK,MAAM,GAAG,SAAS,GAAG,IAAI;;;;eAsEpC;yBAxNa,UAAU,GAAG,WAAW,GAAG,MAAM;wBACjC,OAAO,GAAG,OAAO;6BAgJjB,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC;gCAtJ5C,IAAI;iCACH,IAAI;4BACT,KAAK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-json.d.ts","sourceRoot":"","sources":["read-json.js"],"names":[],"mappings":"AASO,iCAJO,CAAC,sBACJ,IAAI,CAAC,cAAc,kBAAkB,CAAC,EAAE,UAAU,CAAC,mBACnD,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,UAGlC,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,CAOxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shutdown.d.ts","sourceRoot":"","sources":["shutdown.js"],"names":[],"mappings":"AAKO;;EA8DN;AAGM,wDAON"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** @type {(namespace: string) => string} */
|
|
2
|
+
export const normalizeSenderNamespace: (namespace: string) => string;
|
|
3
|
+
export function makePrioritySendersManager(sendersNode: ERef<StorageNode>): {
|
|
4
|
+
/**
|
|
5
|
+
* @param {string} rawNamespace
|
|
6
|
+
* @param {string} address
|
|
7
|
+
* @returns {Promise<void>}
|
|
8
|
+
*/
|
|
9
|
+
add: (rawNamespace: string, address: string) => Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* @param {string} rawNamespace
|
|
12
|
+
* @param {string} address
|
|
13
|
+
* @returns {Promise<void>}
|
|
14
|
+
*/
|
|
15
|
+
remove: (rawNamespace: string, address: string) => Promise<void>;
|
|
16
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
17
|
+
/**
|
|
18
|
+
* @param {string} rawNamespace
|
|
19
|
+
* @param {string} address
|
|
20
|
+
* @returns {Promise<void>}
|
|
21
|
+
*/
|
|
22
|
+
add: (rawNamespace: string, address: string) => Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* @param {string} rawNamespace
|
|
25
|
+
* @param {string} address
|
|
26
|
+
* @returns {Promise<void>}
|
|
27
|
+
*/
|
|
28
|
+
remove: (rawNamespace: string, address: string) => Promise<void>;
|
|
29
|
+
}>;
|
|
30
|
+
export type PrioritySendersManager = ReturnType<typeof makePrioritySendersManager>;
|
|
31
|
+
import type { StorageNode } from './lib-chainStorage.js';
|
|
32
|
+
import type { ERef } from '@endo/far';
|
|
33
|
+
//# sourceMappingURL=priority-senders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"priority-senders.d.ts","sourceRoot":"","sources":["priority-senders.js"],"names":[],"mappings":"AAUA,4CAA4C;AAC5C,uCADW,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAMtC;AAQK,wDAFI,KAAK,WAAW,CAAC;IA0CxB;;;;OAIG;wBAHQ,MAAM,WACN,MAAM,KACJ,OAAO,CAAC,IAAI,CAAC;IAe1B;;;;OAIG;2BAHQ,MAAM,WACN,MAAM,KACJ,OAAO,CAAC,IAAI,CAAC;;IArB1B;;;;OAIG;wBAHQ,MAAM,WACN,MAAM,KACJ,OAAO,CAAC,IAAI,CAAC;IAe1B;;;;OAIG;2BAHQ,MAAM,WACN,MAAM,KACJ,OAAO,CAAC,IAAI,CAAC;GAuB7B;qCAGa,UAAU,CAAC,OAAO,0BAA0B,CAAC;iCA1G7B,uBAAuB;0BAD9B,WAAW"}
|
package/src/queue.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["queue.js"],"names":[],"mappings":"AAMO,kCA2BqB,OAFf,CAEoB,MAKH,GAAG,MAHlB,UAAU,CAAC,CAAC,CAGU,KAFpB,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAkB/C"}
|
package/src/scratch.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export default function makeScratchPad(): {
|
|
2
|
+
delete: (keyP: any) => Promise<void>;
|
|
3
|
+
get: (keyP: any) => Promise<any>;
|
|
4
|
+
lookup: (...path: any[]) => any;
|
|
5
|
+
init: (keyP: any, objP: any) => Promise<any>;
|
|
6
|
+
keys: () => Promise<any[]>;
|
|
7
|
+
list: () => Promise<any[]>;
|
|
8
|
+
set: (keyP: any, objP: any) => Promise<any>;
|
|
9
|
+
} & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
10
|
+
delete: (keyP: any) => Promise<void>;
|
|
11
|
+
get: (keyP: any) => Promise<any>;
|
|
12
|
+
lookup: (...path: any[]) => any;
|
|
13
|
+
init: (keyP: any, objP: any) => Promise<any>;
|
|
14
|
+
keys: () => Promise<any[]>;
|
|
15
|
+
list: () => Promise<any[]>;
|
|
16
|
+
set: (keyP: any, objP: any) => Promise<any>;
|
|
17
|
+
}>;
|
|
18
|
+
export type ScratchPad = ReturnType<typeof makeScratchPad>;
|
|
19
|
+
//# sourceMappingURL=scratch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scratch.d.ts","sourceRoot":"","sources":["scratch.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgDC;yBACa,UAAU,CAAC,OAAO,cAAc,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export function makeLimitedConsole(makeLogger: (level: string) => (...args: unknown[]) => void): LimitedConsole;
|
|
2
|
+
/**
|
|
3
|
+
* @template T
|
|
4
|
+
* @typedef {{ [KeyType in keyof T]: T[KeyType] } & {}} Simplify flatten the
|
|
5
|
+
* type output to improve type hints shown in editors
|
|
6
|
+
* https://github.com/sindresorhus/type-fest/blob/main/source/simplify.d.ts
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {(...args: any[]) => any} Callable
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* @template {{}} T
|
|
13
|
+
* @typedef {{
|
|
14
|
+
* [K in keyof T]: T[K] extends Callable ? T[K] : DeeplyAwaited<T[K]>;
|
|
15
|
+
* }} DeeplyAwaitedObject
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* @template T
|
|
19
|
+
* @typedef {T extends PromiseLike<any>
|
|
20
|
+
* ? Awaited<T>
|
|
21
|
+
* : T extends RemotableBrand<any, any> | RemotableObject
|
|
22
|
+
* ? T
|
|
23
|
+
* : T extends {}
|
|
24
|
+
* ? Simplify<DeeplyAwaitedObject<T>>
|
|
25
|
+
* : Awaited<T>} DeeplyAwaited
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* A more constrained version of {deeplyFulfilled} for type safety until
|
|
29
|
+
* https://github.com/endojs/endo/issues/1257 Useful in starting contracts that
|
|
30
|
+
* need all terms to be fulfilled in order to be durable.
|
|
31
|
+
*
|
|
32
|
+
* @type {<T extends {}>(unfulfilledTerms: T) => Promise<DeeplyAwaited<T>>}
|
|
33
|
+
*/
|
|
34
|
+
export const deeplyFulfilledObject: <T extends {}>(unfulfilledTerms: T) => Promise<DeeplyAwaited<T>>;
|
|
35
|
+
export function stripPrefix(prefix: string, str: string): string;
|
|
36
|
+
export function throwErrorCode<Code extends string>(details: Parameters<typeof makeError>[0], code: Code, opts?: Parameters<typeof makeError>[2] & {
|
|
37
|
+
constructor?: Parameters<typeof makeError>[1];
|
|
38
|
+
}): never;
|
|
39
|
+
export function tryNow<F extends (...args: any[]) => any, U = ReturnType<F>>(fn: F, transformError: (err: Error) => U, ...args: Parameters<F>): ReturnType<F> | U;
|
|
40
|
+
export function tryJsonParse(jsonText: string, onError: string | ((err: Error) => unknown)): any;
|
|
41
|
+
export function PromiseAllOrErrors<T>(items: readonly (T | PromiseLike<T>)[]): Promise<T[]>;
|
|
42
|
+
export function aggregateTryFinally<T>(trier: () => Promise<T>, finalizer: (error?: unknown) => Promise<unknown>): ReturnType<() => Promise<T>>;
|
|
43
|
+
export function withDeferredCleanup<T>(fn: (addCleanup: (fn: (err?: unknown) => Promise<void>) => void) => Promise<T>): ReturnType<(addCleanup: (fn: (err?: unknown) => Promise<void>) => void) => Promise<T>>;
|
|
44
|
+
/**
|
|
45
|
+
* @template {Record<string, unknown>} T
|
|
46
|
+
* @typedef {{ [P in keyof T]: Exclude<T[P], undefined> }} AllDefined
|
|
47
|
+
*/
|
|
48
|
+
/**
|
|
49
|
+
* Concise way to check values are available from object literal shorthand.
|
|
50
|
+
* Throws error message to specify the missing values.
|
|
51
|
+
*
|
|
52
|
+
* @type {<T extends Record<string, unknown>>(obj: T) => asserts obj is AllDefined<T>}
|
|
53
|
+
* @throws if any value in the object entries is not defined
|
|
54
|
+
*/
|
|
55
|
+
export const assertAllDefined: <T extends Record<string, unknown>>(obj: T) => asserts obj is AllDefined<T>;
|
|
56
|
+
export function attenuate<T, P extends Permit<T>>(specimen: T, permit: P, transform?: <U, SubP extends Permit<U>>(attenuation: U, permit: SubP) => U): Attenuated<T, P>;
|
|
57
|
+
export const forever: AsyncIterable<undefined>;
|
|
58
|
+
export function whileTrue<T>(produce: () => T): AsyncIterable<Awaited<T>>;
|
|
59
|
+
export function untilTrue<T>(produce: () => T): AsyncIterable<Awaited<T>>;
|
|
60
|
+
/** @type {<X, Y>(xs: X[], ys: Y[]) => [X, Y][]} */
|
|
61
|
+
export const zip: <X, Y>(xs: X[], ys: Y[]) => [X, Y][];
|
|
62
|
+
/**
|
|
63
|
+
* @type {<T extends Record<string, ERef<any>>>(
|
|
64
|
+
* obj: T,
|
|
65
|
+
* ) => Promise<{ [K in keyof T]: Awaited<T[K]> }>}
|
|
66
|
+
*/
|
|
67
|
+
export const allValues: <T extends Record<string, ERef<any>>>(obj: T) => Promise<{ [K in keyof T]: Awaited<T[K]>; }>;
|
|
68
|
+
export function synchronizedTee<T = unknown>(sourceStream: AsyncIterator<T, void, void>, readerCount: number): AsyncGenerator<T, void, void>[];
|
|
69
|
+
/**
|
|
70
|
+
* flatten the
|
|
71
|
+
* type output to improve type hints shown in editors
|
|
72
|
+
* https://github.com/sindresorhus/type-fest/blob/main/source/simplify.d.ts
|
|
73
|
+
*/
|
|
74
|
+
export type Simplify<T> = { [KeyType in keyof T]: T[KeyType]; } & {};
|
|
75
|
+
export type Callable = (...args: any[]) => any;
|
|
76
|
+
export type DeeplyAwaitedObject<T extends {}> = { [K in keyof T]: T[K] extends Callable ? T[K] : DeeplyAwaited<T[K]>; };
|
|
77
|
+
export type DeeplyAwaited<T> = T extends PromiseLike<any> ? Awaited<T> : T extends RemotableBrand<any, any> | RemotableObject ? T : T extends {} ? Simplify<DeeplyAwaitedObject<T>> : Awaited<T>;
|
|
78
|
+
export type AllDefined<T extends Record<string, unknown>> = { [P in keyof T]: Exclude<T[P], undefined>; };
|
|
79
|
+
import { objectMap } from '@endo/common/object-map.js';
|
|
80
|
+
import { objectMetaMap } from '@endo/common/object-meta-map.js';
|
|
81
|
+
import { fromUniqueEntries } from '@endo/common/from-unique-entries.js';
|
|
82
|
+
import type { LimitedConsole } from './js-utils.js';
|
|
83
|
+
import { makeError } from '@endo/errors';
|
|
84
|
+
import type { Permit } from './types.js';
|
|
85
|
+
import type { Attenuated } from './types.js';
|
|
86
|
+
import type { ERef } from '@endo/far';
|
|
87
|
+
import type { RemotableBrand } from '@endo/eventual-send';
|
|
88
|
+
import type { RemotableObject } from '@endo/pass-style';
|
|
89
|
+
export { objectMap, objectMetaMap, fromUniqueEntries };
|
|
90
|
+
//# sourceMappingURL=ses-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ses-utils.d.ts","sourceRoot":"","sources":["ses-utils.js"],"names":[],"mappings":"AAkCO,+CADK,CAAC,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,GAKvC,cAAc,CACjC;AAGD;;;;;GAKG;AAEH;;GAEG;AAEH;;;;;GAKG;AAEH;;;;;;;;;GASG;AAEH;;;;;;GAMG;AACH,oCAFU,CAAC,CAAC,SAAS,EAAE,EAAE,gBAAgB,EAAE,CAAC,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAKxE;AAwBK,oCAJI,MAAM,OACN,MAAM,GACJ,MAAM,CAKlB;AAeM,+BAPe,IAAI,SAAb,MAAQ,WACV,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,QAC/B,IAAI,SACJ,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG;IACxC,WAAW,CAAC,EAAE,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/C,SAUH;AAkBM,uBATgC,CAAC,SAA3B,CAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAI,EACxB,CAAC,sBACJ,CAAC,kBACD,CAAC,GAAG,EAAE,KAAK,KAAK,CAAC,WAGjB,UAAU,CAAC,CAAC,CAAC,GACX,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAwB7B;AAUM,uCAJI,MAAM,WACN,MAAM,GAAG,CAAC,CA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G,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,GAAE;0BAjQ/B,4BAA4B;8BACxB,iCAAiC;kCAC7B,qCAAqC;oCAWtC,eAAe;0BAVQ,cAAc;4BAkBhC,YAAY;gCAAZ,YAAY;0BAH1B,WAAW;oCACD,qBAAqB;qCACT,kBAAkB"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export function slotToRemotable(_slotId: string, iface?: string): import("@endo/marshal").RemotableObject<string> & import("@endo/eventual-send").RemotableBrand<{}, {}>;
|
|
2
|
+
/**
|
|
3
|
+
* A basic marshaller whose unserializer produces Remotables. It can only
|
|
4
|
+
* serialize plain data, not Remotables.
|
|
5
|
+
*/
|
|
6
|
+
export const defaultMarshaller: {
|
|
7
|
+
toCapData: import("@endo/marshal").ToCapData<string>;
|
|
8
|
+
fromCapData: import("@endo/marshal").FromCapData<string>;
|
|
9
|
+
serialize: import("@endo/marshal").ToCapData<string>;
|
|
10
|
+
unserialize: import("@endo/marshal").FromCapData<string>;
|
|
11
|
+
};
|
|
12
|
+
export namespace defaultSerializer {
|
|
13
|
+
let parse: (text: string) => unknown;
|
|
14
|
+
let stringify: (obj: any) => string;
|
|
15
|
+
}
|
|
16
|
+
export const slotStringUnserialize: (capData: any) => any;
|
|
17
|
+
export function makeAsyncQueue<T>(): {
|
|
18
|
+
enqueue: (data: T) => void;
|
|
19
|
+
iterable: {
|
|
20
|
+
[Symbol.asyncIterator](): AsyncGenerator<Awaited<T> | undefined, void, unknown>;
|
|
21
|
+
};
|
|
22
|
+
cancel: () => boolean;
|
|
23
|
+
};
|
|
24
|
+
export function makeFakeStorageKit(rootPath: string, rootOptions?: Parameters<typeof makeChainStorageRoot>[2], { eachMessage }?: {
|
|
25
|
+
eachMessage?: (m: StorageMessage) => void;
|
|
26
|
+
}): {
|
|
27
|
+
rootNode: import("@endo/exo").Guarded<{
|
|
28
|
+
getPath(): string;
|
|
29
|
+
getStoreKey(): Promise<VStorageKey>;
|
|
30
|
+
makeChildNode(name: string, childNodeOptions?: {
|
|
31
|
+
sequence?: boolean;
|
|
32
|
+
}): StorageNode;
|
|
33
|
+
setValue(value: string): Promise<void>;
|
|
34
|
+
}>;
|
|
35
|
+
data: Map<string, string>;
|
|
36
|
+
updateNewCellBlockHeight: (blockHeight?: number) => void;
|
|
37
|
+
getValues: (path: string) => string[];
|
|
38
|
+
messages: StorageMessage[];
|
|
39
|
+
toStorage: ((message: StorageMessage) => string | number | true | any[] | {
|
|
40
|
+
storeName: string;
|
|
41
|
+
storeSubkey: string;
|
|
42
|
+
} | null) & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, (message: StorageMessage) => string | number | true | any[] | {
|
|
43
|
+
storeName: string;
|
|
44
|
+
storeSubkey: string;
|
|
45
|
+
} | null>;
|
|
46
|
+
};
|
|
47
|
+
export function makeMockChainStorageRoot(): MockChainStorageRoot;
|
|
48
|
+
export function documentStorageSchema(t: ExecutionContext<unknown>, storage: MockChainStorageRoot | FakeStorageKit, opts: ({
|
|
49
|
+
note: string;
|
|
50
|
+
} | {
|
|
51
|
+
node: string;
|
|
52
|
+
owner: string;
|
|
53
|
+
}) & ({
|
|
54
|
+
pattern: string;
|
|
55
|
+
replacement: string;
|
|
56
|
+
} | {}) & {
|
|
57
|
+
showValue?: (v: string) => unknown;
|
|
58
|
+
}): Promise<void>;
|
|
59
|
+
export type FakeStorageKit = ReturnType<typeof makeFakeStorageKit>;
|
|
60
|
+
export type MockChainStorageRootMethods = {
|
|
61
|
+
/**
|
|
62
|
+
* Defaults to deserializing slot references into plain Remotable objects having
|
|
63
|
+
* the specified interface name (as from `Far(iface)`), but can accept a
|
|
64
|
+
* different marshaller for producing Remotables that e.g. embed the slot
|
|
65
|
+
* string in their iface name.
|
|
66
|
+
*/
|
|
67
|
+
getBody: (path: string, marshaller?: Marshaller, index?: number) => unknown;
|
|
68
|
+
keys: () => string[];
|
|
69
|
+
};
|
|
70
|
+
export type MockChainStorageRoot = StorageNode & MockChainStorageRootMethods;
|
|
71
|
+
import { makeChainStorageRoot } from './lib-chainStorage.js';
|
|
72
|
+
import type { StorageMessage } from './lib-chainStorage.js';
|
|
73
|
+
import type { StorageNode } from './lib-chainStorage.js';
|
|
74
|
+
import type { ExecutionContext } from 'ava';
|
|
75
|
+
import type { Marshaller } from './lib-chainStorage.js';
|
|
76
|
+
//# sourceMappingURL=storage-test-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-test-utils.d.ts","sourceRoot":"","sources":["storage-test-utils.js"],"names":[],"mappings":"AA0BO,yCAHI,MAAM,UACN,MAAM,0GAGC;AAElB;;;GAGG;AACH;;;;;EAEG;;eAMU,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO;mBAEzB,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM;;AA8CjC,8CAtBuB,GAAG,KAAK,GAAG,CAsB+B;AAa1D,+BAFM,CAAC;oBASA,CAAC;;;;;EA6Bd;AAWM,6CAJI,MAAM,gBACN,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,oBAC1C;IAAE,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAA;CAAE;;;;;oBAwD3B,CAAC;;;;UA4FT,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;;sBAd3B,MAAM,KACJ,MAAM,EAAE;;0BA/FP,cAAc;;;2IAAd,cAAc;;;;EAkH7B;AAoBM,4CADO,oBAAoB,CA2BjC;AAUM,yCAPI,iBAAiB,OAAO,CAAC,WACzB,oBAAoB,GAAG,cAAc,QACrC,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,GAC9D,CAAK;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,EAAE,CAAC,GAAG;IAChD,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC;CACpC,iBAkDL;6BAtGa,UAAU,CAAC,OAAO,kBAAkB,CAAC;;;;;;;;aAIrC,CACT,IAAI,EAAE,MAAM,EACZ,UAAU,CAAC,EAAE,UAAU,EACvB,KAAK,CAAC,EAAE,MAAM,KACX,OAAO;UAKD,MAAM,MAAM,EAAE;;mCAEd,WAAW,GAAG,2BAA2B;qCAxTJ,uBAAuB;oCAOU,uBAAuB;iCAAvB,uBAAuB;sCACxE,KAAK;gCAD4C,uBAAuB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function eventLoopIteration(): Promise<any>;
|
|
2
|
+
export function inspectMapStore(store: MapStore): object;
|
|
3
|
+
export function testInterruptedSteps<Input = any, Context = unknown>(t: AvaT<Context>, allSteps: readonly TestStep<Input>[], doInterrupt?: (t: AvaT<Context>) => ERef<void>): Promise<void>;
|
|
4
|
+
export type TestStep<Input = any> = readonly [stepName: string, fn: (input: Partial<Input>, label: string) => Partial<Input> | PromiseLike<Partial<Input>>];
|
|
5
|
+
import type { MapStore } from '@agoric/store';
|
|
6
|
+
import type { ExecutionContext as AvaT } from 'ava';
|
|
7
|
+
import type { ERef } from '@endo/eventual-send';
|
|
8
|
+
//# sourceMappingURL=testing-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing-utils.d.ts","sourceRoot":"","sources":["testing-utils.js"],"names":[],"mappings":"AAmBO,mDACwC;AAgBxC,uCAHI,QAAQ,GACN,MAAM,CAsBlB;AAqBM,qCANO,KAAK,QACL,OAAO,eACV,KAAK,OAAO,CAAC,YACb,SAAS,QAAQ,CAAC,KAAK,CAAC,EAAE,gBAC1B,CAAC,CAAC,EAAE,KAAK,OAAO,CAAC,KAAK,KAAK,IAAI,CAAC,iBA8D1C;qBA7Ea,KAAK,UACN,SAAS,CACjB,QAAQ,EAAE,MAAM,EAChB,EAAE,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,KAAK,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAC3F;8BAzDuB,eAAe;8CACC,KAAK;0BACzB,qBAAqB"}
|
package/src/tmpDir.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tmpDir.d.ts","sourceRoot":"","sources":["tmpDir.js"],"names":[],"mappings":"AAMO,wCAFI,IAAI,CAAC,oBAAa,EAAE,SAAS,CAAC,aAGlB,MAAM,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,CASvE"}
|
package/src/tokens.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export namespace Stable {
|
|
2
|
+
export let symbol: "IST";
|
|
3
|
+
export let denom: "uist";
|
|
4
|
+
export let proposedName: "Agoric stable token";
|
|
5
|
+
export { NAT as assetKind };
|
|
6
|
+
export namespace displayInfo {
|
|
7
|
+
export let decimalPlaces: 6;
|
|
8
|
+
export { NAT as assetKind };
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export namespace Stake {
|
|
12
|
+
let symbol_1: "BLD";
|
|
13
|
+
export { symbol_1 as symbol };
|
|
14
|
+
let denom_1: "ubld";
|
|
15
|
+
export { denom_1 as denom };
|
|
16
|
+
let proposedName_1: "Agoric staking token";
|
|
17
|
+
export { proposedName_1 as proposedName };
|
|
18
|
+
export { NAT as assetKind };
|
|
19
|
+
export namespace displayInfo_1 {
|
|
20
|
+
let decimalPlaces_1: 6;
|
|
21
|
+
export { decimalPlaces_1 as decimalPlaces };
|
|
22
|
+
export { NAT as assetKind };
|
|
23
|
+
}
|
|
24
|
+
export { displayInfo_1 as displayInfo };
|
|
25
|
+
}
|
|
26
|
+
export type TokenKeyword = "IST" | "BLD";
|
|
27
|
+
/** @typedef {'IST' | 'BLD'} TokenKeyword */
|
|
28
|
+
/**
|
|
29
|
+
* This is defined by ERTP. For dependency pragmatism it's repeated here. We
|
|
30
|
+
* rely on the static type check and unit tests to detect any incompatibility.
|
|
31
|
+
*/
|
|
32
|
+
declare const NAT: "nat";
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["tokens.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;2BAEc,KAAK,GAAG,KAAK;AAA3B,4CAA4C;AAE5C;;;GAGG;AACH,mBAAY,KAAK,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import {MustMatch, PatternType, TypedPattern} from './types.js';
|
|
3
|
+
*/
|
|
4
|
+
/** @type {MustMatch} */
|
|
5
|
+
export const mustMatch: MustMatch;
|
|
6
|
+
export function cast<M>(specimen: unknown, patt: TypedPattern<M>): M;
|
|
7
|
+
import type { MustMatch } from './types.js';
|
|
8
|
+
import type { TypedPattern } from './types.js';
|
|
9
|
+
//# sourceMappingURL=typeCheck.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeCheck.d.ts","sourceRoot":"","sources":["typeCheck.js"],"names":[],"mappings":"AAGA;;GAEG;AAEH,wBAAwB;AACxB,wBADW,SAAS,CACuB;AAQpC,qBALM,CAAC,YACH,OAAO,QACP,aAAa,CAAC,CAAC,GACb,CAAC,CAQb;+BAlBsD,YAAY;kCAAZ,YAAY"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import {TypedPattern} from './types.js';
|
|
3
|
+
*/
|
|
4
|
+
export const StorageNodeShape: import("@endo/patterns").Matcher;
|
|
5
|
+
/** To be used only for 'helper' facets where the calls are from trusted code. */
|
|
6
|
+
export const UnguardedHelperI: import("@endo/patterns").InterfaceGuard<any>;
|
|
7
|
+
/**
|
|
8
|
+
* @typedef {number | `${bigint}`} BridgeBigInt Ensure that callees passed a
|
|
9
|
+
* bridge message that was serialised from a Golang int64 or uint64 accept
|
|
10
|
+
* either a JS number or a stringified JS bigint.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* @type {TypedPattern<BridgeBigInt>}
|
|
14
|
+
*/
|
|
15
|
+
export const BridgeBigIntShape: TypedPattern<BridgeBigInt>;
|
|
16
|
+
/**
|
|
17
|
+
* Ensure that callees passed a
|
|
18
|
+
* bridge message that was serialised from a Golang int64 or uint64 accept
|
|
19
|
+
* either a JS number or a stringified JS bigint.
|
|
20
|
+
*/
|
|
21
|
+
export type BridgeBigInt = number | `${bigint}`;
|
|
22
|
+
import type { TypedPattern } from './types.js';
|
|
23
|
+
//# sourceMappingURL=typeGuards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAIA;;GAEG;AAEH,gEAA2D;AAE3D,iFAAiF;AACjF,4EAKE;AAEF;;;;GAIG;AAEH;;GAEG;AACH,gCAFU,aAAa,YAAY,CAAC,CAE0B;;;;;;2BARjD,MAAM,GAAG,GAAG,MAAM,EAAE;kCAdF,YAAY"}
|
package/src/types.d.ts
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { ERef, RemotableBrand } from '@endo/eventual-send';
|
|
2
|
+
import type { Primitive, RemotableObject } from '@endo/pass-style';
|
|
3
|
+
import type { Pattern } from '@endo/patterns';
|
|
4
|
+
import type { Callable } from './ses-utils.js';
|
|
5
|
+
/**
|
|
6
|
+
* A mapping of a tuple type (as from `Parameters<...>`) into a corresponding
|
|
7
|
+
* object type with named fields.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```
|
|
11
|
+
* RecordFromTuple<[string, bigint], ['denom', 'amount']>
|
|
12
|
+
* //=> { denom: string, amount: bigint }
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export type RecordFromTuple<Types extends readonly unknown[], Names extends Record<Exclude<keyof Types, keyof unknown[]>, string>> = {
|
|
16
|
+
[K in Exclude<keyof Types, keyof any[]> as Names[K]]: Types[K];
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* A map corresponding with a total function such that `get(key)` is assumed to
|
|
20
|
+
* always succeed.
|
|
21
|
+
*/
|
|
22
|
+
export type TotalMap<K, V> = Omit<Map<K, V>, 'get'> & {
|
|
23
|
+
/** Returns the element associated with the specified key in the TotalMap. */
|
|
24
|
+
get: (key: K) => V;
|
|
25
|
+
};
|
|
26
|
+
export type TotalMapFrom<M extends Map<any, any>> = M extends Map<infer K, infer V> ? TotalMap<K, V> : never;
|
|
27
|
+
/**
|
|
28
|
+
* A permit is either `true` or a string (both meaning no attenuation, with a
|
|
29
|
+
* string serving as a grouping label for convenience and/or diagram
|
|
30
|
+
* generation), or an object whose keys identify child properties and whose
|
|
31
|
+
* corresponding values are theirselves (recursive) Permits.
|
|
32
|
+
*/
|
|
33
|
+
export type Permit<T> = true | string | Partial<{
|
|
34
|
+
[K in keyof T]: K extends string ? Permit<T[K]> : never;
|
|
35
|
+
}>;
|
|
36
|
+
export type Attenuated<T, P extends Permit<T>> = P extends object ? {
|
|
37
|
+
[K in keyof P]: K extends keyof T ? P[K] extends Permit<T[K]> ? Attenuated<T[K], P[K]> : never : never;
|
|
38
|
+
} : T;
|
|
39
|
+
export declare class Callback<I extends (...args: any[]) => any> {
|
|
40
|
+
private iface;
|
|
41
|
+
target: any;
|
|
42
|
+
methodName?: PropertyKey;
|
|
43
|
+
bound: unknown[];
|
|
44
|
+
isSync: boolean;
|
|
45
|
+
}
|
|
46
|
+
export declare class SyncCallback<I extends (...args: unknown[]) => any> extends Callback<I> {
|
|
47
|
+
private syncIface;
|
|
48
|
+
isSync: true;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Returns a boolean for whether the given type is a primitive value or
|
|
52
|
+
* primitive type.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```
|
|
56
|
+
* IsPrimitive<'string'>
|
|
57
|
+
* //=> true
|
|
58
|
+
*
|
|
59
|
+
* IsPrimitive<string>
|
|
60
|
+
* //=> true
|
|
61
|
+
*
|
|
62
|
+
* IsPrimitive<Object>
|
|
63
|
+
* //=> false
|
|
64
|
+
*/
|
|
65
|
+
export type IsPrimitive<T> = [T] extends [Primitive] ? true : false;
|
|
66
|
+
export type IsRemotable<T> = T extends RemotableObject ? true : T extends RemotableBrand<any, any> ? true : false;
|
|
67
|
+
/** Recursively extract the non-callable properties of T */
|
|
68
|
+
export type DataOnly<T> = IsPrimitive<T> extends true ? T : T extends Callable ? never : {
|
|
69
|
+
[P in keyof T as T[P] extends Callable ? never : P]: DataOnly<T[P]>;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* A type that doesn't assume its parameter is local, but is satisfied with both
|
|
73
|
+
* local and remote references. It accepts both near and marshalled references
|
|
74
|
+
* that were returned from `Remotable` or `Far`.
|
|
75
|
+
*/
|
|
76
|
+
export type Remote<Primary, Local = DataOnly<Primary>> = Primary | RemotableBrand<Local, Primary>;
|
|
77
|
+
/**
|
|
78
|
+
* A type that accepts either resolved or promised references that may be either
|
|
79
|
+
* near or marshalled. @see {ERef} and @see {Remote}.
|
|
80
|
+
*/
|
|
81
|
+
export type ERemote<Primary, Local = DataOnly<Primary>> = ERef<Remote<Primary, Local>>;
|
|
82
|
+
declare const validatedType: 'Symbol(validatedType)';
|
|
83
|
+
/**
|
|
84
|
+
* Tag a pattern with the static type it represents.
|
|
85
|
+
*/
|
|
86
|
+
export type TypedPattern<T> = Pattern & {
|
|
87
|
+
[validatedType]?: T;
|
|
88
|
+
};
|
|
89
|
+
export declare type PatternType<TM extends TypedPattern<any>> = TM extends TypedPattern<infer T> ? T : never;
|
|
90
|
+
/**
|
|
91
|
+
* Returning normally indicates success. Match failure is indicated by
|
|
92
|
+
* throwing.
|
|
93
|
+
*
|
|
94
|
+
* Note: remotables can only be matched as "remotable", not the specific kind.
|
|
95
|
+
*
|
|
96
|
+
* @see {endoMustMatch} for the implementation. This one has a type annotation to narrow if the pattern is a TypedPattern.
|
|
97
|
+
*/
|
|
98
|
+
export declare type MustMatch = <P extends Pattern>(specimen: unknown, pattern: P, label?: string | number) => asserts specimen is P extends TypedPattern<any> ? PatternType<P> : unknown;
|
|
99
|
+
export type { TraceLogger } from './debug.js';
|
|
100
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGnE,OAAO,KAAK,EAA8B,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;;;;;;;GASG;AACH,MAAM,MAAM,eAAe,CACzB,KAAK,SAAS,SAAS,OAAO,EAAE,EAChC,KAAK,SAAS,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,EAAE,MAAM,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,IACjE;KAAG,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,EAAE,MAAM,GAAG,EAAE,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;CAAE,CAAC;AAEvE;;;GAGG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG;IACpD,6EAA6E;IAC7E,GAAG,EAAE,CAAC,GAAG,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,CAAC,EAAE,SAAS,YAAY,CAAC,GAAG,CAAC,IAC1D,EAAE,SAAS,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAG/C;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,MAAM,SAAS,GAAG,CAAC,CAAC,SAAS,OAAO,EAChD,QAAQ,EAAE,OAAO,EACjB,OAAO,EAAE,CAAC,EACV,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,KACpB,OAAO,CAAC,QAAQ,IAAI,CAAC,SAAS,YAAY,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC;AAEhF,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export namespace UpgradeDisconnectionShape {
|
|
2
|
+
let name: string;
|
|
3
|
+
let upgradeMessage: import("@endo/patterns").Matcher;
|
|
4
|
+
let incarnationNumber: import("@endo/patterns").Matcher;
|
|
5
|
+
}
|
|
6
|
+
export function makeUpgradeDisconnection(upgradeMessage: string, toIncarnationNumber: number): UpgradeDisconnection;
|
|
7
|
+
export function isUpgradeDisconnection(reason: any): reason is UpgradeDisconnection;
|
|
8
|
+
export function isAbandonedError(reason: any): reason is Error;
|
|
9
|
+
/**
|
|
10
|
+
* An Error-like object for use as the rejection reason of promises abandoned by
|
|
11
|
+
* upgrade.
|
|
12
|
+
*/
|
|
13
|
+
export type UpgradeDisconnection = {
|
|
14
|
+
name: "vatUpgraded";
|
|
15
|
+
upgradeMessage: string;
|
|
16
|
+
incarnationNumber: number;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=upgrade-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upgrade-api.d.ts","sourceRoot":"","sources":["upgrade-api.js"],"names":[],"mappings":";;;;;AA+BO,yDAJI,MAAM,uBACN,MAAM,GACJ,oBAAoB,CAO7B;AASG,+CALI,GAAG,GAGD,MAAM,IAAI,oBAAoB,CAMC;AAgBrC,yCAHI,GAAG,GACD,MAAM,IAAI,KAAK,CASS;;;;;mCA9DxB;IACR,IAAI,EAAE,aAAa,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;CAC3B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function makeWorkPool<T, U = T, M extends "all" | "allSettled" = "all">(source: AsyncIterable<T> | Iterable<T>, config: undefined | [capacity: number][0] | {
|
|
2
|
+
capacity?: number;
|
|
3
|
+
mode?: M;
|
|
4
|
+
}, processInput?: (input: Awaited<T>, index?: number) => Promise<Awaited<U>> | Awaited<U>): AsyncGenerator<[M extends "allSettled" ? PromiseSettledResult<Awaited<U>> : Awaited<U>, number]> & {
|
|
5
|
+
done: Promise<boolean>;
|
|
6
|
+
then: () => never;
|
|
7
|
+
};
|
|
8
|
+
export type PromiseKit<T> = {
|
|
9
|
+
resolve: (value: T | PromiseLike<T>) => void;
|
|
10
|
+
reject: (reason: any) => void;
|
|
11
|
+
promise: Promise<T>;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=work-pool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work-pool.d.ts","sourceRoot":"","sources":["work-pool.js"],"names":[],"mappings":"AAgFO,6BAlBM,CAAC,EACA,CAAC,MACsB,CAAC,SAAxB,KAAK,GAAG,YAAa,kBACxB,aAAa,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,UAC9B,SAAS,GACb,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,GACrB;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,CAAC,CAAA;CAAE,iBAC3B,CACN,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,EACjB,KAAK,CAAC,EAAE,MAAM,KACX,OAAO,CAAC,OAAO,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