@agoric/orchestration 0.1.1-dev-71db129.0 → 0.1.1-dev-4687f0d.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 +19 -16
- package/src/chain-info.d.ts +1776 -150
- package/src/chain-info.d.ts.map +1 -1
- package/src/chain-info.js +50 -99
- package/src/cosmos-api.d.ts +9 -18
- package/src/cosmos-api.d.ts.map +1 -1
- package/src/cosmos-api.ts +20 -20
- package/src/examples/{stakeAtom.contract.d.ts → stakeIca.contract.d.ts} +3 -3
- package/src/examples/stakeIca.contract.d.ts.map +1 -0
- package/src/examples/{stakeAtom.contract.js → stakeIca.contract.js} +2 -3
- package/src/exos/local-chain-account-kit.d.ts +1781 -3
- package/src/exos/local-chain-account-kit.d.ts.map +1 -1
- package/src/exos/local-chain-account-kit.js +0 -1
- package/src/facade.d.ts.map +1 -1
- package/src/facade.js +15 -18
- package/src/fetched-chain-info.d.ts +3073 -0
- package/src/fetched-chain-info.d.ts.map +1 -0
- package/src/fetched-chain-info.js +1752 -0
- package/src/orchestration-api.d.ts +1 -3
- package/src/orchestration-api.d.ts.map +1 -1
- package/src/orchestration-api.ts +1 -3
- package/src/proposals/orchestration-proposal.d.ts +39 -37
- package/src/proposals/orchestration-proposal.d.ts.map +1 -1
- package/src/proposals/orchestration-proposal.js +74 -1
- package/src/proposals/start-stakeAtom.d.ts +5 -7
- package/src/proposals/start-stakeAtom.d.ts.map +1 -1
- package/src/proposals/start-stakeAtom.js +39 -33
- package/src/proposals/start-stakeBld.d.ts +1 -2
- package/src/proposals/start-stakeBld.d.ts.map +1 -1
- package/src/proposals/start-stakeBld.js +1 -7
- package/src/service.d.ts +7 -6
- package/src/service.d.ts.map +1 -1
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +2 -9
- package/src/utils/chainHub.d.ts +1792 -4
- package/src/utils/chainHub.d.ts.map +1 -1
- package/src/utils/chainHub.js +21 -8
- package/src/vat-orchestration.d.ts +4 -4
- package/src/examples/stakeAtom.contract.d.ts.map +0 -1
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
import type { Amount, Brand, NatAmount, Payment } from '@agoric/ertp/src/types.js';
|
|
7
7
|
import type { LocalChainAccount } from '@agoric/vats/src/localchain.js';
|
|
8
8
|
import type { Timestamp } from '@agoric/time';
|
|
9
|
-
import type { ChainInfo, CosmosChainAccountMethods, CosmosChainInfo, IBCMsgTransferOptions,
|
|
10
|
-
type KnownChains = typeof wellKnownChainInfo;
|
|
9
|
+
import type { ChainInfo, CosmosChainAccountMethods, CosmosChainInfo, IBCMsgTransferOptions, KnownChains } from './types.js';
|
|
11
10
|
/**
|
|
12
11
|
* A denom that designates a path to a token type on some blockchain.
|
|
13
12
|
*
|
|
@@ -156,5 +155,4 @@ export type SwapMaxSlippage = {
|
|
|
156
155
|
brandOut: Brand;
|
|
157
156
|
slippage: number;
|
|
158
157
|
};
|
|
159
|
-
export {};
|
|
160
158
|
//# sourceMappingURL=orchestration-api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestration-api.d.ts","sourceRoot":"","sources":["orchestration-api.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,OAAO,KAAK,EACV,MAAM,EACN,KAAK,EACL,SAAS,EACT,OAAO,EACR,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EACV,SAAS,EACT,yBAAyB,EACzB,eAAe,EACf,qBAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"orchestration-api.d.ts","sourceRoot":"","sources":["orchestration-api.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,OAAO,KAAK,EACV,MAAM,EACN,KAAK,EACL,SAAS,EACT,OAAO,EACR,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,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E;;;OAGG;IACH,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACrD;AAED;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,SAAS,EAAE,YAAY,CAAC;IACxB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,YAAY,CAAA;CAAE,CAAC;AAC3E,MAAM,MAAM,SAAS,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAChE,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
package/src/orchestration-api.ts
CHANGED
|
@@ -17,11 +17,9 @@ import type {
|
|
|
17
17
|
CosmosChainAccountMethods,
|
|
18
18
|
CosmosChainInfo,
|
|
19
19
|
IBCMsgTransferOptions,
|
|
20
|
-
|
|
20
|
+
KnownChains,
|
|
21
21
|
} from './types.js';
|
|
22
22
|
|
|
23
|
-
type KnownChains = typeof wellKnownChainInfo;
|
|
24
|
-
|
|
25
23
|
/**
|
|
26
24
|
* A denom that designates a path to a token type on some blockchain.
|
|
27
25
|
*
|
|
@@ -94,7 +94,7 @@ export function setupOrchestrationVat({ consume: { loadCriticalVat, portAllocato
|
|
|
94
94
|
bootMsg?: {
|
|
95
95
|
type: string;
|
|
96
96
|
chainID: string;
|
|
97
|
-
storagePort: number;
|
|
97
|
+
storagePort: number; /** @type {OrchestrationVats} */
|
|
98
98
|
supplyCoins: {
|
|
99
99
|
denom: string;
|
|
100
100
|
amount: string;
|
|
@@ -206,18 +206,9 @@ export function setupOrchestrationVat({ consume: { loadCriticalVat, portAllocato
|
|
|
206
206
|
agoricNames: Promise<{
|
|
207
207
|
getNameHub: () => import("@agoric/vats").NameHub<any>;
|
|
208
208
|
getNameHubKit: () => import("@agoric/vats").NameHubKit;
|
|
209
|
-
publishNameHubs: (nameStorage: ERef<
|
|
210
|
-
/**
|
|
211
|
-
* @param {BootstrapPowers & {
|
|
212
|
-
* consume: {
|
|
213
|
-
* orchestration: OrchestrationService;
|
|
214
|
-
* };
|
|
215
|
-
* }} powers
|
|
216
|
-
* @param {object} _options
|
|
217
|
-
*/
|
|
218
|
-
StorageNode>, vatBoard: ERef<BoardVat>, kinds: string[]) => Promise<void>;
|
|
209
|
+
publishNameHubs: (nameStorage: ERef<StorageNode>, vatBoard: ERef<BoardVat>, kinds: string[]) => Promise<void>;
|
|
219
210
|
provideInertBrand: (keyword: string, displayInfo: DisplayInfo) => any;
|
|
220
|
-
} & import("@endo/
|
|
211
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
221
212
|
getNameHub: () => import("@agoric/vats").NameHub<any>;
|
|
222
213
|
getNameHubKit: () => import("@agoric/vats").NameHubKit;
|
|
223
214
|
publishNameHubs: (nameStorage: ERef<StorageNode>, vatBoard: ERef<BoardVat>, kinds: string[]) => Promise<void>;
|
|
@@ -225,10 +216,10 @@ export function setupOrchestrationVat({ consume: { loadCriticalVat, portAllocato
|
|
|
225
216
|
}>>;
|
|
226
217
|
board: Promise<{
|
|
227
218
|
getBoard: () => import("@endo/exo").Guarded<{
|
|
228
|
-
getId(value: import("@endo/
|
|
229
|
-
getValue(id: BoardId): import("@endo/
|
|
219
|
+
getId(value: import("@endo/marshal").RemotableObject): string;
|
|
220
|
+
getValue(id: BoardId): import("@endo/marshal").RemotableObject;
|
|
230
221
|
lookup(...path: string[]): Promise<any>;
|
|
231
|
-
has(val: import("@endo/
|
|
222
|
+
has(val: import("@endo/marshal").RemotableObject): boolean;
|
|
232
223
|
ids(): string[];
|
|
233
224
|
getPublishingMarshaller(): import("@endo/exo").Guarded<{
|
|
234
225
|
toCapData(val: any): import("@endo/marshal").CapData<string>;
|
|
@@ -245,12 +236,12 @@ export function setupOrchestrationVat({ consume: { loadCriticalVat, portAllocato
|
|
|
245
236
|
}>;
|
|
246
237
|
makePublishingRecorderKit: <T>(storageNode: StorageNode | Awaited<import("@endo/far").FarRef<StorageNode>>, valueShape?: import("@agoric/zoe/src/contractSupport/recorder.js").TypedMatcher<T> | undefined) => import("@agoric/zoe/src/contractSupport/recorder.js").RecorderKit<T>;
|
|
247
238
|
makeReadOnlyRecorderKit: <T>(storageNode: StorageNode | Awaited<import("@endo/far").FarRef<StorageNode>>, valueShape?: import("@agoric/zoe/src/contractSupport/recorder.js").TypedMatcher<T> | undefined) => import("@agoric/zoe/src/contractSupport/recorder.js").RecorderKit<T>;
|
|
248
|
-
} & import("@endo/
|
|
239
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
249
240
|
getBoard: () => import("@endo/exo").Guarded<{
|
|
250
|
-
getId(value: import("@endo/
|
|
251
|
-
getValue(id: BoardId): import("@endo/
|
|
241
|
+
getId(value: import("@endo/marshal").RemotableObject): string;
|
|
242
|
+
getValue(id: BoardId): import("@endo/marshal").RemotableObject;
|
|
252
243
|
lookup(...path: string[]): Promise<any>;
|
|
253
|
-
has(val: import("@endo/
|
|
244
|
+
has(val: import("@endo/marshal").RemotableObject): boolean;
|
|
254
245
|
ids(): string[];
|
|
255
246
|
getPublishingMarshaller(): import("@endo/exo").Guarded<{
|
|
256
247
|
toCapData(val: any): import("@endo/marshal").CapData<string>;
|
|
@@ -278,10 +269,10 @@ export function setupOrchestrationVat({ consume: { loadCriticalVat, portAllocato
|
|
|
278
269
|
consume: {
|
|
279
270
|
loadCriticalVat: VatLoader<any>;
|
|
280
271
|
portAllocator: import("@endo/exo").Guarded<{
|
|
281
|
-
allocateCustomIBCPort(specifiedName?: string): import("@agoric/vow").Vow<
|
|
282
|
-
allocateICAControllerPort(): import("@agoric/vow").Vow<
|
|
283
|
-
allocateICQControllerPort(): import("@agoric/vow").Vow<
|
|
284
|
-
allocateCustomLocalPort(specifiedName?: string): import("@agoric/vow").Vow<
|
|
272
|
+
allocateCustomIBCPort(specifiedName?: string): import("@agoric/vow").Vow<import("@agoric/network").Port>;
|
|
273
|
+
allocateICAControllerPort(): import("@agoric/vow").Vow<import("@agoric/network").Port>;
|
|
274
|
+
allocateICQControllerPort(): import("@agoric/vow").Vow<import("@agoric/network").Port>;
|
|
275
|
+
allocateCustomLocalPort(specifiedName?: string): import("@agoric/vow").Vow<import("@agoric/network").Port>;
|
|
285
276
|
}>;
|
|
286
277
|
};
|
|
287
278
|
produce: {
|
|
@@ -294,6 +285,7 @@ export function setupOrchestrationVat({ consume: { loadCriticalVat, portAllocato
|
|
|
294
285
|
orchestrationRef: VatSourceRef;
|
|
295
286
|
};
|
|
296
287
|
}): Promise<void>;
|
|
288
|
+
export function initChainInfo({ consume: { agoricNamesAdmin, chainStorage: chainStorageP }, }: BootstrapPowers): Promise<void>;
|
|
297
289
|
export function addOrchestrationToClient({ consume: { client, orchestration } }: WellKnownSpaces & PromiseSpaceOf<ChainBootstrapSpaceT & {
|
|
298
290
|
vatAdminSvc: VatAdminSvc;
|
|
299
291
|
}, {}, {
|
|
@@ -390,7 +382,7 @@ export function addOrchestrationToClient({ consume: { client, orchestration } }:
|
|
|
390
382
|
bootMsg?: {
|
|
391
383
|
type: string;
|
|
392
384
|
chainID: string;
|
|
393
|
-
storagePort: number;
|
|
385
|
+
storagePort: number; /** @type {OrchestrationVats} */
|
|
394
386
|
supplyCoins: {
|
|
395
387
|
denom: string;
|
|
396
388
|
amount: string;
|
|
@@ -504,7 +496,7 @@ export function addOrchestrationToClient({ consume: { client, orchestration } }:
|
|
|
504
496
|
getNameHubKit: () => import("@agoric/vats").NameHubKit;
|
|
505
497
|
publishNameHubs: (nameStorage: ERef<StorageNode>, vatBoard: ERef<BoardVat>, kinds: string[]) => Promise<void>;
|
|
506
498
|
provideInertBrand: (keyword: string, displayInfo: DisplayInfo) => any;
|
|
507
|
-
} & import("@endo/
|
|
499
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
508
500
|
getNameHub: () => import("@agoric/vats").NameHub<any>;
|
|
509
501
|
getNameHubKit: () => import("@agoric/vats").NameHubKit;
|
|
510
502
|
publishNameHubs: (nameStorage: ERef<StorageNode>, vatBoard: ERef<BoardVat>, kinds: string[]) => Promise<void>;
|
|
@@ -512,10 +504,10 @@ export function addOrchestrationToClient({ consume: { client, orchestration } }:
|
|
|
512
504
|
}>>;
|
|
513
505
|
board: Promise<{
|
|
514
506
|
getBoard: () => import("@endo/exo").Guarded<{
|
|
515
|
-
getId(value: import("@endo/
|
|
516
|
-
getValue(id: BoardId): import("@endo/
|
|
507
|
+
getId(value: import("@endo/marshal").RemotableObject): string;
|
|
508
|
+
getValue(id: BoardId): import("@endo/marshal").RemotableObject;
|
|
517
509
|
lookup(...path: string[]): Promise<any>;
|
|
518
|
-
has(val: import("@endo/
|
|
510
|
+
has(val: import("@endo/marshal").RemotableObject): boolean;
|
|
519
511
|
ids(): string[];
|
|
520
512
|
getPublishingMarshaller(): import("@endo/exo").Guarded<{
|
|
521
513
|
toCapData(val: any): import("@endo/marshal").CapData<string>;
|
|
@@ -532,12 +524,12 @@ export function addOrchestrationToClient({ consume: { client, orchestration } }:
|
|
|
532
524
|
}>;
|
|
533
525
|
makePublishingRecorderKit: <T>(storageNode: StorageNode | Awaited<import("@endo/far").FarRef<StorageNode>>, valueShape?: import("@agoric/zoe/src/contractSupport/recorder.js").TypedMatcher<T> | undefined) => import("@agoric/zoe/src/contractSupport/recorder.js").RecorderKit<T>;
|
|
534
526
|
makeReadOnlyRecorderKit: <T>(storageNode: StorageNode | Awaited<import("@endo/far").FarRef<StorageNode>>, valueShape?: import("@agoric/zoe/src/contractSupport/recorder.js").TypedMatcher<T> | undefined) => import("@agoric/zoe/src/contractSupport/recorder.js").RecorderKit<T>;
|
|
535
|
-
} & import("@endo/
|
|
527
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
536
528
|
getBoard: () => import("@endo/exo").Guarded<{
|
|
537
|
-
getId(value: import("@endo/
|
|
538
|
-
getValue(id: BoardId): import("@endo/
|
|
529
|
+
getId(value: import("@endo/marshal").RemotableObject): string;
|
|
530
|
+
getValue(id: BoardId): import("@endo/marshal").RemotableObject;
|
|
539
531
|
lookup(...path: string[]): Promise<any>;
|
|
540
|
-
has(val: import("@endo/
|
|
532
|
+
has(val: import("@endo/marshal").RemotableObject): boolean;
|
|
541
533
|
ids(): string[];
|
|
542
534
|
getPublishingMarshaller(): import("@endo/exo").Guarded<{
|
|
543
535
|
toCapData(val: any): import("@endo/marshal").CapData<string>;
|
|
@@ -581,12 +573,22 @@ export function getManifestForOrchestration(_powers: any, { orchestrationRef }:
|
|
|
581
573
|
consume: {
|
|
582
574
|
loadCriticalVat: boolean;
|
|
583
575
|
portAllocator: string;
|
|
576
|
+
agoricNamesAdmin?: undefined;
|
|
577
|
+
chainStorage?: undefined;
|
|
584
578
|
};
|
|
585
579
|
produce: {
|
|
586
580
|
orchestration: string;
|
|
587
581
|
orchestrationKit: string;
|
|
588
582
|
orchestrationVat: string;
|
|
589
583
|
};
|
|
584
|
+
} | {
|
|
585
|
+
consume: {
|
|
586
|
+
agoricNamesAdmin: boolean;
|
|
587
|
+
chainStorage: boolean;
|
|
588
|
+
loadCriticalVat?: undefined;
|
|
589
|
+
portAllocator?: undefined;
|
|
590
|
+
};
|
|
591
|
+
produce?: undefined;
|
|
590
592
|
};
|
|
591
593
|
};
|
|
592
594
|
options: {
|
|
@@ -597,8 +599,8 @@ export type OrchestrationVats = {
|
|
|
597
599
|
orchestration: globalThis.ERef<{
|
|
598
600
|
makeOrchestrationKit(initialPowers?: Partial<import("../service.js").OrchestrationPowers> | undefined): import("@endo/exo").GuardedKit<{
|
|
599
601
|
self: {
|
|
600
|
-
allocateICAControllerPort(): Promise<
|
|
601
|
-
allocateICQControllerPort(): Promise<
|
|
602
|
+
allocateICAControllerPort(): Promise<import("@agoric/network").Port>;
|
|
603
|
+
allocateICQControllerPort(): Promise<import("@agoric/network").Port>;
|
|
602
604
|
};
|
|
603
605
|
public: {
|
|
604
606
|
makeAccount(hostConnectionId: `connection-${number}`, controllerConnectionId: `connection-${number}`): Promise<import("../cosmos-api.js").IcaAccount>;
|
|
@@ -609,11 +611,11 @@ export type OrchestrationVats = {
|
|
|
609
611
|
}>>;
|
|
610
612
|
};
|
|
611
613
|
}>;
|
|
612
|
-
} & import("@endo/
|
|
614
|
+
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
613
615
|
makeOrchestrationKit(initialPowers?: Partial<import("../service.js").OrchestrationPowers> | undefined): import("@endo/exo").GuardedKit<{
|
|
614
616
|
self: {
|
|
615
|
-
allocateICAControllerPort(): Promise<
|
|
616
|
-
allocateICQControllerPort(): Promise<
|
|
617
|
+
allocateICAControllerPort(): Promise<import("@agoric/network").Port>;
|
|
618
|
+
allocateICQControllerPort(): Promise<import("@agoric/network").Port>;
|
|
617
619
|
};
|
|
618
620
|
public: {
|
|
619
621
|
makeAccount(hostConnectionId: `connection-${number}`, controllerConnectionId: `connection-${number}`): Promise<import("../cosmos-api.js").IcaAccount>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestration-proposal.d.ts","sourceRoot":"","sources":["orchestration-proposal.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"orchestration-proposal.d.ts","sourceRoot":"","sources":["orchestration-proposal.js"],"names":[],"mappings":"AAgCO;;;;;;;;;;;;;;;;;wCAWL,eAAY;mIAyFV,eACE,GAAE;gBAAE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far';
|
|
3
|
+
import { makeMarshal } from '@endo/marshal';
|
|
4
|
+
import { Fail } from '@agoric/assert';
|
|
5
|
+
import { registerChainNamespace } from '../chain-info.js';
|
|
6
|
+
|
|
7
|
+
const trace = makeTracer('CoreEvalOrchestration', true);
|
|
2
8
|
|
|
3
9
|
/**
|
|
4
10
|
* @import {PortAllocator} from '@agoric/network';
|
|
@@ -58,6 +64,67 @@ export const setupOrchestrationVat = async (
|
|
|
58
64
|
orchestrationKitP.resolve(newOrchestrationKit);
|
|
59
65
|
};
|
|
60
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Similar to publishAgoricNamesToChainStorage but publishes a node per chain
|
|
69
|
+
* instead of one list of entries
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @param {ERef<import('@agoric/vats').NameHubKit['nameAdmin']>} agoricNamesAdmin
|
|
74
|
+
* @param {ERef<StorageNode | null>} chainStorageP
|
|
75
|
+
*/
|
|
76
|
+
|
|
77
|
+
const publishChainInfoToChainStorage = async (
|
|
78
|
+
agoricNamesAdmin,
|
|
79
|
+
chainStorageP,
|
|
80
|
+
) => {
|
|
81
|
+
const chainStorage = await chainStorageP;
|
|
82
|
+
if (!chainStorage) {
|
|
83
|
+
console.warn('no chain storage, not registering chain info');
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const chainNamesNode = E(
|
|
88
|
+
E(chainStorage).makeChildNode('agoricNames'),
|
|
89
|
+
).makeChildNode('chain');
|
|
90
|
+
const { nameAdmin } = await E(agoricNamesAdmin).provideChild('chain');
|
|
91
|
+
|
|
92
|
+
await E(nameAdmin).onUpdate(
|
|
93
|
+
// XXX will live on the heap in the bootstrap vat. When we upgrade or kill
|
|
94
|
+
// that this handler will sever and vat-agoricNames will need to be upgraded
|
|
95
|
+
// to allow changing the handler, or to use pubsub mechanics instead.
|
|
96
|
+
Far('chain info writer', {
|
|
97
|
+
write(entries) {
|
|
98
|
+
// chainInfo has no cap data but we need to marshal bigints
|
|
99
|
+
const marshalData = makeMarshal(_val => Fail`data only`);
|
|
100
|
+
for (const [chainName, info] of entries) {
|
|
101
|
+
// XXX writes even if the entry hasn't changed
|
|
102
|
+
const chainNode = E(chainNamesNode).makeChildNode(chainName);
|
|
103
|
+
void E(chainNode).setValue(
|
|
104
|
+
JSON.stringify(marshalData.toCapData(info)),
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
}),
|
|
109
|
+
);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* @param {BootstrapPowers} powers
|
|
114
|
+
*/
|
|
115
|
+
export const initChainInfo = async ({
|
|
116
|
+
consume: { agoricNamesAdmin, chainStorage: chainStorageP },
|
|
117
|
+
}) => {
|
|
118
|
+
trace('init-chainInfo');
|
|
119
|
+
|
|
120
|
+
// First set up callback to write updates to vstorage
|
|
121
|
+
await publishChainInfoToChainStorage(agoricNamesAdmin, chainStorageP);
|
|
122
|
+
|
|
123
|
+
// Now register the names
|
|
124
|
+
await registerChainNamespace(agoricNamesAdmin, trace);
|
|
125
|
+
};
|
|
126
|
+
harden(initChainInfo);
|
|
127
|
+
|
|
61
128
|
/**
|
|
62
129
|
* @param {BootstrapPowers & {
|
|
63
130
|
* consume: {
|
|
@@ -86,6 +153,12 @@ export const getManifestForOrchestration = (_powers, { orchestrationRef }) => ({
|
|
|
86
153
|
orchestrationVat: 'orchestrationVat',
|
|
87
154
|
},
|
|
88
155
|
},
|
|
156
|
+
[initChainInfo.name]: {
|
|
157
|
+
consume: {
|
|
158
|
+
agoricNamesAdmin: true,
|
|
159
|
+
chainStorage: true,
|
|
160
|
+
},
|
|
161
|
+
},
|
|
89
162
|
},
|
|
90
163
|
options: {
|
|
91
164
|
orchestrationRef,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export function startStakeAtom({ consume: { agoricNames, board, chainStorage, chainTimerService, orchestration, startUpgradable, }, installation: { consume: {
|
|
1
|
+
export function startStakeAtom({ consume: { agoricNames, board, chainStorage, chainTimerService, orchestration, startUpgradable, }, installation: { consume: { stakeIca }, }, instance: { produce: { stakeAtom: produceInstance }, }, }: BootstrapPowers & {
|
|
2
2
|
installation: {
|
|
3
3
|
consume: {
|
|
4
|
-
|
|
4
|
+
stakeIca: Installation<(zcf: ZCF<StakeIcaTerms>, privateArgs: {
|
|
5
5
|
orchestration: import("@endo/exo").Guarded<{
|
|
6
6
|
makeAccount(hostConnectionId: `connection-${number}`, controllerConnectionId: `connection-${number}`): Promise<import("../cosmos-api.js").IcaAccount>;
|
|
7
7
|
provideICQConnection(controllerConnectionId: `connection-${number}`): Promise<import("@endo/exo").Guarded<{
|
|
@@ -81,8 +81,6 @@ export function startStakeAtom({ consume: { agoricNames, board, chainStorage, ch
|
|
|
81
81
|
}>>;
|
|
82
82
|
};
|
|
83
83
|
};
|
|
84
|
-
}, { options: { hostConnectionId, controllerConnectionId, bondDenom } }: {
|
|
85
|
-
options: StakeAtomTerms;
|
|
86
84
|
}): Promise<void>;
|
|
87
85
|
export function getManifestForStakeAtom({ restoreRef }: {
|
|
88
86
|
restoreRef: any;
|
|
@@ -102,7 +100,7 @@ export function getManifestForStakeAtom({ restoreRef }: {
|
|
|
102
100
|
};
|
|
103
101
|
installation: {
|
|
104
102
|
consume: {
|
|
105
|
-
|
|
103
|
+
stakeIca: boolean;
|
|
106
104
|
};
|
|
107
105
|
};
|
|
108
106
|
instance: {
|
|
@@ -113,11 +111,11 @@ export function getManifestForStakeAtom({ restoreRef }: {
|
|
|
113
111
|
};
|
|
114
112
|
};
|
|
115
113
|
installations: {
|
|
116
|
-
|
|
114
|
+
stakeIca: any;
|
|
117
115
|
};
|
|
118
116
|
options: {
|
|
119
117
|
[x: string]: any;
|
|
120
118
|
};
|
|
121
119
|
};
|
|
122
|
-
import type {
|
|
120
|
+
import type { StakeIcaTerms } from '../examples/stakeIca.contract';
|
|
123
121
|
//# sourceMappingURL=start-stakeAtom.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-stakeAtom.d.ts","sourceRoot":"","sources":["start-stakeAtom.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"start-stakeAtom.d.ts","sourceRoot":"","sources":["start-stakeAtom.js"],"names":[],"mappings":"AAuBO,yOAVI,eAAe,GAAG;IAC5B,YAAgB,EAAE;QAClB,OAAa,EAAE;YACf,QAAgB,EAAE,YAAY,OAmCH,IAAI,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+GA2DojH,OAAO,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA5FrmH,CAAC;SACH,CAAC;KACH,CAAC;CACH,iBAyDH;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BN;mCAtG6C,+BAA+B"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { makeTracer } from '@agoric/internal';
|
|
2
2
|
import { makeStorageNodeChild } from '@agoric/internal/src/lib-chainStorage.js';
|
|
3
3
|
import { E } from '@endo/far';
|
|
4
|
+
import { makeChainHub } from '../utils/chainHub.js';
|
|
4
5
|
|
|
5
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* @import {IBCConnectionID} from '@agoric/vats';
|
|
8
|
+
* @import {StakeAtomSF, StakeIcaTerms} from '../examples/stakeIca.contract';
|
|
9
|
+
*/
|
|
6
10
|
|
|
7
11
|
const trace = makeTracer('StartStakeAtom', true);
|
|
8
12
|
|
|
@@ -10,39 +14,31 @@ const trace = makeTracer('StartStakeAtom', true);
|
|
|
10
14
|
* @param {BootstrapPowers & {
|
|
11
15
|
* installation: {
|
|
12
16
|
* consume: {
|
|
13
|
-
*
|
|
14
|
-
* import('../examples/
|
|
17
|
+
* stakeIca: Installation<
|
|
18
|
+
* import('../examples/stakeIca.contract.js').start
|
|
15
19
|
* >;
|
|
16
20
|
* };
|
|
17
21
|
* };
|
|
18
22
|
* }} powers
|
|
19
|
-
* @param {{ options: StakeAtomTerms }} options
|
|
20
23
|
*/
|
|
21
|
-
export const startStakeAtom = async (
|
|
22
|
-
{
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
startUpgradable,
|
|
30
|
-
},
|
|
31
|
-
installation: {
|
|
32
|
-
consume: { stakeAtom },
|
|
33
|
-
},
|
|
34
|
-
instance: {
|
|
35
|
-
produce: { stakeAtom: produceInstance },
|
|
36
|
-
},
|
|
24
|
+
export const startStakeAtom = async ({
|
|
25
|
+
consume: {
|
|
26
|
+
agoricNames,
|
|
27
|
+
board,
|
|
28
|
+
chainStorage,
|
|
29
|
+
chainTimerService,
|
|
30
|
+
orchestration,
|
|
31
|
+
startUpgradable,
|
|
37
32
|
},
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
installation: {
|
|
34
|
+
consume: { stakeIca },
|
|
35
|
+
},
|
|
36
|
+
instance: {
|
|
37
|
+
produce: { stakeAtom: produceInstance },
|
|
38
|
+
},
|
|
39
|
+
}) => {
|
|
40
40
|
const VSTORAGE_PATH = 'stakeAtom';
|
|
41
|
-
trace('startStakeAtom'
|
|
42
|
-
hostConnectionId,
|
|
43
|
-
controllerConnectionId,
|
|
44
|
-
bondDenom,
|
|
45
|
-
});
|
|
41
|
+
trace('startStakeAtom');
|
|
46
42
|
await null;
|
|
47
43
|
|
|
48
44
|
const storageNode = await makeStorageNodeChild(chainStorage, VSTORAGE_PATH);
|
|
@@ -50,15 +46,25 @@ export const startStakeAtom = async (
|
|
|
50
46
|
const atomIssuer = await E(agoricNames).lookup('issuer', 'ATOM');
|
|
51
47
|
trace('ATOM Issuer', atomIssuer);
|
|
52
48
|
|
|
49
|
+
const chainHub = makeChainHub(await agoricNames);
|
|
50
|
+
|
|
51
|
+
const cosmoshub = await chainHub.getChainInfo('cosmoshub');
|
|
52
|
+
const connectionInfo = await chainHub.getConnectionInfo(
|
|
53
|
+
'agoriclocal',
|
|
54
|
+
'cosmoshub-4',
|
|
55
|
+
);
|
|
56
|
+
|
|
53
57
|
/** @type {StartUpgradableOpts<StakeAtomSF>} */
|
|
54
58
|
const startOpts = {
|
|
55
59
|
label: 'stakeAtom',
|
|
56
|
-
installation:
|
|
60
|
+
installation: stakeIca,
|
|
57
61
|
issuerKeywordRecord: harden({ ATOM: atomIssuer }),
|
|
58
62
|
terms: {
|
|
59
|
-
hostConnectionId,
|
|
60
|
-
controllerConnectionId
|
|
61
|
-
|
|
63
|
+
hostConnectionId: /** @type {IBCConnectionID} */ (connectionInfo.id),
|
|
64
|
+
controllerConnectionId: /** @type {IBCConnectionID} */ (
|
|
65
|
+
connectionInfo.counterparty.connection_id
|
|
66
|
+
),
|
|
67
|
+
bondDenom: cosmoshub.stakingTokens[0].denom,
|
|
62
68
|
},
|
|
63
69
|
privateArgs: {
|
|
64
70
|
orchestration: await orchestration,
|
|
@@ -89,7 +95,7 @@ export const getManifestForStakeAtom = (
|
|
|
89
95
|
startUpgradable: true,
|
|
90
96
|
},
|
|
91
97
|
installation: {
|
|
92
|
-
consume: {
|
|
98
|
+
consume: { stakeIca: true },
|
|
93
99
|
},
|
|
94
100
|
instance: {
|
|
95
101
|
produce: { stakeAtom: true },
|
|
@@ -97,7 +103,7 @@ export const getManifestForStakeAtom = (
|
|
|
97
103
|
},
|
|
98
104
|
},
|
|
99
105
|
installations: {
|
|
100
|
-
|
|
106
|
+
stakeIca: restoreRef(installKeys.stakeIca),
|
|
101
107
|
},
|
|
102
108
|
options,
|
|
103
109
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function startStakeBld({ consume: { agoricNames: agoricNamesP,
|
|
1
|
+
export function startStakeBld({ consume: { agoricNames: agoricNamesP, board, chainStorage, chainTimerService: chainTimerServiceP, localchain, startUpgradable, }, installation: { consume: { stakeBld }, }, instance: { produce: { stakeBld: produceInstance }, }, issuer: { consume: { [Stake.symbol]: stakeIssuer }, }, }: BootstrapPowers & {
|
|
2
2
|
installation: {
|
|
3
3
|
consume: {
|
|
4
4
|
stakeBld: Installation<(zcf: ZCF, privateArgs: {
|
|
@@ -140,7 +140,6 @@ export function getManifestForStakeBld({ restoreRef }: {
|
|
|
140
140
|
[x: string]: {
|
|
141
141
|
consume: {
|
|
142
142
|
agoricNames: boolean;
|
|
143
|
-
agoricNamesAdmin: boolean;
|
|
144
143
|
board: boolean;
|
|
145
144
|
chainStorage: boolean;
|
|
146
145
|
chainTimerService: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-stakeBld.d.ts","sourceRoot":"","sources":["start-stakeBld.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"start-stakeBld.d.ts","sourceRoot":"","sources":["start-stakeBld.js"],"names":[],"mappings":"AAkBO,6TAVI,eAAe,GAAG;IAC5B,YAAgB,EAAE;QAClB,OAAa,EAAE;YACf,QAAgB,EAAE,YAAY,OA0BT,GAAG;;;;;0CAgCS,MAAM,KAAK,CAAC;yCAkBrC,QAAQ,KAAK,CAAC,mBACG,OAAO;yCAegP,OAAO,KAAK,CAAC;;;uCAAgiB,EAAE;;;mCAAg0E,OAAO,sBAAsB,EAAE,SAAS;;;wCAAyqB,OAAO,sBAAsB,EAAE,SAAS,EAAE;;;;;;;;;;;;;;;wBA5D/1H,OAAO,kBAAkB,EAAE,OAAO;;;;;;;;;;;2EA4D01C,OAAO,KAAK,CAAC;;;6EAAid,OAAO,KAAK,CAAC;;;;;;;;;;;2EAAs4B,OAAO,KAAK,CAAC;;;6EAA+yB,OAAO,KAAK,CAAC;6CAhBzkH,QAAQ,KAAK,CAAC,mBACG,OAAO;6CAegP,OAAO,KAAK,CAAC;;;2CAAgiB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA1FtzB,CAAC;SACH,CAAC;KACH,CAAC;CACH,iBAwDH;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BN;sBApGqB,gCAAgC"}
|
|
@@ -2,7 +2,6 @@ import { makeTracer } from '@agoric/internal';
|
|
|
2
2
|
import { makeStorageNodeChild } from '@agoric/internal/src/lib-chainStorage.js';
|
|
3
3
|
import { Stake } from '@agoric/internal/src/tokens.js';
|
|
4
4
|
import { E } from '@endo/far';
|
|
5
|
-
import { registerChainNamespace } from '../chain-info.js';
|
|
6
5
|
|
|
7
6
|
const trace = makeTracer('StartStakeBld', true);
|
|
8
7
|
|
|
@@ -20,7 +19,6 @@ const trace = makeTracer('StartStakeBld', true);
|
|
|
20
19
|
export const startStakeBld = async ({
|
|
21
20
|
consume: {
|
|
22
21
|
agoricNames: agoricNamesP,
|
|
23
|
-
agoricNamesAdmin,
|
|
24
22
|
board,
|
|
25
23
|
chainStorage,
|
|
26
24
|
chainTimerService: chainTimerServiceP,
|
|
@@ -40,9 +38,6 @@ export const startStakeBld = async ({
|
|
|
40
38
|
const VSTORAGE_PATH = 'stakeBld';
|
|
41
39
|
trace('startStakeBld');
|
|
42
40
|
|
|
43
|
-
// Assumes this is the first proposal to need/provide `chain` namespace
|
|
44
|
-
await registerChainNamespace(agoricNamesAdmin, trace);
|
|
45
|
-
|
|
46
41
|
const storageNode = await makeStorageNodeChild(chainStorage, VSTORAGE_PATH);
|
|
47
42
|
|
|
48
43
|
// NB: committee must only publish what it intended to be public
|
|
@@ -64,7 +59,6 @@ export const startStakeBld = async ({
|
|
|
64
59
|
issuerKeywordRecord: harden({ In: await stakeIssuer }),
|
|
65
60
|
terms: {},
|
|
66
61
|
privateArgs: {
|
|
67
|
-
// BEFOREPUSh populate agoricNames with 'agoric' info and test in a3p
|
|
68
62
|
agoricNames,
|
|
69
63
|
localchain: await localchain,
|
|
70
64
|
timerService,
|
|
@@ -75,6 +69,7 @@ export const startStakeBld = async ({
|
|
|
75
69
|
|
|
76
70
|
const { instance } = await E(startUpgradable)(startOpts);
|
|
77
71
|
produceInstance.resolve(instance);
|
|
72
|
+
trace('done');
|
|
78
73
|
};
|
|
79
74
|
harden(startStakeBld);
|
|
80
75
|
|
|
@@ -84,7 +79,6 @@ export const getManifestForStakeBld = ({ restoreRef }, { installKeys }) => {
|
|
|
84
79
|
[startStakeBld.name]: {
|
|
85
80
|
consume: {
|
|
86
81
|
agoricNames: true,
|
|
87
|
-
agoricNamesAdmin: true,
|
|
88
82
|
board: true,
|
|
89
83
|
chainStorage: true,
|
|
90
84
|
chainTimerService: true,
|
package/src/service.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export const OrchestrationI: import("@endo/patterns").InterfaceGuard<{
|
|
|
5
5
|
export function prepareOrchestrationTools(zone: Zone): {
|
|
6
6
|
makeOrchestrationKit: (initialPowers?: Partial<OrchestrationPowers> | undefined) => import("@endo/exo").GuardedKit<{
|
|
7
7
|
self: {
|
|
8
|
-
allocateICAControllerPort(): Promise<
|
|
9
|
-
allocateICQControllerPort(): Promise<
|
|
8
|
+
allocateICAControllerPort(): Promise<Port>;
|
|
9
|
+
allocateICQControllerPort(): Promise<Port>;
|
|
10
10
|
};
|
|
11
11
|
public: {
|
|
12
12
|
/**
|
|
@@ -30,10 +30,10 @@ export function prepareOrchestrationTools(zone: Zone): {
|
|
|
30
30
|
};
|
|
31
31
|
export type OrchestrationPowers = {
|
|
32
32
|
portAllocator: Remote<import("@endo/exo").Guarded<{
|
|
33
|
-
allocateCustomIBCPort(specifiedName?: string): import("@agoric/vow").Vow<
|
|
34
|
-
allocateICAControllerPort(): import("@agoric/vow").Vow<
|
|
35
|
-
allocateICQControllerPort(): import("@agoric/vow").Vow<
|
|
36
|
-
allocateCustomLocalPort(specifiedName?: string): import("@agoric/vow").Vow<
|
|
33
|
+
allocateCustomIBCPort(specifiedName?: string): import("@agoric/vow").Vow<Port>;
|
|
34
|
+
allocateICAControllerPort(): import("@agoric/vow").Vow<Port>;
|
|
35
|
+
allocateICQControllerPort(): import("@agoric/vow").Vow<Port>;
|
|
36
|
+
allocateCustomLocalPort(specifiedName?: string): import("@agoric/vow").Vow<Port>;
|
|
37
37
|
}>>;
|
|
38
38
|
};
|
|
39
39
|
/**
|
|
@@ -62,6 +62,7 @@ export type OrchestrationTools = ReturnType<typeof prepareOrchestrationTools>;
|
|
|
62
62
|
export type OrchestrationKit = ReturnType<OrchestrationTools["makeOrchestrationKit"]>;
|
|
63
63
|
export type OrchestrationService = OrchestrationKit["public"];
|
|
64
64
|
import type { Zone } from '@agoric/base-zone';
|
|
65
|
+
import type { Port } from '@agoric/network';
|
|
65
66
|
import type { IcaAccount } from './types.js';
|
|
66
67
|
import type { Remote } from '@agoric/internal';
|
|
67
68
|
//# sourceMappingURL=service.d.ts.map
|
package/src/service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["service.js"],"names":[],"mappings":"AAoDA;;;GAOG;AA2GI;;;;;;;YAxDC;;;;;eAKG;;YAkBH;;;eAGG;;;;;;;;EAwCV;;;;;;;;;;;;;;yBAhJY,QAAQ,CACpB,MAAU,mBAAmB,EAC7B,mBAAuB,CAAC,MAAM,mBAAmB,CAAC,CAC/C;;;;;;;;;;;;;iCA0BU;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,cAAc,EAAE,kBAAkB,CAAA;CAAE;iCAsH1D,UAAU,CAAC,OAAO,yBAAyB,CAAC;+BAC5C,UAAU,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;mCACtD,gBAAgB,CAAC,QAAQ,CAAC;0BAxKjB,mBAAmB;
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["service.js"],"names":[],"mappings":"AAoDA;;;GAOG;AA2GI;;;;;;;YAxDC;;;;;eAKG;;YAkBH;;;eAGG;;;;;;;;EAwCV;;;;;;;;;;;;;;yBAhJY,QAAQ,CACpB,MAAU,mBAAmB,EAC7B,mBAAuB,CAAC,MAAM,mBAAmB,CAAC,CAC/C;;;;;;;;;;;;;iCA0BU;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,cAAc,EAAE,kBAAkB,CAAA;CAAE;iCAsH1D,UAAU,CAAC,OAAO,yBAAyB,CAAC;+BAC5C,UAAU,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;mCACtD,gBAAgB,CAAC,QAAQ,CAAC;0BAxKjB,mBAAmB;0BAEJ,iBAAiB;gCAEO,YAAY;4BAHjD,kBAAkB"}
|
package/src/typeGuards.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAGA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;AAiBH,8DAAkE;;;;;;AAQlE,uEAUE;AAEF,iEAA4C;AAC5C,mEAQG;AACH,oEAA+C;AAC/C,
|
|
1
|
+
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAGA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;AAiBH,8DAAkE;;;;;;AAQlE,uEAUE;AAEF,iEAA4C;AAC5C,mEAQG;AACH,oEAA+C;AAC/C,sEAYG;AAEH,oEAUE"}
|