@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.
Files changed (35) hide show
  1. package/package.json +15 -15
  2. package/src/chain-info.d.ts +261 -1
  3. package/src/chain-info.d.ts.map +1 -1
  4. package/src/chain-info.js +3 -1
  5. package/src/examples/sendAnywhere.contract.d.ts +1 -1
  6. package/src/examples/stakeIca.contract.d.ts +3 -1
  7. package/src/examples/stakeIca.contract.d.ts.map +1 -1
  8. package/src/examples/stakeIca.contract.js +4 -2
  9. package/src/examples/swapExample.contract.d.ts +1 -1
  10. package/src/examples/swapExample.contract.d.ts.map +1 -1
  11. package/src/examples/swapExample.contract.js +7 -7
  12. package/src/examples/unbondExample.contract.d.ts +2 -3
  13. package/src/examples/unbondExample.contract.d.ts.map +1 -1
  14. package/src/examples/unbondExample.contract.js +3 -3
  15. package/src/exos/chainAccountKit.d.ts +2 -1
  16. package/src/exos/chainAccountKit.d.ts.map +1 -1
  17. package/src/exos/chainAccountKit.js +5 -4
  18. package/src/exos/local-chain-account-kit.d.ts +275 -23
  19. package/src/exos/local-chain-account-kit.d.ts.map +1 -1
  20. package/src/facade.d.ts +1 -1
  21. package/src/facade.d.ts.map +1 -1
  22. package/src/facade.js +20 -14
  23. package/src/fetched-chain-info.d.ts +324 -61
  24. package/src/fetched-chain-info.js +262 -0
  25. package/src/proposals/orchestration-proposal.d.ts +3 -3
  26. package/src/proposals/start-stakeAtom.d.ts +1 -1
  27. package/src/proposals/start-stakeAtom.d.ts.map +1 -1
  28. package/src/proposals/start-stakeAtom.js +4 -2
  29. package/src/service.d.ts +2 -1
  30. package/src/service.d.ts.map +1 -1
  31. package/src/service.js +8 -3
  32. package/src/utils/chainHub.d.ts +300 -19
  33. package/src/utils/chainHub.d.ts.map +1 -1
  34. package/src/utils/chainHub.js +11 -13
  35. package/src/vat-orchestration.d.ts +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/orchestration",
3
- "version": "0.1.1-dev-1d94913.0+1d94913",
3
+ "version": "0.1.1-dev-0282e58.0+0282e58",
4
4
  "description": "Chain abstraction for Agoric's orchestration clients",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -32,19 +32,19 @@
32
32
  },
33
33
  "homepage": "https://github.com/Agoric/agoric-sdk#readme",
34
34
  "dependencies": {
35
- "@agoric/assert": "0.6.1-dev-1d94913.0+1d94913",
36
- "@agoric/cosmic-proto": "0.4.1-dev-1d94913.0+1d94913",
37
- "@agoric/ertp": "0.16.3-dev-1d94913.0+1d94913",
38
- "@agoric/internal": "0.3.3-dev-1d94913.0+1d94913",
39
- "@agoric/network": "0.1.1-dev-1d94913.0+1d94913",
40
- "@agoric/notifier": "0.6.3-dev-1d94913.0+1d94913",
41
- "@agoric/store": "0.9.3-dev-1d94913.0+1d94913",
42
- "@agoric/time": "0.3.3-dev-1d94913.0+1d94913",
43
- "@agoric/vat-data": "0.5.3-dev-1d94913.0+1d94913",
44
- "@agoric/vats": "0.15.2-dev-1d94913.0+1d94913",
45
- "@agoric/vow": "0.1.1-dev-1d94913.0+1d94913",
46
- "@agoric/zoe": "0.26.3-dev-1d94913.0+1d94913",
47
- "@agoric/zone": "0.2.3-dev-1d94913.0+1d94913",
35
+ "@agoric/assert": "0.6.1-dev-0282e58.0+0282e58",
36
+ "@agoric/cosmic-proto": "0.4.1-dev-0282e58.0+0282e58",
37
+ "@agoric/ertp": "0.16.3-dev-0282e58.0+0282e58",
38
+ "@agoric/internal": "0.3.3-dev-0282e58.0+0282e58",
39
+ "@agoric/network": "0.1.1-dev-0282e58.0+0282e58",
40
+ "@agoric/notifier": "0.6.3-dev-0282e58.0+0282e58",
41
+ "@agoric/store": "0.9.3-dev-0282e58.0+0282e58",
42
+ "@agoric/time": "0.3.3-dev-0282e58.0+0282e58",
43
+ "@agoric/vat-data": "0.5.3-dev-0282e58.0+0282e58",
44
+ "@agoric/vats": "0.15.2-dev-0282e58.0+0282e58",
45
+ "@agoric/vow": "0.1.1-dev-0282e58.0+0282e58",
46
+ "@agoric/zoe": "0.26.3-dev-0282e58.0+0282e58",
47
+ "@agoric/zone": "0.2.3-dev-0282e58.0+0282e58",
48
48
  "@endo/base64": "^1.0.5",
49
49
  "@endo/far": "^1.1.2",
50
50
  "@endo/marshal": "^1.5.0",
@@ -87,5 +87,5 @@
87
87
  "typeCoverage": {
88
88
  "atLeast": 97.1
89
89
  },
90
- "gitHead": "1d9491345c557e12a4d2c80a690baab7d0ff8436"
90
+ "gitHead": "0282e584c0aeaea977d1ecb5cccdba8173b73bb6"
91
91
  }
