@agoric/orchestration 0.1.1-dev-f4feacb.0 → 0.1.1-dev-e5a1afd.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/orchestration",
3
- "version": "0.1.1-dev-f4feacb.0+f4feacb",
3
+ "version": "0.1.1-dev-e5a1afd.0+e5a1afd",
4
4
  "description": "Chain abstraction for Agoric's orchestration clients",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -33,19 +33,19 @@
33
33
  },
34
34
  "homepage": "https://github.com/Agoric/agoric-sdk#readme",
35
35
  "dependencies": {
36
- "@agoric/async-flow": "0.1.1-dev-f4feacb.0+f4feacb",
37
- "@agoric/cosmic-proto": "0.4.1-dev-f4feacb.0+f4feacb",
38
- "@agoric/ertp": "0.16.3-dev-f4feacb.0+f4feacb",
39
- "@agoric/internal": "0.3.3-dev-f4feacb.0+f4feacb",
40
- "@agoric/network": "0.1.1-dev-f4feacb.0+f4feacb",
41
- "@agoric/notifier": "0.6.3-dev-f4feacb.0+f4feacb",
42
- "@agoric/store": "0.9.3-dev-f4feacb.0+f4feacb",
43
- "@agoric/time": "0.3.3-dev-f4feacb.0+f4feacb",
44
- "@agoric/vat-data": "0.5.3-dev-f4feacb.0+f4feacb",
45
- "@agoric/vats": "0.15.2-dev-f4feacb.0+f4feacb",
46
- "@agoric/vow": "0.1.1-dev-f4feacb.0+f4feacb",
47
- "@agoric/zoe": "0.26.3-dev-f4feacb.0+f4feacb",
48
- "@agoric/zone": "0.2.3-dev-f4feacb.0+f4feacb",
36
+ "@agoric/async-flow": "0.1.1-dev-e5a1afd.0+e5a1afd",
37
+ "@agoric/cosmic-proto": "0.4.1-dev-e5a1afd.0+e5a1afd",
38
+ "@agoric/ertp": "0.16.3-dev-e5a1afd.0+e5a1afd",
39
+ "@agoric/internal": "0.3.3-dev-e5a1afd.0+e5a1afd",
40
+ "@agoric/network": "0.1.1-dev-e5a1afd.0+e5a1afd",
41
+ "@agoric/notifier": "0.6.3-dev-e5a1afd.0+e5a1afd",
42
+ "@agoric/store": "0.9.3-dev-e5a1afd.0+e5a1afd",
43
+ "@agoric/time": "0.3.3-dev-e5a1afd.0+e5a1afd",
44
+ "@agoric/vat-data": "0.5.3-dev-e5a1afd.0+e5a1afd",
45
+ "@agoric/vats": "0.15.2-dev-e5a1afd.0+e5a1afd",
46
+ "@agoric/vow": "0.1.1-dev-e5a1afd.0+e5a1afd",
47
+ "@agoric/zoe": "0.26.3-dev-e5a1afd.0+e5a1afd",
48
+ "@agoric/zone": "0.2.3-dev-e5a1afd.0+e5a1afd",
49
49
  "@endo/base64": "^1.0.9",
50
50
  "@endo/errors": "^1.2.9",
51
51
  "@endo/far": "^1.1.10",
@@ -54,7 +54,7 @@
54
54
  "@noble/hashes": "^1.5.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@agoric/swingset-liveslots": "0.10.3-dev-f4feacb.0+f4feacb",
57
+ "@agoric/swingset-liveslots": "0.10.3-dev-e5a1afd.0+e5a1afd",
58
58
  "@chain-registry/client": "^1.47.4",
59
59
  "@cosmjs/amino": "^0.33.0",
60
60
  "@cosmjs/proto-signing": "^0.33.0",
@@ -97,5 +97,5 @@
97
97
  "typeCoverage": {
98
98
  "atLeast": 97.84
99
99
  },
100
- "gitHead": "f4feacb345d6a0475c83693450ef57d117c60f00"
100
+ "gitHead": "e5a1afd8f59d7ba56e618657059caee05096f220"
101
101
  }
