@agoric/orchestration 0.2.0-upgrade-18-dev-aaebae4.0 → 0.2.0-upgrade-18-dev-bd8fd54.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.
Files changed (116) hide show
  1. package/index.d.ts +3 -0
  2. package/index.js +3 -0
  3. package/package.json +30 -29
  4. package/src/chain-capabilities.d.ts +15 -0
  5. package/src/chain-capabilities.d.ts.map +1 -0
  6. package/src/chain-capabilities.js +60 -0
  7. package/src/chain-info.d.ts +33 -20
  8. package/src/chain-info.d.ts.map +1 -1
  9. package/src/cosmos-api.d.ts +96 -21
  10. package/src/cosmos-api.d.ts.map +1 -1
  11. package/src/cosmos-api.ts +115 -28
  12. package/src/examples/auto-stake-it.contract.d.ts +19 -2
  13. package/src/examples/auto-stake-it.contract.d.ts.map +1 -1
  14. package/src/examples/auto-stake-it.contract.js +13 -2
  15. package/src/examples/auto-stake-it.flows.d.ts +1 -1
  16. package/src/examples/basic-flows.contract.d.ts +16 -1
  17. package/src/examples/basic-flows.contract.d.ts.map +1 -1
  18. package/src/examples/basic-flows.contract.js +14 -3
  19. package/src/examples/basic-flows.flows.d.ts +1 -1
  20. package/src/examples/send-anywhere.contract.d.ts +28 -5
  21. package/src/examples/send-anywhere.contract.d.ts.map +1 -1
  22. package/src/examples/send-anywhere.contract.js +11 -0
  23. package/src/examples/stake-bld.contract.d.ts +2 -2
  24. package/src/examples/stake-ica.contract.d.ts +5 -0
  25. package/src/examples/stake-ica.contract.d.ts.map +1 -1
  26. package/src/examples/staking-combinations.contract.d.ts +2 -0
  27. package/src/examples/staking-combinations.contract.d.ts.map +1 -1
  28. package/src/examples/staking-combinations.contract.js +1 -2
  29. package/src/examples/staking-combinations.flows.d.ts +4 -2
  30. package/src/examples/staking-combinations.flows.d.ts.map +1 -1
  31. package/src/examples/staking-combinations.flows.js +9 -4
  32. package/src/examples/swap.contract.d.ts +18 -2
  33. package/src/examples/swap.contract.d.ts.map +1 -1
  34. package/src/examples/swap.contract.js +6 -0
  35. package/src/exos/README.md +5 -4
  36. package/src/exos/chain-hub-admin.d.ts.map +1 -1
  37. package/src/exos/chain-hub-admin.js +1 -2
  38. package/src/exos/chain-hub.d.ts +37 -25
  39. package/src/exos/chain-hub.d.ts.map +1 -1
  40. package/src/exos/chain-hub.js +203 -18
  41. package/src/exos/cosmos-interchain-service.d.ts +5 -5
  42. package/src/exos/cosmos-interchain-service.d.ts.map +1 -1
  43. package/src/exos/cosmos-interchain-service.js +3 -3
  44. package/src/exos/cosmos-orchestration-account.d.ts +7 -24
  45. package/src/exos/cosmos-orchestration-account.d.ts.map +1 -1
  46. package/src/exos/cosmos-orchestration-account.js +27 -14
  47. package/src/exos/ibc-packet.d.ts.map +1 -1
  48. package/src/exos/ica-account-kit.d.ts +1 -3
  49. package/src/exos/ica-account-kit.d.ts.map +1 -1
  50. package/src/exos/local-chain-facade.d.ts +4 -2
  51. package/src/exos/local-chain-facade.d.ts.map +1 -1
  52. package/src/exos/local-orchestration-account.d.ts +13 -50
  53. package/src/exos/local-orchestration-account.d.ts.map +1 -1
  54. package/src/exos/local-orchestration-account.js +50 -53
  55. package/src/exos/orchestrator.d.ts +5 -7
  56. package/src/exos/orchestrator.d.ts.map +1 -1
  57. package/src/exos/orchestrator.js +12 -6
  58. package/src/exos/packet-tools.d.ts +1 -6
  59. package/src/exos/packet-tools.d.ts.map +1 -1
  60. package/src/exos/packet-tools.js +8 -12
  61. package/src/exos/portfolio-holder-kit.d.ts +4 -4
  62. package/src/exos/portfolio-holder-kit.d.ts.map +1 -1
  63. package/src/exos/portfolio-holder-kit.js +1 -1
  64. package/src/exos/remote-chain-facade.d.ts +3 -8
  65. package/src/exos/remote-chain-facade.d.ts.map +1 -1
  66. package/src/exos/remote-chain-facade.js +0 -2
  67. package/src/facade.d.ts.map +1 -1
  68. package/src/facade.js +0 -1
  69. package/src/fetched-chain-info.d.ts +43 -18
  70. package/src/fetched-chain-info.js +31 -18
  71. package/src/orchestration-api.d.ts +8 -5
  72. package/src/orchestration-api.d.ts.map +1 -1
  73. package/src/orchestration-api.ts +15 -14
  74. package/src/proposals/start-auto-stake-it.d.ts +52 -0
  75. package/src/proposals/start-auto-stake-it.d.ts.map +1 -0
  76. package/src/proposals/start-auto-stake-it.js +108 -0
  77. package/src/proposals/start-basic-flows.d.ts +39 -6
  78. package/src/proposals/start-basic-flows.d.ts.map +1 -1
  79. package/src/proposals/start-basic-flows.js +60 -21
  80. package/src/proposals/start-send-anywhere.d.ts +105 -0
  81. package/src/proposals/start-send-anywhere.d.ts.map +1 -0
  82. package/src/proposals/start-send-anywhere.js +150 -0
  83. package/src/proposals/start-stakeAtom.d.ts +5 -0
  84. package/src/proposals/start-stakeAtom.d.ts.map +1 -1
  85. package/src/proposals/start-stakeBld.d.ts +2 -2
  86. package/src/proposals/start-stakeOsmo.d.ts +5 -0
  87. package/src/proposals/start-stakeOsmo.d.ts.map +1 -1
  88. package/src/typeGuards.d.ts +27 -4
  89. package/src/typeGuards.d.ts.map +1 -1
  90. package/src/typeGuards.js +103 -26
  91. package/src/types.d.ts +1 -0
  92. package/src/types.d.ts.map +1 -1
  93. package/src/types.ts +1 -0
  94. package/src/utils/address.d.ts +2 -1
  95. package/src/utils/address.d.ts.map +1 -1
  96. package/src/utils/address.js +18 -1
  97. package/src/utils/asset.d.ts +5 -0
  98. package/src/utils/asset.d.ts.map +1 -0
  99. package/src/utils/asset.js +33 -0
  100. package/src/utils/chain-hub-helper.d.ts +8 -0
  101. package/src/utils/chain-hub-helper.d.ts.map +1 -0
  102. package/src/utils/chain-hub-helper.js +60 -0
  103. package/src/utils/orchestrationAccount.js +2 -2
  104. package/src/utils/packet.d.ts +1 -1
  105. package/src/utils/packet.d.ts.map +1 -1
  106. package/src/utils/registry.d.ts +2 -0
  107. package/src/utils/registry.d.ts.map +1 -1
  108. package/src/utils/registry.js +3 -1
  109. package/src/utils/start-helper.d.ts +7 -4
  110. package/src/utils/start-helper.d.ts.map +1 -1
  111. package/src/utils/start-helper.js +6 -4
  112. package/src/utils/time.d.ts +1 -1
  113. package/src/utils/time.d.ts.map +1 -1
  114. package/src/vat-orchestration.d.ts +9 -9
  115. package/src/vat-orchestration.d.ts.map +1 -1
  116. package/src/vat-orchestration.js +2 -2
