@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
@@ -11,7 +11,6 @@ import { Fail, q } from '@endo/errors';
11
11
  import {
12
12
  AmountArgShape,
13
13
  AnyNatAmountsRecord,
14
- ChainAddressShape,
15
14
  DenomAmountShape,
16
15
  DenomShape,
17
16
  IBCTransferOptionsShape,
@@ -24,11 +23,12 @@ import { makeTimestampHelper } from '../utils/time.js';
24
23
  import { preparePacketTools } from './packet-tools.js';
25
24
  import { prepareIBCTools } from './ibc-packet.js';
26
25
  import { coerceCoin, coerceDenomAmount } from '../utils/amounts.js';
26
+ import { TransferRouteShape } from './chain-hub.js';
27
27
 
28
28
  /**
29
29
  * @import {HostOf} from '@agoric/async-flow';
30
30
  * @import {LocalChain, LocalChainAccount} from '@agoric/vats/src/localchain.js';
31
- * @import {AmountArg, ChainAddress, DenomAmount, IBCMsgTransferOptions, IBCConnectionInfo, OrchestrationAccountI, LocalAccountMethods} from '@agoric/orchestration';
31
+ * @import {AmountArg, ChainAddress, DenomAmount, IBCMsgTransferOptions, IBCConnectionInfo, OrchestrationAccountCommon, LocalAccountMethods, TransferRoute} from '@agoric/orchestration';
32
32
  * @import {RecorderKit, MakeRecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js'.
33
33
  * @import {Zone} from '@agoric/zone';
34
34
  * @import {Remote} from '@agoric/internal';
@@ -43,7 +43,7 @@ import { coerceCoin, coerceDenomAmount } from '../utils/amounts.js';
43
43
  * @import {ZoeTools} from '../utils/zoe-tools.js';
44
44
  */
45
45
 
46
- const trace = makeTracer('LOA');
46
+ const trace = makeTracer('LocalOrchAccount');
47
47
 
48
48
  const { Vow$ } = NetworkShape; // TODO #9611
49
49
 
@@ -107,7 +107,7 @@ export const prepareLocalOrchestrationAccountKit = (
107
107
  zoeTools,
108
108
  },
109
109
  ) => {
110
- const { watch, allVows, asVow, when } = vowTools;
110
+ const { watch, asVow, when } = vowTools;
111
111
  const { makeIBCTransferSender } = prepareIBCTools(
112
112
  zone.subZone('ibcTools'),
113
113
  vowTools,
@@ -134,11 +134,10 @@ export const prepareLocalOrchestrationAccountKit = (
134
134
  .returns(VowShape),
135
135
  }),
136
136
  transferWatcher: M.interface('transferWatcher', {
137
- onFulfilled: M.call([M.record(), M.nat()])
137
+ onFulfilled: M.call(M.nat())
138
138
  .optional({
139
- destination: ChainAddressShape,
140
139
  opts: M.or(M.undefined(), IBCTransferOptionsShape),
141
- amount: DenomAmountShape,
140
+ route: TransferRouteShape,
142
141
  })
143
142
  .returns(Vow$(M.record())),
144
143
  }),
@@ -345,37 +344,34 @@ export const prepareLocalOrchestrationAccountKit = (
345
344
  },
346
345
  transferWatcher: {
347
346
  /**
348
- * @param {[
349
- * { transferChannel: IBCConnectionInfo['transferChannel'] },
350
- * bigint,
351
- * ]} results
347
+ * @param {bigint} timeoutTimestamp
352
348
  * @param {{
353
- * destination: ChainAddress;
354
- * opts?: IBCMsgTransferOptions;
355
- * amount: DenomAmount;
349
+ * opts?: Omit<IBCMsgTransferOptions, 'forwardOpts'>;
350
+ * route: TransferRoute;
356
351
  * }} ctx
357
352
  */
358
- onFulfilled(
359
- [{ transferChannel }, timeoutTimestamp],
360
- { opts, amount, destination },
361
- ) {
353
+ onFulfilled(timeoutTimestamp, { opts, route }) {
354
+ const { forwardInfo, ...transferDetails } = route;
355
+ /** @type {string | undefined} */
356
+ let memo;
357
+ if (opts && 'memo' in opts) {
358
+ memo = opts.memo;
359
+ }
360
+ if (forwardInfo) {
361
+ // forward memo takes precedence
362
+ memo = JSON.stringify(forwardInfo);
363
+ }
362
364
  const transferMsg = typedJson(
363
365
  '/ibc.applications.transfer.v1.MsgTransfer',
364
366
  {
365
- sourcePort: transferChannel.portId,
366
- sourceChannel: transferChannel.channelId,
367
- token: {
368
- amount: String(amount.value),
369
- denom: amount.denom,
370
- },
367
+ ...transferDetails,
371
368
  sender: this.state.address.value,
372
- receiver: destination.value,
373
369
  timeoutHeight: opts?.timeoutHeight ?? {
374
370
  revisionHeight: 0n,
375
371
  revisionNumber: 0n,
376
372
  },
377
373
  timeoutTimestamp,
378
- memo: opts?.memo ?? '',
374
+ memo: memo ?? '',
379
375
  },
380
376
  );
381
377
 
@@ -395,9 +391,7 @@ export const prepareLocalOrchestrationAccountKit = (
395
391
  * first result
396
392
  */
397
393
  extractFirstResultWatcher: {
398
- /**
399
- * @param {Record<unknown, unknown>[]} results
400
- */
394
+ /** @param {Record<unknown, unknown>[]} results */
401
395
  onFulfilled(results) {
402
396
  results.length === 1 ||
403
397
  Fail`expected exactly one result; got ${results}`;
@@ -482,7 +476,7 @@ export const prepareLocalOrchestrationAccountKit = (
482
476
  },
483
477
  },
484
478
  holder: {
485
- /** @type {HostOf<OrchestrationAccountI['asContinuingOffer']>} */
479
+ /** @type {HostOf<OrchestrationAccountCommon['asContinuingOffer']>} */
486
480
  asContinuingOffer() {
487
481
  // @ts-expect-error XXX invitationMakers
488
482
  // getPublicTopics resolves promptly (same run), so we don't need a watcher
@@ -504,14 +498,12 @@ export const prepareLocalOrchestrationAccountKit = (
504
498
  });
505
499
  });
506
500
  },
507
- /**
508
- * @type {HostOf<OrchestrationAccountI['getBalance']>}
509
- */
501
+ /** @type {HostOf<OrchestrationAccountCommon['getBalance']>} */
510
502
  getBalance(denomArg) {
511
503
  return asVow(() => {
512
504
  const [brand, denom] =
513
505
  typeof denomArg === 'string'
514
- ? [chainHub.getAsset(denomArg)?.brand, denomArg]
506
+ ? [chainHub.getAsset(denomArg, 'agoric')?.brand, denomArg]
515
507
  : [denomArg, chainHub.getDenom(denomArg)];
516
508
 
517
509
  if (!denom) {
@@ -537,7 +529,7 @@ export const prepareLocalOrchestrationAccountKit = (
537
529
  );
538
530
  });
539
531
  },
540
- /** @type {HostOf<OrchestrationAccountI['getBalances']>} */
532
+ /** @type {HostOf<OrchestrationAccountCommon['getBalances']>} */
541
533
  getBalances() {
542
534
  return watch(
543
535
  E(localchain).query(
@@ -549,9 +541,7 @@ export const prepareLocalOrchestrationAccountKit = (
549
541
  );
550
542
  },
551
543
 
552
- /**
553
- * @type {HostOf<OrchestrationAccountI['getPublicTopics']>}
554
- */
544
+ /** @type {HostOf<OrchestrationAccountCommon['getPublicTopics']>} */
555
545
  getPublicTopics() {
556
546
  // getStoragePath resolves promptly (same run), so we don't need a watcher
557
547
  // eslint-disable-next-line no-restricted-syntax
@@ -628,14 +618,14 @@ export const prepareLocalOrchestrationAccountKit = (
628
618
  executeTx(messages) {
629
619
  return watch(E(this.state.account).executeTx(messages));
630
620
  },
631
- /** @type {OrchestrationAccountI['getAddress']} */
621
+ /** @type {OrchestrationAccountCommon['getAddress']} */
632
622
  getAddress() {
633
623
  return this.state.address;
634
624
  },
635
625
  /**
636
626
  * XXX consider using ERTP to send if it's vbank asset
637
627
  *
638
- * @type {HostOf<OrchestrationAccountI['send']>}
628
+ * @type {HostOf<OrchestrationAccountCommon['send']>}
639
629
  */
640
630
  send(toAccount, amount) {
641
631
  return asVow(() => {
@@ -656,7 +646,7 @@ export const prepareLocalOrchestrationAccountKit = (
656
646
  /**
657
647
  * XXX consider using ERTP to send if it's vbank asset
658
648
  *
659
- * @type {HostOf<OrchestrationAccountI['sendAll']>}
649
+ * @type {HostOf<OrchestrationAccountCommon['sendAll']>}
660
650
  */
661
651
  sendAll(toAccount, amounts) {
662
652
  return asVow(() => {
@@ -682,17 +672,25 @@ export const prepareLocalOrchestrationAccountKit = (
682
672
  * timeoutTimestamp are not supplied, a default timeoutTimestamp will
683
673
  * be set for 5 minutes in the future
684
674
  * @returns {Vow<any>}
675
+ * @throws {Error} if route is not determinable, asset is not
676
+ * recognized, or the transfer is rejected (insufficient funds,
677
+ * timeout)
685
678
  */
686
679
  transfer(destination, amount, opts) {
687
680
  return asVow(() => {
688
- trace('Transferring funds from LCA over IBC');
681
+ trace('Transferring funds over IBC');
682
+ const denomAmount = coerceDenomAmount(chainHub, amount);
689
683
 
690
- const connectionInfoV = watch(
691
- chainHub.getConnectionInfo(
692
- this.state.address.chainId,
693
- destination.chainId,
694
- ),
684
+ const { forwardOpts, ...rest } = opts ?? {};
685
+
686
+ // throws if route is not determinable
687
+ const route = chainHub.makeTransferRoute(
688
+ destination,
689
+ denomAmount,
690
+ 'agoric',
691
+ forwardOpts,
695
692
  );
693
+ trace('got transfer route', route);
696
694
 
697
695
  // set a `timeoutTimestamp` if caller does not supply either `timeoutHeight` or `timeoutTimestamp`
698
696
  // TODO #9324 what's a reasonable default? currently 5 minutes
@@ -700,23 +698,22 @@ export const prepareLocalOrchestrationAccountKit = (
700
698
  opts?.timeoutTimestamp ??
701
699
  (opts?.timeoutHeight
702
700
  ? 0n
703
- : E(timestampHelper).getTimeoutTimestampNS());
701
+ : asVow(() => E(timestampHelper).getTimeoutTimestampNS()));
704
702
 
705
703
  // don't resolve the vow until the transfer is confirmed on remote
706
704
  // and reject vow if the transfer fails for any reason
707
705
  const resultV = watch(
708
- allVows([connectionInfoV, timeoutTimestampVowOrValue]),
706
+ timeoutTimestampVowOrValue,
709
707
  this.facets.transferWatcher,
710
708
  {
711
- opts,
712
- amount: coerceDenomAmount(chainHub, amount),
713
- destination,
709
+ opts: rest,
710
+ route,
714
711
  },
715
712
  );
716
713
  return resultV;
717
714
  });
718
715
  },
719
- /** @type {HostOf<OrchestrationAccountI['transferSteps']>} */
716
+ /** @type {HostOf<OrchestrationAccountCommon['transferSteps']>} */
720
717
  transferSteps(amount, msg) {
721
718
  return asVow(() => {
722
719
  console.log('transferSteps got', amount, msg);
@@ -10,10 +10,8 @@ export function prepareOrchestrator(zone: Zone, powers: {
10
10
  makeRemoteChainFacade: MakeRemoteChainFacade;
11
11
  vowTools: VowTools;
12
12
  }): () => import("@endo/exo").Guarded<{
13
- /** @type {HostOf<Orchestrator['getChain']>} */
14
13
  getChain(chainName: string): Vow<HostInterface<Chain<any>>>;
15
- /** @type {HostOf<Orchestrator['getDenomInfo']>} */
16
- getDenomInfo(denom: string): HostInterface<import("../orchestration-api.js").DenomInfo<"agoric" | "celestia" | "cosmoshub" | "dydx" | "juno" | "neutron" | "noble" | "omniflixhub" | "osmosis" | "secretnetwork" | "stargaze" | "stride" | "umee", "agoric" | "celestia" | "cosmoshub" | "dydx" | "juno" | "neutron" | "noble" | "omniflixhub" | "osmosis" | "secretnetwork" | "stargaze" | "stride" | "umee">>;
14
+ getDenomInfo(denom: string, srcChainName: "agoric" | "celestia" | "dydx" | "juno" | "neutron" | "noble" | "stride" | "umee" | "cosmoshub" | "omniflixhub" | "osmosis" | "secretnetwork" | "stargaze"): HostInterface<import("../orchestration-api.js").DenomInfo<"agoric" | "celestia" | "dydx" | "juno" | "neutron" | "noble" | "stride" | "umee" | "cosmoshub" | "omniflixhub" | "osmosis" | "secretnetwork" | "stargaze", "agoric" | "celestia" | "dydx" | "juno" | "neutron" | "noble" | "stride" | "umee" | "cosmoshub" | "omniflixhub" | "osmosis" | "secretnetwork" | "stargaze">>;
17
15
  /** @type {HostOf<Orchestrator['asAmount']>} */
18
16
  asAmount: HostOf<Orchestrator["asAmount"]>;
19
17
  }>;
@@ -54,9 +52,11 @@ declare function prepareOrchestratorKit(zone: Zone, { chainHub, makeLocalChainFa
54
52
  */
55
53
  onFulfilled(agoricChainInfo: ActualChainInfo<"agoric">): import("@endo/exo").Guarded<{
56
54
  getChainInfo(): Vow<Readonly<{
55
+ bech32Prefix?: string;
57
56
  chainId: string;
58
57
  connections?: Record<string, IBCConnectionInfo>;
59
58
  icqEnabled?: boolean;
59
+ pfmEnabled?: boolean;
60
60
  stakingTokens?: Readonly<Array<{
61
61
  denom: string;
62
62
  }>>;
@@ -87,7 +87,7 @@ declare function prepareOrchestratorKit(zone: Zone, { chainHub, makeLocalChainFa
87
87
  */
88
88
  onFulfilled([_agoricChainInfo, remoteChainInfo, connectionInfo]: [ChainInfo, ChainInfo, IBCConnectionInfo], name: string): import("@endo/exo").Guarded<{
89
89
  getChainInfo(): Vow<any>;
90
- makeAccount(): Vow<HostInterface<import("../orchestration-api.js").OrchestrationAccountI> | HostInterface<import("../orchestration-api.js").OrchestrationAccountI & import("../cosmos-api.js").LocalAccountMethods> | HostInterface<import("../orchestration-api.js").OrchestrationAccountI & import("../cosmos-api.js").StakingAccountActions & import("../cosmos-api.js").StakingAccountQueries> | HostInterface<import("../orchestration-api.js").OrchestrationAccountI & import("../cosmos-api.js").StakingAccountActions & import("../cosmos-api.js").StakingAccountQueries & import("../cosmos-api.js").LocalAccountMethods>>;
90
+ makeAccount(): Vow<HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon> | HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon & import("../cosmos-api.js").IcaAccountMethods> | HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon & import("../cosmos-api.js").LocalAccountMethods> | HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon & import("../cosmos-api.js").IcaAccountMethods & import("../cosmos-api.js").StakingAccountActions & import("../cosmos-api.js").StakingAccountQueries>>;
91
91
  query(msgs: {
92
92
  data: string;
93
93
  path: string;
@@ -113,10 +113,8 @@ declare function prepareOrchestratorKit(zone: Zone, { chainHub, makeLocalChainFa
113
113
  }>;
114
114
  };
115
115
  orchestrator: {
116
- /** @type {HostOf<Orchestrator['getChain']>} */
117
116
  getChain(chainName: string): Vow<HostInterface<Chain<any>>>;
118
- /** @type {HostOf<Orchestrator['getDenomInfo']>} */
119
- getDenomInfo(denom: string): HostInterface<import("../orchestration-api.js").DenomInfo<"agoric" | "celestia" | "cosmoshub" | "dydx" | "juno" | "neutron" | "noble" | "omniflixhub" | "osmosis" | "secretnetwork" | "stargaze" | "stride" | "umee", "agoric" | "celestia" | "cosmoshub" | "dydx" | "juno" | "neutron" | "noble" | "omniflixhub" | "osmosis" | "secretnetwork" | "stargaze" | "stride" | "umee">>;
117
+ getDenomInfo(denom: string, srcChainName: "agoric" | "celestia" | "dydx" | "juno" | "neutron" | "noble" | "stride" | "umee" | "cosmoshub" | "omniflixhub" | "osmosis" | "secretnetwork" | "stargaze"): HostInterface<import("../orchestration-api.js").DenomInfo<"agoric" | "celestia" | "dydx" | "juno" | "neutron" | "noble" | "stride" | "umee" | "cosmoshub" | "omniflixhub" | "osmosis" | "secretnetwork" | "stargaze", "agoric" | "celestia" | "dydx" | "juno" | "neutron" | "noble" | "stride" | "umee" | "cosmoshub" | "omniflixhub" | "osmosis" | "secretnetwork" | "stargaze">>;
120
118
  /** @type {HostOf<Orchestrator['asAmount']>} */
121
119
  asAmount: HostOf<Orchestrator["asAmount"]>;
122
120
  };
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["orchestrator.js"],"names":[],"mappings":"AAiCA,0BAA0B;AAC1B;;;;GAIG;AA2II,0CARI,IAAI,UACJ;IACN,QAAQ,EAAE,QAAQ,CAAC;IACnB,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,QAAQ,EAAE,QAAQ,CAAC;CACpB;IA1DI,+CAA+C;;IAsB/C,mDAAmD;;IAqBnD,+CAA+C;cAApC,OAAO,YAAY,CAAC,UAAU,CAAC,CAAC;GAoBlD;;;;;+BAMY,UAAU,CAClB,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAC1C,CAAC,cAAc,CAAC;0BA7KG,mBAAmB;8BACE,gBAAgB;0CASrB,yBAAyB;2CACxB,0BAA0B;8BARlC,aAAa;2BASuB,aAAa;mCAVzB,oBAAoB;yBAC5C,aAAa;kCASuB,aAAa;4BAVzB,oBAAoB;AAuB5E;;;;;;;;GAQG;AACH,8CARW,IAAI,0FACJ;IACN,QAAQ,EAAE,QAAQ,CAAC;IACnB,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,QAAQ,EAAE,QAAQ,CAAC;CACpB;IAwCE,2DAA2D;;QAEzD;;WAEG;qCADQ,gBAAg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CAAC,UAAU,CAAC,CAAC;;GAKlD;qCA3J2C,gBAAgB;uCAWqB,aAAa;+BAAb,aAAa"}
@@ -25,7 +25,7 @@ import {
25
25
  * @import {CosmosInterchainService} from './exo-interfaces.js';
26
26
  * @import {MakeLocalChainFacade} from './local-chain-facade.js';
27
27
  * @import {MakeRemoteChainFacade} from './remote-chain-facade.js';
28
- * @import {Chain, ChainInfo, IBCConnectionInfo, Orchestrator} from '../types.js';
28
+ * @import {Chain, ChainInfo, IBCConnectionInfo, KnownChains, Orchestrator} from '../types.js';
29
29
  */
30
30
 
31
31
  const { Vow$ } = NetworkShape; // TODO #9611
@@ -34,7 +34,7 @@ const trace = makeTracer('Orchestrator');
34
34
  /** @see {Orchestrator} */
35
35
  export const OrchestratorI = M.interface('Orchestrator', {
36
36
  getChain: M.call(M.string()).returns(Vow$(ChainInfoShape)),
37
- getDenomInfo: M.call(DenomShape).returns(DenomInfoShape),
37
+ getDenomInfo: M.call(DenomShape, M.string()).returns(DenomInfoShape),
38
38
  asAmount: M.call(DenomAmountShape).returns(AmountShape),
39
39
  });
40
40
 
@@ -138,8 +138,8 @@ const prepareOrchestratorKit = (
138
138
  });
139
139
  },
140
140
  /** @type {HostOf<Orchestrator['getDenomInfo']>} */
141
- getDenomInfo(denom) {
142
- const denomDetail = chainHub.getAsset(denom);
141
+ getDenomInfo(denom, holdingChainName) {
142
+ const denomDetail = chainHub.getAsset(denom, holdingChainName);
143
143
  if (!denomDetail) throw Fail`No denom detail for ${q(denom)}`;
144
144
  const { chainName, baseName, baseDenom, brand } = denomDetail;
145
145
  chainByName.has(chainName) ||
@@ -148,14 +148,20 @@ const prepareOrchestratorKit = (
148
148
  if (maybeChain.pending) {
149
149
  throw Fail`wait until getChain(${q(chainName)}) completes before getDenomInfo(${q(denom)})`;
150
150
  }
151
- const chain = maybeChain.value;
151
+ const chain =
152
+ /** @type {HostInterface<Chain<KnownChains[keyof KnownChains]>>} */ (
153
+ maybeChain.value
154
+ );
152
155
  chainByName.has(baseName) ||
153
156
  Fail`use getChain(${q(baseName)}) before getDenomInfo(${q(denom)})`;
154
157
  const maybeBase = chainByName.get(baseName);
155
158
  if (maybeBase.pending) {
156
159
  throw Fail`wait until getChain(${q(baseName)}) completes before getDenomInfo(${q(denom)})`;
157
160
  }
158
- const base = maybeBase.value;
161
+ const base =
162
+ /** @type {HostInterface<Chain<KnownChains[keyof KnownChains]>>} */ (
163
+ maybeBase.value
164
+ );
159
165
  return harden({ chain, base, brand, baseDenom });
160
166
  },
161
167
  /** @type {HostOf<Orchestrator['asAmount']>} */
@@ -10,14 +10,9 @@ export function preparePacketTools(zone: import("@agoric/base-zone").Zone, vowTo
10
10
  * @param {ERef<TargetApp>} monitor
11
11
  */
12
12
  monitorTransfers(monitor: ERef<TargetApp>): Promise<import("@endo/exo").Guarded<{
13
- /** @type {TargetRegistration['updateTargetApp']} */
14
13
  updateTargetApp(targetApp: ERef<TargetApp>): Promise<void>;
15
- /** @type {TargetRegistration['revoke']} */
16
14
  revoke(): Promise<void>;
17
15
  }>>;
18
- /**
19
- * @type {MatchEvent}
20
- */
21
16
  matchFirstPacket(pattern: EVow<Pattern>): Vow<{
22
17
  resolver: VowResolver<any>;
23
18
  match: Vow<any>;
@@ -27,7 +22,7 @@ export function preparePacketTools(zone: import("@agoric/base-zone").Zone, vowTo
27
22
  * @param {PacketOptions} [opts]
28
23
  * @returns {Vow<any>}
29
24
  */
30
- sendThenWaitForAck(packetSender: Remote<PacketSender>, opts?: PacketOptions | undefined): Vow<any>;
25
+ sendThenWaitForAck(packetSender: Remote<PacketSender>, opts?: PacketOptions): Vow<any>;
31
26
  }>;
32
27
  export type MatchEvent = (pattern: EVow<Pattern>) => Vow<{
33
28
  resolver: VowResolver<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"packet-tools.d.ts","sourceRoot":"","sources":["packet-tools.js"],"names":[],"mappings":"AA2DO,yCAHI,OAAO,mBAAmB,EAAE,IAAI,YAChC,QAAQ;;;;;;;;IAiFX;;O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I,GAAG,CAAC;GAwM5B;mCAlVU,KAAK,OAAO,CAAC,KACX,IAAI;IAAE,QAAQ,EAAE,YAAY,GAAG,CAAC,CAAC;IAAC,KAAK,EAAE,IAAI,GAAG,CAAC,CAAA;CAAE,CAAC;;gBAKnD,CACT,IAAI,EAAE,aAAa,KAChB,IAAI;QAAE,YAAY,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,IAAI,GAAG,CAAC,CAAA;KAAE,CAAC;;;;;;4BAU5C,IAAI,CAChB,OAAW,eAAe,EAAE,qBAAqB,EACjD,eAAmB,GAAG,kBAAkB,CACrC;0BAiUS,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC;8BA7VZ,aAAa;6BAD9C,gBAAgB;+BAGM,mCAAmC;wCAAnC,mCAAmC;0BAFxB,aAAa;iCAAb,aAAa;yBAAb,aAAa;4BAAb,aAAa"}
@@ -126,7 +126,7 @@ export const preparePacketTools = (zone, vowTools) => {
126
126
  const resolverToPattern = zone.detached().mapStore('resolverToPattern');
127
127
  return {
128
128
  lca,
129
- reg: /** @type {Remote<TargetRegistration> | null} */ (null),
129
+ reg: /** @type {Vow<TargetRegistration> | null} */ (null),
130
130
  resolverToPattern,
131
131
  upcallQueue: /** @type {any[] | null} */ (null),
132
132
  pending: 0,
@@ -327,23 +327,19 @@ export const preparePacketTools = (zone, vowTools) => {
327
327
  }
328
328
  this.state.pending = 0;
329
329
  this.state.upcallQueue = null;
330
- // FIXME when it returns undefined this causes an error:
331
- // In "unsubscribeFromTransfers" method of (PacketToolsKit utils): result: undefined "[undefined]" - Must be a promise
332
330
  return watch(this.facets.utils.unsubscribeFromTransfers());
333
331
  },
334
332
  subscribeToTransfers() {
335
333
  // Subscribe to the transfers for this account.
336
- const { lca, reg } = this.state;
337
- if (reg) {
338
- return when(reg);
334
+ const { lca, reg: cachedReg } = this.state;
335
+ if (cachedReg) {
336
+ return when(cachedReg);
339
337
  }
338
+ // Atomically update the registration.
340
339
  const { tap } = this.facets;
341
- // XXX racy; fails if subscribeToTransfers is called while this promise is in flight
342
- // e.g. 'Target "agoric1fakeLCAAddress" already registered'
343
- return when(E(lca).monitorTransfers(tap), r => {
344
- this.state.reg = r;
345
- return r;
346
- });
340
+ const reg = watch(E(lca).monitorTransfers(tap));
341
+ this.state.reg = reg;
342
+ return when(reg);
347
343
  },
348
344
  unsubscribeFromTransfers() {
349
345
  const { reg, monitor } = this.state;
@@ -23,7 +23,7 @@ declare function preparePortfolioHolderKit(zone: Zone, { asVow, when }: VowTools
23
23
  * @param {IA} [invitationArgs]
24
24
  * @returns {Promise<Invitation<unknown, IA>>}
25
25
  */
26
- Proxying<IA extends unknown[]>(chainName: string, action: string, invitationArgs?: IA | undefined): Promise<Invitation<unknown, IA>>;
26
+ Proxying<IA extends unknown[]>(chainName: string, action: string, invitationArgs?: IA): Promise<Invitation<unknown, IA>>;
27
27
  };
28
28
  holder: {
29
29
  asContinuingOffer(): import("@agoric/vow").Vow<{
@@ -38,7 +38,7 @@ declare function preparePortfolioHolderKit(zone: Zone, { asVow, when }: VowTools
38
38
  * @param {IA} [invitationArgs]
39
39
  * @returns {Promise<Invitation<unknown, IA>>}
40
40
  */
41
- Proxying<IA extends unknown[]>(chainName: string, action: string, invitationArgs?: IA | undefined): Promise<Invitation<unknown, IA>>;
41
+ Proxying<IA extends unknown[]>(chainName: string, action: string, invitationArgs?: IA): Promise<Invitation<unknown, IA>>;
42
42
  }>;
43
43
  }>;
44
44
  getPublicTopics(): import("@agoric/vow").Vow<{
@@ -53,13 +53,13 @@ declare function preparePortfolioHolderKit(zone: Zone, { asVow, when }: VowTools
53
53
  /**
54
54
  * @param {string} chainName key where the account is stored
55
55
  */
56
- getAccount(chainName: string): import("@agoric/vow").Vow<HostInterface<OrchestrationAccountI>>;
56
+ getAccount(chainName: string): import("@agoric/vow").Vow<HostInterface<OrchestrationAccountCommon>>;
57
57
  };
58
58
  }>;
59
59
  import type { OrchestrationAccount } from '@agoric/orchestration';
60
60
  import type { HostInterface } from '@agoric/async-flow';
61
61
  import type { MapStore } from '@agoric/store';
62
62
  import type { ResolvedPublicTopic } from '@agoric/zoe/src/contractSupport/topics.js';
63
- import type { OrchestrationAccountI } from '@agoric/orchestration';
63
+ import type { OrchestrationAccountCommon } from '@agoric/orchestration';
64
64
  export {};
65
65
  //# sourceMappingURL=portfolio-holder-kit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"portfolio-holder-kit.d.ts","sourceRoot":"","sources":["portfolio-holder-kit.js"],"names":[],"mappings":"AAgOO,6CANI,IAAI,YACJ,QAAQ,GACN,CACZ,GAAO,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC,KAC9D,UAAU,CAAC,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAKzE;mCAhNY;IACR,QAAQ,EAAE,SAAS,MAAM,EAAE,cAAc,qBAAqB,GAAG,CAAC,CAAC,CAAC,CAAC;IACrE,YAAY,EAAE,SAAS,MAAM,EAAE,oBAAoB,OAAO,CAAC,CAAC,CAAC;CAC9D;kCA8MU,UAAU,CAAC,OAAO,sBAAsB,CAAC;8BACzC,UAAU,CAAC,mBAAmB,CAAC;0BAvNtB,cAAc;8BAFV,aAAa;AAqBxC;;;;;;GAMG;AACH,iDAHW,IAAI,mBACJ,QAAQ;;QAkDX;;;;;;WAMG;iBALsB,EAAE,SAAb,OAAO,EAAG,aACb,MAAM,UACN,MAAM,oCAEJ,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;;;;;;;;gBAL7C;;;;;;mBAMG;yBALsB,EAAE,SAAb,OAAO,EAAG,aACb,MAAM,UACN,MAAM,oCAEJ,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;;;;;;QA+B7C;;;;WAIG;8BAHQ,MAAM,WACN,cAAc,qBAAqB,GAAG,CAAC,CAAC,eACxC,oBAAo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A2C;gDAEe,uBAAuB"}
@@ -13,7 +13,7 @@ const { fromEntries } = Object;
13
13
  * @import {VowTools} from '@agoric/vow';
14
14
  * @import {ResolvedPublicTopic} from '@agoric/zoe/src/contractSupport/topics.js';
15
15
  * @import {Zone} from '@agoric/zone';
16
- * @import {OrchestrationAccount, OrchestrationAccountI, MakeCombineInvitationMakers} from '@agoric/orchestration';
16
+ * @import {OrchestrationAccount, OrchestrationAccountCommon, MakeCombineInvitationMakers} from '@agoric/orchestration';
17
17
  */
18
18
 
19
19
  /**
@@ -1,20 +1,15 @@
1
1
  export function prepareRemoteChainFacade(zone: Zone, powers: RemoteChainFacadePowers): (remoteChainInfo: Readonly<{
2
+ bech32Prefix?: string;
2
3
  chainId: string;
3
4
  connections?: Record<string, IBCConnectionInfo>;
4
5
  icqEnabled?: boolean;
6
+ pfmEnabled?: boolean;
5
7
  stakingTokens?: Readonly<Array<{
6
8
  denom: string;
7
9
  }>>;
8
10
  }>, connectionInfo: IBCConnectionInfo) => import("@endo/exo").Guarded<{
9
- /** @type {HostOf<Chain['getChainInfo']>} */
10
11
  getChainInfo(): Vow<any>;
11
- /** @type {HostOf<Chain['makeAccount']>} */
12
- makeAccount(): Vow<import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccountI> | import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccountI & import("../cosmos-api.js").LocalAccountMethods> | import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccountI & import("../cosmos-api.js").StakingAccountActions & import("../cosmos-api.js").StakingAccountQueries> | import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccountI & import("../cosmos-api.js").StakingAccountActions & import("../cosmos-api.js").StakingAccountQueries & import("../cosmos-api.js").LocalAccountMethods>>;
13
- /**
14
- * @type {HostOf<
15
- * Chain<CosmosChainInfo & { icqEnabled: true }>['query']
16
- * >}
17
- */
12
+ makeAccount(): Vow<import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon> | import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon & import("../cosmos-api.js").IcaAccountMethods> | import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon & import("../cosmos-api.js").LocalAccountMethods> | import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon & import("../cosmos-api.js").IcaAccountMethods & import("../cosmos-api.js").StakingAccountActions & import("../cosmos-api.js").StakingAccountQueries>>;
18
13
  query(msgs: {
19
14
  data: string;
20
15
  path: string;
@@ -1 +1 @@
1
- {"version":3,"file":"remote-chain-facade.d.ts","sourceRoot":"","sources":["remote-chain-facade.js"],"names":[],"mappings":"AAqQO,+CAHI,IAAI,UACJ,uBAAuB;;;;;;;;IA7I1B,4CAA4C;;IAK5C,2CAA2C;;IA0B3C;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;GA+GV;sCA1OY;IACR,8BAA8B,EAAE,UAAU,CAC9C,wCAA8C,CACzC,CAAC;IACF,aAAa,EAAE,OAAO,uBAAuB,CAAC,CAAC;IAC/C,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;IACjC,KAAK,EAAE,OAAO,YAAY,CAAC,CAAC;IAC5B,QAAQ,EAAE,QAAQ,CAAC;CACpB;qCAIS;IACR,eAAe,EAAE,eAAe,CAAC;IACjC,cAAc,EAAE,iBAAiB,CAAC;IAClC,aAAa,EAAE,aAAa,GAAG,SAAS,CAAC;CAC1C;oCA6NU,UAAU,CAAC,OAAO,wBAAwB,CAAC;gCAC3C,UAAU,CAAC,qBAAqB,CAAC;0BA7PxB,mBAAmB;uCAS2D,aAAa;yBAJlF,aAAa;uDAGO,mCAAmC;6CAD7C,qBAAqB;4BAHtC,kBAAkB;kCADZ,cAAc;8BAEb,aAAa;qCAIwD,aAAa;mCAAb,aAAa"}
1
+ {"version":3,"file":"remote-chain-facade.d.ts","sourceRoot":"","sources":["remote-chain-facade.js"],"names":[],"mappings":"AAmQO,+CAHI,IAAI,UACJ,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAKjC;sCAxOY;IACR,8BAA8B,EAAE,UAAU,CAC9C,wCAA8C,CACzC,CAAC;IACF,aAAa,EAAE,OAAO,uBAAuB,CAAC,CAAC;IAC/C,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;IACjC,KAAK,EAAE,OAAO,YAAY,CAAC,CAAC;IAC5B,QAAQ,EAAE,QAAQ,CAAC;CACpB;qCAIS;IACR,eAAe,EAAE,eAAe,CAAC;IACjC,cAAc,EAAE,iBAAiB,CAAC;IAClC,aAAa,EAAE,aAAa,GAAG,SAAS,CAAC;CAC1C;oCA2NU,UAAU,CAAC,OAAO,wBAAwB,CAAC;gCAC3C,UAAU,CAAC,qBAAqB,CAAC;0BA3PxB,mBAAmB;uCAS2D,aAAa;yBAJlF,aAAa;uDAGO,mCAAmC;6CAD7C,qBAAqB;4BAHtC,kBAAkB;kCADZ,cAAc;8BAEb,aAAa;qCAIwD,aAAa;mCAAb,aAAa"}
@@ -125,8 +125,6 @@ const prepareRemoteChainFacadeKit = (
125
125
  makeAccount() {
126
126
  return asVow(() => {
127
127
  const { remoteChainInfo, connectionInfo } = this.state;
128
- const stakingDenom = remoteChainInfo.stakingTokens?.[0]?.denom;
129
- if (!stakingDenom) throw Fail`chain info lacks staking denom`;
130
128
 
131
129
  // icqConnection is ultimately retrieved from state, but let's
132
130
  // create a connection if it doesn't exist
@@ -1 +1 @@
1
- {"version":3,"file":"facade.d.ts","sourceRoot":"","sources":["facade.js"],"names":[],"mappings":"AAyCO,sKAZI;IACN,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,OAAO,YAAY,CAAC,CAAC;IACnC,GAAG,EAAE,GAAG,CAAC;IACT,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;IACjC,oBAAoB,EAAE,OAAO,uBAAuB,CAAC,CAAC;IACtD,eAAe,EAAE,eAAe,CAAC;IACjC,gBAAgB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oB,EAAE,OAAO,uBAAuB,CAAC,CAAC;IACtD,eAAe,EAAE,eAAe,CAAC;IACjC,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;IACzC,QAAQ,EAAE,QAAQ,CAAC;IACnB,cAAc,EAAE,cAAc,CAAC;CAChC;kBA4BW,EAAE,EACsC,EAAE,SAA1C,kBAAmB,eAAe,EAAE,CAAC,CAAE,eACzC,MAAM,WAEN,EAAE,WACF,EAAE,KACA,YAAY,CAAC,EAAE,CAAC;qBAmCM,EAAE,SAAvB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAE,EAG5B,GAAG,SAFI;QACZ,CAAK,WAAW,EAAE,MAAM,GAAG,kBAAkB,eAAe,EAAE,CAAC,CAAC,CAAC;KAC7D,YAEM,GAAG,WACH,EAAE,KACA,GAAG,CAAC,IAAI,MAAM,GAAG,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAE;EA+BxD;;;;yBAhIgC,EAAE,SAAtB,iBAAmB,IACnB,EAAE,SAAS,CACnB,GAAG,EAAE,YAAY,EACjB,GAAG,EAAE,GAAG,EACZ,GAAO,IAAI,EAAE,MAAM,EAAE,KACd,OAAO,CAAC,MAAM,EAAE,CAAC,GAClB,CAAC,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,GAClC,KAAK;kCA2HE,UAAU,CAAC,OAAO,uBAAuB,CAAC;0BA/IjC,cAAc;kCAEN,cAAc;4BAGpB,kBAAkB;6CACD,0BAA0B;qCAHrB,6CAA6C;sCACzD,wBAAwB;8BAH3B,aAAa;oCAFsB,oBAAoB;oCAApB,oBAAoB;uCAQuC,YAAY;kCAAZ,YAAY;8BARvE,oBAAoB;yBAEvD,aAAa"}
package/src/facade.js CHANGED
@@ -119,7 +119,6 @@ export const makeOrchestrationFacade = ({
119
119
  const mappedFlows = new Map(
120
120
  Object.entries(guestFns).map(([name, guestFn]) => [
121
121
  guestFn,
122
- // eslint-disable-next-line no-use-before-define
123
122
  (...args) => orcFns[name](...args),
124
123
  ]),
125
124
  );