@agoric/orchestration 0.1.1-dev-989aa19.0 → 0.1.1-dev-9274bc7.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 +18 -16
- package/src/chain-info.js +1 -1
- package/src/examples/stakeBld.contract.d.ts +10 -20
- package/src/examples/stakeBld.contract.d.ts.map +1 -1
- package/src/examples/stakeBld.contract.js +4 -2
- package/src/examples/stakeIca.contract.d.ts +9 -9
- package/src/examples/stakeIca.contract.d.ts.map +1 -1
- package/src/examples/stakeIca.contract.js +4 -1
- package/src/exos/chain-account-kit.d.ts +10 -1
- package/src/exos/chain-account-kit.d.ts.map +1 -1
- package/src/exos/chain-account-kit.js +35 -13
- package/src/exos/chain-hub.d.ts +2392 -0
- package/src/{utils/chainHub.d.ts.map → exos/chain-hub.d.ts.map} +1 -1
- package/src/{utils/chainHub.js → exos/chain-hub.js} +69 -9
- package/src/exos/cosmos-orchestration-account.d.ts +50 -15
- package/src/exos/cosmos-orchestration-account.d.ts.map +1 -1
- package/src/exos/cosmos-orchestration-account.js +113 -57
- package/src/exos/icq-connection-kit.d.ts +10 -1
- package/src/exos/icq-connection-kit.d.ts.map +1 -1
- package/src/exos/icq-connection-kit.js +27 -11
- package/src/exos/local-chain-facade.d.ts +46 -9
- package/src/exos/local-chain-facade.d.ts.map +1 -1
- package/src/exos/local-chain-facade.js +1 -1
- package/src/exos/local-orchestration-account.d.ts +115 -2343
- package/src/exos/local-orchestration-account.d.ts.map +1 -1
- package/src/exos/local-orchestration-account.js +185 -56
- package/src/exos/orchestrator.d.ts +9 -2313
- package/src/exos/orchestrator.d.ts.map +1 -1
- package/src/exos/orchestrator.js +1 -1
- package/src/exos/remote-chain-facade.d.ts +6 -6
- package/src/facade.d.ts +48 -11
- package/src/facade.d.ts.map +1 -1
- package/src/facade.js +2 -2
- package/src/proposals/orchestration-proposal.d.ts +36 -6
- package/src/proposals/orchestration-proposal.js +1 -1
- package/src/proposals/start-stakeAtom.d.ts +9 -9
- package/src/proposals/start-stakeAtom.d.ts.map +1 -1
- package/src/proposals/start-stakeAtom.js +5 -6
- package/src/proposals/start-stakeBld.d.ts +10 -20
- package/src/proposals/start-stakeBld.d.ts.map +1 -1
- package/src/proposals/start-stakeOsmo.d.ts +9 -9
- package/src/proposals/start-stakeOsmo.d.ts.map +1 -1
- package/src/proposals/start-stakeOsmo.js +5 -6
- package/src/service.d.ts +92 -9
- package/src/service.d.ts.map +1 -1
- package/src/service.js +143 -66
- package/src/utils/start-helper.d.ts +8 -2320
- package/src/utils/start-helper.d.ts.map +1 -1
- package/src/utils/start-helper.js +5 -2
- package/src/utils/time.d.ts +2 -0
- package/src/utils/time.d.ts.map +1 -1
- package/src/utils/time.js +2 -0
- package/src/vat-orchestration.d.ts +36 -6
- package/src/vat-orchestration.d.ts.map +1 -1
- package/src/vat-orchestration.js +3 -0
- package/src/utils/chainHub.d.ts +0 -2404
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @file ICQConnection Exo */
|
|
2
2
|
import { NonNullish } from '@agoric/assert';
|
|
3
3
|
import { makeTracer } from '@agoric/internal';
|
|
4
|
-
import {
|
|
4
|
+
import { E } from '@endo/far';
|
|
5
5
|
import { M } from '@endo/patterns';
|
|
6
6
|
import { makeQueryPacket, parseQueryPacket } from '../utils/packet.js';
|
|
7
7
|
import { ConnectionHandlerI } from '../typeGuards.js';
|
|
@@ -9,7 +9,7 @@ import { ConnectionHandlerI } from '../typeGuards.js';
|
|
|
9
9
|
/**
|
|
10
10
|
* @import {Zone} from '@agoric/base-zone';
|
|
11
11
|
* @import {Connection, Port} from '@agoric/network';
|
|
12
|
-
* @import {Remote} from '@agoric/vow';
|
|
12
|
+
* @import {Remote, VowTools} from '@agoric/vow';
|
|
13
13
|
* @import {JsonSafe} from '@agoric/cosmic-proto';
|
|
14
14
|
* @import {RequestQuery, ResponseQuery} from '@agoric/cosmic-proto/tendermint/abci/types.js';
|
|
15
15
|
* @import {LocalIbcAddress, RemoteIbcAddress} from '@agoric/vats/tools/ibc-utils.js';
|
|
@@ -52,14 +52,21 @@ export const ICQConnectionI = M.interface('ICQConnection', {
|
|
|
52
52
|
* sending queries and handling connection events.
|
|
53
53
|
*
|
|
54
54
|
* @param {Zone} zone
|
|
55
|
+
* @param {VowTools} vowTools
|
|
55
56
|
*/
|
|
56
|
-
export const prepareICQConnectionKit = zone =>
|
|
57
|
+
export const prepareICQConnectionKit = (zone, { watch, when }) =>
|
|
57
58
|
zone.exoClassKit(
|
|
58
59
|
'ICQConnectionKit',
|
|
59
|
-
{
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
{
|
|
61
|
+
connection: ICQConnectionI,
|
|
62
|
+
connectionHandler: ConnectionHandlerI,
|
|
63
|
+
parseQueryPacketWatcher: M.interface('ParseQueryPacketWatcher', {
|
|
64
|
+
onFulfilled: M.call(M.string())
|
|
65
|
+
.optional(M.arrayOf(M.undefined())) // does not need watcherContext
|
|
66
|
+
.returns(M.arrayOf(M.record())),
|
|
67
|
+
}),
|
|
68
|
+
},
|
|
69
|
+
/** @param {Port} port */
|
|
63
70
|
port =>
|
|
64
71
|
/** @type {ICQConnectionKitState} */ ({
|
|
65
72
|
port,
|
|
@@ -88,14 +95,23 @@ export const prepareICQConnectionKit = zone =>
|
|
|
88
95
|
*/
|
|
89
96
|
query(msgs) {
|
|
90
97
|
const { connection } = this.state;
|
|
98
|
+
// TODO #9281 do not throw synchronously when returning a promise; return a rejected Vow
|
|
99
|
+
/// see https://github.com/Agoric/agoric-sdk/pull/9454#discussion_r1626898694
|
|
91
100
|
if (!connection) throw Fail`connection not available`;
|
|
92
|
-
return
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
101
|
+
return when(
|
|
102
|
+
watch(
|
|
103
|
+
E(connection).send(makeQueryPacket(msgs)),
|
|
104
|
+
this.facets.parseQueryPacketWatcher,
|
|
105
|
+
),
|
|
96
106
|
);
|
|
97
107
|
},
|
|
98
108
|
},
|
|
109
|
+
parseQueryPacketWatcher: {
|
|
110
|
+
/** @param {string} ack packet acknowledgement string */
|
|
111
|
+
onFulfilled(ack) {
|
|
112
|
+
return parseQueryPacket(ack);
|
|
113
|
+
},
|
|
114
|
+
},
|
|
99
115
|
connectionHandler: {
|
|
100
116
|
/**
|
|
101
117
|
* @param {Remote<Connection>} connection
|
|
@@ -14,12 +14,50 @@ export function prepareLocalChainFacade(zone: Zone, { makeLocalOrchestrationAcco
|
|
|
14
14
|
storageNode: Remote<globalThis.StorageNode>;
|
|
15
15
|
}) => import("@endo/exo").GuardedKit<{
|
|
16
16
|
invitationMakers: {
|
|
17
|
-
Delegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<Invitation<
|
|
18
|
-
|
|
19
|
-
}>, undefined>>;
|
|
20
|
-
Undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<Invitation<void, undefined>>;
|
|
17
|
+
Delegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<Invitation<Record<unknown, unknown>, undefined>>;
|
|
18
|
+
Undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<Invitation<void | import("@agoric/time").TimestampRecord | import("@agoric/vow").Vow<void | import("@agoric/time").TimestampRecord>, undefined>>;
|
|
21
19
|
CloseAccount(): never;
|
|
22
20
|
};
|
|
21
|
+
undelegateWatcher: {
|
|
22
|
+
onFulfilled(response: [import("@agoric/cosmic-proto/cosmos/staking/v1beta1/tx.js").MsgUndelegateResponse & {
|
|
23
|
+
'@type': "/cosmos.staking.v1beta1.MsgUndelegateResponse";
|
|
24
|
+
}]): Promise<import("@agoric/time").TimestampRecord>;
|
|
25
|
+
};
|
|
26
|
+
getChainInfoWatcher: {
|
|
27
|
+
onFulfilled(agoricChainInfo: ChainInfo, { destination }: {
|
|
28
|
+
destination: import("../orchestration-api.js").ChainAddress;
|
|
29
|
+
}): Promise<IBCConnectionInfo>;
|
|
30
|
+
};
|
|
31
|
+
getTimeoutTimestampWatcher: {
|
|
32
|
+
onFulfilled(timeoutTimestamp: bigint, { opts }: {
|
|
33
|
+
opts: import("../cosmos-api.js").IBCMsgTransferOptions;
|
|
34
|
+
}): bigint;
|
|
35
|
+
};
|
|
36
|
+
transferWatcher: {
|
|
37
|
+
onFulfilled([{ transferChannel }, timeoutTimestamp]: [{
|
|
38
|
+
transferChannel: {
|
|
39
|
+
portId: string;
|
|
40
|
+
channelId: `channel-${number}`;
|
|
41
|
+
counterPartyPortId: string;
|
|
42
|
+
counterPartyChannelId: `channel-${number}`;
|
|
43
|
+
ordering: import("@agoric/cosmic-proto/ibc/core/channel/v1/channel.js").Order;
|
|
44
|
+
state: import("@agoric/cosmic-proto/ibc/core/channel/v1/channel.js").State;
|
|
45
|
+
version: string;
|
|
46
|
+
};
|
|
47
|
+
}, bigint], { opts, amount, destination }: {
|
|
48
|
+
destination: import("../orchestration-api.js").ChainAddress;
|
|
49
|
+
opts: import("../cosmos-api.js").IBCMsgTransferOptions;
|
|
50
|
+
amount: import("../orchestration-api.js").DenomAmount;
|
|
51
|
+
}): import("@agoric/vats/src/localchain.js").PromiseVowOfTupleMappedToGenerics<import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto/ibc/applications/transfer/v1/tx.js").MsgTransferResponse & {
|
|
52
|
+
'@type': "/ibc.applications.transfer.v1.MsgTransferResponse";
|
|
53
|
+
}>[]>;
|
|
54
|
+
};
|
|
55
|
+
extractFirstResultWatcher: {
|
|
56
|
+
onFulfilled(results: Record<unknown, unknown>[]): Record<unknown, unknown>;
|
|
57
|
+
};
|
|
58
|
+
returnVoidWatcher: {
|
|
59
|
+
onFulfilled(results: Record<unknown, unknown>[]): undefined;
|
|
60
|
+
};
|
|
23
61
|
holder: {
|
|
24
62
|
getBalance(denom: DenomArg): Promise<import("../orchestration-api.js").DenomAmount>;
|
|
25
63
|
getBalances(): never;
|
|
@@ -30,10 +68,8 @@ export function prepareLocalChainFacade(zone: Zone, { makeLocalOrchestrationAcco
|
|
|
30
68
|
storagePath: Promise<string>;
|
|
31
69
|
};
|
|
32
70
|
};
|
|
33
|
-
delegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<
|
|
34
|
-
|
|
35
|
-
}>>;
|
|
36
|
-
undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<void>;
|
|
71
|
+
delegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<Record<unknown, unknown>>;
|
|
72
|
+
undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): import("@agoric/vow").PromiseVow<void | import("@agoric/time").TimestampRecord>;
|
|
37
73
|
deposit(payment: globalThis.Payment<"nat">): Promise<void>;
|
|
38
74
|
withdraw(amount: Amount<"nat">): import("@agoric/vow").PromiseVow<globalThis.Payment<"nat">>;
|
|
39
75
|
executeTx<MT extends {
|
|
@@ -100,6 +136,7 @@ export function prepareLocalChainFacade(zone: Zone, { makeLocalOrchestrationAcco
|
|
|
100
136
|
export type MakeLocalChainFacade = ReturnType<typeof prepareLocalChainFacade>;
|
|
101
137
|
import type { Zone } from '@agoric/base-zone';
|
|
102
138
|
import type { Remote } from '@agoric/internal';
|
|
103
|
-
import type {
|
|
139
|
+
import type { ChainInfo } from '../types.js';
|
|
104
140
|
import type { IBCConnectionInfo } from '../types.js';
|
|
141
|
+
import type { TimerService } from '@agoric/time';
|
|
105
142
|
//# sourceMappingURL=local-chain-facade.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-chain-facade.d.ts","sourceRoot":"","sources":["local-chain-facade.js"],"names":[],"mappings":"AAyBO;;;;
|
|
1
|
+
{"version":3,"file":"local-chain-facade.d.ts","sourceRoot":"","sources":["local-chain-facade.js"],"names":[],"mappings":"AAyBO;;;;8BA0C4mC,MAAM,KAAK,CAAC;6BAA6gB,QAAQ,KAAK,CAAC,mBAA6B,OAAO;6BAAwjB,OAAO,KAAK,CAAC;;;2BAA6rB,EAAE;;;;;;;2DAA2H,OAAO,KAAK,CAAC;6DAAid,OAAO,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAAgkG,wBAAwB,EAAE;;;iCAAsZ,wBAAwB,EAAE;;;8BAAngJ,QAAS;;;;;;;;;2DAAmwL,OAAO,KAAK,CAAC;6DAAksB,OAAO,KAAK,CAAC;;6BAAjyN,OAAO,KAAK,CAAC;;;2BAA6rB,EAAE;;;;kCAA46B,SAAU,OAAM,WAAY;;;;;;;;;;;;;;;;8BAAvxF,MAAM,KAAK,CAAC;6BAA6gB,QAAQ,KAAK,CAAC,mBAA6B,OAAO;6BAAwjB,OAAO,KAAK,CAAC;;;2BAA6rB,EAAE;;;;;;;oBAAqjG,CAAC;;;uBAA6lB,EAAE;;;;;;;;;;;;;;;;;;;;;IAtBjlN,0DAA0D;;GAmB7D;mCAEW,UAAU,CAAC,OAAO,uBAAuB,CAAC;0BA5DjC,mBAAmB;4BAEjB,kBAAkB;+BAI2C,aAAa;uCAAb,aAAa;kCALpE,cAAc"}
|