@agoric/orchestration 0.2.0-upgrade-20-dev-ef71cfd.0 → 0.2.0-upgrade-19-devnet-dev-5428c4d.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 +27 -29
- package/src/chain-capabilities.d.ts +12 -7
- package/src/chain-capabilities.d.ts.map +1 -1
- package/src/chain-capabilities.js +21 -46
- package/src/chain-info.d.ts +97 -839
- package/src/chain-info.d.ts.map +1 -1
- package/src/chain-info.js +12 -38
- package/src/cosmos-api.d.ts +13 -41
- package/src/cosmos-api.d.ts.map +1 -1
- package/src/cosmos-api.ts +16 -52
- package/src/ethereum-api.d.ts +5 -6
- package/src/ethereum-api.d.ts.map +1 -1
- package/src/ethereum-api.ts +5 -7
- package/src/examples/auto-stake-it-tap-kit.d.ts +4 -4
- package/src/examples/auto-stake-it-tap-kit.d.ts.map +1 -1
- package/src/examples/auto-stake-it-tap-kit.js +8 -8
- package/src/examples/auto-stake-it.contract.d.ts +23 -5
- package/src/examples/auto-stake-it.contract.d.ts.map +1 -1
- package/src/examples/auto-stake-it.contract.js +0 -1
- package/src/examples/basic-flows.contract.d.ts +13 -5
- package/src/examples/basic-flows.contract.d.ts.map +1 -1
- package/src/examples/basic-flows.contract.js +0 -1
- package/src/examples/send-anywhere.contract.d.ts +27 -7
- package/src/examples/send-anywhere.contract.d.ts.map +1 -1
- package/src/examples/send-anywhere.contract.js +12 -40
- package/src/examples/send-anywhere.flows.d.ts +3 -563
- package/src/examples/send-anywhere.flows.d.ts.map +1 -1
- package/src/examples/send-anywhere.flows.js +31 -112
- package/src/examples/stake-bld.contract.d.ts +7 -8
- package/src/examples/stake-bld.contract.d.ts.map +1 -1
- package/src/examples/stake-bld.contract.js +1 -3
- package/src/examples/stake-ica.contract.d.ts +13 -82
- package/src/examples/stake-ica.contract.d.ts.map +1 -1
- package/src/examples/stake-ica.contract.js +0 -1
- package/src/examples/staking-combinations.contract.d.ts +11 -3
- package/src/examples/staking-combinations.contract.d.ts.map +1 -1
- package/src/examples/staking-combinations.contract.js +4 -5
- package/src/examples/staking-combinations.flows.d.ts +2 -2
- package/src/examples/staking-combinations.flows.d.ts.map +1 -1
- package/src/examples/staking-combinations.flows.js +4 -4
- package/src/examples/swap.contract.d.ts +13 -4
- package/src/examples/swap.contract.d.ts.map +1 -1
- package/src/examples/swap.contract.js +2 -2
- package/src/examples/unbond.contract.d.ts +2 -2
- package/src/exos/README.md +0 -1
- package/src/exos/chain-hub-admin.d.ts +9 -9
- package/src/exos/chain-hub-admin.d.ts.map +1 -1
- package/src/exos/chain-hub-admin.js +17 -17
- package/src/exos/chain-hub.d.ts +17 -69
- package/src/exos/chain-hub.d.ts.map +1 -1
- package/src/exos/chain-hub.js +55 -289
- package/src/exos/cosmos-orchestration-account.d.ts +17 -86
- package/src/exos/cosmos-orchestration-account.d.ts.map +1 -1
- package/src/exos/cosmos-orchestration-account.js +26 -111
- package/src/exos/ibc-packet.d.ts +0 -1
- package/src/exos/ibc-packet.d.ts.map +1 -1
- package/src/exos/ibc-packet.js +1 -8
- package/src/exos/ica-account-kit.d.ts +4 -8
- package/src/exos/ica-account-kit.d.ts.map +1 -1
- package/src/exos/ica-account-kit.js +5 -8
- package/src/exos/local-chain-facade.d.ts +23 -3
- package/src/exos/local-chain-facade.d.ts.map +1 -1
- package/src/exos/local-chain-facade.js +3 -3
- package/src/exos/local-orchestration-account.d.ts +12 -16
- package/src/exos/local-orchestration-account.d.ts.map +1 -1
- package/src/exos/local-orchestration-account.js +8 -13
- package/src/exos/orchestrator.d.ts +15 -5
- package/src/exos/orchestrator.d.ts.map +1 -1
- package/src/exos/orchestrator.js +10 -9
- package/src/exos/packet-tools.d.ts +1 -1
- package/src/exos/packet-tools.d.ts.map +1 -1
- package/src/exos/packet-tools.js +12 -17
- package/src/exos/portfolio-holder-kit.d.ts +0 -1
- package/src/exos/portfolio-holder-kit.d.ts.map +1 -1
- package/src/exos/portfolio-holder-kit.js +0 -1
- package/src/exos/remote-chain-facade.d.ts +15 -5
- package/src/exos/remote-chain-facade.d.ts.map +1 -1
- package/src/exos/remote-chain-facade.js +13 -23
- package/src/facade.js +1 -1
- package/src/fetched-chain-info.d.ts +86 -676
- package/src/fetched-chain-info.js +41 -553
- package/src/fixtures/query-flows.contract.d.ts +4 -5
- package/src/fixtures/query-flows.contract.d.ts.map +1 -1
- package/src/fixtures/query-flows.contract.js +0 -1
- package/src/orchestration-api.d.ts +16 -73
- package/src/orchestration-api.d.ts.map +1 -1
- package/src/orchestration-api.ts +19 -89
- package/src/proposals/start-send-anywhere.js +0 -4
- package/src/typeGuards.d.ts +4 -20
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +13 -52
- package/src/types.d.ts +1 -1
- package/src/types.d.ts.map +1 -1
- package/src/types.ts +1 -2
- package/src/utils/address.d.ts +3 -13
- package/src/utils/address.d.ts.map +1 -1
- package/src/utils/address.js +5 -97
- package/src/utils/chain-hub-helper.d.ts +2 -2
- package/src/utils/chain-hub-helper.d.ts.map +1 -1
- package/src/utils/chain-hub-helper.js +5 -9
- package/src/utils/cosmos.d.ts +1 -1
- package/src/utils/cosmos.d.ts.map +1 -1
- package/src/utils/cosmos.js +2 -2
- package/src/utils/orchestrationAccount.js +5 -6
- package/src/utils/registry.d.ts +12 -2
- package/src/utils/registry.d.ts.map +1 -1
- package/src/utils/registry.js +2 -4
- package/src/utils/start-helper.d.ts +6 -20
- package/src/utils/start-helper.d.ts.map +1 -1
- package/src/utils/start-helper.js +2 -13
- package/src/utils/zoe-tools.d.ts +2 -2
- package/src/utils/zoe-tools.d.ts.map +1 -1
- package/src/utils/zoe-tools.js +2 -5
- package/tools/ibc-mocks.d.ts +5 -6
- package/tools/ibc-mocks.d.ts.map +1 -1
- package/tools/ibc-mocks.ts +4 -10
- package/tools/make-test-address.d.ts +1 -2
- package/tools/make-test-address.d.ts.map +1 -1
- package/tools/make-test-address.js +2 -6
- package/src/cctp-chain-info.d.ts +0 -65
- package/src/cctp-chain-info.d.ts.map +0 -1
- package/src/cctp-chain-info.js +0 -52
- package/src/utils/chain-info.d.ts +0 -5
- package/src/utils/chain-info.d.ts.map +0 -1
- package/src/utils/chain-info.js +0 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const start: (zcf:
|
|
1
|
+
export const start: (zcf: ZCF<Record<string, unknown>>, privateArgs: {
|
|
2
2
|
agoricNames: Remote<NameHub>;
|
|
3
3
|
localchain: Remote<LocalChain>;
|
|
4
4
|
orchestrationService: Remote<CosmosInterchainService>;
|
|
@@ -7,7 +7,7 @@ export const start: (zcf: globalThis.ZCF<Record<string, unknown>>, privateArgs:
|
|
|
7
7
|
timerService: Remote<TimerService>;
|
|
8
8
|
}, baggage: import("@agoric/vat-data").Baggage) => Promise<{
|
|
9
9
|
publicFacet: import("@endo/exo").Guarded<{
|
|
10
|
-
makeUnbondAndTransferInvitation(): Promise<
|
|
10
|
+
makeUnbondAndTransferInvitation(): Promise<Invitation<import("@agoric/vow").Vow<void>, undefined>>;
|
|
11
11
|
}>;
|
|
12
12
|
}>;
|
|
13
13
|
import type { NameHub } from '@agoric/vats';
|
package/src/exos/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export function prepareChainHubAdmin(zone: Zone, chainHub: ChainHub): import("@endo/exo").Guarded<{
|
|
2
2
|
/**
|
|
3
|
-
* Register information for a
|
|
3
|
+
* Register information for a chain
|
|
4
4
|
*
|
|
5
5
|
* @param {string} chainName - must not exist in chainHub
|
|
6
|
-
* @param {
|
|
7
|
-
* @param {IBCConnectionInfo}
|
|
6
|
+
* @param {CosmosChainInfo} chainInfo
|
|
7
|
+
* @param {IBCConnectionInfo} connectionInfo - from Agoric chain
|
|
8
8
|
*/
|
|
9
|
-
registerChain(chainName: string, chainInfo:
|
|
9
|
+
registerChain(chainName: string, chainInfo: CosmosChainInfo, connectionInfo: IBCConnectionInfo): Promise<void>;
|
|
10
10
|
/**
|
|
11
11
|
* Register an asset that may be held on a chain other than the issuing
|
|
12
12
|
* chain.
|
|
@@ -19,13 +19,13 @@ export function prepareChainHubAdmin(zone: Zone, chainHub: ChainHub): import("@e
|
|
|
19
19
|
}>;
|
|
20
20
|
export type ChainHubAdmin = ReturnType<(zone: Zone, chainHub: ChainHub) => import("@endo/exo").Guarded<{
|
|
21
21
|
/**
|
|
22
|
-
* Register information for a
|
|
22
|
+
* Register information for a chain
|
|
23
23
|
*
|
|
24
24
|
* @param {string} chainName - must not exist in chainHub
|
|
25
|
-
* @param {
|
|
26
|
-
* @param {IBCConnectionInfo}
|
|
25
|
+
* @param {CosmosChainInfo} chainInfo
|
|
26
|
+
* @param {IBCConnectionInfo} connectionInfo - from Agoric chain
|
|
27
27
|
*/
|
|
28
|
-
registerChain(chainName: string, chainInfo:
|
|
28
|
+
registerChain(chainName: string, chainInfo: CosmosChainInfo, connectionInfo: IBCConnectionInfo): Promise<void>;
|
|
29
29
|
/**
|
|
30
30
|
* Register an asset that may be held on a chain other than the issuing
|
|
31
31
|
* chain.
|
|
@@ -38,7 +38,7 @@ export type ChainHubAdmin = ReturnType<(zone: Zone, chainHub: ChainHub) => impor
|
|
|
38
38
|
}>>;
|
|
39
39
|
import type { Zone } from '@agoric/zone';
|
|
40
40
|
import type { ChainHub } from './chain-hub.js';
|
|
41
|
-
import type {
|
|
41
|
+
import type { CosmosChainInfo } from '@agoric/orchestration';
|
|
42
42
|
import type { IBCConnectionInfo } from '@agoric/orchestration';
|
|
43
43
|
import type { Denom } from '@agoric/orchestration';
|
|
44
44
|
import type { DenomDetail } from './chain-hub.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain-hub-admin.d.ts","sourceRoot":"","sources":["chain-hub-admin.js"],"names":[],"mappings":"AA+BO,2CAHI,IAAI,YACJ,QAAQ;
|
|
1
|
+
{"version":3,"file":"chain-hub-admin.d.ts","sourceRoot":"","sources":["chain-hub-admin.js"],"names":[],"mappings":"AA+BO,2CAHI,IAAI,YACJ,QAAQ;IAeb;;;;;;OAMG;6BAHQ,MAAM,aACN,eAAe,kBACf,iBAAiB;IAe5B;;;;;;;OAOG;yBAHQ,KAAK,UAEL,WAAW;GAU3B;4BAEa,UAAU,QAtDb,IAAI,YACJ,QAAQ;IAeb;;;;;;OAMG;6BAHQ,MAAM,aACN,eAAe,kBACf,iBAAiB;IAe5B;;;;;;;OAOG;yBAHQ,KAAK,UAEL,WAAW;GAYkB;0BA3EvB,cAAc;8BAEG,gBAAgB;qCADI,uBAAuB;uCAAvB,uBAAuB;2BAAvB,uBAAuB;iCAC3C,gBAAgB"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/* we expect promises to
|
|
1
|
+
/* we expect promises to resolved promptly, */
|
|
2
2
|
/* eslint-disable no-restricted-syntax */
|
|
3
3
|
import { heapVowE } from '@agoric/vow/vat.js';
|
|
4
4
|
import { M } from '@endo/patterns';
|
|
5
|
-
import {
|
|
5
|
+
import { CosmosChainInfoShape, DenomDetailShape } from '../typeGuards.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @import {Zone} from '@agoric/zone';
|
|
9
|
-
* @import {CosmosChainInfo,
|
|
9
|
+
* @import {CosmosChainInfo, Denom, IBCConnectionInfo} from '@agoric/orchestration';
|
|
10
10
|
* @import {ChainHub, DenomDetail} from './chain-hub.js';
|
|
11
11
|
*/
|
|
12
12
|
|
|
@@ -34,33 +34,33 @@ export const prepareChainHubAdmin = (zone, chainHub) => {
|
|
|
34
34
|
const makeCreatorFacet = zone.exo(
|
|
35
35
|
'ChainHub Admin',
|
|
36
36
|
M.interface('ChainHub Admin', {
|
|
37
|
-
registerChain: M.callWhen(
|
|
38
|
-
.
|
|
39
|
-
|
|
37
|
+
registerChain: M.callWhen(
|
|
38
|
+
M.string(),
|
|
39
|
+
CosmosChainInfoShape,
|
|
40
|
+
ConnectionInfoShape,
|
|
41
|
+
).returns(M.undefined()),
|
|
40
42
|
registerAsset: M.call(M.string(), DenomDetailShape).returns(M.promise()),
|
|
41
43
|
}),
|
|
42
44
|
{
|
|
43
45
|
/**
|
|
44
|
-
* Register information for a
|
|
46
|
+
* Register information for a chain
|
|
45
47
|
*
|
|
46
48
|
* @param {string} chainName - must not exist in chainHub
|
|
47
|
-
* @param {
|
|
48
|
-
* @param {IBCConnectionInfo}
|
|
49
|
+
* @param {CosmosChainInfo} chainInfo
|
|
50
|
+
* @param {IBCConnectionInfo} connectionInfo - from Agoric chain
|
|
49
51
|
*/
|
|
50
|
-
async registerChain(chainName, chainInfo,
|
|
52
|
+
async registerChain(chainName, chainInfo, connectionInfo) {
|
|
51
53
|
// when() because chainHub methods return vows. If this were inside
|
|
52
54
|
// orchestrate() the membrane would wrap/unwrap automatically.
|
|
53
55
|
const agoricChainInfo = await heapVowE.when(
|
|
54
56
|
chainHub.getChainInfo('agoric'),
|
|
55
57
|
);
|
|
56
58
|
chainHub.registerChain(chainName, chainInfo);
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
);
|
|
63
|
-
}
|
|
59
|
+
chainHub.registerConnection(
|
|
60
|
+
agoricChainInfo.chainId,
|
|
61
|
+
chainInfo.chainId,
|
|
62
|
+
connectionInfo,
|
|
63
|
+
);
|
|
64
64
|
},
|
|
65
65
|
/**
|
|
66
66
|
* Register an asset that may be held on a chain other than the issuing
|
package/src/exos/chain-hub.d.ts
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
* @import {NameHub} from '@agoric/vats';
|
|
3
3
|
* @import {Vow, VowTools} from '@agoric/vow';
|
|
4
4
|
* @import {Zone} from '@agoric/zone';
|
|
5
|
-
* @import {CosmosAssetInfo, CosmosChainInfo, ForwardInfo, IBCConnectionInfo, IBCMsgTransferOptions, TransferRoute, GoDuration
|
|
6
|
-
* @import {KnownChains} from '../chain-info.js';
|
|
7
|
-
* @import {
|
|
5
|
+
* @import {CosmosAssetInfo, CosmosChainInfo, ForwardInfo, IBCConnectionInfo, IBCMsgTransferOptions, TransferRoute, GoDuration} from '../cosmos-api.js';
|
|
6
|
+
* @import {ChainInfo, KnownChains} from '../chain-info.js';
|
|
7
|
+
* @import {ChainAddress, Denom, DenomAmount} from '../orchestration-api.js';
|
|
8
8
|
* @import {Remote, TypedPattern} from '@agoric/internal';
|
|
9
|
-
* @import {Pattern} from '@endo/patterns';
|
|
10
9
|
*/
|
|
11
10
|
/** receiver address value for ibc transfers that involve PFM */
|
|
12
11
|
export const PFM_RECEIVER: "pfm";
|
|
@@ -23,13 +22,11 @@ export const CONNECTIONS_KEY: "chainConnection";
|
|
|
23
22
|
/** @deprecated use HubName.ChainAssets */
|
|
24
23
|
export const ASSETS_KEY: "chainAssets";
|
|
25
24
|
export function encodeChainId(chainId: string): string;
|
|
26
|
-
export function connectionKey(chainId1: string, chainId2: string):
|
|
27
|
-
export function normalizeConnectionInfo(primaryChainId: string, counterChainId: string, directed: IBCConnectionInfo): [
|
|
25
|
+
export function connectionKey(chainId1: string, chainId2: string): string;
|
|
26
|
+
export function normalizeConnectionInfo(primaryChainId: string, counterChainId: string, directed: IBCConnectionInfo): [string, IBCConnectionInfo];
|
|
28
27
|
/** @type {TypedPattern<TransferRoute>} */
|
|
29
28
|
export const TransferRouteShape: TypedPattern<TransferRoute>;
|
|
30
|
-
export function makeChainHub(zone: Zone, agoricNames: Remote<NameHub>, vowTools: VowTools
|
|
31
|
-
chainInfoValueShape?: Pattern;
|
|
32
|
-
}): import("@endo/exo").Guarded<{
|
|
29
|
+
export function makeChainHub(zone: Zone, agoricNames: Remote<NameHub>, vowTools: VowTools): import("@endo/exo").Guarded<{
|
|
33
30
|
/**
|
|
34
31
|
* Register a new chain. The name will override a name in well known chain
|
|
35
32
|
* names.
|
|
@@ -40,17 +37,9 @@ export function makeChainHub(zone: Zone, agoricNames: Remote<NameHub>, vowTools:
|
|
|
40
37
|
* contract `start` the call will happen again naturally.
|
|
41
38
|
*
|
|
42
39
|
* @param {string} name
|
|
43
|
-
* @param {
|
|
40
|
+
* @param {CosmosChainInfo} chainInfo
|
|
44
41
|
*/
|
|
45
|
-
registerChain(name: string, chainInfo:
|
|
46
|
-
/**
|
|
47
|
-
* Update chain info by completely replacing existing entry
|
|
48
|
-
*
|
|
49
|
-
* @param {string} chainName - Name of the chain to update
|
|
50
|
-
* @param {ChainInfo} chainInfo - New chain info
|
|
51
|
-
* @throws {Error} If chain not registered
|
|
52
|
-
*/
|
|
53
|
-
updateChain(chainName: string, chainInfo: ChainInfo): void;
|
|
42
|
+
registerChain(name: string, chainInfo: CosmosChainInfo): void;
|
|
54
43
|
/**
|
|
55
44
|
* @template {string} K
|
|
56
45
|
* @param {K} chainName
|
|
@@ -58,28 +47,11 @@ export function makeChainHub(zone: Zone, agoricNames: Remote<NameHub>, vowTools:
|
|
|
58
47
|
*/
|
|
59
48
|
getChainInfo<K extends string>(chainName: K): Vow<ActualChainInfo<K>>;
|
|
60
49
|
/**
|
|
61
|
-
* @param {CaipChainId} chainId
|
|
62
|
-
* @returns {ChainInfo}
|
|
63
|
-
*/
|
|
64
|
-
getChainInfoByChainId(chainId: CaipChainId): ChainInfo;
|
|
65
|
-
/**
|
|
66
|
-
* Register information for a Cosmos chain
|
|
67
|
-
*
|
|
68
50
|
* @param {string} primaryChainId
|
|
69
51
|
* @param {string} counterpartyChainId
|
|
70
52
|
* @param {IBCConnectionInfo} connectionInfo from primary to counterparty
|
|
71
53
|
*/
|
|
72
54
|
registerConnection(primaryChainId: string, counterpartyChainId: string, connectionInfo: IBCConnectionInfo): void;
|
|
73
|
-
/**
|
|
74
|
-
* Update connection info by completely replacing existing entry
|
|
75
|
-
*
|
|
76
|
-
* @param {string} primaryChainId - Cosmos chainId of primary chain
|
|
77
|
-
* @param {string} counterpartyChainId - Cosmos chainId of counterparty
|
|
78
|
-
* chain
|
|
79
|
-
* @param {IBCConnectionInfo} connectionInfo - New connection info
|
|
80
|
-
* @throws {Error} If connection not registered
|
|
81
|
-
*/
|
|
82
|
-
updateConnection(primaryChainId: string, counterpartyChainId: string, connectionInfo: IBCConnectionInfo): void;
|
|
83
55
|
/**
|
|
84
56
|
* @param {string | { chainId: string }} primary the primary chain
|
|
85
57
|
* @param {string | { chainId: string }} counter the counterparty chain
|
|
@@ -109,15 +81,6 @@ export function makeChainHub(zone: Zone, agoricNames: Remote<NameHub>, vowTools:
|
|
|
109
81
|
* @param {DenomDetail} detail - chainName and baseName must be registered
|
|
110
82
|
*/
|
|
111
83
|
registerAsset(denom: Denom, detail: DenomDetail): void;
|
|
112
|
-
/**
|
|
113
|
-
* Update asset info by completely replacing existing entry
|
|
114
|
-
*
|
|
115
|
-
* @param {Denom} denom - Denom on the holding chain
|
|
116
|
-
* @param {DenomDetail} detail - New asset details
|
|
117
|
-
* @throws {Error} If asset not registered or referenced chains not
|
|
118
|
-
* registered
|
|
119
|
-
*/
|
|
120
|
-
updateAsset(denom: Denom, detail: DenomDetail): void;
|
|
121
84
|
/**
|
|
122
85
|
* Retrieve holding, issuing chain names etc. for a denom.
|
|
123
86
|
*
|
|
@@ -134,23 +97,13 @@ export function makeChainHub(zone: Zone, agoricNames: Remote<NameHub>, vowTools:
|
|
|
134
97
|
*/
|
|
135
98
|
getDenom(brand: Brand): Denom | undefined;
|
|
136
99
|
/**
|
|
137
|
-
* @param {
|
|
138
|
-
*
|
|
139
|
-
* @returns {AccountId}
|
|
140
|
-
* @throws {Error} if chain info not found for bech32Prefix
|
|
141
|
-
*/
|
|
142
|
-
resolveAccountId(partialId: AccountId | Bech32Address): AccountId;
|
|
143
|
-
/**
|
|
144
|
-
* Like {@see resolveAccountId} but always returns a CosmosChainAddress.
|
|
145
|
-
*
|
|
146
|
-
* @param {AccountIdArg | Bech32Address} partialId CAIP-10 account ID or a
|
|
147
|
-
* Cosmos bech32 address
|
|
148
|
-
* @returns {CosmosChainAddress}
|
|
100
|
+
* @param {string} address bech32 address
|
|
101
|
+
* @returns {ChainAddress}
|
|
149
102
|
* @throws {Error} if chain info not found for bech32Prefix
|
|
150
103
|
*/
|
|
151
|
-
|
|
104
|
+
makeChainAddress(address: string): ChainAddress;
|
|
152
105
|
/**
|
|
153
|
-
* Determine the
|
|
106
|
+
* Determine the transfer route for a destination and amount given the
|
|
154
107
|
* current holding chain.
|
|
155
108
|
*
|
|
156
109
|
* Does not account for routes with more than 1 intermediary hop - that is,
|
|
@@ -158,14 +111,14 @@ export function makeChainHub(zone: Zone, agoricNames: Remote<NameHub>, vowTools:
|
|
|
158
111
|
*
|
|
159
112
|
* XXX consider accepting AmountArg #10449
|
|
160
113
|
*
|
|
161
|
-
* @param {
|
|
114
|
+
* @param {ChainAddress} destination
|
|
162
115
|
* @param {DenomAmount} denomAmount
|
|
163
116
|
* @param {string} srcChainName
|
|
164
117
|
* @param {IBCMsgTransferOptions['forwardOpts']} [forwardOpts]
|
|
165
118
|
* @returns {TransferRoute} single hop, multi hop
|
|
166
119
|
* @throws {Error} if unable to determine route
|
|
167
120
|
*/
|
|
168
|
-
makeTransferRoute(destination:
|
|
121
|
+
makeTransferRoute(destination: ChainAddress, denomAmount: DenomAmount, srcChainName: string, forwardOpts?: IBCMsgTransferOptions["forwardOpts"]): TransferRoute;
|
|
169
122
|
}>;
|
|
170
123
|
export function registerAssets(chainHub: ChainHub, name: string, assets: CosmosAssetInfo[]): void;
|
|
171
124
|
/**
|
|
@@ -190,7 +143,6 @@ export type DenomDetail = {
|
|
|
190
143
|
*/
|
|
191
144
|
brand?: globalThis.Brand<"nat"> | undefined;
|
|
192
145
|
};
|
|
193
|
-
export type IbcConnectionKey = `${string}${"_"}${string}`;
|
|
194
146
|
export type ChainHub = ReturnType<typeof makeChainHub>;
|
|
195
147
|
import type { IBCConnectionInfo } from '../cosmos-api.js';
|
|
196
148
|
import type { TransferRoute } from '../cosmos-api.js';
|
|
@@ -199,17 +151,13 @@ import type { Zone } from '@agoric/zone';
|
|
|
199
151
|
import type { NameHub } from '@agoric/vats';
|
|
200
152
|
import type { Remote } from '@agoric/internal';
|
|
201
153
|
import type { VowTools } from '@agoric/vow';
|
|
202
|
-
import type {
|
|
203
|
-
import type { ChainInfo } from '../orchestration-api.js';
|
|
154
|
+
import type { CosmosChainInfo } from '../cosmos-api.js';
|
|
204
155
|
import type { Vow } from '@agoric/vow';
|
|
205
|
-
import type { CaipChainId } from '../orchestration-api.js';
|
|
206
156
|
import type { Denom } from '../orchestration-api.js';
|
|
207
|
-
import type {
|
|
208
|
-
import type { Bech32Address } from '../cosmos-api.js';
|
|
209
|
-
import type { AccountIdArg } from '../orchestration-api.js';
|
|
210
|
-
import type { CosmosChainAddress } from '../orchestration-api.js';
|
|
157
|
+
import type { ChainAddress } from '../orchestration-api.js';
|
|
211
158
|
import type { DenomAmount } from '../orchestration-api.js';
|
|
212
159
|
import type { IBCMsgTransferOptions } from '../cosmos-api.js';
|
|
213
160
|
import type { CosmosAssetInfo } from '../cosmos-api.js';
|
|
214
161
|
import type { KnownChains } from '../chain-info.js';
|
|
162
|
+
import type { ChainInfo } from '../chain-info.js';
|
|
215
163
|
//# sourceMappingURL=chain-hub.d.ts.map
|
|
@@ -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":"AAmBA;;;;;;;;GAQG;AAEH,gEAAgE;AAChE,2BAAkD,KAAK,CAAE;sBAsB/C,CAAC,OAAO,OAAO,EAAE,MAAM,OAAO,OAAO,CAAC;;;;;;AAYhD,oCAAoC;AACpC,gCAAuC;AACvC,8CAA8C;AAC9C,gDAAuD;AACvD,0CAA0C;AAC1C,uCAA8C;AAgBvC,uCAHI,MAAM,UAOd;AAUI,wCAHI,MAAM,YACN,MAAM,UAOhB;AAoCM,wDALI,MAAM,kBACN,MAAM,YACN,iBAAiB,GACf,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAavC;AAwCD,0CAA0C;AAC1C,iCADW,aAAa,aAAa,CAAC,CAUpC;AAmCK,mCAJI,IAAI,eACJ,OAAO,OAAO,CAAC,YACf,QAAQ;IA2Hf;;;;;;;;;;;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;IAmBtB;;;;;;OAMG;oBAHQ,KAAK,gBACL,MAAM,GACJ,WAAW,GAAG,SAAS;IASpC;;;;;OAKG;oBAFQ,KAAK,GACH,KAAK,GAAG,SAAS;IAQ9B;;;;OAIG;8BAHQ,MAAM,GACJ,YAAY;IAgBzB;;;;;;;;;;;;;;;OAeG;mCANQ,YAAY,eACZ,WAAW,gBACX,MAAM,gBACN,qBAAqB,CAAC,aAAa,CAAC,GAClC,aAAa;GAmG7B;AAUM,yCAJI,QAAQ,QACR,MAAM,UACN,eAAe,EAAE,QAe3B;;;;4BAjmBqB,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;;;;;;uBAgkBN,UAAU,CAAC,OAAO,YAAY,CAAC;uCAvlBwF,kBAAkB;mCAAlB,kBAAkB;kCAGhH,kBAAkB;0BAJlC,cAAc;6BAFX,cAAc;4BAMD,kBAAkB;8BALzB,aAAa;qCAEwF,kBAAkB;yBAFvH,aAAa;2BAIM,yBAAyB;kCAAzB,yBAAyB;iCAAzB,yBAAyB;2CAFyD,kBAAkB;qCAAlB,kBAAkB;iCAC9G,kBAAkB;+BAAlB,kBAAkB"}
|