@agoric/orchestration 0.1.1-dev-12ce494.0 → 0.1.1-dev-5d18974.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 (44) hide show
  1. package/package.json +17 -17
  2. package/src/examples/stakeBld.contract.d.ts +14 -92
  3. package/src/examples/stakeBld.contract.d.ts.map +1 -1
  4. package/src/examples/stakeIca.contract.d.ts +13 -53
  5. package/src/examples/stakeIca.contract.d.ts.map +1 -1
  6. package/src/examples/swapExample.contract.d.ts.map +1 -1
  7. package/src/examples/swapExample.contract.js +3 -3
  8. package/src/exos/cosmos-orchestration-account.d.ts +28 -77
  9. package/src/exos/cosmos-orchestration-account.d.ts.map +1 -1
  10. package/src/exos/cosmos-orchestration-account.js +23 -28
  11. package/src/exos/local-chain-facade.d.ts +27 -61
  12. package/src/exos/local-chain-facade.d.ts.map +1 -1
  13. package/src/exos/local-chain-facade.js +9 -10
  14. package/src/exos/local-orchestration-account.d.ts +23 -42
  15. package/src/exos/local-orchestration-account.d.ts.map +1 -1
  16. package/src/exos/local-orchestration-account.js +24 -10
  17. package/src/exos/orchestrator.d.ts +5 -14
  18. package/src/exos/orchestrator.d.ts.map +1 -1
  19. package/src/exos/orchestrator.js +3 -7
  20. package/src/exos/remote-chain-facade.d.ts +41 -117
  21. package/src/exos/remote-chain-facade.d.ts.map +1 -1
  22. package/src/exos/remote-chain-facade.js +17 -19
  23. package/src/facade.js +14 -14
  24. package/src/orchestration-api.d.ts +7 -7
  25. package/src/orchestration-api.d.ts.map +1 -1
  26. package/src/orchestration-api.ts +13 -7
  27. package/src/proposals/start-stakeAtom.d.ts +13 -53
  28. package/src/proposals/start-stakeAtom.d.ts.map +1 -1
  29. package/src/proposals/start-stakeBld.d.ts +14 -92
  30. package/src/proposals/start-stakeBld.d.ts.map +1 -1
  31. package/src/proposals/start-stakeOsmo.d.ts +18 -53
  32. package/src/proposals/start-stakeOsmo.d.ts.map +1 -1
  33. package/src/proposals/start-stakeOsmo.js +5 -1
  34. package/src/types.d.ts +0 -1
  35. package/src/types.d.ts.map +1 -1
  36. package/src/types.ts +0 -1
  37. package/src/utils/start-helper.d.ts +2 -40
  38. package/src/utils/start-helper.d.ts.map +1 -1
  39. package/src/utils/zoe-tools.d.ts +9 -39
  40. package/src/utils/zoe-tools.d.ts.map +1 -1
  41. package/src/utils/zoe-tools.js +21 -6
  42. package/src/internal.d.ts +0 -13
  43. package/src/internal.d.ts.map +0 -1
  44. package/src/internal.ts +0 -20
@@ -30,7 +30,7 @@ export function prepareOrchestratorKit(zone: Zone, { chainHub, localchain, makeL
30
30
  denom: string;
31
31
  }>>;
32
32
  }>>;
33
- makeAccount(): Vow<PromiseToVow<OrchestrationAccount<ChainInfo>>>;
33
+ makeAccount(): Vow<import("./local-orchestration-account.js").LocalOrchestrationAccountKit["holder"]>;
34
34
  }>;
35
35
  };
36
36
  /**
@@ -45,20 +45,13 @@ export function prepareOrchestratorKit(zone: Zone, { chainHub, localchain, makeL
45
45
  * @param {[ChainInfo, ChainInfo, IBCConnectionInfo]} chainsAndConnection
46
46
  */
47
47
  onFulfilled([_agoricChainInfo, remoteChainInfo, connectionInfo]: [ChainInfo, ChainInfo, IBCConnectionInfo]): import("@endo/exo").Guarded<{
48
- getChainInfo(): Vow<Readonly<{
49
- chainId: string;
50
- connections?: Record<string, IBCConnectionInfo>;
51
- icqEnabled?: boolean;
52
- stakingTokens?: Readonly<Array<{
53
- denom: string;
54
- }>>;
55
- }>>;
56
- makeAccount(): Vow<PromiseToVow<OrchestrationAccount<ChainInfo>>>;
48
+ getChainInfo(): Vow<any extends import("@endo/pass-style").Passable ? any : import("@agoric/async-flow").HostInterface<any>>;
49
+ makeAccount(): Vow<import("../orchestration-api.js").OrchestrationAccount<any> extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & import("../orchestration-api.js").OrchestrationAccount<any> : import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccount<any>>>;
57
50
  }>;
58
51
  };
