@agoric/vats 0.15.2-dev-6ee57ba.0 → 0.15.2-dev-c04c91c.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/vats",
|
|
3
|
-
"version": "0.15.2-dev-
|
|
3
|
+
"version": "0.15.2-dev-c04c91c.0+c04c91c",
|
|
4
4
|
"description": "Agoric's Vat library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -22,19 +22,19 @@
|
|
|
22
22
|
"author": "Agoric",
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@agoric/cosmic-proto": "0.4.1-dev-
|
|
26
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
27
|
-
"@agoric/governance": "0.10.4-dev-
|
|
28
|
-
"@agoric/internal": "0.3.3-dev-
|
|
29
|
-
"@agoric/network": "0.1.1-dev-
|
|
30
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
31
|
-
"@agoric/store": "0.9.3-dev-
|
|
32
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
33
|
-
"@agoric/time": "0.3.3-dev-
|
|
34
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
35
|
-
"@agoric/vow": "0.1.1-dev-
|
|
36
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
37
|
-
"@agoric/zone": "0.2.3-dev-
|
|
25
|
+
"@agoric/cosmic-proto": "0.4.1-dev-c04c91c.0+c04c91c",
|
|
26
|
+
"@agoric/ertp": "0.16.3-dev-c04c91c.0+c04c91c",
|
|
27
|
+
"@agoric/governance": "0.10.4-dev-c04c91c.0+c04c91c",
|
|
28
|
+
"@agoric/internal": "0.3.3-dev-c04c91c.0+c04c91c",
|
|
29
|
+
"@agoric/network": "0.1.1-dev-c04c91c.0+c04c91c",
|
|
30
|
+
"@agoric/notifier": "0.6.3-dev-c04c91c.0+c04c91c",
|
|
31
|
+
"@agoric/store": "0.9.3-dev-c04c91c.0+c04c91c",
|
|
32
|
+
"@agoric/swingset-vat": "0.32.3-dev-c04c91c.0+c04c91c",
|
|
33
|
+
"@agoric/time": "0.3.3-dev-c04c91c.0+c04c91c",
|
|
34
|
+
"@agoric/vat-data": "0.5.3-dev-c04c91c.0+c04c91c",
|
|
35
|
+
"@agoric/vow": "0.1.1-dev-c04c91c.0+c04c91c",
|
|
36
|
+
"@agoric/zoe": "0.26.3-dev-c04c91c.0+c04c91c",
|
|
37
|
+
"@agoric/zone": "0.2.3-dev-c04c91c.0+c04c91c",
|
|
38
38
|
"@endo/errors": "^1.2.5",
|
|
39
39
|
"@endo/far": "^1.1.5",
|
|
40
40
|
"@endo/import-bundle": "^1.2.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-c04c91c.0+c04c91c",
|
|
51
51
|
"@endo/bundle-source": "^3.4.0",
|
|
52
52
|
"@endo/init": "^1.1.4",
|
|
53
53
|
"ava": "^5.3.0",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"typeCoverage": {
|
|
80
80
|
"atLeast": 91.51
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "c04c91c35e863e39728454326b95f00fc4f09d3e"
|
|
83
83
|
}
|
package/tools/bank-utils.d.ts
CHANGED
|
@@ -4,7 +4,8 @@ export function makeFakeBankKit(issuerKits: Pick<IssuerKit<"nat">, "brand" | "is
|
|
|
4
4
|
bank: import("../src/vat-bank.js").Bank;
|
|
5
5
|
};
|
|
6
6
|
export function makeFakeBankManagerKit(opts?: {
|
|
7
|
-
balances
|
|
7
|
+
balances?: import("./fake-bridge.js").Balances | undefined;
|
|
8
|
+
onToBridge?: ((obj: any) => unknown) | undefined;
|
|
8
9
|
} | undefined): Promise<{
|
|
9
10
|
bankManager: import("@endo/exo").Guarded<{
|
|
10
11
|
getAssetSubscription(): IterableEachTopic<AssetDescriptor>;
|
|
@@ -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;
|
|
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;AAOM;;gCAFa,OAAO;;;;6FA0Bo6gB,WAAW,eAA6B,2BAA2B;;;mBAAo8C,CAAC;;;;0BAX17jB,MAAM,CAAC,KAAK,CAAC,KACX,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;GASrC"}
|
package/tools/bank-utils.js
CHANGED
|
@@ -64,7 +64,8 @@ export const makeFakeBankKit = issuerKits => {
|
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* @param {object} [opts]
|
|
67
|
-
* @param {import('./fake-bridge.js').Balances} opts.balances initial balances
|
|
67
|
+
* @param {import('./fake-bridge.js').Balances} [opts.balances] initial balances
|
|
68
|
+
* @param {(obj) => unknown} [opts.onToBridge] handler for toBridge messages
|
|
68
69
|
*/
|
|
69
70
|
export const makeFakeBankManagerKit = async opts => {
|
|
70
71
|
const baggage = makeScalarBigMapStore('baggage');
|
package/tools/fake-bridge.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/** @typedef {{ [address: string]: { [denom: string]: bigint } }} Balances */
|
|
2
2
|
export const FAUCET_ADDRESS: "faucet";
|
|
3
|
-
export function makeFakeBankBridge(zone: import("@agoric/zone").Zone,
|
|
4
|
-
balances
|
|
5
|
-
|
|
3
|
+
export function makeFakeBankBridge(zone: import("@agoric/zone").Zone, { balances, onToBridge }?: {
|
|
4
|
+
balances?: Balances | undefined;
|
|
5
|
+
onToBridge?: ((obj: any) => void) | undefined;
|
|
6
|
+
} | undefined): ScopedBridgeManager<"bank">;
|
|
6
7
|
export function makeFakeIbcBridge(zone: import("@agoric/zone").Zone, onToBridge: (obj: any) => void): ScopedBridgeManager<"dibc">;
|
|
7
8
|
export const LOCALCHAIN_DEFAULT_ADDRESS: "agoric1fakeLCAAddress";
|
|
8
9
|
export namespace SIMULATED_ERRORS {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fake-bridge.d.ts","sourceRoot":"","sources":["fake-bridge.js"],"names":[],"mappings":"AAkBA,6EAA6E;AAE7E,sCAAuC;
|
|
1
|
+
{"version":3,"file":"fake-bridge.d.ts","sourceRoot":"","sources":["fake-bridge.js"],"names":[],"mappings":"AAkBA,6EAA6E;AAE7E,sCAAuC;AAehC,yCAPI,OAAO,cAAc,EAAE,IAAI;;gCAGlB,IAAI;gBACX,oBAAoB,MAAM,CAAC,CA4FvC;AAOM,wCAJI,OAAO,cAAc,EAAE,IAAI,cAC3B,CAAC,GAAG,KAAA,KAAK,IAAI,GACX,oBAAoB,MAAM,CAAC,CAwCvC;AAED,iEAAkE;;;;;AAwB3D,0DALI,MAAM,YACN,MAAM,GACJ,OAAO,CAsCnB;AAED;;;IASE;AAWK,0DAHI,MAAM,GACJ,OAAO,CAsCnB;AAOM,+CAJI,OAAO,cAAc,EAAE,IAAI,8BAClB,IAAI,gBACX,oBAAoB,aAAa,CAAC,CAgD9C;AAOM,6CAJI,OAAO,cAAc,EAAE,IAAI,8BAClB,IAAI,gBACX,oBAAoB,WAAW,CAAC,CAuC5C;uBA/Wa;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
|
@@ -27,14 +27,16 @@ const INFINITE_AMOUNT = 99999999999n;
|
|
|
27
27
|
* transaction outside the Agoric VM. (Similarly for deposits.)
|
|
28
28
|
*
|
|
29
29
|
* @param {import('@agoric/zone').Zone} zone
|
|
30
|
-
* @param {object} opts
|
|
31
|
-
* @param {Balances} opts.balances initial balances
|
|
30
|
+
* @param {object} [opts]
|
|
31
|
+
* @param {Balances} [opts.balances] initial balances
|
|
32
|
+
* @param {(obj) => void} [opts.onToBridge]
|
|
32
33
|
* @returns {ScopedBridgeManager<'bank'>}
|
|
33
34
|
* @see {makeFakeBankManagerKit} and its `pourPayment` for a helper
|
|
34
35
|
*/
|
|
35
|
-
export const makeFakeBankBridge = (
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
export const makeFakeBankBridge = (
|
|
37
|
+
zone,
|
|
38
|
+
{ balances = {}, onToBridge = () => {} } = {},
|
|
39
|
+
) => {
|
|
38
40
|
const currentBalance = ({ address, denom }) =>
|
|
39
41
|
address === FAUCET_ADDRESS
|
|
40
42
|
? INFINITE_AMOUNT
|
|
@@ -46,6 +48,7 @@ export const makeFakeBankBridge = (zone, opts = { balances: {} }) => {
|
|
|
46
48
|
return zone.exo('Fake Bank Bridge Manager', undefined, {
|
|
47
49
|
getBridgeId: () => 'bank',
|
|
48
50
|
toBridge: async obj => {
|
|
51
|
+
onToBridge(obj);
|
|
49
52
|
const { method, type, ...params } = obj;
|
|
50
53
|
trace('toBridge', type, method, params);
|
|
51
54
|
switch (obj.type) {
|