@agoric/orchestration 0.1.1-dev-1d94913.0 → 0.1.1-dev-0282e58.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 +15 -15
- package/src/chain-info.d.ts +261 -1
- package/src/chain-info.d.ts.map +1 -1
- package/src/chain-info.js +3 -1
- package/src/examples/sendAnywhere.contract.d.ts +1 -1
- package/src/examples/stakeIca.contract.d.ts +3 -1
- package/src/examples/stakeIca.contract.d.ts.map +1 -1
- package/src/examples/stakeIca.contract.js +4 -2
- package/src/examples/swapExample.contract.d.ts +1 -1
- package/src/examples/swapExample.contract.d.ts.map +1 -1
- package/src/examples/swapExample.contract.js +7 -7
- package/src/examples/unbondExample.contract.d.ts +2 -3
- package/src/examples/unbondExample.contract.d.ts.map +1 -1
- package/src/examples/unbondExample.contract.js +3 -3
- package/src/exos/chainAccountKit.d.ts +2 -1
- package/src/exos/chainAccountKit.d.ts.map +1 -1
- package/src/exos/chainAccountKit.js +5 -4
- package/src/exos/local-chain-account-kit.d.ts +275 -23
- package/src/exos/local-chain-account-kit.d.ts.map +1 -1
- package/src/facade.d.ts +1 -1
- package/src/facade.d.ts.map +1 -1
- package/src/facade.js +20 -14
- package/src/fetched-chain-info.d.ts +324 -61
- package/src/fetched-chain-info.js +262 -0
- package/src/proposals/orchestration-proposal.d.ts +3 -3
- package/src/proposals/start-stakeAtom.d.ts +1 -1
- package/src/proposals/start-stakeAtom.d.ts.map +1 -1
- package/src/proposals/start-stakeAtom.js +4 -2
- package/src/service.d.ts +2 -1
- package/src/service.d.ts.map +1 -1
- package/src/service.js +8 -3
- package/src/utils/chainHub.d.ts +300 -19
- package/src/utils/chainHub.d.ts.map +1 -1
- package/src/utils/chainHub.js +11 -13
- package/src/vat-orchestration.d.ts +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function prepareLocalChainAccountKit(zone: Zone, makeRecorderKit: <T>(storageNode: StorageNode | Awaited<import("@endo/far").FarRef<StorageNode>>, valueShape?: import("@agoric/zoe/src/contractSupport/recorder.js").TypedMatcher<T> | undefined) => RecorderKit<T>, zcf: ZCF, timerService: Remote<TimerService>, chainHub: {
|
|
2
2
|
registerChain(name: string, chainInfo: CosmosChainInfo): void;
|
|
3
|
-
getChainInfo<K extends string>(chainName: K): Promise<K extends "celestia" | "agoric" | "cosmoshub" | "dydx" | "juno" | "neutron" | "noble" | "omniflixhub" | "osmosis" | "secretnetwork" | "stargaze" | "stride" ? Omit<{
|
|
4
|
-
|
|
3
|
+
getChainInfo<K extends string>(chainName: K): Promise<K extends "celestia" | "agoriclocal" | "agoric" | "cosmoshub" | "dydx" | "juno" | "neutron" | "noble" | "omniflixhub" | "osmosis" | "secretnetwork" | "stargaze" | "stride" ? Omit<{
|
|
4
|
+
agoriclocal: {
|
|
5
5
|
chainId: string;
|
|
6
6
|
connections: {
|
|
7
7
|
'cosmoshub-4': {
|
|
@@ -48,6 +48,140 @@ export function prepareLocalChainAccountKit(zone: Zone, makeRecorderKit: <T>(sto
|
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
|
+
agoric: {
|
|
52
|
+
chainId: string;
|
|
53
|
+
stakingTokens: {
|
|
54
|
+
denom: string;
|
|
55
|
+
}[];
|
|
56
|
+
connections: {
|
|
57
|
+
'cosmoshub-4': {
|
|
58
|
+
id: string;
|
|
59
|
+
client_id: string;
|
|
60
|
+
counterparty: {
|
|
61
|
+
client_id: string;
|
|
62
|
+
connection_id: string;
|
|
63
|
+
prefix: {
|
|
64
|
+
key_prefix: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
state: number;
|
|
68
|
+
transferChannel: {
|
|
69
|
+
channelId: string;
|
|
70
|
+
portId: string;
|
|
71
|
+
counterPartyChannelId: string;
|
|
72
|
+
counterPartyPortId: string;
|
|
73
|
+
ordering: number;
|
|
74
|
+
state: number;
|
|
75
|
+
version: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
'noble-1': {
|
|
79
|
+
id: string;
|
|
80
|
+
client_id: string;
|
|
81
|
+
counterparty: {
|
|
82
|
+
client_id: string;
|
|
83
|
+
connection_id: string;
|
|
84
|
+
prefix: {
|
|
85
|
+
key_prefix: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
state: number;
|
|
89
|
+
transferChannel: {
|
|
90
|
+
channelId: string;
|
|
91
|
+
portId: string;
|
|
92
|
+
counterPartyChannelId: string;
|
|
93
|
+
counterPartyPortId: string;
|
|
94
|
+
ordering: number;
|
|
95
|
+
state: number;
|
|
96
|
+
version: string;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
'omniflixhub-1': {
|
|
100
|
+
id: string;
|
|
101
|
+
client_id: string;
|
|
102
|
+
counterparty: {
|
|
103
|
+
client_id: string;
|
|
104
|
+
connection_id: string;
|
|
105
|
+
prefix: {
|
|
106
|
+
key_prefix: string;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
state: number;
|
|
110
|
+
transferChannel: {
|
|
111
|
+
channelId: string;
|
|
112
|
+
portId: string;
|
|
113
|
+
counterPartyChannelId: string;
|
|
114
|
+
counterPartyPortId: string;
|
|
115
|
+
ordering: number;
|
|
116
|
+
state: number;
|
|
117
|
+
version: string;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
'osmosis-1': {
|
|
121
|
+
id: string;
|
|
122
|
+
client_id: string;
|
|
123
|
+
counterparty: {
|
|
124
|
+
client_id: string;
|
|
125
|
+
connection_id: string;
|
|
126
|
+
prefix: {
|
|
127
|
+
key_prefix: string;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
state: number;
|
|
131
|
+
transferChannel: {
|
|
132
|
+
channelId: string;
|
|
133
|
+
portId: string;
|
|
134
|
+
counterPartyChannelId: string;
|
|
135
|
+
counterPartyPortId: string;
|
|
136
|
+
ordering: number;
|
|
137
|
+
state: number;
|
|
138
|
+
version: string;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
'secret-4': {
|
|
142
|
+
id: string;
|
|
143
|
+
client_id: string;
|
|
144
|
+
counterparty: {
|
|
145
|
+
client_id: string;
|
|
146
|
+
connection_id: string;
|
|
147
|
+
prefix: {
|
|
148
|
+
key_prefix: string;
|
|
149
|
+
}; /** Make an object wrapping an LCA with Zoe interfaces. */
|
|
150
|
+
};
|
|
151
|
+
state: number;
|
|
152
|
+
transferChannel: {
|
|
153
|
+
channelId: string;
|
|
154
|
+
portId: string;
|
|
155
|
+
counterPartyChannelId: string;
|
|
156
|
+
counterPartyPortId: string;
|
|
157
|
+
ordering: number;
|
|
158
|
+
state: number;
|
|
159
|
+
version: string;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
'stride-1': {
|
|
163
|
+
id: string;
|
|
164
|
+
client_id: string;
|
|
165
|
+
counterparty: {
|
|
166
|
+
client_id: string;
|
|
167
|
+
connection_id: string;
|
|
168
|
+
prefix: {
|
|
169
|
+
key_prefix: string;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
state: number;
|
|
173
|
+
transferChannel: {
|
|
174
|
+
channelId: string;
|
|
175
|
+
portId: string;
|
|
176
|
+
counterPartyChannelId: string;
|
|
177
|
+
counterPartyPortId: string;
|
|
178
|
+
ordering: number;
|
|
179
|
+
state: number;
|
|
180
|
+
version: string;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
};
|
|
51
185
|
celestia: {
|
|
52
186
|
chainId: string;
|
|
53
187
|
stakingTokens: {
|
|
@@ -109,6 +243,10 @@ export function prepareLocalChainAccountKit(zone: Zone, makeRecorderKit: <T>(sto
|
|
|
109
243
|
state: number;
|
|
110
244
|
transferChannel: {
|
|
111
245
|
channelId: string;
|
|
246
|
+
/**
|
|
247
|
+
* @param {string} validatorAddress
|
|
248
|
+
* @param {Amount<'nat'>} ertpAmount
|
|
249
|
+
*/
|
|
112
250
|
portId: string;
|
|
113
251
|
counterPartyChannelId: string;
|
|
114
252
|
counterPartyPortId: string;
|
|
@@ -146,7 +284,7 @@ export function prepareLocalChainAccountKit(zone: Zone, makeRecorderKit: <T>(sto
|
|
|
146
284
|
connection_id: string;
|
|
147
285
|
prefix: {
|
|
148
286
|
key_prefix: string;
|
|
149
|
-
};
|
|
287
|
+
};
|
|
150
288
|
};
|
|
151
289
|
state: number;
|
|
152
290
|
transferChannel: {
|
|
@@ -167,7 +305,7 @@ export function prepareLocalChainAccountKit(zone: Zone, makeRecorderKit: <T>(sto
|
|
|
167
305
|
denom: string;
|
|
168
306
|
}[];
|
|
169
307
|
connections: {
|
|
170
|
-
'
|
|
308
|
+
'agoric-3': {
|
|
171
309
|
id: string;
|
|
172
310
|
client_id: string;
|
|
173
311
|
counterparty: {
|
|
@@ -188,9 +326,30 @@ export function prepareLocalChainAccountKit(zone: Zone, makeRecorderKit: <T>(sto
|
|
|
188
326
|
version: string;
|
|
189
327
|
};
|
|
190
328
|
};
|
|
191
|
-
'
|
|
329
|
+
'juno-1': {
|
|
192
330
|
id: string;
|
|
193
331
|
client_id: string;
|
|
332
|
+
counterparty: {
|
|
333
|
+
client_id: string;
|
|
334
|
+
connection_id: string;
|
|
335
|
+
prefix: {
|
|
336
|
+
key_prefix: string;
|
|
337
|
+
}; /** @type {LocalChainAccount['withdraw']} */
|
|
338
|
+
};
|
|
339
|
+
state: number;
|
|
340
|
+
transferChannel: {
|
|
341
|
+
channelId: string;
|
|
342
|
+
portId: string;
|
|
343
|
+
counterPartyChannelId: string;
|
|
344
|
+
counterPartyPortId: string;
|
|
345
|
+
ordering: number;
|
|
346
|
+
state: number;
|
|
347
|
+
version: string;
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
'neutron-1': {
|
|
351
|
+
id: string; /** @returns {ChainAddress['address']} */
|
|
352
|
+
client_id: string;
|
|
194
353
|
counterparty: {
|
|
195
354
|
client_id: string;
|
|
196
355
|
connection_id: string;
|
|
@@ -242,10 +401,7 @@ export function prepareLocalChainAccountKit(zone: Zone, makeRecorderKit: <T>(sto
|
|
|
242
401
|
};
|
|
243
402
|
state: number;
|
|
244
403
|
transferChannel: {
|
|
245
|
-
channelId: string;
|
|
246
|
-
* @param {string} validatorAddress
|
|
247
|
-
* @param {Amount<'nat'>} ertpAmount
|
|
248
|
-
*/
|
|
404
|
+
channelId: string;
|
|
249
405
|
portId: string;
|
|
250
406
|
counterPartyChannelId: string;
|
|
251
407
|
counterPartyPortId: string;
|
|
@@ -276,11 +432,7 @@ export function prepareLocalChainAccountKit(zone: Zone, makeRecorderKit: <T>(sto
|
|
|
276
432
|
};
|
|
277
433
|
};
|
|
278
434
|
'secret-4': {
|
|
279
|
-
id: string;
|
|
280
|
-
* @param {string} validatorAddress
|
|
281
|
-
* @param {Amount<'nat'>} ertpAmount
|
|
282
|
-
* @returns {Promise<void>}
|
|
283
|
-
*/
|
|
435
|
+
id: string;
|
|
284
436
|
client_id: string;
|
|
285
437
|
counterparty: {
|
|
286
438
|
client_id: string;
|
|
@@ -320,12 +472,7 @@ export function prepareLocalChainAccountKit(zone: Zone, makeRecorderKit: <T>(sto
|
|
|
320
472
|
state: number;
|
|
321
473
|
version: string;
|
|
322
474
|
};
|
|
323
|
-
};
|
|
324
|
-
* Starting a transfer revokes the account holder. The associated
|
|
325
|
-
* updater will get a special notification that the account is being
|
|
326
|
-
* transferred.
|
|
327
|
-
*/
|
|
328
|
-
/** @type {LocalChainAccount['deposit']} */
|
|
475
|
+
};
|
|
329
476
|
'stride-1': {
|
|
330
477
|
id: string;
|
|
331
478
|
client_id: string;
|
|
@@ -344,7 +491,7 @@ export function prepareLocalChainAccountKit(zone: Zone, makeRecorderKit: <T>(sto
|
|
|
344
491
|
counterPartyPortId: string;
|
|
345
492
|
ordering: number;
|
|
346
493
|
state: number;
|
|
347
|
-
version: string;
|
|
494
|
+
version: string;
|
|
348
495
|
};
|
|
349
496
|
};
|
|
350
497
|
};
|
|
@@ -799,6 +946,27 @@ export function prepareLocalChainAccountKit(zone: Zone, makeRecorderKit: <T>(sto
|
|
|
799
946
|
denom: string;
|
|
800
947
|
}[];
|
|
801
948
|
connections: {
|
|
949
|
+
'agoric-3': {
|
|
950
|
+
id: string;
|
|
951
|
+
client_id: string;
|
|
952
|
+
counterparty: {
|
|
953
|
+
client_id: string;
|
|
954
|
+
connection_id: string;
|
|
955
|
+
prefix: {
|
|
956
|
+
key_prefix: string;
|
|
957
|
+
};
|
|
958
|
+
};
|
|
959
|
+
state: number;
|
|
960
|
+
transferChannel: {
|
|
961
|
+
channelId: string;
|
|
962
|
+
portId: string;
|
|
963
|
+
counterPartyChannelId: string;
|
|
964
|
+
counterPartyPortId: string;
|
|
965
|
+
ordering: number;
|
|
966
|
+
state: number;
|
|
967
|
+
version: string;
|
|
968
|
+
};
|
|
969
|
+
};
|
|
802
970
|
'cosmoshub-4': {
|
|
803
971
|
id: string;
|
|
804
972
|
client_id: string;
|
|
@@ -975,6 +1143,27 @@ export function prepareLocalChainAccountKit(zone: Zone, makeRecorderKit: <T>(sto
|
|
|
975
1143
|
denom: string;
|
|
976
1144
|
}[];
|
|
977
1145
|
connections: {
|
|
1146
|
+
'agoric-3': {
|
|
1147
|
+
id: string;
|
|
1148
|
+
client_id: string;
|
|
1149
|
+
counterparty: {
|
|
1150
|
+
client_id: string;
|
|
1151
|
+
connection_id: string;
|
|
1152
|
+
prefix: {
|
|
1153
|
+
key_prefix: string;
|
|
1154
|
+
};
|
|
1155
|
+
};
|
|
1156
|
+
state: number;
|
|
1157
|
+
transferChannel: {
|
|
1158
|
+
channelId: string;
|
|
1159
|
+
portId: string;
|
|
1160
|
+
counterPartyChannelId: string;
|
|
1161
|
+
counterPartyPortId: string;
|
|
1162
|
+
ordering: number;
|
|
1163
|
+
state: number;
|
|
1164
|
+
version: string;
|
|
1165
|
+
};
|
|
1166
|
+
};
|
|
978
1167
|
'cosmoshub-4': {
|
|
979
1168
|
id: string;
|
|
980
1169
|
client_id: string;
|
|
@@ -1047,6 +1236,27 @@ export function prepareLocalChainAccountKit(zone: Zone, makeRecorderKit: <T>(sto
|
|
|
1047
1236
|
}[];
|
|
1048
1237
|
icqEnabled: boolean;
|
|
1049
1238
|
connections: {
|
|
1239
|
+
'agoric-3': {
|
|
1240
|
+
id: string;
|
|
1241
|
+
client_id: string;
|
|
1242
|
+
counterparty: {
|
|
1243
|
+
client_id: string;
|
|
1244
|
+
connection_id: string;
|
|
1245
|
+
prefix: {
|
|
1246
|
+
key_prefix: string;
|
|
1247
|
+
};
|
|
1248
|
+
};
|
|
1249
|
+
state: number;
|
|
1250
|
+
transferChannel: {
|
|
1251
|
+
channelId: string;
|
|
1252
|
+
portId: string;
|
|
1253
|
+
counterPartyChannelId: string;
|
|
1254
|
+
counterPartyPortId: string;
|
|
1255
|
+
ordering: number;
|
|
1256
|
+
state: number;
|
|
1257
|
+
version: string;
|
|
1258
|
+
};
|
|
1259
|
+
};
|
|
1050
1260
|
celestia: {
|
|
1051
1261
|
id: string;
|
|
1052
1262
|
client_id: string;
|
|
@@ -1265,6 +1475,27 @@ export function prepareLocalChainAccountKit(zone: Zone, makeRecorderKit: <T>(sto
|
|
|
1265
1475
|
denom: string;
|
|
1266
1476
|
}[];
|
|
1267
1477
|
connections: {
|
|
1478
|
+
'agoric-3': {
|
|
1479
|
+
id: string;
|
|
1480
|
+
client_id: string;
|
|
1481
|
+
counterparty: {
|
|
1482
|
+
client_id: string;
|
|
1483
|
+
connection_id: string;
|
|
1484
|
+
prefix: {
|
|
1485
|
+
key_prefix: string;
|
|
1486
|
+
};
|
|
1487
|
+
};
|
|
1488
|
+
state: number;
|
|
1489
|
+
transferChannel: {
|
|
1490
|
+
channelId: string;
|
|
1491
|
+
portId: string;
|
|
1492
|
+
counterPartyChannelId: string;
|
|
1493
|
+
counterPartyPortId: string;
|
|
1494
|
+
ordering: number;
|
|
1495
|
+
state: number;
|
|
1496
|
+
version: string;
|
|
1497
|
+
};
|
|
1498
|
+
};
|
|
1268
1499
|
celestia: {
|
|
1269
1500
|
id: string;
|
|
1270
1501
|
client_id: string;
|
|
@@ -1617,6 +1848,27 @@ export function prepareLocalChainAccountKit(zone: Zone, makeRecorderKit: <T>(sto
|
|
|
1617
1848
|
denom: string;
|
|
1618
1849
|
}[];
|
|
1619
1850
|
connections: {
|
|
1851
|
+
'agoric-3': {
|
|
1852
|
+
id: string;
|
|
1853
|
+
client_id: string;
|
|
1854
|
+
counterparty: {
|
|
1855
|
+
client_id: string;
|
|
1856
|
+
connection_id: string;
|
|
1857
|
+
prefix: {
|
|
1858
|
+
key_prefix: string;
|
|
1859
|
+
};
|
|
1860
|
+
};
|
|
1861
|
+
state: number;
|
|
1862
|
+
transferChannel: {
|
|
1863
|
+
channelId: string;
|
|
1864
|
+
portId: string;
|
|
1865
|
+
counterPartyChannelId: string;
|
|
1866
|
+
counterPartyPortId: string;
|
|
1867
|
+
ordering: number;
|
|
1868
|
+
state: number;
|
|
1869
|
+
version: string;
|
|
1870
|
+
};
|
|
1871
|
+
};
|
|
1620
1872
|
celestia: {
|
|
1621
1873
|
id: string;
|
|
1622
1874
|
client_id: string;
|
|
@@ -1788,8 +2040,8 @@ export function prepareLocalChainAccountKit(zone: Zone, makeRecorderKit: <T>(sto
|
|
|
1788
2040
|
};
|
|
1789
2041
|
};
|
|
1790
2042
|
}[K], "connections"> : import("@agoric/orchestration").ChainInfo>;
|
|
1791
|
-
registerConnection(
|
|
1792
|
-
getConnectionInfo(
|
|
2043
|
+
registerConnection(chainId1: string, chainId2: string, connectionInfo: import("@agoric/orchestration").IBCConnectionInfo): void;
|
|
2044
|
+
getConnectionInfo(chainId1: string, chainId2: string): Promise<import("@agoric/orchestration").IBCConnectionInfo>;
|
|
1793
2045
|
}): (args_0: {
|
|
1794
2046
|
account: import("@endo/exo").Guarded<{
|
|
1795
2047
|
getAddress(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-chain-account-kit.d.ts","sourceRoot":"","sources":["local-chain-account-kit.js"],"names":[],"mappings":"AAoEO,0FAmEwB,W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UT,QAAS,KAAI,CAAC,mBAA2B,OAAO;yBAqBjD,OAAO,KAAK,CAAC;;;uBAgBlB,EAAE;;;;;mCA0LF,UAAU,CAAC,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAAC;0BAlQjD,cAAc;iCADU,6CAA6C;kCAGjD,cAAc;4BADhC,kBAAkB;qCAHoD,uBAAuB;+BAAvB,uBAAuB;kCAAvB,uBAAuB;2CAAvB,uBAAuB"}
|
package/src/facade.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export function makeOrchestrationFacade({ zone, timerService, zcf, storageNode,
|
|
|
4
4
|
zcf: ZCF;
|
|
5
5
|
storageNode: Remote<globalThis.StorageNode>;
|
|
6
6
|
orchestrationService: Remote<import("@endo/exo").Guarded<{
|
|
7
|
-
makeAccount(hostConnectionId: `connection-${number}`, controllerConnectionId: `connection-${number}`): Promise<import("./cosmos-api.js").IcaAccount>;
|
|
7
|
+
makeAccount(chainId: string, hostConnectionId: `connection-${number}`, controllerConnectionId: `connection-${number}`): Promise<import("./cosmos-api.js").IcaAccount>;
|
|
8
8
|
provideICQConnection(controllerConnectionId: `connection-${number}`): Promise<import("@endo/exo").Guarded<{
|
|
9
9
|
getLocalAddress(): `/ibc-port/${string}`;
|
|
10
10
|
getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
|
package/src/facade.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facade.d.ts","sourceRoot":"","sources":["facade.js"],"names":[],"mappings":"AAgKO;;;SAVG,GAAG;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"facade.d.ts","sourceRoot":"","sources":["facade.js"],"names":[],"mappings":"AAgKO;;;SAVG,GAAG;;;;;;;;;;;;;8BA9FD,MAAI,KAAK,CAAC;6BAYiC,QAC7C,KAAF,CAAC,mBAA2B,OAAO;6BAejC,OAAC,KAAK,CAAC;;;2BAwBc,EAAE;;;uBAoFG,OAAO,sBAAsB,EAAE,SAEjE;;;4BAsBW,OAAO,sBAAsB,EAAE,SACrC,EAAE;;;;;;;cA/DM,OAAO,qBAAqB,EAAE,QAAQ;8BACtB,UAAU,CACxC,cAAoB,mCAAmC,EAAE,2BAA2B,CAC/E;;IAsBF;;;;;;;;OAQG;gBAFkC,OAAO,EACrB,IAAI,6BAJhB,MAAM,OAGoB,OAAO,AAD1B,gCACmB,OAAO,WACrB,IAAI,AADgC,KAAK,MAAM,GACzD,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,OAAO,CAAC;EAsCnD;kCAEa,UAAU,CAAC,OAAO,uBAAuB,CAAC;0BA5NjC,cAAc;kCACN,cAAc;4BAGpB,kBAAkB;kCAEgE,YAAY"}
|
package/src/facade.js
CHANGED
|
@@ -6,10 +6,11 @@ import { prepareCosmosOrchestrationAccount } from './exos/cosmosOrchestrationAcc
|
|
|
6
6
|
/**
|
|
7
7
|
* @import {Zone} from '@agoric/zone';
|
|
8
8
|
* @import {TimerService} from '@agoric/time';
|
|
9
|
+
* @import {IBCConnectionID} from '@agoric/vats';
|
|
9
10
|
* @import {LocalChain} from '@agoric/vats/src/localchain.js';
|
|
10
11
|
* @import {Remote} from '@agoric/internal';
|
|
11
12
|
* @import {OrchestrationService} from './service.js';
|
|
12
|
-
* @import {Chain, ChainInfo, CosmosChainInfo, OrchestrationAccount, Orchestrator} from './types.js';
|
|
13
|
+
* @import {Chain, ChainInfo, CosmosChainInfo, IBCConnectionInfo, OrchestrationAccount, Orchestrator} from './types.js';
|
|
13
14
|
*/
|
|
14
15
|
|
|
15
16
|
/** @type {any} */
|
|
@@ -91,6 +92,7 @@ const makeLocalChainFacade = (
|
|
|
91
92
|
/**
|
|
92
93
|
* @template {CosmosChainInfo} CCI
|
|
93
94
|
* @param {CCI} chainInfo
|
|
95
|
+
* @param {IBCConnectionInfo} connectionInfo
|
|
94
96
|
* @param {object} io
|
|
95
97
|
* @param {Remote<OrchestrationService>} io.orchestration
|
|
96
98
|
* @param {Remote<TimerService>} io.timer
|
|
@@ -100,13 +102,12 @@ const makeLocalChainFacade = (
|
|
|
100
102
|
*/
|
|
101
103
|
const makeRemoteChainFacade = (
|
|
102
104
|
chainInfo,
|
|
105
|
+
connectionInfo,
|
|
103
106
|
{ orchestration, timer, zcf, zone },
|
|
104
107
|
) => {
|
|
105
|
-
const name = chainInfo.chainId;
|
|
106
|
-
|
|
107
108
|
const makeRecorderKit = () => anyVal;
|
|
108
109
|
const makeCosmosOrchestrationAccount = prepareCosmosOrchestrationAccount(
|
|
109
|
-
zone.subZone(
|
|
110
|
+
zone.subZone(chainInfo.chainId),
|
|
110
111
|
makeRecorderKit,
|
|
111
112
|
zcf,
|
|
112
113
|
);
|
|
@@ -115,14 +116,13 @@ const makeRemoteChainFacade = (
|
|
|
115
116
|
getChainInfo: async () => chainInfo,
|
|
116
117
|
/** @returns {Promise<OrchestrationAccount<CCI>>} */
|
|
117
118
|
makeAccount: async () => {
|
|
118
|
-
// FIXME look up real values
|
|
119
|
-
// UNTIL https://github.com/Agoric/agoric-sdk/issues/9063
|
|
120
|
-
const hostConnectionId = 'connection-1';
|
|
121
|
-
const controllerConnectionId = 'connection-2';
|
|
122
|
-
|
|
123
119
|
const icaAccount = await E(orchestration).makeAccount(
|
|
124
|
-
|
|
125
|
-
|
|
120
|
+
chainInfo.chainId,
|
|
121
|
+
// XXX IBCConnectionInfo concessions for JSON encoding
|
|
122
|
+
/** @type {IBCConnectionID} */ (connectionInfo.id),
|
|
123
|
+
/** @type {IBCConnectionID} */ (
|
|
124
|
+
connectionInfo.counterparty.connection_id
|
|
125
|
+
),
|
|
126
126
|
);
|
|
127
127
|
|
|
128
128
|
const address = await E(icaAccount).getAddress();
|
|
@@ -190,17 +190,23 @@ export const makeOrchestrationFacade = ({
|
|
|
190
190
|
/** @type {Orchestrator} */
|
|
191
191
|
const orc = {
|
|
192
192
|
async getChain(name) {
|
|
193
|
-
const
|
|
193
|
+
const agoricChainInfo = await chainHub.getChainInfo('agoric');
|
|
194
194
|
|
|
195
195
|
if (name === 'agoric') {
|
|
196
196
|
return makeLocalChainFacade(
|
|
197
197
|
localchain,
|
|
198
198
|
makeLocalChainAccountKit,
|
|
199
|
-
|
|
199
|
+
agoricChainInfo,
|
|
200
200
|
);
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
|
|
203
|
+
const remoteChainInfo = await chainHub.getChainInfo(name);
|
|
204
|
+
const connectionInfo = await chainHub.getConnectionInfo(
|
|
205
|
+
agoricChainInfo.chainId,
|
|
206
|
+
remoteChainInfo.chainId,
|
|
207
|
+
);
|
|
208
|
+
|
|
209
|
+
return makeRemoteChainFacade(remoteChainInfo, connectionInfo, {
|
|
204
210
|
orchestration: orchestrationService,
|
|
205
211
|
timer: timerService,
|
|
206
212
|
zcf,
|