@agoric/orchestration 0.1.1-dev-3b799b8.0 → 0.1.1-dev-fb76d70.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 +1 -0
- package/index.js +1 -0
- package/package.json +16 -16
- package/src/exos/chain-hub.d.ts +4 -3
- package/src/exos/chain-hub.d.ts.map +1 -1
- package/src/exos/chain-hub.js +15 -6
- package/src/utils/start-helper.d.ts +1 -1
package/index.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ export * from "./src/types-index.js";
|
|
|
2
2
|
export * from "./src/exos/cosmos-interchain-service.js";
|
|
3
3
|
export * from "./src/exos/chain-hub-admin.js";
|
|
4
4
|
export * from "./src/typeGuards.js";
|
|
5
|
+
export * from "./src/utils/denomHash.js";
|
|
5
6
|
export { withOrchestration } from "./src/utils/start-helper.js";
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
package/index.js
CHANGED
|
@@ -7,5 +7,6 @@ export * from './src/types-index.js'; // no named exports
|
|
|
7
7
|
export * from './src/exos/cosmos-interchain-service.js';
|
|
8
8
|
export * from './src/exos/chain-hub-admin.js';
|
|
9
9
|
export * from './src/typeGuards.js';
|
|
10
|
+
export * from './src/utils/denomHash.js';
|
|
10
11
|
|
|
11
12
|
export { withOrchestration } from './src/utils/start-helper.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/orchestration",
|
|
3
|
-
"version": "0.1.1-dev-
|
|
3
|
+
"version": "0.1.1-dev-fb76d70.0+fb76d70",
|
|
4
4
|
"description": "Chain abstraction for Agoric's orchestration clients",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
},
|
|
34
34
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@agoric/async-flow": "0.1.1-dev-
|
|
37
|
-
"@agoric/cosmic-proto": "0.4.1-dev-
|
|
38
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
39
|
-
"@agoric/internal": "0.3.3-dev-
|
|
40
|
-
"@agoric/network": "0.1.1-dev-
|
|
41
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
42
|
-
"@agoric/store": "0.9.3-dev-
|
|
43
|
-
"@agoric/time": "0.3.3-dev-
|
|
44
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
45
|
-
"@agoric/vats": "0.15.2-dev-
|
|
46
|
-
"@agoric/vow": "0.1.1-dev-
|
|
47
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
48
|
-
"@agoric/zone": "0.2.3-dev-
|
|
36
|
+
"@agoric/async-flow": "0.1.1-dev-fb76d70.0+fb76d70",
|
|
37
|
+
"@agoric/cosmic-proto": "0.4.1-dev-fb76d70.0+fb76d70",
|
|
38
|
+
"@agoric/ertp": "0.16.3-dev-fb76d70.0+fb76d70",
|
|
39
|
+
"@agoric/internal": "0.3.3-dev-fb76d70.0+fb76d70",
|
|
40
|
+
"@agoric/network": "0.1.1-dev-fb76d70.0+fb76d70",
|
|
41
|
+
"@agoric/notifier": "0.6.3-dev-fb76d70.0+fb76d70",
|
|
42
|
+
"@agoric/store": "0.9.3-dev-fb76d70.0+fb76d70",
|
|
43
|
+
"@agoric/time": "0.3.3-dev-fb76d70.0+fb76d70",
|
|
44
|
+
"@agoric/vat-data": "0.5.3-dev-fb76d70.0+fb76d70",
|
|
45
|
+
"@agoric/vats": "0.15.2-dev-fb76d70.0+fb76d70",
|
|
46
|
+
"@agoric/vow": "0.1.1-dev-fb76d70.0+fb76d70",
|
|
47
|
+
"@agoric/zoe": "0.26.3-dev-fb76d70.0+fb76d70",
|
|
48
|
+
"@agoric/zone": "0.2.3-dev-fb76d70.0+fb76d70",
|
|
49
49
|
"@endo/base64": "^1.0.8",
|
|
50
50
|
"@endo/errors": "^1.2.7",
|
|
51
51
|
"@endo/far": "^1.1.8",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@noble/hashes": "^1.5.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
57
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-fb76d70.0+fb76d70",
|
|
58
58
|
"@chain-registry/client": "^1.47.4",
|
|
59
59
|
"@cosmjs/amino": "^0.32.3",
|
|
60
60
|
"@cosmjs/proto-signing": "^0.32.3",
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
"typeCoverage": {
|
|
96
96
|
"atLeast": 97.23
|
|
97
97
|
},
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "fb76d7061a2ba71db7c7bb746ea8f34dbe5dbed0"
|
|
99
99
|
}
|
package/src/exos/chain-hub.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @import {Zone} from '@agoric/zone';
|
|
5
5
|
* @import {CosmosAssetInfo, CosmosChainInfo, IBCConnectionInfo} from '../cosmos-api.js';
|
|
6
6
|
* @import {ChainInfo, KnownChains} from '../chain-info.js';
|
|
7
|
-
* @import {Denom} from '../orchestration-api.js';
|
|
7
|
+
* @import {ChainAddress, Denom} from '../orchestration-api.js';
|
|
8
8
|
* @import {Remote} from '@agoric/internal';
|
|
9
9
|
* @import {TypedPattern} from '@agoric/internal';
|
|
10
10
|
*/
|
|
@@ -112,9 +112,9 @@ export function makeChainHub(zone: Zone, agoricNames: Remote<NameHub>, vowTools:
|
|
|
112
112
|
getDenom(brand: Brand): Denom | undefined;
|
|
113
113
|
/**
|
|
114
114
|
* @param {string} address bech32 address
|
|
115
|
-
* @returns {
|
|
115
|
+
* @returns {ChainAddress}
|
|
116
116
|
*/
|
|
117
|
-
|
|
117
|
+
makeChainAddress(address: string): ChainAddress;
|
|
118
118
|
}>;
|
|
119
119
|
export function registerAssets(chainHub: ChainHub, name: string, assets: CosmosAssetInfo[]): void;
|
|
120
120
|
/**
|
|
@@ -149,6 +149,7 @@ import type { VowTools } from '@agoric/vow';
|
|
|
149
149
|
import type { CosmosChainInfo } from '../cosmos-api.js';
|
|
150
150
|
import type { Vow } from '@agoric/vow';
|
|
151
151
|
import type { Denom } from '../orchestration-api.js';
|
|
152
|
+
import type { ChainAddress } from '../orchestration-api.js';
|
|
152
153
|
import type { CosmosAssetInfo } from '../cosmos-api.js';
|
|
153
154
|
import type { KnownChains } from '../chain-info.js';
|
|
154
155
|
import type { ChainInfo } from '../chain-info.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain-hub.d.ts","sourceRoot":"","sources":["chain-hub.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chain-hub.d.ts","sourceRoot":"","sources":["chain-hub.js"],"names":[],"mappings":"AAaA;;;;;;;;;GASG;AAEH;;;;;;;;GAQG;AAEH;;;;;;;GAOG;AACH,wCAAwC;AACxC,+BADW,aAAa,WAAW,CAAC,CAIlC;sBAGQ,CAAC,OAAO,OAAO,EAAE,MAAM,OAAO,OAAO,CAAC;;;;;;AAYhD,oCAAoC;AACpC,gCAAuC;AACvC,8CAA8C;AAC9C,gDAAuD;AACvD,0CAA0C;AAC1C,uCAA8C;AAqBvC,wCAHI,MAAM,YACN,MAAM,UAUhB;AAoCM,wDALI,MAAM,kBACN,MAAM,YACN,iBAAiB,GACf,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAavC;AA4DM,mCAJI,IAAI,eACJ,OAAO,OAAO,CAAC,YACf,QAAQ;IAsHf;;;;;;;;;;;OAWG;wBAFQ,MAAM,aACN,eAAe;IAQ1B;;;;OAIG;iBAHmB,CAAC,SAAV,MAAQ,aACV,CAAC,GACC,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC;IAYpC;;;;OAIG;uCAHQ,MAAM,uBACN,MAAM,kBACN,iBAAiB;IAW5B;;;;OAIG;+BAHQ,MAAM,GAAG;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,WAC5B,MAAM,GAAG;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,GAC1B,IAAI,iBAAiB,CAAC;IAmBnC;;;;;;;;OAQG;2BAPmB,EAAE,SAAX,MAAQ,EACC,EAAE,SAAX,MAAQ,eACV,EAAE,eACF,EAAE,GACA,IACZ,CAAK,eAAe,CAAC,EAAE,CAAC,EAAE,eAAe,CAAC,EAAE,CAAC,EAAE,iBAAiB,CAAC,CAC9D;IAOJ;;;;;;;OAOG;yBAHQ,KAAK,UAEL,WAAW;IAatB;;;;;OAKG;oBAFQ,KAAK,GACH,WAAW,GAAG,SAAS;IAQpC;;;;;OAKG;oBAFQ,KAAK,GACH,KAAK,GAAG,SAAS;IAQ9B;;;OAGG;8BAFQ,MAAM,GACJ,YAAY;GAkB5B;AAUM,yCAJI,QAAQ,QACR,MAAM,UACN,eAAe,EAAE,QAe3B;;;;4BA5cqB,CAAC,SAAV,MAAQ,IACR,CAAC,SAAS,MAAM,WAAW,GACjC,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,GAC/C,SAAS;;;;;cAMF,MAAM;;;;eACN,KAAK;;;;eACL,MAAM;;;;;;uBA2aN,UAAU,CAAC,OAAO,YAAY,CAAC;kCA5bd,kBAAkB;uCAJqB,kBAAkB;0BADjE,cAAc;6BAFX,cAAc;4BAMf,kBAAkB;8BALX,aAAa;qCAEyB,kBAAkB;yBAFxD,aAAa;2BAIP,yBAAyB;kCAAzB,yBAAyB;qCAFO,kBAAkB;iCAC/C,kBAAkB;+BAAlB,kBAAkB"}
|
package/src/exos/chain-hub.js
CHANGED
|
@@ -4,7 +4,11 @@ import { M } from '@endo/patterns';
|
|
|
4
4
|
import { BrandShape } from '@agoric/ertp/src/typeGuards.js';
|
|
5
5
|
|
|
6
6
|
import { VowShape } from '@agoric/vow';
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
ChainAddressShape,
|
|
9
|
+
CosmosChainInfoShape,
|
|
10
|
+
IBCConnectionInfoShape,
|
|
11
|
+
} from '../typeGuards.js';
|
|
8
12
|
import { getBech32Prefix } from '../utils/address.js';
|
|
9
13
|
|
|
10
14
|
/**
|
|
@@ -13,7 +17,7 @@ import { getBech32Prefix } from '../utils/address.js';
|
|
|
13
17
|
* @import {Zone} from '@agoric/zone';
|
|
14
18
|
* @import {CosmosAssetInfo, CosmosChainInfo, IBCConnectionInfo} from '../cosmos-api.js';
|
|
15
19
|
* @import {ChainInfo, KnownChains} from '../chain-info.js';
|
|
16
|
-
* @import {Denom} from '../orchestration-api.js';
|
|
20
|
+
* @import {ChainAddress, Denom} from '../orchestration-api.js';
|
|
17
21
|
* @import {Remote} from '@agoric/internal';
|
|
18
22
|
* @import {TypedPattern} from '@agoric/internal';
|
|
19
23
|
*/
|
|
@@ -181,7 +185,7 @@ const ChainHubI = M.interface('ChainHub', {
|
|
|
181
185
|
registerAsset: M.call(M.string(), DenomDetailShape).returns(),
|
|
182
186
|
getAsset: M.call(M.string()).returns(M.or(DenomDetailShape, M.undefined())),
|
|
183
187
|
getDenom: M.call(BrandShape).returns(M.or(M.string(), M.undefined())),
|
|
184
|
-
|
|
188
|
+
makeChainAddress: M.call(M.string()).returns(ChainAddressShape),
|
|
185
189
|
});
|
|
186
190
|
|
|
187
191
|
/**
|
|
@@ -440,15 +444,20 @@ export const makeChainHub = (zone, agoricNames, vowTools) => {
|
|
|
440
444
|
},
|
|
441
445
|
/**
|
|
442
446
|
* @param {string} address bech32 address
|
|
443
|
-
* @returns {
|
|
447
|
+
* @returns {ChainAddress}
|
|
444
448
|
*/
|
|
445
|
-
|
|
449
|
+
makeChainAddress(address) {
|
|
446
450
|
const prefix = getBech32Prefix(address);
|
|
447
451
|
if (!bech32PrefixToChainName.has(prefix)) {
|
|
448
452
|
throw makeError(`Chain info not found for bech32Prefix ${q(prefix)}`);
|
|
449
453
|
}
|
|
450
454
|
const chainName = bech32PrefixToChainName.get(prefix);
|
|
451
|
-
|
|
455
|
+
const { chainId } = chainInfos.get(chainName);
|
|
456
|
+
return harden({
|
|
457
|
+
chainId,
|
|
458
|
+
value: address,
|
|
459
|
+
encoding: /** @type {const} */ ('bech32'),
|
|
460
|
+
});
|
|
452
461
|
},
|
|
453
462
|
});
|
|
454
463
|
|
|
@@ -18,7 +18,7 @@ export function provideOrchestration(zcf: ZCF, baggage: Baggage, remotePowers: O
|
|
|
18
18
|
registerAsset(denom: import("../orchestration-api.js").Denom, detail: DenomDetail): void;
|
|
19
19
|
getAsset(denom: import("../orchestration-api.js").Denom): DenomDetail | undefined;
|
|
20
20
|
getDenom(brand: Brand): import("../orchestration-api.js").Denom | undefined;
|
|
21
|
-
|
|
21
|
+
makeChainAddress(address: string): import("../orchestration-api.js").ChainAddress;
|
|
22
22
|
}>;
|
|
23
23
|
vowTools: import("@agoric/vow").VowTools;
|
|
24
24
|
asyncFlowTools: {
|