@agoric/orchestration 0.1.1-dev-eef7b69.0.eef7b69 → 0.1.1-dev-6fe0466.0.6fe0466
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 +3 -3
- package/src/cosmos-api.d.ts.map +1 -1
- package/src/cosmos-api.ts +3 -4
- package/src/examples/stake-bld.contract.d.ts +209 -21
- package/src/examples/stake-bld.contract.d.ts.map +1 -1
- package/src/examples/stake-ica.contract.d.ts +410 -50
- package/src/examples/stake-ica.contract.d.ts.map +1 -1
- package/src/exos/cosmos-orchestration-account.d.ts +419 -56
- package/src/exos/cosmos-orchestration-account.d.ts.map +1 -1
- package/src/exos/cosmos-orchestration-account.js +22 -46
- package/src/exos/local-chain-facade.d.ts +41 -1
- package/src/exos/local-chain-facade.d.ts.map +1 -1
- package/src/exos/local-orchestration-account.d.ts +157 -30
- package/src/exos/local-orchestration-account.d.ts.map +1 -1
- package/src/exos/local-orchestration-account.js +17 -14
- package/src/exos/orchestrator.d.ts +37603 -73
- package/src/exos/orchestrator.d.ts.map +1 -1
- package/src/exos/portfolio-holder-kit.d.ts +94 -2
- package/src/exos/portfolio-holder-kit.d.ts.map +1 -1
- package/src/exos/remote-chain-facade.d.ts +1554 -1
- package/src/exos/remote-chain-facade.d.ts.map +1 -1
- package/src/utils/start-helper.d.ts +6 -2
- package/src/utils/start-helper.d.ts.map +1 -1
- package/src/utils/zoe-tools.d.ts.map +1 -1
- package/src/utils/zoe-tools.js +4 -2
- package/tools/contract-tests.d.ts +8 -3
- package/tools/contract-tests.d.ts.map +1 -1
- package/tools/contract-tests.ts +11 -2
|
@@ -307,20 +307,13 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
307
307
|
},
|
|
308
308
|
) => {
|
|
309
309
|
/**
|
|
310
|
-
*
|
|
311
|
-
*
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
* IcaAccount,
|
|
315
|
-
* {
|
|
316
|
-
* agoric: ChainInfo<'cosmos'>;
|
|
317
|
-
* la: LocalIbcAddress;
|
|
318
|
-
* counterparty: CaipChainId;
|
|
319
|
-
* ra: RemoteIbcAddress;
|
|
320
|
-
* }
|
|
321
|
-
* >}
|
|
310
|
+
* Abandon the icaAccountToDetails weakMapStore, since it introduced a caching
|
|
311
|
+
* layer that was never properly invalidated. So, we mark it as a tombstone
|
|
312
|
+
* (null) that's part of new contract instance baggage, while leaving older
|
|
313
|
+
* contracts with the undisturbed zone slot assignment.
|
|
322
314
|
*/
|
|
323
|
-
|
|
315
|
+
void zone.makeOnce('icaAccountToDetails', () => null);
|
|
316
|
+
|
|
324
317
|
const timestampHelper = makeTimestampHelper(timerService);
|
|
325
318
|
const makeCosmosOrchestrationAccountKit = zone.exoClassKit(
|
|
326
319
|
'Cosmos Orchestration Account Holder',
|
|
@@ -509,7 +502,7 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
509
502
|
/**
|
|
510
503
|
* TODO(#1994): Subsume with IcaAccount.executeEncodedTxWithMeta().
|
|
511
504
|
*
|
|
512
|
-
* @param {[
|
|
505
|
+
* @param {readonly [
|
|
513
506
|
* agoric: ChainInfo<'cosmos'>,
|
|
514
507
|
* la: LocalIbcAddress,
|
|
515
508
|
* counterparty: CaipChainId,
|
|
@@ -523,16 +516,6 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
523
516
|
{ result, meta: origMeta },
|
|
524
517
|
protocol,
|
|
525
518
|
) {
|
|
526
|
-
const { helper } = this.facets;
|
|
527
|
-
const acct = helper.owned();
|
|
528
|
-
if (!icaAccountToDetails.has(acct)) {
|
|
529
|
-
// Memoize the details for next time.
|
|
530
|
-
icaAccountToDetails.init(
|
|
531
|
-
acct,
|
|
532
|
-
harden({ agoric, la, counterparty, ra }),
|
|
533
|
-
);
|
|
534
|
-
}
|
|
535
|
-
|
|
536
519
|
const cp = counterparty.split(':', 2);
|
|
537
520
|
const lad = decodeIbcEndpoint(la);
|
|
538
521
|
const rad = decodeIbcEndpoint(ra);
|
|
@@ -757,9 +740,9 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
757
740
|
},
|
|
758
741
|
transferWithMetaWatcher: {
|
|
759
742
|
/**
|
|
760
|
-
* @param {[
|
|
743
|
+
* @param {readonly [
|
|
761
744
|
* { transferChannel: IBCConnectionInfo['transferChannel'] },
|
|
762
|
-
* bigint,
|
|
745
|
+
* bigint | undefined,
|
|
763
746
|
* ]} results
|
|
764
747
|
* @param {{
|
|
765
748
|
* destination: CosmosChainAddress;
|
|
@@ -1179,10 +1162,12 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
1179
1162
|
);
|
|
1180
1163
|
|
|
1181
1164
|
return watch(
|
|
1182
|
-
allVows(
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1165
|
+
allVows(
|
|
1166
|
+
/** @type {const} */ ([
|
|
1167
|
+
connectionInfoV,
|
|
1168
|
+
timestampHelper.vowOrValueFromOpts(opts),
|
|
1169
|
+
]),
|
|
1170
|
+
),
|
|
1186
1171
|
this.facets.transferWithMetaWatcher,
|
|
1187
1172
|
{ opts, token, destination: cosmosDest },
|
|
1188
1173
|
);
|
|
@@ -1238,7 +1223,6 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
1238
1223
|
},
|
|
1239
1224
|
/** @type {HostOf<StakingAccountQueries['getDelegation']>} */
|
|
1240
1225
|
getDelegation(validator) {
|
|
1241
|
-
// @ts-expect-error XXX string template with generics
|
|
1242
1226
|
return asVow(() => {
|
|
1243
1227
|
trace('getDelegation', validator);
|
|
1244
1228
|
const { chainAddress, icqConnection } = this.state;
|
|
@@ -1258,7 +1242,6 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
1258
1242
|
},
|
|
1259
1243
|
/** @type {HostOf<StakingAccountQueries['getDelegations']>} */
|
|
1260
1244
|
getDelegations() {
|
|
1261
|
-
// @ts-expect-error XXX string template with generics
|
|
1262
1245
|
return asVow(() => {
|
|
1263
1246
|
trace('getDelegations');
|
|
1264
1247
|
const { chainAddress, icqConnection } = this.state;
|
|
@@ -1354,7 +1337,6 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
1354
1337
|
},
|
|
1355
1338
|
/** @type {HostOf<StakingAccountQueries['getRewards']>} */
|
|
1356
1339
|
getRewards() {
|
|
1357
|
-
// @ts-expect-error XXX string template with generics
|
|
1358
1340
|
return asVow(() => {
|
|
1359
1341
|
trace('getRewards');
|
|
1360
1342
|
const { chainAddress, icqConnection } = this.state;
|
|
@@ -1408,21 +1390,15 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
1408
1390
|
const { helper } = this.facets;
|
|
1409
1391
|
const acct = helper.owned();
|
|
1410
1392
|
const result = watch(E(acct).executeEncodedTx(msgs, opts));
|
|
1411
|
-
const
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
const agoric = chainHub.getChainInfo('agoric');
|
|
1418
|
-
const la = E(acct).getLocalAddress();
|
|
1419
|
-
const counterparty = `cosmos:${chainAddress.chainId}`;
|
|
1420
|
-
const ra = E(acct).getRemoteAddress();
|
|
1393
|
+
const agoric = chainHub.getChainInfo('agoric');
|
|
1394
|
+
const la = E(acct).getLocalAddress();
|
|
1395
|
+
const counterparty = /** @type {const} */ (
|
|
1396
|
+
`cosmos:${chainAddress.chainId}`
|
|
1397
|
+
);
|
|
1398
|
+
const ra = E(acct).getRemoteAddress();
|
|
1421
1399
|
|
|
1422
|
-
all.push(agoric, la, counterparty, ra);
|
|
1423
|
-
}
|
|
1424
1400
|
return watch(
|
|
1425
|
-
allVows(
|
|
1401
|
+
allVows(/** @type {const} */ ([agoric, la, counterparty, ra])),
|
|
1426
1402
|
this.facets.attachTxMetaWatcher,
|
|
1427
1403
|
{ result, meta: {} },
|
|
1428
1404
|
'ibc',
|
|
@@ -10,7 +10,47 @@ export function prepareLocalChainFacade(zone: Zone, powers: LocalChainFacadePowe
|
|
|
10
10
|
'@type': string;
|
|
11
11
|
};
|
|
12
12
|
}[]>;
|
|
13
|
-
getVBankAssetInfo(): Vow<
|
|
13
|
+
getVBankAssetInfo(): Vow<{
|
|
14
|
+
brand: {
|
|
15
|
+
"Symbol(passStyle)": "remotable";
|
|
16
|
+
[Symbol.toStringTag]: string;
|
|
17
|
+
isMyIssuer: (allegedIssuer: globalThis.ERef<globalThis.Issuer<globalThis.AssetKind>>) => Promise<boolean>;
|
|
18
|
+
getAllegedName: () => string;
|
|
19
|
+
getDisplayInfo: () => globalThis.DisplayInfo<globalThis.AssetKind>;
|
|
20
|
+
getAmountShape: () => import("@endo/patterns").Pattern;
|
|
21
|
+
};
|
|
22
|
+
issuer: {
|
|
23
|
+
"Symbol(passStyle)": "remotable";
|
|
24
|
+
[Symbol.toStringTag]: string;
|
|
25
|
+
getBrand: (() => globalThis.Brand<globalThis.AssetKind>) & (() => globalThis.Brand<"nat">);
|
|
26
|
+
getAllegedName: () => string;
|
|
27
|
+
getAssetKind: (() => globalThis.AssetKind) & (() => "nat");
|
|
28
|
+
getDisplayInfo: (() => globalThis.DisplayInfo<globalThis.AssetKind>) & (() => globalThis.DisplayInfo<"nat">);
|
|
29
|
+
makeEmptyPurse: (() => globalThis.Purse<globalThis.AssetKind, import("@endo/patterns").Key>) & (() => globalThis.Purse<"nat", import("@endo/patterns").Key>);
|
|
30
|
+
isLive: import("@agoric/ertp").IssuerIsLive;
|
|
31
|
+
getAmountOf: import("@agoric/ertp").IssuerGetAmountOf<globalThis.AssetKind, import("@endo/patterns").Key> & import("@agoric/ertp").IssuerGetAmountOf<"nat", import("@endo/patterns").Key>;
|
|
32
|
+
burn: import("@agoric/ertp").IssuerBurn;
|
|
33
|
+
} | {
|
|
34
|
+
"Symbol(passStyle)": "remotable";
|
|
35
|
+
[Symbol.toStringTag]: string;
|
|
36
|
+
then: <TResult1 = globalThis.Issuer, TResult2 = never>(onfulfilled?: ((value: globalThis.Issuer) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined) => PromiseLike<TResult1 | TResult2>;
|
|
37
|
+
getBrand: () => globalThis.Brand<"nat">;
|
|
38
|
+
getAllegedName: () => string;
|
|
39
|
+
getAssetKind: () => "nat";
|
|
40
|
+
getDisplayInfo: () => globalThis.DisplayInfo<"nat">;
|
|
41
|
+
makeEmptyPurse: () => globalThis.Purse<"nat", import("@endo/patterns").Key>;
|
|
42
|
+
isLive: import("@agoric/ertp").IssuerIsLive;
|
|
43
|
+
getAmountOf: import("@agoric/ertp").IssuerGetAmountOf<"nat", import("@endo/patterns").Key>;
|
|
44
|
+
burn: import("@agoric/ertp").IssuerBurn;
|
|
45
|
+
};
|
|
46
|
+
issuerName: string;
|
|
47
|
+
denom: string;
|
|
48
|
+
proposedName: string;
|
|
49
|
+
displayInfo: {
|
|
50
|
+
decimalPlaces?: number | undefined | undefined;
|
|
51
|
+
assetKind: globalThis.AssetKind;
|
|
52
|
+
};
|
|
53
|
+
}[]>;
|
|
14
54
|
}>;
|
|
15
55
|
/**
|
|
16
56
|
* Chain facade methods unique to the Agoric (local) chain.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-chain-facade.d.ts","sourceRoot":"","sources":["local-chain-facade.js"],"names":[],"mappings":"AA8LO,8CAJI,IAAI,UACJ,sBAAsB;;IAtFzB,6DAA6D;mBAA/C,IAAI,4BAA4B,CAAC,QAAQ,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"local-chain-facade.d.ts","sourceRoot":"","sources":["local-chain-facade.js"],"names":[],"mappings":"AA8LO,8CAJI,IAAI,UACJ,sBAAsB;;IAtFzB,6DAA6D;mBAA/C,IAAI,4BAA4B,CAAC,QAAQ,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4FhE;;;;;;;;;;;uBArKa,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,GAAG,SAAS,CAAC;IAC7C,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;mCAyJU,UAAU,CAAC,OAAO,uBAAuB,CAAC;+BAC1C,UAAU,CAAC,oBAAoB,CAAC;0BAzLvB,mBAAmB;qCASuE,aAAa;yBAH9F,aAAa;kDAEoC,kCAAkC;+BAJvF,8BAA8B;sDAIuB,kCAAkC;6CADzE,qBAAqB;4BALtC,kBAAkB;6BAGjB,cAAc;kCAJT,cAAc;gCAEgB,gCAAgC;8BAG7D,aAAa"}
|
|
@@ -61,13 +61,19 @@ export function prepareLocalOrchestrationAccountKit(zone: Zone, { makeRecorderKi
|
|
|
61
61
|
};
|
|
62
62
|
transferConnectionWatcher: {
|
|
63
63
|
/**
|
|
64
|
-
* @param {[CosmosChainInfo, CosmosChainInfo, bigint]} all
|
|
64
|
+
* @param {readonly [CosmosChainInfo, CosmosChainInfo, bigint]} all
|
|
65
65
|
* @param {Record<string, any>} ctx
|
|
66
66
|
*/
|
|
67
|
-
onFulfilled([srcChainInfo, nextChainInfo, timeout]: [CosmosChainInfo, CosmosChainInfo, bigint], ctx: Record<string, any>): Vow<
|
|
68
|
-
result:
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
onFulfilled([srcChainInfo, nextChainInfo, timeout]: readonly [CosmosChainInfo, CosmosChainInfo, bigint], ctx: Record<string, any>): Vow<{
|
|
68
|
+
result: {
|
|
69
|
+
"Symbol(passStyle)": "tagged";
|
|
70
|
+
[Symbol.toStringTag]: "Vow";
|
|
71
|
+
payload: import("@agoric/vow").VowPayload<any>;
|
|
72
|
+
};
|
|
73
|
+
meta: {
|
|
74
|
+
[x: string]: {};
|
|
75
|
+
};
|
|
76
|
+
}>;
|
|
71
77
|
};
|
|
72
78
|
/** @deprecated migrate to transferWithMetaWatcher */
|
|
73
79
|
transferWatcher: {
|
|
@@ -75,7 +81,7 @@ export function prepareLocalOrchestrationAccountKit(zone: Zone, { makeRecorderKi
|
|
|
75
81
|
};
|
|
76
82
|
transferWithMetaWatcher: {
|
|
77
83
|
/**
|
|
78
|
-
* @param {[
|
|
84
|
+
* @param {readonly [
|
|
79
85
|
* ChainInfo,
|
|
80
86
|
* ChainInfo,
|
|
81
87
|
* Pick<IBCConnectionInfo, 'transferChannel'>,
|
|
@@ -86,13 +92,19 @@ export function prepareLocalOrchestrationAccountKit(zone: Zone, { makeRecorderKi
|
|
|
86
92
|
* route: TransferRoute;
|
|
87
93
|
* }} ctx
|
|
88
94
|
*/
|
|
89
|
-
onFulfilled([srcChainInfo, dstChainInfo, { transferChannel }, timeoutTimestamp]: [ChainInfo, ChainInfo, Pick<IBCConnectionInfo, "transferChannel">, bigint], { opts, route }: {
|
|
95
|
+
onFulfilled([srcChainInfo, dstChainInfo, { transferChannel }, timeoutTimestamp]: readonly [ChainInfo, ChainInfo, Pick<IBCConnectionInfo, "transferChannel">, bigint], { opts, route }: {
|
|
90
96
|
opts?: Omit<IBCMsgTransferOptions, "forwardOpts">;
|
|
91
97
|
route: TransferRoute;
|
|
92
|
-
}):
|
|
93
|
-
result:
|
|
94
|
-
|
|
95
|
-
|
|
98
|
+
}): Vow<{
|
|
99
|
+
result: {
|
|
100
|
+
"Symbol(passStyle)": "tagged";
|
|
101
|
+
[Symbol.toStringTag]: "Vow";
|
|
102
|
+
payload: import("@agoric/vow").VowPayload<any>;
|
|
103
|
+
};
|
|
104
|
+
meta: {
|
|
105
|
+
[x: string]: {};
|
|
106
|
+
};
|
|
107
|
+
}>;
|
|
96
108
|
};
|
|
97
109
|
/**
|
|
98
110
|
* takes an array of results (from `executeEncodedTx`) and returns the
|
|
@@ -189,10 +201,79 @@ export function prepareLocalOrchestrationAccountKit(zone: Zone, { makeRecorderKi
|
|
|
189
201
|
};
|
|
190
202
|
};
|
|
191
203
|
holder: {
|
|
192
|
-
asContinuingOffer(): Vow<
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
204
|
+
asContinuingOffer(): Vow<{
|
|
205
|
+
invitationMakers: {
|
|
206
|
+
[x: string]: (...args: any[]) => Vow<import("@endo/pass-style").RemotableObject & {
|
|
207
|
+
getAllegedBrand: () => globalThis.Brand<"set">;
|
|
208
|
+
} & {
|
|
209
|
+
readonly "Symbol(tag)": {
|
|
210
|
+
"Set-like value type": import("@agoric/zoe").InvitationDetails;
|
|
211
|
+
};
|
|
212
|
+
}>;
|
|
213
|
+
};
|
|
214
|
+
publicSubscribers: {
|
|
215
|
+
[x: string]: {
|
|
216
|
+
description?: string | undefined;
|
|
217
|
+
subscriber: {
|
|
218
|
+
getUpdateSince: (updateCount?: number | bigint | undefined) => Vow<{
|
|
219
|
+
value: any;
|
|
220
|
+
updateCount?: bigint | undefined | undefined;
|
|
221
|
+
}>;
|
|
222
|
+
subscribeAfter: (publishCount?: bigint | undefined) => Vow<{
|
|
223
|
+
head: {
|
|
224
|
+
done: true;
|
|
225
|
+
value: any;
|
|
226
|
+
} | {
|
|
227
|
+
done?: false | undefined;
|
|
228
|
+
value: any;
|
|
229
|
+
};
|
|
230
|
+
publishCount: bigint;
|
|
231
|
+
tail: {
|
|
232
|
+
"Symbol(passStyle)": "tagged";
|
|
233
|
+
[Symbol.toStringTag]: "Vow";
|
|
234
|
+
payload: import("@agoric/vow").VowPayload</*elided*/ any>;
|
|
235
|
+
};
|
|
236
|
+
}>;
|
|
237
|
+
} | {};
|
|
238
|
+
storagePath: string;
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
}>;
|
|
242
|
+
getBalance(denom: import("@agoric/orchestration").DenomArg): Vow<{
|
|
243
|
+
denom: Denom;
|
|
244
|
+
value: bigint;
|
|
245
|
+
}>;
|
|
246
|
+
getBalances(): Vow<{
|
|
247
|
+
denom: Denom;
|
|
248
|
+
value: bigint;
|
|
249
|
+
}[]>;
|
|
250
|
+
getPublicTopics(): Vow<{
|
|
251
|
+
[x: string]: {
|
|
252
|
+
description?: string | undefined;
|
|
253
|
+
subscriber: {
|
|
254
|
+
getUpdateSince: (updateCount?: number | bigint | undefined) => Vow<{
|
|
255
|
+
value: {};
|
|
256
|
+
updateCount?: bigint | undefined | undefined;
|
|
257
|
+
}>;
|
|
258
|
+
subscribeAfter: (publishCount?: bigint | undefined) => Vow<{
|
|
259
|
+
head: {
|
|
260
|
+
done: true;
|
|
261
|
+
value: any;
|
|
262
|
+
} | {
|
|
263
|
+
done?: false | undefined;
|
|
264
|
+
value: {};
|
|
265
|
+
};
|
|
266
|
+
publishCount: bigint;
|
|
267
|
+
tail: {
|
|
268
|
+
"Symbol(passStyle)": "tagged";
|
|
269
|
+
[Symbol.toStringTag]: "Vow";
|
|
270
|
+
payload: import("@agoric/vow").VowPayload</*elided*/ any>;
|
|
271
|
+
};
|
|
272
|
+
}>;
|
|
273
|
+
} | {};
|
|
274
|
+
storagePath: string;
|
|
275
|
+
};
|
|
276
|
+
}>;
|
|
196
277
|
/**
|
|
197
278
|
* @param {string} validatorAddress
|
|
198
279
|
* @param {Amount<'nat'>} ertpAmount
|
|
@@ -204,7 +285,17 @@ export function prepareLocalOrchestrationAccountKit(zone: Zone, { makeRecorderKi
|
|
|
204
285
|
* @returns {Vow<void | TimestampRecord>}
|
|
205
286
|
*/
|
|
206
287
|
undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): Vow<void | TimestampRecord>;
|
|
207
|
-
deposit(payment: globalThis.Payment<"nat">): Vow<
|
|
288
|
+
deposit(payment: globalThis.Payment<"nat">): Vow<{
|
|
289
|
+
brand: {
|
|
290
|
+
"Symbol(passStyle)": "remotable";
|
|
291
|
+
[Symbol.toStringTag]: string;
|
|
292
|
+
isMyIssuer: (allegedIssuer: globalThis.ERef<globalThis.Issuer<"nat">>) => Promise<boolean>;
|
|
293
|
+
getAllegedName: () => string;
|
|
294
|
+
getDisplayInfo: () => globalThis.DisplayInfo<"nat">;
|
|
295
|
+
getAmountShape: () => import("@endo/patterns").Pattern;
|
|
296
|
+
};
|
|
297
|
+
value: bigint;
|
|
298
|
+
}>;
|
|
208
299
|
withdraw(amount: import("@agoric/ertp").NatAmount): Vow<globalThis.Payment<"nat">>;
|
|
209
300
|
executeTx(messages: {
|
|
210
301
|
'@type': string;
|
|
@@ -215,27 +306,62 @@ export function prepareLocalOrchestrationAccountKit(zone: Zone, { makeRecorderKi
|
|
|
215
306
|
send(toAccount: AccountIdArg, amount: AmountArg): Vow<void>;
|
|
216
307
|
sendAll(toAccount: CosmosChainAddress, amounts: AmountArg[]): Vow<void>;
|
|
217
308
|
transferWithMeta(destination: AccountIdArg, amount: AmountArg, opts?: IBCMsgTransferOptions | undefined): Vow<{
|
|
218
|
-
result:
|
|
219
|
-
|
|
309
|
+
result: {
|
|
310
|
+
"Symbol(passStyle)": "tagged";
|
|
311
|
+
[Symbol.toStringTag]: "Vow";
|
|
312
|
+
payload: import("@agoric/vow").VowPayload<any>;
|
|
313
|
+
};
|
|
314
|
+
meta: {
|
|
315
|
+
[x: string]: any;
|
|
316
|
+
};
|
|
220
317
|
}>;
|
|
221
318
|
transfer(destination: AccountIdArg, amount: AmountArg, opts?: IBCMsgTransferOptions | undefined): Vow<any>;
|
|
222
319
|
parseInboundTransfer(packet: Record<string, any>): Vow<{
|
|
223
|
-
amount:
|
|
320
|
+
amount: {
|
|
321
|
+
denom: Denom;
|
|
322
|
+
value: bigint;
|
|
323
|
+
};
|
|
224
324
|
fromAccount: string;
|
|
225
325
|
toAccount: string;
|
|
226
|
-
extra:
|
|
326
|
+
extra: {
|
|
327
|
+
[x: string]: any;
|
|
328
|
+
};
|
|
227
329
|
}>;
|
|
228
330
|
transferSteps(amount: AmountArg, msg: import("@agoric/orchestration").TransferMsg): Vow<void>;
|
|
229
|
-
sendThenWaitForAck(packetSender?: any, opts?: {} | undefined):
|
|
230
|
-
sendThenWaitForAckWithMeta(packetSender: Remote<import("./packet-tools.js").PacketSender>, opts?: import("./packet-tools.js").PacketOptions | undefined):
|
|
231
|
-
result:
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
331
|
+
sendThenWaitForAck(packetSender?: any, opts?: {} | undefined): Vow<any>;
|
|
332
|
+
sendThenWaitForAckWithMeta(packetSender: Remote<import("./packet-tools.js").PacketSender>, opts?: import("./packet-tools.js").PacketOptions | undefined): Vow<{
|
|
333
|
+
result: {
|
|
334
|
+
"Symbol(passStyle)": "tagged";
|
|
335
|
+
[Symbol.toStringTag]: "Vow";
|
|
336
|
+
payload: import("@agoric/vow").VowPayload<any>;
|
|
337
|
+
};
|
|
338
|
+
meta: {
|
|
339
|
+
[x: string]: {};
|
|
340
|
+
};
|
|
341
|
+
}>;
|
|
342
|
+
matchFirstPacket(args_0?: import("@agoric/vow").EVow<import("@endo/patterns").Pattern>): Vow<{
|
|
343
|
+
resolver: {
|
|
344
|
+
resolve: (value?: any) => void;
|
|
345
|
+
reject: (reason?: any) => void;
|
|
346
|
+
};
|
|
347
|
+
match: {
|
|
348
|
+
"Symbol(passStyle)": "tagged";
|
|
349
|
+
[Symbol.toStringTag]: "Vow";
|
|
350
|
+
payload: import("@agoric/vow").VowPayload<any>;
|
|
351
|
+
};
|
|
352
|
+
}>;
|
|
353
|
+
monitorTransfers(tap: import("@agoric/vats/src/bridge-target.js").TargetApp): Vow<{
|
|
354
|
+
/**
|
|
355
|
+
* performs unregistration (and sends the
|
|
356
|
+
* corresponding "BRIDGE_TARGET_UNREGISTER" message to the targetHost).
|
|
357
|
+
*/
|
|
358
|
+
revoke: () => Vow<void>;
|
|
359
|
+
/**
|
|
360
|
+
* replaces the app associated with the target (but with no corresponding
|
|
361
|
+
* message).
|
|
362
|
+
*/
|
|
363
|
+
updateTargetApp: (targetApp: globalThis.ERef<import("@agoric/vats/src/bridge-target.js").TargetApp>) => Vow<void>;
|
|
364
|
+
}>;
|
|
239
365
|
};
|
|
240
366
|
}>;
|
|
241
367
|
export type LocalChainAccountNotification = {
|
|
@@ -279,6 +405,7 @@ import type { DenomAmount } from '@agoric/orchestration';
|
|
|
279
405
|
import type { ZCFSeat } from '@agoric/zoe';
|
|
280
406
|
import type { ResponseTo } from '@agoric/cosmic-proto';
|
|
281
407
|
import type { LocalAccountMethods } from '@agoric/orchestration';
|
|
408
|
+
import type { Denom } from '@agoric/orchestration';
|
|
282
409
|
import type { RecorderKit } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
283
410
|
import type { PacketTools } from './packet-tools.js';
|
|
284
411
|
//# sourceMappingURL=local-orchestration-account.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-orchestration-account.d.ts","sourceRoot":"","sources":["local-orchestration-account.js"],"names":[],"mappings":"AAqKO,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;aA0Gc,iBAAiB;aACjB,kBAAkB;;;;QAoBzB;;;WAGG;6BAFQ,SAAS,GACP,IAAI;;;;;;QAQjB;;;WAGG;mCAFQ,MAAM,cACN,MAAM,CAAC,KAAK,CAAC;;QAiCxB;;;WAGG;qCAFQ,MAAM,cACN,MAAM,CAAC,KAAK,CAAC;;;uBAmBJ,YAAY;oBAAU,SAAS;;;uBAa/B,kBAAkB;qBAAW,SAAS,EAAE;;;oBAc3C,SAAS;yBACJ,YAAY;mBAClB,qBAAqB;;;;;QAmCrC;;;;;;WAMG;8BALQ,CACV,SACA,UAAgB,+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E,WAAW,CAAC;IACzB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,kBAAkB,CAAC;CAC7B;+CA66BU,UAAU,CAAC,OAAO,mCAAmC,CAAC;2CACtD,UAAU,CAAC,gCAAgC,CAAC;0BA79BnC,cAAc;qCADU,6CAA6C;yBAJ/C,aAAa;kCAQV,cAAc;4BAFrC,kBAAkB;8BAGX,aAAa;8BAIlB,gBAAgB;gCAjBK,gCAAgC;8BAmBrD,uBAAuB;uCAnBF,gCAAgC;wCAGa,uBAAuB;+BAAvB,uBAAuB;0BAY7F,kDAAkD;yBAFzC,aAAa;qCADG,cAAc;kCAT+B,uBAAuB;2CAAvB,uBAAuB;+BAWlE,sBAAsB;8BAAtB,sBAAsB;qCAXqB,uBAAuB;+BAAvB,uBAAuB;uCAAvB,uBAAuB;mCAAvB,uBAAuB;iCAAvB,uBAAuB;6BACvE,aAAa;gCAUR,sBAAsB;yCAXqB,uBAAuB;2BAAvB,uBAAuB;iCAKrE,6CAA6C;iCAU9D,mBAAmB"}
|
|
@@ -439,17 +439,19 @@ export const prepareLocalOrchestrationAccountKit = (
|
|
|
439
439
|
},
|
|
440
440
|
transferConnectionWatcher: {
|
|
441
441
|
/**
|
|
442
|
-
* @param {[CosmosChainInfo, CosmosChainInfo, bigint]} all
|
|
442
|
+
* @param {readonly [CosmosChainInfo, CosmosChainInfo, bigint]} all
|
|
443
443
|
* @param {Record<string, any>} ctx
|
|
444
444
|
*/
|
|
445
445
|
onFulfilled([srcChainInfo, nextChainInfo, timeout], ctx) {
|
|
446
446
|
return watch(
|
|
447
|
-
vowTools.allVows(
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
447
|
+
vowTools.allVows(
|
|
448
|
+
/** @type {const} */ ([
|
|
449
|
+
srcChainInfo,
|
|
450
|
+
nextChainInfo,
|
|
451
|
+
chainHub.getConnectionInfo(srcChainInfo, nextChainInfo),
|
|
452
|
+
timeout,
|
|
453
|
+
]),
|
|
454
|
+
),
|
|
453
455
|
this.facets.transferWithMetaWatcher,
|
|
454
456
|
ctx,
|
|
455
457
|
);
|
|
@@ -463,7 +465,7 @@ export const prepareLocalOrchestrationAccountKit = (
|
|
|
463
465
|
},
|
|
464
466
|
transferWithMetaWatcher: {
|
|
465
467
|
/**
|
|
466
|
-
* @param {[
|
|
468
|
+
* @param {readonly [
|
|
467
469
|
* ChainInfo,
|
|
468
470
|
* ChainInfo,
|
|
469
471
|
* Pick<IBCConnectionInfo, 'transferChannel'>,
|
|
@@ -887,7 +889,6 @@ export const prepareLocalOrchestrationAccountKit = (
|
|
|
887
889
|
},
|
|
888
890
|
/** @type {HostOf<OrchestrationAccountCommon['transferWithMeta']>} */
|
|
889
891
|
transferWithMeta(destination, amount, opts) {
|
|
890
|
-
// @ts-expect-error Vow combined with HostInterface doesn't type.
|
|
891
892
|
return asVow(() => {
|
|
892
893
|
trace('Transferring funds over IBC');
|
|
893
894
|
|
|
@@ -925,11 +926,13 @@ export const prepareLocalOrchestrationAccountKit = (
|
|
|
925
926
|
// don't resolve the vow until the transfer is confirmed on remote
|
|
926
927
|
// and reject vow if the transfer fails for any reason
|
|
927
928
|
const resultV = watch(
|
|
928
|
-
vowTools.allVows(
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
929
|
+
vowTools.allVows(
|
|
930
|
+
/** @type {const} */ ([
|
|
931
|
+
srcChainInfo,
|
|
932
|
+
nextChainInfo,
|
|
933
|
+
timestampHelper.vowOrValueFromOpts(opts),
|
|
934
|
+
]),
|
|
935
|
+
),
|
|
933
936
|
this.facets.transferConnectionWatcher,
|
|
934
937
|
{
|
|
935
938
|
opts: rest,
|