@agoric/orchestration 0.1.1-dev-66bf702.0 → 0.1.1-dev-76f3e6f.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 +207 -207
- package/src/chain-info.d.ts.map +1 -1
- package/src/chain-info.js +23 -7
- package/src/exos/chain-hub.d.ts +14 -12
- package/src/exos/chain-hub.d.ts.map +1 -1
- package/src/exos/chain-hub.js +108 -28
- package/src/exos/remote-chain-facade.js +1 -1
- package/src/fetched-chain-info.d.ts +204 -204
- package/src/fetched-chain-info.js +204 -204
- package/src/proposals/orchestration-proposal.js +2 -2
- package/src/proposals/start-stakeAtom.js +2 -2
- package/src/proposals/start-stakeOsmo.js +2 -2
- package/src/typeGuards.d.ts +6 -6
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +7 -7
- package/src/utils/address.js +1 -1
- package/src/utils/registry.js +2 -2
- package/src/utils/start-helper.d.ts +4 -4
|
@@ -2,7 +2,7 @@ import { Fail } from '@endo/errors';
|
|
|
2
2
|
import { E, Far } from '@endo/far';
|
|
3
3
|
import { makeMarshal } from '@endo/marshal';
|
|
4
4
|
import { makeTracer } from '@agoric/internal';
|
|
5
|
-
import {
|
|
5
|
+
import { registerKnownChains } from '../chain-info.js';
|
|
6
6
|
import { CHAIN_KEY, CONNECTIONS_KEY } from '../exos/chain-hub.js';
|
|
7
7
|
|
|
8
8
|
const trace = makeTracer('CoreEvalOrchestration', true);
|
|
@@ -127,7 +127,7 @@ export const initChainInfo = async ({
|
|
|
127
127
|
await publishChainInfoToChainStorage(agoricNamesAdmin, chainStorageP);
|
|
128
128
|
|
|
129
129
|
// Now register the names
|
|
130
|
-
await
|
|
130
|
+
await registerKnownChains(agoricNamesAdmin, trace);
|
|
131
131
|
};
|
|
132
132
|
harden(initChainInfo);
|
|
133
133
|
|
|
@@ -59,8 +59,8 @@ export const startStakeAtom = async ({
|
|
|
59
59
|
installation: stakeIca,
|
|
60
60
|
terms: {
|
|
61
61
|
chainId: cosmoshub.chainId,
|
|
62
|
-
hostConnectionId: connectionInfo.
|
|
63
|
-
controllerConnectionId: connectionInfo.
|
|
62
|
+
hostConnectionId: connectionInfo.counterparty.connection_id,
|
|
63
|
+
controllerConnectionId: connectionInfo.id,
|
|
64
64
|
bondDenom: cosmoshub.stakingTokens[0].denom,
|
|
65
65
|
icqEnabled: cosmoshub.icqEnabled,
|
|
66
66
|
},
|
|
@@ -64,8 +64,8 @@ export const startStakeOsmo = async ({
|
|
|
64
64
|
installation: stakeIca,
|
|
65
65
|
terms: {
|
|
66
66
|
chainId: osmosis.chainId,
|
|
67
|
-
hostConnectionId: connectionInfo.
|
|
68
|
-
controllerConnectionId: connectionInfo.
|
|
67
|
+
hostConnectionId: connectionInfo.counterparty.connection_id,
|
|
68
|
+
controllerConnectionId: connectionInfo.id,
|
|
69
69
|
bondDenom: osmosis.stakingTokens[0].denom,
|
|
70
70
|
icqEnabled: osmosis.icqEnabled,
|
|
71
71
|
},
|
package/src/typeGuards.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @import {TypedPattern} from '@agoric/internal';
|
|
3
|
-
* @import {CosmosChainInfo} from './
|
|
3
|
+
* @import {ChainInfo, CosmosChainInfo} from './types.js';
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Used for IBC Channel Connections that only send outgoing transactions. If
|
|
@@ -42,11 +42,10 @@ export const IBCChannelIDShape: import("@endo/patterns").Matcher;
|
|
|
42
42
|
export const IBCChannelInfoShape: import("@endo/patterns").Matcher;
|
|
43
43
|
export const IBCConnectionIDShape: import("@endo/patterns").Matcher;
|
|
44
44
|
export const IBCConnectionInfoShape: import("@endo/patterns").Matcher;
|
|
45
|
-
/**
|
|
46
|
-
* @type {TypedPattern<CosmosChainInfo>}
|
|
47
|
-
*/
|
|
45
|
+
/** @type {TypedPattern<CosmosChainInfo>} */
|
|
48
46
|
export const CosmosChainInfoShape: TypedPattern<CosmosChainInfo>;
|
|
49
|
-
|
|
47
|
+
/** @type {TypedPattern<ChainInfo>} */
|
|
48
|
+
export const ChainInfoShape: TypedPattern<ChainInfo>;
|
|
50
49
|
export const LocalChainAccountShape: import("@endo/patterns").Matcher;
|
|
51
50
|
export const DenomShape: import("@endo/patterns").Matcher;
|
|
52
51
|
export const BrandInfoShape: import("@endo/patterns").Matcher;
|
|
@@ -64,6 +63,7 @@ export namespace TimestampProtoShape {
|
|
|
64
63
|
let seconds: import("@endo/patterns").Matcher;
|
|
65
64
|
let nanos: import("@endo/patterns").Matcher;
|
|
66
65
|
}
|
|
67
|
-
import type { CosmosChainInfo } from './
|
|
66
|
+
import type { CosmosChainInfo } from './types.js';
|
|
68
67
|
import type { TypedPattern } from '@agoric/internal';
|
|
68
|
+
import type { ChainInfo } from './types.js';
|
|
69
69
|
//# 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":"AAIA;;;GAGG;AAEH;;;;GAIG;AACH;;;GAQE;;;;;;;;;;;;;;;;;;;;;;AAiBF,8DAAkE;;;;;AAOlE,uEAUE;AAEF,iEAA4C;AAC5C,mEAQG;AACH,oEAA+C;AAC/C,sEAYG;AAEH
|
|
1
|
+
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAIA;;;GAGG;AAEH;;;;GAIG;AACH;;;GAQE;;;;;;;;;;;;;;;;;;;;;;AAiBF,8DAAkE;;;;;AAOlE,uEAUE;AAEF,iEAA4C;AAC5C,mEAQG;AACH,oEAA+C;AAC/C,sEAYG;AAEH,4CAA4C;AAC5C,mCADW,aAAa,eAAe,CAAC,CAWtC;AAEF,sCAAsC;AACtC,6BADW,aAAa,SAAS,CAAC,CAG/B;AACH,sEAAuE;AACvE,0DAAqC;AAErC,8DAAsC;;;;;;AAItC,mBAAmB;AACnB;;;GAGG;;;;;qCAzG0C,YAAY;kCAD1B,kBAAkB;+BACJ,YAAY"}
|
package/src/typeGuards.js
CHANGED
|
@@ -4,7 +4,7 @@ import { M } from '@endo/patterns';
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @import {TypedPattern} from '@agoric/internal';
|
|
7
|
-
* @import {CosmosChainInfo} from './
|
|
7
|
+
* @import {ChainInfo, CosmosChainInfo} from './types.js';
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -81,9 +81,7 @@ export const IBCConnectionInfoShape = M.splitRecord({
|
|
|
81
81
|
transferChannel: IBCChannelInfoShape,
|
|
82
82
|
});
|
|
83
83
|
|
|
84
|
-
/**
|
|
85
|
-
* @type {TypedPattern<CosmosChainInfo>}
|
|
86
|
-
*/
|
|
84
|
+
/** @type {TypedPattern<CosmosChainInfo>} */
|
|
87
85
|
export const CosmosChainInfoShape = M.splitRecord(
|
|
88
86
|
{
|
|
89
87
|
chainId: M.string(),
|
|
@@ -96,11 +94,13 @@ export const CosmosChainInfoShape = M.splitRecord(
|
|
|
96
94
|
},
|
|
97
95
|
);
|
|
98
96
|
|
|
99
|
-
|
|
100
|
-
export const ChainInfoShape = M.
|
|
97
|
+
/** @type {TypedPattern<ChainInfo>} */
|
|
98
|
+
export const ChainInfoShape = M.splitRecord({
|
|
99
|
+
chainId: M.string(),
|
|
100
|
+
});
|
|
101
101
|
export const LocalChainAccountShape = M.remotable('LocalChainAccount');
|
|
102
102
|
export const DenomShape = M.string();
|
|
103
|
-
//
|
|
103
|
+
// TODO define for #9211
|
|
104
104
|
export const BrandInfoShape = M.any();
|
|
105
105
|
|
|
106
106
|
export const DenomAmountShape = { denom: DenomShape, value: M.bigint() };
|
package/src/utils/address.js
CHANGED
|
@@ -7,7 +7,7 @@ import { Fail } from '@endo/errors';
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* @param {IBCConnectionID} hostConnectionId
|
|
10
|
+
* @param {IBCConnectionID} hostConnectionId Counterparty Connection ID
|
|
11
11
|
* @param {IBCConnectionID} controllerConnectionId Self Connection ID
|
|
12
12
|
* @param {object} [opts]
|
|
13
13
|
* @param {string} [opts.encoding] - message encoding format for the channel.
|
package/src/utils/registry.js
CHANGED
|
@@ -53,8 +53,8 @@ function toConnectionEntry(ibcInfo, name, chainInfo) {
|
|
|
53
53
|
}
|
|
54
54
|
const [channel] = transferChannels;
|
|
55
55
|
const [channelFrom, channelTo] = fromChain1
|
|
56
|
-
? [channel.
|
|
57
|
-
: [channel.
|
|
56
|
+
? [channel.chain_1, channel.chain_2]
|
|
57
|
+
: [channel.chain_2, channel.chain_1];
|
|
58
58
|
const record = {
|
|
59
59
|
id: /** @type {IBCConnectionID} */ (from.connection_id),
|
|
60
60
|
client_id: from.client_id,
|
|
@@ -2,13 +2,13 @@ export function provideOrchestration(zcf: ZCF, baggage: Baggage, remotePowers: O
|
|
|
2
2
|
chainHub: import("@endo/exo").Guarded<{
|
|
3
3
|
registerChain(name: string, chainInfo: import("../cosmos-api.js").CosmosChainInfo): void;
|
|
4
4
|
getChainInfo<K extends string>(chainName: K): import("@agoric/vow").Vow<ActualChainInfo<K>>;
|
|
5
|
-
registerConnection(
|
|
6
|
-
getConnectionInfo(
|
|
5
|
+
registerConnection(primaryChainId: string, counterpartyChainId: string, connectionInfo: import("../cosmos-api.js").IBCConnectionInfo): void;
|
|
6
|
+
getConnectionInfo(primary: string | {
|
|
7
7
|
chainId: string;
|
|
8
|
-
},
|
|
8
|
+
}, counter: string | {
|
|
9
9
|
chainId: string;
|
|
10
10
|
}): import("@agoric/vow").Vow<import("../cosmos-api.js").IBCConnectionInfo>;
|
|
11
|
-
getChainsAndConnection<C1 extends string, C2 extends string>(
|
|
11
|
+
getChainsAndConnection<C1 extends string, C2 extends string>(primaryName: C1, counterName: C2): import("@agoric/vow").Vow<[ActualChainInfo<C1>, ActualChainInfo<C2>, import("../cosmos-api.js").IBCConnectionInfo]>;
|
|
12
12
|
}>;
|
|
13
13
|
vowTools: {
|
|
14
14
|
when: <T, TResult1 = import("@agoric/vow").EUnwrap<T>, TResult2 = never>(specimenP: T, onFulfilled?: ((value: import("@agoric/vow").EUnwrap<T>) => TResult1 | PromiseLike<TResult1>) | undefined, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined) => Promise<TResult1 | TResult2>;
|