@agoric/orchestration 0.2.0 → 0.2.1-upgrade-23-dev-bd79330.0.bd79330
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.js +0 -4
- package/package.json +27 -27
- package/src/axelar-types.d.ts +2 -0
- package/src/axelar-types.d.ts.map +1 -1
- package/src/axelar-types.js +2 -0
- package/src/cctp-chain-info.js +4 -1
- package/src/chain-info.d.ts +21 -6
- package/src/chain-info.d.ts.map +1 -1
- package/src/chain-info.js +9 -8
- package/src/cosmos-api.d.ts +102 -29
- package/src/cosmos-api.d.ts.map +1 -1
- package/src/cosmos-api.js +585 -0
- package/src/{ethereum-api.ts → ethereum-api.js} +1 -1
- package/src/examples/auto-stake-it-tap-kit.d.ts +4 -3
- package/src/examples/auto-stake-it-tap-kit.d.ts.map +1 -1
- package/src/examples/auto-stake-it-tap-kit.js +3 -4
- package/src/examples/auto-stake-it.contract.d.ts +6 -4
- package/src/examples/auto-stake-it.contract.d.ts.map +1 -1
- package/src/examples/auto-stake-it.contract.js +3 -1
- package/src/examples/auto-stake-it.flows.d.ts +2 -1
- package/src/examples/auto-stake-it.flows.d.ts.map +1 -1
- package/src/examples/auto-stake-it.flows.js +1 -0
- package/src/examples/axelar-gmp-account-kit.d.ts +6 -4
- package/src/examples/axelar-gmp-account-kit.d.ts.map +1 -1
- package/src/examples/axelar-gmp-account-kit.js +4 -2
- package/src/examples/axelar-gmp.contract.d.ts +8 -8
- package/src/examples/axelar-gmp.contract.d.ts.map +1 -1
- package/src/examples/axelar-gmp.contract.js +2 -2
- package/src/examples/axelar-gmp.flows.d.ts +1 -1
- package/src/examples/basic-flows.contract.d.ts +7 -5
- package/src/examples/basic-flows.contract.d.ts.map +1 -1
- package/src/examples/basic-flows.contract.js +3 -1
- package/src/examples/basic-flows.flows.d.ts +2 -1
- package/src/examples/basic-flows.flows.d.ts.map +1 -1
- package/src/examples/basic-flows.flows.js +1 -0
- package/src/examples/send-anywhere.contract.d.ts +12 -6
- package/src/examples/send-anywhere.contract.d.ts.map +1 -1
- package/src/examples/send-anywhere.contract.js +4 -1
- package/src/examples/send-anywhere.flows.d.ts +3 -2
- package/src/examples/send-anywhere.flows.d.ts.map +1 -1
- package/src/examples/send-anywhere.flows.js +3 -6
- package/src/examples/stake-bld.contract.d.ts +206 -25
- package/src/examples/stake-bld.contract.d.ts.map +1 -1
- package/src/examples/stake-bld.contract.js +19 -4
- package/src/examples/stake-ica.contract.d.ts +434 -71
- package/src/examples/stake-ica.contract.d.ts.map +1 -1
- package/src/examples/stake-ica.contract.js +28 -6
- package/src/examples/staking-combinations.contract.d.ts +4 -2
- package/src/examples/staking-combinations.contract.d.ts.map +1 -1
- package/src/examples/staking-combinations.contract.js +5 -3
- package/src/examples/staking-combinations.flows.d.ts +3 -2
- package/src/examples/staking-combinations.flows.d.ts.map +1 -1
- package/src/examples/staking-combinations.flows.js +7 -6
- package/src/examples/swap-anything.contract.d.ts +14 -7
- package/src/examples/swap-anything.contract.d.ts.map +1 -1
- package/src/examples/swap-anything.contract.js +12 -8
- package/src/examples/swap.contract.d.ts +18 -6
- package/src/examples/swap.contract.d.ts.map +1 -1
- package/src/examples/swap.contract.js +9 -3
- package/src/examples/swap.flows.d.ts +2 -0
- package/src/examples/swap.flows.d.ts.map +1 -1
- package/src/examples/swap.flows.js +2 -0
- package/src/examples/unbond.contract.d.ts +7 -4
- package/src/examples/unbond.contract.d.ts.map +1 -1
- package/src/examples/unbond.contract.js +6 -3
- package/src/exos/chain-hub-admin.d.ts +1 -19
- package/src/exos/chain-hub-admin.d.ts.map +1 -1
- package/src/exos/chain-hub-admin.js +1 -1
- package/src/exos/chain-hub.d.ts +4 -2
- package/src/exos/chain-hub.d.ts.map +1 -1
- package/src/exos/chain-hub.js +2 -1
- package/src/exos/combine-invitation-makers.d.ts +2 -1
- package/src/exos/combine-invitation-makers.d.ts.map +1 -1
- package/src/exos/combine-invitation-makers.js +2 -1
- package/src/exos/cosmos-orchestration-account.d.ts +615 -98
- package/src/exos/cosmos-orchestration-account.d.ts.map +1 -1
- package/src/exos/cosmos-orchestration-account.js +695 -306
- package/src/exos/exo-interfaces.js +35 -0
- package/src/exos/ibc-packet.d.ts +11 -9
- package/src/exos/ibc-packet.d.ts.map +1 -1
- package/src/exos/ibc-packet.js +33 -8
- package/src/exos/ica-account-kit.d.ts +4 -9
- package/src/exos/ica-account-kit.d.ts.map +1 -1
- package/src/exos/ica-account-kit.js +10 -7
- package/src/exos/icq-connection-kit.d.ts +1 -1
- package/src/exos/local-chain-facade.d.ts +1542 -5
- package/src/exos/local-chain-facade.d.ts.map +1 -1
- package/src/exos/local-chain-facade.js +4 -2
- package/src/exos/local-orchestration-account.d.ts +201 -56
- package/src/exos/local-orchestration-account.d.ts.map +1 -1
- package/src/exos/local-orchestration-account.js +260 -51
- package/src/exos/orchestrator.d.ts +35813 -73
- package/src/exos/orchestrator.d.ts.map +1 -1
- package/src/exos/orchestrator.js +7 -10
- package/src/exos/packet-tools.d.ts +19 -8
- package/src/exos/packet-tools.d.ts.map +1 -1
- package/src/exos/packet-tools.js +92 -9
- package/src/exos/portfolio-holder-kit.d.ts +90 -2
- package/src/exos/portfolio-holder-kit.d.ts.map +1 -1
- package/src/exos/remote-chain-facade.d.ts +1499 -1
- package/src/exos/remote-chain-facade.d.ts.map +1 -1
- package/src/exos/remote-chain-facade.js +8 -3
- package/src/facade.d.ts +1 -0
- package/src/facade.d.ts.map +1 -1
- package/src/facade.js +4 -6
- package/src/fixtures/query-flows.contract.d.ts +8 -6
- package/src/fixtures/query-flows.contract.d.ts.map +1 -1
- package/src/fixtures/query-flows.contract.js +3 -1
- package/src/fixtures/query-flows.flows.d.ts +1 -0
- package/src/fixtures/query-flows.flows.d.ts.map +1 -1
- package/src/fixtures/query-flows.flows.js +1 -0
- package/src/orchestration-api.d.ts +46 -16
- package/src/orchestration-api.d.ts.map +1 -1
- package/src/orchestration-api.js +410 -0
- package/src/proposals/init-chain-info.js +10 -2
- package/src/proposals/orchestration-proposal.js +3 -0
- package/src/proposals/revise-chain-info.js +4 -1
- package/src/proposals/start-auto-stake-it.js +1 -0
- package/src/proposals/start-axelar-gmp.js +2 -2
- package/src/proposals/start-basic-flows.js +5 -0
- package/src/proposals/start-send-anywhere.js +4 -2
- package/src/proposals/start-stakeAtom.js +5 -4
- package/src/proposals/start-stakeBld.js +8 -6
- package/src/proposals/start-stakeOsmo.js +5 -4
- package/src/proposals/start-swap-anything.js +4 -2
- package/src/stubs/{viem-abi.d.ts → viem-typedData.js} +10 -4
- package/src/typeGuards.d.ts +38 -5
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +92 -22
- package/src/types.d.ts +1 -0
- package/src/types.d.ts.map +1 -1
- package/src/types.js +27 -0
- package/src/utils/abitype.d.ts +6 -0
- package/src/utils/abitype.d.ts.map +1 -0
- package/src/utils/abitype.js +13 -0
- package/src/utils/address.d.ts +3 -1
- package/src/utils/address.d.ts.map +1 -1
- package/src/utils/address.js +24 -2
- package/src/utils/agd-lib.d.ts +1 -51
- package/src/utils/agd-lib.d.ts.map +1 -1
- package/src/utils/agd-lib.js +1 -1
- package/src/utils/amounts.d.ts +1 -0
- package/src/utils/amounts.d.ts.map +1 -1
- package/src/utils/amounts.js +1 -0
- package/src/utils/asset.d.ts +1 -0
- package/src/utils/asset.d.ts.map +1 -1
- package/src/utils/asset.js +1 -0
- package/src/utils/chain-hub-helper.d.ts +1 -0
- package/src/utils/chain-hub-helper.d.ts.map +1 -1
- package/src/utils/chain-hub-helper.js +1 -0
- package/src/utils/codecs.d.ts +145 -0
- package/src/utils/codecs.d.ts.map +1 -0
- package/src/utils/codecs.js +206 -0
- package/src/utils/cosmos.d.ts +5 -4
- package/src/utils/cosmos.d.ts.map +1 -1
- package/src/utils/cosmos.js +29 -9
- package/src/utils/exo-helpers.d.ts +156 -0
- package/src/utils/exo-helpers.d.ts.map +1 -0
- package/src/utils/exo-helpers.js +241 -0
- package/src/utils/gmp.d.ts +2 -2
- package/src/utils/gmp.d.ts.map +1 -1
- package/src/utils/gmp.js +31 -15
- package/src/utils/orchestrationAccount.d.ts +79 -0
- package/src/utils/orchestrationAccount.d.ts.map +1 -1
- package/src/utils/orchestrationAccount.js +210 -6
- package/src/utils/packet.d.ts.map +1 -1
- package/src/utils/packet.js +5 -0
- package/src/utils/permit2/signatureTransfer.d.ts +221 -0
- package/src/utils/permit2/signatureTransfer.d.ts.map +1 -0
- package/src/utils/permit2/signatureTransfer.js +265 -0
- package/src/utils/permit2/signatureTransferHelpers.d.ts +334 -0
- package/src/utils/permit2/signatureTransferHelpers.d.ts.map +1 -0
- package/src/utils/permit2/signatureTransferHelpers.js +270 -0
- package/src/utils/permit2.d.ts +11 -0
- package/src/utils/permit2.d.ts.map +1 -0
- package/src/utils/permit2.js +11 -0
- package/src/utils/progress.d.ts +41 -0
- package/src/utils/progress.d.ts.map +1 -0
- package/src/utils/progress.js +180 -0
- package/src/utils/start-helper.d.ts +28 -10
- package/src/utils/start-helper.d.ts.map +1 -1
- package/src/utils/start-helper.js +30 -7
- package/src/utils/time.d.ts +2 -2
- package/src/utils/time.d.ts.map +1 -1
- package/src/utils/time.js +1 -1
- package/src/utils/viem-utils/hashTypedData.d.ts +21 -0
- package/src/utils/viem-utils/hashTypedData.d.ts.map +1 -0
- package/src/utils/viem-utils/hashTypedData.js +61 -0
- package/src/utils/viem-utils/types.d.ts +6 -0
- package/src/utils/viem-utils/types.d.ts.map +1 -0
- package/src/utils/viem-utils/types.js +18 -0
- package/src/utils/viem.d.ts +11 -0
- package/src/utils/viem.d.ts.map +1 -0
- package/src/utils/viem.js +11 -0
- package/src/utils/zcf-tools.d.ts +15 -1
- package/src/utils/zcf-tools.d.ts.map +1 -1
- package/src/utils/zcf-tools.js +19 -3
- package/src/utils/zoe-tools.d.ts +5 -2
- package/src/utils/zoe-tools.d.ts.map +1 -1
- package/src/utils/zoe-tools.js +8 -2
- package/src/vat-orchestration.d.ts +5 -3
- package/src/vat-orchestration.d.ts.map +1 -1
- package/src/vat-orchestration.js +4 -3
- package/src/vendor/viem/{_esm-YOAV66U4.js → _esm-OKAICHVC.js} +2 -2
- package/src/vendor/viem/{ccip-AAQDZF3N.js → ccip-34BSSMV5.js} +1 -2
- package/src/vendor/viem/{chunk-4EF4K2MH.js → chunk-GCI53Z2G.js} +35 -1
- package/src/vendor/viem/chunk-ZKSIP2AM.js +326 -0
- package/src/vendor/viem/viem-abi.js +2 -2
- package/src/vendor/viem/viem-typedData.d.ts +19 -0
- package/src/vendor/viem/viem-typedData.js +59 -0
- package/tools/contract-tests.d.ts +34 -19
- package/tools/contract-tests.d.ts.map +1 -1
- package/tools/contract-tests.ts +15 -3
- package/tools/ibc-mock-fixtures.d.ts +49 -0
- package/tools/ibc-mock-fixtures.d.ts.map +1 -0
- package/tools/ibc-mock-fixtures.ts +161 -0
- package/tools/ibc-mocks.d.ts +2 -3
- package/tools/ibc-mocks.d.ts.map +1 -1
- package/tools/ibc-mocks.ts +2 -1
- package/tools/make-test-address.d.ts +1 -1
- package/tools/make-test-address.d.ts.map +1 -1
- package/tools/make-test-address.js +1 -2
- package/tools/network-fakes.d.ts +142 -0
- package/tools/network-fakes.d.ts.map +1 -0
- package/tools/network-fakes.ts +388 -0
- package/tsup.config.ts +3 -1
- package/src/cosmos-api.ts +0 -469
- package/src/exos/exo-interfaces.ts +0 -35
- package/src/orchestration-api.ts +0 -365
- package/src/stubs/viem-abi.d.ts.map +0 -1
- package/src/types.ts +0 -26
- package/src/vendor/viem/chunk-XN4LUOIH.js +0 -253
- package/src/vendor/viem/secp256k1-WHBDSQB2.js +0 -1914
- /package/src/stubs/{viem-abi.ts → viem-abi.js} +0 -0
package/src/typeGuards.d.ts
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @import {TypedPattern} from '@agoric/internal';
|
|
3
|
-
* @import {CosmosAssetInfo, CosmosChainInfo, DenomAmount,
|
|
3
|
+
* @import {CosmosAssetInfo, CosmosChainInfo, DenomAmount,
|
|
4
|
+
* DenomInfo, AmountArg, CosmosValidatorAddress, CosmosActionOptions,
|
|
5
|
+
* OrchestrationPowers, ForwardInfo, IBCMsgTransferOptions,
|
|
6
|
+
* AccountIdArg, BaseChainInfo, ChainInfo, Caip10Record,
|
|
7
|
+
* LegacyExecuteEncodedTxOptions, CosmosQuerierOptions,
|
|
8
|
+
* PacketOptions, OrchestrationOptions} from './types.js';
|
|
4
9
|
* @import {Any as Proto3Msg} from '@agoric/cosmic-proto/google/protobuf/any.js';
|
|
5
10
|
* @import {TxBody} from '@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js';
|
|
6
11
|
* @import {Coin} from '@agoric/cosmic-proto/cosmos/base/v1beta1/coin.js';
|
|
7
12
|
* @import {TypedJson} from '@agoric/cosmic-proto';
|
|
8
13
|
* @import {DenomDetail} from './exos/chain-hub.js';
|
|
14
|
+
* @import {Amount} from '@agoric/ertp';
|
|
9
15
|
*/
|
|
10
16
|
/**
|
|
11
17
|
* Used for IBC Channel Connections that only send outgoing transactions. If
|
|
@@ -75,6 +81,10 @@ export const DelegationShape: TypedPattern<{
|
|
|
75
81
|
export const ICQMsgShape: import("@endo/patterns").Matcher;
|
|
76
82
|
/** @type {TypedPattern<TypedJson>} */
|
|
77
83
|
export const TypedJsonShape: TypedPattern<TypedJson>;
|
|
84
|
+
/** @type {TypedPattern<OrchestrationOptions>} */
|
|
85
|
+
export const OrchestrationOptionsShape: TypedPattern<OrchestrationOptions>;
|
|
86
|
+
/** @type {TypedPattern<PacketOptions>} */
|
|
87
|
+
export const PacketOptionsShape: TypedPattern<PacketOptions>;
|
|
78
88
|
export namespace chainFacadeMethods {
|
|
79
89
|
let getChainInfo: import("@endo/patterns").MethodGuard;
|
|
80
90
|
let makeAccount: import("@endo/patterns").MethodGuard;
|
|
@@ -86,9 +96,25 @@ export namespace TimestampProtoShape {
|
|
|
86
96
|
/**
|
|
87
97
|
* see {@link TxBody} for more details
|
|
88
98
|
*
|
|
89
|
-
* @
|
|
99
|
+
* @type {TypedPattern<NonNullable<CosmosActionOptions['txOpts']>>}
|
|
100
|
+
*/
|
|
101
|
+
export const CosmosTxOptionsShape: TypedPattern<NonNullable<CosmosActionOptions["txOpts"]>>;
|
|
102
|
+
/** @type {TypedPattern<CosmosActionOptions>} */
|
|
103
|
+
export const CosmosActionOptionsShape: TypedPattern<CosmosActionOptions>;
|
|
104
|
+
/** @type {TypedPattern<LegacyExecuteEncodedTxOptions>} */
|
|
105
|
+
export const LegacyExecuteEncodedTxOptionsShape: TypedPattern<LegacyExecuteEncodedTxOptions>;
|
|
106
|
+
/** @type {TypedPattern<NonNullable<CosmosQuerierOptions['queryOpts']>>} */
|
|
107
|
+
export const RequestQueryOptionsShape: TypedPattern<NonNullable<CosmosQuerierOptions["queryOpts"]>>;
|
|
108
|
+
/** @type {TypedPattern<CosmosQuerierOptions>} */
|
|
109
|
+
export const CosmosQuerierOptionsShape: TypedPattern<CosmosQuerierOptions>;
|
|
110
|
+
/**
|
|
111
|
+
* @deprecated use {@link LegacyExecuteEncodedTxOptionsShape} instead
|
|
90
112
|
*/
|
|
91
|
-
export const ExecuteICATxOptsShape: import("@endo/
|
|
113
|
+
export const ExecuteICATxOptsShape: (import("@endo/pass-style").CopyRecordInterface<import("@endo/pass-style").PassableCap, Error> & {
|
|
114
|
+
"Symbol(validatedType)"?: (Partial<Omit<TxBody, "messages">> & Omit<CosmosActionOptions, "txOpts">) | undefined;
|
|
115
|
+
}) | (import("@endo/pass-style").CopyTaggedInterface<import("@endo/pass-style").PassableCap, Error> & {
|
|
116
|
+
"Symbol(validatedType)"?: (Partial<Omit<TxBody, "messages">> & Omit<CosmosActionOptions, "txOpts">) | undefined;
|
|
117
|
+
});
|
|
92
118
|
/**
|
|
93
119
|
* Ensures at least one {@link AmountKeywordRecord} entry is present and only
|
|
94
120
|
* permits Nat (fungible) amounts.
|
|
@@ -101,9 +127,9 @@ export const ForwardInfoShape: TypedPattern<ForwardInfo>;
|
|
|
101
127
|
/**
|
|
102
128
|
* Caller configurable values of {@link ForwardInfo}
|
|
103
129
|
*
|
|
104
|
-
* @type {TypedPattern<IBCMsgTransferOptions['forwardOpts']
|
|
130
|
+
* @type {TypedPattern<NonNullable<IBCMsgTransferOptions['forwardOpts']>>}
|
|
105
131
|
*/
|
|
106
|
-
export const ForwardOptsShape: TypedPattern<IBCMsgTransferOptions["forwardOpts"]
|
|
132
|
+
export const ForwardOptsShape: TypedPattern<NonNullable<IBCMsgTransferOptions["forwardOpts"]>>;
|
|
107
133
|
/**
|
|
108
134
|
* @type {TypedPattern<IBCMsgTransferOptions>}
|
|
109
135
|
* @internal
|
|
@@ -121,9 +147,16 @@ import type { Coin } from '@agoric/cosmic-proto/cosmos/base/v1beta1/coin.js';
|
|
|
121
147
|
import type { DenomInfo } from './types.js';
|
|
122
148
|
import type { DenomDetail } from './exos/chain-hub.js';
|
|
123
149
|
import type { DenomAmount } from './types.js';
|
|
150
|
+
import type { Amount } from '@agoric/ertp';
|
|
124
151
|
import type { AmountArg } from './types.js';
|
|
125
152
|
import type { CosmosValidatorAddress } from './types.js';
|
|
126
153
|
import type { TypedJson } from '@agoric/cosmic-proto';
|
|
154
|
+
import type { OrchestrationOptions } from './types.js';
|
|
155
|
+
import type { PacketOptions } from './types.js';
|
|
156
|
+
import type { CosmosActionOptions } from './types.js';
|
|
157
|
+
import type { LegacyExecuteEncodedTxOptions } from './types.js';
|
|
158
|
+
import type { CosmosQuerierOptions } from './types.js';
|
|
159
|
+
import type { TxBody } from '@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js';
|
|
127
160
|
import type { OrchestrationPowers } from './types.js';
|
|
128
161
|
import type { ForwardInfo } from './types.js';
|
|
129
162
|
import type { IBCMsgTransferOptions } from './types.js';
|
package/src/typeGuards.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAKA
|
|
1
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osAssetInfo, CosmosChainInfo, DenomAmount,
|
|
8
|
+
* @import {CosmosAssetInfo, CosmosChainInfo, DenomAmount,
|
|
9
|
+
* DenomInfo, AmountArg, CosmosValidatorAddress, CosmosActionOptions,
|
|
10
|
+
* OrchestrationPowers, ForwardInfo, IBCMsgTransferOptions,
|
|
11
|
+
* AccountIdArg, BaseChainInfo, ChainInfo, Caip10Record,
|
|
12
|
+
* LegacyExecuteEncodedTxOptions, CosmosQuerierOptions,
|
|
13
|
+
* PacketOptions, OrchestrationOptions} from './types.js';
|
|
9
14
|
* @import {Any as Proto3Msg} from '@agoric/cosmic-proto/google/protobuf/any.js';
|
|
10
15
|
* @import {TxBody} from '@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js';
|
|
11
16
|
* @import {Coin} from '@agoric/cosmic-proto/cosmos/base/v1beta1/coin.js';
|
|
12
17
|
* @import {TypedJson} from '@agoric/cosmic-proto';
|
|
13
18
|
* @import {DenomDetail} from './exos/chain-hub.js';
|
|
19
|
+
* @import {Amount} from '@agoric/ertp';
|
|
14
20
|
*/
|
|
15
21
|
|
|
16
22
|
/**
|
|
@@ -201,10 +207,29 @@ export const ICQMsgShape = M.splitRecord(
|
|
|
201
207
|
/** @type {TypedPattern<TypedJson>} */
|
|
202
208
|
export const TypedJsonShape = M.splitRecord({ '@type': M.string() });
|
|
203
209
|
|
|
210
|
+
/** @type {TypedPattern<OrchestrationOptions>} */
|
|
211
|
+
export const OrchestrationOptionsShape = M.splitRecord(
|
|
212
|
+
{},
|
|
213
|
+
{
|
|
214
|
+
progressTracker: M.remotable('ProgressTracker'),
|
|
215
|
+
},
|
|
216
|
+
);
|
|
217
|
+
|
|
218
|
+
/** @type {TypedPattern<PacketOptions>} */
|
|
219
|
+
export const PacketOptionsShape = M.and(
|
|
220
|
+
OrchestrationOptionsShape,
|
|
221
|
+
M.splitRecord(
|
|
222
|
+
{},
|
|
223
|
+
{
|
|
224
|
+
sendOpts: SendOptionsShape,
|
|
225
|
+
},
|
|
226
|
+
),
|
|
227
|
+
);
|
|
228
|
+
|
|
204
229
|
/** @see {Chain} */
|
|
205
230
|
export const chainFacadeMethods = {
|
|
206
231
|
getChainInfo: M.call().returns(VowShape),
|
|
207
|
-
makeAccount: M.call().returns(VowShape),
|
|
232
|
+
makeAccount: M.call().optional(OrchestrationOptionsShape).returns(VowShape),
|
|
208
233
|
};
|
|
209
234
|
harden(chainFacadeMethods);
|
|
210
235
|
|
|
@@ -221,19 +246,61 @@ harden(TimestampProtoShape);
|
|
|
221
246
|
/**
|
|
222
247
|
* see {@link TxBody} for more details
|
|
223
248
|
*
|
|
224
|
-
* @
|
|
249
|
+
* @type {TypedPattern<NonNullable<CosmosActionOptions['txOpts']>>}
|
|
225
250
|
*/
|
|
226
|
-
export const
|
|
251
|
+
export const CosmosTxOptionsShape = M.splitRecord(
|
|
227
252
|
{},
|
|
228
253
|
{
|
|
229
254
|
memo: M.string(),
|
|
230
255
|
timeoutHeight: M.bigint(),
|
|
231
256
|
extensionOptions: M.arrayOf(M.any()),
|
|
232
257
|
nonCriticalExtensionOptions: M.arrayOf(M.any()),
|
|
233
|
-
sendOpts: SendOptionsShape,
|
|
234
258
|
},
|
|
235
259
|
);
|
|
236
260
|
|
|
261
|
+
/** @type {TypedPattern<CosmosActionOptions>} */
|
|
262
|
+
export const CosmosActionOptionsShape = M.and(
|
|
263
|
+
PacketOptionsShape,
|
|
264
|
+
M.splitRecord(
|
|
265
|
+
{},
|
|
266
|
+
{
|
|
267
|
+
txOpts: CosmosTxOptionsShape,
|
|
268
|
+
},
|
|
269
|
+
),
|
|
270
|
+
);
|
|
271
|
+
|
|
272
|
+
/** @type {TypedPattern<LegacyExecuteEncodedTxOptions>} */
|
|
273
|
+
export const LegacyExecuteEncodedTxOptionsShape = M.and(
|
|
274
|
+
CosmosActionOptionsShape,
|
|
275
|
+
// XXX this tolerates top-level txOpts for backward compatibility
|
|
276
|
+
CosmosTxOptionsShape,
|
|
277
|
+
);
|
|
278
|
+
|
|
279
|
+
/** @type {TypedPattern<NonNullable<CosmosQuerierOptions['queryOpts']>>} */
|
|
280
|
+
export const RequestQueryOptionsShape = M.splitRecord(
|
|
281
|
+
{},
|
|
282
|
+
{
|
|
283
|
+
height: M.bigint(),
|
|
284
|
+
prove: M.boolean(),
|
|
285
|
+
},
|
|
286
|
+
);
|
|
287
|
+
|
|
288
|
+
/** @type {TypedPattern<CosmosQuerierOptions>} */
|
|
289
|
+
export const CosmosQuerierOptionsShape = M.and(
|
|
290
|
+
PacketOptionsShape,
|
|
291
|
+
M.splitRecord(
|
|
292
|
+
{},
|
|
293
|
+
{
|
|
294
|
+
queryOpts: RequestQueryOptionsShape,
|
|
295
|
+
},
|
|
296
|
+
),
|
|
297
|
+
);
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* @deprecated use {@link LegacyExecuteEncodedTxOptionsShape} instead
|
|
301
|
+
*/
|
|
302
|
+
export const ExecuteICATxOptsShape = LegacyExecuteEncodedTxOptionsShape;
|
|
303
|
+
|
|
237
304
|
/**
|
|
238
305
|
* Ensures at least one {@link AmountKeywordRecord} entry is present and only
|
|
239
306
|
* permits Nat (fungible) amounts.
|
|
@@ -245,11 +312,11 @@ export const AnyNatAmountsRecord = M.and(
|
|
|
245
312
|
|
|
246
313
|
/** @type {TypedPattern<OrchestrationPowers>} */
|
|
247
314
|
export const OrchestrationPowersShape = {
|
|
248
|
-
agoricNames: M.remotable(),
|
|
249
|
-
localchain: M.remotable(),
|
|
250
|
-
orchestrationService: M.remotable(),
|
|
251
|
-
storageNode: M.remotable(),
|
|
252
|
-
timerService: M.remotable(),
|
|
315
|
+
agoricNames: M.remotable('AgoricNames'),
|
|
316
|
+
localchain: M.remotable('Localchain'),
|
|
317
|
+
orchestrationService: M.remotable('OrchestrationService'),
|
|
318
|
+
storageNode: M.remotable('StorageNode'),
|
|
319
|
+
timerService: M.remotable('TimerService'),
|
|
253
320
|
};
|
|
254
321
|
harden(OrchestrationPowersShape);
|
|
255
322
|
|
|
@@ -279,7 +346,7 @@ harden(ForwardInfoShape);
|
|
|
279
346
|
/**
|
|
280
347
|
* Caller configurable values of {@link ForwardInfo}
|
|
281
348
|
*
|
|
282
|
-
* @type {TypedPattern<IBCMsgTransferOptions['forwardOpts']
|
|
349
|
+
* @type {TypedPattern<NonNullable<IBCMsgTransferOptions['forwardOpts']>>}
|
|
283
350
|
*/
|
|
284
351
|
export const ForwardOptsShape = M.splitRecord(
|
|
285
352
|
{},
|
|
@@ -295,16 +362,19 @@ export const ForwardOptsShape = M.splitRecord(
|
|
|
295
362
|
* @type {TypedPattern<IBCMsgTransferOptions>}
|
|
296
363
|
* @internal
|
|
297
364
|
*/
|
|
298
|
-
export const IBCTransferOptionsShape = M.
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
365
|
+
export const IBCTransferOptionsShape = M.and(
|
|
366
|
+
M.splitRecord(
|
|
367
|
+
{},
|
|
368
|
+
{
|
|
369
|
+
timeoutTimestamp: M.bigint(),
|
|
370
|
+
timeoutHeight: {
|
|
371
|
+
revisionHeight: M.bigint(),
|
|
372
|
+
revisionNumber: M.bigint(),
|
|
373
|
+
},
|
|
374
|
+
timeoutRelativeSeconds: M.bigint(),
|
|
375
|
+
memo: M.string(),
|
|
376
|
+
forwardOpts: ForwardOptsShape,
|
|
305
377
|
},
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
forwardOpts: ForwardOptsShape,
|
|
309
|
-
},
|
|
378
|
+
),
|
|
379
|
+
CosmosActionOptionsShape,
|
|
310
380
|
);
|
package/src/types.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export type * from './exos/portfolio-holder-kit.js';
|
|
|
13
13
|
export type * from './orchestration-api.js';
|
|
14
14
|
export type * from './vat-orchestration.js';
|
|
15
15
|
export type * from './utils/start-helper.js';
|
|
16
|
+
export type * from './utils/progress.js';
|
|
16
17
|
/**
|
|
17
18
|
* ({@link ZCF})-like tools for use in {@link OrchestrationFlow}s.
|
|
18
19
|
*/
|
package/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAEhG,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAEvC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,qBAAqB,CAAC;AACzC,mBAAmB,qCAAqC,CAAC;AACzD,mBAAmB,qCAAqC,CAAC;AACzD,mBAAmB,0BAA0B,CAAC;AAC9C,mBAAmB,2BAA2B,CAAC;AAC/C,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,gCAAgC,CAAC;AACpD,mBAAmB,wBAAwB,CAAC;AAC5C,mBAAmB,wBAAwB,CAAC;AAC5C,mBAAmB,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAEhG,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAEvC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,qBAAqB,CAAC;AACzC,mBAAmB,qCAAqC,CAAC;AACzD,mBAAmB,qCAAqC,CAAC;AACzD,mBAAmB,0BAA0B,CAAC;AAC9C,mBAAmB,2BAA2B,CAAC;AAC/C,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,gCAAgC,CAAC;AACpD,mBAAmB,wBAAwB,CAAC;AAC5C,mBAAmB,wBAAwB,CAAC;AAC5C,mBAAmB,yBAAyB,CAAC;AAC7C,mBAAmB,qBAAqB,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,mBAAmB,EAAE,GAAG,CAAC,qBAAqB,CAAC,CAAC;IAChD,eAAe,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACxC,cAAc,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CACvC"}
|
package/src/types.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** @file Rollup of all type definitions in the package, for local import and external export */
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* ({@link ZCF})-like tools for use in {@link OrchestrationFlow}s.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { TypedDataType, TypedData } from 'abitype';
|
|
2
|
+
export type TypedDataParameter<TN extends string = string, TT extends string = TypedDataType | keyof TypedData | `${keyof TypedData}[${string | ''}]`> = {
|
|
3
|
+
name: TN;
|
|
4
|
+
type: TT;
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=abitype.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abitype.d.ts","sourceRoot":"","sources":["abitype.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGxD,MAAM,MAAM,kBAAkB,CAC5B,EAAE,SAAS,MAAM,GAAG,MAAM,EAC1B,EAAE,SAAS,MAAM,GACb,aAAa,GACb,MAAM,SAAS,GACf,GAAG,MAAM,SAAS,IAAI,MAAM,GAAG,EAAE,GAAG,IACtC;IACF,IAAI,EAAE,EAAE,CAAC;IACT,IAAI,EAAE,EAAE,CAAC;CACV,CAAC"}
|
package/src/utils/address.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export const DEFAULT_ICQ_VERSION: "icq-1";
|
|
|
3
3
|
export function makeICQChannelAddress(controllerConnectionId: IBCConnectionID, version?: string): RemoteIbcAddress;
|
|
4
4
|
export function findAddressField(remoteAddressString: RemoteIbcAddress): CosmosChainAddress["value"] | undefined;
|
|
5
5
|
export function getBech32Prefix(address: Bech32Address | string): string;
|
|
6
|
+
export function sameEvmAddress(a: EvmAddress, b: EvmAddress | undefined): boolean;
|
|
6
7
|
export function coerceAccountId(idArg: AccountIdArg): AccountId;
|
|
7
8
|
export function parseAccountIdArg(idArg: AccountIdArg): Caip10Record;
|
|
8
9
|
export function parseAccountId(accountId: AccountId): Caip10Record;
|
|
@@ -21,7 +22,7 @@ export type ICAChannelAddressOpts = {
|
|
|
21
22
|
* channel ordering.
|
|
22
23
|
* currently only `ordered` is supported for ics27-1
|
|
23
24
|
*/
|
|
24
|
-
ordering?: "
|
|
25
|
+
ordering?: "unordered" | "ordered" | undefined;
|
|
25
26
|
/**
|
|
26
27
|
* default is `sdk_multi_msg`
|
|
27
28
|
*/
|
|
@@ -35,6 +36,7 @@ import type { IBCConnectionID } from '@agoric/vats';
|
|
|
35
36
|
import type { RemoteIbcAddress } from '@agoric/vats/tools/ibc-utils.js';
|
|
36
37
|
import type { CosmosChainAddress } from '../types.js';
|
|
37
38
|
import type { Bech32Address } from '../types.js';
|
|
39
|
+
import type { Address as EvmAddress } from 'viem';
|
|
38
40
|
import type { AccountIdArg } from '../orchestration-api.js';
|
|
39
41
|
import type { AccountId } from '../orchestration-api.js';
|
|
40
42
|
import type { Caip10Record } from '../orchestration-api.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address.d.ts","sourceRoot":"","sources":["address.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"address.d.ts","sourceRoot":"","sources":["address.js"],"names":[],"mappings":"AA6BO,wDALI,eAAe,0BACf,eAAe,6CACf,qBAAqB,GACnB,gBAAgB,CA4B5B;AAGD,kCAAmC,OAAO,CAAC;AAOpC,8DAJI,eAAe,YACf,MAAM,GACJ,gBAAgB,CAa5B;AAaM,sDAJI,gBAAgB,GAEd,kBAAkB,CAAC,OAAO,CAAC,GAAG,SAAS,CAYnD;AAaM,yCAHI,aAAa,GAAG,MAAM,GACpB,MAAM,CAQlB;AASM,kCAJI,UAAU,KACV,UAAU,GAAG,SAAS,GACpB,OAAO,CAEwD;AAYrE,uCAJI,YAAY,GAEV,SAAS,CAQrB;AAUM,yCAJI,YAAY,GAEV,YAAY,CAaxB;AASM,0CAHI,SAAS,GACP,YAAY,CAaxB;AAUM,6CAJI,YAAY,GAEV,WAAW,CAKvB;AASM,yCAJI,MAAM,GACJ,OAAO,CAkBnB;AAUM,6CAHI,MAAM,GACJ,QAAQ,OAAO,IAAI,aAAa,CAM5C;AAUM,uDAFI,MAAM,+BAOhB;AAWM,8CAJI,SAAS,GACP,UAAU,CAatB;;;;;;;;;;;;;;;;;;;;;qCA3QiC,cAAc;sCAIb,iCAAiC;wCAFH,aAAa;mCAAb,aAAa;2CADtC,MAAM;kCAEU,yBAAyB;+BAAzB,yBAAyB;kCAAzB,yBAAyB;iCADhB,aAAa"}
|
package/src/utils/address.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { encodeRemoteIbcAddress } from '@agoric/vats/tools/ibc-utils.js';
|
|
1
2
|
import { fromBech32, fromHex } from '@cosmjs/encoding';
|
|
2
3
|
import { Fail, q } from '@endo/errors';
|
|
3
4
|
import bs58 from 'bs58';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* @import {IBCConnectionID} from '@agoric/vats';
|
|
8
|
+
* @import {Address as EvmAddress} from 'viem';
|
|
7
9
|
* @import {Bech32Address, CosmosChainAddress, CaipChainId} from '../types.js';
|
|
8
10
|
* @import {AccountId, AccountIdArg, Caip10Record} from '../orchestration-api.js';
|
|
9
11
|
* @import {RemoteIbcAddress} from '@agoric/vats/tools/ibc-utils.js';
|
|
@@ -45,7 +47,12 @@ export const makeICAChannelAddress = (
|
|
|
45
47
|
encoding,
|
|
46
48
|
txType,
|
|
47
49
|
});
|
|
48
|
-
return
|
|
50
|
+
return encodeRemoteIbcAddress(
|
|
51
|
+
[controllerConnectionId],
|
|
52
|
+
'icahost',
|
|
53
|
+
ordering,
|
|
54
|
+
connString,
|
|
55
|
+
);
|
|
49
56
|
};
|
|
50
57
|
harden(makeICAChannelAddress);
|
|
51
58
|
|
|
@@ -61,7 +68,12 @@ export const makeICQChannelAddress = (
|
|
|
61
68
|
version = DEFAULT_ICQ_VERSION,
|
|
62
69
|
) => {
|
|
63
70
|
controllerConnectionId || Fail`controllerConnectionId is required`;
|
|
64
|
-
return
|
|
71
|
+
return encodeRemoteIbcAddress(
|
|
72
|
+
[controllerConnectionId],
|
|
73
|
+
'icqhost',
|
|
74
|
+
'unordered',
|
|
75
|
+
version,
|
|
76
|
+
);
|
|
65
77
|
};
|
|
66
78
|
harden(makeICQChannelAddress);
|
|
67
79
|
|
|
@@ -106,6 +118,16 @@ export const getBech32Prefix = address => {
|
|
|
106
118
|
return address.slice(0, split);
|
|
107
119
|
};
|
|
108
120
|
|
|
121
|
+
/**
|
|
122
|
+
* Compare two EVM addresses for equality, case-insensitive.
|
|
123
|
+
*
|
|
124
|
+
* @param {EvmAddress} a
|
|
125
|
+
* @param {EvmAddress | undefined} b
|
|
126
|
+
* @returns {boolean}
|
|
127
|
+
*/
|
|
128
|
+
export const sameEvmAddress = (a, b) => a.toLowerCase() === b?.toLowerCase();
|
|
129
|
+
harden(sameEvmAddress);
|
|
130
|
+
|
|
109
131
|
/**
|
|
110
132
|
* Coerce an AccountIdArg into a plain AccountId. The latter is now preferred so
|
|
111
133
|
* this utility can be used to adapt legacy calls, in particular from vows
|
package/src/utils/agd-lib.d.ts
CHANGED
|
@@ -54,55 +54,5 @@ export type ExecSync = (file: string, args: string[], opts: {
|
|
|
54
54
|
} & {
|
|
55
55
|
[k: string]: unknown;
|
|
56
56
|
}) => string;
|
|
57
|
-
export type Agd = ReturnType<
|
|
58
|
-
execFileSync: ExecSync;
|
|
59
|
-
log?: typeof console.log;
|
|
60
|
-
}) => Readonly<{
|
|
61
|
-
readOnly: () => Readonly<{
|
|
62
|
-
status: () => Promise<any>;
|
|
63
|
-
/**
|
|
64
|
-
* @param {[kind: 'gov', domain: string, ...rest: any]
|
|
65
|
-
* | [kind: 'tx', txhash: string]
|
|
66
|
-
* | [mod: 'vstorage', kind: 'data' | 'children', path: string]
|
|
67
|
-
* | [mod: 'ibc', ...rest: string[]]} qArgs
|
|
68
|
-
*/
|
|
69
|
-
query: (qArgs: [kind: "gov", domain: string, ...rest: any] | [kind: "tx", txhash: string] | [mod: "vstorage", kind: "data" | "children", path: string] | [mod: "ibc", ...rest: string[]]) => Promise<any>;
|
|
70
|
-
}>;
|
|
71
|
-
nameHub: () => Readonly<{
|
|
72
|
-
/**
|
|
73
|
-
* NOTE: synchronous I/O
|
|
74
|
-
*
|
|
75
|
-
* @param {string[]} path
|
|
76
|
-
*/
|
|
77
|
-
lookup: (...path: string[]) => string;
|
|
78
|
-
}>;
|
|
79
|
-
keys: {
|
|
80
|
-
/**
|
|
81
|
-
* @param {string} name
|
|
82
|
-
* @param {string} mnemonic
|
|
83
|
-
*/
|
|
84
|
-
add: (name: string, mnemonic: string) => string;
|
|
85
|
-
showAddress: (...path: string[]) => string;
|
|
86
|
-
/** @param {string} name */
|
|
87
|
-
delete: (name: string) => string;
|
|
88
|
-
};
|
|
89
|
-
/**
|
|
90
|
-
* @param {Record<string, unknown>} opts
|
|
91
|
-
*/
|
|
92
|
-
withOpts: (opts: Record<string, unknown>) => Readonly</*elided*/ any>;
|
|
93
|
-
lookup: (...path: string[]) => string;
|
|
94
|
-
status: () => Promise<any>;
|
|
95
|
-
query: (qArgs: [kind: "gov", domain: string, ...rest: any] | [kind: "tx", txhash: string] | [mod: "vstorage", kind: "data" | "children", path: string] | [mod: "ibc", ...rest: string[]]) => Promise<any>;
|
|
96
|
-
/**
|
|
97
|
-
* TODO: gas
|
|
98
|
-
*
|
|
99
|
-
* @param {string[]} txArgs
|
|
100
|
-
* @param {{ chainId: string; from: string; yes?: boolean }} opts
|
|
101
|
-
*/
|
|
102
|
-
tx: (txArgs: string[], { chainId, from, yes }: {
|
|
103
|
-
chainId: string;
|
|
104
|
-
from: string;
|
|
105
|
-
yes?: boolean;
|
|
106
|
-
}) => Promise<any>;
|
|
107
|
-
}>>;
|
|
57
|
+
export type Agd = ReturnType<typeof makeAgd>;
|
|
108
58
|
//# sourceMappingURL=agd-lib.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agd-lib.d.ts","sourceRoot":"","sources":["agd-lib.js"],"names":[],"mappings":"AAkBO,+CAFI;IAAE,YAAY,EAAE,QAAQ,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,OAAO,CAAC,GAAG,CAAA;CAAE;;;QAmCzD;;;;;WAKG;uBAJQ,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,CAAC,GAC/C,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,GAC5B,CAAC,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,GAC1D,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC;;;QAiBtC;;;;WAIG;0BADQ,MAAM,EAAE;;;QAuDjB;;;WAGG;oBAFQ,MAAM,YACN,MAAM;+BAzDR,MAAM,EAAE;QAmEjB,2BAA2B;uBAAf,MAAM;;IAKpB;;OAEG;qBADQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;sBAzEvB,MAAM,EAAE;;mBAvBR,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,CAAC,GAC/C,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AAM,CAAC,MAAM,EAAE,OAAO,CAAC;sBAzEvB,MAAM,EAAE;;mBAvBR,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,CAAC,GAC/C,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,GAC5B,CAAC,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,GAC1D,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC;IAoCtC;;;;;OAKG;iBAFQ,MAAM,EAAE,0BACR;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,OAAO,CAAA;KAAE;GA4DhE;8BAlJU,MAAM,QACN,MAAM,EAAE,QACR;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,KAC9C,MAAM;kBAiJL,UAAU,CAAC,OAAO,OAAO,CAAC"}
|
package/src/utils/agd-lib.js
CHANGED
package/src/utils/amounts.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type { ChainHub } from "../types.js";
|
|
|
5
5
|
import type { DenomArg } from "../orchestration-api.js";
|
|
6
6
|
import type { Denom } from "../orchestration-api.js";
|
|
7
7
|
import type { DenomAmount } from "../orchestration-api.js";
|
|
8
|
+
import type { Amount } from '@agoric/ertp';
|
|
8
9
|
import type { AmountArg } from "../orchestration-api.js";
|
|
9
10
|
import type { Coin } from '@agoric/cosmic-proto/cosmos/base/v1beta1/coin.js';
|
|
10
11
|
//# sourceMappingURL=amounts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"amounts.d.ts","sourceRoot":"","sources":["amounts.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"amounts.d.ts","sourceRoot":"","sources":["amounts.js"],"names":[],"mappings":"AAgBO,sCANI,QAAQ,YACR,QAAQ,GACN,KAAK,CAajB;AASM,4CANI,QAAQ,UACR,WAAW,GAAG,OAAO,KAAK,CAAC,GACzB,WAAW,CAavB;AASM,qCANI,QAAQ,UACR,SAAS,GACP,IAAI,CAWhB;8BAxD0B,aAAa;8BACkB,yBAAyB;2BAAzB,yBAAyB;iCAAzB,yBAAyB;4BAE1D,cAAc;+BAFmB,yBAAyB;0BAC5D,kDAAkD"}
|
package/src/utils/amounts.js
CHANGED
|
@@ -4,6 +4,7 @@ import { makeError } from '@endo/errors';
|
|
|
4
4
|
* @import {ChainHub} from "../types.js";
|
|
5
5
|
* @import {AmountArg, Denom, DenomAmount, DenomArg} from "../orchestration-api.js";
|
|
6
6
|
* @import {Coin} from '@agoric/cosmic-proto/cosmos/base/v1beta1/coin.js';
|
|
7
|
+
* @import {Amount} from '@agoric/ertp';
|
|
7
8
|
*/
|
|
8
9
|
|
|
9
10
|
/**
|
package/src/utils/asset.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export function assetOn(baseDenom: Denom, baseName: string, brand?: Brand<"nat">, chainName?: string, infoOf?: Record<string, CosmosChainInfo>): [string, DenomDetail];
|
|
2
2
|
import type { Denom } from '../types.js';
|
|
3
|
+
import type { Brand } from '@agoric/ertp';
|
|
3
4
|
import type { CosmosChainInfo } from '../types.js';
|
|
4
5
|
import type { DenomDetail } from '../types.js';
|
|
5
6
|
//# sourceMappingURL=asset.d.ts.map
|
package/src/utils/asset.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["asset.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["asset.js"],"names":[],"mappings":"AAkBO,mCAPI,KAAK,YACL,MAAM,UACN,MAAM,KAAK,CAAC,cACZ,MAAM,WACN,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAC7B,CAAC,MAAM,EAAE,WAAW,CAAC,CAiBjC;2BA9B+D,aAAa;2BACrD,cAAc;qCAD0B,aAAa;iCAAb,aAAa"}
|
package/src/utils/asset.js
CHANGED
|
@@ -7,6 +7,7 @@ export function registerChainsAndAssets(chainHub: ChainHub, brands: Record<strin
|
|
|
7
7
|
} | undefined;
|
|
8
8
|
}): void;
|
|
9
9
|
import type { ChainHub } from '../types.js';
|
|
10
|
+
import type { Brand } from '@agoric/ertp';
|
|
10
11
|
import type { ChainInfo } from '../types.js';
|
|
11
12
|
import type { Denom } from '../types.js';
|
|
12
13
|
import type { DenomDetail } from '../types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain-hub-helper.d.ts","sourceRoot":"","sources":["chain-hub-helper.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chain-hub-helper.d.ts","sourceRoot":"","sources":["chain-hub-helper.js"],"names":[],"mappings":"AAmBO,kDAPI,QAAQ,UACR,MAAM,CAAC,MAAM,EAAE,MAAM,KAAK,CAAC,CAAC,aAC5B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,SAAS,aACrC,CAAC,KAAK,EAAE,WAAW,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,GAAG,SAAS,YAElE;IAA8B,GAAG;;;;CAAC,QAkDpC;8BAlEyD,aAAa;2BAC/C,cAAc;+BADoB,aAAa;2BAAb,aAAa;iCAAb,aAAa"}
|