@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.
- package/package.json +17 -17
- package/src/examples/stakeBld.contract.d.ts +14 -92
- package/src/examples/stakeBld.contract.d.ts.map +1 -1
- package/src/examples/stakeIca.contract.d.ts +13 -53
- package/src/examples/stakeIca.contract.d.ts.map +1 -1
- package/src/examples/swapExample.contract.d.ts.map +1 -1
- package/src/examples/swapExample.contract.js +3 -3
- package/src/exos/cosmos-orchestration-account.d.ts +28 -77
- package/src/exos/cosmos-orchestration-account.d.ts.map +1 -1
- package/src/exos/cosmos-orchestration-account.js +23 -28
- package/src/exos/local-chain-facade.d.ts +27 -61
- package/src/exos/local-chain-facade.d.ts.map +1 -1
- package/src/exos/local-chain-facade.js +9 -10
- package/src/exos/local-orchestration-account.d.ts +23 -42
- package/src/exos/local-orchestration-account.d.ts.map +1 -1
- package/src/exos/local-orchestration-account.js +24 -10
- package/src/exos/orchestrator.d.ts +5 -14
- package/src/exos/orchestrator.d.ts.map +1 -1
- package/src/exos/orchestrator.js +3 -7
- package/src/exos/remote-chain-facade.d.ts +41 -117
- package/src/exos/remote-chain-facade.d.ts.map +1 -1
- package/src/exos/remote-chain-facade.js +17 -19
- package/src/facade.js +14 -14
- package/src/orchestration-api.d.ts +7 -7
- package/src/orchestration-api.d.ts.map +1 -1
- package/src/orchestration-api.ts +13 -7
- package/src/proposals/start-stakeAtom.d.ts +13 -53
- package/src/proposals/start-stakeAtom.d.ts.map +1 -1
- package/src/proposals/start-stakeBld.d.ts +14 -92
- package/src/proposals/start-stakeBld.d.ts.map +1 -1
- package/src/proposals/start-stakeOsmo.d.ts +18 -53
- package/src/proposals/start-stakeOsmo.d.ts.map +1 -1
- package/src/proposals/start-stakeOsmo.js +5 -1
- package/src/types.d.ts +0 -1
- package/src/types.d.ts.map +1 -1
- package/src/types.ts +0 -1
- package/src/utils/start-helper.d.ts +2 -40
- package/src/utils/start-helper.d.ts.map +1 -1
- package/src/utils/zoe-tools.d.ts +9 -39
- package/src/utils/zoe-tools.d.ts.map +1 -1
- package/src/utils/zoe-tools.js +21 -6
- package/src/internal.d.ts +0 -13
- package/src/internal.d.ts.map +0 -1
- 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<
|
|
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<
|
|
49
|
-
|
|
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 {
|
|
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;;;;;WAKG
|
|
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;;;;;WAKG;;;;;;;QAMH,+CAA+C;;;;;;;;;;;;;GAoBpD;;;;;+BAMU,UAAU,CACtB,UAAc,CAAC,OAAO,sBAAsB,CAAC,CAC1C,CAAC,cAAc,CAAC;0BAhIG,mBAAmB;oCAED,oBAAoB;8BADlC,gBAAgB;gCAId,gCAAgC;4BAEpC,kBAAkB;qCADI,6CAA6C;0CAKrD,yBAAyB;2CACxB,0BAA0B;6CAHxB,gCAAgC;kCAL3C,cAAc;8BADb,aAAa;+BAUuB,aAAa;uCAAb,aAAa;yBAVjD,aAAa;2BAUuB,aAAa"}
|
package/src/exos/orchestrator.js
CHANGED
|
@@ -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,
|
|
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 {
|
|
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
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
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<
|
|
62
|
-
getBalances(): Vow<
|
|
63
|
-
redelegate(srcValidator: import("../cosmos-api.js").CosmosValidatorAddress, dstValidator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<
|
|
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:
|
|
67
|
-
transfer(amount:
|
|
68
|
-
transferSteps(amount:
|
|
69
|
-
withdrawRewards(): Vow<
|
|
70
|
-
undelegate(delegations: Omit<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js").Delegation, "delegatorAddress">[]): Vow<
|
|
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
|
-
|
|
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<
|
|
106
|
-
getBalances(): Vow<
|
|
107
|
-
redelegate(srcValidator: import("../cosmos-api.js").CosmosValidatorAddress, dstValidator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<
|
|
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:
|
|
111
|
-
transfer(amount:
|
|
112
|
-
transferSteps(amount:
|
|
113
|
-
withdrawRewards(): Vow<
|
|
114
|
-
undelegate(delegations: Omit<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js").Delegation, "delegatorAddress">[]): Vow<
|
|
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
|
-
|
|
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<
|
|
156
|
-
getBalances(): Vow<
|
|
157
|
-
redelegate(srcValidator: import("../cosmos-api.js").CosmosValidatorAddress, dstValidator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<
|
|
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:
|
|
161
|
-
transfer(amount:
|
|
162
|
-
transferSteps(amount:
|
|
163
|
-
withdrawRewards(): Vow<
|
|
164
|
-
undelegate(delegations: Omit<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js").Delegation, "delegatorAddress">[]): Vow<
|
|
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":"
|
|
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,
|
|
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
|
-
/** @
|
|
92
|
+
/** @type {HostOf<Chain['makeAccount']>} */
|
|
91
93
|
makeAccount() {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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 {
|
|
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
|
-
(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
makeRecorderKit
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
asyncFlowTools
|
|
51
|
-
|
|
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 {
|
|
10
|
-
import type {
|
|
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> :
|
|
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<
|
|
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<
|
|
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;
|
|
1
|
+
{"version":3,"file":"orchestration-api.d.ts","sourceRoot":"","sources":["orchestration-api.ts"],"names":[],"mappings":"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"}
|
package/src/orchestration-api.ts
CHANGED
|
@@ -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
|
|
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<
|
|
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<
|
|
192
|
+
getPublicTopics: () => Promise<Record<string, ResolvedPublicTopic<unknown>>>;
|
|
187
193
|
}
|
|
188
194
|
|
|
189
195
|
/**
|