@@ -1 +1 @@
1
- {"version":3,"file":"send-anywhere.contract.d.ts","sourceRoot":"","sources":["send-anywhere.contract.js"],"names":[],"mappings":"AAUA;;;;;GAKG;AAEH,qEAKE;AAgBK,8BAVI,GAAG,eACH,mBAAmB,GAAG;IAC5B,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;IAC3D,SAAS,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cAAc;wCACqB,0BAA0B;yBAFtD,aAAa"}
@@ -65,6 +65,7 @@ export const contract = async (
65
65
 
66
66
  // orchestrate uses the names on orchestrationFns to do a "prepare" of the associated behavior
67
67
  const orchFns = orchestrateAll(flows, {
68
+ chainHub,
68
69
  log,
69
70
  sharedLocalAccountP,
70
71
  zoeTools,
@@ -1,4 +1,5 @@
1
- export function sendIt(orch: Orchestrator, { sharedLocalAccountP, log, zoeTools: { localTransfer, withdrawToSeat } }: {
1
+ export function sendIt(orch: Orchestrator, { chainHub, sharedLocalAccountP, log, zoeTools: { localTransfer, withdrawToSeat }, }: {
2
+ chainHub: GuestInterface<ChainHub>;
2
3
  sharedLocalAccountP: Promise<GuestInterface<LocalOrchestrationAccountKit["holder"]>>;
3
4
  zoeTools: GuestInterface<ZoeTools>;
4
5
  log: GuestOf<(msg: string) => Vow<void>>;
@@ -7,8 +8,9 @@ export function sendIt(orch: Orchestrator, { sharedLocalAccountP, log, zoeTools:
7
8
  destAddr: string;
8
9
  }): Promise<void>;
9
10
  import type { Orchestrator } from '../types.js';
10
- import type { LocalOrchestrationAccountKit } from '../exos/local-orchestration-account.js';
11
+ import type { ChainHub } from '../types.js';
11
12
  import type { GuestInterface } from '@agoric/async-flow';
13
+ import type { LocalOrchestrationAccountKit } from '../exos/local-orchestration-account.js';
12
14
  import type { ZoeTools } from '../utils/zoe-tools.js';
13
15
  import type { Vow } from '@agoric/vow';
14
16
  import type { GuestOf } from '@agoric/async-flow';
@@ -1 +1 @@
1
- {"version":3,"file":"send-anywhere.flows.d.ts","sourceRoot":"","sources":["send-anywhere.flows.js"],"names":[],"mappings":"AA4BO,6BARI,YAAY,6EAEpB;IAA6E,mBAAmB,EAAxF,OAAO,CAAC,eAAe,4BAA4B,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjC,QAAQ,EAAtC,eAAe,QAAQ,CAAC;IACiB,GAAG,EAA5C,QAAQ,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,IAAI,CAAC,CAAC;CAC3C,QAAQ,OAAO,aACP;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,iBAyDjD;kCAzEsE,aAAa;kDAFrC,wCAAwC;oCAH7C,oBAAoB;8BAInC,uBAAuB;yBAF5B,aAAa;6BAFO,oBAAoB;6BACnB,aAAa"}
1
+ {"version":3,"file":"send-anywhere.flows.d.ts","sourceRoot":"","sources":["send-anywhere.flows.js"],"names":[],"mappings":"AA6BO,6BATI,YAAY,wFAEpB;IAAsC,QAAQ,EAAtC,eAAe,QAAQ,CAAC;IAC6C,mBAAmB,EAAxF,OAAO,CAAC,eAAe,4BAA4B,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjC,QAAQ,EAAtC,eAAe,QAAQ,CAAC;IACiB,GAAG,EAA5C,QAAQ,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,IAAI,CAAC,CAAC;CAC3C,QAAQ,OAAO,aACP;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,iBA2DjD;kCA5EgF,aAAa;8BAAb,aAAa;oCALpD,oBAAoB;kDAGf,wCAAwC;8BAC5D,uBAAuB;yBAF5B,aAAa;6BAFO,oBAAoB;6BACnB,aAAa"}
@@ -8,7 +8,7 @@ import { M, mustMatch } from '@endo/patterns';
8
8
  * @import {Vow} from '@agoric/vow';
9
9
  * @import {LocalOrchestrationAccountKit} from '../exos/local-orchestration-account.js';
10
10
  * @import {ZoeTools} from '../utils/zoe-tools.js';
11
- * @import {Orchestrator, OrchestrationFlow, LocalAccountMethods} from '../types.js';
11
+ * @import {Orchestrator, OrchestrationFlow, LocalAccountMethods, ChainHub} from '../types.js';
12
12
  */
13
13
 
14
14
  const { entries } = Object;
@@ -20,6 +20,7 @@ const { entries } = Object;
20
20
  * @satisfies {OrchestrationFlow}
21
21
  * @param {Orchestrator} orch
22
22
  * @param {object} ctx
23
+ * @param {GuestInterface<ChainHub>} ctx.chainHub
23
24
  * @param {Promise<GuestInterface<LocalOrchestrationAccountKit['holder']>>} ctx.sharedLocalAccountP
24
25
  * @param {GuestInterface<ZoeTools>} ctx.zoeTools
25
26
  * @param {GuestOf<(msg: string) => Vow<void>>} ctx.log
@@ -28,7 +29,12 @@ const { entries } = Object;
28
29
  */
29
30
  export const sendIt = async (
30
31
  orch,
31
- { sharedLocalAccountP, log, zoeTools: { localTransfer, withdrawToSeat } },
32
+ {
33
+ chainHub,
34
+ sharedLocalAccountP,
35
+ log,
36
+ zoeTools: { localTransfer, withdrawToSeat },
37
+ },
32
38
  seat,
33
39
  offerArgs,
34
40
  ) => {
@@ -38,14 +44,11 @@ export const sendIt = async (
38
44
  const { give } = seat.getProposal();
39
45
  const [[_kw, amt]] = entries(give);
40
46
  void log(`sending {${amt.value}} from ${chainName} to ${destAddr}`);
41
- const agoric = await orch.getChain('agoric');
42
- const assets = await agoric.getVBankAssetInfo();
43
- void log(`got info for denoms: ${assets.map(a => a.denom).join(', ')}`);
44
- const { denom } = NonNullish(
45
- assets.find(a => a.brand === amt.brand),
46
- `${amt.brand} not registered in vbank`,
47
+ const denom = NonNullish(
48
+ chainHub.getDenom(amt.brand),
49
+ `${amt.brand} not registered in ChainHub`,
47
50
  );
48
-
51
+ void log(`got denom ${denom} for ${amt.brand}`);
49
52
  const chain = await orch.getChain(chainName);
50
53
  const info = await chain.getChainInfo();
51
54
  const { chainId } = info;