package/src/typeGuards.js CHANGED
@@ -1,13 +1,15 @@
1
+ import { BrandShape } from '@agoric/ertp/src/typeGuards.js';
1
2
  import { VowShape } from '@agoric/vow';
2
3
  import { M } from '@endo/patterns';
3
4
 
4
5
  /**
5
6
  * @import {TypedPattern} from '@agoric/internal';
6
- * @import {ChainAddress, CosmosAssetInfo, Chain, ChainInfo, CosmosChainInfo, DenomAmount, DenomDetail, DenomInfo, AmountArg, CosmosValidatorAddress} from './types.js';
7
+ * @import {ChainAddress, CosmosAssetInfo, Chain, ChainInfo, CosmosChainInfo, DenomAmount, DenomInfo, AmountArg, CosmosValidatorAddress, OrchestrationPowers, ForwardInfo, IBCMsgTransferOptions} from './types.js';
7
8
  * @import {Any as Proto3Msg} from '@agoric/cosmic-proto/google/protobuf/any.js';
8
- * @import {Delegation} from '@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js';
9
9
  * @import {TxBody} from '@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js';
10
+ * @import {Coin} from '@agoric/cosmic-proto/cosmos/base/v1beta1/coin.js';
10
11
  * @import {TypedJson} from '@agoric/cosmic-proto';
12
+ * @import {DenomDetail} from './exos/chain-hub.js';
11
13
  */
12
14
 
13
15
  /**
@@ -31,28 +33,15 @@ export const ChainAddressShape = {
31
33
  encoding: M.string(),
32
34
  value: M.string(),
33
35
  };
36
+ harden(ChainAddressShape);
34
37
 
35
38
  /** @type {TypedPattern<Proto3Msg>} */
36
- export const Proto3Shape = {
37
- typeUrl: M.string(),
38
- value: M.string(),
39
- };
40
-
41
- /** @internal */
42
- export const IBCTransferOptionsShape = M.splitRecord(
43
- {},
44
- {
45
- timeoutTimestamp: M.bigint(),
46
- timeoutHeight: {
47
- revisionHeight: M.bigint(),
48
- revisionNumber: M.bigint(),
49
- },
50
- memo: M.string(),
51
- },
52
- );
39
+ export const Proto3Shape = { typeUrl: M.string(), value: M.string() };
40
+ harden(ChainAddressShape);
53
41
 
54
42
  /** @internal */
55
43
  export const IBCChannelIDShape = M.string();
44
+
56
45
  /** @internal */
