@agoric/orchestration 0.2.0-upgrade-20-dev-ef71cfd.0 → 0.2.0-upgrade-19-devnet-dev-5428c4d.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 +27 -29
- package/src/chain-capabilities.d.ts +12 -7
- package/src/chain-capabilities.d.ts.map +1 -1
- package/src/chain-capabilities.js +21 -46
- package/src/chain-info.d.ts +97 -839
- package/src/chain-info.d.ts.map +1 -1
- package/src/chain-info.js +12 -38
- package/src/cosmos-api.d.ts +13 -41
- package/src/cosmos-api.d.ts.map +1 -1
- package/src/cosmos-api.ts +16 -52
- package/src/ethereum-api.d.ts +5 -6
- package/src/ethereum-api.d.ts.map +1 -1
- package/src/ethereum-api.ts +5 -7
- package/src/examples/auto-stake-it-tap-kit.d.ts +4 -4
- package/src/examples/auto-stake-it-tap-kit.d.ts.map +1 -1
- package/src/examples/auto-stake-it-tap-kit.js +8 -8
- package/src/examples/auto-stake-it.contract.d.ts +23 -5
- package/src/examples/auto-stake-it.contract.d.ts.map +1 -1
- package/src/examples/auto-stake-it.contract.js +0 -1
- package/src/examples/basic-flows.contract.d.ts +13 -5
- package/src/examples/basic-flows.contract.d.ts.map +1 -1
- package/src/examples/basic-flows.contract.js +0 -1
- package/src/examples/send-anywhere.contract.d.ts +27 -7
- package/src/examples/send-anywhere.contract.d.ts.map +1 -1
- package/src/examples/send-anywhere.contract.js +12 -40
- package/src/examples/send-anywhere.flows.d.ts +3 -563
- package/src/examples/send-anywhere.flows.d.ts.map +1 -1
- package/src/examples/send-anywhere.flows.js +31 -112
- package/src/examples/stake-bld.contract.d.ts +7 -8
- package/src/examples/stake-bld.contract.d.ts.map +1 -1
- package/src/examples/stake-bld.contract.js +1 -3
- package/src/examples/stake-ica.contract.d.ts +13 -82
- package/src/examples/stake-ica.contract.d.ts.map +1 -1
- package/src/examples/stake-ica.contract.js +0 -1
- package/src/examples/staking-combinations.contract.d.ts +11 -3
- package/src/examples/staking-combinations.contract.d.ts.map +1 -1
- package/src/examples/staking-combinations.contract.js +4 -5
- package/src/examples/staking-combinations.flows.d.ts +2 -2
- package/src/examples/staking-combinations.flows.d.ts.map +1 -1
- package/src/examples/staking-combinations.flows.js +4 -4
- package/src/examples/swap.contract.d.ts +13 -4
- package/src/examples/swap.contract.d.ts.map +1 -1
- package/src/examples/swap.contract.js +2 -2
- package/src/examples/unbond.contract.d.ts +2 -2
- package/src/exos/README.md +0 -1
- package/src/exos/chain-hub-admin.d.ts +9 -9
- package/src/exos/chain-hub-admin.d.ts.map +1 -1
- package/src/exos/chain-hub-admin.js +17 -17
- package/src/exos/chain-hub.d.ts +17 -69
- package/src/exos/chain-hub.d.ts.map +1 -1
- package/src/exos/chain-hub.js +55 -289
- package/src/exos/cosmos-orchestration-account.d.ts +17 -86
- package/src/exos/cosmos-orchestration-account.d.ts.map +1 -1
- package/src/exos/cosmos-orchestration-account.js +26 -111
- package/src/exos/ibc-packet.d.ts +0 -1
- package/src/exos/ibc-packet.d.ts.map +1 -1
- package/src/exos/ibc-packet.js +1 -8
- package/src/exos/ica-account-kit.d.ts +4 -8
- package/src/exos/ica-account-kit.d.ts.map +1 -1
- package/src/exos/ica-account-kit.js +5 -8
- package/src/exos/local-chain-facade.d.ts +23 -3
- package/src/exos/local-chain-facade.d.ts.map +1 -1
- package/src/exos/local-chain-facade.js +3 -3
- package/src/exos/local-orchestration-account.d.ts +12 -16
- package/src/exos/local-orchestration-account.d.ts.map +1 -1
- package/src/exos/local-orchestration-account.js +8 -13
- package/src/exos/orchestrator.d.ts +15 -5
- package/src/exos/orchestrator.d.ts.map +1 -1
- package/src/exos/orchestrator.js +10 -9
- package/src/exos/packet-tools.d.ts +1 -1
- package/src/exos/packet-tools.d.ts.map +1 -1
- package/src/exos/packet-tools.js +12 -17
- package/src/exos/portfolio-holder-kit.d.ts +0 -1
- package/src/exos/portfolio-holder-kit.d.ts.map +1 -1
- package/src/exos/portfolio-holder-kit.js +0 -1
- package/src/exos/remote-chain-facade.d.ts +15 -5
- package/src/exos/remote-chain-facade.d.ts.map +1 -1
- package/src/exos/remote-chain-facade.js +13 -23
- package/src/facade.js +1 -1
- package/src/fetched-chain-info.d.ts +86 -676
- package/src/fetched-chain-info.js +41 -553
- package/src/fixtures/query-flows.contract.d.ts +4 -5
- package/src/fixtures/query-flows.contract.d.ts.map +1 -1
- package/src/fixtures/query-flows.contract.js +0 -1
- package/src/orchestration-api.d.ts +16 -73
- package/src/orchestration-api.d.ts.map +1 -1
- package/src/orchestration-api.ts +19 -89
- package/src/proposals/start-send-anywhere.js +0 -4
- package/src/typeGuards.d.ts +4 -20
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +13 -52
- package/src/types.d.ts +1 -1
- package/src/types.d.ts.map +1 -1
- package/src/types.ts +1 -2
- package/src/utils/address.d.ts +3 -13
- package/src/utils/address.d.ts.map +1 -1
- package/src/utils/address.js +5 -97
- package/src/utils/chain-hub-helper.d.ts +2 -2
- package/src/utils/chain-hub-helper.d.ts.map +1 -1
- package/src/utils/chain-hub-helper.js +5 -9
- package/src/utils/cosmos.d.ts +1 -1
- package/src/utils/cosmos.d.ts.map +1 -1
- package/src/utils/cosmos.js +2 -2
- package/src/utils/orchestrationAccount.js +5 -6
- package/src/utils/registry.d.ts +12 -2
- package/src/utils/registry.d.ts.map +1 -1
- package/src/utils/registry.js +2 -4
- package/src/utils/start-helper.d.ts +6 -20
- package/src/utils/start-helper.d.ts.map +1 -1
- package/src/utils/start-helper.js +2 -13
- package/src/utils/zoe-tools.d.ts +2 -2
- package/src/utils/zoe-tools.d.ts.map +1 -1
- package/src/utils/zoe-tools.js +2 -5
- package/tools/ibc-mocks.d.ts +5 -6
- package/tools/ibc-mocks.d.ts.map +1 -1
- package/tools/ibc-mocks.ts +4 -10
- package/tools/make-test-address.d.ts +1 -2
- package/tools/make-test-address.d.ts.map +1 -1
- package/tools/make-test-address.js +2 -6
- package/src/cctp-chain-info.d.ts +0 -65
- package/src/cctp-chain-info.d.ts.map +0 -1
- package/src/cctp-chain-info.js +0 -52
- package/src/utils/chain-info.d.ts +0 -5
- package/src/utils/chain-info.d.ts.map +0 -1
- package/src/utils/chain-info.js +0 -11
package/src/chain-info.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain-info.d.ts","sourceRoot":"","sources":["chain-info.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chain-info.d.ts","sourceRoot":"","sources":["chain-info.js"],"names":[],"mappings":"AAkCO,sDALI,IAAI,CAAC,SAAS,CAAC,QACf,MAAM,UACN,eAAe,EAAE,iBAS3B;AAYM,gDAPI,IAAI,CAAC,SAAS,CAAC,QACf,MAAM,aACN,eAAe,QACf,CAAC,GAAG,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,uBAC/B,GAAG,CAAC,MAAM,CAAC,iBA6CrB;AAQM,sDAHI,IAAI,CAAC,OAAO,cAAc,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC,QACpD,CAAC,GAAG,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,iBAOzC;;;;;wBA9FY,eAAe,GAAG,YAAY;0BAQ9B,OAAO,WAAW;+BAdF,cAAc;qCADiD,YAAY;qCAAZ,YAAY;kCAAZ,YAAY;AAAxG,4GAA4G;AAC5G,+CAA+C;AAE/C;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEE"}
|
package/src/chain-info.js
CHANGED
|
@@ -1,40 +1,21 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Info used to build a {@link ChainHub} and return chainInfo from the
|
|
3
|
-
* {@link Orchestrator} via the {@link Chain} object.
|
|
4
|
-
*
|
|
5
|
-
* Includes {@link BaseChainInfo} and {@link CosmosChainInfo}
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
1
|
import { E } from '@endo/far';
|
|
9
2
|
import { M, mustMatch } from '@endo/patterns';
|
|
10
3
|
import { HubName, normalizeConnectionInfo } from './exos/chain-hub.js';
|
|
11
4
|
import fetchedChainInfo from './fetched-chain-info.js'; // Refresh with scripts/refresh-chain-info.ts
|
|
12
|
-
import {
|
|
13
|
-
import cctpChainInfo from './cctp-chain-info.js';
|
|
14
|
-
import { withChainCapabilities } from './chain-capabilities.js';
|
|
5
|
+
import { CosmosAssetInfoShape, CosmosChainInfoShape } from './typeGuards.js';
|
|
15
6
|
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
* @import {NameAdmin} from '@agoric/vats';
|
|
19
|
-
* @import {ChainInfo} from './orchestration-api.ts';
|
|
20
|
-
*/
|
|
7
|
+
/** @import {Chain, CosmosAssetInfo, CosmosChainInfo, EthChainInfo, IBCConnectionInfo} from './types.js'; */
|
|
8
|
+
/** @import {NameAdmin} from '@agoric/vats'; */
|
|
21
9
|
|
|
22
10
|
/**
|
|
23
|
-
*
|
|
11
|
+
* Info used to build a {@link Chain} object - channel, connection, and denom
|
|
12
|
+
* info.
|
|
24
13
|
*
|
|
25
|
-
* @
|
|
26
|
-
* @see {@link https://github.com/ChainAgnostic/CAIPs/blob/c599f7601d0ce83e6dd9f350c6c21d158d56fd6d/CAIPs/caip-2.md}
|
|
14
|
+
* @typedef {CosmosChainInfo | EthChainInfo} ChainInfo
|
|
27
15
|
*/
|
|
28
|
-
export const KnownNamespace = /** @type {const} */ ({
|
|
29
|
-
cosmos: 'cosmos',
|
|
30
|
-
eip155: 'eip155',
|
|
31
|
-
solana: 'solana',
|
|
32
|
-
});
|
|
33
|
-
harden(KnownNamespace);
|
|
34
16
|
|
|
35
|
-
const { noble: _n, ...restCctpChainInfo } = cctpChainInfo;
|
|
36
17
|
const knownChains = /** @satisfies {Record<string, ChainInfo>} */ (
|
|
37
|
-
harden(
|
|
18
|
+
harden(fetchedChainInfo)
|
|
38
19
|
);
|
|
39
20
|
|
|
40
21
|
/**
|
|
@@ -64,7 +45,7 @@ export const registerChainAssets = async (agoricNamesAdmin, name, assets) => {
|
|
|
64
45
|
*
|
|
65
46
|
* @param {ERef<NameAdmin>} agoricNamesAdmin
|
|
66
47
|
* @param {string} name
|
|
67
|
-
* @param {
|
|
48
|
+
* @param {CosmosChainInfo} chainInfo
|
|
68
49
|
* @param {(...messages: string[]) => void} [log]
|
|
69
50
|
* @param {Set<string>} [handledConnections] connection keys that need not be
|
|
70
51
|
* updated
|
|
@@ -81,11 +62,8 @@ export const registerChain = async (
|
|
|
81
62
|
HubName.ChainConnection,
|
|
82
63
|
);
|
|
83
64
|
|
|
84
|
-
mustMatch(chainInfo,
|
|
85
|
-
|
|
86
|
-
/** @type {Record<string, IBCConnectionInfo>} */
|
|
87
|
-
const connections = /** @type {any} */ (chainInfo).connections || {};
|
|
88
|
-
const { connections: _, ...vertex } = /** @type {any} */ (chainInfo);
|
|
65
|
+
mustMatch(chainInfo, CosmosChainInfoShape);
|
|
66
|
+
const { connections = {}, ...vertex } = chainInfo;
|
|
89
67
|
|
|
90
68
|
const promises = [
|
|
91
69
|
E(nameAdmin)
|
|
@@ -93,9 +71,7 @@ export const registerChain = async (
|
|
|
93
71
|
.then(() => log(`registered agoricNames chain.${name}`)),
|
|
94
72
|
];
|
|
95
73
|
|
|
96
|
-
const { chainId } =
|
|
97
|
-
chainInfo
|
|
98
|
-
);
|
|
74
|
+
const { chainId } = chainInfo;
|
|
99
75
|
for (const [counterChainId, connInfo] of Object.entries(connections)) {
|
|
100
76
|
const [key, connectionInfo] = normalizeConnectionInfo(
|
|
101
77
|
chainId,
|
|
@@ -119,9 +95,7 @@ export const registerChain = async (
|
|
|
119
95
|
};
|
|
120
96
|
|
|
121
97
|
/**
|
|
122
|
-
* Register all the chains that are known statically
|
|
123
|
-
*
|
|
124
|
-
* Not active on or planned for mainnet.
|
|
98
|
+
* Register all the chains that are known statically.
|
|
125
99
|
*
|
|
126
100
|
* @param {ERef<import('@agoric/vats').NameHubKit['nameAdmin']>} agoricNamesAdmin
|
|
127
101
|
* @param {(...messages: string[]) => void} [log]
|
package/src/cosmos-api.d.ts
CHANGED
|
@@ -12,16 +12,9 @@ import type { IBCChannelID, IBCConnectionID, IBCPortID } from '@agoric/vats';
|
|
|
12
12
|
import type { TargetApp, TargetRegistration } from '@agoric/vats/src/bridge-target.js';
|
|
13
13
|
import type { LocalIbcAddress, RemoteIbcAddress } from '@agoric/vats/tools/ibc-utils.js';
|
|
14
14
|
import { PFM_RECEIVER } from './exos/chain-hub.js';
|
|
15
|
-
import type {
|
|
16
|
-
/**
|
|
17
|
-
* @example
|
|
18
|
-
*
|
|
19
|
-
* agoric1megzytg65cyrgzs6fvzxgrcqvwwl7ugpt62346
|
|
20
|
-
* cosmosvaloper1npm9gvss52mlmk
|
|
21
|
-
*/
|
|
22
|
-
export type Bech32Address = `${string}1${string}`;
|
|
15
|
+
import type { AmountArg, ChainAddress, Denom, DenomAmount } from './types.js';
|
|
23
16
|
/** An address for a validator on some blockchain, e.g., cosmos, eth, etc. */
|
|
24
|
-
export type CosmosValidatorAddress =
|
|
17
|
+
export type CosmosValidatorAddress = ChainAddress & {
|
|
25
18
|
value: `${string}valoper${string}`;
|
|
26
19
|
encoding: 'bech32';
|
|
27
20
|
};
|
|
@@ -72,22 +65,12 @@ export interface CosmosAssetInfo extends Record<string, unknown> {
|
|
|
72
65
|
/**
|
|
73
66
|
* Info for a Cosmos-based chain.
|
|
74
67
|
*/
|
|
75
|
-
export
|
|
68
|
+
export type CosmosChainInfo = Readonly<{
|
|
76
69
|
/** can be used to lookup chainInfo (chainId) from an address value */
|
|
77
|
-
bech32Prefix
|
|
78
|
-
/** Cosmos chain ID. The CAIP-2 fields (namespace, reference) are on {@link BaseChainInfo}. */
|
|
70
|
+
bech32Prefix?: string;
|
|
79
71
|
chainId: string;
|
|
80
|
-
/** IBC connections between this chain and others, keyed by chainId */
|
|
81
72
|
connections?: Record<string, IBCConnectionInfo>;
|
|
82
|
-
/** indicates the host chain supports Interchain Accounts (ICS-27). Not currently used at runtime - only for types */
|
|
83
|
-
icaEnabled?: boolean;
|
|
84
|
-
/**
|
|
85
|
-
* indicates the host chain support the async-icq IBC Application protocol. Used at runtime to permit `Chain.query()` operations.
|
|
86
|
-
*
|
|
87
|
-
* in the future (@see https://github.com/Agoric/agoric-sdk/issues/9326), querying will be supported by the ICA protocol natively and this will likely deprecate
|
|
88
|
-
*/
|
|
89
73
|
icqEnabled?: boolean;
|
|
90
|
-
namespace: 'cosmos';
|
|
91
74
|
/**
|
|
92
75
|
* Note: developers must provide this value themselves for `.transfer` to work
|
|
93
76
|
* as expected. Please see examples for details.
|
|
@@ -99,7 +82,8 @@ export interface CosmosChainInfo extends BaseChainInfo {
|
|
|
99
82
|
stakingTokens?: Readonly<Array<{
|
|
100
83
|
denom: string;
|
|
101
84
|
}>>;
|
|
102
|
-
|
|
85
|
+
icaEnabled?: boolean;
|
|
86
|
+
}>;
|
|
103
87
|
/** @see {QueryDelegationTotalRewardsResponse} */
|
|
104
88
|
export interface CosmosRewardsResponse {
|
|
105
89
|
rewards: {
|
|
@@ -110,7 +94,7 @@ export interface CosmosRewardsResponse {
|
|
|
110
94
|
}
|
|
111
95
|
/** @see {DelegationResponse} */
|
|
112
96
|
export interface CosmosDelegationResponse {
|
|
113
|
-
delegator:
|
|
97
|
+
delegator: ChainAddress;
|
|
114
98
|
validator: CosmosValidatorAddress;
|
|
115
99
|
amount: DenomAmount;
|
|
116
100
|
}
|
|
@@ -182,7 +166,7 @@ export interface StakingAccountActions {
|
|
|
182
166
|
*/
|
|
183
167
|
undelegate: (delegations: {
|
|
184
168
|
amount: AmountArg;
|
|
185
|
-
delegator?:
|
|
169
|
+
delegator?: ChainAddress;
|
|
186
170
|
validator: CosmosValidatorAddress;
|
|
187
171
|
}[]) => Promise<void>;
|
|
188
172
|
/**
|
|
@@ -233,7 +217,7 @@ export interface IcaAccount extends IcaAccountMethods {
|
|
|
233
217
|
/**
|
|
234
218
|
* @returns the address of the account on the remote chain
|
|
235
219
|
*/
|
|
236
|
-
getAddress: () =>
|
|
220
|
+
getAddress: () => ChainAddress;
|
|
237
221
|
/**
|
|
238
222
|
* Submit a transaction on behalf of the remote account for execution on the remote chain.
|
|
239
223
|
* @param msgs - records for the transaction
|
|
@@ -251,16 +235,6 @@ export interface IcaAccount extends IcaAccountMethods {
|
|
|
251
235
|
export interface LiquidStakingMethods {
|
|
252
236
|
liquidStake: (amount: AmountArg) => Promise<void>;
|
|
253
237
|
}
|
|
254
|
-
/**
|
|
255
|
-
* Noble is the gateway to transferring USDC among Cosmos chains. We can
|
|
256
|
-
* transfer funds from any cosmos account using depositForBurn().
|
|
257
|
-
*/
|
|
258
|
-
export interface NobleMethods {
|
|
259
|
-
/** burn USDC on Noble and mint on a destination chain via CCTP */
|
|
260
|
-
depositForBurn: (mintRecipient: AccountId, amount: AmountArg,
|
|
261
|
-
/** if specified, only this account can call MsgReceive on the destination chain */
|
|
262
|
-
caller?: AccountId) => Promise<void>;
|
|
263
|
-
}
|
|
264
238
|
/** Methods supported only on Agoric chain accounts */
|
|
265
239
|
export interface LocalAccountMethods extends StakingAccountActions {
|
|
266
240
|
/** deposit payment (from zoe, for example) to the account */
|
|
@@ -295,7 +269,7 @@ export interface IBCMsgTransferOptions {
|
|
|
295
269
|
memo?: string;
|
|
296
270
|
forwardOpts?: {
|
|
297
271
|
/** The recipient address for the intermediate transfer. Defaults to 'pfm' unless specified */
|
|
298
|
-
intermediateRecipient?:
|
|
272
|
+
intermediateRecipient?: ChainAddress;
|
|
299
273
|
timeout?: ForwardInfo['forward']['timeout'];
|
|
300
274
|
retries?: ForwardInfo['forward']['retries'];
|
|
301
275
|
};
|
|
@@ -309,9 +283,7 @@ export interface IBCMsgTransferOptions {
|
|
|
309
283
|
*
|
|
310
284
|
* @see {OrchestrationAccountI}
|
|
311
285
|
*/
|
|
312
|
-
export type CosmosChainAccountMethods<CCI extends {
|
|
313
|
-
chainId: string;
|
|
314
|
-
}> = IcaAccountMethods & (CCI extends {
|
|
286
|
+
export type CosmosChainAccountMethods<CCI extends CosmosChainInfo> = IcaAccountMethods & (CCI extends {
|
|
315
287
|
stakingTokens: object;
|
|
316
288
|
} ? StakingAccountActions & StakingAccountQueries : object);
|
|
317
289
|
export type ICQQueryFunction = (msgs: JsonSafe<RequestQuery>[]) => Promise<JsonSafe<ResponseQuery>[]>;
|
|
@@ -322,7 +294,7 @@ export type ICQQueryFunction = (msgs: JsonSafe<RequestQuery>[]) => Promise<JsonS
|
|
|
322
294
|
*/
|
|
323
295
|
export interface ForwardInfo {
|
|
324
296
|
forward: {
|
|
325
|
-
receiver:
|
|
297
|
+
receiver: ChainAddress['value'];
|
|
326
298
|
port: IBCPortID;
|
|
327
299
|
channel: IBCChannelID;
|
|
328
300
|
/** e.g. '10m' */
|
|
@@ -348,7 +320,7 @@ export type TransferRoute = {
|
|
|
348
320
|
sourceChannel: IBCChannelID;
|
|
349
321
|
token: Coin;
|
|
350
322
|
} & ({
|
|
351
|
-
receiver: typeof PFM_RECEIVER |
|
|
323
|
+
receiver: typeof PFM_RECEIVER | ChainAddress['value'];
|
|
352
324
|
/** contains PFM forwarding info */
|
|
353
325
|
forwardInfo: ForwardInfo;
|
|
354
326
|
} | {
|
package/src/cosmos-api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cosmos-api.d.ts","sourceRoot":"","sources":["cosmos-api.ts"],"names":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Q,CAAC,YAAY,CAAC,EAAE,KAC3B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;AAExC;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE;QACP,QAAQ,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;QAChC,IAAI,EAAE,SAAS,CAAC;QAChB,OAAO,EAAE,YAAY,CAAC;QACtB,iBAAiB;QACjB,OAAO,EAAE,UAAU,CAAC;QACpB,oBAAoB;QACpB,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE;YACL,OAAO,EAAE,WAAW,CAAC;SACtB,CAAC;KACH,CAAC;CACH;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,4BAA4B;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,YAAY,CAAC;IAC5B,KAAK,EAAE,IAAI,CAAC;CACb,GAAG,CACA;IACE,QAAQ,EAAE,OAAO,YAAY,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IACtD,mCAAmC;IACnC,WAAW,EAAE,WAAW,CAAC;CAC1B,GACD;IACE,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,CACJ,CAAC;AAEF,uDAAuD;AACvD,KAAK,cAAc,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3D;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAAG,GAAG,MAAM,GAAG,cAAc,EAAE,CAAC"}
|
package/src/cosmos-api.ts
CHANGED
|
@@ -33,25 +33,10 @@ import type {
|
|
|
33
33
|
RemoteIbcAddress,
|
|
34
34
|
} from '@agoric/vats/tools/ibc-utils.js';
|
|
35
35
|
import { PFM_RECEIVER } from './exos/chain-hub.js';
|
|
36
|
-
import type {
|
|
37
|
-
AccountId,
|
|
38
|
-
AmountArg,
|
|
39
|
-
BaseChainInfo,
|
|
40
|
-
CosmosChainAddress,
|
|
41
|
-
Denom,
|
|
42
|
-
DenomAmount,
|
|
43
|
-
} from './types.js';
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* @example
|
|
47
|
-
*
|
|
48
|
-
* agoric1megzytg65cyrgzs6fvzxgrcqvwwl7ugpt62346
|
|
49
|
-
* cosmosvaloper1npm9gvss52mlmk
|
|
50
|
-
*/
|
|
51
|
-
export type Bech32Address = `${string}1${string}`;
|
|
36
|
+
import type { AmountArg, ChainAddress, Denom, DenomAmount } from './types.js';
|
|
52
37
|
|
|
53
38
|
/** An address for a validator on some blockchain, e.g., cosmos, eth, etc. */
|
|
54
|
-
export type CosmosValidatorAddress =
|
|
39
|
+
export type CosmosValidatorAddress = ChainAddress & {
|
|
55
40
|
// infix for Validator Operator https://docs.cosmos.network/main/learn/beginner/accounts#addresses
|
|
56
41
|
value: `${string}valoper${string}`;
|
|
57
42
|
encoding: 'bech32';
|
|
@@ -103,22 +88,14 @@ export interface CosmosAssetInfo extends Record<string, unknown> {
|
|
|
103
88
|
/**
|
|
104
89
|
* Info for a Cosmos-based chain.
|
|
105
90
|
*/
|
|
106
|
-
export
|
|
91
|
+
export type CosmosChainInfo = Readonly<{
|
|
107
92
|
/** can be used to lookup chainInfo (chainId) from an address value */
|
|
108
|
-
bech32Prefix
|
|
109
|
-
/** Cosmos chain ID. The CAIP-2 fields (namespace, reference) are on {@link BaseChainInfo}. */
|
|
93
|
+
bech32Prefix?: string;
|
|
110
94
|
chainId: string;
|
|
111
|
-
|
|
112
|
-
connections?: Record<string, IBCConnectionInfo>;
|
|
113
|
-
|
|
114
|
-
icaEnabled?: boolean;
|
|
115
|
-
/**
|
|
116
|
-
* indicates the host chain support the async-icq IBC Application protocol. Used at runtime to permit `Chain.query()` operations.
|
|
117
|
-
*
|
|
118
|
-
* in the future (@see https://github.com/Agoric/agoric-sdk/issues/9326), querying will be supported by the ICA protocol natively and this will likely deprecate
|
|
119
|
-
*/
|
|
95
|
+
|
|
96
|
+
connections?: Record<string, IBCConnectionInfo>; // chainId or wellKnownName
|
|
97
|
+
// UNTIL https://github.com/Agoric/agoric-sdk/issues/9326
|
|
120
98
|
icqEnabled?: boolean;
|
|
121
|
-
namespace: 'cosmos';
|
|
122
99
|
/**
|
|
123
100
|
* Note: developers must provide this value themselves for `.transfer` to work
|
|
124
101
|
* as expected. Please see examples for details.
|
|
@@ -128,7 +105,8 @@ export interface CosmosChainInfo extends BaseChainInfo {
|
|
|
128
105
|
* cf https://github.com/cosmos/chain-registry/blob/master/chain.schema.json#L117
|
|
129
106
|
*/
|
|
130
107
|
stakingTokens?: Readonly<Array<{ denom: string }>>;
|
|
131
|
-
|
|
108
|
+
icaEnabled?: boolean;
|
|
109
|
+
}>;
|
|
132
110
|
|
|
133
111
|
// #region Orchestration views on Cosmos response types
|
|
134
112
|
// Naming scheme: Cosmos for the chain system, Rewards b/c getRewards function,
|
|
@@ -142,7 +120,7 @@ export interface CosmosRewardsResponse {
|
|
|
142
120
|
|
|
143
121
|
/** @see {DelegationResponse} */
|
|
144
122
|
export interface CosmosDelegationResponse {
|
|
145
|
-
delegator:
|
|
123
|
+
delegator: ChainAddress;
|
|
146
124
|
validator: CosmosValidatorAddress;
|
|
147
125
|
amount: DenomAmount;
|
|
148
126
|
}
|
|
@@ -237,7 +215,7 @@ export interface StakingAccountActions {
|
|
|
237
215
|
undelegate: (
|
|
238
216
|
delegations: {
|
|
239
217
|
amount: AmountArg;
|
|
240
|
-
delegator?:
|
|
218
|
+
delegator?: ChainAddress;
|
|
241
219
|
validator: CosmosValidatorAddress;
|
|
242
220
|
}[],
|
|
243
221
|
) => Promise<void>;
|
|
@@ -297,7 +275,7 @@ export interface IcaAccount extends IcaAccountMethods {
|
|
|
297
275
|
/**
|
|
298
276
|
* @returns the address of the account on the remote chain
|
|
299
277
|
*/
|
|
300
|
-
getAddress: () =>
|
|
278
|
+
getAddress: () => ChainAddress;
|
|
301
279
|
|
|
302
280
|
/**
|
|
303
281
|
* Submit a transaction on behalf of the remote account for execution on the remote chain.
|
|
@@ -318,20 +296,6 @@ export interface LiquidStakingMethods {
|
|
|
318
296
|
liquidStake: (amount: AmountArg) => Promise<void>;
|
|
319
297
|
}
|
|
320
298
|
|
|
321
|
-
/**
|
|
322
|
-
* Noble is the gateway to transferring USDC among Cosmos chains. We can
|
|
323
|
-
* transfer funds from any cosmos account using depositForBurn().
|
|
324
|
-
*/
|
|
325
|
-
export interface NobleMethods {
|
|
326
|
-
/** burn USDC on Noble and mint on a destination chain via CCTP */
|
|
327
|
-
depositForBurn: (
|
|
328
|
-
mintRecipient: AccountId,
|
|
329
|
-
amount: AmountArg,
|
|
330
|
-
/** if specified, only this account can call MsgReceive on the destination chain */
|
|
331
|
-
caller?: AccountId,
|
|
332
|
-
) => Promise<void>;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
299
|
// TODO support StakingAccountQueries
|
|
336
300
|
/** Methods supported only on Agoric chain accounts */
|
|
337
301
|
export interface LocalAccountMethods extends StakingAccountActions {
|
|
@@ -368,7 +332,7 @@ export interface IBCMsgTransferOptions {
|
|
|
368
332
|
memo?: string;
|
|
369
333
|
forwardOpts?: {
|
|
370
334
|
/** The recipient address for the intermediate transfer. Defaults to 'pfm' unless specified */
|
|
371
|
-
intermediateRecipient?:
|
|
335
|
+
intermediateRecipient?: ChainAddress;
|
|
372
336
|
timeout?: ForwardInfo['forward']['timeout'];
|
|
373
337
|
retries?: ForwardInfo['forward']['retries'];
|
|
374
338
|
};
|
|
@@ -383,7 +347,7 @@ export interface IBCMsgTransferOptions {
|
|
|
383
347
|
*
|
|
384
348
|
* @see {OrchestrationAccountI}
|
|
385
349
|
*/
|
|
386
|
-
export type CosmosChainAccountMethods<CCI extends
|
|
350
|
+
export type CosmosChainAccountMethods<CCI extends CosmosChainInfo> =
|
|
387
351
|
IcaAccountMethods &
|
|
388
352
|
(CCI extends {
|
|
389
353
|
stakingTokens: object;
|
|
@@ -402,7 +366,7 @@ export type ICQQueryFunction = (
|
|
|
402
366
|
*/
|
|
403
367
|
export interface ForwardInfo {
|
|
404
368
|
forward: {
|
|
405
|
-
receiver:
|
|
369
|
+
receiver: ChainAddress['value'];
|
|
406
370
|
port: IBCPortID;
|
|
407
371
|
channel: IBCChannelID;
|
|
408
372
|
/** e.g. '10m' */
|
|
@@ -430,7 +394,7 @@ export type TransferRoute = {
|
|
|
430
394
|
token: Coin;
|
|
431
395
|
} & (
|
|
432
396
|
| {
|
|
433
|
-
receiver: typeof PFM_RECEIVER |
|
|
397
|
+
receiver: typeof PFM_RECEIVER | ChainAddress['value'];
|
|
434
398
|
/** contains PFM forwarding info */
|
|
435
399
|
forwardInfo: ForwardInfo;
|
|
436
400
|
}
|
package/src/ethereum-api.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
export {};
|
|
2
1
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Placeholder for Ethereum/EVM specific APIs, like `EvmAccountMethods`.
|
|
6
|
-
*
|
|
7
|
-
* Currently, just EVM `ChainInfo` is represented in the API. @see {@link BaseChainInfo} and {@link ./cctp-chain-info.js}.
|
|
2
|
+
* Info for an Ethereum-based chain.
|
|
8
3
|
*/
|
|
4
|
+
export type EthChainInfo = Readonly<{
|
|
5
|
+
chainId: string;
|
|
6
|
+
allegedName: string;
|
|
7
|
+
}>;
|
|
9
8
|
//# sourceMappingURL=ethereum-api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ethereum-api.d.ts","sourceRoot":"","sources":["ethereum-api.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ethereum-api.d.ts","sourceRoot":"","sources":["ethereum-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC,CAAC"}
|
package/src/ethereum-api.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import type { BaseChainInfo } from './orchestration-api.ts';
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Placeholder for Ethereum/EVM specific APIs, like `EvmAccountMethods`.
|
|
7
|
-
*
|
|
8
|
-
* Currently, just EVM `ChainInfo` is represented in the API. @see {@link BaseChainInfo} and {@link ./cctp-chain-info.js}.
|
|
2
|
+
* Info for an Ethereum-based chain.
|
|
9
3
|
*/
|
|
4
|
+
export type EthChainInfo = Readonly<{
|
|
5
|
+
chainId: string;
|
|
6
|
+
allegedName: string;
|
|
7
|
+
}>;
|
|
@@ -2,11 +2,11 @@ export function prepareStakingTap(zone: Zone, vowTools: VowTools): (...args: Par
|
|
|
2
2
|
export type StakingTapState = {
|
|
3
3
|
stakingAccount: ERef<OrchestrationAccount<any> & StakingAccountActions>;
|
|
4
4
|
localAccount: ERef<OrchestrationAccount<{
|
|
5
|
-
chainId: "agoric
|
|
5
|
+
chainId: "agoric";
|
|
6
6
|
}>>;
|
|
7
7
|
validator: CosmosValidatorAddress;
|
|
8
|
-
localChainAddress:
|
|
9
|
-
remoteChainAddress:
|
|
8
|
+
localChainAddress: ChainAddress;
|
|
9
|
+
remoteChainAddress: ChainAddress;
|
|
10
10
|
sourceChannel: IBCChannelID;
|
|
11
11
|
remoteDenom: Denom;
|
|
12
12
|
localDenom: Denom;
|
|
@@ -41,7 +41,7 @@ declare function prepareStakingTapKit(zone: Zone, { watch }: VowTools): (initial
|
|
|
41
41
|
import type { OrchestrationAccount } from '@agoric/orchestration';
|
|
42
42
|
import type { StakingAccountActions } from '@agoric/orchestration';
|
|
43
43
|
import type { CosmosValidatorAddress } from '@agoric/orchestration';
|
|
44
|
-
import type {
|
|
44
|
+
import type { ChainAddress } from '@agoric/orchestration';
|
|
45
45
|
import type { IBCChannelID } from '@agoric/vats';
|
|
46
46
|
import type { Denom } from '@agoric/orchestration';
|
|
47
47
|
import type { VTransferIBCEvent } from '@agoric/vats';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-stake-it-tap-kit.d.ts","sourceRoot":"","sources":["auto-stake-it-tap-kit.js"],"names":[],"mappings":"AAmJO,wCANI,IAAI,YACJ,QAAQ,GACN,CACZ,GAAO,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,KACzD,UAAU,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,KAAK,CAAC,CAKjE;8BAlIY;IACR,cAAc,EAAE,IAAI,CAAC,qBAAqB,GAAG,CAAC,GAAG,qBAAqB,CAAC,CAAC;IACxE,YAAY,EAAE,IAAI,CAAC,qBAAqB;QAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"auto-stake-it-tap-kit.d.ts","sourceRoot":"","sources":["auto-stake-it-tap-kit.js"],"names":[],"mappings":"AAmJO,wCANI,IAAI,YACJ,QAAQ,GACN,CACZ,GAAO,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,KACzD,UAAU,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,KAAK,CAAC,CAKjE;8BAlIY;IACR,cAAc,EAAE,IAAI,CAAC,qBAAqB,GAAG,CAAC,GAAG,qBAAqB,CAAC,CAAC;IACxE,YAAY,EAAE,IAAI,CAAC,qBAAqB;QAAE,OAAO,EAAE,QAAQ,CAAA;KAAE,CAAC,CAAC,CAAC;IAChE,SAAS,EAAE,sBAAsB,CAAC;IAClC,iBAAiB,EAAE,YAAY,CAAC;IAChC,kBAAkB,EAAE,YAAY,CAAC;IACjC,aAAa,EAAE,YAAY,CAAC;IAC5B,WAAW,EAAE,KAAK,CAAC;IACnB,UAAU,EAAE,KAAK,CAAC;CACnB;6BA2HU,UAAU,CAAC,OAAO,iBAAiB,CAAC;yBACpC,UAAU,CAAC,cAAc,CAAC;0BA7IjB,cAAc;8BADV,aAAa;AAkCxC;;;GAGG;AACH,4CAHW,IAAI,aACJ,QAAQ;;QAwBX;;;;;;WAMG;6BADQ,iBAAiB;;;QAqC5B;;;WAGG;6BAFQ,IAAI,SACJ,MAAM;;GAcxB;0CAnH0G,uBAAuB;2CAAvB,uBAAuB;4CAAvB,uBAAuB;kCAAvB,uBAAuB;kCAJhF,cAAc;2BAI2C,uBAAuB;uCAJhF,cAAc"}
|
|
@@ -3,7 +3,7 @@ import { E } from '@endo/far';
|
|
|
3
3
|
import { VowShape } from '@agoric/vow';
|
|
4
4
|
import { makeTracer } from '@agoric/internal';
|
|
5
5
|
import { atob } from '@endo/base64';
|
|
6
|
-
import {
|
|
6
|
+
import { ChainAddressShape } from '../typeGuards.js';
|
|
7
7
|
|
|
8
8
|
const trace = makeTracer('AutoStakeItTap');
|
|
9
9
|
|
|
@@ -12,7 +12,7 @@ const trace = makeTracer('AutoStakeItTap');
|
|
|
12
12
|
* @import {VowTools} from '@agoric/vow';
|
|
13
13
|
* @import {Zone} from '@agoric/zone';
|
|
14
14
|
* @import {TargetApp} from '@agoric/vats/src/bridge-target.js';
|
|
15
|
-
* @import {
|
|
15
|
+
* @import {ChainAddress, CosmosValidatorAddress, Denom, OrchestrationAccount, StakingAccountActions} from '@agoric/orchestration';
|
|
16
16
|
* @import {FungibleTokenPacketData} from '@agoric/cosmic-proto/ibc/applications/transfer/v2/packet.js';
|
|
17
17
|
* @import {TypedPattern} from '@agoric/internal';
|
|
18
18
|
*/
|
|
@@ -20,10 +20,10 @@ const trace = makeTracer('AutoStakeItTap');
|
|
|
20
20
|
/**
|
|
21
21
|
* @typedef {{
|
|
22
22
|
* stakingAccount: ERef<OrchestrationAccount<any> & StakingAccountActions>;
|
|
23
|
-
* localAccount: ERef<OrchestrationAccount<{ chainId: 'agoric
|
|
23
|
+
* localAccount: ERef<OrchestrationAccount<{ chainId: 'agoric' }>>;
|
|
24
24
|
* validator: CosmosValidatorAddress;
|
|
25
|
-
* localChainAddress:
|
|
26
|
-
* remoteChainAddress:
|
|
25
|
+
* localChainAddress: ChainAddress;
|
|
26
|
+
* remoteChainAddress: ChainAddress;
|
|
27
27
|
* sourceChannel: IBCChannelID;
|
|
28
28
|
* remoteDenom: Denom;
|
|
29
29
|
* localDenom: Denom;
|
|
@@ -34,9 +34,9 @@ const trace = makeTracer('AutoStakeItTap');
|
|
|
34
34
|
const StakingTapStateShape = {
|
|
35
35
|
stakingAccount: M.remotable('CosmosOrchestrationAccount'),
|
|
36
36
|
localAccount: M.remotable('LocalOrchestrationAccount'),
|
|
37
|
-
validator:
|
|
38
|
-
localChainAddress:
|
|
39
|
-
remoteChainAddress:
|
|
37
|
+
validator: ChainAddressShape,
|
|
38
|
+
localChainAddress: ChainAddressShape,
|
|
39
|
+
remoteChainAddress: ChainAddressShape,
|
|
40
40
|
sourceChannel: M.string(),
|
|
41
41
|
remoteDenom: M.string(),
|
|
42
42
|
localDenom: M.string(),
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
export const start: (zcf: ZCF<Record<string, unknown>>, privateArgs: OrchestrationPowers & {
|
|
2
2
|
marshaller: Marshaller;
|
|
3
|
-
chainInfo?: Record<string,
|
|
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
|
+
icaEnabled?: boolean;
|
|
13
|
+
}>>;
|
|
4
14
|
assetInfo?: [Denom, DenomDetail & {
|
|
5
15
|
brandKey?: string;
|
|
6
16
|
}][];
|
|
7
17
|
}, baggage: import("@agoric/vat-data").Baggage) => Promise<{
|
|
8
18
|
publicFacet: import("@endo/exo").Guarded<{
|
|
9
|
-
makeAccountsInvitation(): Promise<
|
|
19
|
+
makeAccountsInvitation(): Promise<Invitation<import("@agoric/vow").Vow<import("@agoric/vow").Vow<{
|
|
10
20
|
publicSubscribers: {
|
|
11
21
|
[k: string]: import("@agoric/zoe/src/contractSupport/topics.js").ResolvedPublicTopic<unknown>;
|
|
12
22
|
};
|
|
@@ -19,14 +29,22 @@ export const start: (zcf: ZCF<Record<string, unknown>>, privateArgs: Orchestrati
|
|
|
19
29
|
}>>;
|
|
20
30
|
}>;
|
|
21
31
|
creatorFacet: import("@endo/exo").Guarded<{
|
|
22
|
-
registerChain(chainName: string, chainInfo:
|
|
32
|
+
registerChain(chainName: string, chainInfo: Readonly<{
|
|
33
|
+
bech32Prefix?: string;
|
|
34
|
+
chainId: string;
|
|
35
|
+
connections?: Record<string, import("../cosmos-api.js").IBCConnectionInfo>;
|
|
36
|
+
icqEnabled?: boolean;
|
|
37
|
+
pfmEnabled?: boolean;
|
|
38
|
+
stakingTokens?: Readonly<Array<{
|
|
39
|
+
denom: string;
|
|
40
|
+
}>>;
|
|
41
|
+
icaEnabled?: boolean;
|
|
42
|
+
}>, connectionInfo: import("../cosmos-api.js").IBCConnectionInfo): Promise<void>;
|
|
23
43
|
registerAsset(denom: Denom, detail: DenomDetail): Promise<void>;
|
|
24
44
|
}>;
|
|
25
45
|
}>;
|
|
26
46
|
export type AutoStakeItSF = typeof start;
|
|
27
|
-
import type { ZCF } from '@agoric/zoe';
|
|
28
47
|
import type { OrchestrationPowers } from '../utils/start-helper.js';
|
|
29
|
-
import type { CosmosChainInfo } from '../types.js';
|
|
30
48
|
import type { Denom } from '../types.js';
|
|
31
49
|
import type { DenomDetail } from '../types.js';
|
|
32
50
|
//# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDgB;4BAGjE,OAAO,KAAK;yCAxEgC,0BAA0B;2BAC9B,aAAa;iCAAb,aAAa"}
|
|
@@ -14,7 +14,6 @@ import { registerChainsAndAssets } from '../utils/chain-hub-helper.js';
|
|
|
14
14
|
* @import {Zone} from '@agoric/zone';
|
|
15
15
|
* @import {OrchestrationPowers, OrchestrationTools} from '../utils/start-helper.js';
|
|
16
16
|
* @import {CosmosChainInfo, Denom, DenomDetail} from '../types.js';
|
|
17
|
-
* @import {ZCF} from '@agoric/zoe';
|
|
18
17
|
*/
|
|
19
18
|
|
|
20
19
|
/**
|