@agoric/orchestration 0.1.1-dev-37ec151.0 → 0.1.1-dev-989aa19.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 +16 -16
- package/src/chain-info.js +1 -1
- package/src/examples/sendAnywhere.contract.d.ts.map +1 -1
- package/src/examples/sendAnywhere.contract.js +3 -2
- package/src/examples/stakeBld.contract.d.ts +23 -11
- package/src/examples/stakeBld.contract.d.ts.map +1 -1
- package/src/examples/stakeBld.contract.js +9 -5
- package/src/examples/stakeIca.contract.d.ts +3 -3
- package/src/examples/stakeIca.contract.js +1 -1
- package/src/examples/swapExample.contract.d.ts.map +1 -1
- package/src/examples/swapExample.contract.js +6 -1
- package/src/exos/{chainAccountKit.d.ts → chain-account-kit.d.ts} +1 -1
- package/src/exos/chain-account-kit.d.ts.map +1 -0
- package/src/exos/{chainAccountKit.js → chain-account-kit.js} +2 -2
- package/src/exos/{cosmosOrchestrationAccount.d.ts → cosmos-orchestration-account.d.ts} +1 -1
- package/src/exos/cosmos-orchestration-account.d.ts.map +1 -0
- package/src/exos/{icqConnectionKit.d.ts → icq-connection-kit.d.ts} +1 -1
- package/src/exos/icq-connection-kit.d.ts.map +1 -0
- package/src/exos/local-chain-facade.d.ts +105 -0
- package/src/exos/local-chain-facade.d.ts.map +1 -0
- package/src/exos/local-chain-facade.js +67 -0
- package/src/exos/{local-chain-account-kit.d.ts → local-orchestration-account.d.ts} +33 -64
- package/src/exos/{local-chain-account-kit.d.ts.map → local-orchestration-account.d.ts.map} +1 -1
- package/src/exos/{local-chain-account-kit.js → local-orchestration-account.js} +48 -31
- package/src/exos/orchestrator.d.ts +39 -54
- package/src/exos/orchestrator.d.ts.map +1 -1
- package/src/exos/orchestrator.js +16 -24
- package/src/exos/remote-chain-facade.d.ts +3 -7
- package/src/exos/remote-chain-facade.d.ts.map +1 -1
- package/src/exos/remote-chain-facade.js +8 -18
- package/src/facade.d.ts +85 -29
- package/src/facade.d.ts.map +1 -1
- package/src/facade.js +12 -85
- package/src/proposals/start-stakeAtom.d.ts +3 -3
- package/src/proposals/start-stakeAtom.d.ts.map +1 -1
- package/src/proposals/start-stakeBld.d.ts +23 -11
- package/src/proposals/start-stakeBld.d.ts.map +1 -1
- package/src/proposals/start-stakeOsmo.d.ts +3 -3
- package/src/proposals/start-stakeOsmo.d.ts.map +1 -1
- package/src/service.js +3 -3
- package/src/typeGuards.d.ts +14 -0
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +15 -0
- package/src/types.d.ts +2 -2
- package/src/types.d.ts.map +1 -1
- package/src/types.ts +2 -2
- package/src/utils/chainHub.d.ts +15 -3
- package/src/utils/chainHub.d.ts.map +1 -1
- package/src/utils/chainHub.js +1 -1
- package/src/utils/orc.js +2 -2
- package/src/utils/orchestrationAccount.js +3 -4
- package/src/utils/start-helper.d.ts +9 -0
- package/src/utils/start-helper.d.ts.map +1 -1
- package/src/utils/start-helper.js +16 -5
- package/src/exos/chainAccountKit.d.ts.map +0 -1
- package/src/exos/cosmosOrchestrationAccount.d.ts.map +0 -1
- package/src/exos/icqConnectionKit.d.ts.map +0 -1
- /package/src/exos/{cosmosOrchestrationAccount.js → cosmos-orchestration-account.js} +0 -0
- /package/src/exos/{icqConnectionKit.js → icq-connection-kit.js} +0 -0
package/src/exos/orchestrator.js
CHANGED
|
@@ -3,39 +3,33 @@ import { AmountShape } from '@agoric/ertp';
|
|
|
3
3
|
import { makeTracer } from '@agoric/internal';
|
|
4
4
|
import { V } from '@agoric/vow/vat.js';
|
|
5
5
|
import { M } from '@endo/patterns';
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import {
|
|
7
|
+
ChainInfoShape,
|
|
8
|
+
LocalChainAccountShape,
|
|
9
|
+
DenomShape,
|
|
10
|
+
BrandInfoShape,
|
|
11
|
+
DenomAmountShape,
|
|
12
|
+
} from '../typeGuards.js';
|
|
8
13
|
|
|
9
14
|
/**
|
|
10
15
|
* @import {Zone} from '@agoric/base-zone';
|
|
11
16
|
* @import {ChainHub} from '../utils/chainHub.js';
|
|
12
|
-
* @import {Connection, Port} from '@agoric/network';
|
|
13
|
-
* @import {AnyJson} from '@agoric/cosmic-proto';
|
|
14
|
-
* @import {TxBody} from '@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js';
|
|
15
|
-
* @import {LocalIbcAddress, RemoteIbcAddress} from '@agoric/vats/tools/ibc-utils.js';
|
|
16
17
|
* @import {AsyncFlowTools} from '@agoric/async-flow';
|
|
17
18
|
* @import {Vow} from '@agoric/vow';
|
|
18
19
|
* @import {TimerService} from '@agoric/time';
|
|
19
|
-
* @import {IBCConnectionID} from '@agoric/vats';
|
|
20
20
|
* @import {LocalChain} from '@agoric/vats/src/localchain.js';
|
|
21
21
|
* @import {RecorderKit, MakeRecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js'.
|
|
22
22
|
* @import {Remote} from '@agoric/internal';
|
|
23
23
|
* @import {OrchestrationService} from '../service.js';
|
|
24
|
-
* @import {
|
|
24
|
+
* @import {MakeLocalOrchestrationAccountKit} from './local-orchestration-account.js';
|
|
25
|
+
* @import {MakeLocalChainFacade} from './local-chain-facade.js';
|
|
26
|
+
* @import {MakeRemoteChainFacade} from './remote-chain-facade.js';
|
|
25
27
|
* @import {Chain, ChainInfo, CosmosChainInfo, IBCConnectionInfo, OrchestrationAccount, Orchestrator} from '../types.js';
|
|
26
28
|
*/
|
|
27
29
|
|
|
28
30
|
const { Fail } = assert;
|
|
29
31
|
const trace = makeTracer('Orchestrator');
|
|
30
32
|
|
|
31
|
-
// TODO more validation
|
|
32
|
-
export const ChainInfoShape = M.any();
|
|
33
|
-
export const LocalChainAccountShape = M.remotable('LocalChainAccount');
|
|
34
|
-
export const DenomShape = M.string();
|
|
35
|
-
export const BrandInfoShape = M.any();
|
|
36
|
-
|
|
37
|
-
export const DenomAmountShape = { denom: DenomShape, value: M.bigint() };
|
|
38
|
-
|
|
39
33
|
/** @see {Orchestrator} */
|
|
40
34
|
export const OrchestratorI = M.interface('Orchestrator', {
|
|
41
35
|
getChain: M.callWhen(M.string()).returns(ChainInfoShape),
|
|
@@ -50,9 +44,9 @@ export const OrchestratorI = M.interface('Orchestrator', {
|
|
|
50
44
|
* asyncFlowTools: AsyncFlowTools;
|
|
51
45
|
* chainHub: ChainHub;
|
|
52
46
|
* localchain: Remote<LocalChain>;
|
|
53
|
-
* makeLocalChainAccountKit: MakeLocalChainAccountKit;
|
|
54
47
|
* makeRecorderKit: MakeRecorderKit;
|
|
55
|
-
*
|
|
48
|
+
* makeLocalChainFacade: MakeLocalChainFacade;
|
|
49
|
+
* makeRemoteChainFacade: MakeRemoteChainFacade;
|
|
56
50
|
* orchestrationService: Remote<OrchestrationService>;
|
|
57
51
|
* storageNode: Remote<StorageNode>;
|
|
58
52
|
* timerService: Remote<TimerService>;
|
|
@@ -61,7 +55,7 @@ export const OrchestratorI = M.interface('Orchestrator', {
|
|
|
61
55
|
*/
|
|
62
56
|
export const prepareOrchestrator = (
|
|
63
57
|
zone,
|
|
64
|
-
{ chainHub, localchain,
|
|
58
|
+
{ chainHub, localchain, makeLocalChainFacade, makeRemoteChainFacade },
|
|
65
59
|
) =>
|
|
66
60
|
zone.exoClass(
|
|
67
61
|
'Orchestrator',
|
|
@@ -76,11 +70,8 @@ export const prepareOrchestrator = (
|
|
|
76
70
|
const agoricChainInfo = await chainHub.getChainInfo('agoric');
|
|
77
71
|
|
|
78
72
|
if (name === 'agoric') {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
makeLocalChainAccountKit,
|
|
82
|
-
agoricChainInfo,
|
|
83
|
-
);
|
|
73
|
+
// @ts-expect-error XXX chainInfo generic
|
|
74
|
+
return makeLocalChainFacade(agoricChainInfo);
|
|
84
75
|
}
|
|
85
76
|
|
|
86
77
|
const remoteChainInfo = await chainHub.getChainInfo(name);
|
|
@@ -89,6 +80,7 @@ export const prepareOrchestrator = (
|
|
|
89
80
|
remoteChainInfo.chainId,
|
|
90
81
|
);
|
|
91
82
|
|
|
83
|
+
// @ts-expect-error XXX chainInfo generic
|
|
92
84
|
return makeRemoteChainFacade(remoteChainInfo, connectionInfo);
|
|
93
85
|
},
|
|
94
86
|
makeLocalAccount() {
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/** @see {Chain} */
|
|
2
|
-
export const RemoteChainFacadeI: import("@endo/patterns").InterfaceGuard<{
|
|
3
|
-
getChainInfo: import("@endo/patterns").MethodGuard;
|
|
4
|
-
makeAccount: import("@endo/patterns").MethodGuard;
|
|
5
|
-
}>;
|
|
6
1
|
export function prepareRemoteChainFacade(zone: Zone, { makeCosmosOrchestrationAccount, orchestration, storageNode, timer }: {
|
|
7
2
|
makeCosmosOrchestrationAccount: (chainAddress: import("../orchestration-api.js").ChainAddress, bondDenom: string, io: {
|
|
8
3
|
account: import("../cosmos-api.js").IcaAccount;
|
|
@@ -18,7 +13,7 @@ export function prepareRemoteChainFacade(zone: Zone, { makeCosmosOrchestrationAc
|
|
|
18
13
|
publicSubscribers: {
|
|
19
14
|
account: {
|
|
20
15
|
description: string;
|
|
21
|
-
subscriber: globalThis.Subscriber<import("./
|
|
16
|
+
subscriber: globalThis.Subscriber<import("./cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
|
|
22
17
|
storagePath: Promise<string>;
|
|
23
18
|
};
|
|
24
19
|
};
|
|
@@ -35,7 +30,7 @@ export function prepareRemoteChainFacade(zone: Zone, { makeCosmosOrchestrationAc
|
|
|
35
30
|
getPublicTopics(): {
|
|
36
31
|
account: {
|
|
37
32
|
description: string;
|
|
38
|
-
subscriber: globalThis.Subscriber<import("./
|
|
33
|
+
subscriber: globalThis.Subscriber<import("./cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
|
|
39
34
|
storagePath: Promise<string>;
|
|
40
35
|
};
|
|
41
36
|
};
|
|
@@ -81,6 +76,7 @@ export function prepareRemoteChainFacade(zone: Zone, { makeCosmosOrchestrationAc
|
|
|
81
76
|
/** @returns {Promise<OrchestrationAccount<ChainInfo>>} */
|
|
82
77
|
makeAccount(): Promise<import("../orchestration-api.js").OrchestrationAccountI>;
|
|
83
78
|
}>;
|
|
79
|
+
export type MakeRemoteChainFacade = ReturnType<typeof prepareRemoteChainFacade>;
|
|
84
80
|
import type { Zone } from '@agoric/base-zone';
|
|
85
81
|
import type { Remote } from '@agoric/internal';
|
|
86
82
|
import type { TimerService } from '@agoric/time';
|
|
@@ -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":"AAgCO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAsBD,0DAA0D;;GAwB7D;oCAEW,UAAU,CAAC,OAAO,wBAAwB,CAAC;0BAzElC,mBAAmB;4BAEjB,kBAAkB;kCADZ,cAAc;uCAIyC,aAAa"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
/** @file ChainAccount exo */
|
|
2
2
|
import { makeTracer } from '@agoric/internal';
|
|
3
3
|
import { V } from '@agoric/vow/vat.js';
|
|
4
|
-
import { M } from '@endo/patterns';
|
|
5
4
|
|
|
6
|
-
import {
|
|
5
|
+
import { ChainFacadeI } from '../typeGuards.js';
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* @import {Zone} from '@agoric/base-zone';
|
|
10
9
|
* @import {TimerService} from '@agoric/time';
|
|
11
10
|
* @import {Remote} from '@agoric/internal';
|
|
12
11
|
* @import {OrchestrationService} from '../service.js';
|
|
13
|
-
* @import {prepareCosmosOrchestrationAccount} from './
|
|
12
|
+
* @import {prepareCosmosOrchestrationAccount} from './cosmos-orchestration-account.js';
|
|
14
13
|
* @import {ChainInfo, CosmosChainInfo, IBCConnectionInfo, OrchestrationAccount} from '../types.js';
|
|
15
14
|
*/
|
|
16
15
|
|
|
@@ -20,12 +19,6 @@ const trace = makeTracer('RemoteChainFacade');
|
|
|
20
19
|
/** @type {any} */
|
|
21
20
|
const anyVal = null;
|
|
22
21
|
|
|
23
|
-
/** @see {Chain} */
|
|
24
|
-
export const RemoteChainFacadeI = M.interface('RemoteChainFacade', {
|
|
25
|
-
getChainInfo: M.callWhen().returns(ChainInfoShape),
|
|
26
|
-
makeAccount: M.callWhen().returns(M.remotable('OrchestrationAccount')),
|
|
27
|
-
});
|
|
28
|
-
|
|
29
22
|
/**
|
|
30
23
|
* @param {Zone} zone
|
|
31
24
|
* @param {{
|
|
@@ -43,7 +36,7 @@ export const prepareRemoteChainFacade = (
|
|
|
43
36
|
) =>
|
|
44
37
|
zone.exoClass(
|
|
45
38
|
'RemoteChainFacade',
|
|
46
|
-
|
|
39
|
+
ChainFacadeI,
|
|
47
40
|
/**
|
|
48
41
|
* @param {CosmosChainInfo} remoteChainInfo
|
|
49
42
|
* @param {IBCConnectionInfo} connectionInfo
|
|
@@ -71,15 +64,11 @@ export const prepareRemoteChainFacade = (
|
|
|
71
64
|
|
|
72
65
|
const address = await V(icaAccount).getAddress();
|
|
73
66
|
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
},
|
|
78
|
-
];
|
|
79
|
-
if (!bondDenom) {
|
|
80
|
-
throw Fail`missing bondDenom`;
|
|
67
|
+
const stakingDenom = remoteChainInfo.stakingTokens?.[0]?.denom;
|
|
68
|
+
if (!stakingDenom) {
|
|
69
|
+
throw Fail`chain info lacks staking denom`;
|
|
81
70
|
}
|
|
82
|
-
return makeCosmosOrchestrationAccount(address,
|
|
71
|
+
return makeCosmosOrchestrationAccount(address, stakingDenom, {
|
|
83
72
|
account: icaAccount,
|
|
84
73
|
storageNode,
|
|
85
74
|
icqConnection: anyVal,
|
|
@@ -89,3 +78,4 @@ export const prepareRemoteChainFacade = (
|
|
|
89
78
|
},
|
|
90
79
|
);
|
|
91
80
|
harden(prepareRemoteChainFacade);
|
|
81
|
+
/** @typedef {ReturnType<typeof prepareRemoteChainFacade>} MakeRemoteChainFacade */
|
package/src/facade.d.ts
CHANGED
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
export function
|
|
2
|
-
makeAccount(): import("@agoric/vow").PromiseVow<import("@endo/exo").Guarded<{
|
|
3
|
-
getAddress(): string;
|
|
4
|
-
getBalance(brand: Brand<"nat">): import("@agoric/vow").PromiseVow<import("@agoric/ertp/src/types.js").NatAmount>;
|
|
5
|
-
deposit(payment: Payment<"nat">, optAmountShape?: Pattern): import("@agoric/vow").PromiseVow<import("@agoric/ertp/src/types.js").NatAmount>;
|
|
6
|
-
withdraw(amount: Amount<"nat">): import("@agoric/vow").PromiseVow<globalThis.Payment<"nat">>;
|
|
7
|
-
executeTx<MT extends {
|
|
8
|
-
'@type': string;
|
|
9
|
-
}[]>(messages: MT): import("@agoric/vats/src/localchain.js").PromiseVowOfTupleMappedToGenerics<{ [K in keyof MT]: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto").ResponseTo<MT[K]>>; }>;
|
|
10
|
-
monitorTransfers(tap: import("@agoric/vats/src/bridge-target.js").TargetApp): import("@agoric/vow").PromiseVow<import("@agoric/vats/src/bridge-target.js").TargetRegistration>;
|
|
11
|
-
}>>;
|
|
12
|
-
query<T extends {
|
|
13
|
-
'@type': string;
|
|
14
|
-
} = {
|
|
15
|
-
'@type': string;
|
|
16
|
-
}>(request: T): import("@agoric/vow").PromiseVow<import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto").ResponseTo<T>>>;
|
|
17
|
-
queryMany<RT extends {
|
|
18
|
-
'@type': string;
|
|
19
|
-
}[]>(requests: RT): import("@agoric/vats/src/localchain.js").PromiseVowOfTupleMappedToGenerics<{ [K_1 in keyof RT]: import("@agoric/cosmic-proto").JsonSafe<{
|
|
20
|
-
error?: string | undefined;
|
|
21
|
-
reply: import("@agoric/cosmic-proto").ResponseTo<RT[K_1]>;
|
|
22
|
-
}>; }>;
|
|
23
|
-
}>>, makeLocalChainAccountKit: ReturnType<typeof import("./exos/local-chain-account-kit.js").prepareLocalChainAccountKit>, localInfo: ChainInfo): Chain<any>;
|
|
24
|
-
export function makeOrchestrationFacade({ zone, timerService, zcf, storageNode, orchestrationService, localchain, chainHub, makeLocalChainAccountKit, makeRecorderKit, makeRemoteChainFacade, asyncFlowTools, }: {
|
|
1
|
+
export function makeOrchestrationFacade({ zone, timerService, zcf, storageNode, orchestrationService, localchain, chainHub, makeLocalOrchestrationAccountKit, makeRecorderKit, makeLocalChainFacade, makeRemoteChainFacade, asyncFlowTools, }: {
|
|
25
2
|
zone: Zone;
|
|
26
3
|
timerService: Remote<TimerService>;
|
|
27
4
|
zcf: ZCF;
|
|
@@ -58,10 +35,90 @@ export function makeOrchestrationFacade({ zone, timerService, zcf, storageNode,
|
|
|
58
35
|
}>; }>;
|
|
59
36
|
}>>;
|
|
60
37
|
chainHub: import("./utils/chainHub.js").ChainHub;
|
|
61
|
-
|
|
38
|
+
makeLocalOrchestrationAccountKit: (args_0: {
|
|
39
|
+
account: import("@endo/exo").Guarded<{
|
|
40
|
+
getAddress(): string;
|
|
41
|
+
getBalance(brand: Brand<"nat">): import("@agoric/vow").PromiseVow<import("@agoric/ertp/src/types.js").NatAmount>;
|
|
42
|
+
deposit(payment: Payment<"nat">, optAmountShape?: Pattern): import("@agoric/vow").PromiseVow<import("@agoric/ertp/src/types.js").NatAmount>;
|
|
43
|
+
withdraw(amount: Amount<"nat">): import("@agoric/vow").PromiseVow<globalThis.Payment<"nat">>;
|
|
44
|
+
executeTx<MT extends {
|
|
45
|
+
'@type': string;
|
|
46
|
+
}[]>(messages: MT): import("@agoric/vats/src/localchain.js").PromiseVowOfTupleMappedToGenerics<{ [K in keyof MT]: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto").ResponseTo<MT[K]>>; }>;
|
|
47
|
+
monitorTransfers(tap: import("@agoric/vats/src/bridge-target.js").TargetApp): import("@agoric/vow").PromiseVow<import("@agoric/vats/src/bridge-target.js").TargetRegistration>;
|
|
48
|
+
}>;
|
|
49
|
+
address: import("./orchestration-api.js").ChainAddress;
|
|
50
|
+
storageNode: Remote<globalThis.StorageNode>;
|
|
51
|
+
}) => import("@endo/exo").GuardedKit<{
|
|
52
|
+
invitationMakers: {
|
|
53
|
+
Delegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<Invitation<import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/tx.js").MsgDelegateResponse & {
|
|
54
|
+
'@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
|
|
55
|
+
}>, undefined>>;
|
|
56
|
+
Undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<Invitation<void, undefined>>;
|
|
57
|
+
CloseAccount(): never;
|
|
58
|
+
};
|
|
59
|
+
holder: {
|
|
60
|
+
getBalance(denom: DenomArg): Promise<import("./orchestration-api.js").DenomAmount>;
|
|
61
|
+
getBalances(): never;
|
|
62
|
+
getPublicTopics(): {
|
|
63
|
+
account: {
|
|
64
|
+
description: string;
|
|
65
|
+
subscriber: globalThis.Subscriber<import("./exos/local-orchestration-account.js").LocalChainAccountNotification>;
|
|
66
|
+
storagePath: Promise<string>;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
delegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/tx.js").MsgDelegateResponse & {
|
|
70
|
+
'@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
|
|
71
|
+
}>>;
|
|
72
|
+
undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<void>;
|
|
73
|
+
deposit(payment: globalThis.Payment<"nat">): Promise<void>;
|
|
74
|
+
withdraw(amount: Amount<"nat">): import("@agoric/vow").PromiseVow<globalThis.Payment<"nat">>;
|
|
75
|
+
executeTx<MT extends {
|
|
76
|
+
'@type': string;
|
|
77
|
+
}[]>(messages: MT): import("@agoric/vats/src/localchain.js").PromiseVowOfTupleMappedToGenerics<{ [K in keyof MT]: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto").ResponseTo<MT[K]>>; }>;
|
|
78
|
+
getAddress(): import("./orchestration-api.js").ChainAddress;
|
|
79
|
+
send(toAccount: any, amount: any): Promise<void>;
|
|
80
|
+
transfer(amount: import("./orchestration-api.js").AmountArg, destination: import("./orchestration-api.js").ChainAddress, opts?: import("./cosmos-api.js").IBCMsgTransferOptions | undefined): Promise<void>;
|
|
81
|
+
transferSteps(amount: AmountArg, msg: TransferMsg): Promise<void>;
|
|
82
|
+
};
|
|
83
|
+
}>;
|
|
62
84
|
makeRecorderKit: <T_1>(storageNode: StorageNode | Awaited<import("@endo/far").FarRef<StorageNode>>, valueShape?: import("@agoric/zoe/src/contractSupport/recorder.js").TypedMatcher<T_1> | undefined) => RecorderKit<T_1>;
|
|
63
85
|
makeCosmosOrchestrationAccount: any;
|
|
64
|
-
|
|
86
|
+
makeLocalChainFacade: (localChainInfo: Readonly<{
|
|
87
|
+
chainId: string;
|
|
88
|
+
connections?: Record<string, IBCConnectionInfo> | undefined;
|
|
89
|
+
icqEnabled?: boolean | undefined;
|
|
90
|
+
stakingTokens?: readonly {
|
|
91
|
+
denom: string;
|
|
92
|
+
}[] | undefined;
|
|
93
|
+
}>) => import("@endo/exo").Guarded<{
|
|
94
|
+
getChainInfo(): Promise<Readonly<{
|
|
95
|
+
chainId: string;
|
|
96
|
+
connections?: Record<string, IBCConnectionInfo> | undefined;
|
|
97
|
+
icqEnabled?: boolean | undefined;
|
|
98
|
+
stakingTokens?: readonly {
|
|
99
|
+
denom: string;
|
|
100
|
+
}[] | undefined;
|
|
101
|
+
}>>;
|
|
102
|
+
makeAccount(): Promise<import("./orchestration-api.js").OrchestrationAccountI>;
|
|
103
|
+
}>;
|
|
104
|
+
makeRemoteChainFacade: (remoteChainInfo: Readonly<{
|
|
105
|
+
chainId: string;
|
|
106
|
+
connections?: Record<string, IBCConnectionInfo> | undefined;
|
|
107
|
+
icqEnabled?: boolean | undefined;
|
|
108
|
+
stakingTokens?: readonly {
|
|
109
|
+
denom: string;
|
|
110
|
+
}[] | undefined;
|
|
111
|
+
}>, connectionInfo: IBCConnectionInfo) => import("@endo/exo").Guarded<{
|
|
112
|
+
getChainInfo(): Promise<Readonly<{
|
|
113
|
+
chainId: string;
|
|
114
|
+
connections?: Record<string, IBCConnectionInfo> | undefined;
|
|
115
|
+
icqEnabled?: boolean | undefined;
|
|
116
|
+
stakingTokens?: readonly {
|
|
117
|
+
denom: string;
|
|
118
|
+
}[] | undefined;
|
|
119
|
+
}>>;
|
|
120
|
+
makeAccount(): Promise<import("./orchestration-api.js").OrchestrationAccountI>;
|
|
121
|
+
}>;
|
|
65
122
|
asyncFlowTools: {
|
|
66
123
|
prepareAsyncFlowKit: (zone: Zone, tag: string, guestAsyncFunc: import("../../../node_modules/@agoric/async-flow/src/types.js").GuestAsyncFunc, options?: {
|
|
67
124
|
startEager?: boolean | undefined;
|
|
@@ -107,12 +164,11 @@ export function makeOrchestrationFacade({ zone, timerService, zcf, storageNode,
|
|
|
107
164
|
orchestrate<Context, Args extends any[]>(durableName: string, ctx: Context, fn: (orc: Orchestrator, ctx2: Context, ...args: Args) => object): (...args: Args) => Promise<unknown>;
|
|
108
165
|
};
|
|
109
166
|
export type OrchestrationFacade = ReturnType<typeof makeOrchestrationFacade>;
|
|
110
|
-
import type { Remote } from '@agoric/internal';
|
|
111
|
-
import type { ChainInfo } from './types.js';
|
|
112
|
-
import type { Chain } from './types.js';
|
|
113
167
|
import type { Zone } from '@agoric/zone';
|
|
114
168
|
import type { TimerService } from '@agoric/time';
|
|
169
|
+
import type { Remote } from '@agoric/internal';
|
|
115
170
|
import type { RecorderKit } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
171
|
+
import type { IBCConnectionInfo } from './types.js';
|
|
116
172
|
import type { Vow } from '@agoric/vow';
|
|
117
173
|
import type { Orchestrator } from './types.js';
|
|
118
174
|
//# sourceMappingURL=facade.d.ts.map
|
package/src/facade.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facade.d.ts","sourceRoot":"","sources":["facade.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"facade.d.ts","sourceRoot":"","sources":["facade.js"],"names":[],"mappings":"AAuCO;;;SAbG,GAAG;;;;;;;;;;;;;8BAyEiH,MAAM,KAAK,CAAC;6BAA6gB,QAAQ,KAAK,CAAC,mBAA6B,OAAO;6BAAwjB,OAAO,KAAK,CAAC;;;2BAA6rB,EAAE;;;;;;;oBAAqjG,CAAC;;;uBAA6lB,EAAE;;;;;cArEnlL,OAAO,qBAAqB,EAAE,QAAQ;;;;8BAqEyE,MAAM,KAAK,CAAC;6BAA6gB,QAAQ,KAAK,CAAC,mBAA6B,OAAO;6BAAwjB,OAAO,KAAK,CAAC;;;2BAA6rB,EAAE;;;;;;;2DAAxlD,OAAO,KAAK,CAAC;;;6DAAid,OAAO,KAAK,CAAC;;;;8BAA0tB,QAAS;;;;;;;;;2DAAiyB,OAAO,KAAK,CAAC;;;6DAA+yB,OAAO,KAAK,CAAC;;6BAA56D,OAAO,KAAK,CAAC;;;2BAA6rB,EAAE;;;;kCAA46B,SAAU,OAAM,WAAY;;;wCAA/xC,WAAW,GAAE,QAAS,OAAO,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;oCAlE/oD,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgDpC;;;;;;;;OAQG;gBAFkC,OAAO,EACrB,IAAI,6BAJhB,MAAM,OAGoB,OAAO,AAD1B,gCACmB,OAAO,WACrB,IAAI,AADgC,KAAK,MAAM,GACzD,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,OAAO,CAAC;EAQnD;kCAEa,UAAU,CAAC,OAAO,uBAAuB,CAAC;0BA1FjC,cAAc;kCAEN,cAAc;4BAIpB,kBAAkB;iCADI,6CAA6C;uCAGe,YAAY;yBAPjG,aAAa;kCAOwE,YAAY"}
|
package/src/facade.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
/** @file Orchestration service */
|
|
2
2
|
|
|
3
3
|
import { Fail } from '@agoric/assert';
|
|
4
|
-
|
|
5
|
-
import { Far } from '@endo/far';
|
|
6
|
-
// eslint-disable-next-line import/no-cycle -- FIXME
|
|
4
|
+
|
|
7
5
|
import { prepareOrchestrator } from './exos/orchestrator.js';
|
|
8
6
|
|
|
9
7
|
/**
|
|
@@ -17,83 +15,11 @@ import { prepareOrchestrator } from './exos/orchestrator.js';
|
|
|
17
15
|
* @import {Remote} from '@agoric/internal';
|
|
18
16
|
* @import {OrchestrationService} from './service.js';
|
|
19
17
|
* @import {Chain, ChainInfo, CosmosChainInfo, IBCConnectionInfo, OrchestrationAccount, Orchestrator} from './types.js';
|
|
18
|
+
* @import {MakeLocalChainFacade} from './exos/local-chain-facade.js';
|
|
19
|
+
* @import {MakeRemoteChainFacade} from './exos/remote-chain-facade.js';
|
|
20
|
+
* @import {MakeLocalOrchestrationAccountKit} from './exos/local-orchestration-account.js';
|
|
20
21
|
*/
|
|
21
22
|
|
|
22
|
-
// FIXME turn this into an Exo
|
|
23
|
-
/**
|
|
24
|
-
* @param {Remote<LocalChain>} localchain
|
|
25
|
-
* @param {ReturnType<
|
|
26
|
-
* typeof import('./exos/local-chain-account-kit.js').prepareLocalChainAccountKit
|
|
27
|
-
* >} makeLocalChainAccountKit
|
|
28
|
-
* @param {ChainInfo} localInfo
|
|
29
|
-
* @returns {Chain}
|
|
30
|
-
*/
|
|
31
|
-
export const makeLocalChainFacade = (
|
|
32
|
-
localchain,
|
|
33
|
-
makeLocalChainAccountKit,
|
|
34
|
-
localInfo,
|
|
35
|
-
) => {
|
|
36
|
-
return Far('LocalChainFacade', {
|
|
37
|
-
/** @returns {Promise<ChainInfo>} */
|
|
38
|
-
async getChainInfo() {
|
|
39
|
-
return localInfo;
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
async makeAccount() {
|
|
43
|
-
const lcaP = E(localchain).makeAccount();
|
|
44
|
-
const [lca, address] = await Promise.all([lcaP, E(lcaP).getAddress()]);
|
|
45
|
-
const { holder: account } = makeLocalChainAccountKit({
|
|
46
|
-
account: lca,
|
|
47
|
-
address,
|
|
48
|
-
// @ts-expect-error TODO: Remote
|
|
49
|
-
storageNode: null,
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
// FIXME turn this into an Exo LocalChainOrchestrationAccount or make that a facet of makeLocalChainAccountKit
|
|
53
|
-
return {
|
|
54
|
-
async deposit(payment) {
|
|
55
|
-
console.log('deposit got', payment);
|
|
56
|
-
await E(account).deposit(payment);
|
|
57
|
-
},
|
|
58
|
-
getAddress() {
|
|
59
|
-
const addressStr = account.getAddress();
|
|
60
|
-
return {
|
|
61
|
-
address: addressStr,
|
|
62
|
-
chainId: localInfo.chainId,
|
|
63
|
-
addressEncoding: 'bech32',
|
|
64
|
-
};
|
|
65
|
-
},
|
|
66
|
-
async getBalance(denomArg) {
|
|
67
|
-
// FIXME look up real values
|
|
68
|
-
// UNTIL https://github.com/Agoric/agoric-sdk/issues/9211
|
|
69
|
-
const [brand, denom] =
|
|
70
|
-
typeof denomArg === 'string'
|
|
71
|
-
? [/** @type {any} */ (null), denomArg]
|
|
72
|
-
: [denomArg, 'FIXME'];
|
|
73
|
-
|
|
74
|
-
const natAmount = await E(lca).getBalance(brand);
|
|
75
|
-
return harden({ denom, value: natAmount.value });
|
|
76
|
-
},
|
|
77
|
-
getBalances() {
|
|
78
|
-
throw new Error('not yet implemented');
|
|
79
|
-
},
|
|
80
|
-
async send(toAccount, amount) {
|
|
81
|
-
// FIXME implement
|
|
82
|
-
console.log('send got', toAccount, amount);
|
|
83
|
-
},
|
|
84
|
-
async transfer(amount, destination, opts) {
|
|
85
|
-
console.log('transfer got', amount, destination, opts);
|
|
86
|
-
return account.transfer(amount, destination, opts);
|
|
87
|
-
},
|
|
88
|
-
transferSteps(amount, msg) {
|
|
89
|
-
console.log('transferSteps got', amount, msg);
|
|
90
|
-
return Promise.resolve();
|
|
91
|
-
},
|
|
92
|
-
};
|
|
93
|
-
},
|
|
94
|
-
});
|
|
95
|
-
};
|
|
96
|
-
|
|
97
23
|
/**
|
|
98
24
|
* @param {{
|
|
99
25
|
* zone: Zone;
|
|
@@ -103,12 +29,11 @@ export const makeLocalChainFacade = (
|
|
|
103
29
|
* orchestrationService: Remote<OrchestrationService>;
|
|
104
30
|
* localchain: Remote<LocalChain>;
|
|
105
31
|
* chainHub: import('./utils/chainHub.js').ChainHub;
|
|
106
|
-
*
|
|
107
|
-
* typeof import('./exos/local-chain-account-kit.js').prepareLocalChainAccountKit
|
|
108
|
-
* >;
|
|
32
|
+
* makeLocalOrchestrationAccountKit: MakeLocalOrchestrationAccountKit;
|
|
109
33
|
* makeRecorderKit: MakeRecorderKit;
|
|
110
34
|
* makeCosmosOrchestrationAccount: any;
|
|
111
|
-
*
|
|
35
|
+
* makeLocalChainFacade: MakeLocalChainFacade;
|
|
36
|
+
* makeRemoteChainFacade: MakeRemoteChainFacade;
|
|
112
37
|
* asyncFlowTools: AsyncFlowTools;
|
|
113
38
|
* }} powers
|
|
114
39
|
*/
|
|
@@ -120,8 +45,9 @@ export const makeOrchestrationFacade = ({
|
|
|
120
45
|
orchestrationService,
|
|
121
46
|
localchain,
|
|
122
47
|
chainHub,
|
|
123
|
-
|
|
48
|
+
makeLocalOrchestrationAccountKit,
|
|
124
49
|
makeRecorderKit,
|
|
50
|
+
makeLocalChainFacade,
|
|
125
51
|
makeRemoteChainFacade,
|
|
126
52
|
asyncFlowTools,
|
|
127
53
|
}) => {
|
|
@@ -131,9 +57,10 @@ export const makeOrchestrationFacade = ({
|
|
|
131
57
|
storageNode &&
|
|
132
58
|
orchestrationService &&
|
|
133
59
|
// @ts-expect-error type says defined but double check
|
|
134
|
-
|
|
60
|
+
makeLocalOrchestrationAccountKit &&
|
|
135
61
|
// @ts-expect-error type says defined but double check
|
|
136
62
|
makeRecorderKit &&
|
|
63
|
+
// @ts-expect-error type says defined but double check
|
|
137
64
|
makeRemoteChainFacade &&
|
|
138
65
|
asyncFlowTools) ||
|
|
139
66
|
Fail`params missing`;
|
|
@@ -142,8 +69,8 @@ export const makeOrchestrationFacade = ({
|
|
|
142
69
|
asyncFlowTools,
|
|
143
70
|
chainHub,
|
|
144
71
|
localchain,
|
|
145
|
-
makeLocalChainAccountKit,
|
|
146
72
|
makeRecorderKit,
|
|
73
|
+
makeLocalChainFacade,
|
|
147
74
|
makeRemoteChainFacade,
|
|
148
75
|
orchestrationService,
|
|
149
76
|
storageNode,
|
|
@@ -25,7 +25,7 @@ export function startStakeAtom({ consume: { agoricNames, board, chainStorage, ch
|
|
|
25
25
|
publicSubscribers: {
|
|
26
26
|
account: {
|
|
27
27
|
description: string;
|
|
28
|
-
subscriber: globalThis.Subscriber<import("../exos/
|
|
28
|
+
subscriber: globalThis.Subscriber<import("../exos/cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
|
|
29
29
|
storagePath: Promise<string>;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
@@ -42,7 +42,7 @@ export function startStakeAtom({ consume: { agoricNames, board, chainStorage, ch
|
|
|
42
42
|
getPublicTopics(): {
|
|
43
43
|
account: {
|
|
44
44
|
description: string;
|
|
45
|
-
subscriber: globalThis.Subscriber<import("../exos/
|
|
45
|
+
subscriber: globalThis.Subscriber<import("../exos/cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
|
|
46
46
|
storagePath: Promise<string>;
|
|
47
47
|
};
|
|
48
48
|
};
|
|
@@ -63,7 +63,7 @@ export function startStakeAtom({ consume: { agoricNames, board, chainStorage, ch
|
|
|
63
63
|
publicSubscribers: {
|
|
64
64
|
account: {
|
|
65
65
|
description: string;
|
|
66
|
-
subscriber: globalThis.Subscriber<import("../exos/
|
|
66
|
+
subscriber: globalThis.Subscriber<import("../exos/cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
|
|
67
67
|
storagePath: Promise<string>;
|
|
68
68
|
};
|
|
69
69
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-stakeAtom.d.ts","sourceRoot":"","sources":["start-stakeAtom.js"],"names":[],"mappings":"AAuBO,yOAVI,eAAe,GAAG;IAC5B,YAAgB,EAAE;QAClB,OAAa,EAAE;YACf,QAAgB,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"start-stakeAtom.d.ts","sourceRoot":"","sources":["start-stakeAtom.js"],"names":[],"mappings":"AAuBO,yOAVI,eAAe,GAAG;IAC5B,YAAgB,EAAE;QAClB,OAAa,EAAE;YACf,QAAgB,EAAE,YAAY,OA2CtB,IACH,aAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA1CJ,CAAC;SACH,CAAC;KACH,CAAC;CACH,iBAuDH;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BN;mCApG4C,+BAA+B"}
|
|
@@ -40,7 +40,7 @@ export function startStakeBld({ consume: { agoricNames: agoricNamesP, board, cha
|
|
|
40
40
|
publicSubscribers: {
|
|
41
41
|
account: {
|
|
42
42
|
description: string;
|
|
43
|
-
subscriber: globalThis.Subscriber<import("../exos/local-
|
|
43
|
+
subscriber: globalThis.Subscriber<import("../exos/local-orchestration-account.js").LocalChainAccountNotification>;
|
|
44
44
|
storagePath: Promise<string>;
|
|
45
45
|
};
|
|
46
46
|
};
|
|
@@ -52,10 +52,12 @@ export function startStakeBld({ consume: { agoricNames: agoricNamesP, board, cha
|
|
|
52
52
|
CloseAccount(): never;
|
|
53
53
|
}>;
|
|
54
54
|
account: import("@endo/exo").Guarded<{
|
|
55
|
+
getBalance(denom: DenomArg): Promise<import("../orchestration-api.js").DenomAmount>;
|
|
56
|
+
getBalances(): never;
|
|
55
57
|
getPublicTopics(): {
|
|
56
58
|
account: {
|
|
57
59
|
description: string;
|
|
58
|
-
subscriber: globalThis.Subscriber<import("../exos/local-
|
|
60
|
+
subscriber: globalThis.Subscriber<import("../exos/local-orchestration-account.js").LocalChainAccountNotification>;
|
|
59
61
|
storagePath: Promise<string>;
|
|
60
62
|
};
|
|
61
63
|
};
|
|
@@ -63,20 +65,24 @@ export function startStakeBld({ consume: { agoricNames: agoricNamesP, board, cha
|
|
|
63
65
|
'@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
|
|
64
66
|
}>>;
|
|
65
67
|
undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<void>;
|
|
66
|
-
deposit(payment: Payment<"nat"
|
|
68
|
+
deposit(payment: globalThis.Payment<"nat">): Promise<void>;
|
|
67
69
|
withdraw(amount: Amount<"nat">): import("@agoric/vow").PromiseVow<globalThis.Payment<"nat">>;
|
|
68
70
|
executeTx<MT extends {
|
|
69
71
|
'@type': string;
|
|
70
72
|
}[]>(messages: MT): import("@agoric/vats/src/localchain.js").PromiseVowOfTupleMappedToGenerics<{ [K in keyof MT]: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto").ResponseTo<MT[K]>>; }>;
|
|
71
|
-
getAddress():
|
|
73
|
+
getAddress(): import("../orchestration-api.js").ChainAddress;
|
|
74
|
+
send(toAccount: any, amount: any): Promise<void>;
|
|
72
75
|
transfer(amount: import("../orchestration-api.js").AmountArg, destination: import("../orchestration-api.js").ChainAddress, opts?: import("../cosmos-api.js").IBCMsgTransferOptions | undefined): Promise<void>;
|
|
76
|
+
transferSteps(amount: AmountArg, msg: TransferMsg): Promise<void>;
|
|
73
77
|
}>;
|
|
74
78
|
}, undefined>>;
|
|
75
79
|
makeAccount(): Promise<import("@endo/exo").Guarded<{
|
|
80
|
+
getBalance(denom: DenomArg): Promise<import("../orchestration-api.js").DenomAmount>;
|
|
81
|
+
getBalances(): never;
|
|
76
82
|
getPublicTopics(): {
|
|
77
83
|
account: {
|
|
78
84
|
description: string;
|
|
79
|
-
subscriber: globalThis.Subscriber<import("../exos/local-
|
|
85
|
+
subscriber: globalThis.Subscriber<import("../exos/local-orchestration-account.js").LocalChainAccountNotification>;
|
|
80
86
|
storagePath: Promise<string>;
|
|
81
87
|
};
|
|
82
88
|
};
|
|
@@ -84,19 +90,21 @@ export function startStakeBld({ consume: { agoricNames: agoricNamesP, board, cha
|
|
|
84
90
|
'@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
|
|
85
91
|
}>>;
|
|
86
92
|
undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<void>;
|
|
87
|
-
deposit(payment: Payment<"nat"
|
|
93
|
+
deposit(payment: globalThis.Payment<"nat">): Promise<void>;
|
|
88
94
|
withdraw(amount: Amount<"nat">): import("@agoric/vow").PromiseVow<globalThis.Payment<"nat">>;
|
|
89
95
|
executeTx<MT extends {
|
|
90
96
|
'@type': string;
|
|
91
97
|
}[]>(messages: MT): import("@agoric/vats/src/localchain.js").PromiseVowOfTupleMappedToGenerics<{ [K in keyof MT]: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto").ResponseTo<MT[K]>>; }>;
|
|
92
|
-
getAddress():
|
|
98
|
+
getAddress(): import("../orchestration-api.js").ChainAddress;
|
|
99
|
+
send(toAccount: any, amount: any): Promise<void>;
|
|
93
100
|
transfer(amount: import("../orchestration-api.js").AmountArg, destination: import("../orchestration-api.js").ChainAddress, opts?: import("../cosmos-api.js").IBCMsgTransferOptions | undefined): Promise<void>;
|
|
101
|
+
transferSteps(amount: AmountArg, msg: TransferMsg): Promise<void>;
|
|
94
102
|
}>>;
|
|
95
103
|
makeAccountInvitationMaker(): Promise<Invitation<{
|
|
96
104
|
publicSubscribers: {
|
|
97
105
|
account: {
|
|
98
106
|
description: string;
|
|
99
|
-
subscriber: globalThis.Subscriber<import("../exos/local-
|
|
107
|
+
subscriber: globalThis.Subscriber<import("../exos/local-orchestration-account.js").LocalChainAccountNotification>;
|
|
100
108
|
storagePath: Promise<string>;
|
|
101
109
|
};
|
|
102
110
|
};
|
|
@@ -108,10 +116,12 @@ export function startStakeBld({ consume: { agoricNames: agoricNamesP, board, cha
|
|
|
108
116
|
CloseAccount(): never;
|
|
109
117
|
}>;
|
|
110
118
|
account: import("@endo/exo").Guarded<{
|
|
119
|
+
getBalance(denom: DenomArg): Promise<import("../orchestration-api.js").DenomAmount>;
|
|
120
|
+
getBalances(): never;
|
|
111
121
|
getPublicTopics(): {
|
|
112
122
|
account: {
|
|
113
123
|
description: string;
|
|
114
|
-
subscriber: globalThis.Subscriber<import("../exos/local-
|
|
124
|
+
subscriber: globalThis.Subscriber<import("../exos/local-orchestration-account.js").LocalChainAccountNotification>;
|
|
115
125
|
storagePath: Promise<string>;
|
|
116
126
|
};
|
|
117
127
|
};
|
|
@@ -119,13 +129,15 @@ export function startStakeBld({ consume: { agoricNames: agoricNamesP, board, cha
|
|
|
119
129
|
'@type': "/cosmos.staking.v1beta1.MsgDelegateResponse";
|
|
120
130
|
}>>;
|
|
121
131
|
undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<void>;
|
|
122
|
-
deposit(payment: Payment<"nat"
|
|
132
|
+
deposit(payment: globalThis.Payment<"nat">): Promise<void>;
|
|
123
133
|
withdraw(amount: Amount<"nat">): import("@agoric/vow").PromiseVow<globalThis.Payment<"nat">>;
|
|
124
134
|
executeTx<MT extends {
|
|
125
135
|
'@type': string;
|
|
126
136
|
}[]>(messages: MT): import("@agoric/vats/src/localchain.js").PromiseVowOfTupleMappedToGenerics<{ [K in keyof MT]: import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto").ResponseTo<MT[K]>>; }>;
|
|
127
|
-
getAddress():
|
|
137
|
+
getAddress(): import("../orchestration-api.js").ChainAddress;
|
|
138
|
+
send(toAccount: any, amount: any): Promise<void>;
|
|
128
139
|
transfer(amount: import("../orchestration-api.js").AmountArg, destination: import("../orchestration-api.js").ChainAddress, opts?: import("../cosmos-api.js").IBCMsgTransferOptions | undefined): Promise<void>;
|
|
140
|
+
transferSteps(amount: AmountArg, msg: TransferMsg): Promise<void>;
|
|
129
141
|
}>;
|
|
130
142
|
}, undefined>>;
|
|
131
143
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-stakeBld.d.ts","sourceRoot":"","sources":["start-stakeBld.js"],"names":[],"mappings":"AAkBO,6TAVI,eAAe,GAAG;IAC5B,YAAgB,EAAE;QAClB,OAAa,EAAE;YACf,QAAgB,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"start-stakeBld.d.ts","sourceRoot":"","sources":["start-stakeBld.js"],"names":[],"mappings":"AAkBO,6TAVI,eAAe,GAAG;IAC5B,YAAgB,EAAE;QAClB,OAAa,EAAE;YACf,QAAgB,EAAE,YAAY,OA6BpB,GAAG;;;;;0CA+Dk0B,MAAM,KAAK,CAAC;yCAA6gB,QAAQ,KAAK,CAAC,mBAA6B,OAAO;yCAAwjB,OAAO,KAAK,CAAC;;;uCAA6rB,EAAE;;;;;;;gCAAqjG,CAAC;;;mCAA6lB,EAAE;;;;;;;;;;;;;wBA1DpyM,OAAO,kBAAkB,EAAG,OAAM;;;;;;;;;;;2EA0DqhC,OAAO,KAAK,CAAC;;;6EAAid,OAAO,KAAK,CAAC;;;;8CAA0tB,QAAS;;;;;;;;;2EAAiyB,OAAO,KAAK,CAAC;;;6EAA+yB,OAAO,KAAK,CAAC;;6CAA56D,OAAO,KAAK,CAAC;;;2CAA6rB,EAAE;;;;kDAA46B,SAAU,OAAM,WAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA1F7lH,CAAC;SACH,CAAC;KACH,CAAC;CACH,iBAwDH;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BN;sBApGqB,gCAAgC"}
|