@@ -6,7 +6,7 @@ import type { EthChainInfo } from './types.js';
6
6
  /** @import {CosmosChainInfo, EthChainInfo} from './types.js'; */
7
7
  /** @typedef {CosmosChainInfo | EthChainInfo} ChainInfo */
8
8
  declare const knownChains: {
9
- agoric: {
9
+ agoriclocal: {
10
10
  chainId: string;
11
11
  connections: {
12
12
  'cosmoshub-4': {
@@ -53,6 +53,140 @@ declare const knownChains: {
53
53
  };
54
54
  };
55
55
  };
56
+ agoric: {
57
+ chainId: string;
58
+ stakingTokens: {
59
+ denom: string;
60
+ }[];
61
+ connections: {
62
+ 'cosmoshub-4': {
63
+ id: string;
64
+ client_id: string;
65
+ counterparty: {
66
+ client_id: string;
67
+ connection_id: string;
68
+ prefix: {
69
+ key_prefix: string;
70
+ };
71
+ };
72
+ state: number;
73
+ transferChannel: {
74
+ channelId: string;
75
+ portId: string;
76
+ counterPartyChannelId: string;
77
+ counterPartyPortId: string;
78
+ ordering: number;
79
+ state: number;
80
+ version: string;
81
+ };
82
+ };
83
+ 'noble-1': {
84
+ id: string;
85
+ client_id: string;
86
+ counterparty: {
87
+ client_id: string;
88
+ connection_id: string;
89
+ prefix: {
90
+ key_prefix: string;
91
+ };
92
+ };
93
+ state: number;
94
+ transferChannel: {
95
+ channelId: string;
96
+ portId: string;
97
+ counterPartyChannelId: string;
98
+ counterPartyPortId: string;
99
+ ordering: number;
100
+ state: number;
101
+ version: string;
102
+ };
103
+ };
104
+ 'omniflixhub-1': {
105
+ id: string;
106
+ client_id: string;
107
+ counterparty: {
108
+ client_id: string;
109
+ connection_id: string;
110
+ prefix: {
111
+ key_prefix: string;
112
+ };
113
+ };
114
+ state: number;
115
+ transferChannel: {
116
+ channelId: string;
117
+ portId: string;
118
+ counterPartyChannelId: string;
119
+ counterPartyPortId: string;
120
+ ordering: number;
121
+ state: number;
122
+ version: string;
123
+ };
124
+ };
125
+ 'osmosis-1': {
126
+ id: string;
127
+ client_id: string;
128
+ counterparty: {
129
+ client_id: string;
130
+ connection_id: string;
131
+ prefix: {
132
+ key_prefix: string;
133
+ };
134
+ };
135
+ state: number;
136
+ transferChannel: {
137
+ channelId: string;
138
+ portId: string;
139
+ counterPartyChannelId: string;
140
+ counterPartyPortId: string;
141
+ ordering: number;
142
+ state: number;
143
+ version: string;
144
+ };
145
+ };
146
+ 'secret-4': {
147
+ id: string;
148
+ client_id: string;
149
+ counterparty: {
150
+ client_id: string;
151
+ connection_id: string;
152
+ prefix: {
153
+ key_prefix: string;
154
+ };
155
+ };
156
+ state: number;
157
+ transferChannel: {
158
+ channelId: string;
159
+ portId: string;
160
+ counterPartyChannelId: string;
161
+ counterPartyPortId: string;
162
+ ordering: number;
163
+ state: number;
164
+ version: string;
165
+ };
166
+ };
167
+ 'stride-1': {
168
+ id: string;
169
+ client_id: string;
170
+ counterparty: {
171
+ client_id: string;
172
+ connection_id: string;
173
+ prefix: {
174
+ key_prefix: string;
175
+ };
176
+ };
177
+ state: number;
178
+ transferChannel: {
179
+ channelId: string;
180
+ portId: string;
181
+ counterPartyChannelId: string;
182
+ counterPartyPortId: string;
183
+ ordering: number;
184
+ state: number;
185
+ version: string;
186
+ };
187
+ };
188
+ };
189
+ };
56
190
  celestia: {
57
191
  chainId: string;
58
192
  stakingTokens: {
@@ -172,6 +306,27 @@ declare const knownChains: {
172
306
  denom: string;
173
307
  }[];
174
308
  connections: {
309
+ 'agoric-3': {
310
+ id: string;
311
+ client_id: string;
312
+ counterparty: {
313
+ client_id: string;
314
+ connection_id: string;
315
+ prefix: {
316
+ key_prefix: string;
317
+ };
318
+ };
319
+ state: number;
320
+ transferChannel: {
321
+ channelId: string;
322
+ portId: string;
323
+ counterPartyChannelId: string;
324
+ counterPartyPortId: string;
325
+ ordering: number;
326
+ state: number;
327
+ version: string;
328
+ };
329
+ };
175
330
  'juno-1': {
176
331
  id: string;
177
332
  client_id: string;
@@ -792,6 +947,27 @@ declare const knownChains: {
792
947
  denom: string;
793
948
  }[];
794
949
  connections: {
950
+ 'agoric-3': {
951
+ id: string;
952
+ client_id: string;
953
+ counterparty: {
954
+ client_id: string;
955
+ connection_id: string;
956
+ prefix: {
957
+ key_prefix: string;
958
+ };
959
+ };
960
+ state: number;
961
+ transferChannel: {
962
+ channelId: string;
963
+ portId: string;
964
+ counterPartyChannelId: string;
965
+ counterPartyPortId: string;
966
+ ordering: number;
967
+ state: number;
968
+ version: string;
969
+ };
970
+ };
795
971
  'cosmoshub-4': {
796
972
  id: string;
797
973
  client_id: string;
@@ -968,6 +1144,27 @@ declare const knownChains: {
968
1144
  denom: string;
969
1145
  }[];
970
1146
  connections: {
1147
+ 'agoric-3': {
1148
+ id: string;
1149
+ client_id: string;
1150
+ counterparty: {
1151
+ client_id: string;
1152
+ connection_id: string;
1153
+ prefix: {
1154
+ key_prefix: string;
1155
+ };
1156
+ };
1157
+ state: number;
1158
+ transferChannel: {
1159
+ channelId: string;
1160
+ portId: string;
1161
+ counterPartyChannelId: string;
1162
+ counterPartyPortId: string;
1163
+ ordering: number;
1164
+ state: number;
1165
+ version: string;
1166
+ };
1167
+ };
971
1168
  'cosmoshub-4': {
972
1169
  id: string;
973
1170
  client_id: string;
@@ -1040,6 +1237,27 @@ declare const knownChains: {
1040
1237
  }[];
1041
1238
  icqEnabled: boolean;
1042
1239
  connections: {
1240
+ 'agoric-3': {
1241
+ id: string;
1242
+ client_id: string;
1243
+ counterparty: {
1244
+ client_id: string;
1245
+ connection_id: string;
1246
+ prefix: {
1247
+ key_prefix: string;
1248
+ };
1249
+ };
1250
+ state: number;
1251
+ transferChannel: {
1252
+ channelId: string;
1253
+ portId: string;
1254
+ counterPartyChannelId: string;
1255
+ counterPartyPortId: string;
1256
+ ordering: number;
1257
+ state: number;
1258
+ version: string;
1259
+ };
1260
+ };
1043
1261
  celestia: {
1044
1262
  id: string;
1045
1263
  client_id: string;
@@ -1258,6 +1476,27 @@ declare const knownChains: {
1258
1476
  denom: string;
1259
1477
  }[];
1260
1478
  connections: {
1479
+ 'agoric-3': {
1480
+ id: string;
1481
+ client_id: string;
1482
+ counterparty: {
1483
+ client_id: string;
1484
+ connection_id: string;
1485
+ prefix: {
1486
+ key_prefix: string;
1487
+ };
1488
+ };
1489
+ state: number;
1490
+ transferChannel: {
1491
+ channelId: string;
1492
+ portId: string;
1493
+ counterPartyChannelId: string;
1494
+ counterPartyPortId: string;
1495
+ ordering: number;
1496
+ state: number;
1497
+ version: string;
1498
+ };
1499
+ };
1261
1500
  celestia: {
1262
1501
  id: string;
1263
1502
  client_id: string;
@@ -1610,6 +1849,27 @@ declare const knownChains: {
1610
1849
  denom: string;
1611
1850
  }[];
1612
1851
  connections: {
1852
+ 'agoric-3': {
1853
+ id: string;
1854
+ client_id: string;
1855
+ counterparty: {
1856
+ client_id: string;
1857
+ connection_id: string;
1858
+ prefix: {
1859
+ key_prefix: string;
1860
+ };
1861
+ };
1862
+ state: number;
1863
+ transferChannel: {
1864
+ channelId: string;
1865
+ portId: string;
1866
+ counterPartyChannelId: string;
1867
+ counterPartyPortId: string;
1868
+ ordering: number;
1869
+ state: number;
1870
+ version: string;
1871
+ };
1872
+ };
1613
1873
  celestia: {
1614
1874
  id: string;
1615
1875
  client_id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"chain-info.d.ts","sourceRoot":"","sources":["chain-info.js"],"names":[],"mappings":"AAoEO,yDAHI,IAAI,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqDE"}
package/src/chain-info.js CHANGED
@@ -10,7 +10,9 @@ import fetchedChainInfo from './fetched-chain-info.js';
10
10
  const knownChains = /** @satisfies {Record<string, ChainInfo>} */ (
11
11
  harden({
12
12
  ...fetchedChainInfo,
13
- agoric: {
13
+ // XXX does not have useful connections
14
+ // UNTIL https://github.com/Agoric/agoric-sdk/issues/9492
15
+ agoriclocal: {
14
16
  chainId: 'agoriclocal',
15
17
  connections: {
16
18
  'cosmoshub-4': {
@@ -54,7 +54,7 @@ export type OrchestrationPowers = {
54
54
  }[]>;
55
55
  }>>;
56
56
  orchestrationService: Remote<import("@endo/exo").Guarded<{
57
- makeAccount(hostConnectionId: `connection-${number}`, controllerConnectionId: `connection-${number}`): Promise<import("../cosmos-api").IcaAccount>;
57
+ makeAccount(chainId: string, hostConnectionId: `connection-${number}`, controllerConnectionId: `connection-${number}`): Promise<import("../cosmos-api").IcaAccount>;
58
58
  provideICQConnection(controllerConnectionId: `connection-${number}`): Promise<import("@endo/exo").Guarded<{
59
59
  getLocalAddress(): `/ibc-port/${string}`;
60
60
  getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
@@ -1,5 +1,6 @@
1
1
  export namespace meta {
2
2
  namespace customTermsShape {
3
+ let chainId: import("@endo/patterns").Matcher;
3
4
  let hostConnectionId: import("@endo/patterns").Matcher;
4
5
  let controllerConnectionId: import("@endo/patterns").Matcher;
5
6
  let bondDenom: import("@endo/patterns").Matcher;
@@ -14,7 +15,7 @@ export namespace meta {
14
15
  export namespace privateArgsShape { }
15
16
  export function start(zcf: ZCF<StakeIcaTerms>, privateArgs: {
16
17
  orchestration: import("@endo/exo").Guarded<{
17
- makeAccount(hostConnectionId: `connection-${number}`, controllerConnectionId: `connection-${number}`): Promise<import("../cosmos-api.js").IcaAccount>;
18
+ makeAccount(chainId: string, hostConnectionId: `connection-${number}`, controllerConnectionId: `connection-${number}`): Promise<import("../cosmos-api.js").IcaAccount>;
18
19
  provideICQConnection(controllerConnectionId: `connection-${number}`): Promise<import("@endo/exo").Guarded<{
19
20
  getLocalAddress(): `/ibc-port/${string}`;
20
21
  getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
@@ -86,6 +87,7 @@ export function start(zcf: ZCF<StakeIcaTerms>, privateArgs: {
86
87
  }>;
87
88
  }>;
88
89
  export type StakeIcaTerms = {
90
+ chainId: string;
89
91
  hostConnectionId: `connection-${number}`;
90
92
  controllerConnectionId: `connection-${number}`;
91
93
  bondDenom: string;
@@ -1 +1 @@
1
- {"version":3,"file":"stakeIca.contract.d.ts","sourceRoot":"","sources":["stakeIca.contract.js"],"names":[],"mappings":";;;;;;;;;;;;;;AAoDO,2BATI,GAAG,CAAC,aAAa,CAAC;;;;;;;;;iBAGX,WAAW;gBACZ,UAAU;;;;;;;;;;;;;;mGA0E8tF,OAAO,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAHrwF;;;;eAhFe,MAAM;;0BAkFR,OAAO,KAAK;iCAtHmB,kBAAkB;kCAC7B,cAAc;kCAYjB,cAAc;6BAFnB,kBAAkB"}
1
+ {"version":3,"file":"stakeIca.contract.d.ts","sourceRoot":"","sources":["stakeIca.contract.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAsDO,2BATI,GAAG,CAAC,aAAa,CAAC;;;;;;;;;iBAGX,WAAW;gBACZ,UAAU;;;;;;;;;;;;;;mGA0EwuF,OAAO,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAH/wF;;aAnFa,MAAM;;;eAGJ,MAAM;;0BAkFR,OAAO,KAAK;iCAxHmB,kBAAkB;kCAC7B,cAAc;kCAYjB,cAAc;6BAFnB,kBAAkB"}
@@ -19,6 +19,7 @@ const trace = makeTracer('StakeAtom');
19
19
 
20
20
  export const meta = harden({
21
21
  customTermsShape: {
22
+ chainId: M.string(),
22
23
  hostConnectionId: M.string(),
23
24
  controllerConnectionId: M.string(),
24
25
  bondDenom: M.string(),
@@ -34,6 +35,7 @@ export const privateArgsShape = meta.privateArgsShape;
34
35
 
35
36
  /**
36
37
  * @typedef {{
38
+ * chainId: string;
37
39
  * hostConnectionId: IBCConnectionID;
38
40
  * controllerConnectionId: IBCConnectionID;
39
41
  * bondDenom: string;
@@ -51,8 +53,7 @@ export const privateArgsShape = meta.privateArgsShape;
51
53
  * @param {Baggage} baggage
52
54
  */
53
55
  export const start = async (zcf, privateArgs, baggage) => {
54
- // TODO #9063 this roughly matches what we'll get from Chain<C>.getChainInfo()
55
- const { hostConnectionId, controllerConnectionId, bondDenom } =
56
+ const { chainId, hostConnectionId, controllerConnectionId, bondDenom } =
56
57
  zcf.getTerms();
57
58
  const { orchestration, marshaller, storageNode, timer } = privateArgs;
58
59
 
@@ -68,6 +69,7 @@ export const start = async (zcf, privateArgs, baggage) => {
68
69
 
69
70
  async function makeAccountKit() {
70
71
  const account = await E(orchestration).makeAccount(
72
+ chainId,
71
73
  hostConnectionId,
72
74
  controllerConnectionId,
73
75
  );
@@ -37,7 +37,7 @@ export function start(zcf: ZCF, privateArgs: {
37
37
  }[]>;
38
38
  }>>;
39
39
  orchestrationService: Remote<import("@endo/exo").Guarded<{
40
- makeAccount(hostConnectionId: `connection-${number}`, controllerConnectionId: `connection-${number}`): Promise<IcaAccount>;
40
+ makeAccount(chainId: string, hostConnectionId: `connection-${number}`, controllerConnectionId: `connection-${number}`): Promise<IcaAccount>;
41
41
  provideICQConnection(controllerConnectionId: `connection-${number}`): Promise<import("@endo/exo").Guarded<{
42
42
  getLocalAddress(): `/ibc-port/${string}`;
43
43
  getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
@@ -1 +1 @@
1
- {"version":3,"file":"swapExample.contract.d.ts","sourceRoot":"","sources":["swapExample.contract.js"],"names":[],"mappings":"AAaA;;;;;;;;GAQG;AAEH,2BAA2B;AAC3B,mBADW,YAAY,CAWrB;AASK,0CAHI,KAAK;;;EAIsC;AAc/C,2BAXI,GAAG;;;;;8BAJV,MAAM,KAAK,CAAC;6BAec,QAAQ,KAAK,CAAC,mBACjC,OAAO;6BAyBd,OAAI,KAAK,CAAC;;;2BAqBgB,EAAE;;;uBAwD4uB,OAAO,sBAAsB,EAAE,SAAS;;;4BAAyqB,OAAO,sBAAsB,EAAE,SAAS,EAAE;;;;;;;;;;;;;;;;;gBA3Gt/C,UAAU;;;;oBA2CV,MAAM,CAAC,KAAK,CAAC;;;;;oBAAb,MAAM,CAAC,KAAK,CAAC;;;;GA+D7B;6BA5IyB,cAAc;4BAHf,kBAAkB;gCAHwB,aAAa;kCACjD,cAAc;6BAInB,kBAAkB;4CALuB,aAAa"}
1
+ {"version":3,"file":"swapExample.contract.d.ts","sourceRoot":"","sources":["swapExample.contract.js"],"names":[],"mappings":"AAaA;;;;;;;;GAQG;AAEH,2BAA2B;AAC3B,mBADW,YAAY,CAWrB;AASK,0CAHI,KAAK;;;EAIsC;AAc/C,2BAXI,GAAG;;;;;8BAJV,MAAM,KAAK,CAAC;6BAec,QAAQ,KAAK,CAAC,mBACjC,OAAO;6BAyBd,OAAI,KAAK,CAAC;;;2BAqBgB,EAAE;;;uBAwDwvB,OAAO,sBAAsB,EAAE,SAAS;;;4BAAyqB,OAAO,sBAAsB,EAAE,SAAS,EAAE;;;;;;;;;;;;;;;;;gBA3GlgD,UAAU;;;;oBA2CV,MAAM,CAAC,KAAK,CAAC;;;;;oBAAb,MAAM,CAAC,KAAK,CAAC;;;;GA+D7B;6BA5IyB,cAAc;4BAHf,kBAAkB;gCAHwB,aAAa;kCACjD,cAAc;6BAInB,kBAAkB;4CALuB,aAAa"}
@@ -105,15 +105,15 @@ export const start = async (zcf, privateArgs, baggage) => {
105
105
  async (/** @type {Orchestrator} */ orch, { zcf }, seat, offerArgs) => {
106
106
  const { give } = seat.getProposal();
107
107
 
108
- const celestia = await orch.getChain('celestia');
108
+ const omni = await orch.getChain('omniflixhub');
109
109
  const agoric = await orch.getChain('agoric');
110
110
 
111
- const [celestiaAccount, localAccount] = await Promise.all([
112
- celestia.makeAccount(),
111
+ const [omniAccount, localAccount] = await Promise.all([
112
+ omni.makeAccount(),
113
113
  agoric.makeAccount(),
114
114
  ]);
115
115
 
116
- const tiaAddress = celestiaAccount.getAddress();
116
+ const omniAddress = omniAccount.getAddress();
117
117
 
118
118
  // deposit funds from user seat to LocalChainAccount
119
119
  const payments = await withdrawFromSeat(zcf, seat, give);
@@ -122,8 +122,8 @@ export const start = async (zcf, privateArgs, baggage) => {
122
122
 
123
123
  // build swap instructions with orcUtils library
124
124
  const transferMsg = orcUtils.makeOsmosisSwap({
125
- destChain: 'celestia',
126
- destAddress: tiaAddress,
125
+ destChain: 'omniflixhub',
126
+ destAddress: omniAddress,
127
127
  amountIn: give.Stable,
128
128
  brandOut: /** @type {any} */ ('FIXME'),
129
129
  slippage: 0.03,
@@ -132,7 +132,7 @@ export const start = async (zcf, privateArgs, baggage) => {
132
132
  await localAccount
133
133
  .transferSteps(give.Stable, transferMsg)
134
134
  .then(_txResult =>
135
- celestiaAccount.delegate(offerArgs.validator, offerArgs.staked),
135
+ omniAccount.delegate(offerArgs.validator, offerArgs.staked),
136
136
  )
137
137
  .catch(e => console.error(e));
138
138
 
@@ -5,8 +5,7 @@ export function start(zcf: ZCF, privateArgs: {
5
5
  getAddress(): string;
6
6
  getBalance(brand: Brand<"nat">): Promise<import("@agoric/ertp/src/types.js").NatAmount>;
7
7
  deposit(payment: Payment<"nat">, optAmountShape?: Pattern): Promise<globalThis.Amount>;
8
- withdraw(amount: Amount<// ??? should this be synchronous? depends on how names are resolved.
9
- "nat">): Promise<globalThis.Payment<"nat">>;
8
+ withdraw(amount: Amount<"nat">): Promise<globalThis.Payment<"nat">>;
10
9
  executeTx<MT extends {
11
10
  '@type': string;
12
11
  }[]>(messages: MT): Promise<{ [K in keyof MT]: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto").ResponseTo<MT[K]>>; }>;
@@ -23,7 +22,7 @@ export function start(zcf: ZCF, privateArgs: {
23
22
  }[]>;
24
23
  }>>;
25
24
  orchestrationService: Remote<import("@endo/exo").Guarded<{
26
- makeAccount(hostConnectionId: `connection-${number}`, controllerConnectionId: `connection-${number}`): Promise<IcaAccount>;
25
+ makeAccount(chainId: string, hostConnectionId: `connection-${number}`, controllerConnectionId: `connection-${number}`): Promise<IcaAccount>;
27
26
  provideICQConnection(controllerConnectionId: `connection-${number}`): Promise<import("@endo/exo").Guarded<{
28
27
  getLocalAddress(): `/ibc-port/${string}`;
29
28
  getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
@@ -1 +1 @@
1
- {"version":3,"file":"unbondExample.contract.d.ts","sourceRoot":"","sources":["unbondExample.contract.js"],"names":[],"mappings":"AA8BO,2BAXI,GAAG;;;;;8BAgCV,MAAC,KAAK,CAAC;6BAgBY,QAAO,KAAK,CAAC,mBACxB,OAAO;6BAYb,OADA,qEAAqE;YACrE,KADK,CAAC;;;2BAauB,EAAE;;;uBAmBo2D,OAAO,sBAAsB,EAAE,SAAS;;;4BAAyqB,OAAO,sBAAsB,EAAE,SAAS,EAAE;;;;;;;;;;;;;;;;gBAtFnnF,UAAU;;;;;;;;GAqF1B;6BAjGyB,cAAc;4BACf,kBAAkB;gCALwB,aAAa;kCACjD,cAAc;6BACnB,kBAAkB"}
1
+ {"version":3,"file":"unbondExample.contract.d.ts","sourceRoot":"","sources":["unbondExample.contract.js"],"names":[],"mappings":"AA8BO,2BAXI,GAAG;;;;;8BAgCV,MAAC,KAAK,CAAC;6BAgBY,QAAO,KAAK,CAAC,mBACxB,OAAO;6BAWV,OAAM,KAAK,CAAC;;;2BAa2B,EAAE;;;uBAmBo2D,OAAO,sBAAsB,EAAE,SAAS;;;4BAAyqB,OAAO,sBAAsB,EAAE,SAAS,EAAE;;;;;;;;;;;;;;;;gBAtFhoF,UAAU;;;;;;;;GAqF1B;6BAjGyB,cAAc;4BACf,kBAAkB;gCALwB,aAAa;kCACjD,cAAc;6BACnB,kBAAkB"}
@@ -69,8 +69,8 @@ export const start = async (zcf, privateArgs, baggage) => {
69
69
  // We would actually alreaady have the account from the orchestrator
70
70
  // ??? could these be passed in? It would reduce the size of this handler,
71
71
  // keeping it focused on long-running operations.
72
- const celestia = await orch.getChain('celestia');
73
- const celestiaAccount = await celestia.makeAccount();
72
+ const omni = await orch.getChain('omniflixhub');
73
+ const omniAccount = await omni.makeAccount();
74
74
 
75
75
  // TODO implement these
76
76
  // const delegations = await celestiaAccount.getDelegations();
@@ -86,7 +86,7 @@ export const start = async (zcf, privateArgs, baggage) => {
86
86
  // await celestiaAccount.transfer(tiaAmt, strideAccount.getAddress());
87
87
 
88
88
  // await strideAccount.liquidStake(tiaAmt);
89
- console.log(celestiaAccount, strideAccount);
89
+ console.log(omniAccount, strideAccount);
90
90
  },
91
91
  );
92
92
 
@@ -10,7 +10,7 @@ export const ChainAccountI: import("@endo/patterns").InterfaceGuard<{
10
10
  close: import("@endo/patterns").MethodGuard;
11
11
  getPurse: import("@endo/patterns").MethodGuard;
12
12
  }>;
13
- export function prepareChainAccountKit(zone: Zone): (port: Port, requestedRemoteAddress: string) => import("@endo/exo").GuardedKit<{
13
+ export function prepareChainAccountKit(zone: Zone): (chainId: string, port: Port, requestedRemoteAddress: string) => import("@endo/exo").GuardedKit<{
14
14
  account: {
15
15
  /** @returns {ChainAddress} */
16
16
  getAddress(): ChainAddress;
@@ -53,6 +53,7 @@ export function prepareChainAccountKit(zone: Zone): (port: Port, requestedRemote
53
53
  }>;
54
54
  export type UnparsableChainAddress = "UNPARSABLE_CHAIN_ADDRESS";
55
55
  export type State = {
56
+ chainId: string;
56
57
  port: Port;
57
58
  connection: Remote<Connection> | undefined;
58
59
  localAddress: `/ibc-port/${string}` | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"chainAccountKit.d.ts","sourceRoot":"","sources":["chainAccountKit.js"],"names":[],"mappings":"AA8BA;;;;;;;;;;;GAaG;AAcI;;QAmBC,8BAA8B;;;;;;;;QAiC9B;;;;;;;;;WASG;mLAHU,OAAO,CAAC,MAAM,CAAC;QAa5B,+BAA+B;;QAS/B;;;;WAIG;wBADQ,KAAK;;;QAQhB;;;;WAIG;;;;;GAyBR;qCAtJW,0BAA0B;;;;;4BAuBX,MAAM;;;;8BAiIrB,UAAU,CAAC,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;0BApK5C,mBAAmB;0BACP,iBAAiB;kCAKrB,aAAa;4BAFnB,8CAA8C;gCAHpC,iBAAiB;4BAC3B,aAAa"}
1
+ {"version":3,"file":"chainAccountKit.d.ts","sourceRoot":"","sources":["chainAccountKit.js"],"names":[],"mappings":"AA8BA;;;;;;;;;;;GAaG;AAeI;;QAqBC,8BAA8B;;;;;;;;QAiC9B;;;;;;;;;WASG;mLAHU,OAAO,CAAC,MAAM,CAAC;QAa5B,+BAA+B;;QAS/B;;;;WAIG;wBADQ,KAAK;;;QAQhB;;;;WAIG;;;;;GAuBR;qCAvJW,0BAA0B;;aAoB1B,MAAM;;;;4BAIS,MAAM;;;;8BAiIrB,UAAU,CAAC,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;0BArK5C,mBAAmB;0BACP,iBAAiB;kCAKrB,aAAa;4BAFnB,8CAA8C;gCAHpC,iBAAiB;4BAC3B,aAAa"}
@@ -45,6 +45,7 @@ export const ChainAccountI = M.interface('ChainAccount', {
45
45
 
46
46
  /**
47
47
  * @typedef {{
48
+ * chainId: string;
48
49
  * port: Port;
49
50
  * connection: Remote<Connection> | undefined;
50
51
  * localAddress: LocalIbcAddress | undefined;
@@ -60,11 +61,13 @@ export const prepareChainAccountKit = zone =>
60
61
  'ChainAccountKit',
61
62
  { account: ChainAccountI, connectionHandler: ConnectionHandlerI },
62
63
  /**
64
+ * @param {string} chainId
63
65
  * @param {Port} port
64
66
  * @param {string} requestedRemoteAddress
65
67
  */
66
- (port, requestedRemoteAddress) =>
68
+ (chainId, port, requestedRemoteAddress) =>
67
69
  /** @type {State} */ ({
70
+ chainId,
68
71
  port,
69
72
  connection: undefined,
70
73
  requestedRemoteAddress,
@@ -158,9 +161,7 @@ export const prepareChainAccountKit = zone =>
158
161
  this.state.localAddress = localAddr;
159
162
  this.state.chainAddress = harden({
160
163
  address: findAddressField(remoteAddr) || UNPARSABLE_CHAIN_ADDRESS,
161
- // TODO get this from `Chain` object #9063
162
- // XXX how do we get a chainId for an unknown chain? seems it may need to be a user supplied arg
163
- chainId: 'FIXME',
164
+ chainId: this.state.chainId,
164
165
  addressEncoding: 'bech32',
165
166
  });
166
167
  },