59
52
  orchestrator: {
60
- /** @type {PromiseToVow<Orchestrator['getChain']>} */
61
- getChain(chainName: string): Vow<Chain<any>>;
53
+ /** @type {HostOf<Orchestrator['getChain']>} */
54
+ getChain(chainName: string): Vow<Chain<any> extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & Chain<any> : import("@agoric/async-flow").HostInterface<Chain<any>>>;
62
55
  makeLocalAccount(): Vow<import("@endo/exo").Guarded<{
63
56
  getAddress(): string;
64
57
  getBalance(brand: Brand<"nat">): import("@agoric/vow").PromiseVow<Amount<"nat">>;
@@ -90,7 +83,5 @@ import type { VowTools } from '@agoric/vow';
90
83
  import type { ChainInfo } from '../types.js';
91
84
  import type { IBCConnectionInfo } from '../types.js';
92
85
  import type { Vow } from '@agoric/vow';
93
- import type { OrchestrationAccount } from '../types.js';
94
- import type { PromiseToVow } from '../types.js';
95
86
  import type { Chain } from '../types.js';
96
87
  //# sourceMappingURL=orchestrator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["orchestrator.js"],"names":[],"mappings":"AAmCA,0BAA0B;AAC1B;;;;;GAKG;AAkBI,6CAfI,IAAI,+FACJ;IACV,cAAkB,EAAE,cAAc,CAAC;IACnC,QAAY,EAAE,QAAQ,CAAC;IACvB,UAAc,EAAE,OAAO,UAAU,CAAC,CAAC;IACnC,eAAmB,EAAE,eAAe,CAAC;IACrC,oBAAwB,EAAE,oBAAoB,CAAC;IAC/C,qBAAyB,EAAE,qBAAqB,CAAC;IACjD,oBAAwB,EAAE,OAAO,uBAAuB,CAAC,CAAC;IAC1D,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,YAAgB,EAAE,OAAO,YAAY,CAAC,CAAC;IACvC,QAAY,EAAE,QAAQ,CAAC;IACvB,GAAO,EAAE,GAAG,CAAC;CACV;IAmCE,2DAA2D;;QAEzD,yCAAyC;;;;;;;;;;;;;IAK3C;;;OAGG;;QAED;;;;;WAK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D,yBAAyB;2CACxB,0BAA0B;6CAHxB,gCAAgC;kCAL3C,cAAc;8BADb,aAAa;+BAUuB,aAAa;uCAAb,aAAa;yBAVjD,aAAa;2BAUuB,aAAa"}
@@ -15,7 +15,7 @@ import {
15
15
  /**
16
16
  * @import {Zone} from '@agoric/base-zone';
17
17
  * @import {ChainHub} from './chain-hub.js';
18
- * @import {AsyncFlowTools} from '@agoric/async-flow';
18
+ * @import {AsyncFlowTools, HostOf} from '@agoric/async-flow';
19
19
  * @import {Vow, VowTools} from '@agoric/vow';
20
20
  * @import {TimerService} from '@agoric/time';
21
21
  * @import {LocalChain} from '@agoric/vats/src/localchain.js';
@@ -26,7 +26,7 @@ import {
26
26
  * @import {MakeLocalOrchestrationAccountKit} from './local-orchestration-account.js';
27
27
  * @import {MakeLocalChainFacade} from './local-chain-facade.js';
28
28
  * @import {MakeRemoteChainFacade} from './remote-chain-facade.js';
29
- * @import {Chain, ChainInfo, CosmosChainInfo, IBCConnectionInfo, OrchestrationAccount, Orchestrator, PromiseToVow} from '../types.js';
29
+ * @import {Chain, ChainInfo, IBCConnectionInfo, Orchestrator} from '../types.js';
30
30
  */
31
31
 
32
32
  const { Fail } = assert;
@@ -113,18 +113,14 @@ export const prepareOrchestratorKit = (
113
113
  },
114
114
  },
115
115
  orchestrator: {
116
- /** @type {PromiseToVow<Orchestrator['getChain']>} */
116
+ /** @type {HostOf<Orchestrator['getChain']>} */
117
117
  getChain(name) {
118
118
  if (name === 'agoric') {
119
- // TODO #9449 fix types
120
- // @ts-expect-error Type 'Vow<Voidless>' is not assignable to type 'Vow<Chain<any>>'.
121
119
  return watch(
122
120
  chainHub.getChainInfo('agoric'),
123
121
  this.facets.makeLocalChainFacadeWatcher,
124
122
  );
125
123
  }
126
- // TODO #9449 fix types
127
- // @ts-expect-error Type 'Vow<Voidless>' is not assignable to type 'Vow<Chain<any>>'.
128
124
  return watch(
129
125
  chainHub.getChainsAndConnection('agoric', name),
130
126
  this.facets.makeRemoteChainFacadeWatcher,
@@ -14,16 +14,10 @@ export function prepareRemoteChainFacade(zone: Zone, powers: RemoteChainFacadePo
14
14
  }>>;
15
15
  }>, connectionInfo: IBCConnectionInfo) => import("@endo/exo").GuardedKit<{
16
16
  public: {
17
- getChainInfo(): Vow<Readonly<{
18
- chainId: string;
19
- connections?: Record<string, IBCConnectionInfo>;
20
- icqEnabled?: boolean;
21
- stakingTokens?: Readonly<Array<{
22
- denom: string;
23
- }>>;
24
- }>>;
25
- /** @returns {Vow<PromiseToVow<OrchestrationAccount<ChainInfo>>>} */
26
- makeAccount(): Vow<PromiseToVow<OrchestrationAccount<ChainInfo>>>;
17
+ /** @type {HostOf<Chain['getChainInfo']>} */
18
+ getChainInfo(): Vow<any extends import("@endo/pass-style").Passable ? any : HostInterface<any>>;
19
+ /** @type {HostOf<Chain['makeAccount']>} */
20
+ makeAccount(): Vow<OrchestrationAccount<any> extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & OrchestrationAccount<any> : HostInterface<OrchestrationAccount<any>>>;
27
21
  };
28
22
  makeAccountWatcher: {
29
23
  /**
@@ -32,42 +26,19 @@ export function prepareRemoteChainFacade(zone: Zone, powers: RemoteChainFacadePo
32
26
  * @param {IcaAccount} account
33
27
  */
34
28
  onFulfilled(account: IcaAccount): Vow<import("@endo/exo").Guarded<{
35
- asContinuingOffer(): Vow<{
36
- publicSubscribers: {
37
- account: {
38
- description: string;
39
- subscriber: globalThis.Subscriber<import("./cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
40
- storagePath: string;
41
- };
42
- };
43
- invitationMakers: import("@endo/exo").Guarded<{
44
- Delegate(validator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Promise<Invitation<Vow<undefined>, undefined>>;
45
- Redelegate(srcValidator: import("../cosmos-api.js").CosmosValidatorAddress, dstValidator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Promise<Invitation<Vow<undefined>, undefined>>;
46
- WithdrawReward(validator: import("../cosmos-api.js").CosmosValidatorAddress): Promise<Invitation<Vow<import("../orchestration-api.js").DenomAmount[]>, undefined>>;
47
- Undelegate(delegations: Omit<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js").Delegation, "delegatorAddress">[]): Promise<Invitation<Vow<undefined>, undefined>>;
48
- CloseAccount(): never;
49
- TransferAccount(): never;
50
- }>;
51
- holder: import("@endo/exo").Guarded<any>;
52
- }>;
53
- getPublicTopics(): Vow<{
54
- account: {
55
- description: string;
56
- subscriber: globalThis.Subscriber<import("./cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
57
- storagePath: string;
58
- };
59
- }>;
29
+ asContinuingOffer(): Vow<import("../utils/zoe-tools.js").ResolvedContinuingOfferResult extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & import("../utils/zoe-tools.js").ResolvedContinuingOfferResult : HostInterface<import("../utils/zoe-tools.js").ResolvedContinuingOfferResult>>;
30
+ getPublicTopics(): Vow<Record<string, import("@agoric/zoe/src/contractSupport/topics.js").ResolvedPublicTopic<unknown>> extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & Record<string, import("@agoric/zoe/src/contractSupport/topics.js").ResolvedPublicTopic<unknown>> : HostInterface<Record<string, import("@agoric/zoe/src/contractSupport/topics.js").ResolvedPublicTopic<unknown>>>>;
60
31
  getAddress(): ChainAddress;
61
- delegate(validator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<undefined>;
62
- getBalances(): Vow<never>;
63
- redelegate(srcValidator: import("../cosmos-api.js").CosmosValidatorAddress, dstValidator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<undefined>;
64
- withdrawReward(validator: import("../cosmos-api.js").CosmosValidatorAddress): Vow<import("../orchestration-api.js").DenomAmount[]>;
65
- getBalance(denom: import("../orchestration-api.js").DenomArg): Vow<import("../orchestration-api.js").DenomAmount>;
66
- send(toAccount: any, amount: any): Vow<never>;
67
- transfer(amount: any, msg: any): Vow<never>;
68
- transferSteps(amount: any, msg: any): Vow<never>;
69
- withdrawRewards(): Vow<never>;
70
- undelegate(delegations: Omit<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js").Delegation, "delegatorAddress">[]): Vow<undefined>;
32
+ delegate(validator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<void extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & void : HostInterface<void>>;
33
+ getBalances(): Vow<import("../orchestration-api.js").DenomAmount[] extends import("@endo/pass-style").Passable ? import("../orchestration-api.js").DenomAmount[] : HostInterface<import("../orchestration-api.js").DenomAmount[]>>;
34
+ redelegate(srcValidator: import("../cosmos-api.js").CosmosValidatorAddress, dstValidator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<void extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & void : HostInterface<void>>;
35
+ withdrawReward(validator: import("../cosmos-api.js").CosmosValidatorAddress): Vow<import("../orchestration-api.js").DenomAmount[] extends import("@endo/pass-style").Passable ? import("../orchestration-api.js").DenomAmount[] : HostInterface<import("../orchestration-api.js").DenomAmount[]>>;
36
+ getBalance(denom: import("../orchestration-api.js").DenomArg): Vow<import("../orchestration-api.js").DenomAmount extends import("@endo/pass-style").Passable ? import("../orchestration-api.js").DenomAmount : HostInterface<import("../orchestration-api.js").DenomAmount>>;
37
+ send(toAccount: ChainAddress, amount: import("../orchestration-api.js").AmountArg): Vow<void extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & void : HostInterface<void>>;
38
+ transfer(amount: import("../orchestration-api.js").AmountArg, destination: ChainAddress, opts?: import("../cosmos-api.js").IBCMsgTransferOptions | undefined): Vow<void extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & void : HostInterface<void>>;
39
+ transferSteps(amount: import("../orchestration-api.js").AmountArg, msg: import("../orchestration-api.js").TransferMsg): Vow<void extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & void : HostInterface<void>>;
40
+ withdrawRewards(): Vow<import("../orchestration-api.js").DenomAmount[] extends import("@endo/pass-style").Passable ? import("../orchestration-api.js").DenomAmount[] : HostInterface<import("../orchestration-api.js").DenomAmount[]>>;
41
+ undelegate(delegations: Omit<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js").Delegation, "delegatorAddress">[]): Vow<void extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & void : HostInterface<void>>;
71
42
  }>>;
72
43
  };
73
44
  getAddressWatcher: {
@@ -76,42 +47,19 @@ export function prepareRemoteChainFacade(zone: Zone, powers: RemoteChainFacadePo
76
47
  * @param {IcaAccount} account
77
48
  */
78
49
  onFulfilled(chainAddress: ChainAddress, account: IcaAccount): Vow<import("@endo/exo").Guarded<{
79
- asContinuingOffer(): Vow<{
80
- publicSubscribers: {
81
- account: {
82
- description: string;
83
- subscriber: globalThis.Subscriber<import("./cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
84
- storagePath: string;
85
- };
86
- };
87
- invitationMakers: import("@endo/exo").Guarded<{
88
- Delegate(validator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Promise<Invitation<Vow<undefined>, undefined>>;
89
- Redelegate(srcValidator: import("../cosmos-api.js").CosmosValidatorAddress, dstValidator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Promise<Invitation<Vow<undefined>, undefined>>;
90
- WithdrawReward(validator: import("../cosmos-api.js").CosmosValidatorAddress): Promise<Invitation<Vow<import("../orchestration-api.js").DenomAmount[]>, undefined>>;
91
- Undelegate(delegations: Omit<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js").Delegation, "delegatorAddress">[]): Promise<Invitation<Vow<undefined>, undefined>>;
92
- CloseAccount(): never;
93
- TransferAccount(): never;
94
- }>;
95
- holder: import("@endo/exo").Guarded<any>;
96
- }>;
97
- getPublicTopics(): Vow<{
98
- account: {
99
- description: string;
100
- subscriber: globalThis.Subscriber<import("./cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
101
- storagePath: string;
102
- };
103
- }>;
50
+ asContinuingOffer(): Vow<import("../utils/zoe-tools.js").ResolvedContinuingOfferResult extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & import("../utils/zoe-tools.js").ResolvedContinuingOfferResult : HostInterface<import("../utils/zoe-tools.js").ResolvedContinuingOfferResult>>;
51
+ getPublicTopics(): Vow<Record<string, import("@agoric/zoe/src/contractSupport/topics.js").ResolvedPublicTopic<unknown>> extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & Record<string, import("@agoric/zoe/src/contractSupport/topics.js").ResolvedPublicTopic<unknown>> : HostInterface<Record<string, import("@agoric/zoe/src/contractSupport/topics.js").ResolvedPublicTopic<unknown>>>>;
104
52
  getAddress(): ChainAddress;
105
- delegate(validator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<undefined>;
106
- getBalances(): Vow<never>;
107
- redelegate(srcValidator: import("../cosmos-api.js").CosmosValidatorAddress, dstValidator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<undefined>;
108
- withdrawReward(validator: import("../cosmos-api.js").CosmosValidatorAddress): Vow<import("../orchestration-api.js").DenomAmount[]>;
109
- getBalance(denom: import("../orchestration-api.js").DenomArg): Vow<import("../orchestration-api.js").DenomAmount>;
110
- send(toAccount: any, amount: any): Vow<never>;
111
- transfer(amount: any, msg: any): Vow<never>;
112
- transferSteps(amount: any, msg: any): Vow<never>;
113
- withdrawRewards(): Vow<never>;
114
- undelegate(delegations: Omit<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js").Delegation, "delegatorAddress">[]): Vow<undefined>;
53
+ delegate(validator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<void extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & void : HostInterface<void>>;
54
+ getBalances(): Vow<import("../orchestration-api.js").DenomAmount[] extends import("@endo/pass-style").Passable ? import("../orchestration-api.js").DenomAmount[] : HostInterface<import("../orchestration-api.js").DenomAmount[]>>;
55
+ redelegate(srcValidator: import("../cosmos-api.js").CosmosValidatorAddress, dstValidator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<void extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & void : HostInterface<void>>;
56
+ withdrawReward(validator: import("../cosmos-api.js").CosmosValidatorAddress): Vow<import("../orchestration-api.js").DenomAmount[] extends import("@endo/pass-style").Passable ? import("../orchestration-api.js").DenomAmount[] : HostInterface<import("../orchestration-api.js").DenomAmount[]>>;
57
+ getBalance(denom: import("../orchestration-api.js").DenomArg): Vow<import("../orchestration-api.js").DenomAmount extends import("@endo/pass-style").Passable ? import("../orchestration-api.js").DenomAmount : HostInterface<import("../orchestration-api.js").DenomAmount>>;
58
+ send(toAccount: ChainAddress, amount: import("../orchestration-api.js").AmountArg): Vow<void extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & void : HostInterface<void>>;
59
+ transfer(amount: import("../orchestration-api.js").AmountArg, destination: ChainAddress, opts?: import("../cosmos-api.js").IBCMsgTransferOptions | undefined): Vow<void extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & void : HostInterface<void>>;
60
+ transferSteps(amount: import("../orchestration-api.js").AmountArg, msg: import("../orchestration-api.js").TransferMsg): Vow<void extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & void : HostInterface<void>>;
61
+ withdrawRewards(): Vow<import("../orchestration-api.js").DenomAmount[] extends import("@endo/pass-style").Passable ? import("../orchestration-api.js").DenomAmount[] : HostInterface<import("../orchestration-api.js").DenomAmount[]>>;
62
+ undelegate(delegations: Omit<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js").Delegation, "delegatorAddress">[]): Vow<void extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & void : HostInterface<void>>;
115
63
  }>>;
116
64
  };
117
65
  makeChildNodeWatcher: {
@@ -126,42 +74,19 @@ export function prepareRemoteChainFacade(zone: Zone, powers: RemoteChainFacadePo
126
74
  account: IcaAccount;
127
75
  chainAddress: ChainAddress;
128
76
  }): import("@endo/exo").Guarded<{
129
- asContinuingOffer(): Vow<{
130
- publicSubscribers: {
131
- account: {
132
- description: string;
133
- subscriber: globalThis.Subscriber<import("./cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
134
- storagePath: string;
135
- };
136
- };
137
- invitationMakers: import("@endo/exo").Guarded<{
138
- Delegate(validator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Promise<Invitation<Vow<undefined>, undefined>>;
139
- Redelegate(srcValidator: import("../cosmos-api.js").CosmosValidatorAddress, dstValidator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Promise<Invitation<Vow<undefined>, undefined>>;
140
- WithdrawReward(validator: import("../cosmos-api.js").CosmosValidatorAddress): Promise<Invitation<Vow<import("../orchestration-api.js").DenomAmount[]>, undefined>>;
141
- Undelegate(delegations: Omit<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js").Delegation, "delegatorAddress">[]): Promise<Invitation<Vow<undefined>, undefined>>;
142
- CloseAccount(): never;
143
- TransferAccount(): never;
144
- }>;
145
- holder: import("@endo/exo").Guarded<any>;
146
- }>;
147
- getPublicTopics(): Vow<{
148
- account: {
149
- description: string;
150
- subscriber: globalThis.Subscriber<import("./cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
151
- storagePath: string;
152
- };
153
- }>;
77
+ asContinuingOffer(): Vow<import("../utils/zoe-tools.js").ResolvedContinuingOfferResult extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & import("../utils/zoe-tools.js").ResolvedContinuingOfferResult : HostInterface<import("../utils/zoe-tools.js").ResolvedContinuingOfferResult>>;
78
+ getPublicTopics(): Vow<Record<string, import("@agoric/zoe/src/contractSupport/topics.js").ResolvedPublicTopic<unknown>> extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & Record<string, import("@agoric/zoe/src/contractSupport/topics.js").ResolvedPublicTopic<unknown>> : HostInterface<Record<string, import("@agoric/zoe/src/contractSupport/topics.js").ResolvedPublicTopic<unknown>>>>;
154
79
  getAddress(): ChainAddress;
155
- delegate(validator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<undefined>;
156
- getBalances(): Vow<never>;
157
- redelegate(srcValidator: import("../cosmos-api.js").CosmosValidatorAddress, dstValidator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<undefined>;
158
- withdrawReward(validator: import("../cosmos-api.js").CosmosValidatorAddress): Vow<import("../orchestration-api.js").DenomAmount[]>;
159
- getBalance(denom: import("../orchestration-api.js").DenomArg): Vow<import("../orchestration-api.js").DenomAmount>;
160
- send(toAccount: any, amount: any): Vow<never>;
161
- transfer(amount: any, msg: any): Vow<never>;
162
- transferSteps(amount: any, msg: any): Vow<never>;
163
- withdrawRewards(): Vow<never>;
164
- undelegate(delegations: Omit<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js").Delegation, "delegatorAddress">[]): Vow<undefined>;
80
+ delegate(validator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<void extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & void : HostInterface<void>>;
81
+ getBalances(): Vow<import("../orchestration-api.js").DenomAmount[] extends import("@endo/pass-style").Passable ? import("../orchestration-api.js").DenomAmount[] : HostInterface<import("../orchestration-api.js").DenomAmount[]>>;
82
+ redelegate(srcValidator: import("../cosmos-api.js").CosmosValidatorAddress, dstValidator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<void extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & void : HostInterface<void>>;
83
+ withdrawReward(validator: import("../cosmos-api.js").CosmosValidatorAddress): Vow<import("../orchestration-api.js").DenomAmount[] extends import("@endo/pass-style").Passable ? import("../orchestration-api.js").DenomAmount[] : HostInterface<import("../orchestration-api.js").DenomAmount[]>>;
84
+ getBalance(denom: import("../orchestration-api.js").DenomArg): Vow<import("../orchestration-api.js").DenomAmount extends import("@endo/pass-style").Passable ? import("../orchestration-api.js").DenomAmount : HostInterface<import("../orchestration-api.js").DenomAmount>>;
85
+ send(toAccount: ChainAddress, amount: import("../orchestration-api.js").AmountArg): Vow<void extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & void : HostInterface<void>>;
86
+ transfer(amount: import("../orchestration-api.js").AmountArg, destination: ChainAddress, opts?: import("../cosmos-api.js").IBCMsgTransferOptions | undefined): Vow<void extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & void : HostInterface<void>>;
87
+ transferSteps(amount: import("../orchestration-api.js").AmountArg, msg: import("../orchestration-api.js").TransferMsg): Vow<void extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & void : HostInterface<void>>;
88
+ withdrawRewards(): Vow<import("../orchestration-api.js").DenomAmount[] extends import("@endo/pass-style").Passable ? import("../orchestration-api.js").DenomAmount[] : HostInterface<import("../orchestration-api.js").DenomAmount[]>>;
89
+ undelegate(delegations: Omit<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js").Delegation, "delegatorAddress">[]): Vow<void extends import("@endo/pass-style").Passable ? import("@endo/pass-style").Passable & void : HostInterface<void>>;
165
90
  }>;
166
91
  };
167
92
  }>>["public"];
@@ -175,10 +100,9 @@ export type RemoteChainFacadePowers = {
175
100
  export type MakeRemoteChainFacade = ReturnType<typeof prepareRemoteChainFacade>;
176
101
  import type { Zone } from '@agoric/base-zone';
177
102
  import type { IBCConnectionInfo } from '../types.js';
103
+ import type { HostInterface } from '@agoric/async-flow';
178
104
  import type { Vow } from '@agoric/vow';
179
- import type { ChainInfo } from '../types.js';
180
105
  import type { OrchestrationAccount } from '../types.js';
181
- import type { PromiseToVow } from '../types.js';
182
106
  import type { IcaAccount } from '../types.js';
183
107
  import type { ChainAddress } from '../types.js';
184
108
  import type { Remote } from '@agoric/internal';
@@ -1 +1 @@
1
- {"version":3,"file":"remote-chain-facade.d.ts","sourceRoot":"","sources":["remote-chain-facade.js"],"names":[],"mappings":"AA2KO,+CAHI,IAAI,UACJ,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;QAhF1B,oEAAoE;uBAAtD,IAAI,aAAa,qBAAqB,SAAS,CAAC,CAAC,CAAC;;;QAuBhE;;;;WAIG;6BADQ,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAWrB;;;WAGG;kCAFQ,YAAY,WACZ,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAWrB;;;;;;WAMG;+BALQ,OAAO,WAAW,CAAC,6BACnB;YACV,OAAW,EAAE,UAAU,CAAC;YACxB,YAAgB,EAAE,YAAY,CAAC;SAC5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8BX;sCArJY;IACZ,8BAAkC,EAAE,UAAU,CAC9C,wCAA8C,CACzC,CAAC;IACN,aAAiB,EAAE,OAAO,uBAAuB,CAAC,CAAC;IACnD,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,KAAS,EAAE,OAAO,YAAY,CAAC,CAAC;IAChC,QAAY,EAAE,QAAQ,CAAC;CACpB;oCAgJU,UAAU,CAAC,OAAO,wBAAwB,CAAC;0BAxKlC,mBAAmB;uCAM2F,aAAa;yBAHlH,aAAa;+BAGwF,aAAa;0CAAb,aAAa;kCAAb,aAAa;gCAAb,aAAa;kCAAb,aAAa;4BAJzH,kBAAkB;uDAGS,mCAAmC;6CAD7C,gCAAgC;kCAH3C,cAAc;8BAEb,aAAa"}
1
+ {"version":3,"file":"remote-chain-facade.d.ts","sourceRoot":"","sources":["remote-chain-facade.js"],"names":[],"mappings":"AAyKO,+CAHI,IAAI,UACJ,uBAAuB;;;;;;;;;;;;;;;;QAjF1B,4CAA4C;;QAK5C,2CAA2C;;;;QAmB3C;;;;WAIG;6BADQ,UAAU;;;;;;;;;;;;;;;;;QAWrB;;;WAGG;kCAFQ,YAAY,WACZ,UAAU;;;;;;;;;;;;;;;;;QAWrB;;;;;;WAMG;+BALQ,OAAO,WAAW,CAAC,6BACnB;YACV,OAAW,EAAE,UAAU,CAAC;YACxB,YAAgB,EAAE,YAAY,CAAC;SAC5B;;;;;;;;;;;;;;;;cA8BX;sCAlJY;IACZ,8BAAkC,EAAE,UAAU,CAC9C,wCAA8C,CACzC,CAAC;IACN,aAAiB,EAAE,OAAO,uBAAuB,CAAC,CAAC;IACnD,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,KAAS,EAAE,OAAO,YAAY,CAAC,CAAC;IAChC,QAAY,EAAE,QAAQ,CAAC;CACpB;oCA6IU,UAAU,CAAC,OAAO,wBAAwB,CAAC;0BArKlC,mBAAmB;uCAMoF,aAAa;mCAPnG,oBAAoB;yBAI5B,aAAa;0CAGiF,aAAa;gCAAb,aAAa;kCAAb,aAAa;4BAJlH,kBAAkB;uDAGS,mCAAmC;6CAD7C,gCAAgC;kCAH3C,cAAc;8BAEb,aAAa"}
@@ -7,13 +7,14 @@ import { VowShape } from '@agoric/vow';
7
7
  import { ChainAddressShape, ChainFacadeI } from '../typeGuards.js';
8
8
 
9
9
  /**
10
+ * @import {HostInterface, HostOf} from '@agoric/async-flow';
10
11
  * @import {Zone} from '@agoric/base-zone';
11
12
  * @import {TimerService} from '@agoric/time';
12
13
  * @import {Remote} from '@agoric/internal';
13
14
  * @import {Vow, VowTools} from '@agoric/vow';
14
15
  * @import {CosmosInterchainService} from './cosmos-interchain-service.js';
15
16
  * @import {prepareCosmosOrchestrationAccount} from './cosmos-orchestration-account.js';
16
- * @import {ChainInfo, CosmosChainInfo, IBCConnectionInfo, OrchestrationAccount, ChainAddress, IcaAccount, PromiseToVow, Denom} from '../types.js';
17
+ * @import {ChainInfo, CosmosChainInfo, IBCConnectionInfo, OrchestrationAccount, ChainAddress, IcaAccount, Denom, Chain} from '../types.js';
17
18
  */
18
19
 
19
20
  const { Fail } = assert;
@@ -83,30 +84,27 @@ const prepareRemoteChainFacadeKit = (
83
84
  },
84
85
  {
85
86
  public: {
87
+ /** @type {HostOf<Chain['getChainInfo']>} */
86
88
  getChainInfo() {
87
89
  return watch(this.state.remoteChainInfo);
88
90
  },
89
91
 
90
- /** @returns {Vow<PromiseToVow<OrchestrationAccount<ChainInfo>>>} */
92
+ /** @type {HostOf<Chain['makeAccount']>} */
91
93
  makeAccount() {
92
- // TODO #9449 fix types
93
- // @ts-expect-error Type 'Vow<Voidless>' is not assignable to type 'Vow<OrchestrationAccountI>'
94
- return asVow(() => {
95
- const { remoteChainInfo, connectionInfo } = this.state;
96
- const stakingDenom = remoteChainInfo.stakingTokens?.[0]?.denom;
97
- if (!stakingDenom) {
98
- throw Fail`chain info lacks staking denom`;
99
- }
94
+ const { remoteChainInfo, connectionInfo } = this.state;
95
+ const stakingDenom = remoteChainInfo.stakingTokens?.[0]?.denom;
96
+ if (!stakingDenom) {
97
+ return asVow(Fail`chain info lacks staking denom`);
98
+ }
100
99
 
101
- return watch(
102
- E(orchestration).makeAccount(
103
- remoteChainInfo.chainId,
104
- connectionInfo.id,
105
- connectionInfo.counterparty.connection_id,
106
- ),
107
- this.facets.makeAccountWatcher,
108
- );
109
- });
100
+ return watch(
101
+ E(orchestration).makeAccount(
102
+ remoteChainInfo.chainId,
103
+ connectionInfo.id,
104
+ connectionInfo.counterparty.connection_id,
105
+ ),
106
+ this.facets.makeAccountWatcher,
107
+ );
110
108
  },
111
109
  },
112
110
  makeAccountWatcher: {
package/src/facade.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /** @file Orchestration facade */
2
2
 
3
- import { Fail } from '@endo/errors';
3
+ import { assertAllDefined } from '@agoric/internal';
4
4
 
5
5
  /**
6
6
  * @import {AsyncFlowTools} from '@agoric/async-flow';
@@ -38,17 +38,17 @@ export const makeOrchestrationFacade = ({
38
38
  vowTools,
39
39
  asyncFlowTools,
40
40
  }) => {
41
- (zone &&
42
- timerService &&
43
- zcf &&
44
- storageNode &&
45
- orchestrationService &&
46
- // @ts-expect-error type says defined but double check
47
- makeRecorderKit &&
48
- // @ts-expect-error type says defined but double check
49
- makeOrchestrator &&
50
- asyncFlowTools) ||
51
- Fail`params missing`;
41
+ assertAllDefined({
42
+ zone,
43
+ timerService,
44
+ zcf,
45
+ storageNode,
46
+ orchestrationService,
47
+ makeRecorderKit,
48
+ makeOrchestrator,
49
+ vowTools,
50
+ asyncFlowTools,
51
+ });
52
52
 
53
53
  const { prepareEndowment, asyncFlow, adminAsyncFlow } = asyncFlowTools;
54
54
 
@@ -109,11 +109,11 @@ export const makeOrchestrationFacade = ({
109
109
  ]),
110
110
  );
111
111
 
112
- return {
112
+ return harden({
113
113
  adminAsyncFlow,
114
114
  orchestrate,
115
115
  orchestrateAll,
116
- };
116
+ });
117
117
  };
118
118
  harden(makeOrchestrationFacade);
119
119
  /** @typedef {ReturnType<typeof makeOrchestrationFacade>} OrchestrationFacade */
@@ -4,11 +4,11 @@
4
4
  * - should remain relatively stable.
5
5
  */
6
6
  import type { Amount, Brand, NatAmount } from '@agoric/ertp/src/types.js';
7
- import type { LocalChainAccount } from '@agoric/vats/src/localchain.js';
8
7
  import type { Timestamp } from '@agoric/time';
9
- import type { ContinuingOfferResult } from '@agoric/smart-wallet/src/types.js';
10
- import type { TopicsRecord } from '@agoric/zoe/src/contractSupport/topics.js';
11
- import type { ChainInfo, CosmosChainAccountMethods, CosmosChainInfo, IBCMsgTransferOptions, KnownChains } from './types.js';
8
+ import type { LocalChainAccount } from '@agoric/vats/src/localchain.js';
9
+ import type { ResolvedPublicTopic } from '@agoric/zoe/src/contractSupport/topics.js';
10
+ import type { ChainInfo, CosmosChainAccountMethods, CosmosChainInfo, IBCMsgTransferOptions, KnownChains, LocalAccountMethods } from './types.js';
11
+ import type { ResolvedContinuingOfferResult } from './utils/zoe-tools.js';
12
12
  /**
13
13
  * A denom that designates a path to a token type on some blockchain.
14
14
  *
@@ -45,7 +45,7 @@ export type ChainAddress = {
45
45
  value: string;
46
46
  encoding: 'bech32' | 'ethereum';
47
47
  };
48
- export type OrchestrationAccount<CI extends ChainInfo> = OrchestrationAccountI & (CI extends CosmosChainInfo ? CosmosChainAccountMethods<CI> : never);
48
+ export type OrchestrationAccount<CI extends ChainInfo> = OrchestrationAccountI & (CI extends CosmosChainInfo ? CI['chainId'] extends `agoric${string}` ? CosmosChainAccountMethods<CI> & LocalAccountMethods : CosmosChainAccountMethods<CI> : {});
49
49
  /**
50
50
  * An object for access the core functions of a remote chain.
51
51
  *
@@ -132,14 +132,14 @@ export interface OrchestrationAccountI {
132
132
  * holder's smart wallet so they can continue interacting with the account
133
133
  * and read account state in vstorage if published.
134
134
  */
135
- asContinuingOffer: () => Promise<ContinuingOfferResult>;
135
+ asContinuingOffer: () => Promise<ResolvedContinuingOfferResult>;
136
136
  /**
137
137
  * Public topics are a map to different vstorage paths and subscribers that
138
138
  * can be shared with on or offchain clients.
139
139
  * When returned as part of a continuing invitation, it will appear
140
140
  * in the {@link CurrentWalletRecord} in vstorage.
141
141
  */
142
- getPublicTopics: () => Promise<TopicsRecord>;
142
+ getPublicTopics: () => Promise<Record<string, ResolvedPublicTopic<unknown>>>;
143
143
  }
144
144
  /**
145
145
  * Internal structure for TransferMsgs.
@@ -1 +1 @@
1
- {"version":3,"file":"orchestration-api.d.ts","sourceRoot":"","sources":["orchestration-api.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS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OAAO,CAAC,6BAA6B,CAAC,CAAC;IAEhE;;;;;OAKG;IACH,eAAe,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CAC9E;AAED;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,SAAS,EAAE,YAAY,CAAC;IACxB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,YAAY,CAAA;CAAE,CAAC;AAC3E,MAAM,MAAM,SAAS,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAChE,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -5,18 +5,19 @@
5
5
  * - should remain relatively stable.
6
6
  */
7
7
  import type { Amount, Brand, NatAmount } from '@agoric/ertp/src/types.js';
8
- import type { LocalChainAccount } from '@agoric/vats/src/localchain.js';
9
- import type { Timestamp } from '@agoric/time';
10
- import type { ContinuingOfferResult } from '@agoric/smart-wallet/src/types.js';
11
- import type { TopicsRecord } from '@agoric/zoe/src/contractSupport/topics.js';
12
8
  import type { CurrentWalletRecord } from '@agoric/smart-wallet/src/smartWallet.js';
9
+ import type { Timestamp } from '@agoric/time';
10
+ import type { LocalChainAccount } from '@agoric/vats/src/localchain.js';
11
+ import type { ResolvedPublicTopic } from '@agoric/zoe/src/contractSupport/topics.js';
13
12
  import type {
14
13
  ChainInfo,
15
14
  CosmosChainAccountMethods,
16
15
  CosmosChainInfo,
17
16
  IBCMsgTransferOptions,
18
17
  KnownChains,
18
+ LocalAccountMethods,
19
19
  } from './types.js';
20
+ import type { ResolvedContinuingOfferResult } from './utils/zoe-tools.js';
20
21
 
21
22
  /**
22
23
  * A denom that designates a path to a token type on some blockchain.
@@ -62,7 +63,11 @@ export type ChainAddress = {
62
63
  };
63
64
 
64
65
  export type OrchestrationAccount<CI extends ChainInfo> = OrchestrationAccountI &
65
- (CI extends CosmosChainInfo ? CosmosChainAccountMethods<CI> : never);
66
+ (CI extends CosmosChainInfo
67
+ ? CI['chainId'] extends `agoric${string}`
68
+ ? CosmosChainAccountMethods<CI> & LocalAccountMethods
69
+ : CosmosChainAccountMethods<CI>
70
+ : {});
66
71
 
67
72
  /**
68
73
  * An object for access the core functions of a remote chain.
@@ -176,14 +181,15 @@ export interface OrchestrationAccountI {
176
181
  * holder's smart wallet so they can continue interacting with the account
177
182
  * and read account state in vstorage if published.
178
183
  */
179
- asContinuingOffer: () => Promise<ContinuingOfferResult>;
184
+ asContinuingOffer: () => Promise<ResolvedContinuingOfferResult>;
185
+
180
186
  /**
181
187
  * Public topics are a map to different vstorage paths and subscribers that
182
188
  * can be shared with on or offchain clients.
183
189
  * When returned as part of a continuing invitation, it will appear
184
190
  * in the {@link CurrentWalletRecord} in vstorage.
185
191
  */
186
- getPublicTopics: () => Promise<TopicsRecord>;
192
+ getPublicTopics: () => Promise<Record<string, ResolvedPublicTopic<unknown>>>;
187
193
  }
188
194
 
189
195
  /**