@agoric/orchestration 0.1.1-dev-bd50e5e.0 → 0.1.1-dev-31a57fc.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.d.ts +205 -205
- package/src/chain-info.d.ts.map +1 -1
- package/src/chain-info.js +36 -3
- package/src/exos/remote-chain-facade.d.ts.map +1 -1
- package/src/exos/remote-chain-facade.js +15 -13
- package/src/fetched-chain-info.d.ts +204 -204
- package/src/fetched-chain-info.js +204 -204
- package/src/proposals/start-stakeAtom.js +2 -2
- package/src/proposals/start-stakeOsmo.js +2 -2
- package/src/utils/address.js +1 -1
- package/src/utils/registry.js +2 -2
package/src/chain-info.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain-info.d.ts","sourceRoot":"","sources":["chain-info.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chain-info.d.ts","sourceRoot":"","sources":["chain-info.js"],"names":[],"mappings":"AAsGO,gDALI,IAAI,CAAC,OAAO,cAAc,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC,QACpD,MAAM,aACN,eAAe,uBACD,MAAM,EAAE,KAAK,IAAI,8BAoCzC;AAMM,yDAHI,IAAI,CAAC,OAAO,cAAc,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC,uBACtC,MAAM,EAAE,KAAK,IAAI,8BAMzC;wBA1Ia,eAAe,GAAG,YAAY;0BAyD9B,OAAO,WAAW;qCA3DoC,YAAY;kCAAZ,YAAY;AAAhF,oFAAoF;AAEpF,0DAA0D;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqDE"}
|
package/src/chain-info.js
CHANGED
|
@@ -4,7 +4,7 @@ import { connectionKey } from './exos/chain-hub.js';
|
|
|
4
4
|
import fetchedChainInfo from './fetched-chain-info.js'; // Refresh with scripts/refresh-chain-info.ts
|
|
5
5
|
import { CosmosChainInfoShape } from './typeGuards.js';
|
|
6
6
|
|
|
7
|
-
/** @import {CosmosChainInfo, EthChainInfo} from './types.js'; */
|
|
7
|
+
/** @import {CosmosChainInfo, EthChainInfo, IBCConnectionInfo} from './types.js'; */
|
|
8
8
|
|
|
9
9
|
/** @typedef {CosmosChainInfo | EthChainInfo} ChainInfo */
|
|
10
10
|
|
|
@@ -65,6 +65,35 @@ const knownChains = /** @satisfies {Record<string, ChainInfo>} */ (
|
|
|
65
65
|
|
|
66
66
|
/** @typedef {typeof knownChains} KnownChains */
|
|
67
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Utility to reverse connection info perspective.
|
|
70
|
+
*
|
|
71
|
+
* @param {IBCConnectionInfo} connInfo
|
|
72
|
+
* @returns {IBCConnectionInfo}
|
|
73
|
+
*/
|
|
74
|
+
const reverseConnInfo = connInfo => {
|
|
75
|
+
const { transferChannel } = connInfo;
|
|
76
|
+
return {
|
|
77
|
+
id: connInfo.counterparty.connection_id,
|
|
78
|
+
client_id: connInfo.counterparty.client_id,
|
|
79
|
+
counterparty: {
|
|
80
|
+
client_id: connInfo.client_id,
|
|
81
|
+
connection_id: connInfo.id,
|
|
82
|
+
prefix: {
|
|
83
|
+
key_prefix: '',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
state: connInfo.state,
|
|
87
|
+
transferChannel: {
|
|
88
|
+
...transferChannel,
|
|
89
|
+
channelId: transferChannel.counterPartyChannelId,
|
|
90
|
+
counterPartyChannelId: transferChannel.channelId,
|
|
91
|
+
portId: transferChannel.counterPartyPortId,
|
|
92
|
+
counterPartyPortId: transferChannel.portId,
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
|
|
68
97
|
/**
|
|
69
98
|
* @param {ERef<import('@agoric/vats').NameHubKit['nameAdmin']>} agoricNamesAdmin
|
|
70
99
|
* @param {string} name
|
|
@@ -90,12 +119,16 @@ export const registerChain = async (
|
|
|
90
119
|
.then(() => log(`registered agoricNames chain.${name}`)),
|
|
91
120
|
];
|
|
92
121
|
|
|
122
|
+
const { chainId } = chainInfo;
|
|
93
123
|
// FIXME updates redundantly, twice per edge
|
|
94
124
|
for (const [counterChainId, connInfo] of Object.entries(connections)) {
|
|
95
|
-
const key = connectionKey(
|
|
125
|
+
const key = connectionKey(chainId, counterChainId);
|
|
126
|
+
const normalizedConnInfo =
|
|
127
|
+
chainId < counterChainId ? connInfo : reverseConnInfo(connInfo);
|
|
128
|
+
|
|
96
129
|
promises.push(
|
|
97
130
|
E(connAdmin)
|
|
98
|
-
.update(key,
|
|
131
|
+
.update(key, normalizedConnInfo)
|
|
99
132
|
.then(() => log(`registering agoricNames chainConnection.${key}`)),
|
|
100
133
|
);
|
|
101
134
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-chain-facade.d.ts","sourceRoot":"","sources":["remote-chain-facade.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"remote-chain-facade.d.ts","sourceRoot":"","sources":["remote-chain-facade.js"],"names":[],"mappings":"AA2KO,+CAHI,IAAI,UACJ,uBAAuB;;;;;;;;;;;;;;;;QAnF1B,4CAA4C;;QAK5C,2CAA2C;;;;QAqB3C;;;;WAIG;6BADQ,UAAU;;;;;;;;;;;;;;;;;QAWrB;;;WAGG;kCAFQ,YAAY,WACZ,UAAU;;;;;;;;;;;;;;;;;QAWrB;;;;;;WAMG;+BALQ,OAAO,WAAW,CAAC,6BACnB;YACV,OAAW,EAAE,UAAU,CAAC;YACxB,YAAgB,EAAE,YAAY,CAAC;SAC5B;;;;;;;;;;;;;;;;cA8BX;sCApJY;IACZ,8BAAkC,EAAE,UAAU,CAC9C,wCAA8C,CACzC,CAAC;IACN,aAAiB,EAAE,OAAO,uBAAuB,CAAC,CAAC;IACnD,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,KAAS,EAAE,OAAO,YAAY,CAAC,CAAC;IAChC,QAAY,EAAE,QAAQ,CAAC;CACpB;oCA+IU,UAAU,CAAC,OAAO,wBAAwB,CAAC;0BAvKlC,mBAAmB;uCAMoF,aAAa;mCAPnG,oBAAoB;yBAI5B,aAAa;0CAGiF,aAAa;gCAAb,aAAa;kCAAb,aAAa;4BAJlH,kBAAkB;uDAGS,mCAAmC;6CAD7C,gCAAgC;kCAH3C,cAAc;8BAEb,aAAa"}
|
|
@@ -91,20 +91,22 @@ const prepareRemoteChainFacadeKit = (
|
|
|
91
91
|
|
|
92
92
|
/** @type {HostOf<Chain['makeAccount']>} */
|
|
93
93
|
makeAccount() {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
return asVow(() => {
|
|
95
|
+
const { remoteChainInfo, connectionInfo } = this.state;
|
|
96
|
+
const stakingDenom = remoteChainInfo.stakingTokens?.[0]?.denom;
|
|
97
|
+
if (!stakingDenom) {
|
|
98
|
+
throw Fail`chain info lacks staking denom`;
|
|
99
|
+
}
|
|
99
100
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
101
|
+
return watch(
|
|
102
|
+
E(orchestration).makeAccount(
|
|
103
|
+
remoteChainInfo.chainId,
|
|
104
|
+
connectionInfo.counterparty.connection_id,
|
|
105
|
+
connectionInfo.id,
|
|
106
|
+
),
|
|
107
|
+
this.facets.makeAccountWatcher,
|
|
108
|
+
);
|
|
109
|
+
});
|
|
108
110
|
},
|
|
109
111
|
},
|
|
110
112
|
makeAccountWatcher: {
|