@agoric/client-utils 0.1.1-dev-a29afed.0.a29afed → 0.1.1-dev-cb1866d.0.cb1866d
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/dist/bundle-utils.d.ts +95 -0
- package/dist/bundle-utils.d.ts.map +1 -0
- package/dist/bundle-utils.js +219 -0
- package/dist/bundle-utils.js.map +1 -0
- package/dist/codegen/agoric/bundle.d.ts +94 -11
- package/dist/codegen/agoric/bundle.d.ts.map +1 -1
- package/dist/codegen/agoric/rpc.query.d.ts +1 -0
- package/dist/codegen/agoric/rpc.query.d.ts.map +1 -1
- package/dist/codegen/agoric/swingset/msgs.d.ts +138 -33
- package/dist/codegen/agoric/swingset/msgs.d.ts.map +1 -1
- package/dist/codegen/agoric/swingset/msgs.js +270 -46
- package/dist/codegen/agoric/swingset/msgs.js.map +1 -1
- package/dist/codegen/agoric/swingset/msgs.rpc.msg.d.ts +4 -1
- package/dist/codegen/agoric/swingset/msgs.rpc.msg.d.ts.map +1 -1
- package/dist/codegen/agoric/swingset/msgs.rpc.msg.js +7 -1
- package/dist/codegen/agoric/swingset/msgs.rpc.msg.js.map +1 -1
- package/dist/codegen/agoric/swingset/query.d.ts +54 -1
- package/dist/codegen/agoric/swingset/query.d.ts.map +1 -1
- package/dist/codegen/agoric/swingset/query.js +181 -1
- package/dist/codegen/agoric/swingset/query.js.map +1 -1
- package/dist/codegen/agoric/swingset/query.rpc.Query.d.ts +5 -1
- package/dist/codegen/agoric/swingset/query.rpc.Query.d.ts.map +1 -1
- package/dist/codegen/agoric/swingset/query.rpc.Query.js +10 -1
- package/dist/codegen/agoric/swingset/query.rpc.Query.js.map +1 -1
- package/dist/codegen/agoric/swingset/swingset.d.ts +170 -0
- package/dist/codegen/agoric/swingset/swingset.d.ts.map +1 -1
- package/dist/codegen/agoric/swingset/swingset.js +473 -0
- package/dist/codegen/agoric/swingset/swingset.js.map +1 -1
- package/dist/codegen/varint.d.ts +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +1 -0
- package/dist/main.js.map +1 -1
- package/package.json +9 -9
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { EncodeObject, GeneratedType } from '@cosmjs/proto-signing';
|
|
2
|
+
import { Registry } from '@cosmjs/proto-signing';
|
|
3
|
+
import type { DeliverTxResponse } from '@cosmjs/stargate';
|
|
4
|
+
import type { ChunkedArtifact, ChunkInfo } from './codegen/agoric/swingset/swingset.js';
|
|
5
|
+
export interface BundleJson {
|
|
6
|
+
moduleFormat: 'endoZipBase64';
|
|
7
|
+
endoZipBase64: string;
|
|
8
|
+
endoZipBase64Sha512: string;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
export type Sha512 = (bytes: Uint8Array) => Promise<Uint8Array>;
|
|
12
|
+
export type Gzip = (bytes: Uint8Array) => Promise<Uint8Array>;
|
|
13
|
+
export declare const bundleRegistryTypes: [string, GeneratedType][];
|
|
14
|
+
export declare const makeBundleRegistry: (baseTypes?: readonly [string, GeneratedType][]) => Registry;
|
|
15
|
+
export declare const encodeBundle: (bundleJson: string) => Uint8Array<ArrayBuffer>;
|
|
16
|
+
export declare const defaultSha512: Sha512;
|
|
17
|
+
export declare const getSha512Hex: (bytes: Uint8Array, { sha512 }?: {
|
|
18
|
+
sha512?: Sha512;
|
|
19
|
+
}) => Promise<string>;
|
|
20
|
+
export declare const validateBundleJson: (bundleString: string) => BundleJson;
|
|
21
|
+
export declare const chunkBundle: (bytes: Uint8Array, chunkSizeLimit: number, { sha512 }?: {
|
|
22
|
+
sha512?: Sha512;
|
|
23
|
+
}) => Promise<{
|
|
24
|
+
chunks: Uint8Array<ArrayBufferLike>[];
|
|
25
|
+
manifest: {
|
|
26
|
+
sha512: string;
|
|
27
|
+
sizeBytes: bigint;
|
|
28
|
+
chunks: ChunkInfo[];
|
|
29
|
+
};
|
|
30
|
+
}>;
|
|
31
|
+
export interface MsgInstallArgs {
|
|
32
|
+
uncompressedSize: bigint;
|
|
33
|
+
compressedBundle?: Uint8Array;
|
|
34
|
+
chunkedArtifact?: ChunkedArtifact;
|
|
35
|
+
submitter: string;
|
|
36
|
+
}
|
|
37
|
+
export declare const makeInstallBundleMsg: ({ compressedBundle, uncompressedSize, chunkedArtifact, submitter, }: MsgInstallArgs) => EncodeObject;
|
|
38
|
+
export interface MsgSendChunkArgs {
|
|
39
|
+
chunkedArtifactId: bigint;
|
|
40
|
+
chunkIndex: bigint;
|
|
41
|
+
chunkData: Uint8Array;
|
|
42
|
+
submitter: string;
|
|
43
|
+
}
|
|
44
|
+
export declare const makeSendChunkMsg: ({ chunkedArtifactId, chunkIndex, chunkData, submitter, }: MsgSendChunkArgs) => EncodeObject;
|
|
45
|
+
export type InstallBundleProgress = {
|
|
46
|
+
type: 'preflight';
|
|
47
|
+
bundleHash: string;
|
|
48
|
+
uncompressedSize: number;
|
|
49
|
+
compressedSize: number;
|
|
50
|
+
chunked: boolean;
|
|
51
|
+
chunkCount?: number;
|
|
52
|
+
} | {
|
|
53
|
+
type: 'bundle-submitted';
|
|
54
|
+
bundleHash: string;
|
|
55
|
+
height: number;
|
|
56
|
+
} | {
|
|
57
|
+
type: 'manifest-submitted';
|
|
58
|
+
bundleHash: string;
|
|
59
|
+
height: number;
|
|
60
|
+
chunkCount: number;
|
|
61
|
+
chunkedArtifactId: bigint;
|
|
62
|
+
} | {
|
|
63
|
+
type: 'chunk-submitted';
|
|
64
|
+
bundleHash: string;
|
|
65
|
+
height: number;
|
|
66
|
+
index: number;
|
|
67
|
+
total: number;
|
|
68
|
+
} | {
|
|
69
|
+
type: 'watching';
|
|
70
|
+
bundleHash: string;
|
|
71
|
+
height: number;
|
|
72
|
+
};
|
|
73
|
+
export interface InstallBundleParams {
|
|
74
|
+
bundleJson: string;
|
|
75
|
+
chunkSizeLimit: number;
|
|
76
|
+
submitter: string;
|
|
77
|
+
gzip: Gzip;
|
|
78
|
+
signAndBroadcast: (msg: EncodeObject) => Promise<DeliverTxResponse | undefined>;
|
|
79
|
+
sha512?: Sha512;
|
|
80
|
+
makeInstallBundleMsg?: (args: MsgInstallArgs) => EncodeObject;
|
|
81
|
+
makeSendChunkMsg?: (args: MsgSendChunkArgs) => EncodeObject;
|
|
82
|
+
watchBundle?: (bundleHash: string, height: number) => Promise<void>;
|
|
83
|
+
onProgress?: (event: InstallBundleProgress) => void;
|
|
84
|
+
}
|
|
85
|
+
export interface InstallBundleResult {
|
|
86
|
+
bundleHash: string;
|
|
87
|
+
blockHeight: number;
|
|
88
|
+
chunked: boolean;
|
|
89
|
+
chunkCount?: number;
|
|
90
|
+
compressedSize: number;
|
|
91
|
+
uncompressedSize: number;
|
|
92
|
+
chunkedArtifactId?: bigint;
|
|
93
|
+
}
|
|
94
|
+
export declare const installBundle: (params: InstallBundleParams) => Promise<InstallBundleResult>;
|
|
95
|
+
//# sourceMappingURL=bundle-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-utils.d.ts","sourceRoot":"","sources":["../src/bundle-utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAM1D,OAAO,KAAK,EACV,eAAe,EACf,SAAS,EACV,MAAM,uCAAuC,CAAC;AAE/C,MAAM,WAAW,UAAU;IACzB,YAAY,EAAE,eAAe,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,MAAM,MAAM,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;AAChE,MAAM,MAAM,IAAI,GAAG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AAC;CACrD;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,aAAa,GACxB,QAAQ,mBAAmB,KAC1B,OAAO,CAAC,mBAAmB,CAqL7B,CAAC"}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { fromBech32, toHex } from '@cosmjs/encoding';
|
|
2
|
+
import { Registry } from '@cosmjs/proto-signing';
|
|
3
|
+
import { defaultRegistryTypes } from '@cosmjs/stargate';
|
|
4
|
+
import { MsgInstallBundle, MsgInstallBundleResponse, MsgSendChunk, } from './codegen/agoric/swingset/msgs.js';
|
|
5
|
+
export const bundleRegistryTypes = [
|
|
6
|
+
[MsgInstallBundle.typeUrl, MsgInstallBundle],
|
|
7
|
+
[MsgSendChunk.typeUrl, MsgSendChunk],
|
|
8
|
+
];
|
|
9
|
+
export const makeBundleRegistry = (baseTypes = defaultRegistryTypes) => new Registry([...baseTypes, ...bundleRegistryTypes]);
|
|
10
|
+
export const encodeBundle = (bundleJson) => new TextEncoder().encode(bundleJson);
|
|
11
|
+
export const defaultSha512 = async (bytes) => {
|
|
12
|
+
const subtle = globalThis.crypto?.subtle;
|
|
13
|
+
if (!subtle) {
|
|
14
|
+
throw new Error('crypto.subtle is required; provide a sha512 function');
|
|
15
|
+
}
|
|
16
|
+
const digest = await subtle.digest('SHA-512', bytes);
|
|
17
|
+
return new Uint8Array(digest);
|
|
18
|
+
};
|
|
19
|
+
export const getSha512Hex = async (bytes, { sha512 = defaultSha512 } = {}) => {
|
|
20
|
+
const digest = await sha512(bytes);
|
|
21
|
+
return toHex(digest);
|
|
22
|
+
};
|
|
23
|
+
export const validateBundleJson = (bundleString) => {
|
|
24
|
+
let bundleObject;
|
|
25
|
+
try {
|
|
26
|
+
bundleObject = JSON.parse(bundleString);
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
throw new Error(`The submitted file is not in the expected format, not parsable as JSON: ${error instanceof Error ? error.message : String(error)}`);
|
|
30
|
+
}
|
|
31
|
+
const { moduleFormat, endoZipBase64, endoZipBase64Sha512 } = bundleObject;
|
|
32
|
+
if (moduleFormat !== 'endoZipBase64') {
|
|
33
|
+
throw new Error(`The submitted file does not have the expected moduleFormat value of endoZipBase64, got: ${moduleFormat}`);
|
|
34
|
+
}
|
|
35
|
+
if (typeof endoZipBase64 !== 'string') {
|
|
36
|
+
throw new Error('The submitted file does not have the expected endoZipBase64 property');
|
|
37
|
+
}
|
|
38
|
+
if (typeof endoZipBase64Sha512 !== 'string') {
|
|
39
|
+
throw new Error('The submitted file does not have the expected endoZipBase64Sha512 property');
|
|
40
|
+
}
|
|
41
|
+
return bundleObject;
|
|
42
|
+
};
|
|
43
|
+
export const chunkBundle = async (bytes, chunkSizeLimit, { sha512 = defaultSha512 } = {}) => {
|
|
44
|
+
if (!Number.isSafeInteger(chunkSizeLimit) || chunkSizeLimit <= 0) {
|
|
45
|
+
throw new Error(`chunkSizeLimit must be a positive safe integer, got ${chunkSizeLimit}`);
|
|
46
|
+
}
|
|
47
|
+
const bundleSha512Hex = await getSha512Hex(bytes, { sha512 });
|
|
48
|
+
const chunks = [];
|
|
49
|
+
const info = [];
|
|
50
|
+
for (let i = 0; i < bytes.byteLength; i += chunkSizeLimit) {
|
|
51
|
+
const chunk = bytes.subarray(i, Math.min(bytes.byteLength, i + chunkSizeLimit));
|
|
52
|
+
const chunkSha512Hex = await getSha512Hex(chunk, { sha512 });
|
|
53
|
+
chunks.push(chunk);
|
|
54
|
+
info.push({
|
|
55
|
+
sha512: chunkSha512Hex,
|
|
56
|
+
sizeBytes: BigInt(chunk.byteLength),
|
|
57
|
+
state: 0,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
chunks,
|
|
62
|
+
manifest: {
|
|
63
|
+
sha512: bundleSha512Hex,
|
|
64
|
+
sizeBytes: BigInt(bytes.byteLength),
|
|
65
|
+
chunks: info,
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
export const makeInstallBundleMsg = ({ compressedBundle, uncompressedSize, chunkedArtifact, submitter, }) => ({
|
|
70
|
+
typeUrl: MsgInstallBundle.typeUrl,
|
|
71
|
+
value: {
|
|
72
|
+
uncompressedSize,
|
|
73
|
+
submitter: fromBech32(submitter).data,
|
|
74
|
+
...(compressedBundle ? { compressedBundle } : {}),
|
|
75
|
+
...(chunkedArtifact ? { chunkedArtifact } : {}),
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
export const makeSendChunkMsg = ({ chunkedArtifactId, chunkIndex, chunkData, submitter, }) => ({
|
|
79
|
+
typeUrl: MsgSendChunk.typeUrl,
|
|
80
|
+
value: {
|
|
81
|
+
chunkedArtifactId,
|
|
82
|
+
chunkIndex,
|
|
83
|
+
chunkData,
|
|
84
|
+
submitter: fromBech32(submitter).data,
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
export const installBundle = async (params) => {
|
|
88
|
+
const { bundleJson, chunkSizeLimit, submitter, gzip, signAndBroadcast, sha512, makeInstallBundleMsg: makeInstallBundleMsgParam = makeInstallBundleMsg, makeSendChunkMsg: makeSendChunkMsgParam = makeSendChunkMsg, watchBundle, onProgress, } = params;
|
|
89
|
+
const bundleObject = validateBundleJson(bundleJson);
|
|
90
|
+
const { endoZipBase64Sha512 } = bundleObject;
|
|
91
|
+
const uncompressedBundleBytes = encodeBundle(bundleJson);
|
|
92
|
+
const compressedBundleBytes = await gzip(uncompressedBundleBytes);
|
|
93
|
+
const compressedSize = compressedBundleBytes.byteLength;
|
|
94
|
+
const uncompressedSize = uncompressedBundleBytes.byteLength;
|
|
95
|
+
const shouldChunk = compressedBundleBytes.byteLength > chunkSizeLimit;
|
|
96
|
+
onProgress?.({
|
|
97
|
+
type: 'preflight',
|
|
98
|
+
bundleHash: endoZipBase64Sha512,
|
|
99
|
+
uncompressedSize,
|
|
100
|
+
compressedSize,
|
|
101
|
+
chunked: shouldChunk,
|
|
102
|
+
chunkCount: shouldChunk
|
|
103
|
+
? Math.ceil(compressedBundleBytes.byteLength / chunkSizeLimit)
|
|
104
|
+
: undefined,
|
|
105
|
+
});
|
|
106
|
+
let blockHeight;
|
|
107
|
+
let chunkedArtifactId;
|
|
108
|
+
if (!shouldChunk) {
|
|
109
|
+
const txMsg = makeInstallBundleMsgParam({
|
|
110
|
+
compressedBundle: compressedBundleBytes,
|
|
111
|
+
uncompressedSize: BigInt(uncompressedSize),
|
|
112
|
+
submitter,
|
|
113
|
+
});
|
|
114
|
+
try {
|
|
115
|
+
const txResponse = await signAndBroadcast(txMsg);
|
|
116
|
+
if (!txResponse) {
|
|
117
|
+
throw new Error('no response for bundle');
|
|
118
|
+
}
|
|
119
|
+
blockHeight = txResponse.height;
|
|
120
|
+
onProgress?.({
|
|
121
|
+
type: 'bundle-submitted',
|
|
122
|
+
bundleHash: endoZipBase64Sha512,
|
|
123
|
+
height: blockHeight,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
catch (error) {
|
|
127
|
+
throw new Error(`Transaction failed to submit bundle to chain: ${error instanceof Error ? error.message : String(error)}`);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
const { chunks, manifest } = await chunkBundle(compressedBundleBytes, chunkSizeLimit, { sha512 });
|
|
132
|
+
const txMsg = makeInstallBundleMsgParam({
|
|
133
|
+
uncompressedSize: BigInt(uncompressedSize),
|
|
134
|
+
submitter,
|
|
135
|
+
chunkedArtifact: manifest,
|
|
136
|
+
});
|
|
137
|
+
try {
|
|
138
|
+
const txResponse = await signAndBroadcast(txMsg);
|
|
139
|
+
if (!txResponse) {
|
|
140
|
+
throw new Error(`No transaction response for attempt to submit manifest for bundle ${endoZipBase64Sha512}`);
|
|
141
|
+
}
|
|
142
|
+
blockHeight = txResponse.height;
|
|
143
|
+
const installBundleResponse = txResponse.msgResponses.find(response => response.typeUrl === MsgInstallBundleResponse.typeUrl);
|
|
144
|
+
if (!installBundleResponse) {
|
|
145
|
+
throw new Error(`No install bundle response found in manifest submission transaction response for bundle ${endoZipBase64Sha512}. This is a software defect. Please report.`);
|
|
146
|
+
}
|
|
147
|
+
const { chunkedArtifactId: decodedChunkedArtifactId } = MsgInstallBundleResponse.decode(installBundleResponse.value);
|
|
148
|
+
if (decodedChunkedArtifactId === null ||
|
|
149
|
+
decodedChunkedArtifactId === undefined ||
|
|
150
|
+
decodedChunkedArtifactId === 0n ||
|
|
151
|
+
decodedChunkedArtifactId === 0) {
|
|
152
|
+
throw new Error(`No chunked artifact identifier found in manifest submission transaction response for bundle ${endoZipBase64Sha512}. This is a software defect. Please report.`);
|
|
153
|
+
}
|
|
154
|
+
chunkedArtifactId = BigInt(decodedChunkedArtifactId);
|
|
155
|
+
onProgress?.({
|
|
156
|
+
type: 'manifest-submitted',
|
|
157
|
+
bundleHash: endoZipBase64Sha512,
|
|
158
|
+
height: blockHeight,
|
|
159
|
+
chunkCount: chunks.length,
|
|
160
|
+
chunkedArtifactId,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
catch (error) {
|
|
164
|
+
throw new Error(`Transaction failed to submit bundle manifest to chain for bundle ${endoZipBase64Sha512}: ${error instanceof Error ? error.message : String(error)}`);
|
|
165
|
+
}
|
|
166
|
+
if (chunkedArtifactId === undefined || chunkedArtifactId === 0n) {
|
|
167
|
+
throw new Error(`No chunked artifact identifier found in manifest submission transaction response for bundle ${endoZipBase64Sha512}. This is a software defect. Please report.`);
|
|
168
|
+
}
|
|
169
|
+
for (let i = 0; i < chunks.length; i += 1) {
|
|
170
|
+
const chunk = chunks[i];
|
|
171
|
+
const chunkMsg = makeSendChunkMsgParam({
|
|
172
|
+
chunkedArtifactId,
|
|
173
|
+
chunkIndex: BigInt(i),
|
|
174
|
+
chunkData: chunk,
|
|
175
|
+
submitter,
|
|
176
|
+
});
|
|
177
|
+
try {
|
|
178
|
+
const txResponse = await signAndBroadcast(chunkMsg);
|
|
179
|
+
if (!txResponse) {
|
|
180
|
+
throw new Error('no transaction response');
|
|
181
|
+
}
|
|
182
|
+
blockHeight = txResponse.height;
|
|
183
|
+
onProgress?.({
|
|
184
|
+
type: 'chunk-submitted',
|
|
185
|
+
bundleHash: endoZipBase64Sha512,
|
|
186
|
+
height: blockHeight,
|
|
187
|
+
index: i,
|
|
188
|
+
total: chunks.length,
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
catch (error) {
|
|
192
|
+
throw new Error(`Transaction failed to submit bundle chunk ${i} of bundle ${endoZipBase64Sha512} to chain: ${error instanceof Error ? error.message : String(error)}`);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
if (blockHeight === undefined) {
|
|
197
|
+
throw new Error('Bundle submitted but transaction response did not provide a block height. This should not occur. Please report.');
|
|
198
|
+
}
|
|
199
|
+
onProgress?.({
|
|
200
|
+
type: 'watching',
|
|
201
|
+
bundleHash: endoZipBase64Sha512,
|
|
202
|
+
height: blockHeight,
|
|
203
|
+
});
|
|
204
|
+
if (watchBundle) {
|
|
205
|
+
await watchBundle(endoZipBase64Sha512, blockHeight);
|
|
206
|
+
}
|
|
207
|
+
return {
|
|
208
|
+
bundleHash: endoZipBase64Sha512,
|
|
209
|
+
blockHeight,
|
|
210
|
+
chunked: shouldChunk,
|
|
211
|
+
chunkCount: shouldChunk
|
|
212
|
+
? Math.ceil(compressedBundleBytes.byteLength / chunkSizeLimit)
|
|
213
|
+
: undefined,
|
|
214
|
+
compressedSize,
|
|
215
|
+
uncompressedSize,
|
|
216
|
+
chunkedArtifactId,
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
//# sourceMappingURL=bundle-utils.js.map
|
|
@@ -0,0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,CAAC;IAED,UAAU,EAAE,CAAC;QACX,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,mBAAmB;QAC/B,MAAM,EAAE,WAAW;KACpB,CAAC,CAAC;IACH,IAAI,WAAW,EAAE,CAAC;QAChB,MAAM,WAAW,CAAC,mBAAmB,EAAE,WAAW,CAAC,CAAC;IACtD,CAAC;IAED,OAAO;QACL,UAAU,EAAE,mBAAmB;QAC/B,WAAW;QACX,OAAO,EAAE,WAAW;QACpB,UAAU,EAAE,WAAW;YACrB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,UAAU,GAAG,cAAc,CAAC;YAC9D,CAAC,CAAC,SAAS;QACb,cAAc;QACd,gBAAgB;QAChB,iBAAiB;KAClB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -24,7 +24,12 @@ export declare namespace agoric {
|
|
|
24
24
|
params(request?: _2.QueryParamsRequest): Promise<_2.QueryParamsResponse>;
|
|
25
25
|
egress(request: _2.QueryEgressRequest): Promise<_2.QueryEgressResponse>;
|
|
26
26
|
mailbox(request: _2.QueryMailboxRequest): Promise<_2.QueryMailboxResponse>;
|
|
27
|
+
chunkedArtifactStatus(request: _2.QueryChunkedArtifactStatusRequest): Promise<_2.QueryChunkedArtifactStatusResponse>;
|
|
27
28
|
};
|
|
29
|
+
chunkStateFromJSON(object: any): _3.ChunkState;
|
|
30
|
+
chunkStateToJSON(object: _3.ChunkState): string;
|
|
31
|
+
ChunkState: typeof _3.ChunkState;
|
|
32
|
+
ChunkStateSDKType: typeof _3.ChunkState;
|
|
28
33
|
CoreEvalProposal: {
|
|
29
34
|
typeUrl: "/agoric.swingset.CoreEvalProposal";
|
|
30
35
|
encode(message: _3.CoreEvalProposal, writer?: import("../binary.js").BinaryWriter): import("../binary.js").BinaryWriter;
|
|
@@ -135,6 +140,39 @@ export declare namespace agoric {
|
|
|
135
140
|
toProto(message: _3.SwingStoreArtifact): Uint8Array;
|
|
136
141
|
toProtoMsg(message: _3.SwingStoreArtifact): _3.SwingStoreArtifactProtoMsg;
|
|
137
142
|
};
|
|
143
|
+
ChunkedArtifact: {
|
|
144
|
+
typeUrl: "/agoric.swingset.ChunkedArtifact";
|
|
145
|
+
encode(message: _3.ChunkedArtifact, writer?: import("../binary.js").BinaryWriter): import("../binary.js").BinaryWriter;
|
|
146
|
+
decode(input: import("../binary.js").BinaryReader | Uint8Array, length?: number): _3.ChunkedArtifact;
|
|
147
|
+
fromJSON(object: any): _3.ChunkedArtifact;
|
|
148
|
+
toJSON(message: _3.ChunkedArtifact): import("../json-safe.js").JsonSafe<_3.ChunkedArtifact>;
|
|
149
|
+
fromPartial(object: Partial<_3.ChunkedArtifact>): _3.ChunkedArtifact;
|
|
150
|
+
fromProtoMsg(message: _3.ChunkedArtifactProtoMsg): _3.ChunkedArtifact;
|
|
151
|
+
toProto(message: _3.ChunkedArtifact): Uint8Array;
|
|
152
|
+
toProtoMsg(message: _3.ChunkedArtifact): _3.ChunkedArtifactProtoMsg;
|
|
153
|
+
};
|
|
154
|
+
ChunkInfo: {
|
|
155
|
+
typeUrl: "/agoric.swingset.ChunkInfo";
|
|
156
|
+
encode(message: _3.ChunkInfo, writer?: import("../binary.js").BinaryWriter): import("../binary.js").BinaryWriter;
|
|
157
|
+
decode(input: import("../binary.js").BinaryReader | Uint8Array, length?: number): _3.ChunkInfo;
|
|
158
|
+
fromJSON(object: any): _3.ChunkInfo;
|
|
159
|
+
toJSON(message: _3.ChunkInfo): import("../json-safe.js").JsonSafe<_3.ChunkInfo>;
|
|
160
|
+
fromPartial(object: Partial<_3.ChunkInfo>): _3.ChunkInfo;
|
|
161
|
+
fromProtoMsg(message: _3.ChunkInfoProtoMsg): _3.ChunkInfo;
|
|
162
|
+
toProto(message: _3.ChunkInfo): Uint8Array;
|
|
163
|
+
toProtoMsg(message: _3.ChunkInfo): _3.ChunkInfoProtoMsg;
|
|
164
|
+
};
|
|
165
|
+
ChunkedArtifactNode: {
|
|
166
|
+
typeUrl: "/agoric.swingset.ChunkedArtifactNode";
|
|
167
|
+
encode(message: _3.ChunkedArtifactNode, writer?: import("../binary.js").BinaryWriter): import("../binary.js").BinaryWriter;
|
|
168
|
+
decode(input: import("../binary.js").BinaryReader | Uint8Array, length?: number): _3.ChunkedArtifactNode;
|
|
169
|
+
fromJSON(object: any): _3.ChunkedArtifactNode;
|
|
170
|
+
toJSON(message: _3.ChunkedArtifactNode): import("../json-safe.js").JsonSafe<_3.ChunkedArtifactNode>;
|
|
171
|
+
fromPartial(object: Partial<_3.ChunkedArtifactNode>): _3.ChunkedArtifactNode;
|
|
172
|
+
fromProtoMsg(message: _3.ChunkedArtifactNodeProtoMsg): _3.ChunkedArtifactNode;
|
|
173
|
+
toProto(message: _3.ChunkedArtifactNode): Uint8Array;
|
|
174
|
+
toProtoMsg(message: _3.ChunkedArtifactNode): _3.ChunkedArtifactNodeProtoMsg;
|
|
175
|
+
};
|
|
138
176
|
QueryParamsRequest: {
|
|
139
177
|
typeUrl: "/agoric.swingset.QueryParamsRequest";
|
|
140
178
|
encode(_: _2.QueryParamsRequest, writer?: import("../binary.js").BinaryWriter): import("../binary.js").BinaryWriter;
|
|
@@ -201,6 +239,28 @@ export declare namespace agoric {
|
|
|
201
239
|
toProto(message: _2.QueryMailboxResponse): Uint8Array;
|
|
202
240
|
toProtoMsg(message: _2.QueryMailboxResponse): _2.QueryMailboxResponseProtoMsg;
|
|
203
241
|
};
|
|
242
|
+
QueryChunkedArtifactStatusRequest: {
|
|
243
|
+
typeUrl: "/agoric.swingset.QueryChunkedArtifactStatusRequest";
|
|
244
|
+
encode(message: _2.QueryChunkedArtifactStatusRequest, writer?: import("../binary.js").BinaryWriter): import("../binary.js").BinaryWriter;
|
|
245
|
+
decode(input: import("../binary.js").BinaryReader | Uint8Array, length?: number): _2.QueryChunkedArtifactStatusRequest;
|
|
246
|
+
fromJSON(object: any): _2.QueryChunkedArtifactStatusRequest;
|
|
247
|
+
toJSON(message: _2.QueryChunkedArtifactStatusRequest): import("../json-safe.js").JsonSafe<_2.QueryChunkedArtifactStatusRequest>;
|
|
248
|
+
fromPartial(object: Partial<_2.QueryChunkedArtifactStatusRequest>): _2.QueryChunkedArtifactStatusRequest;
|
|
249
|
+
fromProtoMsg(message: _2.QueryChunkedArtifactStatusRequestProtoMsg): _2.QueryChunkedArtifactStatusRequest;
|
|
250
|
+
toProto(message: _2.QueryChunkedArtifactStatusRequest): Uint8Array;
|
|
251
|
+
toProtoMsg(message: _2.QueryChunkedArtifactStatusRequest): _2.QueryChunkedArtifactStatusRequestProtoMsg;
|
|
252
|
+
};
|
|
253
|
+
QueryChunkedArtifactStatusResponse: {
|
|
254
|
+
typeUrl: "/agoric.swingset.QueryChunkedArtifactStatusResponse";
|
|
255
|
+
encode(message: _2.QueryChunkedArtifactStatusResponse, writer?: import("../binary.js").BinaryWriter): import("../binary.js").BinaryWriter;
|
|
256
|
+
decode(input: import("../binary.js").BinaryReader | Uint8Array, length?: number): _2.QueryChunkedArtifactStatusResponse;
|
|
257
|
+
fromJSON(object: any): _2.QueryChunkedArtifactStatusResponse;
|
|
258
|
+
toJSON(message: _2.QueryChunkedArtifactStatusResponse): import("../json-safe.js").JsonSafe<_2.QueryChunkedArtifactStatusResponse>;
|
|
259
|
+
fromPartial(object: Partial<_2.QueryChunkedArtifactStatusResponse>): _2.QueryChunkedArtifactStatusResponse;
|
|
260
|
+
fromProtoMsg(message: _2.QueryChunkedArtifactStatusResponseProtoMsg): _2.QueryChunkedArtifactStatusResponse;
|
|
261
|
+
toProto(message: _2.QueryChunkedArtifactStatusResponse): Uint8Array;
|
|
262
|
+
toProtoMsg(message: _2.QueryChunkedArtifactStatusResponse): _2.QueryChunkedArtifactStatusResponseProtoMsg;
|
|
263
|
+
};
|
|
204
264
|
MsgDeliverInbound: {
|
|
205
265
|
typeUrl: "/agoric.swingset.MsgDeliverInbound";
|
|
206
266
|
encode(message: _1.MsgDeliverInbound, writer?: import("../binary.js").BinaryWriter): import("../binary.js").BinaryWriter;
|
|
@@ -300,17 +360,6 @@ export declare namespace agoric {
|
|
|
300
360
|
toProto(message: _1.MsgInstallBundle): Uint8Array;
|
|
301
361
|
toProtoMsg(message: _1.MsgInstallBundle): _1.MsgInstallBundleProtoMsg;
|
|
302
362
|
};
|
|
303
|
-
MsgInstallBundleResponse: {
|
|
304
|
-
typeUrl: "/agoric.swingset.MsgInstallBundleResponse";
|
|
305
|
-
encode(_: _1.MsgInstallBundleResponse, writer?: import("../binary.js").BinaryWriter): import("../binary.js").BinaryWriter;
|
|
306
|
-
decode(input: import("../binary.js").BinaryReader | Uint8Array, length?: number): _1.MsgInstallBundleResponse;
|
|
307
|
-
fromJSON(_: any): _1.MsgInstallBundleResponse;
|
|
308
|
-
toJSON(_: _1.MsgInstallBundleResponse): import("../json-safe.js").JsonSafe<_1.MsgInstallBundleResponse>;
|
|
309
|
-
fromPartial(_: Partial<_1.MsgInstallBundleResponse>): _1.MsgInstallBundleResponse;
|
|
310
|
-
fromProtoMsg(message: _1.MsgInstallBundleResponseProtoMsg): _1.MsgInstallBundleResponse;
|
|
311
|
-
toProto(message: _1.MsgInstallBundleResponse): Uint8Array;
|
|
312
|
-
toProtoMsg(message: _1.MsgInstallBundleResponse): _1.MsgInstallBundleResponseProtoMsg;
|
|
313
|
-
};
|
|
314
363
|
MsgCoreEval: {
|
|
315
364
|
typeUrl: "/agoric.swingset.MsgCoreEval";
|
|
316
365
|
encode(message: _1.MsgCoreEval, writer?: import("../binary.js").BinaryWriter): import("../binary.js").BinaryWriter;
|
|
@@ -333,6 +382,39 @@ export declare namespace agoric {
|
|
|
333
382
|
toProto(message: _1.MsgCoreEvalResponse): Uint8Array;
|
|
334
383
|
toProtoMsg(message: _1.MsgCoreEvalResponse): _1.MsgCoreEvalResponseProtoMsg;
|
|
335
384
|
};
|
|
385
|
+
MsgInstallBundleResponse: {
|
|
386
|
+
typeUrl: "/agoric.swingset.MsgInstallBundleResponse";
|
|
387
|
+
encode(message: _1.MsgInstallBundleResponse, writer?: import("../binary.js").BinaryWriter): import("../binary.js").BinaryWriter;
|
|
388
|
+
decode(input: import("../binary.js").BinaryReader | Uint8Array, length?: number): _1.MsgInstallBundleResponse;
|
|
389
|
+
fromJSON(object: any): _1.MsgInstallBundleResponse;
|
|
390
|
+
toJSON(message: _1.MsgInstallBundleResponse): import("../json-safe.js").JsonSafe<_1.MsgInstallBundleResponse>;
|
|
391
|
+
fromPartial(object: Partial<_1.MsgInstallBundleResponse>): _1.MsgInstallBundleResponse;
|
|
392
|
+
fromProtoMsg(message: _1.MsgInstallBundleResponseProtoMsg): _1.MsgInstallBundleResponse;
|
|
393
|
+
toProto(message: _1.MsgInstallBundleResponse): Uint8Array;
|
|
394
|
+
toProtoMsg(message: _1.MsgInstallBundleResponse): _1.MsgInstallBundleResponseProtoMsg;
|
|
395
|
+
};
|
|
396
|
+
MsgSendChunk: {
|
|
397
|
+
typeUrl: "/agoric.swingset.MsgSendChunk";
|
|
398
|
+
encode(message: _1.MsgSendChunk, writer?: import("../binary.js").BinaryWriter): import("../binary.js").BinaryWriter;
|
|
399
|
+
decode(input: import("../binary.js").BinaryReader | Uint8Array, length?: number): _1.MsgSendChunk;
|
|
400
|
+
fromJSON(object: any): _1.MsgSendChunk;
|
|
401
|
+
toJSON(message: _1.MsgSendChunk): import("../json-safe.js").JsonSafe<_1.MsgSendChunk>;
|
|
402
|
+
fromPartial(object: Partial<_1.MsgSendChunk>): _1.MsgSendChunk;
|
|
403
|
+
fromProtoMsg(message: _1.MsgSendChunkProtoMsg): _1.MsgSendChunk;
|
|
404
|
+
toProto(message: _1.MsgSendChunk): Uint8Array;
|
|
405
|
+
toProtoMsg(message: _1.MsgSendChunk): _1.MsgSendChunkProtoMsg;
|
|
406
|
+
};
|
|
407
|
+
MsgSendChunkResponse: {
|
|
408
|
+
typeUrl: "/agoric.swingset.MsgSendChunkResponse";
|
|
409
|
+
encode(message: _1.MsgSendChunkResponse, writer?: import("../binary.js").BinaryWriter): import("../binary.js").BinaryWriter;
|
|
410
|
+
decode(input: import("../binary.js").BinaryReader | Uint8Array, length?: number): _1.MsgSendChunkResponse;
|
|
411
|
+
fromJSON(object: any): _1.MsgSendChunkResponse;
|
|
412
|
+
toJSON(message: _1.MsgSendChunkResponse): import("../json-safe.js").JsonSafe<_1.MsgSendChunkResponse>;
|
|
413
|
+
fromPartial(object: Partial<_1.MsgSendChunkResponse>): _1.MsgSendChunkResponse;
|
|
414
|
+
fromProtoMsg(message: _1.MsgSendChunkResponseProtoMsg): _1.MsgSendChunkResponse;
|
|
415
|
+
toProto(message: _1.MsgSendChunkResponse): Uint8Array;
|
|
416
|
+
toProtoMsg(message: _1.MsgSendChunkResponse): _1.MsgSendChunkResponseProtoMsg;
|
|
417
|
+
};
|
|
336
418
|
GenesisState: {
|
|
337
419
|
typeUrl: "/agoric.swingset.GenesisState";
|
|
338
420
|
encode(message: _0.GenesisState, writer?: import("../binary.js").BinaryWriter): import("../binary.js").BinaryWriter;
|
|
@@ -701,6 +783,7 @@ export declare namespace agoric {
|
|
|
701
783
|
params(request?: _2.QueryParamsRequest): Promise<_2.QueryParamsResponse>;
|
|
702
784
|
egress(request: _2.QueryEgressRequest): Promise<_2.QueryEgressResponse>;
|
|
703
785
|
mailbox(request: _2.QueryMailboxRequest): Promise<_2.QueryMailboxResponse>;
|
|
786
|
+
chunkedArtifactStatus(request: _2.QueryChunkedArtifactStatusRequest): Promise<_2.QueryChunkedArtifactStatusResponse>;
|
|
704
787
|
};
|
|
705
788
|
vbank: {
|
|
706
789
|
params(request?: _6.QueryParamsRequest): Promise<_6.QueryParamsResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../../src/codegen/agoric/bundle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO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;;;;KAEvB,CAAC;IACK,MAAM,QAAQ;;kCAcwoB,4CAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAT7qB,CAAC;IACK,MAAM,SAAS;;;;;;;;;;;;KAErB,CAAC;IACK,MAAM,aAAa;6BApDU;;SACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BACwB;;SAE3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmDX,CAAC;CACH"}
|
|
@@ -7,6 +7,7 @@ export declare const createRPCQueryClient: ({ rpcEndpoint, }: {
|
|
|
7
7
|
params(request?: import("./swingset/query.js").QueryParamsRequest): Promise<import("./swingset/query.js").QueryParamsResponse>;
|
|
8
8
|
egress(request: import("./swingset/query.js").QueryEgressRequest): Promise<import("./swingset/query.js").QueryEgressResponse>;
|
|
9
9
|
mailbox(request: import("./swingset/query.js").QueryMailboxRequest): Promise<import("./swingset/query.js").QueryMailboxResponse>;
|
|
10
|
+
chunkedArtifactStatus(request: import("./swingset/query.js").QueryChunkedArtifactStatusRequest): Promise<import("./swingset/query.js").QueryChunkedArtifactStatusResponse>;
|
|
10
11
|
};
|
|
11
12
|
vbank: {
|
|
12
13
|
params(request?: import("./vbank/query.js").QueryParamsRequest): Promise<import("./vbank/query.js").QueryParamsResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.query.d.ts","sourceRoot":"","sources":["../../../src/codegen/agoric/rpc.query.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE/E,eAAO,MAAM,oBAAoB,GAAU,kBAExC;IACD,WAAW,EAAE,MAAM,GAAG,YAAY,CAAC;CACpC
|
|
1
|
+
{"version":3,"file":"rpc.query.d.ts","sourceRoot":"","sources":["../../../src/codegen/agoric/rpc.query.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE/E,eAAO,MAAM,oBAAoB,GAAU,kBAExC;IACD,WAAW,EAAE,MAAM,GAAG,YAAY,CAAC;CACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkGA,CAAC"}
|