@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function prepareCosmosInterchainService(zone: Zone, vowTools: VowTools): (powers: Partial<
|
|
1
|
+
export function prepareCosmosInterchainService(zone: Zone, vowTools: VowTools): (powers: Partial<CosmosOrchestrationPowers>) => import("@endo/exo").Guarded<{
|
|
2
2
|
/**
|
|
3
3
|
* @satisfies {CosmosInterchainService['makeAccount']}
|
|
4
4
|
* @param {string} chainId
|
|
@@ -9,16 +9,16 @@ export function prepareCosmosInterchainService(zone: Zone, vowTools: VowTools):
|
|
|
9
9
|
* channel address, such as version and ordering
|
|
10
10
|
* @returns {Vow<IcaAccount>}
|
|
11
11
|
*/
|
|
12
|
-
makeAccount(chainId: string, hostConnectionId: IBCConnectionID, controllerConnectionId: IBCConnectionID, opts?: ICAChannelAddressOpts
|
|
12
|
+
makeAccount(chainId: string, hostConnectionId: IBCConnectionID, controllerConnectionId: IBCConnectionID, opts?: ICAChannelAddressOpts): Vow<IcaAccount>;
|
|
13
13
|
/**
|
|
14
14
|
* @satisfies {CosmosInterchainService['provideICQConnection']}
|
|
15
15
|
* @param {IBCConnectionID} controllerConnectionId
|
|
16
16
|
* @param {string} [version]
|
|
17
17
|
* @returns {Vow<ICQConnection> | ICQConnection}
|
|
18
18
|
*/
|
|
19
|
-
provideICQConnection(controllerConnectionId: IBCConnectionID, version?: string
|
|
19
|
+
provideICQConnection(controllerConnectionId: IBCConnectionID, version?: string): Vow<ICQConnection> | ICQConnection;
|
|
20
20
|
}>;
|
|
21
|
-
export type
|
|
21
|
+
export type CosmosOrchestrationPowers = {
|
|
22
22
|
portAllocator: Remote<PortAllocator>;
|
|
23
23
|
/**
|
|
24
24
|
* reserve a state key for future use. can hold
|
|
@@ -31,7 +31,7 @@ export type ConnectionKit = IcaAccountKit | ICQConnectionKit;
|
|
|
31
31
|
export type OrchestrationState = {
|
|
32
32
|
icqConnections: ICQConnectionStore;
|
|
33
33
|
sharedICQPort: Remote<Port> | undefined;
|
|
34
|
-
} &
|
|
34
|
+
} & CosmosOrchestrationPowers;
|
|
35
35
|
export type MakeCosmosInterchainService = ReturnType<typeof prepareCosmosInterchainService>;
|
|
36
36
|
import type { Zone } from '@agoric/base-zone';
|
|
37
37
|
import type { VowTools } from '@agoric/vow';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cosmos-interchain-service.d.ts","sourceRoot":"","sources":["cosmos-interchain-service.js"],"names":[],"mappings":"AAmQO,qDAJI,IAAI,YACJ,QAAQ;IAvEX;;;;;;;;;OASG;yBAPQ,MAAM,oBACN,eAAe,0BAEf,eAAe,
|
|
1
|
+
{"version":3,"file":"cosmos-interchain-service.d.ts","sourceRoot":"","sources":["cosmos-interchain-service.js"],"names":[],"mappings":"AAmQO,qDAJI,IAAI,YACJ,QAAQ;IAvEX;;;;;;;;;OASG;yBAPQ,MAAM,oBACN,eAAe,0BAEf,eAAe,SACf,qBAAqB,GAEnB,IAAI,UAAU,CAAC;IAkB5B;;;;;OAKG;iDAHQ,eAAe,YACf,MAAM,GACJ,IAAI,aAAa,CAAC,GAAG,aAAa;GA6DtD;;mBAxPa,OAAO,aAAa,CAAC;;;;;cACrB,SAAS;;iCAIT,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;4BAElC,aAAa,GAAG,gBAAgB;iCAGjC;IACR,cAAc,EAAE,kBAAkB,CAAC;IACnC,aAAa,EAAE,OAAO,IAAI,CAAC,GAAG,SAAS,CAAC;CACzC,GAAG,yBAAyB;0CA8OlB,UAAU,CAAC,OAAO,8BAA8B,CAAC;0BAxQxC,mBAAmB;8BAKV,aAAa;qCAFX,cAAc;2CAIR,qBAAqB;gCADgB,aAAa;yBAD1D,aAAa;mCACgC,aAAa;mCAJxC,iBAAiB;4BAD1C,kBAAkB;sCAKkC,aAAa;mCAAb,aAAa;0BAJxC,iBAAiB"}
|
|
@@ -25,7 +25,7 @@ import { prepareICQConnectionKit } from './icq-connection-kit.js';
|
|
|
25
25
|
|
|
26
26
|
const { Vow$ } = NetworkShape; // TODO #9611
|
|
27
27
|
/**
|
|
28
|
-
* @typedef {object}
|
|
28
|
+
* @typedef {object} CosmosOrchestrationPowers
|
|
29
29
|
* @property {Remote<PortAllocator>} portAllocator
|
|
30
30
|
* @property {undefined} reserved reserve a state key for future use. can hold
|
|
31
31
|
* an additional power or a record of powers
|
|
@@ -39,7 +39,7 @@ const { Vow$ } = NetworkShape; // TODO #9611
|
|
|
39
39
|
* @typedef {{
|
|
40
40
|
* icqConnections: ICQConnectionStore;
|
|
41
41
|
* sharedICQPort: Remote<Port> | undefined;
|
|
42
|
-
* } &
|
|
42
|
+
* } & CosmosOrchestrationPowers} OrchestrationState
|
|
43
43
|
*/
|
|
44
44
|
|
|
45
45
|
/**
|
|
@@ -101,7 +101,7 @@ const prepareCosmosOrchestrationServiceKit = (
|
|
|
101
101
|
.returns(Vow$(M.remotable('ICQConnection'))),
|
|
102
102
|
}),
|
|
103
103
|
},
|
|
104
|
-
/** @param {Partial<
|
|
104
|
+
/** @param {Partial<CosmosOrchestrationPowers>} powers */
|
|
105
105
|
powers => {
|
|
106
106
|
mustMatch(powers?.portAllocator, M.remotable('PortAllocator'));
|
|
107
107
|
const icqConnections = zone.detached().mapStore('ICQConnections');
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
/** @see {
|
|
1
|
+
/** @see {OrchestrationAccountCommon} */
|
|
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;
|
|
@@ -210,45 +211,27 @@ export function prepareCosmosOrchestrationAccountKit(zone: Zone, { chainHub, mak
|
|
|
210
211
|
}>>;
|
|
211
212
|
};
|
|
212
213
|
holder: {
|
|
213
|
-
/** @type {HostOf<OrchestrationAccountI['asContinuingOffer']>} */
|
|
214
214
|
asContinuingOffer(): Vow<import("@agoric/async-flow").HostInterface<import("../utils/zoe-tools.js").ResolvedContinuingOfferResult>>;
|
|
215
|
-
/** @type {HostOf<OrchestrationAccountI['getPublicTopics']>} */
|
|
216
215
|
getPublicTopics(): Vow<import("@agoric/async-flow").HostInterface<Record<string, import("@agoric/zoe/src/contractSupport/topics.js").ResolvedPublicTopic<unknown>>>>;
|
|
217
|
-
/** @type {HostOf<OrchestrationAccountI['getAddress']>} */
|
|
218
216
|
getAddress(): import("@agoric/async-flow").HostInterface<ChainAddress>;
|
|
219
|
-
/** @type {HostOf<StakingAccountActions['delegate']>} */
|
|
220
217
|
delegate(validator: CosmosValidatorAddress, amount: AmountArg): Vow<void>;
|
|
221
|
-
/** @type {HostOf<StakingAccountActions['redelegate']>} */
|
|
222
218
|
redelegate(srcValidator: CosmosValidatorAddress, dstValidator: CosmosValidatorAddress, amount: AmountArg): Vow<void>;
|
|
223
|
-
/** @type {HostOf<StakingAccountActions['withdrawReward']>} */
|
|
224
219
|
withdrawReward(validator: CosmosValidatorAddress): Vow<import("../orchestration-api.js").DenomAmount[]>;
|
|
225
|
-
/** @type {HostOf<OrchestrationAccountI['getBalance']>} */
|
|
226
220
|
getBalance(denom: import("../orchestration-api.js").DenomArg): Vow<import("../orchestration-api.js").DenomAmount>;
|
|
227
|
-
/** @type {HostOf<OrchestrationAccountI['getBalances']>} */
|
|
228
221
|
getBalances(): Vow<import("../orchestration-api.js").DenomAmount[]>;
|
|
229
|
-
/** @type {HostOf<OrchestrationAccountI['send']>} */
|
|
230
222
|
send(toAccount: ChainAddress, amounts: AmountArg): Vow<void>;
|
|
231
|
-
/** @type {HostOf<OrchestrationAccountI['sendAll']>} */
|
|
232
223
|
sendAll(toAccount: ChainAddress, amounts: AmountArg[]): Vow<void>;
|
|
233
|
-
/** @type {HostOf<OrchestrationAccountI['transfer']>} */
|
|
234
224
|
transfer(destination: ChainAddress, amount: AmountArg, opts?: IBCMsgTransferOptions | undefined): Vow<void>;
|
|
235
|
-
/** @type {HostOf<OrchestrationAccountI['transferSteps']>} */
|
|
236
225
|
transferSteps(amount: AmountArg, msg: import("../orchestration-api.js").TransferMsg): Vow<void>;
|
|
237
|
-
/** @type {HostOf<StakingAccountActions['withdrawRewards']>} */
|
|
238
226
|
withdrawRewards(): Vow<import("../orchestration-api.js").DenomAmount[]>;
|
|
239
|
-
/** @type {HostOf<StakingAccountActions['undelegate']>} */
|
|
240
227
|
undelegate(delegations: {
|
|
241
228
|
amount: AmountArg;
|
|
242
229
|
delegator?: ChainAddress;
|
|
243
230
|
validator: CosmosValidatorAddress;
|
|
244
231
|
}[]): Vow<void>;
|
|
245
|
-
/** @type {HostOf<IcaAccount['deactivate']>} */
|
|
246
232
|
deactivate(): Vow<void>;
|
|
247
|
-
/** @type {HostOf<IcaAccount['reactivate']>} */
|
|
248
233
|
reactivate(): Vow<void>;
|
|
249
|
-
/** @type {HostOf<StakingAccountQueries['getDelegation']>} */
|
|
250
234
|
getDelegation(validator: CosmosValidatorAddress): Vow<import("@agoric/async-flow").HostInterface<CosmosDelegationResponse>>;
|
|
251
|
-
/** @type {HostOf<StakingAccountQueries['getDelegations']>} */
|
|
252
235
|
getDelegations(): Vow<{
|
|
253
236
|
delegator: {
|
|
254
237
|
chainId: string;
|
|
@@ -265,9 +248,7 @@ export function prepareCosmosOrchestrationAccountKit(zone: Zone, { chainHub, mak
|
|
|
265
248
|
value: bigint;
|
|
266
249
|
};
|
|
267
250
|
}[]>;
|
|
268
|
-
/** @type {HostOf<StakingAccountQueries['getUnbondingDelegation']>} */
|
|
269
251
|
getUnbondingDelegation(validator: CosmosValidatorAddress): Vow<import("@agoric/async-flow").HostInterface<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js").UnbondingDelegation>>;
|
|
270
|
-
/** @type {HostOf<StakingAccountQueries['getUnbondingDelegations']>} */
|
|
271
252
|
getUnbondingDelegations(): Vow<{
|
|
272
253
|
delegatorAddress: string;
|
|
273
254
|
validatorAddress: string;
|
|
@@ -281,7 +262,6 @@ export function prepareCosmosOrchestrationAccountKit(zone: Zone, { chainHub, mak
|
|
|
281
262
|
balance: string;
|
|
282
263
|
}[];
|
|
283
264
|
}[]>;
|
|
284
|
-
/** @type {HostOf<StakingAccountQueries['getRedelegations']>} */
|
|
285
265
|
getRedelegations(): Vow<{
|
|
286
266
|
redelegation: {
|
|
287
267
|
delegatorAddress: string;
|
|
@@ -310,10 +290,13 @@ export function prepareCosmosOrchestrationAccountKit(zone: Zone, { chainHub, mak
|
|
|
310
290
|
balance: string;
|
|
311
291
|
}[];
|
|
312
292
|
}[]>;
|
|
313
|
-
/** @type {HostOf<StakingAccountQueries['getReward']>} */
|
|
314
293
|
getReward(validator: CosmosValidatorAddress): Vow<import("../orchestration-api.js").DenomAmount[]>;
|
|
315
|
-
/** @type {HostOf<StakingAccountQueries['getRewards']>} */
|
|
316
294
|
getRewards(): Vow<import("@agoric/async-flow").HostInterface<CosmosRewardsResponse>>;
|
|
295
|
+
executeEncodedTx(msgs: {
|
|
296
|
+
$typeUrl?: "/google.protobuf.Any" | string | undefined;
|
|
297
|
+
typeUrl: string;
|
|
298
|
+
value: string;
|
|
299
|
+
}[], opts?: Partial<Omit<import("@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js").TxBody, "messages">> | undefined): Vow<string>;
|
|
317
300
|
};
|
|
318
301
|
}>;
|
|
319
302
|
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,wCAAwC;AACxC;;;;;;;;;;;;;;;;;;;;;;;;;GASG;AAOH;;;;;;;;;;;GAkBE;AAYK,2DARI,IAAI,gGAEZ;IAAyB,QAAQ,EA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QAAQ,CAAC;0BA/iC9B,cAAc;8BARuO,aAAa;qCAC1O,6CAA6C;kCAK7D,cAAc;4BAHpB,kBAAkB;8BAIX,aAAa;kCAP+N,aAAa;qCAYrO,iCAAiC;sCAAjC,iCAAiC;gCAZuL,aAAa;mCAAb,aAAa;+BAAb,aAAa;0BAElQ,kDAAkD;mCAOzC,+CAA+C;8BACpD,sBAAsB;8CAV2N,aAAa;2CAAb,aAAa;yBAOzP,aAAa;uCAP+N,aAAa;2CAAb,aAAa;4CAAb,aAAa;iCAC1O,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 {
|
|
@@ -65,7 +67,7 @@ import { makeTimestampHelper } from '../utils/time.js';
|
|
|
65
67
|
|
|
66
68
|
/**
|
|
67
69
|
* @import {HostOf} from '@agoric/async-flow';
|
|
68
|
-
* @import {AmountArg, IcaAccount, ChainAddress, CosmosValidatorAddress, ICQConnection, StakingAccountActions, StakingAccountQueries,
|
|
70
|
+
* @import {AmountArg, IcaAccount, ChainAddress, CosmosValidatorAddress, ICQConnection, StakingAccountActions, StakingAccountQueries, OrchestrationAccountCommon, CosmosRewardsResponse, IBCConnectionInfo, IBCMsgTransferOptions, ChainHub, CosmosDelegationResponse} from '../types.js';
|
|
69
71
|
* @import {RecorderKit, MakeRecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
70
72
|
* @import {Coin} from '@agoric/cosmic-proto/cosmos/base/v1beta1/coin.js';
|
|
71
73
|
* @import {Remote} from '@agoric/internal';
|
|
@@ -80,7 +82,7 @@ import { makeTimestampHelper } from '../utils/time.js';
|
|
|
80
82
|
* @import {LocalIbcAddress, RemoteIbcAddress} from '@agoric/vats/tools/ibc-utils.js';
|
|
81
83
|
*/
|
|
82
84
|
|
|
83
|
-
const trace = makeTracer('
|
|
85
|
+
const trace = makeTracer('CosmosOrchAccount');
|
|
84
86
|
|
|
85
87
|
const { Vow$ } = NetworkShape; // TODO #9611
|
|
86
88
|
|
|
@@ -136,13 +138,16 @@ const stakingAccountQueriesMethods = {
|
|
|
136
138
|
getRewards: M.call().returns(VowShape),
|
|
137
139
|
};
|
|
138
140
|
|
|
139
|
-
/** @see {
|
|
141
|
+
/** @see {OrchestrationAccountCommon} */
|
|
140
142
|
export const IcaAccountHolderI = M.interface('IcaAccountHolder', {
|
|
141
143
|
...orchestrationAccountMethods,
|
|
142
144
|
...stakingAccountActionsMethods,
|
|
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] }} */
|
|
@@ -335,6 +340,8 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
335
340
|
* @returns {Coin}
|
|
336
341
|
*/
|
|
337
342
|
amountToCoin(amount) {
|
|
343
|
+
!('brand' in amount) ||
|
|
344
|
+
Fail`'amountToCoin' not working for ${q(amount.brand)} until #10449; use 'DenomAmount' for now`;
|
|
338
345
|
return coerceCoin(chainHub, amount);
|
|
339
346
|
},
|
|
340
347
|
},
|
|
@@ -695,7 +702,7 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
695
702
|
},
|
|
696
703
|
},
|
|
697
704
|
holder: {
|
|
698
|
-
/** @type {HostOf<
|
|
705
|
+
/** @type {HostOf<OrchestrationAccountCommon['asContinuingOffer']>} */
|
|
699
706
|
asContinuingOffer() {
|
|
700
707
|
// @ts-expect-error XXX invitationMakers
|
|
701
708
|
// getPublicTopics resolves promptly (same run), so we don't need a watcher
|
|
@@ -717,7 +724,7 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
717
724
|
});
|
|
718
725
|
});
|
|
719
726
|
},
|
|
720
|
-
/** @type {HostOf<
|
|
727
|
+
/** @type {HostOf<OrchestrationAccountCommon['getPublicTopics']>} */
|
|
721
728
|
getPublicTopics() {
|
|
722
729
|
// getStoragePath resolves promptly (same run), so we don't need a watcher
|
|
723
730
|
// eslint-disable-next-line no-restricted-syntax
|
|
@@ -734,7 +741,7 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
734
741
|
});
|
|
735
742
|
},
|
|
736
743
|
|
|
737
|
-
/** @type {HostOf<
|
|
744
|
+
/** @type {HostOf<OrchestrationAccountCommon['getAddress']>} */
|
|
738
745
|
getAddress() {
|
|
739
746
|
return this.state.chainAddress;
|
|
740
747
|
},
|
|
@@ -801,7 +808,7 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
801
808
|
return watch(results, this.facets.withdrawRewardWatcher);
|
|
802
809
|
});
|
|
803
810
|
},
|
|
804
|
-
/** @type {HostOf<
|
|
811
|
+
/** @type {HostOf<OrchestrationAccountCommon['getBalance']>} */
|
|
805
812
|
getBalance(denom) {
|
|
806
813
|
return asVow(() => {
|
|
807
814
|
const { chainAddress, icqConnection } = this.state;
|
|
@@ -820,7 +827,7 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
820
827
|
});
|
|
821
828
|
},
|
|
822
829
|
|
|
823
|
-
/** @type {HostOf<
|
|
830
|
+
/** @type {HostOf<OrchestrationAccountCommon['getBalances']>} */
|
|
824
831
|
getBalances() {
|
|
825
832
|
return asVow(() => {
|
|
826
833
|
const { chainAddress, icqConnection } = this.state;
|
|
@@ -838,7 +845,7 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
838
845
|
});
|
|
839
846
|
},
|
|
840
847
|
|
|
841
|
-
/** @type {HostOf<
|
|
848
|
+
/** @type {HostOf<OrchestrationAccountCommon['send']>} */
|
|
842
849
|
send(toAccount, amount) {
|
|
843
850
|
return asVow(() => {
|
|
844
851
|
trace('send', toAccount, amount);
|
|
@@ -859,7 +866,7 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
859
866
|
});
|
|
860
867
|
},
|
|
861
868
|
|
|
862
|
-
/** @type {HostOf<
|
|
869
|
+
/** @type {HostOf<OrchestrationAccountCommon['sendAll']>} */
|
|
863
870
|
sendAll(toAccount, amounts) {
|
|
864
871
|
return asVow(() => {
|
|
865
872
|
trace('sendAll', toAccount, amounts);
|
|
@@ -880,7 +887,7 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
880
887
|
});
|
|
881
888
|
},
|
|
882
889
|
|
|
883
|
-
/** @type {HostOf<
|
|
890
|
+
/** @type {HostOf<OrchestrationAccountCommon['transfer']>} */
|
|
884
891
|
transfer(destination, amount, opts) {
|
|
885
892
|
trace('transfer', destination, amount, opts);
|
|
886
893
|
return asVow(() => {
|
|
@@ -914,7 +921,7 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
914
921
|
});
|
|
915
922
|
},
|
|
916
923
|
|
|
917
|
-
/** @type {HostOf<
|
|
924
|
+
/** @type {HostOf<OrchestrationAccountCommon['transferSteps']>} */
|
|
918
925
|
transferSteps(amount, msg) {
|
|
919
926
|
console.log('transferSteps got', amount, msg);
|
|
920
927
|
return asVow(() => Fail`not yet implemented`);
|
|
@@ -955,11 +962,11 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
955
962
|
},
|
|
956
963
|
/** @type {HostOf<IcaAccount['deactivate']>} */
|
|
957
964
|
deactivate() {
|
|
958
|
-
return watch(E(this.facets.helper.owned()).deactivate());
|
|
965
|
+
return asVow(() => watch(E(this.facets.helper.owned()).deactivate()));
|
|
959
966
|
},
|
|
960
967
|
/** @type {HostOf<IcaAccount['reactivate']>} */
|
|
961
968
|
reactivate() {
|
|
962
|
-
return watch(E(this.facets.helper.owned()).reactivate());
|
|
969
|
+
return asVow(() => watch(E(this.facets.helper.owned()).reactivate()));
|
|
963
970
|
},
|
|
964
971
|
/** @type {HostOf<StakingAccountQueries['getDelegation']>} */
|
|
965
972
|
getDelegation(validator) {
|
|
@@ -1093,6 +1100,12 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
1093
1100
|
return watch(results, this.facets.rewardsQueryWatcher);
|
|
1094
1101
|
});
|
|
1095
1102
|
},
|
|
1103
|
+
/** @type {HostOf<IcaAccount['executeEncodedTx']>} */
|
|
1104
|
+
executeEncodedTx(msgs, opts) {
|
|
1105
|
+
return asVow(() =>
|
|
1106
|
+
watch(E(this.facets.helper.owned()).executeEncodedTx(msgs, opts)),
|
|
1107
|
+
);
|
|
1108
|
+
},
|
|
1096
1109
|
},
|
|
1097
1110
|
},
|
|
1098
1111
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ibc-packet.d.ts","sourceRoot":"","sources":["ibc-packet.js"],"names":[],"mappings":"AAMA,
|
|
1
|
+
{"version":3,"file":"ibc-packet.d.ts","sourceRoot":"","sources":["ibc-packet.js"],"names":[],"mappings":"AAMA,4CAA6C,MAAM,CAAC;AAkB7C,gDAHI,GAAG,GACD,OAAO,CAgCnB;AAOM,+CAHI,OAAO,mBAAmB,EAAE,IAAI,8BAChC,QAAQ,GAAG;IAAE,eAAe,EAAE,eAAe,CAAA;CAAE;eAkBtC,iBAAiB,CAAC,WAAW,CAAC;;;;;;;;GA0EjD;AAOM,yCAHI,OAAO,mBAAmB,EAAE,IAAI,YAChC,QAAQ,wBAyBN,OAAO,UACP,IAAI,GAAG,CAAC,QACR,aAAa;;;EAmBzB;AAQM,sCAHI,OAAO,mBAAmB,EAAE,IAAI,YAChC,QAAQ;;mBAnIC,iBAAiB,CAAC,WAAW,CAAC;;;;;;;;;0CAwGrC,OAAO,UACP,IAAI,GAAG,CAAC,QACR,aAAa;;;;EAkCzB;8BAba,UAAU,CAAC,OAAO,kBAAkB,CAAC;8BAlMnB,aAAa;uCACT,gCAAgC;yBADpC,aAAa;mCAEb,mBAAmB"}
|
|
@@ -30,10 +30,8 @@ export function prepareIcaAccountKit(zone: Zone, { watch, asVow }: VowTools): (c
|
|
|
30
30
|
* using the corresponding `Msg*Response` object.
|
|
31
31
|
* @throws {Error} if packet fails to send or an error is returned
|
|
32
32
|
*/
|
|
33
|
-
executeEncodedTx(msgs: AnyJson[], opts?: Omit<TxBody, "messages">
|
|
34
|
-
/** @type {HostOf<IcaAccount['deactivate']>} */
|
|
33
|
+
executeEncodedTx(msgs: AnyJson[], opts?: Omit<TxBody, "messages">): Vow<string>;
|
|
35
34
|
deactivate(): Vow<void>;
|
|
36
|
-
/** @type {HostOf<IcaAccount['reactivate']>} */
|
|
37
35
|
reactivate(): Vow<void>;
|
|
38
36
|
};
|
|
39
37
|
connectionHandler: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ica-account-kit.d.ts","sourceRoot":"","sources":["ica-account-kit.js"],"names":[],"mappings":"AA8BA;;;;;;;;;GAWG;AA0BI,2CAJI,IAAI,oBACJ,QAAQ;;QAiCX,0BAA0B;yBAAd,MAAM;;;QAMlB,8BAA8B;sBAAhB,YAAY;;;;;QAyB1B;;;;;;;;;WASG;+BALQ,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ica-account-kit.d.ts","sourceRoot":"","sources":["ica-account-kit.js"],"names":[],"mappings":"AA8BA;;;;;;;;;GAWG;AA0BI,2CAJI,IAAI,oBACJ,QAAQ;;QAiCX,0BAA0B;yBAAd,MAAM;;;QAMlB,8BAA8B;sBAAhB,YAAY;;;;;QAyB1B;;;;;;;;;WASG;+BALQ,OAAO,EAAE,SACT,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,GACtB,IAAI,MAAM,CAAC;;;;;QA0CxB;;;;WAIG;2BAHQ,OAAO,UAAU,CAAC,aAClB,eAAe,cACf,gBAAgB;QAiB3B;;;;;;;;;;;;;;;;WAgBG;6BAHQ,OAAO,UAAU,CAAC,UAClB,OAAO;;GAkBvB;;;;oBAtLU;IACR,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,IAAI,CAAC;IACX,UAAU,EAAE,OAAO,UAAU,CAAC,GAAG,SAAS,CAAC;IAC3C,YAAY,EAAE,eAAe,GAAG,SAAS,CAAC;IAC1C,sBAAsB,EAAE,MAAM,CAAC;IAC/B,aAAa,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAC5C,YAAY,EAAE,YAAY,GAAG,SAAS,CAAC;IACvC,iBAAiB,EAAE,OAAO,CAAC;CAC5B;4BA+KU,UAAU,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;0BArN1C,mBAAmB;8BAEF,aAAa;0BADlB,iBAAiB;kCAKT,aAAa;yBAJhB,aAAa;6BAC3B,sBAAsB;4BACvB,8CAA8C;gCAHpC,iBAAiB;4BACZ,aAAa;qCAGD,iCAAiC;sCAAjC,iCAAiC"}
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
export function prepareLocalChainFacade(zone: Zone, powers: LocalChainFacadePowers): (localChainInfo: Readonly<{
|
|
2
|
+
bech32Prefix?: string;
|
|
2
3
|
chainId: string;
|
|
3
4
|
connections?: Record<string, IBCConnectionInfo>;
|
|
4
5
|
icqEnabled?: boolean;
|
|
6
|
+
pfmEnabled?: boolean;
|
|
5
7
|
stakingTokens?: Readonly<Array<{
|
|
6
8
|
denom: string;
|
|
7
9
|
}>>;
|
|
8
10
|
}>) => import("@endo/exo").Guarded<{
|
|
9
11
|
getChainInfo(): Vow<Readonly<{
|
|
12
|
+
bech32Prefix?: string;
|
|
10
13
|
chainId: string;
|
|
11
14
|
connections?: Record<string, IBCConnectionInfo>;
|
|
12
15
|
icqEnabled?: boolean;
|
|
16
|
+
pfmEnabled?: boolean;
|
|
13
17
|
stakingTokens?: Readonly<Array<{
|
|
14
18
|
denom: string;
|
|
15
19
|
}>>;
|
|
16
20
|
}>>;
|
|
17
21
|
/** @returns {Vow<LocalOrchestrationAccountKit['holder']>} */
|
|
18
22
|
makeAccount(): Vow<LocalOrchestrationAccountKit["holder"]>;
|
|
19
|
-
/** @type {HostOf<Chain<{ chainId: 'agoriclocal' }>['query']>} */
|
|
20
23
|
query(args_0: {
|
|
21
24
|
'@type': string;
|
|
22
25
|
}[]): Vow<{
|
|
@@ -25,7 +28,6 @@ export function prepareLocalChainFacade(zone: Zone, powers: LocalChainFacadePowe
|
|
|
25
28
|
'@type': string;
|
|
26
29
|
};
|
|
27
30
|
}[]>;
|
|
28
|
-
/** @type {HostOf<AgoricChainMethods['getVBankAssetInfo']>} */
|
|
29
31
|
getVBankAssetInfo(): Vow<AssetInfo[]>;
|
|
30
32
|
}>;
|
|
31
33
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-chain-facade.d.ts","sourceRoot":"","sources":["local-chain-facade.js"],"names":[],"mappings":"AA4LO,8CAJI,IAAI,UACJ,sBAAsB
|
|
1
|
+
{"version":3,"file":"local-chain-facade.d.ts","sourceRoot":"","sources":["local-chain-facade.js"],"names":[],"mappings":"AA4LO,8CAJI,IAAI,UACJ,sBAAsB;;;;;;;;;;;;;;;;;;;;IApFzB,6DAA6D;mBAA/C,IAAI,4BAA4B,CAAC,QAAQ,CAAC,CAAC;;;;;;;;;;GA0FhE;;;;;;;;;;;uBAnKa,MAAM,OAAO,CAAC,SAAS,EAAE,CAAC;;qCAO3B;IACR,gCAAgC,EAAE,gCAAgC,CAAC;IACnE,aAAa,EAAE,OAAO,uBAAuB,CAAC,CAAC;IAC/C,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;IACjC,WAAW,EAAE,OAAO,OAAO,CAAC,CAAC;IAC7B,KAAK,EAAE,OAAO,YAAY,CAAC,CAAC;IAC5B,UAAU,EAAE,OAAO,UAAU,CAAC,CAAC;IAC/B,QAAQ,EAAE,QAAQ,CAAC;CACpB;mCAuJU,UAAU,CAAC,OAAO,uBAAuB,CAAC;+BAC1C,UAAU,CAAC,oBAAoB,CAAC;0BAvLvB,mBAAmB;uCASiE,aAAa;yBAHxF,aAAa;kDAEoC,kCAAkC;+BAJvF,8BAA8B;sDAIuB,kCAAkC;6CADzE,qBAAqB;4BALtC,kBAAkB;6BAGjB,cAAc;kCAJT,cAAc;gCAEgB,gCAAgC;8BAG7D,aAAa"}
|
|
@@ -58,22 +58,15 @@ export function prepareLocalOrchestrationAccountKit(zone: Zone, { makeRecorderKi
|
|
|
58
58
|
};
|
|
59
59
|
transferWatcher: {
|
|
60
60
|
/**
|
|
61
|
-
* @param {
|
|
62
|
-
* { transferChannel: IBCConnectionInfo['transferChannel'] },
|
|
63
|
-
* bigint,
|
|
64
|
-
* ]} results
|
|
61
|
+
* @param {bigint} timeoutTimestamp
|
|
65
62
|
* @param {{
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* amount: DenomAmount;
|
|
63
|
+
* opts?: Omit<IBCMsgTransferOptions, 'forwardOpts'>;
|
|
64
|
+
* route: TransferRoute;
|
|
69
65
|
* }} ctx
|
|
70
66
|
*/
|
|
71
|
-
onFulfilled(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
destination: ChainAddress;
|
|
75
|
-
opts?: IBCMsgTransferOptions;
|
|
76
|
-
amount: DenomAmount;
|
|
67
|
+
onFulfilled(timeoutTimestamp: bigint, { opts, route }: {
|
|
68
|
+
opts?: Omit<IBCMsgTransferOptions, "forwardOpts">;
|
|
69
|
+
route: TransferRoute;
|
|
77
70
|
}): import("@agoric/async-flow").HostInterface<Vow<any>>;
|
|
78
71
|
};
|
|
79
72
|
/**
|
|
@@ -81,9 +74,7 @@ export function prepareLocalOrchestrationAccountKit(zone: Zone, { makeRecorderKi
|
|
|
81
74
|
* first result
|
|
82
75
|
*/
|
|
83
76
|
extractFirstResultWatcher: {
|
|
84
|
-
/**
|
|
85
|
-
* @param {Record<unknown, unknown>[]} results
|
|
86
|
-
*/
|
|
77
|
+
/** @param {Record<unknown, unknown>[]} results */
|
|
87
78
|
onFulfilled(results: Record<unknown, unknown>[]): Record<unknown, unknown>;
|
|
88
79
|
};
|
|
89
80
|
returnVoidWatcher: {
|
|
@@ -143,17 +134,9 @@ export function prepareLocalOrchestrationAccountKit(zone: Zone, { makeRecorderKi
|
|
|
143
134
|
onFulfilled(result: JsonSafe<ResponseTo<TypedJson<"/cosmos.bank.v1beta1.QueryAllBalancesRequest">>>): DenomAmount[];
|
|
144
135
|
};
|
|
145
136
|
holder: {
|
|
146
|
-
/** @type {HostOf<OrchestrationAccountI['asContinuingOffer']>} */
|
|
147
137
|
asContinuingOffer(): Vow<import("@agoric/async-flow").HostInterface<import("../utils/zoe-tools.js").ResolvedContinuingOfferResult>>;
|
|
148
|
-
/**
|
|
149
|
-
* @type {HostOf<OrchestrationAccountI['getBalance']>}
|
|
150
|
-
*/
|
|
151
138
|
getBalance(denom: import("@agoric/orchestration").DenomArg): Vow<DenomAmount>;
|
|
152
|
-
/** @type {HostOf<OrchestrationAccountI['getBalances']>} */
|
|
153
139
|
getBalances(): Vow<DenomAmount[]>;
|
|
154
|
-
/**
|
|
155
|
-
* @type {HostOf<OrchestrationAccountI['getPublicTopics']>}
|
|
156
|
-
*/
|
|
157
140
|
getPublicTopics(): Vow<import("@agoric/async-flow").HostInterface<Record<string, import("@agoric/zoe/src/contractSupport/topics.js").ResolvedPublicTopic<unknown>>>>;
|
|
158
141
|
/**
|
|
159
142
|
* @param {string} validatorAddress
|
|
@@ -166,34 +149,15 @@ export function prepareLocalOrchestrationAccountKit(zone: Zone, { makeRecorderKi
|
|
|
166
149
|
* @returns {Vow<void | TimestampRecord>}
|
|
167
150
|
*/
|
|
168
151
|
undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): Vow<void | TimestampRecord>;
|
|
169
|
-
|
|
170
|
-
* Starting a transfer revokes the account holder. The associated
|
|
171
|
-
* updater will get a special notification that the account is being
|
|
172
|
-
* transferred.
|
|
173
|
-
*/
|
|
174
|
-
/** @type {HostOf<LocalAccountMethods['deposit']>} */
|
|
175
|
-
deposit(payment: globalThis.Payment<"nat">): Vow<void>;
|
|
176
|
-
/** @type {HostOf<LocalAccountMethods['withdraw']>} */
|
|
152
|
+
deposit(payment: globalThis.Payment<"nat">): Vow<import("@agoric/ertp").NatAmount>;
|
|
177
153
|
withdraw(amount: import("@agoric/ertp").NatAmount): Vow<globalThis.Payment<"nat">>;
|
|
178
|
-
/** @type {HostOf<LocalChainAccount['executeTx']>} */
|
|
179
154
|
executeTx(messages: {
|
|
180
155
|
'@type': string;
|
|
181
156
|
}[]): Vow<{
|
|
182
157
|
'@type': string;
|
|
183
158
|
}[]>;
|
|
184
|
-
/** @type {OrchestrationAccountI['getAddress']} */
|
|
185
159
|
getAddress(): ChainAddress;
|
|
186
|
-
/**
|
|
187
|
-
* XXX consider using ERTP to send if it's vbank asset
|
|
188
|
-
*
|
|
189
|
-
* @type {HostOf<OrchestrationAccountI['send']>}
|
|
190
|
-
*/
|
|
191
160
|
send(toAccount: ChainAddress, amounts: AmountArg): Vow<void>;
|
|
192
|
-
/**
|
|
193
|
-
* XXX consider using ERTP to send if it's vbank asset
|
|
194
|
-
*
|
|
195
|
-
* @type {HostOf<OrchestrationAccountI['sendAll']>}
|
|
196
|
-
*/
|
|
197
161
|
sendAll(toAccount: ChainAddress, amounts: AmountArg[]): Vow<void>;
|
|
198
162
|
/**
|
|
199
163
|
* @param {ChainAddress} destination
|
|
@@ -203,18 +167,17 @@ export function prepareLocalOrchestrationAccountKit(zone: Zone, { makeRecorderKi
|
|
|
203
167
|
* timeoutTimestamp are not supplied, a default timeoutTimestamp will
|
|
204
168
|
* be set for 5 minutes in the future
|
|
205
169
|
* @returns {Vow<any>}
|
|
170
|
+
* @throws {Error} if route is not determinable, asset is not
|
|
171
|
+
* recognized, or the transfer is rejected (insufficient funds,
|
|
172
|
+
* timeout)
|
|
206
173
|
*/
|
|
207
|
-
transfer(destination: ChainAddress, amount: AmountArg, opts?: IBCMsgTransferOptions
|
|
208
|
-
/** @type {HostOf<OrchestrationAccountI['transferSteps']>} */
|
|
174
|
+
transfer(destination: ChainAddress, amount: AmountArg, opts?: IBCMsgTransferOptions): Vow<any>;
|
|
209
175
|
transferSteps(amount: AmountArg, msg: import("@agoric/orchestration").TransferMsg): Vow<void>;
|
|
210
|
-
/** @type {HostOf<PacketTools['sendThenWaitForAck']>} */
|
|
211
176
|
sendThenWaitForAck(packetSender: Remote<import("./packet-tools.js").PacketSender>, opts?: import("./packet-tools.js").PacketOptions | undefined): import("@agoric/async-flow").HostInterface<Vow<any>>;
|
|
212
|
-
/** @type {HostOf<PacketTools['matchFirstPacket']>} */
|
|
213
177
|
matchFirstPacket(args_0?: import("@agoric/vow").EVow<globalThis.Pattern>): import("@agoric/async-flow").HostInterface<Vow<{
|
|
214
178
|
resolver: import("@agoric/vow").VowResolver<any>;
|
|
215
179
|
match: Vow<any>;
|
|
216
180
|
}>>;
|
|
217
|
-
/** @type {HostOf<LocalAccountMethods['monitorTransfers']>} */
|
|
218
181
|
monitorTransfers(tap: import("@agoric/vats/src/bridge-target.js").TargetApp): Vow<import("@agoric/async-flow").HostInterface<import("@agoric/vats/src/bridge-target.js").TargetRegistration>>;
|
|
219
182
|
};
|
|
220
183
|
}>;
|
|
@@ -249,7 +212,7 @@ import type { TimestampRecord } from '@agoric/time';
|
|
|
249
212
|
import type { IBCMsgTransferOptions } from '@agoric/orchestration';
|
|
250
213
|
import type { TypedJson } from '@agoric/cosmic-proto';
|
|
251
214
|
import type { JsonSafe } from '@agoric/cosmic-proto';
|
|
252
|
-
import type {
|
|
215
|
+
import type { TransferRoute } from '@agoric/orchestration';
|
|
253
216
|
import type { DenomAmount } from '@agoric/orchestration';
|
|
254
217
|
import type { ResponseTo } from '@agoric/cosmic-proto';
|
|
255
218
|
import type { RecorderKit } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-orchestration-account.d.ts","sourceRoot":"","sources":["local-orchestration-account.js"],"names":[],"mappings":"AAiGO,0DAVI,IAAI,qFAEZ;IAAgC,eAAe,EAAvC,eAAe;IACH,GAAG,EAAf,GAAG;IAC0B,YAAY,EAAzC,OAAO,YAAY,CAAC;IACH,QAAQ,EAAzB,QAAQ;IACS,QAAQ,EAAzB,QAAQ;IACmB,UAAU,EAArC,OAAO,UAAU,CAAC;IACD,QAAQ,EAAzB,QAAQ;CAClB;
|
|
1
|
+
{"version":3,"file":"local-orchestration-account.d.ts","sourceRoot":"","sources":["local-orchestration-account.js"],"names":[],"mappings":"AAiGO,0DAVI,IAAI,qFAEZ;IAAgC,eAAe,EAAvC,eAAe;IACH,GAAG,EAAf,GAAG;IAC0B,YAAY,EAAzC,OAAO,YAAY,CAAC;IACH,QAAQ,EAAzB,QAAQ;IACS,QAAQ,EAAzB,QAAQ;IACmB,UAAU,EAArC,OAAO,UAAU,CAAC;IACD,QAAQ,EAAzB,QAAQ;CAClB;aAqFc,iBAAiB;aACjB,YAAY;iBACZ,OAAO,WAAW,CAAC;;;QAc1B;;;WAGG;6BAFQ,SAAS,GACP,IAAI;;;QAOjB;;;WAGG;mCAFQ,MAAM,cACN,MAAM,CAAC,KAAK,CAAC;;QAiCxB;;;WAGG;qCAFQ,MAAM,cACN,MAAM,CAAC,KAAK,CAAC;;;uBAmBJ,YAAY;oBAAU,SAAS;;;uBAa/B,YAAY;qBAAW,SAAS,EAAE;;;oBAcrC,SAAS;yBACJ,YAAY;mBAClB,qBAAqB;;;;;QAmCrC;;;;;;WAMG;8BALQ,CACV,SACA,UAAgB,+CAA+C,CAAC,CAC3D,CACF;;;QAcJ;;;;;;WAMG;sCALQ,MAAM,mBACN;YACN,IAAI,CAAC,EAAE,IAAI,CAAC,qBAAqB,EAAE,aAAa,CAAC,CAAC;YAClD,KAAK,EAAE,aAAa,CAAC;SACtB;;IAsCN;;;OAGG;;QAED,kDAAkD;6BAAtC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE;;;;;IA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