@agoric/orchestration 0.1.1-dev-4687f0d.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 (37) hide show
  1. package/package.json +15 -15
  2. package/src/chain-info.d.ts +334 -74
  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 +346 -85
  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 +1935 -2984
  24. package/src/fetched-chain-info.js +335 -73
  25. package/src/proposals/orchestration-proposal.d.ts +10 -6
  26. package/src/proposals/orchestration-proposal.d.ts.map +1 -1
  27. package/src/proposals/orchestration-proposal.js +43 -24
  28. package/src/proposals/start-stakeAtom.d.ts +1 -1
  29. package/src/proposals/start-stakeAtom.d.ts.map +1 -1
  30. package/src/proposals/start-stakeAtom.js +4 -2
  31. package/src/service.d.ts +2 -1
  32. package/src/service.d.ts.map +1 -1
  33. package/src/service.js +8 -3
  34. package/src/utils/chainHub.d.ts +378 -88
  35. package/src/utils/chainHub.d.ts.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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
  },