57
46
  export const IBCChannelInfoShape = M.splitRecord({
58
47
  portId: M.string(),
@@ -63,8 +52,10 @@ export const IBCChannelInfoShape = M.splitRecord({
63
52
  state: M.scalar(), // XXX
64
53
  version: M.string(),
65
54
  });
55
+
66
56
  /** @internal */
67
57
  export const IBCConnectionIDShape = M.string();
58
+
68
59
  /** @internal */
69
60
  export const IBCConnectionInfoShape = M.splitRecord({
70
61
  id: IBCConnectionIDShape,
@@ -94,10 +85,12 @@ export const CosmosChainInfoShape = M.splitRecord(
94
85
  chainId: M.string(),
95
86
  },
96
87
  {
88
+ bech32Prefix: M.string(),
97
89
  connections: M.record(),
98
90
  stakingTokens: M.arrayOf({ denom: M.string() }),
99
91
  // UNTIL https://github.com/Agoric/agoric-sdk/issues/9326
100
92
  icqEnabled: M.boolean(),
93
+ pfmEnabled: M.boolean(),
101
94
  },
102
95
  );
103
96
 
@@ -107,6 +100,14 @@ export const ChainInfoShape = M.splitRecord({
107
100
  });
108
101
  export const DenomShape = M.string();
109
102
 
103
+ /** @type {TypedPattern<Coin>} */
104
+ export const CoinShape = {
105
+ /** json-safe stringified bigint */
106
+ amount: M.string(),
107
+ denom: DenomShape,
108
+ };
109
+ harden(CoinShape);
110
+
110
111
  /** @type {TypedPattern<DenomInfo<any, any>>} */
111
112
  export const DenomInfoShape = {
112
113
  chain: M.remotable('Chain'),
@@ -114,15 +115,25 @@ export const DenomInfoShape = {
114
115
  brand: M.or(M.remotable('Brand'), M.undefined()),
115
116
  baseDenom: M.string(),
116
117
  };
118
+ harden(DenomInfoShape);
119
+
120
+ /** @type {TypedPattern<DenomDetail>} */
121
+ export const DenomDetailShape = M.splitRecord(
122
+ { chainName: M.string(), baseName: M.string(), baseDenom: M.string() },
123
+ { brand: BrandShape },
124
+ );
125
+ harden(DenomDetailShape);
117
126
 
118
127
  /** @type {TypedPattern<DenomAmount>} */
119
- export const DenomAmountShape = { denom: DenomShape, value: M.bigint() };
128
+ export const DenomAmountShape = { denom: DenomShape, value: M.nat() };
129
+ harden(DenomAmountShape);
120
130
 
121
131
  /** @type {TypedPattern<Amount<'nat'>>} */
122
- export const AnyNatAmountShape = harden({
132
+ export const AnyNatAmountShape = {
123
133
  brand: M.remotable('Brand'),
124
134
  value: M.nat(),
125
- });
135
+ };
136
+ harden(AnyNatAmountShape);
126
137
 
127
138
  /** @type {TypedPattern<AmountArg>} */
128
139
  export const AmountArgShape = M.or(AnyNatAmountShape, DenomAmountShape);
@@ -151,10 +162,11 @@ export const ICQMsgShape = M.splitRecord(
151
162
  export const TypedJsonShape = M.splitRecord({ '@type': M.string() });
152
163
 
153
164
  /** @see {Chain} */
154
- export const chainFacadeMethods = harden({
165
+ export const chainFacadeMethods = {
155
166
  getChainInfo: M.call().returns(VowShape),
156
167
  makeAccount: M.call().returns(VowShape),
157
- });
168
+ };
169
+ harden(chainFacadeMethods);
158
170
 
159
171
  /**
160
172
  * for google/protobuf/timestamp.proto, not to be confused with TimestampShape
@@ -164,6 +176,7 @@ export const chainFacadeMethods = harden({
164
176
  * string
165
177
  */
166
178
  export const TimestampProtoShape = { seconds: M.string(), nanos: M.number() };
179
+ harden(TimestampProtoShape);
167
180
 
168
181
  /**
169
182
  * see {@link TxBody} for more details
@@ -186,6 +199,70 @@ export const TxBodyOptsShape = M.splitRecord(
186
199
  */
187
200
  export const AnyNatAmountsRecord = M.and(
188
201
  M.recordOf(M.string(), AnyNatAmountShape),
189
- M.not(harden({})),
202
+ M.not({}),
203
+ );
204
+
205
+ /** @type {TypedPattern<OrchestrationPowers>} */
206
+ export const OrchestrationPowersShape = {
207
+ agoricNames: M.remotable(),
208
+ localchain: M.remotable(),
209
+ orchestrationService: M.remotable(),
210
+ storageNode: M.remotable(),
211
+ timerService: M.remotable(),
212
+ };
213
+ harden(OrchestrationPowersShape);
214
+
215
+ const ForwardArgsShape = {
216
+ receiver: M.string(),
217
+ port: 'transfer',
218
+ channel: M.string(),
219
+ timeout: M.string(),
220
+ retries: M.number(),
221
+ };
222
+ harden(ForwardArgsShape);
223
+
224
+ /** @type {TypedPattern<ForwardInfo>} */
225
+ export const ForwardInfoShape = {
226
+ forward: M.splitRecord(ForwardArgsShape, {
227
+ /**
228
+ * Protocol allows us to recursively include `next` keys, but this only
229
+ * supports one. In practice, this is all we currently need.
230
+ */
231
+ next: {
232
+ forward: ForwardArgsShape,
233
+ },
234
+ }),
235
+ };
236
+ harden(ForwardInfoShape);
237
+
238
+ /**
239
+ * Caller configurable values of {@link ForwardInfo}
240
+ *
241
+ * @type {TypedPattern<IBCMsgTransferOptions['forwardOpts']>}
242
+ */
243
+ export const ForwardOptsShape = M.splitRecord(
244
+ {},
245
+ {
246
+ timeout: M.string(),
247
+ retries: M.number(),
248
+ intermediateRecipient: ChainAddressShape,
249
+ },
250
+ {},
251
+ );
252
+
253
+ /**
254
+ * @type {TypedPattern<IBCMsgTransferOptions>}
255
+ * @internal
256
+ */
257
+ export const IBCTransferOptionsShape = M.splitRecord(
258
+ {},
259
+ {
260
+ timeoutTimestamp: M.bigint(),
261
+ timeoutHeight: {
262
+ revisionHeight: M.bigint(),
263
+ revisionNumber: M.bigint(),
264
+ },
265
+ memo: M.string(),
266
+ forwardOpts: ForwardOptsShape,
267
+ },
190
268
  );
191
- harden(AnyNatAmountsRecord);
package/src/types.d.ts CHANGED
@@ -12,6 +12,7 @@ export type * from './exos/local-chain-facade.js';
12
12
  export type * from './exos/portfolio-holder-kit.js';
13
13
  export type * from './orchestration-api.js';
14
14
  export type * from './vat-orchestration.js';
15
+ export type * from './utils/start-helper.js';
15
16
  /**
16
17
  * ({@link ZCF})-like tools for use in {@link OrchestrationFlow}s.
17
18
  */
@@ -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,qBAAqB,CAAC;AACzC,mBAAmB,qCAAqC,CAAC;AACzD,mBAAmB,qCAAqC,CAAC;AACzD,mBAAmB,0BAA0B,CAAC;AAC9C,mBAAmB,2BAA2B,CAAC;AAC/C,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,gCAAgC,CAAC;AACpD,mBAAmB,wBAAwB,CAAC;AAC5C,mBAAmB,wBAAwB,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,mBAAmB,EAAE,GAAG,CAAC,qBAAqB,CAAC,CAAC;IAChD,eAAe,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACxC,cAAc,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CACvC"}
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,qBAAqB,CAAC;AACzC,mBAAmB,qCAAqC,CAAC;AACzD,mBAAmB,qCAAqC,CAAC;AACzD,mBAAmB,0BAA0B,CAAC;AAC9C,mBAAmB,2BAA2B,CAAC;AAC/C,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,gCAAgC,CAAC;AACpD,mBAAmB,wBAAwB,CAAC;AAC5C,mBAAmB,wBAAwB,CAAC;AAC5C,mBAAmB,yBAAyB,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,mBAAmB,EAAE,GAAG,CAAC,qBAAqB,CAAC,CAAC;IAChD,eAAe,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACxC,cAAc,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CACvC"}
package/src/types.ts CHANGED
@@ -13,6 +13,7 @@ export type * from './exos/local-chain-facade.js';
13
13
  export type * from './exos/portfolio-holder-kit.js';
14
14
  export type * from './orchestration-api.js';
15
15
  export type * from './vat-orchestration.js';
16
+ export type * from './utils/start-helper.js';
16
17
 
17
18
  /**
18
19
  * ({@link ZCF})-like tools for use in {@link OrchestrationFlow}s.
@@ -1,7 +1,8 @@
1
- export function makeICAChannelAddress(hostConnectionId: IBCConnectionID, controllerConnectionId: IBCConnectionID, { version, encoding, ordering, txType, }?: ICAChannelAddressOpts | undefined): RemoteIbcAddress;
1
+ export function makeICAChannelAddress(hostConnectionId: IBCConnectionID, controllerConnectionId: IBCConnectionID, { version, encoding, ordering, txType, }?: ICAChannelAddressOpts): RemoteIbcAddress;
2
2
  export const DEFAULT_ICQ_VERSION: "icq-1";
3
3
  export function makeICQChannelAddress(controllerConnectionId: IBCConnectionID, version?: string): RemoteIbcAddress;
4
4
  export function findAddressField(remoteAddressString: RemoteIbcAddress): ChainAddress["value"] | undefined;
5
+ export function getBech32Prefix(address: string): string;
5
6
  export type ICAChannelAddressOpts = {
6
7
  /**
7
8
  * message encoding format for the
@@ -1 +1 @@
1
- {"version":3,"file":"address.d.ts","sourceRoot":"","sources":["address.js"],"names":[],"mappings":"AAwBO,wDALI,eAAe,0BACf,eAAe,iFAEb,gBAAgB,CAuB5B;AAGD,0CAA2C;AAOpC,8DAJI,eAAe,YACf,MAAM,GACJ,gBAAgB,CAQ5B;AAaM,sDAJI,gBAAgB,GAEd,YAAY,CAAC,OAAO,CAAC,GAAG,SAAS,CAY7C;;;;;;;;;;;;;;;;;;;;;qCAjFiC,cAAc;sCAEb,iCAAiC;kCADrC,aAAa"}
1
+ {"version":3,"file":"address.d.ts","sourceRoot":"","sources":["address.js"],"names":[],"mappings":"AAwBO,wDALI,eAAe,0BACf,eAAe,6CACf,qBAAqB,GACnB,gBAAgB,CAuB5B;AAGD,kCAAmC,OAAO,CAAC;AAOpC,8DAJI,eAAe,YACf,MAAM,GACJ,gBAAgB,CAQ5B;AAaM,sDAJI,gBAAgB,GAEd,YAAY,CAAC,OAAO,CAAC,GAAG,SAAS,CAY7C;AAYM,yCAFI,MAAM,UAQhB;;;;;;;;;;;;;;;;;;;;;qCAnGiC,cAAc;sCAEb,iCAAiC;kCADrC,aAAa"}
@@ -1,4 +1,4 @@
1
- import { Fail } from '@endo/errors';
1
+ import { Fail, q } from '@endo/errors';
2
2
 
3
3
  /**
4
4
  * @import {IBCConnectionID} from '@agoric/vats';
@@ -84,3 +84,20 @@ export const findAddressField = remoteAddressString => {
84
84
  }
85
85
  };
86
86
  harden(findAddressField);
87
+
88
+ /**
89
+ * Extracts the human readable part (HRP), aka `bech32Prefix`, from an address.
90
+ *
91
+ * see
92
+ * [bech32.js](https://github.com/bitcoinjs/bech32/blob/5ceb0e3d4625561a459c85643ca6947739b2d83c/src/index.ts#L146)
93
+ * for reference implementation
94
+ *
95
+ * @param {string} address
96
+ */
97
+ export const getBech32Prefix = address => {
98
+ assert(address, 'address is required');
99
+ const split = address.lastIndexOf('1');
100
+ if (split === -1) return Fail`No separator character for ${q(address)}`;
101
+ if (split === 0) return Fail`Missing prefix for ${q(address)}`;
102
+ return address.slice(0, split);
103
+ };
@@ -0,0 +1,5 @@
1
+ export function assetOn(baseDenom: Denom, baseName: string, brand?: Brand<"nat">, chainName?: string, infoOf?: Record<string, CosmosChainInfo>): [string, DenomDetail];
2
+ import type { Denom } from '../types.js';
3
+ import type { CosmosChainInfo } from '../types.js';
4
+ import type { DenomDetail } from '../types.js';
5
+ //# sourceMappingURL=asset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["asset.js"],"names":[],"mappings":"AAiBO,mCAPI,KAAK,YACL,MAAM,UACN,KAAK,CAAC,KAAK,CAAC,cACZ,MAAM,WACN,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAC7B,CAAC,MAAM,EAAE,WAAW,CAAC,CAiBjC;2BA7B+D,aAAa;qCAAb,aAAa;iCAAb,aAAa"}
@@ -0,0 +1,33 @@
1
+ import { denomHash } from './denomHash.js';
2
+
3
+ /**
4
+ * @import {ChainHub, CosmosChainInfo, Denom, DenomDetail} from '../types.js';
5
+ */
6
+
7
+ /**
8
+ * Helper function for creating {@link DenomDetail} data for {@link ChainHub}
9
+ * asset registration.
10
+ *
11
+ * @param {Denom} baseDenom
12
+ * @param {string} baseName
13
+ * @param {Brand<'nat'>} [brand]
14
+ * @param {string} [chainName]
15
+ * @param {Record<string, CosmosChainInfo>} [infoOf]
16
+ * @returns {[string, DenomDetail]}
17
+ */
18
+ export const assetOn = (baseDenom, baseName, brand, chainName, infoOf) => {
19
+ const baseDetail = { baseName, chainName: chainName || baseName, baseDenom };
20
+ const detail = brand ? { ...baseDetail, brand } : baseDetail;
21
+ if (!chainName) return harden([baseDenom, detail]);
22
+
23
+ if (!infoOf) throw Error(`must provide infoOf`);
24
+ const issuerInfo = infoOf[baseName];
25
+ const holdingInfo = infoOf[chainName];
26
+ if (!holdingInfo) throw Error(`${chainName} missing`);
27
+ if (!holdingInfo.connections)
28
+ throw Error(`connections missing for ${chainName}`);
29
+ const { channelId } =
30
+ holdingInfo.connections[issuerInfo.chainId].transferChannel;
31
+ const denom = `ibc/${denomHash({ denom: baseDenom, channelId })}`;
32
+ return harden([denom, detail]);
33
+ };
@@ -0,0 +1,8 @@
1
+ export function registerChainsAndAssets(chainHub: ChainHub, brands: Record<string, Brand<"nat">>, chainInfo: Record<string, CosmosChainInfo> | undefined, assetInfo: [Denom, DenomDetail & {
2
+ brandKey?: string;
3
+ }][] | undefined): void;
4
+ import type { ChainHub } from '../types.js';
5
+ import type { CosmosChainInfo } from '../types.js';
6
+ import type { Denom } from '../types.js';
7
+ import type { DenomDetail } from '../types.js';
8
+ //# sourceMappingURL=chain-hub-helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chain-hub-helper.d.ts","sourceRoot":"","sources":["chain-hub-helper.js"],"names":[],"mappings":"AAgBO,kDALI,QAAQ,UACR,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,aAC5B,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,SAAS,aAC3C,CAAC,KAAK,EAAE,WAAW,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,GAAG,SAAS,QA6CpE;8BA1D+D,aAAa;qCAAb,aAAa;2BAAb,aAAa;iCAAb,aAAa"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * @import {ChainHub, CosmosChainInfo, Denom, DenomDetail} from '../types.js';
3
+ */
4
+
5
+ /**
6
+ * Registers chains, connections, assets in the provided chainHub.
7
+ *
8
+ * If either is not provided, registration will be skipped.
9
+ *
10
+ * TODO #10580 remove 'brandKey' in favor of `LegibleCapData`
11
+ *
12
+ * @param {ChainHub} chainHub
13
+ * @param {Record<string, Brand<'nat'>>} brands
14
+ * @param {Record<string, CosmosChainInfo> | undefined} chainInfo
15
+ * @param {[Denom, DenomDetail & { brandKey?: string }][] | undefined} assetInfo
16
+ */
17
+ export const registerChainsAndAssets = (
18
+ chainHub,
19
+ brands,
20
+ chainInfo,
21
+ assetInfo,
22
+ ) => {
23
+ console.log('chainHub: registering chains', Object.keys(chainInfo || {}));
24
+ if (!chainInfo) {
25
+ return;
26
+ }
27
+
28
+ const conns = {};
29
+ for (const [chainName, allInfo] of Object.entries(chainInfo)) {
30
+ const { connections, ...info } = allInfo;
31
+ chainHub.registerChain(chainName, info);
32
+ if (connections) conns[info.chainId] = connections;
33
+ }
34
+ const registeredPairs = new Set();
35
+ for (const [pChainId, connInfos] of Object.entries(conns)) {
36
+ for (const [cChainId, connInfo] of Object.entries(connInfos)) {
37
+ const pair = [pChainId, cChainId].sort().join('<->');
38
+ if (!registeredPairs.has(pair)) {
39
+ chainHub.registerConnection(pChainId, cChainId, connInfo);
40
+ registeredPairs.add(pair);
41
+ }
42
+ }
43
+ }
44
+ console.log('chainHub: registered connections', [...registeredPairs].sort());
45
+
46
+ console.log(
47
+ 'chainHub: registering assets',
48
+ assetInfo?.map(([denom, { chainName }]) => `${chainName}: ${denom}`),
49
+ );
50
+ if (!assetInfo) {
51
+ return;
52
+ }
53
+ for (const [denom, info] of assetInfo) {
54
+ const { brandKey, ...rest } = info;
55
+ const infoWithBrand = brandKey
56
+ ? { ...rest, brand: brands[brandKey] }
57
+ : rest;
58
+ chainHub.registerAsset(denom, infoWithBrand);
59
+ }
60
+ };
@@ -10,11 +10,11 @@ import {
10
10
  IBCTransferOptionsShape,
11
11
  } from '../typeGuards.js';
12
12
 
13
- /** @import {OrchestrationAccountI} from '../orchestration-api.js'; */
13
+ /** @import {OrchestrationAccountCommon} from '../orchestration-api.js'; */
14
14
 
15
15
  const { Vow$ } = NetworkShape; // TODO #9611
16
16
 
17
- /** @see {OrchestrationAccountI} */
17
+ /** @see {OrchestrationAccountCommon} */
18
18
  export const orchestrationAccountMethods = {
19
19
  getAddress: M.call().returns(ChainAddressShape),
20
20
  getBalance: M.call(M.or(BrandShape, M.string())).returns(
@@ -13,7 +13,7 @@
13
13
  * @returns {string} stringified InterchainAccountPacketData
14
14
  * @throws {Error} if malformed messages are provided
15
15
  */
16
- export function makeTxPacket(msgs: AnyJson[], opts?: Partial<Omit<TxBody, "messages">> | undefined): string;
16
+ export function makeTxPacket(msgs: AnyJson[], opts?: Partial<Omit<TxBody, "messages">>): string;
17
17
  /**
18
18
  * Makes an IBC query packet from an array of query messages. Expects the `data`
19
19
  * of each message to be base64 encoded bytes. Skips checks for malformed
@@ -1 +1 @@
1
- {"version":3,"file":"packet.d.ts","sourceRoot":"","sources":["packet.js"],"names":[],"mappings":"AAcA;;;;GAIG;AAEH;;;;;;;;;GASG;AACH,mCALW,OAAO,EAAE,yDAEP,MAAM,CAmBlB;AAGD;;;;;;;;GAQG;AACH,sCAJW,SAAS,YAAY,CAAC,EAAE,GACtB,MAAM,CAgBlB;AAGD;;;;;;;;;;GAUG;AACH,wCALW,MAAM,GACJ,MAAM,CASlB;AAGD;;;;;;;;;;;GAWG;AACH,2CALW,MAAM,GACJ,SAAS,aAAa,CAAC,EAAE,CASrC;6BA/FmC,sBAAsB;uBAdnC,8CAA8C;6BAK9D,+CAA+C;8BASlB,sBAAsB;8BATnD,+CAA+C"}
1
+ {"version":3,"file":"packet.d.ts","sourceRoot":"","sources":["packet.js"],"names":[],"mappings":"AAcA;;;;GAIG;AAEH;;;;;;;;;GASG;AACH,mCALW,OAAO,EAAE,SACT,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,GAC/B,MAAM,CAmBlB;AAGD;;;;;;;;GAQG;AACH,sCAJW,SAAS,YAAY,CAAC,EAAE,GACtB,MAAM,CAgBlB;AAGD;;;;;;;;;;GAUG;AACH,wCALW,MAAM,GACJ,MAAM,CASlB;AAGD;;;;;;;;;;;GAWG;AACH,2CALW,MAAM,GACJ,SAAS,aAAa,CAAC,EAAE,CASrC;6BA/FmC,sBAAsB;uBAdnC,8CAA8C;6BAK9D,+CAA+C;8BASlB,sBAAsB;8BATnD,+CAA+C"}
@@ -1,8 +1,10 @@
1
1
  export function convertChainInfo(registry: Pick<ChainRegistryClient, "chains" | "ibcData">): Promise<{
2
2
  [k: string]: Readonly<{
3
+ bech32Prefix?: string;
3
4
  chainId: string;
4
5
  connections?: Record<string, IBCConnectionInfo>;
5
6
  icqEnabled?: boolean;
7
+ pfmEnabled?: boolean;
6
8
  stakingTokens?: Readonly<Array<{
7
9
  denom: string;
8
10
  }>>;
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["registry.js"],"names":[],"mappings":"AAqFO,2CAFI,IAAI,CAAC,mBAAmB,EAAE,QAAQ,GAAG,SAAS,CAAC;;;;;;;;;GA4CzD;yCArHqC,wBAAwB;uCACT,kBAAkB"}
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["registry.js"],"names":[],"mappings":"AAqFO,2CAFI,IAAI,CAAC,mBAAmB,EAAE,QAAQ,GAAG,SAAS,CAAC;;;;;;;;;;;GA8CzD;yCAvHqC,wBAAwB;uCACT,kBAAkB"}
@@ -90,6 +90,7 @@ export const convertChainInfo = async registry => {
90
90
  for (const chain of registry.chains) {
91
91
  console.log('processing info', chain.chain_name);
92
92
  chainInfo[chain.chain_name] = {
93
+ bech32Prefix: chain.bech32_prefix,
93
94
  chainId: chain.chain_id,
94
95
  stakingTokens: chain.staking?.staking_tokens,
95
96
  // UNTIL https://github.com/Agoric/agoric-sdk/issues/9326
@@ -117,8 +118,9 @@ export const convertChainInfo = async registry => {
117
118
  const connections = Object.fromEntries(
118
119
  ibcData
119
120
  .map(datum => toConnectionEntry(datum, name, chainInfo))
121
+ .filter(entry => entry.length > 0)
120
122
  // sort alphabetically for consistency
121
- .sort(([a], [b]) => (a && b ? a.localeCompare(b) : 0)),
123
+ .sort(([a], [b]) => a.localeCompare(b)),
122
124
  );
123
125
  chainInfo[name] = { ...chainInfo[name], connections };
124
126
  }
@@ -5,6 +5,7 @@ export function provideOrchestration(zcf: ZCF, baggage: Baggage, remotePowers: O
5
5
  [durableName: string]: import("../orchestration-api.js").OrchestrationFlow<import("@agoric/async-flow").GuestInterface<HC>>;
6
6
  }>(guestFns: GFM, hostCtx: HC) => { [N in keyof GFM]: HostForGuest<GFM[N]>; };
7
7
  };
8
+ baggage: Baggage;
8
9
  chainHub: import("@endo/exo").Guarded<{
9
10
  registerChain(name: string, chainInfo: import("../cosmos-api.js").CosmosChainInfo): void;
10
11
  getChainInfo<K extends string>(chainName: K): import("@agoric/vow").Vow<ActualChainInfo<K>>;
@@ -16,17 +17,19 @@ export function provideOrchestration(zcf: ZCF, baggage: Baggage, remotePowers: O
16
17
  }): import("@agoric/vow").Vow<import("../cosmos-api.js").IBCConnectionInfo>;
17
18
  getChainsAndConnection<C1 extends string, C2 extends string>(primaryName: C1, counterName: C2): import("@agoric/vow").Vow<[ActualChainInfo<C1>, ActualChainInfo<C2>, import("../cosmos-api.js").IBCConnectionInfo]>;
18
19
  registerAsset(denom: import("../orchestration-api.js").Denom, detail: DenomDetail): void;
19
- getAsset(denom: import("../orchestration-api.js").Denom): DenomDetail | undefined;
20
+ getAsset(denom: import("../orchestration-api.js").Denom, srcChainName: string): DenomDetail | undefined;
20
21
  getDenom(brand: Brand): import("../orchestration-api.js").Denom | undefined;
22
+ makeChainAddress(address: string): import("../orchestration-api.js").ChainAddress;
23
+ makeTransferRoute(destination: import("../orchestration-api.js").ChainAddress, denomAmount: import("../orchestration-api.js").DenomAmount, srcChainName: string, forwardOpts?: import("../cosmos-api.js").IBCMsgTransferOptions["forwardOpts"]): import("../cosmos-api.js").TransferRoute;
21
24
  }>;
22
25
  vowTools: import("@agoric/vow").VowTools;
23
26
  asyncFlowTools: {
24
27
  prepareAsyncFlowKit: (zone: Zone, tag: string, guestAsyncFunc: import("@agoric/async-flow").GuestAsyncFunc, options?: {
25
28
  startEager?: boolean;
26
- } | undefined) => (activationArgs: any) => import("@endo/exo").GuardedKit<{
29
+ }) => (activationArgs: any) => import("@endo/exo").GuardedKit<{
27
30
  flow: {
28
31
  getFlowState(): import("@agoric/async-flow").FlowState;
29
- restart(eager?: boolean | undefined): void;
32
+ restart(eager?: boolean): void;
30
33
  wake(): void;
31
34
  getOutcome(): import("@agoric/vow").Vow<any>;
32
35
  dump(): ([op: "doFulfill", vow: import("@agoric/vow").Vow<import("@endo/pass-style").Passable>, fulfillment: import("@endo/pass-style").Passable] | [op: "doReject", vow: import("@agoric/vow").Vow<import("@endo/pass-style").Passable>, reason: import("@endo/pass-style").Passable] | [op: "doReturn", callIndex: number, result: import("@endo/pass-style").Passable] | [op: "doThrow", callIndex: number, problem: import("@endo/pass-style").Passable] | [op: "checkCall", target: import("@endo/pass-style").Passable, optVerb: PropertyKey | undefined, args: import("@endo/pass-style").Passable[], callIndex: number] | [op: "checkSendOnly", target: import("@endo/pass-style").Passable, optVerb: PropertyKey | undefined, args: import("@endo/pass-style").Passable[], callIndex: number] | [op: "checkSend", target: import("@endo/pass-style").Passable, optVerb: PropertyKey | undefined, args: import("@endo/pass-style").Passable[], callIndex: number])[];
@@ -44,7 +47,7 @@ export function provideOrchestration(zcf: ZCF, baggage: Baggage, remotePowers: O
44
47
  }>;
45
48
  asyncFlow: <F extends import("@agoric/async-flow").GuestAsyncFunc>(zone: Zone, tag: string, guestFunc: F, options?: {
46
49
  startEager?: boolean;
47
- } | undefined) => import("@agoric/async-flow").HostOf<F>;
50
+ }) => import("@agoric/async-flow").HostOf<F>;
48
51
  adminAsyncFlow: import("@endo/exo").Guarded<{
49
52
  getFailures(): import("@endo/patterns").CopyMap<any, import("@endo/pass-style").Passable>;
50
53
  wakeAll(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"start-helper.d.ts","sourceRoot":"","sources":["start-helper.js"],"names":[],"mappings":"AA8CO,0CANI,GAAG,WACH,OAAO,gBACP,mBAAmB,cACnB,UAAU;+BAqGR,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BhB;AA8BM,kCAdgC,EAAE,SAA3B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAE,EAGhC,EAAE,SAFM,mBAAmB,GAAG;IAC/B,UAAU,EAAE,UAAU,CAAC;CACvB,EACQ,CAAC,cACH,CACN,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,EACZ,WAAW,EAAE,EAAE,EACf,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,kBAAkB,KACtB,OAAO,CAAC,CAAC,CAAC,GACL,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAYzE;kCA1LU;IACR,UAAU,EAAE,OAAO,UAAU,CAAC,CAAC;IAC/B,oBAAoB,EAAE,OAAO,uBAAuB,CAAC,CAAC;IACtD,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;IACjC,YAAY,EAAE,OAAO,YAAY,CAAC,CAAC;IACnC,WAAW,EAAE,OAAO,OAAO,CAAC,CAAC;CAC9B;iCAgJU,IAAI,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,EAAE,MAAM,CAAC;6BA9JzC,kBAAkB;0BAGrB,cAAc;gCALR,gCAAgC;4BAIpC,aAAa;6CAEI,2BAA2B;kCAL1B,cAAc;6BAE/B,cAAc"}
1
+ {"version":3,"file":"start-helper.d.ts","sourceRoot":"","sources":["start-helper.js"],"names":[],"mappings":"AA8CO,0CANI,GAAG,WACH,OAAO,gBACP,mBAAmB,cACnB,UAAU;+BAiGR,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;sBA/BS,CAAC;;;;;;;;;;;;;;;;;;;;;sBA0G09Y,CAAC;;;;;;;;;;;;;;;;;;;;EAzCr/Y;AA8BM,kCAdgC,EAAE,SAA3B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAE,EAGhC,EAAE,SAFM,mBAAmB,GAAG;IAC/B,UAAU,EAAE,UAAU,CAAC;CACvB,EACQ,CAAC,cACH,CACN,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,EACZ,WAAW,EAAE,EAAE,EACf,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,kBAAkB,KACtB,OAAO,CAAC,CAAC,CAAC,GACL,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAYzE;kCA5LU;IACR,UAAU,EAAE,OAAO,UAAU,CAAC,CAAC;IAC/B,oBAAoB,EAAE,OAAO,uBAAuB,CAAC,CAAC;IACtD,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;IACjC,YAAY,EAAE,OAAO,YAAY,CAAC,CAAC;IACnC,WAAW,EAAE,OAAO,OAAO,CAAC,CAAC;CAC9B;iCAkJU,IAAI,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,EAAE,MAAM,CAAC;6BAhKzC,kBAAkB;0BAGrB,cAAc;gCALR,gCAAgC;4BAIpC,aAAa;6CAEI,2BAA2B;kCAL1B,cAAc;6BAE/B,cAAc"}
@@ -50,10 +50,6 @@ export const provideOrchestration = (
50
50
  remotePowers,
51
51
  marshaller,
52
52
  ) => {
53
- zcf.setTestJig(() => ({
54
- baggage,
55
- }));
56
-
57
53
  // separate zones
58
54
  const zones = (() => {
59
55
  const zone = makeDurableZone(baggage);
@@ -160,9 +156,15 @@ export const provideOrchestration = (
160
156
  zones.contract.subZone('orchestration'),
161
157
  );
162
158
 
159
+ zcf.setTestJig(() => ({
160
+ baggage,
161
+ chainHub,
162
+ }));
163
+
163
164
  return {
164
165
  ...defaultOrchestrateKit,
165
166
  makeOrchestrateKit,
167
+ baggage,
166
168
  chainHub,
167
169
  vowTools,
168
170
  asyncFlowTools,
@@ -15,7 +15,7 @@ export function makeTimestampHelper(timer: Remote<TimerService>): {
15
15
  * @returns {Promise<bigint>} Timeout timestamp in absolute nanoseconds
16
16
  * since unix epoch
17
17
  */
18
- getTimeoutTimestampNS(relativeTime?: RelativeTimeRecord | undefined): Promise<bigint>;
18
+ getTimeoutTimestampNS(relativeTime?: RelativeTimeRecord): Promise<bigint>;
19
19
  };
20
20
  /**
21
21
  * @import {RelativeTimeRecord, TimerBrand, TimerService} from '@agoric/time';
@@ -1 +1 @@
1
- {"version":3,"file":"time.d.ts","sourceRoot":"","sources":["time.js"],"names":[],"mappings":"AAaA;;;;GAIG;AACH,2CAFW,OAAO,YAAY,CAAC;IAI3B;;;;;;;;;;OAUG;0EAFU,OAAO,CAAC,MAAM,CAAC;EAiB/B;AA1CD;;;GAGG;AAEH,qCAAsC;AACtC,4CAA6C;AAC7C,mDAAsD;AACtD,iDAAqD;8BAoCvC,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;kCA3CE,cAAc;4BACpD,kBAAkB;wCADoB,cAAc"}
1
+ {"version":3,"file":"time.d.ts","sourceRoot":"","sources":["time.js"],"names":[],"mappings":"AAaA;;;;GAIG;AACH,2CAFW,OAAO,YAAY,CAAC;IAI3B;;;;;;;;;;OAUG;yCAHQ,kBAAkB,GAChB,OAAO,CAAC,MAAM,CAAC;EAiB/B;AA1CD;;;GAGG;AAEH,iCAAkC,GAAG,CAAC;AACtC,sCAAuC,KAAK,CAAC;AAC7C,0CAA2C,QAAU,CAAC;AACtD,qCAAsC,WAAc,CAAC;8BAoCvC,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;kCA3CE,cAAc;4BACpD,kBAAkB;wCADoB,cAAc"}
@@ -1,19 +1,19 @@
1
1
  export function buildRootObject(vatPowers: VatPowers & {
2
2
  D: DProxy;
3
3
  }, vatParameters: never, baggage: Baggage): {
4
- /** @param {Partial<OrchestrationPowers>} [initialPowers] */
5
- makeCosmosInterchainService(initialPowers?: Partial<OrchestrationPowers> | undefined): import("@endo/exo").Guarded<{
6
- makeAccount(chainId: string, hostConnectionId: import("@agoric/vats").IBCConnectionID, controllerConnectionId: import("@agoric/vats").IBCConnectionID, opts?: import("./utils/address.js").ICAChannelAddressOpts | undefined): import("@agoric/vow").Vow<import("./cosmos-api.js").IcaAccount>;
7
- provideICQConnection(controllerConnectionId: import("@agoric/vats").IBCConnectionID, version?: string | undefined): import("@agoric/vow").Vow<import("./types.js").ICQConnection> | import("./types.js").ICQConnection;
4
+ /** @param {Partial<CosmosOrchestrationPowers>} [initialPowers] */
5
+ makeCosmosInterchainService(initialPowers?: Partial<CosmosOrchestrationPowers>): import("@endo/exo").Guarded<{
6
+ makeAccount(chainId: string, hostConnectionId: import("@agoric/vats").IBCConnectionID, controllerConnectionId: import("@agoric/vats").IBCConnectionID, opts?: import("./utils/address.js").ICAChannelAddressOpts): import("@agoric/vow").Vow<import("./cosmos-api.js").IcaAccount>;
7
+ provideICQConnection(controllerConnectionId: import("@agoric/vats").IBCConnectionID, version?: string): import("@agoric/vow").Vow<import("./types.js").ICQConnection> | import("./types.js").ICQConnection;
8
8
  }>;
9
9
  } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
10
- /** @param {Partial<OrchestrationPowers>} [initialPowers] */
11
- makeCosmosInterchainService(initialPowers?: Partial<OrchestrationPowers> | undefined): import("@endo/exo").Guarded<{
12
- makeAccount(chainId: string, hostConnectionId: import("@agoric/vats").IBCConnectionID, controllerConnectionId: import("@agoric/vats").IBCConnectionID, opts?: import("./utils/address.js").ICAChannelAddressOpts | undefined): import("@agoric/vow").Vow<import("./cosmos-api.js").IcaAccount>;
13
- provideICQConnection(controllerConnectionId: import("@agoric/vats").IBCConnectionID, version?: string | undefined): import("@agoric/vow").Vow<import("./types.js").ICQConnection> | import("./types.js").ICQConnection;
10
+ /** @param {Partial<CosmosOrchestrationPowers>} [initialPowers] */
11
+ makeCosmosInterchainService(initialPowers?: Partial<CosmosOrchestrationPowers>): import("@endo/exo").Guarded<{
12
+ makeAccount(chainId: string, hostConnectionId: import("@agoric/vats").IBCConnectionID, controllerConnectionId: import("@agoric/vats").IBCConnectionID, opts?: import("./utils/address.js").ICAChannelAddressOpts): import("@agoric/vow").Vow<import("./cosmos-api.js").IcaAccount>;
13
+ provideICQConnection(controllerConnectionId: import("@agoric/vats").IBCConnectionID, version?: string): import("@agoric/vow").Vow<import("./types.js").ICQConnection> | import("./types.js").ICQConnection;
14
14
  }>;
15
15
  }>;
16
16
  export type OrchestrationVat = ReturnType<typeof buildRootObject>;
17
17
  import type { Baggage } from '@agoric/vat-data';
18
- import type { OrchestrationPowers } from './exos/cosmos-interchain-service.js';
18
+ import type { CosmosOrchestrationPowers } from './exos/cosmos-interchain-service.js';
19
19
  //# sourceMappingURL=vat-orchestration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vat-orchestration.d.ts","sourceRoot":"","sources":["vat-orchestration.js"],"names":[],"mappings":"AAmBO,2CANI,SAAS,GAAG;IAClB,CAAC,EAAE,MAAM,CAAC;CACX,iBACO,KAAK,WACL,OAAO;IAWd,4DAA4D;;;;;;IAA5D,4DAA4D;;;;;GAK/D;+BAEa,UAAU,CAAC,OAAO,eAAe,CAAC;6BA7BtB,kBAAkB;yCACN,qCAAqC"}
1
+ {"version":3,"file":"vat-orchestration.d.ts","sourceRoot":"","sources":["vat-orchestration.js"],"names":[],"mappings":"AAmBO,2CANI,SAAS,GAAG;IAClB,CAAC,EAAE,MAAM,CAAC;CACX,iBACO,KAAK,WACL,OAAO;IAWd,kEAAkE;gDAAtD,OAAO,CAAC,yBAAyB,CAAC;;;;;IAA9C,kEAAkE;gDAAtD,OAAO,CAAC,yBAAyB,CAAC;;;;GAKjD;+BAEa,UAAU,CAAC,OAAO,eAAe,CAAC;6BA7BtB,kBAAkB;+CACA,qCAAqC"}
@@ -5,7 +5,7 @@ import { prepareCosmosInterchainService } from './exos/cosmos-interchain-service
5
5
 
6
6
  /**
7
7
  * @import {Baggage} from '@agoric/vat-data';
8
- * @import {OrchestrationPowers} from './exos/cosmos-interchain-service.js';
8
+ * @import {CosmosOrchestrationPowers} from './exos/cosmos-interchain-service.js';
9
9
  */
10
10
 
11
11
  /**
@@ -26,7 +26,7 @@ export const buildRootObject = (vatPowers, vatParameters, baggage) => {
26
26
  );
27
27
 
28
28
  return Far('OrchestrationVat', {
29
- /** @param {Partial<OrchestrationPowers>} [initialPowers] */
29
+ /** @param {Partial<CosmosOrchestrationPowers>} [initialPowers] */
30
30
  makeCosmosInterchainService(initialPowers = {}) {
31
31
  return makeCosmosInterchainService(initialPowers);
32
32
  },