@agoric/vats 0.15.2-dev-b395841.0 → 0.15.2-dev-0561702.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 +17 -17
- package/src/localchain.d.ts +6 -5
- package/src/localchain.d.ts.map +1 -1
- package/src/localchain.js +2 -2
- package/src/vat-localchain.d.ts +2 -2
- package/src/vat-localchain.d.ts.map +1 -1
- package/tools/bank-utils.d.ts.map +1 -1
- package/tools/bank-utils.js +3 -3
- package/tools/fake-bridge.d.ts.map +1 -1
- package/tools/fake-bridge.js +9 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/vats",
|
|
3
|
-
"version": "0.15.2-dev-
|
|
3
|
+
"version": "0.15.2-dev-0561702.0+0561702",
|
|
4
4
|
"description": "Agoric's Vat library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -22,20 +22,20 @@
|
|
|
22
22
|
"author": "Agoric",
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@agoric/assert": "0.6.1-dev-
|
|
26
|
-
"@agoric/cosmic-proto": "0.4.1-dev-
|
|
27
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
28
|
-
"@agoric/governance": "0.10.4-dev-
|
|
29
|
-
"@agoric/internal": "0.3.3-dev-
|
|
30
|
-
"@agoric/network": "0.1.1-dev-
|
|
31
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
32
|
-
"@agoric/store": "0.9.3-dev-
|
|
33
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
34
|
-
"@agoric/time": "0.3.3-dev-
|
|
35
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
36
|
-
"@agoric/vow": "0.1.1-dev-
|
|
37
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
38
|
-
"@agoric/zone": "0.2.3-dev-
|
|
25
|
+
"@agoric/assert": "0.6.1-dev-0561702.0+0561702",
|
|
26
|
+
"@agoric/cosmic-proto": "0.4.1-dev-0561702.0+0561702",
|
|
27
|
+
"@agoric/ertp": "0.16.3-dev-0561702.0+0561702",
|
|
28
|
+
"@agoric/governance": "0.10.4-dev-0561702.0+0561702",
|
|
29
|
+
"@agoric/internal": "0.3.3-dev-0561702.0+0561702",
|
|
30
|
+
"@agoric/network": "0.1.1-dev-0561702.0+0561702",
|
|
31
|
+
"@agoric/notifier": "0.6.3-dev-0561702.0+0561702",
|
|
32
|
+
"@agoric/store": "0.9.3-dev-0561702.0+0561702",
|
|
33
|
+
"@agoric/swingset-vat": "0.32.3-dev-0561702.0+0561702",
|
|
34
|
+
"@agoric/time": "0.3.3-dev-0561702.0+0561702",
|
|
35
|
+
"@agoric/vat-data": "0.5.3-dev-0561702.0+0561702",
|
|
36
|
+
"@agoric/vow": "0.1.1-dev-0561702.0+0561702",
|
|
37
|
+
"@agoric/zoe": "0.26.3-dev-0561702.0+0561702",
|
|
38
|
+
"@agoric/zone": "0.2.3-dev-0561702.0+0561702",
|
|
39
39
|
"@endo/base64": "^1.0.5",
|
|
40
40
|
"@endo/far": "^1.1.2",
|
|
41
41
|
"@endo/import-bundle": "^1.1.2",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"jessie.js": "^0.3.4"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
50
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-0561702.0+0561702",
|
|
51
51
|
"@endo/bundle-source": "^3.2.3",
|
|
52
52
|
"@endo/init": "^1.1.2",
|
|
53
53
|
"ava": "^5.3.0",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"typeCoverage": {
|
|
80
80
|
"atLeast": 91.27
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "05617020e12bcf015b88e5c1de25717deec914c5"
|
|
83
83
|
}
|
package/src/localchain.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @import {TypedJson, ResponseTo} from '@agoric/cosmic-proto';
|
|
2
|
+
* @import {TypedJson, ResponseTo, JsonSafe} from '@agoric/cosmic-proto';
|
|
3
3
|
* @import {BankManager, Bank} from './vat-bank.js';
|
|
4
4
|
* @import {ScopedBridgeManager} from './types.js';
|
|
5
5
|
*/
|
|
@@ -69,11 +69,11 @@ export function prepareLocalChainTools(zone: import("@agoric/base-zone").Zone):
|
|
|
69
69
|
* @template {TypedJson[]} MT messages tuple (use const with multiple
|
|
70
70
|
* elements or it will be a mixed array)
|
|
71
71
|
* @param {MT} messages
|
|
72
|
-
* @returns {Promise<{ [K in keyof MT]: ResponseTo<MT[K]
|
|
72
|
+
* @returns {Promise<{ [K in keyof MT]: JsonSafe<ResponseTo<MT[K]>> }>}
|
|
73
73
|
*/
|
|
74
74
|
executeTx<MT extends {
|
|
75
75
|
'@type': string;
|
|
76
|
-
}[]>(messages: MT): Promise<{ [K in keyof MT]: ResponseTo<MT[K]
|
|
76
|
+
}[]>(messages: MT): Promise<{ [K in keyof MT]: JsonSafe<ResponseTo<MT[K]>>; }>;
|
|
77
77
|
}>>;
|
|
78
78
|
/**
|
|
79
79
|
* Make a single query to the local chain. Will reject with an error if
|
|
@@ -133,6 +133,7 @@ export type LocalChainAccount = Awaited<ReturnType<Awaited<ReturnType<typeof pre
|
|
|
133
133
|
export type LocalChainTools = ReturnType<typeof prepareLocalChainTools>;
|
|
134
134
|
export type LocalChain = ReturnType<LocalChainTools["makeLocalChain"]>;
|
|
135
135
|
import type { ResponseTo } from '@agoric/cosmic-proto';
|
|
136
|
+
import type { JsonSafe } from '@agoric/cosmic-proto';
|
|
136
137
|
import type { ScopedBridgeManager } from './types.js';
|
|
137
138
|
import type { Bank } from './vat-bank.js';
|
|
138
139
|
/** @param {import('@agoric/base-zone').Zone} zone */
|
|
@@ -165,11 +166,11 @@ declare function prepareLocalChainAccount(zone: import("@agoric/base-zone").Zone
|
|
|
165
166
|
* @template {TypedJson[]} MT messages tuple (use const with multiple
|
|
166
167
|
* elements or it will be a mixed array)
|
|
167
168
|
* @param {MT} messages
|
|
168
|
-
* @returns {Promise<{ [K in keyof MT]: ResponseTo<MT[K]
|
|
169
|
+
* @returns {Promise<{ [K in keyof MT]: JsonSafe<ResponseTo<MT[K]>> }>}
|
|
169
170
|
*/
|
|
170
171
|
executeTx<MT extends {
|
|
171
172
|
'@type': string;
|
|
172
|
-
}[]>(messages: MT): Promise<{ [K in keyof MT]: ResponseTo<MT[K]
|
|
173
|
+
}[]>(messages: MT): Promise<{ [K in keyof MT]: JsonSafe<ResponseTo<MT[K]>>; }>;
|
|
173
174
|
}>;
|
|
174
175
|
export {};
|
|
175
176
|
//# sourceMappingURL=localchain.d.ts.map
|
package/src/localchain.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localchain.d.ts","sourceRoot":"","sources":["localchain.js"],"names":[],"mappings":"AAOA;;;;GAIG;AAEH;;;;;GAKG;AAEH;;;;;GAKG;AAEH;;;;;;GAMG;AA4EH;;;;GAIG;AAEH;;;;GAIG;AAwEI,6CADK,OAAO,mBAAmB,EAAE,IAAI;;QAxDtC;;;;;WAKG;;;YAzFH,kCAAkC;8BAAtB,KAAK,CAAC,KAAK,CAAC;YAMxB;;;;;;;;;eASG;6BAJQ,OAAO,CAAC,KAAK,CAAC,mBACd,OAAO,GAEL,OAAO,CAAC,MAAM,CAAC;YAS5B;;;;;eAKG;6BAFQ,MAAM,CAAC,KAAK,CAAC,GACX,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAOpC;;;;;;;;eAQG;
|
|
1
|
+
{"version":3,"file":"localchain.d.ts","sourceRoot":"","sources":["localchain.js"],"names":[],"mappings":"AAOA;;;;GAIG;AAEH;;;;;GAKG;AAEH;;;;;GAKG;AAEH;;;;;;GAMG;AA4EH;;;;GAIG;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,GAEL,OAAO,CAAC,MAAM,CAAC;IAS5B;;;;;OAKG;qBAFQ,MAAM,CAAC,KAAK,CAAC,GACX,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAOpC;;;;;;;;OAQG;cADyD,EAAE;;mBAAF,EAAE,AADjD;GAkBhB"}
|
package/src/localchain.js
CHANGED
|
@@ -6,7 +6,7 @@ import { AmountShape, BrandShape, PaymentShape } from '@agoric/ertp';
|
|
|
6
6
|
const { Fail } = assert;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* @import {TypedJson, ResponseTo} from '@agoric/cosmic-proto';
|
|
9
|
+
* @import {TypedJson, ResponseTo, JsonSafe} from '@agoric/cosmic-proto';
|
|
10
10
|
* @import {BankManager, Bank} from './vat-bank.js';
|
|
11
11
|
* @import {ScopedBridgeManager} from './types.js';
|
|
12
12
|
*/
|
|
@@ -89,7 +89,7 @@ const prepareLocalChainAccount = zone =>
|
|
|
89
89
|
* @template {TypedJson[]} MT messages tuple (use const with multiple
|
|
90
90
|
* elements or it will be a mixed array)
|
|
91
91
|
* @param {MT} messages
|
|
92
|
-
* @returns {Promise<{ [K in keyof MT]: ResponseTo<MT[K]
|
|
92
|
+
* @returns {Promise<{ [K in keyof MT]: JsonSafe<ResponseTo<MT[K]>> }>}
|
|
93
93
|
*/
|
|
94
94
|
async executeTx(messages) {
|
|
95
95
|
const { address, system } = this.state;
|
package/src/vat-localchain.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export function buildRootObject(_vatPowers: any, _args: any, baggage: any): {
|
|
|
13
13
|
withdraw(amount: Amount<"nat">): Promise<globalThis.Payment<"nat">>;
|
|
14
14
|
executeTx<MT extends {
|
|
15
15
|
'@type': string;
|
|
16
|
-
}[]>(messages: MT): Promise<{ [K in keyof MT]: import("@agoric/cosmic-proto").ResponseTo<MT[K]
|
|
16
|
+
}[]>(messages: MT): Promise<{ [K in keyof MT]: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto").ResponseTo<MT[K]>>; }>;
|
|
17
17
|
}>>;
|
|
18
18
|
query(request: import("@agoric/cosmic-proto").TypedJson): Promise<{
|
|
19
19
|
'@type': string;
|
|
@@ -40,7 +40,7 @@ export function buildRootObject(_vatPowers: any, _args: any, baggage: any): {
|
|
|
40
40
|
withdraw(amount: Amount<"nat">): Promise<globalThis.Payment<"nat">>;
|
|
41
41
|
executeTx<MT extends {
|
|
42
42
|
'@type': string;
|
|
43
|
-
}[]>(messages: MT): Promise<{ [K in keyof MT]: import("@agoric/cosmic-proto").ResponseTo<MT[K]
|
|
43
|
+
}[]>(messages: MT): Promise<{ [K in keyof MT]: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto").ResponseTo<MT[K]>>; }>;
|
|
44
44
|
}>>;
|
|
45
45
|
query(request: import("@agoric/cosmic-proto").TypedJson): Promise<{
|
|
46
46
|
'@type': string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vat-localchain.d.ts","sourceRoot":"","sources":["vat-localchain.js"],"names":[],"mappings":"AAMO;IAKH;;;;;OAKG;2BADQ,OAAO,iBAAiB,EAAE,gBAAgB;;;
|
|
1
|
+
{"version":3,"file":"vat-localchain.d.ts","sourceRoot":"","sources":["vat-localchain.js"],"names":[],"mappings":"AAMO;IAKH;;;;;OAKG;2BADQ,OAAO,iBAAiB,EAAE,gBAAgB;;;8BASsnB,MAAM,KAAK,CAAC;6BAA8b,QAAQ,KAAK,CAAC,mBAA2B,OAAO;6BAAwhB,OAAO,KAAK,CAAC;;;2BAAgiB,EAAE;;uBAAupE,OAAO,sBAAsB,EAAE,SAAS;;;4BAAyqB,OAAO,sBAAsB,EAAE,SAAS,EAAE;;;;;;;;IAb9nK;;;;;OAKG;2BADQ,OAAO,iBAAiB,EAAE,gBAAgB;;;;;;;;;;sDAS62I,SAAS;;;2DAAwsB,SAAS;;;;;;;GAH/nK;4BAEa,UAAU,CAAC,OAAO,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bank-utils.d.ts","sourceRoot":"","sources":["bank-utils.js"],"names":[],"mappings":"AAYO,4CAFI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC,EAAE;sBA4B1C,MAAM,cACN,MAAM,gBACN,MAAM,OACN,OAAO,oBAAoB,EAAE,cAAc;;;EAqBvD;AAMM;cAFI,OAAO,kBAAkB,EAAE,QAAQ;;;;
|
|
1
|
+
{"version":3,"file":"bank-utils.d.ts","sourceRoot":"","sources":["bank-utils.js"],"names":[],"mappings":"AAYO,4CAFI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC,EAAE;sBA4B1C,MAAM,cACN,MAAM,gBACN,MAAM,OACN,OAAO,oBAAoB,EAAE,cAAc;;;EAqBvD;AAMM;cAFI,OAAO,kBAAkB,EAAE,QAAQ;;;;gEA0Bi5gB,cAAc;;;;;;;;;;;;+EAAiiD,cAAc,GAAE;YAAE,OAAQ,CAAC,EAAC,KAAM,QAAQ,KAAK,CAAC,CAAC,CAAA;SAAE;;;0BAXphkB,MAAM,CAAC,KAAK,CAAC,KACX,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;GASrC"}
|
package/tools/bank-utils.js
CHANGED
|
@@ -22,11 +22,11 @@ export const makeFakeBankKit = issuerKits => {
|
|
|
22
22
|
const purses = makeScalarMapStore();
|
|
23
23
|
|
|
24
24
|
// XXX setup purses without publishing
|
|
25
|
-
|
|
26
|
-
issuerKits.forEach(kit => {
|
|
25
|
+
for (const kit of issuerKits) {
|
|
27
26
|
assert(kit.issuer);
|
|
27
|
+
issuers.init(kit.brand, kit.issuer);
|
|
28
28
|
purses.init(kit.brand, E(kit.issuer).makeEmptyPurse());
|
|
29
|
-
}
|
|
29
|
+
}
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* @type {SubscriptionRecord<
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fake-bridge.d.ts","sourceRoot":"","sources":["fake-bridge.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fake-bridge.d.ts","sourceRoot":"","sources":["fake-bridge.js"],"names":[],"mappings":"AAgBA,6EAA6E;AAE7E,sCAAuC;AAchC,yCANI,OAAO,cAAc,EAAE,IAAI;IAEZ,QAAQ,EAAvB,QAAQ;gCAyFlB;AAOM,wCAJI,OAAO,cAAc,EAAE,IAAI,cAC3B,CAAC,GAAG,KAAA,KAAK,IAAI,+BA+BvB;AAED,iEAAkE;AAO3D,+CAJI,OAAO,cAAc,EAAE,IAAI,8BAClB,IAAI,mDAkEvB;uBAhNa;IAAE,CAAC,OAAO,EAAE,MAAM,GAAG;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CAAE;yCAPX,iBAAiB"}
|
package/tools/fake-bridge.js
CHANGED
|
@@ -5,7 +5,8 @@ import { makeWhen } from '@agoric/vow/src/when.js';
|
|
|
5
5
|
import { Nat } from '@endo/nat';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* @import {
|
|
8
|
+
* @import {JsonSafe} from '@agoric/cosmic-proto';
|
|
9
|
+
* @import {MsgDelegateResponse, MsgUndelegateResponse} from '@agoric/cosmic-proto/cosmos/staking/v1beta1/tx.js';
|
|
9
10
|
* @import {BridgeHandler, ScopedBridgeManager} from '../src/types.js';
|
|
10
11
|
* @import {Remote} from '@agoric/vow';
|
|
11
12
|
*/
|
|
@@ -189,7 +190,13 @@ export const makeFakeLocalchainBridge = (zone, onToBridge = () => {}) => {
|
|
|
189
190
|
};
|
|
190
191
|
}
|
|
191
192
|
case '/cosmos.staking.v1beta1.MsgDelegate': {
|
|
192
|
-
return /** @type {MsgDelegateResponse} */ {};
|
|
193
|
+
return /** @type {JsonSafe<MsgDelegateResponse>} */ ({});
|
|
194
|
+
}
|
|
195
|
+
case '/cosmos.staking.v1beta1.MsgUndelegate': {
|
|
196
|
+
// @ts-expect-error XXX JsonSafe doesn't handle Date
|
|
197
|
+
return /** @type {JsonSafe<MsgUndelegateResponse>} */ ({
|
|
198
|
+
completionTime: new Date().toJSON(),
|
|
199
|
+
});
|
|
193
200
|
}
|
|
194
201
|
// returns one empty object per message unless specified
|
|
195
202
|
default:
|