@agoric/orchestration 0.1.1-dev-37ec151.0 → 0.1.1-dev-989aa19.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 +16 -16
- package/src/chain-info.js +1 -1
- package/src/examples/sendAnywhere.contract.d.ts.map +1 -1
- package/src/examples/sendAnywhere.contract.js +3 -2
- package/src/examples/stakeBld.contract.d.ts +23 -11
- package/src/examples/stakeBld.contract.d.ts.map +1 -1
- package/src/examples/stakeBld.contract.js +9 -5
- package/src/examples/stakeIca.contract.d.ts +3 -3
- package/src/examples/stakeIca.contract.js +1 -1
- package/src/examples/swapExample.contract.d.ts.map +1 -1
- package/src/examples/swapExample.contract.js +6 -1
- package/src/exos/{chainAccountKit.d.ts → chain-account-kit.d.ts} +1 -1
- package/src/exos/chain-account-kit.d.ts.map +1 -0
- package/src/exos/{chainAccountKit.js → chain-account-kit.js} +2 -2
- package/src/exos/{cosmosOrchestrationAccount.d.ts → cosmos-orchestration-account.d.ts} +1 -1
- package/src/exos/cosmos-orchestration-account.d.ts.map +1 -0
- package/src/exos/{icqConnectionKit.d.ts → icq-connection-kit.d.ts} +1 -1
- package/src/exos/icq-connection-kit.d.ts.map +1 -0
- package/src/exos/local-chain-facade.d.ts +105 -0
- package/src/exos/local-chain-facade.d.ts.map +1 -0
- package/src/exos/local-chain-facade.js +67 -0
- package/src/exos/{local-chain-account-kit.d.ts → local-orchestration-account.d.ts} +33 -64
- package/src/exos/{local-chain-account-kit.d.ts.map → local-orchestration-account.d.ts.map} +1 -1
- package/src/exos/{local-chain-account-kit.js → local-orchestration-account.js} +48 -31
- package/src/exos/orchestrator.d.ts +39 -54
- package/src/exos/orchestrator.d.ts.map +1 -1
- package/src/exos/orchestrator.js +16 -24
- package/src/exos/remote-chain-facade.d.ts +3 -7
- package/src/exos/remote-chain-facade.d.ts.map +1 -1
- package/src/exos/remote-chain-facade.js +8 -18
- package/src/facade.d.ts +85 -29
- package/src/facade.d.ts.map +1 -1
- package/src/facade.js +12 -85
- package/src/proposals/start-stakeAtom.d.ts +3 -3
- package/src/proposals/start-stakeAtom.d.ts.map +1 -1
- package/src/proposals/start-stakeBld.d.ts +23 -11
- package/src/proposals/start-stakeBld.d.ts.map +1 -1
- package/src/proposals/start-stakeOsmo.d.ts +3 -3
- package/src/proposals/start-stakeOsmo.d.ts.map +1 -1
- package/src/service.js +3 -3
- package/src/typeGuards.d.ts +14 -0
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +15 -0
- package/src/types.d.ts +2 -2
- package/src/types.d.ts.map +1 -1
- package/src/types.ts +2 -2
- package/src/utils/chainHub.d.ts +15 -3
- package/src/utils/chainHub.d.ts.map +1 -1
- package/src/utils/chainHub.js +1 -1
- package/src/utils/orc.js +2 -2
- package/src/utils/orchestrationAccount.js +3 -4
- package/src/utils/start-helper.d.ts +9 -0
- package/src/utils/start-helper.d.ts.map +1 -1
- package/src/utils/start-helper.js +16 -5
- package/src/exos/chainAccountKit.d.ts.map +0 -1
- package/src/exos/cosmosOrchestrationAccount.d.ts.map +0 -1
- package/src/exos/icqConnectionKit.d.ts.map +0 -1
- /package/src/exos/{cosmosOrchestrationAccount.js → cosmos-orchestration-account.js} +0 -0
- /package/src/exos/{icqConnectionKit.js → icq-connection-kit.js} +0 -0
|
@@ -25,7 +25,7 @@ export function startStakeOsmo({ consume: { agoricNames, board, chainStorage, ch
|
|
|
25
25
|
publicSubscribers: {
|
|
26
26
|
account: {
|
|
27
27
|
description: string;
|
|
28
|
-
subscriber: globalThis.Subscriber<import("../exos/
|
|
28
|
+
subscriber: globalThis.Subscriber<import("../exos/cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
|
|
29
29
|
storagePath: Promise<string>;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
@@ -42,7 +42,7 @@ export function startStakeOsmo({ consume: { agoricNames, board, chainStorage, ch
|
|
|
42
42
|
getPublicTopics(): {
|
|
43
43
|
account: {
|
|
44
44
|
description: string;
|
|
45
|
-
subscriber: globalThis.Subscriber<import("../exos/
|
|
45
|
+
subscriber: globalThis.Subscriber<import("../exos/cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
|
|
46
46
|
storagePath: Promise<string>;
|
|
47
47
|
};
|
|
48
48
|
};
|
|
@@ -63,7 +63,7 @@ export function startStakeOsmo({ consume: { agoricNames, board, chainStorage, ch
|
|
|
63
63
|
publicSubscribers: {
|
|
64
64
|
account: {
|
|
65
65
|
description: string;
|
|
66
|
-
subscriber: globalThis.Subscriber<import("../exos/
|
|
66
|
+
subscriber: globalThis.Subscriber<import("../exos/cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
|
|
67
67
|
storagePath: Promise<string>;
|
|
68
68
|
};
|
|
69
69
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-stakeOsmo.d.ts","sourceRoot":"","sources":["start-stakeOsmo.js"],"names":[],"mappings":"AAuBO,yOAVI,eAAe,GAAG;IAC5B,YAAgB,EAAE;QAClB,OAAa,EAAE;YACf,QAAgB,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"start-stakeOsmo.d.ts","sourceRoot":"","sources":["start-stakeOsmo.js"],"names":[],"mappings":"AAuBO,yOAVI,eAAe,GAAG;IAC5B,YAAgB,EAAE;QAClB,OAAa,EAAE;YACf,QAAgB,EAAE,YAAY,OA2ChB,IAAI,aACf,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA1CK,CAAC;SACH,CAAC;KACH,CAAC;CACH,iBAwDH;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BN"}
|
package/src/service.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { V as E } from '@agoric/vow/vat.js';
|
|
4
4
|
import { M } from '@endo/patterns';
|
|
5
5
|
import { Shape as NetworkShape } from '@agoric/network';
|
|
6
|
-
import { prepareChainAccountKit } from './exos/
|
|
7
|
-
import { prepareICQConnectionKit } from './exos/
|
|
6
|
+
import { prepareChainAccountKit } from './exos/chain-account-kit.js';
|
|
7
|
+
import { prepareICQConnectionKit } from './exos/icq-connection-kit.js';
|
|
8
8
|
import {
|
|
9
9
|
makeICAChannelAddress,
|
|
10
10
|
makeICQChannelAddress,
|
|
@@ -133,7 +133,7 @@ const prepareOrchestrationKit = (
|
|
|
133
133
|
remoteConnAddr,
|
|
134
134
|
chainAccountKit.connectionHandler,
|
|
135
135
|
);
|
|
136
|
-
//
|
|
136
|
+
// FIXME if we fail, should we close the port (if it was created in this flow)?
|
|
137
137
|
return chainAccountKit.account;
|
|
138
138
|
},
|
|
139
139
|
/**
|
package/src/typeGuards.d.ts
CHANGED
|
@@ -34,4 +34,18 @@ export const IBCChannelInfoShape: import("@endo/patterns").Matcher;
|
|
|
34
34
|
export const IBCConnectionIDShape: import("@endo/patterns").Matcher;
|
|
35
35
|
export const IBCConnectionInfoShape: import("@endo/patterns").Matcher;
|
|
36
36
|
export const CosmosChainInfoShape: import("@endo/patterns").Matcher;
|
|
37
|
+
export const ChainInfoShape: import("@endo/patterns").Matcher;
|
|
38
|
+
export const LocalChainAccountShape: import("@endo/patterns").Matcher;
|
|
39
|
+
export const DenomShape: import("@endo/patterns").Matcher;
|
|
40
|
+
export const BrandInfoShape: import("@endo/patterns").Matcher;
|
|
41
|
+
export namespace DenomAmountShape {
|
|
42
|
+
export { DenomShape as denom };
|
|
43
|
+
let value_3: import("@endo/patterns").Matcher;
|
|
44
|
+
export { value_3 as value };
|
|
45
|
+
}
|
|
46
|
+
/** @see {Chain} */
|
|
47
|
+
export const ChainFacadeI: import("@endo/patterns").InterfaceGuard<{
|
|
48
|
+
getChainInfo: import("@endo/patterns").MethodGuard;
|
|
49
|
+
makeAccount: import("@endo/patterns").MethodGuard;
|
|
50
|
+
}>;
|
|
37
51
|
//# sourceMappingURL=typeGuards.d.ts.map
|
package/src/typeGuards.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAGA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;AAiBH,8DAAkE;;;;;AAOlE,uEAUE;AAEF,iEAA4C;AAC5C,mEAQG;AACH,oEAA+C;AAC/C,sEAYG;AAEH,oEAUE"}
|
|
1
|
+
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAGA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;AAiBH,8DAAkE;;;;;AAOlE,uEAUE;AAEF,iEAA4C;AAC5C,mEAQG;AACH,oEAA+C;AAC/C,sEAYG;AAEH,oEAUE;AAGF,8DAAsC;AACtC,sEAAuE;AACvE,0DAAqC;AAErC,8DAAsC;;;;;;AAItC,mBAAmB;AACnB;;;GAGG"}
|
package/src/typeGuards.js
CHANGED
|
@@ -77,3 +77,18 @@ export const CosmosChainInfoShape = M.splitRecord(
|
|
|
77
77
|
icqEnabled: M.boolean(),
|
|
78
78
|
},
|
|
79
79
|
);
|
|
80
|
+
|
|
81
|
+
// FIXME more validation
|
|
82
|
+
export const ChainInfoShape = M.any();
|
|
83
|
+
export const LocalChainAccountShape = M.remotable('LocalChainAccount');
|
|
84
|
+
export const DenomShape = M.string();
|
|
85
|
+
// FIXME more validation
|
|
86
|
+
export const BrandInfoShape = M.any();
|
|
87
|
+
|
|
88
|
+
export const DenomAmountShape = { denom: DenomShape, value: M.bigint() };
|
|
89
|
+
|
|
90
|
+
/** @see {Chain} */
|
|
91
|
+
export const ChainFacadeI = M.interface('ChainFacade', {
|
|
92
|
+
getChainInfo: M.callWhen().returns(ChainInfoShape),
|
|
93
|
+
makeAccount: M.callWhen().returns(M.remotable('OrchestrationAccount')),
|
|
94
|
+
});
|
package/src/types.d.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
export type * from './chain-info.js';
|
|
3
3
|
export type * from './cosmos-api.js';
|
|
4
4
|
export type * from './ethereum-api.js';
|
|
5
|
-
export type * from './exos/
|
|
6
|
-
export type * from './exos/
|
|
5
|
+
export type * from './exos/chain-account-kit.js';
|
|
6
|
+
export type * from './exos/icq-connection-kit.js';
|
|
7
7
|
export type * from './orchestration-api.js';
|
|
8
8
|
export type * from './service.js';
|
|
9
9
|
export type * from './vat-orchestration.js';
|
package/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAEhG,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,mBAAmB,CAAC;AACvC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAEhG,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,mBAAmB,CAAC;AACvC,mBAAmB,6BAA6B,CAAC;AACjD,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,wBAAwB,CAAC;AAC5C,mBAAmB,cAAc,CAAC;AAClC,mBAAmB,wBAAwB,CAAC"}
|
package/src/types.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
export type * from './chain-info.js';
|
|
4
4
|
export type * from './cosmos-api.js';
|
|
5
5
|
export type * from './ethereum-api.js';
|
|
6
|
-
export type * from './exos/
|
|
7
|
-
export type * from './exos/
|
|
6
|
+
export type * from './exos/chain-account-kit.js';
|
|
7
|
+
export type * from './exos/icq-connection-kit.js';
|
|
8
8
|
export type * from './orchestration-api.js';
|
|
9
9
|
export type * from './service.js';
|
|
10
10
|
export type * from './vat-orchestration.js';
|
package/src/utils/chainHub.d.ts
CHANGED
|
@@ -47,6 +47,15 @@ export function makeChainHub(agoricNames: Remote<NameHub>, zone?: Zone | undefin
|
|
|
47
47
|
'cosmoshub-4': {
|
|
48
48
|
id: "connection-1";
|
|
49
49
|
client_id: string;
|
|
50
|
+
/**
|
|
51
|
+
* Character used in a connection tuple key to separate the two chain ids. Valid
|
|
52
|
+
* because a chainId can contain only alphanumerics and dash.
|
|
53
|
+
*
|
|
54
|
+
* Vstorage keys can be only alphanumerics, dash or underscore. That leaves
|
|
55
|
+
* underscore as the only valid separator.
|
|
56
|
+
*
|
|
57
|
+
* @see {@link https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-2.md}
|
|
58
|
+
*/
|
|
50
59
|
counterparty: {
|
|
51
60
|
client_id: string;
|
|
52
61
|
connection_id: "connection-1";
|
|
@@ -58,8 +67,7 @@ export function makeChainHub(agoricNames: Remote<NameHub>, zone?: Zone | undefin
|
|
|
58
67
|
transferChannel: {
|
|
59
68
|
portId: string;
|
|
60
69
|
channelId: "channel-1";
|
|
61
|
-
counterPartyChannelId: "channel-1";
|
|
62
|
-
/**
|
|
70
|
+
counterPartyChannelId: "channel-1"; /**
|
|
63
71
|
* The entries of the top-level namehubs in agoricNames are reflected to
|
|
64
72
|
* vstorage. But only the top level. So we combine the 2 chain ids into 1 key.
|
|
65
73
|
* Connections are directionless, so we sort the ids.
|
|
@@ -84,10 +92,14 @@ export function makeChainHub(agoricNames: Remote<NameHub>, zone?: Zone | undefin
|
|
|
84
92
|
};
|
|
85
93
|
};
|
|
86
94
|
state: 3;
|
|
95
|
+
/**
|
|
96
|
+
* @param {Remote<NameHub>} agoricNames
|
|
97
|
+
* @param {Zone} [zone]
|
|
98
|
+
*/
|
|
87
99
|
transferChannel: {
|
|
88
100
|
portId: string;
|
|
89
101
|
channelId: "channel-0";
|
|
90
|
-
counterPartyChannelId: "channel-1";
|
|
102
|
+
counterPartyChannelId: "channel-1"; /** @type {MapStore<string, CosmosChainInfo>} */
|
|
91
103
|
counterPartyPortId: string;
|
|
92
104
|
ordering: 1;
|
|
93
105
|
state: 3;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chainHub.d.ts","sourceRoot":"","sources":["chainHub.js"],"names":[],"mappings":"AAOA;;;;;;GAMG;AAEH,wCAAwC;AACxC,gCAAiC;AACjC,kCAAkC;AAClC,gDAAiD;AAqB1C,wCAHI,MAAM,YACN,MAAM,UAUhB;AAMM;IAaH;;;;;;;;;;;OAWG;wBAFQ,MAAM;;;;;;;;IAMjB;;;;;;;;OAQG;iBAHuB,CAAC,4BAAD,CAAC,AAHf
|
|
1
|
+
{"version":3,"file":"chainHub.d.ts","sourceRoot":"","sources":["chainHub.js"],"names":[],"mappings":"AAOA;;;;;;GAMG;AAEH,wCAAwC;AACxC,gCAAiC;AACjC,kCAAkC;AAClC,gDAAiD;AAqB1C,wCAHI,MAAM,YACN,MAAM,UAUhB;AAMM;IAaH;;;;;;;;;;;OAWG;wBAFQ,MAAM;;;;;;;;IAMjB;;;;;;;;OAQG;iBAHuB,CAAC,4BAAD,CAAC,AAHf;;;;;;;oBA/DhB;;;;;;;;uBAQG;;;;;;;;;;;;4DAGH;;;;;;;2BAOG;;;;;;;;;;;;;;;;;;oBAWH;;;uBAGG;;;;4DAED,gDAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qDAAhD,gDAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAsFlD;;;;;uBAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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G,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,iBAgCzC;uBAtCa,UAAU,CAAC,OAAO,YAAY,CAAC;6BAlInB,cAAc;4BAGf,kBAAkB;0BACpB,cAAc;uCAHgB,kBAAkB;+BAC9B,kBAAkB"}
|
package/src/utils/chainHub.js
CHANGED
|
@@ -163,7 +163,7 @@ export const registerChain = async (
|
|
|
163
163
|
.then(() => log(`registered agoricNames chain.${name}`)),
|
|
164
164
|
];
|
|
165
165
|
|
|
166
|
-
//
|
|
166
|
+
// FIXME updates redundantly, twice per edge
|
|
167
167
|
for await (const [counterChainId, connInfo] of Object.entries(connections)) {
|
|
168
168
|
const key = connectionKey(chainInfo.chainId, counterChainId);
|
|
169
169
|
promises.push(
|
package/src/utils/orc.js
CHANGED
|
@@ -8,7 +8,7 @@ export const orcUtils = {
|
|
|
8
8
|
* @returns {TransferMsg}
|
|
9
9
|
*/
|
|
10
10
|
makeTransferMsg: _args => {
|
|
11
|
-
//
|
|
11
|
+
// FIXME mocked, so typescript is happy
|
|
12
12
|
return {
|
|
13
13
|
toAccount: {
|
|
14
14
|
chainId: 'osmosis-test',
|
|
@@ -26,7 +26,7 @@ export const orcUtils = {
|
|
|
26
26
|
* @returns {TransferMsg}
|
|
27
27
|
*/
|
|
28
28
|
makeOsmosisSwap(_args) {
|
|
29
|
-
//
|
|
29
|
+
// FIXME mocked, so typescript is happy
|
|
30
30
|
return {
|
|
31
31
|
toAccount: {
|
|
32
32
|
chainId: 'osmosis-test',
|
|
@@ -4,16 +4,15 @@ import { AmountArgShape, ChainAddressShape, CoinShape } from '../typeGuards.js';
|
|
|
4
4
|
|
|
5
5
|
/** @import {OrchestrationAccountI} from '../orchestration-api.js'; */
|
|
6
6
|
|
|
7
|
-
// TODO complete this interface
|
|
8
7
|
/** @see {OrchestrationAccountI} */
|
|
9
8
|
export const orchestrationAccountMethods = {
|
|
10
9
|
getAddress: M.call().returns(ChainAddressShape),
|
|
11
10
|
getBalance: M.callWhen(M.any()).returns(CoinShape),
|
|
12
11
|
getBalances: M.callWhen().returns(M.arrayOf(CoinShape)),
|
|
13
12
|
send: M.callWhen(ChainAddressShape, AmountArgShape).returns(M.undefined()),
|
|
14
|
-
transfer: M.callWhen(AmountArgShape, ChainAddressShape)
|
|
15
|
-
M.
|
|
16
|
-
|
|
13
|
+
transfer: M.callWhen(AmountArgShape, ChainAddressShape)
|
|
14
|
+
.optional(M.record())
|
|
15
|
+
.returns(M.undefined()),
|
|
17
16
|
transferSteps: M.callWhen(AmountArgShape, M.any()).returns(M.undefined()),
|
|
18
17
|
deposit: M.callWhen(PaymentShape).returns(M.undefined()),
|
|
19
18
|
};
|
|
@@ -102,6 +102,15 @@ export function provideOrchestration(zcf: ZCF, baggage: Baggage, remotePowers: O
|
|
|
102
102
|
readonly counterPartyPortId: "transfer";
|
|
103
103
|
readonly ordering: 0;
|
|
104
104
|
readonly state: 3;
|
|
105
|
+
/**
|
|
106
|
+
* Helper that a contract start function can use to set up the objects needed
|
|
107
|
+
* for orchestration.
|
|
108
|
+
*
|
|
109
|
+
* @param {ZCF} zcf
|
|
110
|
+
* @param {Baggage} baggage
|
|
111
|
+
* @param {OrchestrationPowers} remotePowers
|
|
112
|
+
* @param {Marshaller} marshaller
|
|
113
|
+
*/
|
|
105
114
|
readonly version: "ics20-1";
|
|
106
115
|
};
|
|
107
116
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-helper.d.ts","sourceRoot":"","sources":["start-helper.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"start-helper.d.ts","sourceRoot":"","sources":["start-helper.js"],"names":[],"mappings":"AAwCO,0CALI,GAAG,kCAEH,mBAAmB,cACnB,UAAU;;;;;;;;;;kDA6CV,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BApDZ;;;;;;;;+BAQG;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uEA2CM,OAAO,kEAEF,OAAQ,WAAU,IAAK,qBAGH,IAAK;EAatC;;;;;8BAEkH,MAAM,KAAK,CAAC;6BAA6gB,QAAQ,KAAK,CAAC,mBAA6B,OAAO;6BAAwjB,OAAO,KAAK,CAAC;;;2BAA6rB,EAAE;;;;;;;oBAAqjG,CAAC;;;uBAA6lB,EAAE;;;;;;;;;;;;;;;;;6BAvF7jL,kBAAkB;4BAEnB,aAAa;kCAHK,cAAc;6BAE/B,cAAc"}
|
|
@@ -2,11 +2,12 @@ import { prepareAsyncFlowTools } from '@agoric/async-flow';
|
|
|
2
2
|
import { prepareVowTools } from '@agoric/vow';
|
|
3
3
|
import { prepareRecorderKitMakers } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
4
4
|
import { makeDurableZone } from '@agoric/zone/durable.js';
|
|
5
|
-
import {
|
|
5
|
+
import { prepareLocalOrchestrationAccountKit } from '../exos/local-orchestration-account.js';
|
|
6
6
|
import { makeOrchestrationFacade } from '../facade.js';
|
|
7
7
|
import { makeChainHub } from './chainHub.js';
|
|
8
8
|
import { prepareRemoteChainFacade } from '../exos/remote-chain-facade.js';
|
|
9
|
-
import { prepareCosmosOrchestrationAccount } from '../exos/
|
|
9
|
+
import { prepareCosmosOrchestrationAccount } from '../exos/cosmos-orchestration-account.js';
|
|
10
|
+
import { prepareLocalChainFacade } from '../exos/local-chain-facade.js';
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* @import {PromiseKit} from '@endo/promise-kit'
|
|
@@ -48,7 +49,7 @@ export const provideOrchestration = (
|
|
|
48
49
|
const chainHub = makeChainHub(remotePowers.agoricNames);
|
|
49
50
|
|
|
50
51
|
const { makeRecorderKit } = prepareRecorderKitMakers(baggage, marshaller);
|
|
51
|
-
const
|
|
52
|
+
const makeLocalOrchestrationAccountKit = prepareLocalOrchestrationAccountKit(
|
|
52
53
|
zone,
|
|
53
54
|
makeRecorderKit,
|
|
54
55
|
zcf,
|
|
@@ -62,7 +63,7 @@ export const provideOrchestration = (
|
|
|
62
63
|
});
|
|
63
64
|
|
|
64
65
|
const makeCosmosOrchestrationAccount = prepareCosmosOrchestrationAccount(
|
|
65
|
-
//
|
|
66
|
+
// FIXME what zone?
|
|
66
67
|
zone,
|
|
67
68
|
makeRecorderKit,
|
|
68
69
|
zcf,
|
|
@@ -75,13 +76,23 @@ export const provideOrchestration = (
|
|
|
75
76
|
timer: remotePowers.timerService,
|
|
76
77
|
});
|
|
77
78
|
|
|
79
|
+
const makeLocalChainFacade = prepareLocalChainFacade(zone, {
|
|
80
|
+
makeLocalOrchestrationAccountKit,
|
|
81
|
+
localchain: remotePowers.localchain,
|
|
82
|
+
// FIXME what path?
|
|
83
|
+
storageNode: remotePowers.storageNode,
|
|
84
|
+
orchestration: remotePowers.orchestrationService,
|
|
85
|
+
timer: remotePowers.timerService,
|
|
86
|
+
});
|
|
87
|
+
|
|
78
88
|
const facade = makeOrchestrationFacade({
|
|
79
89
|
zcf,
|
|
80
90
|
zone,
|
|
81
91
|
chainHub,
|
|
82
|
-
|
|
92
|
+
makeLocalOrchestrationAccountKit,
|
|
83
93
|
makeRecorderKit,
|
|
84
94
|
makeCosmosOrchestrationAccount,
|
|
95
|
+
makeLocalChainFacade,
|
|
85
96
|
makeRemoteChainFacade,
|
|
86
97
|
asyncFlowTools,
|
|
87
98
|
...remotePowers,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chainAccountKit.d.ts","sourceRoot":"","sources":["chainAccountKit.js"],"names":[],"mappings":"AA8BA;;;;;;;;;;;GAaG;AAeI;;QAqBC,8BAA8B;;;;;;;;QAiC9B;;;;;;;;;WASG;mLAHU,OAAO,CAAC,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D;yCAyBU,6BAA6B,CAAC,QAAQ,CAAC;0BA1a9B,cAAc;iCALU,6CAA6C;kCADsE,aAAa;gCAAb,aAAa;4BAItJ,kBAAkB;kCACZ,cAAc;+BALqH,aAAa;0BAExJ,kDAAkD;4CAFyF,aAAa;iCAAb,aAAa;gCAGlJ,wDAAwD;8BAH6E,aAAa"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icqConnectionKit.d.ts","sourceRoot":"","sources":["icqConnectionKit.js"],"names":[],"mappings":"AAoBA,2DAGE;AAEF;;;;GAIG;AA0BI;;;;QA4BC;;;;WAIG;;;;QAYH;;;;WAIG;;;;;GAgBR;;;;;;;+BAEW,UAAU,CAAC,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;4BACtD,gBAAgB,CAAC,YAAY,CAAC;0BAjHrB,mBAAmB;0BACP,iBAAiB;kCAGN,+CAA+C;8BADlE,sBAAsB;mCACH,+CAA+C;gCAH1D,iBAAiB;4BAC3B,aAAa"}
|
|
File without changes
|
|
File without changes
|