@agoric/vats 0.15.2-dev-64cb69f.0 → 0.15.2-dev-c5284e4.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 +24 -24
- package/src/core/chain-behaviors.d.ts.map +1 -1
- package/src/core/chain-behaviors.js +1 -7
- package/src/core/client-behaviors.d.ts +1 -0
- package/src/core/client-behaviors.d.ts.map +1 -1
- package/src/core/client-behaviors.js +1 -0
- package/src/core/startWalletFactory.d.ts +4 -4
- package/src/core/types-ambient.d.ts +1 -0
- package/src/core/utils.d.ts +2 -2
- package/src/core/utils.d.ts.map +1 -1
- package/src/core/utils.js +13 -13
- package/src/ibc.d.ts +63 -25
- package/src/ibc.d.ts.map +1 -1
- package/src/ibc.js +671 -457
- package/src/localchain.d.ts +22 -0
- package/src/localchain.d.ts.map +1 -0
- package/src/localchain.js +106 -0
- package/src/proposals/localchain-proposal.d.ts +405 -0
- package/src/proposals/localchain-proposal.d.ts.map +1 -0
- package/src/proposals/localchain-proposal.js +114 -0
- package/src/proposals/localchain-test.d.ts +25 -0
- package/src/proposals/localchain-test.d.ts.map +1 -0
- package/src/proposals/localchain-test.js +81 -0
- package/src/proposals/network-proposal.d.ts +42 -1
- package/src/proposals/network-proposal.d.ts.map +1 -1
- package/src/proposals/network-proposal.js +58 -42
- package/src/proposals/probeZcfBundle.d.ts +26 -0
- package/src/proposals/probeZcfBundle.d.ts.map +1 -0
- package/src/proposals/probeZcfBundle.js +72 -0
- package/src/proposals/restart-vats-proposal.d.ts +2 -0
- package/src/proposals/restart-vats-proposal.d.ts.map +1 -1
- package/src/proposals/restart-vats-proposal.js +13 -1
- package/src/proposals/zcf-proposal.d.ts.map +1 -1
- package/src/proposals/zcf-proposal.js +1 -0
- package/src/vat-bridge.d.ts +16 -2
- package/src/vat-bridge.d.ts.map +1 -1
- package/src/vat-ibc.d.ts +43 -3
- package/src/vat-ibc.d.ts.map +1 -1
- package/src/vat-ibc.js +20 -9
- package/src/vat-localchain.d.ts +33 -0
- package/src/vat-localchain.d.ts.map +1 -0
- package/src/vat-localchain.js +24 -0
- package/src/vat-network.d.ts +67 -1
- package/src/vat-network.d.ts.map +1 -1
- package/src/vat-network.js +39 -3
- package/tools/boot-test-utils.d.ts +8 -2
- package/tools/boot-test-utils.d.ts.map +1 -1
- package/tools/boot-test-utils.js +2 -1
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-c5284e4.0+c5284e4",
|
|
4
4
|
"description": "Agoric's Vat library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -22,31 +22,31 @@
|
|
|
22
22
|
"author": "Agoric",
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@agoric/assert": "0.6.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/zoe": "0.26.3-dev-
|
|
36
|
-
"@agoric/zone": "0.2.3-dev-
|
|
37
|
-
"@endo/far": "^1.0.
|
|
38
|
-
"@endo/import-bundle": "^1.0.
|
|
39
|
-
"@endo/marshal": "^1.
|
|
40
|
-
"@endo/nat": "^5.0.
|
|
41
|
-
"@endo/patterns": "^1.
|
|
42
|
-
"@endo/promise-kit": "^1.0.
|
|
25
|
+
"@agoric/assert": "0.6.1-dev-c5284e4.0+c5284e4",
|
|
26
|
+
"@agoric/ertp": "0.16.3-dev-c5284e4.0+c5284e4",
|
|
27
|
+
"@agoric/governance": "0.10.4-dev-c5284e4.0+c5284e4",
|
|
28
|
+
"@agoric/internal": "0.3.3-dev-c5284e4.0+c5284e4",
|
|
29
|
+
"@agoric/network": "0.1.1-dev-c5284e4.0+c5284e4",
|
|
30
|
+
"@agoric/notifier": "0.6.3-dev-c5284e4.0+c5284e4",
|
|
31
|
+
"@agoric/store": "0.9.3-dev-c5284e4.0+c5284e4",
|
|
32
|
+
"@agoric/swingset-vat": "0.32.3-dev-c5284e4.0+c5284e4",
|
|
33
|
+
"@agoric/time": "0.3.3-dev-c5284e4.0+c5284e4",
|
|
34
|
+
"@agoric/vat-data": "0.5.3-dev-c5284e4.0+c5284e4",
|
|
35
|
+
"@agoric/zoe": "0.26.3-dev-c5284e4.0+c5284e4",
|
|
36
|
+
"@agoric/zone": "0.2.3-dev-c5284e4.0+c5284e4",
|
|
37
|
+
"@endo/far": "^1.0.4",
|
|
38
|
+
"@endo/import-bundle": "^1.0.4",
|
|
39
|
+
"@endo/marshal": "^1.3.0",
|
|
40
|
+
"@endo/nat": "^5.0.4",
|
|
41
|
+
"@endo/patterns": "^1.2.0",
|
|
42
|
+
"@endo/promise-kit": "^1.0.4",
|
|
43
43
|
"import-meta-resolve": "^2.2.1",
|
|
44
44
|
"jessie.js": "^0.3.2"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
48
|
-
"@endo/bundle-source": "^3.0
|
|
49
|
-
"@endo/init": "^1.0.
|
|
47
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-c5284e4.0+c5284e4",
|
|
48
|
+
"@endo/bundle-source": "^3.1.0",
|
|
49
|
+
"@endo/init": "^1.0.4",
|
|
50
50
|
"ava": "^5.3.0",
|
|
51
51
|
"c8": "^7.13.0"
|
|
52
52
|
},
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"workerThreads": false
|
|
76
76
|
},
|
|
77
77
|
"typeCoverage": {
|
|
78
|
-
"atLeast":
|
|
78
|
+
"atLeast": 91.05
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "c5284e4721ad2702c4551f216bb8eed7abe4d7cf"
|
|
81
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain-behaviors.d.ts","sourceRoot":"","sources":["chain-behaviors.js"],"names":[],"mappings":"AA6BO,0CAFI,eAAe,
|
|
1
|
+
{"version":3,"file":"chain-behaviors.d.ts","sourceRoot":"","sources":["chain-behaviors.js"],"names":[],"mappings":"AA6BO,0CAFI,eAAe,iBA+EzB;AAQM,qIAJI,eAAe,GAAG;IAC5B,OAAW,EAAE;QAAE,eAAe,EAAE,KAAK,UAAU,eAAe,CAAC,CAAC,CAAA;KAAE,CAAC;CAChE,iBAUH;AAIM,6DADK,eAAe,iBAG1B;AAIM,gMADK,eAAe,iBAuD1B;AAcM,2FAHI,cAAc,kBACd;IAAE,QAAQ,CAAC,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,iBAqFhD;AAIM,sMADK,eAAe,iBAc1B;AASM,kNALI,YAAY,YAAY,CAAC,GACnC,cAAkB,GAAG;IACrB,OAAa,EAAE;QAAE,eAAe,EAAE,KAAK,UAAU,eAAe,CAAC,CAAC,CAAA;KAAE,CAAC;CAChE,iBAgCL;AAQM,2LAJI,cAAc,GAAG;IAC3B,OAAW,EAAE;QAAE,eAAe,EAAE,KAAK,UAAU,eAAe,CAAC,CAAC,CAAA;KAAE,CAAC;CAChE,iBA4BH;AAOM,qLAJI,cAAc,GAAG;IAC3B,OAAW,EAAE;QAAE,eAAe,EAAE,KAAK,UAAU,eAAe,CAAC,CAAC,CAAA;KAAE,CAAC;CAChE,iBAqCH;AAGM,kJADK,eAAe,GAAG,cAAc,iBAkB3C;AAaM,kGATI,eAAe;;;;;;kBAyCzB;AAOM,4DAFI,eAAe,iBAMzB;AAGD,wDAAwD;AACxD,8CADW,OAAO,eAAe,EAAE,iBAAiB,CA2ElD;AAGF,wDAAwD;AACxD,uCADW,OAAO,eAAe,EAAE,iBAAiB,CASjD"}
|
|
@@ -57,13 +57,7 @@ export const bridgeCoreEval = async allPowers => {
|
|
|
57
57
|
async fromBridge(obj) {
|
|
58
58
|
switch (obj.type) {
|
|
59
59
|
case 'CORE_EVAL': {
|
|
60
|
-
/**
|
|
61
|
-
* Type defined by
|
|
62
|
-
* `agoric-sdk/golang/cosmos/proto/agoric/swingset/swingset.proto`
|
|
63
|
-
* CoreEval.
|
|
64
|
-
*
|
|
65
|
-
* @type {{ evals: { json_permits: string; js_code: string }[] }}
|
|
66
|
-
*/
|
|
60
|
+
/** @type {import('@agoric/cosmic-proto/dist/codegen/agoric/swingset/swingset.d.ts').CoreEvalProposalSDKType} */
|
|
67
61
|
const { evals } = obj;
|
|
68
62
|
return Promise.all(
|
|
69
63
|
evals.map(({ json_permits: jsonPermit, js_code: code }) =>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export function startClient({ vatParameters: { argv: { FIXME_GCI }, }, devices, vats, vatPowers, consume: { vatAdminSvc }, }: BootDevices<SoloDevices> & BootstrapSpace & {
|
|
2
2
|
vatParameters: BootstrapVatParams;
|
|
3
3
|
vats: SwingsetVats & SoloVats;
|
|
4
|
+
zone: import('@agoric/base-zone').Zone;
|
|
4
5
|
}): Promise<void>;
|
|
5
6
|
/** @type {import('./lib-boot.js').BootstrapManifest} */
|
|
6
7
|
export const CLIENT_BOOTSTRAP_MANIFEST: import('./lib-boot.js').BootstrapManifest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-behaviors.d.ts","sourceRoot":"","sources":["client-behaviors.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client-behaviors.d.ts","sourceRoot":"","sources":["client-behaviors.js"],"names":[],"mappings":"AA4FO,8HAPI,YAAY,WAAW,CAAC,GAClC,cAAkB,GAAG;IACrB,aAAmB,EAAE,kBAAkB,CAAC;IACxC,IAAU,EAAE,YAAY,GAAG,QAAQ,CAAC;IACpC,IAAU,EAAE,OAAO,mBAAmB,EAAE,IAAI,CAAC;CACxC,iBAwEL;AAGD,wDAAwD;AACxD,wCADW,OAAO,eAAe,EAAE,iBAAiB,CAoCjD"}
|
|
@@ -87,6 +87,7 @@ async function createLocalBundle(vats, devices, vatAdminSvc, vatPowers) {
|
|
|
87
87
|
* BootstrapSpace & {
|
|
88
88
|
* vatParameters: BootstrapVatParams;
|
|
89
89
|
* vats: SwingsetVats & SoloVats;
|
|
90
|
+
* zone: import('@agoric/base-zone').Zone;
|
|
90
91
|
* }} powers
|
|
91
92
|
*/
|
|
92
93
|
export const startClient = async ({
|
|
@@ -478,7 +478,7 @@ declare function startFactoryInstance(zoe: ERef<ZoeService>, inst: Installation<
|
|
|
478
478
|
}, baggage: import("@agoric/vat-data").Baggage) => Promise<{
|
|
479
479
|
creatorFacet: import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
480
480
|
provideSmartWallet(address: string, bank: ERef<import("../vat-bank.js").Bank>, namesByAddressAdmin: ERef<import("../types.js").NameAdmin>): Promise<[wallet: {
|
|
481
|
-
handleBridgeAction(actionCapData: import("@endo/marshal").CapData<string>, canSpend?: boolean | undefined): Promise<void>;
|
|
481
|
+
handleBridgeAction(actionCapData: import("@endo/marshal").CapData<string | null>, canSpend?: boolean | undefined): Promise<void>;
|
|
482
482
|
getDepositFacet(): import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
483
483
|
receive(payment: Payment<AssetKind>): Promise<Amount<AssetKind>>;
|
|
484
484
|
}>;
|
|
@@ -502,7 +502,7 @@ declare function startFactoryInstance(zoe: ERef<ZoeService>, inst: Installation<
|
|
|
502
502
|
};
|
|
503
503
|
repairWalletForIncarnation2(key: any): void;
|
|
504
504
|
} & import("@endo/exo/src/get-interface.js").GetInterfaceGuard<{
|
|
505
|
-
handleBridgeAction(actionCapData: import("@endo/marshal").CapData<string>, canSpend?: boolean | undefined): Promise<void>;
|
|
505
|
+
handleBridgeAction(actionCapData: import("@endo/marshal").CapData<string | null>, canSpend?: boolean | undefined): Promise<void>;
|
|
506
506
|
getDepositFacet(): import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
507
507
|
receive(payment: Payment<AssetKind>): Promise<Amount<AssetKind>>;
|
|
508
508
|
}>;
|
|
@@ -526,7 +526,7 @@ declare function startFactoryInstance(zoe: ERef<ZoeService>, inst: Installation<
|
|
|
526
526
|
};
|
|
527
527
|
repairWalletForIncarnation2(key: any): void;
|
|
528
528
|
}> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
529
|
-
handleBridgeAction(actionCapData: import("@endo/marshal").CapData<string>, canSpend?: boolean | undefined): Promise<void>;
|
|
529
|
+
handleBridgeAction(actionCapData: import("@endo/marshal").CapData<string | null>, canSpend?: boolean | undefined): Promise<void>;
|
|
530
530
|
getDepositFacet(): import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
531
531
|
receive(payment: Payment<AssetKind>): Promise<Amount<AssetKind>>;
|
|
532
532
|
}>;
|
|
@@ -550,7 +550,7 @@ declare function startFactoryInstance(zoe: ERef<ZoeService>, inst: Installation<
|
|
|
550
550
|
};
|
|
551
551
|
repairWalletForIncarnation2(key: any): void;
|
|
552
552
|
} & import("@endo/exo/src/get-interface.js").GetInterfaceGuard<{
|
|
553
|
-
handleBridgeAction(actionCapData: import("@endo/marshal").CapData<string>, canSpend?: boolean | undefined): Promise<void>;
|
|
553
|
+
handleBridgeAction(actionCapData: import("@endo/marshal").CapData<string | null>, canSpend?: boolean | undefined): Promise<void>;
|
|
554
554
|
getDepositFacet(): import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
555
555
|
receive(payment: Payment<AssetKind>): Promise<Amount<AssetKind>>;
|
|
556
556
|
}>;
|
package/src/core/utils.d.ts
CHANGED
|
@@ -121,7 +121,7 @@ export function makeVatSpace(svc: ERef<ReturnType<Awaited<VatAdminVat>['createVa
|
|
|
121
121
|
fromCapData(data: any): any;
|
|
122
122
|
serialize(data: any): import("@endo/marshal").CapData<string | null>;
|
|
123
123
|
unserialize(data: any): any;
|
|
124
|
-
}>;
|
|
124
|
+
}>; /** @type {MapStore<string, CreateVatResults>} */
|
|
125
125
|
}>;
|
|
126
126
|
makePublishingRecorderKit: <T>(storageNode: StorageNode | (import("@endo/eventual-send").DataOnly<StorageNode> & import("@endo/eventual-send").RemotableBrand<import("@endo/eventual-send").DataOnly<StorageNode>, StorageNode>), valueShape?: import("@agoric/zoe/src/contractSupport/recorder.js").TypedMatcher<T> | undefined) => import("@agoric/zoe/src/contractSupport/recorder.js").RecorderKit<T>;
|
|
127
127
|
makeReadOnlyRecorderKit: <T>(storageNode: StorageNode | (import("@endo/eventual-send").DataOnly<StorageNode> & import("@endo/eventual-send").RemotableBrand<import("@endo/eventual-send").DataOnly<StorageNode>, StorageNode>), valueShape?: import("@agoric/zoe/src/contractSupport/recorder.js").TypedMatcher<T> | undefined) => import("@agoric/zoe/src/contractSupport/recorder.js").RecorderKit<T>;
|
|
@@ -143,7 +143,7 @@ export function makeVatSpace(svc: ERef<ReturnType<Awaited<VatAdminVat>['createVa
|
|
|
143
143
|
fromCapData(data: any): any;
|
|
144
144
|
serialize(data: any): import("@endo/marshal").CapData<string | null>;
|
|
145
145
|
unserialize(data: any): any;
|
|
146
|
-
}>;
|
|
146
|
+
}>; /** @type {MapStore<string, CreateVatResults>} */
|
|
147
147
|
}>;
|
|
148
148
|
makePublishingRecorderKit: <T>(storageNode: StorageNode | (import("@endo/eventual-send").DataOnly<StorageNode> & import("@endo/eventual-send").RemotableBrand<import("@endo/eventual-send").DataOnly<StorageNode>, StorageNode>), valueShape?: import("@agoric/zoe/src/contractSupport/recorder.js").TypedMatcher<T> | undefined) => import("@agoric/zoe/src/contractSupport/recorder.js").RecorderKit<T>;
|
|
149
149
|
makeReadOnlyRecorderKit: <T>(storageNode: StorageNode | (import("@endo/eventual-send").DataOnly<StorageNode> & import("@endo/eventual-send").RemotableBrand<import("@endo/eventual-send").DataOnly<StorageNode>, StorageNode>), valueShape?: import("@agoric/zoe/src/contractSupport/recorder.js").TypedMatcher<T> | undefined) => import("@agoric/zoe/src/contractSupport/recorder.js").RecorderKit<T>;
|
package/src/core/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["utils.js"],"names":[],"mappings":"AAYA;;;;;;GAMG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyDG;AAEH,8BAA8B;AAC9B,8BADW,eAAe,CAKxB;AAQK,gCAHI,MAAM,8BACN;IAAE,IAAI,EAAE;QAAE,KAAK,EAAE,QAAQ,CAAC;QAAC,KAAK,EAAE,YAAY,CAAA;KAAE,CAAA;CAAE,iBAK5D;AAQM,8DAJkB,OAAO,MAAM,EAAE,OAAO,CAAC,cAClC,OAAO,KACR,OAAO,MAAM,EAAE,OAAO,CAAC,CAG0B;AAWvD,kCALI,IAAI,GAAG,MAAM,GAAG,OAAO,MAAM,EAAE,GAAG,CAAC,YAEnC,OAAO,oCAkCjB;AAQM,sCAJI,IAAI,GAAG,MAAM,GAAG,OAAO,MAAM,EAAE,GAAG,CAAC,aAEnC,OAAO,OAYjB;AAUM;eALI,OAAO;eACP,OAAO,MAAM,EAAE,OAAO,CAAC;cACvB,OAAO,MAAM,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,CAAC;uBAChC,MAAM,UAAU,OAAO,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO;mBAwBpE;AASM,sDAHI,KAAK,OAAO,aAAa,EAAE,SAAS,CAAC;;;4CAyB/C;AAOM,iDAJI,KAAK,OAAO,aAAa,EAAE,SAAS,CAAC;;;uEAsB/C;AAoBM;;;0BAXI,OAAO,MAAM,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,CAAC;iBAMhC,OAAO,aAAa,EAAE,OAAO;sBACxB,OAAO,aAAa,EAAE,SAAS;YACzC,eAAe;GAuB3B;AAMM,mDAFI,MAAM;;;EAgBhB;AAaM,kCAVI,KAAK,WAAW,QAAQ,WAAW,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,kBAC/D,OAAO,mBACG,GAAG,KAAK,IAAI
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["utils.js"],"names":[],"mappings":"AAYA;;;;;;GAMG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyDG;AAEH,8BAA8B;AAC9B,8BADW,eAAe,CAKxB;AAQK,gCAHI,MAAM,8BACN;IAAE,IAAI,EAAE;QAAE,KAAK,EAAE,QAAQ,CAAC;QAAC,KAAK,EAAE,YAAY,CAAA;KAAE,CAAA;CAAE,iBAK5D;AAQM,8DAJkB,OAAO,MAAM,EAAE,OAAO,CAAC,cAClC,OAAO,KACR,OAAO,MAAM,EAAE,OAAO,CAAC,CAG0B;AAWvD,kCALI,IAAI,GAAG,MAAM,GAAG,OAAO,MAAM,EAAE,GAAG,CAAC,YAEnC,OAAO,oCAkCjB;AAQM,sCAJI,IAAI,GAAG,MAAM,GAAG,OAAO,MAAM,EAAE,GAAG,CAAC,aAEnC,OAAO,OAYjB;AAUM;eALI,OAAO;eACP,OAAO,MAAM,EAAE,OAAO,CAAC;cACvB,OAAO,MAAM,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,CAAC;uBAChC,MAAM,UAAU,OAAO,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO;mBAwBpE;AASM,sDAHI,KAAK,OAAO,aAAa,EAAE,SAAS,CAAC;;;4CAyB/C;AAOM,iDAJI,KAAK,OAAO,aAAa,EAAE,SAAS,CAAC;;;uEAsB/C;AAoBM;;;0BAXI,OAAO,MAAM,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,CAAC;iBAMhC,OAAO,aAAa,EAAE,OAAO;sBACxB,OAAO,aAAa,EAAE,SAAS;YACzC,eAAe;GAuB3B;AAMM,mDAFI,MAAM;;;EAgBhB;AAaM,kCAVI,KAAK,WAAW,QAAQ,WAAW,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,kBAC/D,OAAO,mBACG,GAAG,KAAK,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAsB/B,iDAAiD;;;;;;;;;;;;;;;;;;;;;;wBAAjD,iDAAiD;;;;;;;;EAiClD;;;;+BApDY,OAAO,sBAAsB,EAAE,gBAAgB;uBAG/C,SAAS,MAAM,EAAE,gBAAgB,CAAC"}
|
package/src/core/utils.js
CHANGED
|
@@ -178,20 +178,20 @@ export const runModuleBehaviors = ({
|
|
|
178
178
|
makeConfig,
|
|
179
179
|
}) => {
|
|
180
180
|
return Promise.all(
|
|
181
|
-
entries(manifest).map(([name, permit]) =>
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
'function',
|
|
188
|
-
`behaviors[${name}] is not a function; got ${behavior}`,
|
|
181
|
+
entries(manifest).map(async ([name, permit]) => {
|
|
182
|
+
await null;
|
|
183
|
+
const behavior = behaviors[name];
|
|
184
|
+
if (typeof behavior !== 'function') {
|
|
185
|
+
const behaviorKeys = Reflect.ownKeys(behaviors).map(key =>
|
|
186
|
+
typeof key === 'string' ? JSON.stringify(key) : String(key),
|
|
189
187
|
);
|
|
190
|
-
const
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
188
|
+
const keysStr = `[${behaviorKeys.join(', ')}]`;
|
|
189
|
+
throw Fail`${q(name)} is not a function in ${keysStr}: ${behavior}`;
|
|
190
|
+
}
|
|
191
|
+
const powers = extractPowers(permit, allPowers);
|
|
192
|
+
const config = harden(makeConfig(name, permit));
|
|
193
|
+
return Reflect.apply(behavior, behaviors, [powers, config]);
|
|
194
|
+
}),
|
|
195
195
|
);
|
|
196
196
|
};
|
|
197
197
|
harden(runModuleBehaviors);
|
package/src/ibc.d.ts
CHANGED
|
@@ -1,28 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
export function prepareIBCConnectionHandler(zone: import('@agoric/base-zone').Zone): (args_0?: any, args_1?: any) => import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
2
|
+
onOpen(conn: any, localAddr: any, remoteAddr: any, _handler: any): Promise<void>;
|
|
3
|
+
/**
|
|
4
|
+
* @param {Connection} _conn
|
|
5
|
+
* @param {Bytes} packetBytes
|
|
6
|
+
* @param {ConnectionHandler} _handler
|
|
7
|
+
* @param {object} root0
|
|
8
|
+
* @param {bigint} [root0.relativeTimeoutNs]
|
|
9
|
+
* @returns {PromiseVow<Bytes>} Acknowledgement data
|
|
10
|
+
*/
|
|
11
|
+
onReceive(_conn: Connection, packetBytes: Bytes, _handler: ConnectionHandler, { relativeTimeoutNs }?: {
|
|
12
|
+
relativeTimeoutNs?: bigint | undefined;
|
|
13
|
+
}): PromiseVow<Bytes>;
|
|
14
|
+
onClose(_conn: any, _reason: any, _handler: any): Promise<void>;
|
|
15
|
+
}>;
|
|
16
|
+
export function prepareIBCProtocol(zone: import('@agoric/base-zone').Zone, { makeVowKit, watch, when }: ReturnType<(zone: import("@agoric/base-zone").Zone, powers?: {
|
|
17
|
+
isRetryableReason?: ((reason: any) => boolean) | undefined;
|
|
18
|
+
watchPromise?: ((p: PromiseLike<any>, watcher: import("@agoric/vow/src/watch-promise.js").PromiseWatcher, ...args: unknown[]) => void) | undefined;
|
|
19
|
+
} | undefined) => {
|
|
20
|
+
when: <T = any, TResult1 = import("@agoric/vow/src/E.js").Unwrap<T>, TResult2 = never>(specimenP: T, onFulfilled?: ((value: import("@agoric/vow/src/E.js").Unwrap<T>) => TResult1 | PromiseLike<TResult1>) | undefined, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined) => Promise<TResult1 | TResult2>;
|
|
21
|
+
watch: <T_1 = any, TResult1_1 = T_1, TResult2_1 = T_1>(specimenP: import("@agoric/vow").ERef<T_1 | import("@agoric/vow").Vow<T_1>>, watcher?: import("@agoric/vow").Watcher<T_1, TResult1_1, TResult2_1> | undefined, watcherContext?: unknown) => import("@agoric/vow").Vow<TResult1_1 | TResult2_1>;
|
|
22
|
+
makeVowKit: <T_2>() => import("@agoric/vow").VowKit<T_2>;
|
|
23
|
+
}>): (ibcdev: any) => {
|
|
24
|
+
protocolHandler: ProtocolHandler;
|
|
25
|
+
bridgeHandler: BridgeHandler;
|
|
26
|
+
} | {
|
|
27
|
+
protocolHandler: import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
28
|
+
onCreate(impl: any, _protocolHandler: any): Promise<void>;
|
|
29
|
+
onInstantiate(): Promise<string>;
|
|
30
|
+
generatePortID(_localAddr: any, _protocolHandler: any): Promise<string>;
|
|
31
|
+
onBind(port: any, localAddr: any, _protocolHandler: any): Promise<any>;
|
|
32
|
+
onConnect(port: any, localAddr: any, remoteAddr: any, _chandler: any, _protocolHandler: any): Promise<import("@agoric/vow").Vow<any>>;
|
|
33
|
+
onListen(_port: any, localAddr: any, _listenHandler: any): Promise<void>;
|
|
34
|
+
onListenRemove(_port: any, localAddr: any, _listenHandler: any): Promise<void>;
|
|
35
|
+
onRevoke(_port: any, localAddr: any, _protocolHandler: any): Promise<void>;
|
|
36
|
+
}>;
|
|
37
|
+
bridgeHandler: import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
38
|
+
fromBridge(obj: any): Promise<void>;
|
|
39
|
+
}>;
|
|
40
|
+
};
|
|
41
|
+
export function prepareCallbacks(zone: import('@agoric/base-zone').Zone): (dibcBridgeManager: import("@agoric/vats").ScopedBridgeManager) => import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
42
|
+
downcall(method: any, obj: any): Promise<any>;
|
|
43
|
+
}>;
|
|
26
44
|
export type BridgeHandler = import('./types.js').BridgeHandler;
|
|
27
45
|
export type IBCPortID = string;
|
|
28
46
|
export type IBCChannelID = string;
|
|
@@ -34,4 +52,24 @@ export type IBCPacket = {
|
|
|
34
52
|
destination_channel: IBCChannelID;
|
|
35
53
|
destination_port: IBCPortID;
|
|
36
54
|
};
|
|
55
|
+
export type Counterparty = {
|
|
56
|
+
port_id: string;
|
|
57
|
+
channel_id: string;
|
|
58
|
+
};
|
|
59
|
+
export type ConnectingInfo = {
|
|
60
|
+
order: 'ORDERED' | 'UNORDERED';
|
|
61
|
+
connectionHops: string[];
|
|
62
|
+
portID: string;
|
|
63
|
+
channelID: string;
|
|
64
|
+
counterparty: Counterparty;
|
|
65
|
+
version: string;
|
|
66
|
+
};
|
|
67
|
+
export type OnConnectP = import('@agoric/vow').VowKit<AttemptDescription>;
|
|
68
|
+
export type Outbound = Omit<ConnectingInfo, 'counterparty' | 'channelID'> & {
|
|
69
|
+
localAddr: Endpoint;
|
|
70
|
+
onConnectP: OnConnectP;
|
|
71
|
+
counterparty: {
|
|
72
|
+
port_id: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
37
75
|
//# sourceMappingURL=ibc.d.ts.map
|
package/src/ibc.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ibc.d.ts","sourceRoot":"","sources":["ibc.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ibc.d.ts","sourceRoot":"","sources":["ibc.js"],"names":[],"mappings":"AAsFO,kDADK,OAAO,mBAAmB,EAAE,IAAI;;IA+CtC;;;;;;;OAOG;qBANQ,UAAU,eACV,KAAK,YACL,iBAAiB;QAEF,iBAAiB;QAC9B,WAAW,KAAK,CAAC;;GA6CnC;AAMM,yCAHI,OAAO,mBAAmB,EAAE,IAAI,+BAChC;;;;;;;EAAiD;qBAelC,eAAe;mBACjB,aAAa;;;;;;;;;;;;;;;EAuiBpC;AAKM,uCADK,OAAO,mBAAmB,EAAE,IAAI;;GAkB3C;4BAvvBa,OAAO,YAAY,EAAE,aAAa;wBAGnC,MAAM;2BAEN,MAAM;8BAEN,MAAM;;;oBAML,YAAY;iBACZ,SAAS;yBACT,YAAY;sBACZ,SAAS;;;aAgCT,MAAM;gBACN,MAAM;;;WAGN,SAAS,GAAG,WAAW;oBACvB,MAAM,EAAE;YACR,MAAM;eACN,MAAM;kBACN,YAAY;aACZ,MAAM;;yBAEP,OAAO,aAAa,EAAE,MAAM,CAAC,kBAAkB,CAAC;uBAEhD,KAAK,cAAc,EAAE,cAAc,GAAG,WAAW,CAAC,GAAG;IACjE,SAAa,EAAE,QAAQ,CAAC;IACxB,UAAc,EAAE,UAAU,CAAC;IAC3B,YAAgB,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CACnC"}
|