@agoric/orchestration 0.2.0-upgrade-18-dev-aaebae4.0 → 0.2.0-upgrade-18-dev-bd8fd54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +3 -0
- package/index.js +3 -0
- package/package.json +30 -29
- package/src/chain-capabilities.d.ts +15 -0
- package/src/chain-capabilities.d.ts.map +1 -0
- package/src/chain-capabilities.js +60 -0
- package/src/chain-info.d.ts +33 -20
- package/src/chain-info.d.ts.map +1 -1
- package/src/cosmos-api.d.ts +96 -21
- package/src/cosmos-api.d.ts.map +1 -1
- package/src/cosmos-api.ts +115 -28
- package/src/examples/auto-stake-it.contract.d.ts +19 -2
- package/src/examples/auto-stake-it.contract.d.ts.map +1 -1
- package/src/examples/auto-stake-it.contract.js +13 -2
- package/src/examples/auto-stake-it.flows.d.ts +1 -1
- package/src/examples/basic-flows.contract.d.ts +16 -1
- package/src/examples/basic-flows.contract.d.ts.map +1 -1
- package/src/examples/basic-flows.contract.js +14 -3
- package/src/examples/basic-flows.flows.d.ts +1 -1
- package/src/examples/send-anywhere.contract.d.ts +28 -5
- package/src/examples/send-anywhere.contract.d.ts.map +1 -1
- package/src/examples/send-anywhere.contract.js +11 -0
- package/src/examples/stake-bld.contract.d.ts +2 -2
- package/src/examples/stake-ica.contract.d.ts +5 -0
- package/src/examples/stake-ica.contract.d.ts.map +1 -1
- package/src/examples/staking-combinations.contract.d.ts +2 -0
- package/src/examples/staking-combinations.contract.d.ts.map +1 -1
- package/src/examples/staking-combinations.contract.js +1 -2
- package/src/examples/staking-combinations.flows.d.ts +4 -2
- package/src/examples/staking-combinations.flows.d.ts.map +1 -1
- package/src/examples/staking-combinations.flows.js +9 -4
- package/src/examples/swap.contract.d.ts +18 -2
- package/src/examples/swap.contract.d.ts.map +1 -1
- package/src/examples/swap.contract.js +6 -0
- package/src/exos/README.md +5 -4
- package/src/exos/chain-hub-admin.d.ts.map +1 -1
- package/src/exos/chain-hub-admin.js +1 -2
- package/src/exos/chain-hub.d.ts +37 -25
- package/src/exos/chain-hub.d.ts.map +1 -1
- package/src/exos/chain-hub.js +203 -18
- package/src/exos/cosmos-interchain-service.d.ts +5 -5
- package/src/exos/cosmos-interchain-service.d.ts.map +1 -1
- package/src/exos/cosmos-interchain-service.js +3 -3
- package/src/exos/cosmos-orchestration-account.d.ts +7 -24
- package/src/exos/cosmos-orchestration-account.d.ts.map +1 -1
- package/src/exos/cosmos-orchestration-account.js +27 -14
- package/src/exos/ibc-packet.d.ts.map +1 -1
- package/src/exos/ica-account-kit.d.ts +1 -3
- package/src/exos/ica-account-kit.d.ts.map +1 -1
- package/src/exos/local-chain-facade.d.ts +4 -2
- package/src/exos/local-chain-facade.d.ts.map +1 -1
- package/src/exos/local-orchestration-account.d.ts +13 -50
- package/src/exos/local-orchestration-account.d.ts.map +1 -1
- package/src/exos/local-orchestration-account.js +50 -53
- package/src/exos/orchestrator.d.ts +5 -7
- package/src/exos/orchestrator.d.ts.map +1 -1
- package/src/exos/orchestrator.js +12 -6
- package/src/exos/packet-tools.d.ts +1 -6
- package/src/exos/packet-tools.d.ts.map +1 -1
- package/src/exos/packet-tools.js +8 -12
- package/src/exos/portfolio-holder-kit.d.ts +4 -4
- package/src/exos/portfolio-holder-kit.d.ts.map +1 -1
- package/src/exos/portfolio-holder-kit.js +1 -1
- package/src/exos/remote-chain-facade.d.ts +3 -8
- package/src/exos/remote-chain-facade.d.ts.map +1 -1
- package/src/exos/remote-chain-facade.js +0 -2
- package/src/facade.d.ts.map +1 -1
- package/src/facade.js +0 -1
- package/src/fetched-chain-info.d.ts +43 -18
- package/src/fetched-chain-info.js +31 -18
- package/src/orchestration-api.d.ts +8 -5
- package/src/orchestration-api.d.ts.map +1 -1
- package/src/orchestration-api.ts +15 -14
- package/src/proposals/start-auto-stake-it.d.ts +52 -0
- package/src/proposals/start-auto-stake-it.d.ts.map +1 -0
- package/src/proposals/start-auto-stake-it.js +108 -0
- package/src/proposals/start-basic-flows.d.ts +39 -6
- package/src/proposals/start-basic-flows.d.ts.map +1 -1
- package/src/proposals/start-basic-flows.js +60 -21
- package/src/proposals/start-send-anywhere.d.ts +105 -0
- package/src/proposals/start-send-anywhere.d.ts.map +1 -0
- package/src/proposals/start-send-anywhere.js +150 -0
- package/src/proposals/start-stakeAtom.d.ts +5 -0
- package/src/proposals/start-stakeAtom.d.ts.map +1 -1
- package/src/proposals/start-stakeBld.d.ts +2 -2
- package/src/proposals/start-stakeOsmo.d.ts +5 -0
- package/src/proposals/start-stakeOsmo.d.ts.map +1 -1
- package/src/typeGuards.d.ts +27 -4
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +103 -26
- package/src/types.d.ts +1 -0
- package/src/types.d.ts.map +1 -1
- package/src/types.ts +1 -0
- package/src/utils/address.d.ts +2 -1
- package/src/utils/address.d.ts.map +1 -1
- package/src/utils/address.js +18 -1
- package/src/utils/asset.d.ts +5 -0
- package/src/utils/asset.d.ts.map +1 -0
- package/src/utils/asset.js +33 -0
- package/src/utils/chain-hub-helper.d.ts +8 -0
- package/src/utils/chain-hub-helper.d.ts.map +1 -0
- package/src/utils/chain-hub-helper.js +60 -0
- package/src/utils/orchestrationAccount.js +2 -2
- package/src/utils/packet.d.ts +1 -1
- package/src/utils/packet.d.ts.map +1 -1
- package/src/utils/registry.d.ts +2 -0
- package/src/utils/registry.d.ts.map +1 -1
- package/src/utils/registry.js +3 -1
- package/src/utils/start-helper.d.ts +7 -4
- package/src/utils/start-helper.d.ts.map +1 -1
- package/src/utils/start-helper.js +6 -4
- package/src/utils/time.d.ts +1 -1
- package/src/utils/time.d.ts.map +1 -1
- package/src/vat-orchestration.d.ts +9 -9
- package/src/vat-orchestration.d.ts.map +1 -1
- package/src/vat-orchestration.js +2 -2
package/src/cosmos-api.ts
CHANGED
|
@@ -8,6 +8,7 @@ import type {
|
|
|
8
8
|
} from '@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js';
|
|
9
9
|
import type { TxBody } from '@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js';
|
|
10
10
|
import type { MsgTransfer } from '@agoric/cosmic-proto/ibc/applications/transfer/v1/tx.js';
|
|
11
|
+
import type { FungibleTokenPacketData } from '@agoric/cosmic-proto/ibc/applications/transfer/v2/packet.js';
|
|
11
12
|
import type {
|
|
12
13
|
State as IBCChannelState,
|
|
13
14
|
Order,
|
|
@@ -19,7 +20,12 @@ import type {
|
|
|
19
20
|
} from '@agoric/cosmic-proto/tendermint/abci/types.js';
|
|
20
21
|
import type { Brand, Purse, Payment, Amount } from '@agoric/ertp/src/types.js';
|
|
21
22
|
import type { Port } from '@agoric/network';
|
|
22
|
-
import type {
|
|
23
|
+
import type {
|
|
24
|
+
IBCChannelID,
|
|
25
|
+
IBCConnectionID,
|
|
26
|
+
IBCPortID,
|
|
27
|
+
VTransferIBCEvent,
|
|
28
|
+
} from '@agoric/vats';
|
|
23
29
|
import type {
|
|
24
30
|
TargetApp,
|
|
25
31
|
TargetRegistration,
|
|
@@ -29,7 +35,9 @@ import type {
|
|
|
29
35
|
RemoteIbcAddress,
|
|
30
36
|
} from '@agoric/vats/tools/ibc-utils.js';
|
|
31
37
|
import type { QueryDelegationTotalRewardsResponse } from '@agoric/cosmic-proto/cosmos/distribution/v1beta1/query.js';
|
|
38
|
+
import type { Coin } from '@agoric/cosmic-proto/cosmos/base/v1beta1/coin.js';
|
|
32
39
|
import type { AmountArg, ChainAddress, Denom, DenomAmount } from './types.js';
|
|
40
|
+
import { PFM_RECEIVER } from './exos/chain-hub.js';
|
|
33
41
|
|
|
34
42
|
/** An address for a validator on some blockchain, e.g., cosmos, eth, etc. */
|
|
35
43
|
export type CosmosValidatorAddress = ChainAddress & {
|
|
@@ -85,12 +93,18 @@ export interface CosmosAssetInfo extends Record<string, unknown> {
|
|
|
85
93
|
* Info for a Cosmos-based chain.
|
|
86
94
|
*/
|
|
87
95
|
export type CosmosChainInfo = Readonly<{
|
|
96
|
+
/** can be used to lookup chainInfo (chainId) from an address value */
|
|
97
|
+
bech32Prefix?: string;
|
|
88
98
|
chainId: string;
|
|
89
99
|
|
|
90
100
|
connections?: Record<string, IBCConnectionInfo>; // chainId or wellKnownName
|
|
91
101
|
// UNTIL https://github.com/Agoric/agoric-sdk/issues/9326
|
|
92
102
|
icqEnabled?: boolean;
|
|
93
|
-
|
|
103
|
+
/**
|
|
104
|
+
* Note: developers must provide this value themselves for `.transfer` to work
|
|
105
|
+
* as expected. Please see examples for details.
|
|
106
|
+
*/
|
|
107
|
+
pfmEnabled?: boolean;
|
|
94
108
|
/**
|
|
95
109
|
* cf https://github.com/cosmos/chain-registry/blob/master/chain.schema.json#L117
|
|
96
110
|
*/
|
|
@@ -224,20 +238,10 @@ export interface StakingAccountActions {
|
|
|
224
238
|
}
|
|
225
239
|
|
|
226
240
|
/**
|
|
227
|
-
* Low level
|
|
241
|
+
* Low level methods from IcaAccount that we pass through to CosmosOrchestrationAccount
|
|
228
242
|
*/
|
|
229
|
-
export interface IcaAccount {
|
|
230
|
-
/**
|
|
231
|
-
* @returns the address of the account on the remote chain
|
|
232
|
-
*/
|
|
233
|
-
getAddress: () => ChainAddress;
|
|
234
243
|
|
|
235
|
-
|
|
236
|
-
* Submit a transaction on behalf of the remote account for execution on the remote chain.
|
|
237
|
-
* @param msgs - records for the transaction
|
|
238
|
-
* @returns acknowledgement string
|
|
239
|
-
*/
|
|
240
|
-
executeTx: (msgs: TypedJson[]) => Promise<string>;
|
|
244
|
+
export interface IcaAccountMethods {
|
|
241
245
|
/**
|
|
242
246
|
* Submit a transaction on behalf of the remote account for execution on the remote chain.
|
|
243
247
|
* @param msgs - records for the transaction
|
|
@@ -265,6 +269,23 @@ export interface IcaAccount {
|
|
|
265
269
|
* @throws {Error} if connection is currently active
|
|
266
270
|
*/
|
|
267
271
|
reactivate: () => Promise<void>;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Low level object that supports queries and operations for an account on a remote chain.
|
|
276
|
+
*/
|
|
277
|
+
export interface IcaAccount extends IcaAccountMethods {
|
|
278
|
+
/**
|
|
279
|
+
* @returns the address of the account on the remote chain
|
|
280
|
+
*/
|
|
281
|
+
getAddress: () => ChainAddress;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Submit a transaction on behalf of the remote account for execution on the remote chain.
|
|
285
|
+
* @param msgs - records for the transaction
|
|
286
|
+
* @returns acknowledgement string
|
|
287
|
+
*/
|
|
288
|
+
executeTx: (msgs: TypedJson[]) => Promise<string>;
|
|
268
289
|
/** @returns the address of the remote channel */
|
|
269
290
|
getRemoteAddress: () => RemoteIbcAddress;
|
|
270
291
|
/** @returns the address of the local channel */
|
|
@@ -278,16 +299,22 @@ export interface LiquidStakingMethods {
|
|
|
278
299
|
liquidStake: (amount: AmountArg) => Promise<void>;
|
|
279
300
|
}
|
|
280
301
|
|
|
302
|
+
// TODO support StakingAccountQueries
|
|
281
303
|
/** Methods supported only on Agoric chain accounts */
|
|
282
|
-
export interface LocalAccountMethods {
|
|
304
|
+
export interface LocalAccountMethods extends StakingAccountActions {
|
|
283
305
|
/** deposit payment (from zoe, for example) to the account */
|
|
284
|
-
deposit: (payment: Payment<'nat'>) => Promise<
|
|
306
|
+
deposit: (payment: Payment<'nat'>) => Promise<Amount<'nat'>>;
|
|
285
307
|
/** withdraw a Payment from the account */
|
|
286
308
|
withdraw: (amount: Amount<'nat'>) => Promise<Payment<'nat'>>;
|
|
287
309
|
/**
|
|
288
310
|
* Register a handler that receives an event each time ICS-20 transfers are
|
|
289
|
-
* sent or received by the underlying account.
|
|
290
|
-
*
|
|
311
|
+
* sent or received by the underlying account.
|
|
312
|
+
*
|
|
313
|
+
* Handler includes {@link VTransferIBCEvent} and
|
|
314
|
+
* {@link FungibleTokenPacketData} that can be used for application logic.
|
|
315
|
+
*
|
|
316
|
+
* Each account may be associated with at most one handler at a given time.
|
|
317
|
+
*
|
|
291
318
|
* Does not grant the handler the ability to intercept a transfer. For a
|
|
292
319
|
* blocking handler, aka 'IBC Hooks', leverage `registerActiveTap` from
|
|
293
320
|
* `transferMiddleware` directly.
|
|
@@ -306,6 +333,12 @@ export interface IBCMsgTransferOptions {
|
|
|
306
333
|
timeoutHeight?: MsgTransfer['timeoutHeight'];
|
|
307
334
|
timeoutTimestamp?: MsgTransfer['timeoutTimestamp'];
|
|
308
335
|
memo?: string;
|
|
336
|
+
forwardOpts?: {
|
|
337
|
+
/** The recipient address for the intermediate transfer. Defaults to 'pfm' unless specified */
|
|
338
|
+
intermediateRecipient?: ChainAddress;
|
|
339
|
+
timeout?: ForwardInfo['forward']['timeout'];
|
|
340
|
+
retries?: ForwardInfo['forward']['retries'];
|
|
341
|
+
};
|
|
309
342
|
}
|
|
310
343
|
|
|
311
344
|
/**
|
|
@@ -318,17 +351,71 @@ export interface IBCMsgTransferOptions {
|
|
|
318
351
|
* @see {OrchestrationAccountI}
|
|
319
352
|
*/
|
|
320
353
|
export type CosmosChainAccountMethods<CCI extends CosmosChainInfo> =
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
stakingTokens: {};
|
|
328
|
-
}
|
|
329
|
-
? StakingAccountActions & StakingAccountQueries
|
|
330
|
-
: {};
|
|
354
|
+
IcaAccountMethods &
|
|
355
|
+
(CCI extends {
|
|
356
|
+
stakingTokens: {};
|
|
357
|
+
}
|
|
358
|
+
? StakingAccountActions & StakingAccountQueries
|
|
359
|
+
: {});
|
|
331
360
|
|
|
332
361
|
export type ICQQueryFunction = (
|
|
333
362
|
msgs: JsonSafe<RequestQuery>[],
|
|
334
363
|
) => Promise<JsonSafe<ResponseQuery>[]>;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Message structure for PFM memo
|
|
367
|
+
*
|
|
368
|
+
* @see {@link https://github.com/cosmos/chain-registry/blob/58b603bbe01f70e911e3ad2bdb6b90c4ca665735/_memo_keys/ICS20_memo_keys.json#L38-L60}
|
|
369
|
+
*/
|
|
370
|
+
export interface ForwardInfo {
|
|
371
|
+
forward: {
|
|
372
|
+
receiver: ChainAddress['value'];
|
|
373
|
+
port: IBCPortID;
|
|
374
|
+
channel: IBCChannelID;
|
|
375
|
+
/** e.g. '10m' */
|
|
376
|
+
timeout: GoDuration;
|
|
377
|
+
/** default is 3? */
|
|
378
|
+
retries: number;
|
|
379
|
+
next?: {
|
|
380
|
+
forward: ForwardInfo;
|
|
381
|
+
};
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Object used to help build MsgTransfer parameters for IBC transfers.
|
|
387
|
+
*
|
|
388
|
+
* If `forwardInfo` is present:
|
|
389
|
+
* - it must be stringified and provided as the `memo` field value for
|
|
390
|
+
* use with `MsgTransfer`.
|
|
391
|
+
* - `receiver` will be set to `"pfm"` - purposely invalid bech32. see {@link https://github.com/cosmos/ibc-apps/blob/26f3ad8f58e4ffc7769c6766cb42b954181dc100/middleware/packet-forward-middleware/README.md#minimal-example---chain-forward-a-b-c}
|
|
392
|
+
*/
|
|
393
|
+
export type TransferRoute = {
|
|
394
|
+
/** typically, `transfer` */
|
|
395
|
+
sourcePort: string;
|
|
396
|
+
sourceChannel: IBCChannelID;
|
|
397
|
+
token: Coin;
|
|
398
|
+
} & (
|
|
399
|
+
| {
|
|
400
|
+
receiver: typeof PFM_RECEIVER | ChainAddress['value'];
|
|
401
|
+
/** contains PFM forwarding info */
|
|
402
|
+
forwardInfo: ForwardInfo;
|
|
403
|
+
}
|
|
404
|
+
| {
|
|
405
|
+
receiver: string;
|
|
406
|
+
forwardInfo?: never;
|
|
407
|
+
}
|
|
408
|
+
);
|
|
409
|
+
|
|
410
|
+
/** Single units allowed in Go time duration strings */
|
|
411
|
+
type GoDurationUnit = 'h' | 'm' | 's' | 'ms' | 'us' | 'ns';
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Type for a time duration string in Go (cosmos-sdk). For example, "1h", "3m".
|
|
415
|
+
*
|
|
416
|
+
* Note: this does not support composite values like "1h30m", "1m30s",
|
|
417
|
+
* which are allowed in Go.
|
|
418
|
+
*
|
|
419
|
+
* @see https://pkg.go.dev/time#ParseDuration
|
|
420
|
+
*/
|
|
421
|
+
export type GoDuration = `${number}${GoDurationUnit}`;
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
export const start: (zcf: ZCF<Record<string, unknown>>, privateArgs: OrchestrationPowers & {
|
|
2
2
|
marshaller: Marshaller;
|
|
3
|
+
chainInfo?: Record<string, Readonly<{
|
|
4
|
+
bech32Prefix?: string;
|
|
5
|
+
chainId: string;
|
|
6
|
+
connections?: Record<string, import("../cosmos-api.js").IBCConnectionInfo>;
|
|
7
|
+
icqEnabled?: boolean;
|
|
8
|
+
pfmEnabled?: boolean;
|
|
9
|
+
stakingTokens?: Readonly<Array<{
|
|
10
|
+
denom: string;
|
|
11
|
+
}>>;
|
|
12
|
+
}>>;
|
|
13
|
+
assetInfo?: [Denom, DenomDetail & {
|
|
14
|
+
brandKey?: string;
|
|
15
|
+
}][];
|
|
3
16
|
}, baggage: import("@agoric/vat-data").Baggage) => Promise<{
|
|
4
17
|
publicFacet: import("@endo/exo").Guarded<{
|
|
5
18
|
makeAccountsInvitation(): Promise<Invitation<import("@agoric/vow").Vow<import("@agoric/vow").Vow<{
|
|
@@ -7,7 +20,7 @@ export const start: (zcf: ZCF<Record<string, unknown>>, privateArgs: Orchestrati
|
|
|
7
20
|
[k: string]: import("@agoric/zoe/src/contractSupport/topics.js").ResolvedPublicTopic<unknown>;
|
|
8
21
|
};
|
|
9
22
|
invitationMakers: import("@endo/exo").Guarded<{
|
|
10
|
-
Proxying<IA extends unknown[]>(chainName: string, action: string, invitationArgs?: IA
|
|
23
|
+
Proxying<IA extends unknown[]>(chainName: string, action: string, invitationArgs?: IA): Promise<Invitation<unknown, IA>>;
|
|
11
24
|
}>;
|
|
12
25
|
}>>, {
|
|
13
26
|
chainName: string;
|
|
@@ -16,16 +29,20 @@ export const start: (zcf: ZCF<Record<string, unknown>>, privateArgs: Orchestrati
|
|
|
16
29
|
}>;
|
|
17
30
|
creatorFacet: import("@endo/exo").Guarded<{
|
|
18
31
|
registerChain(chainName: string, chainInfo: Readonly<{
|
|
32
|
+
bech32Prefix?: string;
|
|
19
33
|
chainId: string;
|
|
20
34
|
connections?: Record<string, import("../cosmos-api.js").IBCConnectionInfo>;
|
|
21
35
|
icqEnabled?: boolean;
|
|
36
|
+
pfmEnabled?: boolean;
|
|
22
37
|
stakingTokens?: Readonly<Array<{
|
|
23
38
|
denom: string;
|
|
24
39
|
}>>;
|
|
25
40
|
}>, connectionInfo: import("../cosmos-api.js").IBCConnectionInfo): Promise<void>;
|
|
26
|
-
registerAsset(denom:
|
|
41
|
+
registerAsset(denom: Denom, detail: DenomDetail): Promise<void>;
|
|
27
42
|
}>;
|
|
28
43
|
}>;
|
|
29
44
|
export type AutoStakeItSF = typeof start;
|
|
30
45
|
import type { OrchestrationPowers } from '../utils/start-helper.js';
|
|
46
|
+
import type { Denom } from '../types.js';
|
|
47
|
+
import type { DenomDetail } from '../types.js';
|
|
31
48
|
//# sourceMappingURL=auto-stake-it.contract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-stake-it.contract.d.ts","sourceRoot":"","sources":["auto-stake-it.contract.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auto-stake-it.contract.d.ts","sourceRoot":"","sources":["auto-stake-it.contract.js"],"names":[],"mappings":"AAmFA;gBAzDiB,UAAU;;;;;;;;;;;gBAEV,CAAC,KAAK,EAAE,WAAW,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDd;4BAGnC,OAAO,KAAK;yCAxEgC,0BAA0B;2BAC9B,aAAa;iCAAb,aAAa"}
|
|
@@ -8,10 +8,12 @@ import { preparePortfolioHolder } from '../exos/portfolio-holder-kit.js';
|
|
|
8
8
|
import { withOrchestration } from '../utils/start-helper.js';
|
|
9
9
|
import { prepareStakingTap } from './auto-stake-it-tap-kit.js';
|
|
10
10
|
import * as flows from './auto-stake-it.flows.js';
|
|
11
|
+
import { registerChainsAndAssets } from '../utils/chain-hub-helper.js';
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* @import {Zone} from '@agoric/zone';
|
|
14
15
|
* @import {OrchestrationPowers, OrchestrationTools} from '../utils/start-helper.js';
|
|
16
|
+
* @import {CosmosChainInfo, Denom, DenomDetail} from '../types.js';
|
|
15
17
|
*/
|
|
16
18
|
|
|
17
19
|
/**
|
|
@@ -23,13 +25,15 @@ import * as flows from './auto-stake-it.flows.js';
|
|
|
23
25
|
* @param {ZCF} zcf
|
|
24
26
|
* @param {OrchestrationPowers & {
|
|
25
27
|
* marshaller: Marshaller;
|
|
26
|
-
*
|
|
28
|
+
* chainInfo?: Record<string, CosmosChainInfo>;
|
|
29
|
+
* assetInfo?: [Denom, DenomDetail & { brandKey?: string }][];
|
|
30
|
+
* }} privateArgs
|
|
27
31
|
* @param {Zone} zone
|
|
28
32
|
* @param {OrchestrationTools} tools
|
|
29
33
|
*/
|
|
30
34
|
const contract = async (
|
|
31
35
|
zcf,
|
|
32
|
-
|
|
36
|
+
privateArgs,
|
|
33
37
|
zone,
|
|
34
38
|
{ chainHub, orchestrateAll, vowTools },
|
|
35
39
|
) => {
|
|
@@ -67,6 +71,13 @@ const contract = async (
|
|
|
67
71
|
|
|
68
72
|
const creatorFacet = prepareChainHubAdmin(zone, chainHub);
|
|
69
73
|
|
|
74
|
+
registerChainsAndAssets(
|
|
75
|
+
chainHub,
|
|
76
|
+
zcf.getTerms().brands,
|
|
77
|
+
privateArgs.chainInfo,
|
|
78
|
+
privateArgs.assetInfo,
|
|
79
|
+
);
|
|
80
|
+
|
|
70
81
|
return { publicFacet, creatorFacet };
|
|
71
82
|
};
|
|
72
83
|
|
|
@@ -10,7 +10,7 @@ export function makeAccounts(orch: Orchestrator, { makeStakingTap, makePortfolio
|
|
|
10
10
|
[k: string]: ResolvedPublicTopic<unknown>;
|
|
11
11
|
};
|
|
12
12
|
invitationMakers: import("@endo/exo").Guarded<{
|
|
13
|
-
Proxying<IA extends unknown[]>(chainName: string, action: string, invitationArgs?: IA
|
|
13
|
+
Proxying<IA extends unknown[]>(chainName: string, action: string, invitationArgs?: IA): Promise<Invitation<unknown, IA>>;
|
|
14
14
|
}>;
|
|
15
15
|
}>>;
|
|
16
16
|
import type { Orchestrator } from '@agoric/orchestration';
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
export const start: (zcf: ZCF<Record<string, unknown>>, privateArgs: OrchestrationPowers & {
|
|
2
2
|
marshaller: Marshaller;
|
|
3
|
+
chainInfo?: Record<string, Readonly<{
|
|
4
|
+
bech32Prefix?: string;
|
|
5
|
+
chainId: string;
|
|
6
|
+
connections?: Record<string, import("@agoric/orchestration").IBCConnectionInfo>;
|
|
7
|
+
icqEnabled?: boolean;
|
|
8
|
+
pfmEnabled?: boolean;
|
|
9
|
+
stakingTokens?: Readonly<Array<{
|
|
10
|
+
denom: string;
|
|
11
|
+
}>>;
|
|
12
|
+
}>>;
|
|
13
|
+
assetInfo?: [Denom, DenomDetail & {
|
|
14
|
+
brandKey?: string;
|
|
15
|
+
}][];
|
|
3
16
|
}, baggage: import("@agoric/vat-data").Baggage) => Promise<{
|
|
4
17
|
publicFacet: import("@endo/exo").Guarded<{
|
|
5
18
|
makeOrchAccountInvitation(): Promise<Invitation<import("@agoric/vow").Vow<import("../utils/zoe-tools.js").ResolvedContinuingOfferResult>, {
|
|
@@ -10,7 +23,7 @@ export const start: (zcf: ZCF<Record<string, unknown>>, privateArgs: Orchestrati
|
|
|
10
23
|
[k: string]: import("@agoric/zoe/src/contractSupport/topics.js").ResolvedPublicTopic<unknown>;
|
|
11
24
|
};
|
|
12
25
|
invitationMakers: import("@endo/exo").Guarded<{
|
|
13
|
-
Proxying<IA extends unknown[]>(chainName: string, action: string, invitationArgs?: IA
|
|
26
|
+
Proxying<IA extends unknown[]>(chainName: string, action: string, invitationArgs?: IA): Promise<Invitation<unknown, IA>>;
|
|
14
27
|
}>;
|
|
15
28
|
}>>, {
|
|
16
29
|
chainNames: string[];
|
|
@@ -19,4 +32,6 @@ export const start: (zcf: ZCF<Record<string, unknown>>, privateArgs: Orchestrati
|
|
|
19
32
|
}>;
|
|
20
33
|
export type BasicFlowsSF = typeof start;
|
|
21
34
|
import type { OrchestrationPowers } from '../utils/start-helper.js';
|
|
35
|
+
import type { Denom } from '@agoric/orchestration';
|
|
36
|
+
import type { DenomDetail } from '@agoric/orchestration';
|
|
22
37
|
//# sourceMappingURL=basic-flows.contract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic-flows.contract.d.ts","sourceRoot":"","sources":["basic-flows.contract.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"basic-flows.contract.d.ts","sourceRoot":"","sources":["basic-flows.contract.js"],"names":[],"mappings":"AAwEA;gBApDiB,UAAU;;;;;;;;;;;gBAEV,CAAC,KAAK,EAAE,WAAW,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE;;;;;;;;;;;;;;;;;GAkDd;2BAGnC,OAAO,KAAK;yCA7DgC,0BAA0B;2BAD9B,uBAAuB;iCAAvB,uBAAuB"}
|
|
@@ -6,10 +6,12 @@ import { InvitationShape } from '@agoric/zoe/src/typeGuards.js';
|
|
|
6
6
|
import { M } from '@endo/patterns';
|
|
7
7
|
import { preparePortfolioHolder } from '../exos/portfolio-holder-kit.js';
|
|
8
8
|
import { withOrchestration } from '../utils/start-helper.js';
|
|
9
|
+
import { registerChainsAndAssets } from '../utils/chain-hub-helper.js';
|
|
9
10
|
import * as flows from './basic-flows.flows.js';
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* @import {Zone} from '@agoric/zone';
|
|
14
|
+
* @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration';
|
|
13
15
|
* @import {OrchestrationPowers, OrchestrationTools} from '../utils/start-helper.js';
|
|
14
16
|
*/
|
|
15
17
|
|
|
@@ -17,15 +19,17 @@ import * as flows from './basic-flows.flows.js';
|
|
|
17
19
|
* @param {ZCF} zcf
|
|
18
20
|
* @param {OrchestrationPowers & {
|
|
19
21
|
* marshaller: Marshaller;
|
|
20
|
-
*
|
|
22
|
+
* chainInfo?: Record<string, CosmosChainInfo>;
|
|
23
|
+
* assetInfo?: [Denom, DenomDetail & { brandKey?: string }][];
|
|
24
|
+
* }} privateArgs
|
|
21
25
|
* @param {Zone} zone
|
|
22
26
|
* @param {OrchestrationTools} tools
|
|
23
27
|
*/
|
|
24
28
|
const contract = async (
|
|
25
29
|
zcf,
|
|
26
|
-
|
|
30
|
+
privateArgs,
|
|
27
31
|
zone,
|
|
28
|
-
{ orchestrateAll, vowTools },
|
|
32
|
+
{ chainHub, orchestrateAll, vowTools },
|
|
29
33
|
) => {
|
|
30
34
|
const makePortfolioHolder = preparePortfolioHolder(
|
|
31
35
|
zone.subZone('portfolio'),
|
|
@@ -56,6 +60,13 @@ const contract = async (
|
|
|
56
60
|
},
|
|
57
61
|
);
|
|
58
62
|
|
|
63
|
+
registerChainsAndAssets(
|
|
64
|
+
chainHub,
|
|
65
|
+
zcf.getTerms().brands,
|
|
66
|
+
privateArgs.chainInfo,
|
|
67
|
+
privateArgs.assetInfo,
|
|
68
|
+
);
|
|
69
|
+
|
|
59
70
|
return { publicFacet };
|
|
60
71
|
};
|
|
61
72
|
|
|
@@ -10,7 +10,7 @@ export function makePortfolioAccount(orch: Orchestrator, { makePortfolioHolder }
|
|
|
10
10
|
[k: string]: ResolvedPublicTopic<unknown>;
|
|
11
11
|
};
|
|
12
12
|
invitationMakers: import("@endo/exo").Guarded<{
|
|
13
|
-
Proxying<IA extends unknown[]>(chainName: string, action: string, invitationArgs?: IA
|
|
13
|
+
Proxying<IA extends unknown[]>(chainName: string, action: string, invitationArgs?: IA): Promise<Invitation<unknown, IA>>;
|
|
14
14
|
}>;
|
|
15
15
|
}>>;
|
|
16
16
|
import type { Orchestrator } from '@agoric/orchestration';
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
* @import {Vow} from '@agoric/vow';
|
|
3
3
|
* @import {Zone} from '@agoric/zone';
|
|
4
4
|
* @import {OrchestrationPowers, OrchestrationTools} from '../utils/start-helper.js';
|
|
5
|
+
* @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration';
|
|
5
6
|
*/
|
|
6
7
|
export const SingleNatAmountRecord: import("@endo/patterns").Matcher;
|
|
7
8
|
export function contract(zcf: ZCF, privateArgs: OrchestrationPowers & {
|
|
8
9
|
marshaller: Marshaller;
|
|
10
|
+
chainInfo?: Record<string, CosmosChainInfo>;
|
|
11
|
+
assetInfo?: [Denom, DenomDetail & {
|
|
12
|
+
brandKey?: string;
|
|
13
|
+
}][];
|
|
9
14
|
}, zone: Zone, { chainHub, orchestrateAll, vowTools, zoeTools }: OrchestrationTools): Promise<{
|
|
10
15
|
publicFacet: import("@endo/exo").Guarded<{
|
|
11
16
|
makeSendInvitation(): Promise<Invitation<Vow<void>, {
|
|
@@ -14,12 +19,25 @@ export function contract(zcf: ZCF, privateArgs: OrchestrationPowers & {
|
|
|
14
19
|
}>>;
|
|
15
20
|
}>;
|
|
16
21
|
creatorFacet: import("@endo/exo").Guarded<{
|
|
17
|
-
registerChain(chainName: string, chainInfo:
|
|
18
|
-
registerAsset(denom:
|
|
22
|
+
registerChain(chainName: string, chainInfo: CosmosChainInfo, connectionInfo: import("@agoric/orchestration").IBCConnectionInfo): Promise<void>;
|
|
23
|
+
registerAsset(denom: Denom, detail: DenomDetail): Promise<void>;
|
|
19
24
|
}>;
|
|
20
25
|
}>;
|
|
21
26
|
export const start: (zcf: ZCF<Record<string, unknown>>, privateArgs: OrchestrationPowers & {
|
|
22
27
|
marshaller: Marshaller;
|
|
28
|
+
chainInfo?: Record<string, Readonly<{
|
|
29
|
+
bech32Prefix?: string;
|
|
30
|
+
chainId: string;
|
|
31
|
+
connections?: Record<string, import("@agoric/orchestration").IBCConnectionInfo>;
|
|
32
|
+
icqEnabled?: boolean;
|
|
33
|
+
pfmEnabled?: boolean;
|
|
34
|
+
stakingTokens?: Readonly<Array<{
|
|
35
|
+
denom: string;
|
|
36
|
+
}>>;
|
|
37
|
+
}>>;
|
|
38
|
+
assetInfo?: [Denom, DenomDetail & {
|
|
39
|
+
brandKey?: string;
|
|
40
|
+
}][];
|
|
23
41
|
}, baggage: import("@agoric/vat-data").Baggage) => Promise<{
|
|
24
42
|
publicFacet: import("@endo/exo").Guarded<{
|
|
25
43
|
makeSendInvitation(): Promise<Invitation<Vow<void>, {
|
|
@@ -29,17 +47,22 @@ export const start: (zcf: ZCF<Record<string, unknown>>, privateArgs: Orchestrati
|
|
|
29
47
|
}>;
|
|
30
48
|
creatorFacet: import("@endo/exo").Guarded<{
|
|
31
49
|
registerChain(chainName: string, chainInfo: Readonly<{
|
|
50
|
+
bech32Prefix?: string;
|
|
32
51
|
chainId: string;
|
|
33
|
-
connections?: Record<string, import("
|
|
52
|
+
connections?: Record<string, import("@agoric/orchestration").IBCConnectionInfo>;
|
|
34
53
|
icqEnabled?: boolean;
|
|
54
|
+
pfmEnabled?: boolean;
|
|
35
55
|
stakingTokens?: Readonly<Array<{
|
|
36
56
|
denom: string;
|
|
37
57
|
}>>;
|
|
38
|
-
}>, connectionInfo: import("
|
|
39
|
-
registerAsset(denom:
|
|
58
|
+
}>, connectionInfo: import("@agoric/orchestration").IBCConnectionInfo): Promise<void>;
|
|
59
|
+
registerAsset(denom: Denom, detail: DenomDetail): Promise<void>;
|
|
40
60
|
}>;
|
|
41
61
|
}>;
|
|
42
62
|
import type { OrchestrationPowers } from '../utils/start-helper.js';
|
|
63
|
+
import type { CosmosChainInfo } from '@agoric/orchestration';
|
|
64
|
+
import type { Denom } from '@agoric/orchestration';
|
|
65
|
+
import type { DenomDetail } from '@agoric/orchestration';
|
|
43
66
|
import type { Zone } from '@agoric/zone';
|
|
44
67
|
import type { OrchestrationTools } from '../utils/start-helper.js';
|
|
45
68
|
import type { Vow } from '@agoric/vow';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-anywhere.contract.d.ts","sourceRoot":"","sources":["send-anywhere.contract.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"send-anywhere.contract.d.ts","sourceRoot":"","sources":["send-anywhere.contract.js"],"names":[],"mappings":"AAUA;;;;;GAKG;AAEH,qEAKE;AAeK,8BATI,GAAG,eACH,mBAAmB,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC5C,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;CAC5D,QACO,IAAI,oDACJ,kBAAkB;;;;;;;;;;;GA6D5B;AAGD;gBArEiB,UAAU;;;;;;;;;;;gBAEV,CAAC,KAAK,EAAE,WAAW,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE;;;;;;;;;;;;;;;;;;;;;GAmEd;yCAtFS,0BAA0B;qCAC9B,uBAAuB;2BAAvB,uBAAuB;iCAAvB,uBAAuB;0BAFtD,cAAc;wCACqB,0BAA0B;yBAF9D,aAAa"}
|
|
@@ -4,6 +4,7 @@ import { M } from '@endo/patterns';
|
|
|
4
4
|
import { prepareChainHubAdmin } from '../exos/chain-hub-admin.js';
|
|
5
5
|
import { AnyNatAmountShape } from '../typeGuards.js';
|
|
6
6
|
import { withOrchestration } from '../utils/start-helper.js';
|
|
7
|
+
import { registerChainsAndAssets } from '../utils/chain-hub-helper.js';
|
|
7
8
|
import * as flows from './send-anywhere.flows.js';
|
|
8
9
|
import * as sharedFlows from './shared.flows.js';
|
|
9
10
|
|
|
@@ -11,6 +12,7 @@ import * as sharedFlows from './shared.flows.js';
|
|
|
11
12
|
* @import {Vow} from '@agoric/vow';
|
|
12
13
|
* @import {Zone} from '@agoric/zone';
|
|
13
14
|
* @import {OrchestrationPowers, OrchestrationTools} from '../utils/start-helper.js';
|
|
15
|
+
* @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration';
|
|
14
16
|
*/
|
|
15
17
|
|
|
16
18
|
export const SingleNatAmountRecord = M.and(
|
|
@@ -27,6 +29,8 @@ harden(SingleNatAmountRecord);
|
|
|
27
29
|
* @param {ZCF} zcf
|
|
28
30
|
* @param {OrchestrationPowers & {
|
|
29
31
|
* marshaller: Marshaller;
|
|
32
|
+
* chainInfo?: Record<string, CosmosChainInfo>;
|
|
33
|
+
* assetInfo?: [Denom, DenomDetail & { brandKey?: string }][];
|
|
30
34
|
* }} privateArgs
|
|
31
35
|
* @param {Zone} zone
|
|
32
36
|
* @param {OrchestrationTools} tools
|
|
@@ -82,6 +86,13 @@ export const contract = async (
|
|
|
82
86
|
},
|
|
83
87
|
);
|
|
84
88
|
|
|
89
|
+
registerChainsAndAssets(
|
|
90
|
+
chainHub,
|
|
91
|
+
zcf.getTerms().brands,
|
|
92
|
+
privateArgs.chainInfo,
|
|
93
|
+
privateArgs.assetInfo,
|
|
94
|
+
);
|
|
95
|
+
|
|
85
96
|
return { publicFacet, creatorFacet };
|
|
86
97
|
};
|
|
87
98
|
harden(contract);
|
|
@@ -17,7 +17,7 @@ export function start(zcf: ZCF, privateArgs: {
|
|
|
17
17
|
getPublicTopics(): import("@agoric/vow").Vow<import("@agoric/async-flow").HostInterface<Record<string, import("@agoric/zoe/src/contractSupport/topics.js").ResolvedPublicTopic<unknown>>>>;
|
|
18
18
|
delegate(validatorAddress: string, ertpAmount: Amount<"nat">): import("@agoric/vow").Vow<Record<unknown, unknown>>;
|
|
19
19
|
undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): import("@agoric/vow").Vow<void | import("@agoric/time").TimestampRecord>;
|
|
20
|
-
deposit(payment: globalThis.Payment<"nat">): import("@agoric/vow").Vow<
|
|
20
|
+
deposit(payment: globalThis.Payment<"nat">): import("@agoric/vow").Vow<import("@agoric/ertp").NatAmount>;
|
|
21
21
|
withdraw(amount: import("@agoric/ertp").NatAmount): import("@agoric/vow").Vow<globalThis.Payment<"nat">>;
|
|
22
22
|
executeTx(messages: {
|
|
23
23
|
'@type': string;
|
|
@@ -27,7 +27,7 @@ export function start(zcf: ZCF, privateArgs: {
|
|
|
27
27
|
getAddress(): import("../orchestration-api.js").ChainAddress;
|
|
28
28
|
send(toAccount: import("../orchestration-api.js").ChainAddress, amounts: import("../orchestration-api.js").AmountArg): import("@agoric/vow").Vow<void>;
|
|
29
29
|
sendAll(toAccount: import("../orchestration-api.js").ChainAddress, amounts: import("../orchestration-api.js").AmountArg[]): import("@agoric/vow").Vow<void>;
|
|
30
|
-
transfer(destination: import("../orchestration-api.js").ChainAddress, amount: import("../orchestration-api.js").AmountArg, opts?: import("../cosmos-api.js").IBCMsgTransferOptions
|
|
30
|
+
transfer(destination: import("../orchestration-api.js").ChainAddress, amount: import("../orchestration-api.js").AmountArg, opts?: import("../cosmos-api.js").IBCMsgTransferOptions): import("@agoric/vow").Vow<any>;
|
|
31
31
|
transferSteps(amount: import("../orchestration-api.js").AmountArg, msg: import("../orchestration-api.js").TransferMsg): import("@agoric/vow").Vow<void>;
|
|
32
32
|
sendThenWaitForAck(packetSender: Remote<import("../exos/packet-tools.js").PacketSender>, opts?: import("../exos/packet-tools.js").PacketOptions | undefined): import("@agoric/async-flow").HostInterface<import("@agoric/vow").Vow<any>>;
|
|
33
33
|
matchFirstPacket(args_0?: import("@agoric/vow").EVow<globalThis.Pattern>): import("@agoric/async-flow").HostInterface<import("@agoric/vow").Vow<{
|
|
@@ -105,6 +105,11 @@ export function start(zcf: ZCF<StakeIcaTerms>, privateArgs: {
|
|
|
105
105
|
}[]>;
|
|
106
106
|
getReward(validator: import("../cosmos-api.js").CosmosValidatorAddress): import("@agoric/vow").Vow<import("../orchestration-api.js").DenomAmount[]>;
|
|
107
107
|
getRewards(): import("@agoric/vow").Vow<import("@agoric/async-flow").HostInterface<import("../cosmos-api.js").CosmosRewardsResponse>>;
|
|
108
|
+
executeEncodedTx(msgs: {
|
|
109
|
+
$typeUrl?: "/google.protobuf.Any" | string | undefined;
|
|
110
|
+
typeUrl: string;
|
|
111
|
+
value: string;
|
|
112
|
+
}[], opts?: Partial<Omit<import("@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js").TxBody, "messages">> | undefined): import("@agoric/vow").Vow<string>;
|
|
108
113
|
}>>;
|
|
109
114
|
makeAccountInvitationMaker(): Promise<Invitation<ResolvedContinuingOfferResult, undefined>>;
|
|
110
115
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stake-ica.contract.d.ts","sourceRoot":"","sources":["stake-ica.contract.js"],"names":[],"mappings":"AAgBA;;;;;;;GAOG;AAEH,yCAAyC;AACzC,mBADW,YAAY,CAAC,OAAO,KAAK,CAAC,CAelC;AAEH;;;;;;cAAsD;AAuB/C,2BAVI,GAAG,CAAC,aAAa,CAAC,eAClB;IACN,WAAW,EAAE,OAAO,OAAO,CAAC,CAAC;IAC7B,uBAAuB,EAAE,uBAAuB,CAAC;IACjD,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,YAAY,CAAC;CACrB,WACO,OAAO
|
|
1
|
+
{"version":3,"file":"stake-ica.contract.d.ts","sourceRoot":"","sources":["stake-ica.contract.js"],"names":[],"mappings":"AAgBA;;;;;;;GAOG;AAEH,yCAAyC;AACzC,mBADW,YAAY,CAAC,OAAO,KAAK,CAAC,CAelC;AAEH;;;;;;cAAsD;AAuB/C,2BAVI,GAAG,CAAC,aAAa,CAAC,eAClB;IACN,WAAW,EAAE,OAAO,OAAO,CAAC,CAAC;IAC7B,uBAAuB,EAAE,uBAAuB,CAAC;IACjD,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,YAAY,CAAC;CACrB,WACO,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyGjB;4BA1HY;IACR,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,eAAe,CAAC;IAClC,sBAAsB,EAAE,eAAe,CAAC;IACxC,UAAU,EAAE,OAAO,CAAC;CACrB;yBAwHU,OAAO,KAAK;6BAxJiB,cAAc;4BADhC,kBAAkB;6CAIwB,aAAa;kCAFjD,cAAc;6BAHnB,kBAAkB;mDAII,uBAAuB;qCAF5B,cAAc"}
|
|
@@ -8,9 +8,11 @@ export const start: (zcf: ZCF<Record<string, unknown>>, privateArgs: Orchestrati
|
|
|
8
8
|
}>;
|
|
9
9
|
creatorFacet: import("@endo/exo").Guarded<{
|
|
10
10
|
registerChain(chainName: string, chainInfo: Readonly<{
|
|
11
|
+
bech32Prefix?: string;
|
|
11
12
|
chainId: string;
|
|
12
13
|
connections?: Record<string, import("../cosmos-api.js").IBCConnectionInfo>;
|
|
13
14
|
icqEnabled?: boolean;
|
|
15
|
+
pfmEnabled?: boolean;
|
|
14
16
|
stakingTokens?: Readonly<Array<{
|
|
15
17
|
denom: string;
|
|
16
18
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staking-combinations.contract.d.ts","sourceRoot":"","sources":["staking-combinations.contract.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"staking-combinations.contract.d.ts","sourceRoot":"","sources":["staking-combinations.contract.js"],"names":[],"mappings":"AAiKA;gBA5HiB,UAAU;;;;;;;;;;;;;;;;;;;;GA4HsB;yCA7IS,0BAA0B"}
|
|
@@ -75,7 +75,6 @@ const contract = async (
|
|
|
75
75
|
* @param {{ validator: CosmosValidatorAddress }} offerArgs
|
|
76
76
|
*/
|
|
77
77
|
(seat, { validator }) =>
|
|
78
|
-
// eslint-disable-next-line no-use-before-define -- defined by orchestrateAll, necessarily after this
|
|
79
78
|
orchFns.depositAndDelegate(account, seat, validator),
|
|
80
79
|
'Deposit and delegate',
|
|
81
80
|
undefined,
|
|
@@ -98,7 +97,6 @@ const contract = async (
|
|
|
98
97
|
|
|
99
98
|
return zcf.makeInvitation(
|
|
100
99
|
() =>
|
|
101
|
-
// eslint-disable-next-line no-use-before-define -- defined by orchestrateAll, necessarily after this
|
|
102
100
|
orchFns.undelegateAndTransfer(account, {
|
|
103
101
|
delegations,
|
|
104
102
|
destination,
|
|
@@ -133,6 +131,7 @@ const contract = async (
|
|
|
133
131
|
);
|
|
134
132
|
|
|
135
133
|
const orchFns = orchestrateAll(flows, {
|
|
134
|
+
chainHub,
|
|
136
135
|
sharedLocalAccountP,
|
|
137
136
|
makeCombineInvitationMakers,
|
|
138
137
|
makeExtraInvitationMaker,
|
|
@@ -4,7 +4,8 @@ export function makeAccount(orch: Orchestrator, ctx: {
|
|
|
4
4
|
}, _seat: ZCFSeat, { chainName }: {
|
|
5
5
|
chainName: string;
|
|
6
6
|
}): Promise<ResolvedContinuingOfferResult>;
|
|
7
|
-
export function depositAndDelegate(orch: Orchestrator, { sharedLocalAccountP, zoeTools }: {
|
|
7
|
+
export function depositAndDelegate(orch: Orchestrator, { chainHub, sharedLocalAccountP, zoeTools }: {
|
|
8
|
+
chainHub: GuestInterface<ChainHub>;
|
|
8
9
|
sharedLocalAccountP: Promise<GuestInterface<LocalOrchestrationAccountKit["holder"]>>;
|
|
9
10
|
zoeTools: GuestInterface<ZoeTools>;
|
|
10
11
|
}, account: GuestInterface<CosmosOrchestrationAccount>, seat: ZCFSeat, validator: CosmosValidatorAddress): Promise<void>;
|
|
@@ -19,8 +20,9 @@ import type { Orchestrator } from '../types.js';
|
|
|
19
20
|
import type { MakeCombineInvitationMakers } from '../exos/combine-invitation-makers.js';
|
|
20
21
|
import type { InvitationMakers } from '@agoric/smart-wallet/src/types.js';
|
|
21
22
|
import type { ResolvedContinuingOfferResult } from '../utils/zoe-tools.js';
|
|
22
|
-
import type {
|
|
23
|
+
import type { ChainHub } from '../types.js';
|
|
23
24
|
import type { GuestInterface } from '@agoric/async-flow';
|
|
25
|
+
import type { LocalOrchestrationAccountKit } from '../exos/local-orchestration-account.js';
|
|
24
26
|
import type { ZoeTools } from '../utils/zoe-tools.js';
|
|
25
27
|
import type { CosmosOrchestrationAccount } from '../exos/cosmos-orchestration-account.js';
|
|
26
28
|
import type { CosmosValidatorAddress } from '../types.js';
|