@agoric/orchestration 0.1.1-dev-ff9b882.0 → 0.1.1-dev-45bab17.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/cosmos-api.d.ts +27 -19
- package/src/cosmos-api.d.ts.map +1 -1
- package/src/cosmos-api.ts +40 -26
- package/src/examples/stake-ica.contract.d.ts +5 -0
- package/src/examples/stake-ica.contract.d.ts.map +1 -1
- package/src/exos/README.md +5 -4
- package/src/exos/cosmos-orchestration-account.d.ts +7 -0
- package/src/exos/cosmos-orchestration-account.d.ts.map +1 -1
- package/src/exos/cosmos-orchestration-account.js +13 -2
- package/src/exos/orchestrator.d.ts +1 -1
- package/src/exos/orchestrator.d.ts.map +1 -1
- package/src/exos/orchestrator.js +9 -3
- package/src/exos/remote-chain-facade.d.ts +1 -1
- package/src/orchestration-api.d.ts +1 -1
- package/src/orchestration-api.d.ts.map +1 -1
- package/src/orchestration-api.ts +2 -5
- package/src/proposals/start-stakeAtom.d.ts +5 -0
- package/src/proposals/start-stakeAtom.d.ts.map +1 -1
- package/src/proposals/start-stakeOsmo.d.ts +5 -0
- package/src/proposals/start-stakeOsmo.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/orchestration",
|
|
3
|
-
"version": "0.1.1-dev-
|
|
3
|
+
"version": "0.1.1-dev-45bab17.0+45bab17",
|
|
4
4
|
"description": "Chain abstraction for Agoric's orchestration clients",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
},
|
|
34
34
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@agoric/async-flow": "0.1.1-dev-
|
|
37
|
-
"@agoric/cosmic-proto": "0.4.1-dev-
|
|
38
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
39
|
-
"@agoric/internal": "0.3.3-dev-
|
|
40
|
-
"@agoric/network": "0.1.1-dev-
|
|
41
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
42
|
-
"@agoric/store": "0.9.3-dev-
|
|
43
|
-
"@agoric/time": "0.3.3-dev-
|
|
44
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
45
|
-
"@agoric/vats": "0.15.2-dev-
|
|
46
|
-
"@agoric/vow": "0.1.1-dev-
|
|
47
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
48
|
-
"@agoric/zone": "0.2.3-dev-
|
|
36
|
+
"@agoric/async-flow": "0.1.1-dev-45bab17.0+45bab17",
|
|
37
|
+
"@agoric/cosmic-proto": "0.4.1-dev-45bab17.0+45bab17",
|
|
38
|
+
"@agoric/ertp": "0.16.3-dev-45bab17.0+45bab17",
|
|
39
|
+
"@agoric/internal": "0.3.3-dev-45bab17.0+45bab17",
|
|
40
|
+
"@agoric/network": "0.1.1-dev-45bab17.0+45bab17",
|
|
41
|
+
"@agoric/notifier": "0.6.3-dev-45bab17.0+45bab17",
|
|
42
|
+
"@agoric/store": "0.9.3-dev-45bab17.0+45bab17",
|
|
43
|
+
"@agoric/time": "0.3.3-dev-45bab17.0+45bab17",
|
|
44
|
+
"@agoric/vat-data": "0.5.3-dev-45bab17.0+45bab17",
|
|
45
|
+
"@agoric/vats": "0.15.2-dev-45bab17.0+45bab17",
|
|
46
|
+
"@agoric/vow": "0.1.1-dev-45bab17.0+45bab17",
|
|
47
|
+
"@agoric/zoe": "0.26.3-dev-45bab17.0+45bab17",
|
|
48
|
+
"@agoric/zone": "0.2.3-dev-45bab17.0+45bab17",
|
|
49
49
|
"@endo/base64": "^1.0.8",
|
|
50
50
|
"@endo/errors": "^1.2.7",
|
|
51
51
|
"@endo/far": "^1.1.8",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@noble/hashes": "^1.5.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
57
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-45bab17.0+45bab17",
|
|
58
58
|
"@chain-registry/client": "^1.47.4",
|
|
59
59
|
"@cosmjs/amino": "^0.32.3",
|
|
60
60
|
"@cosmjs/proto-signing": "^0.32.3",
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
"typeCoverage": {
|
|
96
96
|
"atLeast": 97.23
|
|
97
97
|
},
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "45bab1715b07dee25fe34d24971b47f1acf79036"
|
|
99
99
|
}
|
package/src/cosmos-api.d.ts
CHANGED
|
@@ -174,19 +174,9 @@ export interface StakingAccountActions {
|
|
|
174
174
|
withdrawReward: (validator: CosmosValidatorAddress) => Promise<DenomAmount[]>;
|
|
175
175
|
}
|
|
176
176
|
/**
|
|
177
|
-
* Low level
|
|
177
|
+
* Low level methods from IcaAccount that we pass through to CosmosOrchestrationAccount
|
|
178
178
|
*/
|
|
179
|
-
export interface
|
|
180
|
-
/**
|
|
181
|
-
* @returns the address of the account on the remote chain
|
|
182
|
-
*/
|
|
183
|
-
getAddress: () => ChainAddress;
|
|
184
|
-
/**
|
|
185
|
-
* Submit a transaction on behalf of the remote account for execution on the remote chain.
|
|
186
|
-
* @param msgs - records for the transaction
|
|
187
|
-
* @returns acknowledgement string
|
|
188
|
-
*/
|
|
189
|
-
executeTx: (msgs: TypedJson[]) => Promise<string>;
|
|
179
|
+
export interface IcaAccountMethods {
|
|
190
180
|
/**
|
|
191
181
|
* Submit a transaction on behalf of the remote account for execution on the remote chain.
|
|
192
182
|
* @param msgs - records for the transaction
|
|
@@ -211,6 +201,21 @@ export interface IcaAccount {
|
|
|
211
201
|
* @throws {Error} if connection is currently active
|
|
212
202
|
*/
|
|
213
203
|
reactivate: () => Promise<void>;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Low level object that supports queries and operations for an account on a remote chain.
|
|
207
|
+
*/
|
|
208
|
+
export interface IcaAccount extends IcaAccountMethods {
|
|
209
|
+
/**
|
|
210
|
+
* @returns the address of the account on the remote chain
|
|
211
|
+
*/
|
|
212
|
+
getAddress: () => ChainAddress;
|
|
213
|
+
/**
|
|
214
|
+
* Submit a transaction on behalf of the remote account for execution on the remote chain.
|
|
215
|
+
* @param msgs - records for the transaction
|
|
216
|
+
* @returns acknowledgement string
|
|
217
|
+
*/
|
|
218
|
+
executeTx: (msgs: TypedJson[]) => Promise<string>;
|
|
214
219
|
/** @returns the address of the remote channel */
|
|
215
220
|
getRemoteAddress: () => RemoteIbcAddress;
|
|
216
221
|
/** @returns the address of the local channel */
|
|
@@ -223,15 +228,20 @@ export interface LiquidStakingMethods {
|
|
|
223
228
|
liquidStake: (amount: AmountArg) => Promise<void>;
|
|
224
229
|
}
|
|
225
230
|
/** Methods supported only on Agoric chain accounts */
|
|
226
|
-
export interface LocalAccountMethods {
|
|
231
|
+
export interface LocalAccountMethods extends StakingAccountActions {
|
|
227
232
|
/** deposit payment (from zoe, for example) to the account */
|
|
228
233
|
deposit: (payment: Payment<'nat'>) => Promise<void>;
|
|
229
234
|
/** withdraw a Payment from the account */
|
|
230
235
|
withdraw: (amount: Amount<'nat'>) => Promise<Payment<'nat'>>;
|
|
231
236
|
/**
|
|
232
237
|
* Register a handler that receives an event each time ICS-20 transfers are
|
|
233
|
-
* sent or received by the underlying account.
|
|
234
|
-
*
|
|
238
|
+
* sent or received by the underlying account.
|
|
239
|
+
*
|
|
240
|
+
* Handler includes {@link VTransferIBCEvent} and
|
|
241
|
+
* {@link FungibleTokenPacketData} that can be used for application logic.
|
|
242
|
+
*
|
|
243
|
+
* Each account may be associated with at most one handler at a given time.
|
|
244
|
+
*
|
|
235
245
|
* Does not grant the handler the ability to intercept a transfer. For a
|
|
236
246
|
* blocking handler, aka 'IBC Hooks', leverage `registerActiveTap` from
|
|
237
247
|
* `transferMiddleware` directly.
|
|
@@ -259,10 +269,8 @@ export interface IBCMsgTransferOptions {
|
|
|
259
269
|
*
|
|
260
270
|
* @see {OrchestrationAccountI}
|
|
261
271
|
*/
|
|
262
|
-
export type CosmosChainAccountMethods<CCI extends CosmosChainInfo> = (CCI extends {
|
|
263
|
-
icaEnabled: true;
|
|
264
|
-
} ? IcaAccount : {}) & CCI extends {
|
|
272
|
+
export type CosmosChainAccountMethods<CCI extends CosmosChainInfo> = IcaAccountMethods & (CCI extends {
|
|
265
273
|
stakingTokens: {};
|
|
266
|
-
} ? StakingAccountActions & StakingAccountQueries : {};
|
|
274
|
+
} ? StakingAccountActions & StakingAccountQueries : {});
|
|
267
275
|
export type ICQQueryFunction = (msgs: JsonSafe<RequestQuery>[]) => Promise<JsonSafe<ResponseQuery>[]>;
|
|
268
276
|
//# sourceMappingURL=cosmos-api.d.ts.map
|
package/src/cosmos-api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cosmos-api.d.ts","sourceRoot":"","sources":["cosmos-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,KAAK,EAIV,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,wDAAwD,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8CAA8C,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yDAAyD,CAAC;
|
|
1
|
+
{"version":3,"file":"cosmos-api.d.ts","sourceRoot":"","sources":["cosmos-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,KAAK,EAIV,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,wDAAwD,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8CAA8C,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,y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I,CAAC,CAAC;IACpD,0CAA0C;IAC1C,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7D;;;;;;;;;;;;;;OAcG;IACH,gBAAgB,EAAE,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACnE;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,aAAa,CAAC,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;IAC7C,gBAAgB,CAAC,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACnD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,yBAAyB,CAAC,GAAG,SAAS,eAAe,IAC/D,iBAAiB,GACf,CAAC,GAAG,SAAS;IACX,aAAa,EAAE,EAAE,CAAC;CACnB,GACG,qBAAqB,GAAG,qBAAqB,GAC7C,EAAE,CAAC,CAAC;AAEZ,MAAM,MAAM,gBAAgB,GAAG,CAC7B,IAAI,EAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,KAC3B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC"}
|
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,11 @@ 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
|
+
VTransferIBCEvent,
|
|
27
|
+
} from '@agoric/vats';
|
|
23
28
|
import type {
|
|
24
29
|
TargetApp,
|
|
25
30
|
TargetRegistration,
|
|
@@ -226,20 +231,10 @@ export interface StakingAccountActions {
|
|
|
226
231
|
}
|
|
227
232
|
|
|
228
233
|
/**
|
|
229
|
-
* Low level
|
|
234
|
+
* Low level methods from IcaAccount that we pass through to CosmosOrchestrationAccount
|
|
230
235
|
*/
|
|
231
|
-
export interface IcaAccount {
|
|
232
|
-
/**
|
|
233
|
-
* @returns the address of the account on the remote chain
|
|
234
|
-
*/
|
|
235
|
-
getAddress: () => ChainAddress;
|
|
236
236
|
|
|
237
|
-
|
|
238
|
-
* Submit a transaction on behalf of the remote account for execution on the remote chain.
|
|
239
|
-
* @param msgs - records for the transaction
|
|
240
|
-
* @returns acknowledgement string
|
|
241
|
-
*/
|
|
242
|
-
executeTx: (msgs: TypedJson[]) => Promise<string>;
|
|
237
|
+
export interface IcaAccountMethods {
|
|
243
238
|
/**
|
|
244
239
|
* Submit a transaction on behalf of the remote account for execution on the remote chain.
|
|
245
240
|
* @param msgs - records for the transaction
|
|
@@ -267,6 +262,23 @@ export interface IcaAccount {
|
|
|
267
262
|
* @throws {Error} if connection is currently active
|
|
268
263
|
*/
|
|
269
264
|
reactivate: () => Promise<void>;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Low level object that supports queries and operations for an account on a remote chain.
|
|
269
|
+
*/
|
|
270
|
+
export interface IcaAccount extends IcaAccountMethods {
|
|
271
|
+
/**
|
|
272
|
+
* @returns the address of the account on the remote chain
|
|
273
|
+
*/
|
|
274
|
+
getAddress: () => ChainAddress;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Submit a transaction on behalf of the remote account for execution on the remote chain.
|
|
278
|
+
* @param msgs - records for the transaction
|
|
279
|
+
* @returns acknowledgement string
|
|
280
|
+
*/
|
|
281
|
+
executeTx: (msgs: TypedJson[]) => Promise<string>;
|
|
270
282
|
/** @returns the address of the remote channel */
|
|
271
283
|
getRemoteAddress: () => RemoteIbcAddress;
|
|
272
284
|
/** @returns the address of the local channel */
|
|
@@ -280,16 +292,22 @@ export interface LiquidStakingMethods {
|
|
|
280
292
|
liquidStake: (amount: AmountArg) => Promise<void>;
|
|
281
293
|
}
|
|
282
294
|
|
|
295
|
+
// TODO support StakingAccountQueries
|
|
283
296
|
/** Methods supported only on Agoric chain accounts */
|
|
284
|
-
export interface LocalAccountMethods {
|
|
297
|
+
export interface LocalAccountMethods extends StakingAccountActions {
|
|
285
298
|
/** deposit payment (from zoe, for example) to the account */
|
|
286
299
|
deposit: (payment: Payment<'nat'>) => Promise<void>;
|
|
287
300
|
/** withdraw a Payment from the account */
|
|
288
301
|
withdraw: (amount: Amount<'nat'>) => Promise<Payment<'nat'>>;
|
|
289
302
|
/**
|
|
290
303
|
* Register a handler that receives an event each time ICS-20 transfers are
|
|
291
|
-
* sent or received by the underlying account.
|
|
292
|
-
*
|
|
304
|
+
* sent or received by the underlying account.
|
|
305
|
+
*
|
|
306
|
+
* Handler includes {@link VTransferIBCEvent} and
|
|
307
|
+
* {@link FungibleTokenPacketData} that can be used for application logic.
|
|
308
|
+
*
|
|
309
|
+
* Each account may be associated with at most one handler at a given time.
|
|
310
|
+
*
|
|
293
311
|
* Does not grant the handler the ability to intercept a transfer. For a
|
|
294
312
|
* blocking handler, aka 'IBC Hooks', leverage `registerActiveTap` from
|
|
295
313
|
* `transferMiddleware` directly.
|
|
@@ -320,16 +338,12 @@ export interface IBCMsgTransferOptions {
|
|
|
320
338
|
* @see {OrchestrationAccountI}
|
|
321
339
|
*/
|
|
322
340
|
export type CosmosChainAccountMethods<CCI extends CosmosChainInfo> =
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
stakingTokens: {};
|
|
330
|
-
}
|
|
331
|
-
? StakingAccountActions & StakingAccountQueries
|
|
332
|
-
: {};
|
|
341
|
+
IcaAccountMethods &
|
|
342
|
+
(CCI extends {
|
|
343
|
+
stakingTokens: {};
|
|
344
|
+
}
|
|
345
|
+
? StakingAccountActions & StakingAccountQueries
|
|
346
|
+
: {});
|
|
333
347
|
|
|
334
348
|
export type ICQQueryFunction = (
|
|
335
349
|
msgs: JsonSafe<RequestQuery>[],
|
|
@@ -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"}
|
package/src/exos/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Exo structure
|
|
2
2
|
|
|
3
|
-
Last verified 2024-
|
|
3
|
+
Last verified 2024-10-30
|
|
4
4
|
|
|
5
5
|
```mermaid
|
|
6
6
|
classDiagram
|
|
@@ -52,9 +52,9 @@ classDiagram
|
|
|
52
52
|
|
|
53
53
|
%% In other vats
|
|
54
54
|
class Port {
|
|
55
|
-
getLocalAddress()
|
|
56
55
|
addListener()
|
|
57
56
|
connect()
|
|
57
|
+
getLocalAddress()
|
|
58
58
|
removeListener()
|
|
59
59
|
revoke()
|
|
60
60
|
}
|
|
@@ -76,9 +76,8 @@ classDiagram
|
|
|
76
76
|
deposit()
|
|
77
77
|
executeTx()
|
|
78
78
|
getBalance()
|
|
79
|
-
withdraw()
|
|
80
|
-
executeTx()
|
|
81
79
|
monitorTransfers()
|
|
80
|
+
withdraw()
|
|
82
81
|
}
|
|
83
82
|
|
|
84
83
|
%% In api consumer vats
|
|
@@ -113,12 +112,14 @@ classDiagram
|
|
|
113
112
|
timer: Timer
|
|
114
113
|
topicKit: RecorderKit<OrchestrationAccountNotification>
|
|
115
114
|
asContinuingOffer()
|
|
115
|
+
deactivate()
|
|
116
116
|
delegate()
|
|
117
117
|
executeEncodedTx()
|
|
118
118
|
getAddress()
|
|
119
119
|
getBalance()
|
|
120
120
|
getBalances()
|
|
121
121
|
getPublicTopics()
|
|
122
|
+
reactivate()
|
|
122
123
|
redelegate()
|
|
123
124
|
send()
|
|
124
125
|
sendAll()
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export const IcaAccountHolderI: import("@endo/patterns").InterfaceGuard<{
|
|
3
3
|
deactivate: import("@endo/patterns").MethodGuard;
|
|
4
4
|
reactivate: import("@endo/patterns").MethodGuard;
|
|
5
|
+
executeEncodedTx: import("@endo/patterns").MethodGuard;
|
|
5
6
|
getDelegation: import("@endo/patterns").MethodGuard;
|
|
6
7
|
getDelegations: import("@endo/patterns").MethodGuard;
|
|
7
8
|
getUnbondingDelegation: import("@endo/patterns").MethodGuard;
|
|
@@ -314,6 +315,12 @@ export function prepareCosmosOrchestrationAccountKit(zone: Zone, { chainHub, mak
|
|
|
314
315
|
getReward(validator: CosmosValidatorAddress): Vow<import("../orchestration-api.js").DenomAmount[]>;
|
|
315
316
|
/** @type {HostOf<StakingAccountQueries['getRewards']>} */
|
|
316
317
|
getRewards(): Vow<import("@agoric/async-flow").HostInterface<CosmosRewardsResponse>>;
|
|
318
|
+
/** @type {HostOf<IcaAccount['executeEncodedTx']>} */
|
|
319
|
+
executeEncodedTx(msgs: {
|
|
320
|
+
$typeUrl?: ("/google.protobuf.Any" | string) | undefined;
|
|
321
|
+
typeUrl: string;
|
|
322
|
+
value: string;
|
|
323
|
+
}[], opts?: Partial<Omit<import("@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js").TxBody, "messages">> | undefined): Vow<string>;
|
|
317
324
|
};
|
|
318
325
|
}>;
|
|
319
326
|
export function prepareCosmosOrchestrationAccount(zone: Zone, { chainHub, makeRecorderKit, timerService, vowTools, zcf }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cosmos-orchestration-account.d.ts","sourceRoot":"","sources":["cosmos-orchestration-account.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cosmos-orchestration-account.d.ts","sourceRoot":"","sources":["cosmos-orchestration-account.js"],"names":[],"mappings":"AA4IA,mCAAmC;AACnC;;;;;;;;;;;;;;;;;;;;;;;;;GASG;AAOH;;;;;;;;;;;GAkBE;AAYK,2DARI,IAAI,gGAEZ;IAAyB,QAAQ,EAAzB,QAAQ;IACgB,eAAe,EAAvC,eAAe;IACc,YAAY,EAAzC,OAAO,YAAY,CAAC;IACH,QAAQ,EAAzB,QAAQ;IACI,GAAG,EAAf,GAAG;CACb;kBAsGc,YAAY;kBACZ,eAAe;mBACf,gBAAgB;;aAEhB,UAAU;iBACV,OAAO,WAAW,CAAC;mBACnB,aAAa,GAAG,SAAS;WACzB,OAAO,YAAY,CAAC;;;QA+B3B,wDAAwD;;;QAWxD;;;WAGG;6BAFQ,SAAS,GACP,IAAI;;;QAOjB;;WAEG;8BADQ,SAAS,aAAa,CAAC,EAAE;;;QAYpC;;;WAGG;8BAFQ,SAAS,aAAa,CAAC,EAAE,GACvB,wBAAwB;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O,aAAa;qCACrO,6CAA6C;kCAK7D,cAAc;4BAHpB,kBAAkB;8BAIX,aAAa;kCAP0N,aAAa;qCAYhO,iCAAiC;sCAAjC,iCAAiC;gCAZkL,aAAa;mCAAb,aAAa;+BAAb,aAAa;0BAE7P,kDAAkD;mCAOzC,+CAA+C;8BACpD,sBAAsB;8CAVsN,aAAa;2CAAb,aAAa;yBAOpP,aAAa;uCAP0N,aAAa;2CAAb,aAAa;4CAAb,aAAa;iCACrO,6CAA6C"}
|
|
@@ -50,6 +50,8 @@ import {
|
|
|
50
50
|
DelegationShape,
|
|
51
51
|
DenomAmountShape,
|
|
52
52
|
IBCTransferOptionsShape,
|
|
53
|
+
Proto3Shape,
|
|
54
|
+
TxBodyOptsShape,
|
|
53
55
|
} from '../typeGuards.js';
|
|
54
56
|
import { coerceCoin, coerceDenom } from '../utils/amounts.js';
|
|
55
57
|
import {
|
|
@@ -143,6 +145,9 @@ export const IcaAccountHolderI = M.interface('IcaAccountHolder', {
|
|
|
143
145
|
...stakingAccountQueriesMethods,
|
|
144
146
|
deactivate: M.call().returns(VowShape),
|
|
145
147
|
reactivate: M.call().returns(VowShape),
|
|
148
|
+
executeEncodedTx: M.call(M.arrayOf(Proto3Shape))
|
|
149
|
+
.optional(TxBodyOptsShape)
|
|
150
|
+
.returns(VowShape),
|
|
146
151
|
});
|
|
147
152
|
|
|
148
153
|
/** @type {{ [name: string]: [description: string, valueShape: Matcher] }} */
|
|
@@ -955,11 +960,11 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
955
960
|
},
|
|
956
961
|
/** @type {HostOf<IcaAccount['deactivate']>} */
|
|
957
962
|
deactivate() {
|
|
958
|
-
return watch(E(this.facets.helper.owned()).deactivate());
|
|
963
|
+
return asVow(() => watch(E(this.facets.helper.owned()).deactivate()));
|
|
959
964
|
},
|
|
960
965
|
/** @type {HostOf<IcaAccount['reactivate']>} */
|
|
961
966
|
reactivate() {
|
|
962
|
-
return watch(E(this.facets.helper.owned()).reactivate());
|
|
967
|
+
return asVow(() => watch(E(this.facets.helper.owned()).reactivate()));
|
|
963
968
|
},
|
|
964
969
|
/** @type {HostOf<StakingAccountQueries['getDelegation']>} */
|
|
965
970
|
getDelegation(validator) {
|
|
@@ -1093,6 +1098,12 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
1093
1098
|
return watch(results, this.facets.rewardsQueryWatcher);
|
|
1094
1099
|
});
|
|
1095
1100
|
},
|
|
1101
|
+
/** @type {HostOf<IcaAccount['executeEncodedTx']>} */
|
|
1102
|
+
executeEncodedTx(msgs, opts) {
|
|
1103
|
+
return asVow(() =>
|
|
1104
|
+
watch(E(this.facets.helper.owned()).executeEncodedTx(msgs, opts)),
|
|
1105
|
+
);
|
|
1106
|
+
},
|
|
1096
1107
|
},
|
|
1097
1108
|
},
|
|
1098
1109
|
);
|
|
@@ -88,7 +88,7 @@ declare function prepareOrchestratorKit(zone: Zone, { chainHub, makeLocalChainFa
|
|
|
88
88
|
*/
|
|
89
89
|
onFulfilled([_agoricChainInfo, remoteChainInfo, connectionInfo]: [ChainInfo, ChainInfo, IBCConnectionInfo], name: string): import("@endo/exo").Guarded<{
|
|
90
90
|
getChainInfo(): Vow<any>;
|
|
91
|
-
makeAccount(): Vow<HostInterface<import("../orchestration-api.js").OrchestrationAccountI> | HostInterface<import("../orchestration-api.js").OrchestrationAccountI & import("../cosmos-api.js").
|
|
91
|
+
makeAccount(): Vow<HostInterface<import("../orchestration-api.js").OrchestrationAccountI> | HostInterface<import("../orchestration-api.js").OrchestrationAccountI & import("../cosmos-api.js").IcaAccountMethods> | HostInterface<import("../orchestration-api.js").OrchestrationAccountI & import("../cosmos-api.js").LocalAccountMethods> | HostInterface<import("../orchestration-api.js").OrchestrationAccountI & import("../cosmos-api.js").IcaAccountMethods & import("../cosmos-api.js").StakingAccountActions & import("../cosmos-api.js").StakingAccountQueries>>;
|
|
92
92
|
query(msgs: {
|
|
93
93
|
data: string;
|
|
94
94
|
path: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["orchestrator.js"],"names":[],"mappings":"AAiCA,0BAA0B;AAC1B;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["orchestrator.js"],"names":[],"mappings":"AAiCA,0BAA0B;AAC1B;;;;GAIG;AAiJI,0CARI,IAAI,UACJ;IACN,QAAQ,EAAE,QAAQ,CAAC;IACnB,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,QAAQ,EAAE,QAAQ,CAAC;CACpB;IAhEI,+CAA+C;;IAsB/C,mDAAmD;;IA2BnD,+CAA+C;cAApC,OAAO,YAAY,CAAC,UAAU,CAAC,CAAC;GAoBlD;;;;;+BAMY,UAAU,CAClB,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAC1C,CAAC,cAAc,CAAC;0BAnLG,mBAAmB;8BACE,gBAAgB;0CASrB,yBAAyB;2CACxB,0BAA0B;8BARlC,aAAa;2BASoC,aAAa;mCAVtC,oBAAoB;yBAC5C,aAAa;kCASoC,aAAa;4BAVtC,oBAAoB;AAuB5E;;;;;;;;GAQG;AACH,8CARW,IAAI,0FACJ;IACN,QAAQ,EAAE,QAAQ,CAAC;IACnB,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,QAAQ,EAAE,QAAQ,CAAC;CACpB;IAwCE,2DAA2D;;QAEzD;;WAEG;qCADQ,gBAAgB,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;IAQtC;;;OAGG;;QAED;;;;;;WAMG;0HADQ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;QASjB,+CAA+C;;QAsB/C,mDAAmD;;QA2BnD,+CAA+C;kBAApC,OAAO,YAAY,CAAC,UAAU,CAAC,CAAC;;GAKlD;qCA3J2C,gBAAgB;uCAWqB,aAAa;+BAAb,aAAa"}
|
package/src/exos/orchestrator.js
CHANGED
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
* @import {CosmosInterchainService} from './exo-interfaces.js';
|
|
26
26
|
* @import {MakeLocalChainFacade} from './local-chain-facade.js';
|
|
27
27
|
* @import {MakeRemoteChainFacade} from './remote-chain-facade.js';
|
|
28
|
-
* @import {Chain, ChainInfo, IBCConnectionInfo, Orchestrator} from '../types.js';
|
|
28
|
+
* @import {Chain, ChainInfo, IBCConnectionInfo, KnownChains, Orchestrator} from '../types.js';
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
const { Vow$ } = NetworkShape; // TODO #9611
|
|
@@ -148,14 +148,20 @@ const prepareOrchestratorKit = (
|
|
|
148
148
|
if (maybeChain.pending) {
|
|
149
149
|
throw Fail`wait until getChain(${q(chainName)}) completes before getDenomInfo(${q(denom)})`;
|
|
150
150
|
}
|
|
151
|
-
const chain =
|
|
151
|
+
const chain =
|
|
152
|
+
/** @type {HostInterface<Chain<KnownChains[keyof KnownChains]>>} */ (
|
|
153
|
+
maybeChain.value
|
|
154
|
+
);
|
|
152
155
|
chainByName.has(baseName) ||
|
|
153
156
|
Fail`use getChain(${q(baseName)}) before getDenomInfo(${q(denom)})`;
|
|
154
157
|
const maybeBase = chainByName.get(baseName);
|
|
155
158
|
if (maybeBase.pending) {
|
|
156
159
|
throw Fail`wait until getChain(${q(baseName)}) completes before getDenomInfo(${q(denom)})`;
|
|
157
160
|
}
|
|
158
|
-
const base =
|
|
161
|
+
const base =
|
|
162
|
+
/** @type {HostInterface<Chain<KnownChains[keyof KnownChains]>>} */ (
|
|
163
|
+
maybeBase.value
|
|
164
|
+
);
|
|
159
165
|
return harden({ chain, base, brand, baseDenom });
|
|
160
166
|
},
|
|
161
167
|
/** @type {HostOf<Orchestrator['asAmount']>} */
|
|
@@ -10,7 +10,7 @@ export function prepareRemoteChainFacade(zone: Zone, powers: RemoteChainFacadePo
|
|
|
10
10
|
/** @type {HostOf<Chain['getChainInfo']>} */
|
|
11
11
|
getChainInfo(): Vow<any>;
|
|
12
12
|
/** @type {HostOf<Chain['makeAccount']>} */
|
|
13
|
-
makeAccount(): Vow<import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccountI> | import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccountI & import("../cosmos-api.js").
|
|
13
|
+
makeAccount(): Vow<import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccountI> | import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccountI & import("../cosmos-api.js").IcaAccountMethods> | import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccountI & import("../cosmos-api.js").LocalAccountMethods> | import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccountI & import("../cosmos-api.js").IcaAccountMethods & import("../cosmos-api.js").StakingAccountActions & import("../cosmos-api.js").StakingAccountQueries>>;
|
|
14
14
|
/**
|
|
15
15
|
* @type {HostOf<
|
|
16
16
|
* Chain<CosmosChainInfo & { icqEnabled: true }>['query']
|
|
@@ -51,7 +51,7 @@ export type ChainAddress = {
|
|
|
51
51
|
*
|
|
52
52
|
* The methods available depend on the chain and its capabilities.
|
|
53
53
|
*/
|
|
54
|
-
export type OrchestrationAccount<CI extends ChainInfo> = OrchestrationAccountI & (CI extends CosmosChainInfo ? CI['chainId'] extends `agoric${string}` ?
|
|
54
|
+
export type OrchestrationAccount<CI extends ChainInfo> = OrchestrationAccountI & (CI extends CosmosChainInfo ? CI['chainId'] extends `agoric${string}` ? LocalAccountMethods : CosmosChainAccountMethods<CI> : {});
|
|
55
55
|
/**
|
|
56
56
|
* An object for access the core functions of a remote chain.
|
|
57
57
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestration-api.d.ts","sourceRoot":"","sources":["orchestration-api.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SA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BAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CAC9E;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,iBAAiB,CAAC,EAAE,GAAG,OAAO;IAC7C,CAAC,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACrE;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,YAAY,CAAC;IACxB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,aAAa;AACb,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,YAAY,CAAC;CAC3B;AACD,aAAa;AACb,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AACD,aAAa;AACb,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
package/src/orchestration-api.ts
CHANGED
|
@@ -7,10 +7,7 @@
|
|
|
7
7
|
import type { Amount, Brand, NatAmount } from '@agoric/ertp/src/types.js';
|
|
8
8
|
import type { CurrentWalletRecord } from '@agoric/smart-wallet/src/smartWallet.js';
|
|
9
9
|
import type { Timestamp } from '@agoric/time';
|
|
10
|
-
import type {
|
|
11
|
-
LocalChainAccount,
|
|
12
|
-
QueryManyFn,
|
|
13
|
-
} from '@agoric/vats/src/localchain.js';
|
|
10
|
+
import type { QueryManyFn } from '@agoric/vats/src/localchain.js';
|
|
14
11
|
import type { ResolvedPublicTopic } from '@agoric/zoe/src/contractSupport/topics.js';
|
|
15
12
|
import type { Passable } from '@endo/marshal';
|
|
16
13
|
import type {
|
|
@@ -76,7 +73,7 @@ export type ChainAddress = {
|
|
|
76
73
|
export type OrchestrationAccount<CI extends ChainInfo> = OrchestrationAccountI &
|
|
77
74
|
(CI extends CosmosChainInfo
|
|
78
75
|
? CI['chainId'] extends `agoric${string}`
|
|
79
|
-
?
|
|
76
|
+
? LocalAccountMethods
|
|
80
77
|
: CosmosChainAccountMethods<CI>
|
|
81
78
|
: {});
|
|
82
79
|
|
|
@@ -91,6 +91,11 @@ export function startStakeAtom({ consume: { agoricNames, board, chainStorage, ch
|
|
|
91
91
|
}[]>;
|
|
92
92
|
getReward(validator: import("../cosmos-api.js").CosmosValidatorAddress): import("@agoric/vow").Vow<import("../orchestration-api.js").DenomAmount[]>;
|
|
93
93
|
getRewards(): import("@agoric/vow").Vow<import("@agoric/async-flow").HostInterface<import("../cosmos-api.js").CosmosRewardsResponse>>;
|
|
94
|
+
executeEncodedTx(msgs: {
|
|
95
|
+
$typeUrl?: ("/google.protobuf.Any" | string) | undefined;
|
|
96
|
+
typeUrl: string;
|
|
97
|
+
value: string;
|
|
98
|
+
}[], opts?: Partial<Omit<import("@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js").TxBody, "messages">> | undefined): import("@agoric/vow").Vow<string>;
|
|
94
99
|
}>>;
|
|
95
100
|
makeAccountInvitationMaker(): Promise<Invitation<import("../utils/zoe-tools.js").ResolvedContinuingOfferResult, undefined>>;
|
|
96
101
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-stakeAtom.d.ts","sourceRoot":"","sources":["start-stakeAtom.js"],"names":[],"mappings":"AAyBO,0PAVI,eAAe,GAAG;IACxB,YAAY,EAAE;QACZ,OAAO,EAAE;YACP,QAAQ,EAAE,YAAY,CAC9B
|
|
1
|
+
{"version":3,"file":"start-stakeAtom.d.ts","sourceRoot":"","sources":["start-stakeAtom.js"],"names":[],"mappings":"AAyBO,0PAVI,eAAe,GAAG;IACxB,YAAY,EAAE;QACZ,OAAO,EAAE;YACP,QAAQ,EAAE,YAAY,CAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA2D,CAClD,CAAC;SACH,CAAC;KACH,CAAC;CACH,iBA4DH;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BN;mCAzG4C,gCAAgC"}
|
|
@@ -91,6 +91,11 @@ export function startStakeOsmo({ consume: { agoricNames, board, chainStorage, ch
|
|
|
91
91
|
}[]>;
|
|
92
92
|
getReward(validator: import("../cosmos-api.js").CosmosValidatorAddress): import("@agoric/vow").Vow<import("../orchestration-api.js").DenomAmount[]>;
|
|
93
93
|
getRewards(): import("@agoric/vow").Vow<import("@agoric/async-flow").HostInterface<import("../cosmos-api.js").CosmosRewardsResponse>>;
|
|
94
|
+
executeEncodedTx(msgs: {
|
|
95
|
+
$typeUrl?: ("/google.protobuf.Any" | string) | undefined;
|
|
96
|
+
typeUrl: string;
|
|
97
|
+
value: string;
|
|
98
|
+
}[], opts?: Partial<Omit<import("@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js").TxBody, "messages">> | undefined): import("@agoric/vow").Vow<string>;
|
|
94
99
|
}>>;
|
|
95
100
|
makeAccountInvitationMaker(): Promise<Invitation<import("../utils/zoe-tools.js").ResolvedContinuingOfferResult, undefined>>;
|
|
96
101
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-stakeOsmo.d.ts","sourceRoot":"","sources":["start-stakeOsmo.js"],"names":[],"mappings":"AA8BO,0PAfI,eAAe,GAAG;IACxB,YAAY,EAAE;QACZ,OAAO,EAAE;YACP,QAAQ,EAAE,YAAY,CAC9B
|
|
1
|
+
{"version":3,"file":"start-stakeOsmo.d.ts","sourceRoot":"","sources":["start-stakeOsmo.js"],"names":[],"mappings":"AA8BO,0PAfI,eAAe,GAAG;IACxB,YAAY,EAAE;QACZ,OAAO,EAAE;YACP,QAAQ,EAAE,YAAY,CAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA2D,CAClD,CAAC;SACH,CAAC;KACH,CAAC;IACF,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,SAAS,EAAE,GAAG,CAAC;SAChB,CAAC;KACH,CAAC;CACH,iBA4DH;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BN"}
|