@hyperlane-xyz/cosmos-sdk 1.0.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.
Files changed (50) hide show
  1. package/README.md +72 -0
  2. package/dist/clients/client.d.ts +17 -0
  3. package/dist/clients/client.d.ts.map +1 -0
  4. package/dist/clients/client.js +33 -0
  5. package/dist/clients/client.js.map +1 -0
  6. package/dist/clients/signingClient.d.ts +43 -0
  7. package/dist/clients/signingClient.d.ts.map +1 -0
  8. package/dist/clients/signingClient.js +256 -0
  9. package/dist/clients/signingClient.js.map +1 -0
  10. package/dist/hyperlane/core/messages.d.ts +16 -0
  11. package/dist/hyperlane/core/messages.d.ts.map +1 -0
  12. package/dist/hyperlane/core/messages.js +2 -0
  13. package/dist/hyperlane/core/messages.js.map +1 -0
  14. package/dist/hyperlane/core/query.d.ts +18 -0
  15. package/dist/hyperlane/core/query.d.ts.map +1 -0
  16. package/dist/hyperlane/core/query.js +18 -0
  17. package/dist/hyperlane/core/query.js.map +1 -0
  18. package/dist/hyperlane/interchain_security/messages.d.ts +20 -0
  19. package/dist/hyperlane/interchain_security/messages.d.ts.map +1 -0
  20. package/dist/hyperlane/interchain_security/messages.js +2 -0
  21. package/dist/hyperlane/interchain_security/messages.js.map +1 -0
  22. package/dist/hyperlane/interchain_security/query.d.ts +30 -0
  23. package/dist/hyperlane/interchain_security/query.d.ts.map +1 -0
  24. package/dist/hyperlane/interchain_security/query.js +40 -0
  25. package/dist/hyperlane/interchain_security/query.js.map +1 -0
  26. package/dist/hyperlane/post_dispatch/messages.d.ts +32 -0
  27. package/dist/hyperlane/post_dispatch/messages.d.ts.map +1 -0
  28. package/dist/hyperlane/post_dispatch/messages.js +2 -0
  29. package/dist/hyperlane/post_dispatch/messages.js.map +1 -0
  30. package/dist/hyperlane/post_dispatch/query.d.ts +24 -0
  31. package/dist/hyperlane/post_dispatch/query.d.ts.map +1 -0
  32. package/dist/hyperlane/post_dispatch/query.js +21 -0
  33. package/dist/hyperlane/post_dispatch/query.js.map +1 -0
  34. package/dist/hyperlane/warp/messages.d.ts +28 -0
  35. package/dist/hyperlane/warp/messages.d.ts.map +1 -0
  36. package/dist/hyperlane/warp/messages.js +2 -0
  37. package/dist/hyperlane/warp/messages.js.map +1 -0
  38. package/dist/hyperlane/warp/query.d.ts +18 -0
  39. package/dist/hyperlane/warp/query.d.ts.map +1 -0
  40. package/dist/hyperlane/warp/query.js +16 -0
  41. package/dist/hyperlane/warp/query.js.map +1 -0
  42. package/dist/index.d.ts +12 -0
  43. package/dist/index.d.ts.map +1 -0
  44. package/dist/index.js +12 -0
  45. package/dist/index.js.map +1 -0
  46. package/dist/registry.d.ts +21 -0
  47. package/dist/registry.d.ts.map +1 -0
  48. package/dist/registry.js +313 -0
  49. package/dist/registry.js.map +1 -0
  50. package/package.json +47 -0
package/README.md ADDED
@@ -0,0 +1,72 @@
1
+ # Hyperlane Cosmos Module SDK
2
+
3
+ The Hyperlane Cosmos Module SDK is a fully typed TypeScript SDK for the [Cosmos Hyperlane Module Implementation](https://github.com/bcp-innovations/hyperlane-cosmos).
4
+ It can be used as a standalone SDK for frontend or in backend applications which want to connect to a Cosmos SDK chain which has the Hyperlane Module installed.
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ # Install with NPM
10
+ npm install @hyperlane-xyz/cosmos-sdk
11
+
12
+ # Or with Yarn
13
+ yarn add @hyperlane-xyz/cosmos-sdk
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ ```ts
19
+ import { HyperlaneModuleClient, SigningHyperlaneModuleClient } from "@hyperlane-xyz/cosmos-sdk";
20
+ import { DirectSecp256k1Wallet } from '@cosmjs/proto-signing';
21
+
22
+ // using hyperlane queries without needing signers
23
+ const client = await HyperlaneModuleClient.connect(
24
+ "https://rpc-endpoint:26657"
25
+ );
26
+
27
+ const mailboxes = await client.query.core.Mailboxes();
28
+ const bridgedSupply = await client.query.warp.BridgedSupply({ id: "token-id" });
29
+ ...
30
+
31
+ // performing hyperlane transactions
32
+ const wallet = await DirectSecp256k1Wallet.fromKey(PRIV_KEY);
33
+
34
+ const signer = await SigningHyperlaneModuleClient.connectWithSigner(
35
+ "https://rpc-endpoint:26657",
36
+ wallet,
37
+ );
38
+
39
+ const { response: mailbox } = await signer.createMailbox({
40
+ owner: '...',
41
+ local_domain: '...',
42
+ default_ism: '...',
43
+ default_hook: '...',
44
+ required_hook: '...',
45
+ });
46
+
47
+ const mailboxId = mailbox.id;
48
+
49
+ await signer.remoteTransfer({
50
+ sender: '...',
51
+ token_id: '...',
52
+ destination_domain: '...',
53
+ recipient: '...',
54
+ amount: '...',
55
+ ...
56
+ });
57
+
58
+ // sign and broadcast custom messages
59
+ await signer.signAndBroadcast(signer.getAccounts()[0], [txs...]);
60
+ ```
61
+
62
+ ## Setup
63
+
64
+ Node 18 or newer is required.
65
+
66
+ ## Contribute
67
+
68
+ First you need to install the dependencies by running `yarn install`.
69
+
70
+ ### Building the project
71
+
72
+ You can build the project with `yarn build`, the build output can be found under `dist`.
@@ -0,0 +1,17 @@
1
+ import { Pubkey } from '@cosmjs/amino';
2
+ import { Registry } from '@cosmjs/proto-signing';
3
+ import { BankExtension, QueryClient, StargateClient, StargateClientOptions } from '@cosmjs/stargate';
4
+ import { CometClient, HttpEndpoint } from '@cosmjs/tendermint-rpc';
5
+ import { CoreExtension } from '../hyperlane/core/query.js';
6
+ import { InterchainSecurityExtension } from '../hyperlane/interchain_security/query.js';
7
+ import { PostDispatchExtension } from '../hyperlane/post_dispatch/query.js';
8
+ import { WarpExtension } from '../hyperlane/warp/query.js';
9
+ export type HyperlaneQueryClient = QueryClient & BankExtension & WarpExtension & CoreExtension & InterchainSecurityExtension & PostDispatchExtension;
10
+ export declare class HyperlaneModuleClient extends StargateClient {
11
+ readonly query: HyperlaneQueryClient;
12
+ registry: Registry;
13
+ protected constructor(cometClient: CometClient, options: StargateClientOptions);
14
+ static connect(endpoint: string | HttpEndpoint, options?: StargateClientOptions): Promise<HyperlaneModuleClient>;
15
+ simulate(signerAddress: string, signerPubKey: Pubkey, messages: any[], memo: string | undefined): Promise<number>;
16
+ }
17
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/clients/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EACL,aAAa,EACb,WAAW,EACX,cAAc,EACd,qBAAqB,EAGtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,WAAW,EACX,YAAY,EAEb,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,aAAa,EAAsB,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EACL,2BAA2B,EAE5B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,qBAAqB,EAEtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAsB,MAAM,4BAA4B,CAAC;AAG/E,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAC5C,aAAa,GACb,aAAa,GACb,aAAa,GACb,2BAA2B,GAC3B,qBAAqB,CAAC;AAExB,qBAAa,qBAAsB,SAAQ,cAAc;IACvD,QAAQ,CAAC,KAAK,EAAE,oBAAoB,CAAC;IAC9B,QAAQ,EAAE,QAAQ,CAAC;IAE1B,SAAS,aACP,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,qBAAqB;WAqBnB,OAAO,CAClB,QAAQ,EAAE,MAAM,GAAG,YAAY,EAC/B,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,qBAAqB,CAAC;IAKpB,QAAQ,CACnB,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,GAAG,EAAE,EACf,IAAI,EAAE,MAAM,GAAG,SAAS,GACvB,OAAO,CAAC,MAAM,CAAC;CAYnB"}
@@ -0,0 +1,33 @@
1
+ import { Uint53 } from '@cosmjs/math';
2
+ import { Registry } from '@cosmjs/proto-signing';
3
+ import { QueryClient, StargateClient, defaultRegistryTypes, setupBankExtension, } from '@cosmjs/stargate';
4
+ import { connectComet, } from '@cosmjs/tendermint-rpc';
5
+ import { setupCoreExtension } from '../hyperlane/core/query.js';
6
+ import { setupInterchainSecurityExtension, } from '../hyperlane/interchain_security/query.js';
7
+ import { setupPostDispatchExtension, } from '../hyperlane/post_dispatch/query.js';
8
+ import { setupWarpExtension } from '../hyperlane/warp/query.js';
9
+ import { COSMOS_MODULE_MESSAGE_REGISTRY as R } from '../registry.js';
10
+ export class HyperlaneModuleClient extends StargateClient {
11
+ query;
12
+ registry;
13
+ constructor(cometClient, options) {
14
+ super(cometClient, options);
15
+ this.query = QueryClient.withExtensions(cometClient, setupBankExtension, setupCoreExtension, setupInterchainSecurityExtension, setupPostDispatchExtension, setupWarpExtension);
16
+ this.registry = new Registry([...defaultRegistryTypes]);
17
+ // register all the custom tx types
18
+ Object.values(R).forEach(({ proto }) => {
19
+ this.registry.register(proto.type, proto.converter);
20
+ });
21
+ }
22
+ static async connect(endpoint, options = {}) {
23
+ const client = await connectComet(endpoint);
24
+ return new HyperlaneModuleClient(client, options);
25
+ }
26
+ async simulate(signerAddress, signerPubKey, messages, memo) {
27
+ const queryClient = this.getQueryClient();
28
+ const { sequence } = await this.getSequence(signerAddress);
29
+ const { gasInfo } = await queryClient.tx.simulate(messages, memo, signerPubKey, sequence);
30
+ return Uint53.fromString(gasInfo?.gasUsed.toString() ?? '0').toNumber();
31
+ }
32
+ }
33
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/clients/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAEL,WAAW,EACX,cAAc,EAEd,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;IAEM,KAAK,CAAC,QAAQ,CACnB,aAAqB,EACrB,YAAoB,EACpB,QAAe,EACf,IAAwB;QAExB,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,EAAG,CAAC;QAE3C,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;QAC3D,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,WAAW,CAAC,EAAE,CAAC,QAAQ,CAC/C,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,QAAQ,CACT,CAAC;QACF,OAAO,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,QAAQ,EAAE,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC1E,CAAC;CACF"}
@@ -0,0 +1,43 @@
1
+ import { AccountData, OfflineSigner } from '@cosmjs/proto-signing';
2
+ import { DeliverTxResponse, HttpEndpoint, SigningStargateClient, SigningStargateClientOptions, StdFee } from '@cosmjs/stargate';
3
+ import { CometClient } from '@cosmjs/tendermint-rpc';
4
+ import { coreTx, isTx, pdTx, warpTx } from '@hyperlane-xyz/cosmos-types';
5
+ import { HyperlaneQueryClient } from './client.js';
6
+ type TxOptions = {
7
+ fee?: StdFee | 'auto' | number;
8
+ memo?: string;
9
+ };
10
+ export interface TxResponse<R> extends DeliverTxResponse {
11
+ response: R;
12
+ }
13
+ export declare class SigningHyperlaneModuleClient extends SigningStargateClient {
14
+ query: HyperlaneQueryClient;
15
+ account: AccountData;
16
+ readonly GAS_MULTIPLIER = 1.6;
17
+ protected constructor(cometClient: CometClient, signer: OfflineSigner, account: AccountData, options: SigningStargateClientOptions);
18
+ static connectWithSigner(endpoint: string | HttpEndpoint, signer: OfflineSigner, options?: SigningStargateClientOptions): Promise<SigningHyperlaneModuleClient>;
19
+ static createWithSigner(cometclient: CometClient, signer: OfflineSigner, options?: SigningStargateClientOptions): Promise<SigningHyperlaneModuleClient>;
20
+ private submitTx;
21
+ createMailbox(value: Omit<coreTx.MsgCreateMailbox, 'owner'>, options?: TxOptions): Promise<TxResponse<coreTx.MsgCreateMailboxResponse>>;
22
+ setMailbox(value: Omit<coreTx.MsgSetMailbox, 'owner'>, options?: TxOptions): Promise<TxResponse<coreTx.MsgSetMailboxResponse>>;
23
+ processMessage(value: Omit<coreTx.MsgProcessMessage, 'relayer'>, options?: TxOptions): Promise<TxResponse<coreTx.MsgProcessMessageResponse>>;
24
+ createMessageIdMultisigIsm(value: Omit<isTx.MsgCreateMessageIdMultisigIsm, 'creator'>, options?: TxOptions): Promise<TxResponse<isTx.MsgCreateMessageIdMultisigIsmResponse>>;
25
+ createMerkleRootMultisigIsm(value: Omit<isTx.MsgCreateMerkleRootMultisigIsm, 'creator'>, options?: TxOptions): Promise<TxResponse<isTx.MsgCreateMerkleRootMultisigIsmResponse>>;
26
+ createNoopIsm(value: Omit<isTx.MsgCreateNoopIsm, 'creator'>, options?: TxOptions): Promise<TxResponse<isTx.MsgCreateNoopIsmResponse>>;
27
+ announceValidator(value: Omit<isTx.MsgAnnounceValidator, 'creator'>, options?: TxOptions): Promise<TxResponse<isTx.MsgAnnounceValidatorResponse>>;
28
+ createIgp(value: Omit<pdTx.MsgCreateIgp, 'owner'>, options?: TxOptions): Promise<TxResponse<pdTx.MsgCreateIgpResponse>>;
29
+ setIgpOwner(value: Omit<pdTx.MsgSetIgpOwner, 'owner'>, options?: TxOptions): Promise<TxResponse<pdTx.MsgSetIgpOwnerResponse>>;
30
+ setDestinationGasConfig(value: Omit<pdTx.MsgSetDestinationGasConfig, 'owner'>, options?: TxOptions): Promise<TxResponse<pdTx.MsgSetDestinationGasConfigResponse>>;
31
+ payForGas(value: Omit<pdTx.MsgPayForGas, 'sender'>, options?: TxOptions): Promise<TxResponse<pdTx.MsgPayForGasResponse>>;
32
+ claim(value: Omit<pdTx.MsgClaim, 'sender'>, options?: TxOptions): Promise<TxResponse<pdTx.MsgClaimResponse>>;
33
+ createMerkleTreeHook(value: Omit<pdTx.MsgCreateMerkleTreeHook, 'owner'>, options?: TxOptions): Promise<TxResponse<pdTx.MsgCreateMerkleTreeHookResponse>>;
34
+ createNoopHook(value: Omit<pdTx.MsgCreateNoopHook, 'owner'>, options?: TxOptions): Promise<TxResponse<pdTx.MsgCreateNoopHookResponse>>;
35
+ createCollateralToken(value: Omit<warpTx.MsgCreateCollateralToken, 'owner'>, options?: TxOptions): Promise<TxResponse<warpTx.MsgCreateCollateralTokenResponse>>;
36
+ createSyntheticToken(value: Omit<warpTx.MsgCreateSyntheticToken, 'owner'>, options?: TxOptions): Promise<TxResponse<warpTx.MsgCreateSyntheticTokenResponse>>;
37
+ setToken(value: Omit<warpTx.MsgSetToken, 'owner'>, options?: TxOptions): Promise<TxResponse<warpTx.MsgSetTokenResponse>>;
38
+ enrollRemoteRouter(value: Omit<warpTx.MsgEnrollRemoteRouter, 'owner'>, options?: TxOptions): Promise<TxResponse<warpTx.MsgEnrollRemoteRouterResponse>>;
39
+ unrollRemoteRouter(value: Omit<warpTx.MsgUnrollRemoteRouter, 'owner'>, options?: TxOptions): Promise<TxResponse<warpTx.MsgUnrollRemoteRouterResponse>>;
40
+ remoteTransfer(value: Omit<warpTx.MsgRemoteTransfer, 'sender'>, options?: TxOptions): Promise<TxResponse<warpTx.MsgRemoteTransferResponse>>;
41
+ }
42
+ export {};
43
+ //# sourceMappingURL=signingClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signingClient.d.ts","sourceRoot":"","sources":["../../src/clients/signingClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAEX,aAAa,EACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,iBAAiB,EACjB,YAAY,EAEZ,qBAAqB,EACrB,4BAA4B,EAC5B,MAAM,EAGP,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAgB,MAAM,wBAAwB,CAAC;AAEnE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE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AAW,EAAE,OAAO,CAAC,EACxC,OAAO,CAAC,EAAE,SAAS,GAClB,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;IAYrC,kBAAkB,CAC7B,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,qBAAqB,EAAE,OAAO,CAAC,EAClD,OAAO,CAAC,EAAE,SAAS,GAClB,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,6BAA6B,CAAC,CAAC;IAY/C,kBAAkB,CAC7B,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,qBAAqB,EAAE,OAAO,CAAC,EAClD,OAAO,CAAC,EAAE,SAAS,GAClB,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,6BAA6B,CAAC,CAAC;IAY/C,cAAc,CACzB,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,QAAQ,CAAC,EAC/C,OAAO,CAAC,EAAE,SAAS,GAClB,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC;CAWzD"}
@@ -0,0 +1,256 @@
1
+ import { AminoTypes, QueryClient, SigningStargateClient, assertIsDeliverTxSuccess, setupBankExtension, } from '@cosmjs/stargate';
2
+ import { connectComet } from '@cosmjs/tendermint-rpc';
3
+ import { setupCoreExtension } from '../hyperlane/core/query.js';
4
+ import { setupInterchainSecurityExtension } from '../hyperlane/interchain_security/query.js';
5
+ import { setupPostDispatchExtension } from '../hyperlane/post_dispatch/query.js';
6
+ import { setupWarpExtension } from '../hyperlane/warp/query.js';
7
+ import { COSMOS_MODULE_MESSAGE_REGISTRY as R } from '../registry.js';
8
+ export class SigningHyperlaneModuleClient extends SigningStargateClient {
9
+ query;
10
+ account;
11
+ GAS_MULTIPLIER = 1.6;
12
+ constructor(cometClient, signer, account, options) {
13
+ // register all the custom amino tx types
14
+ const aminoTypes = Object.values(R)
15
+ .filter((r) => !!r.amino?.type) // filter out tx responses which have no amino type
16
+ .reduce((types, { proto, amino }) => ({
17
+ ...types,
18
+ [proto.type]: {
19
+ aminoType: amino?.type,
20
+ toAmino: amino?.converter?.toJSON ?? proto.converter.toJSON,
21
+ fromAmino: amino?.converter?.fromJSON ?? proto.converter.fromJSON,
22
+ },
23
+ }), {});
24
+ super(cometClient, signer, {
25
+ ...options,
26
+ aminoTypes: new AminoTypes({
27
+ ...options.aminoTypes,
28
+ ...aminoTypes,
29
+ }),
30
+ });
31
+ this.query = QueryClient.withExtensions(cometClient, setupBankExtension, setupCoreExtension, setupInterchainSecurityExtension, setupPostDispatchExtension, setupWarpExtension);
32
+ // register all the custom tx types
33
+ Object.values(R).forEach(({ proto }) => {
34
+ this.registry.register(proto.type, proto.converter);
35
+ });
36
+ this.account = account;
37
+ }
38
+ static async connectWithSigner(endpoint, signer, options = {}) {
39
+ const client = await connectComet(endpoint);
40
+ const [account] = await signer.getAccounts();
41
+ return new SigningHyperlaneModuleClient(client, signer, account, options);
42
+ }
43
+ static async createWithSigner(cometclient, signer, options = {}) {
44
+ const [account] = await signer.getAccounts();
45
+ return new SigningHyperlaneModuleClient(cometclient, signer, account, options);
46
+ }
47
+ async submitTx(msg, options) {
48
+ const result = await this.signAndBroadcast(this.account.address, [msg], options?.fee ?? this.GAS_MULTIPLIER, options?.memo);
49
+ assertIsDeliverTxSuccess(result);
50
+ return {
51
+ ...result,
52
+ response: this.registry.decode(result.msgResponses[0]),
53
+ };
54
+ }
55
+ async createMailbox(value, options) {
56
+ const msg = {
57
+ typeUrl: R.MsgCreateMailbox.proto.type,
58
+ value: R.MsgCreateMailbox.proto.converter.create({
59
+ ...value,
60
+ owner: this.account.address,
61
+ }),
62
+ };
63
+ return this.submitTx(msg, options);
64
+ }
65
+ async setMailbox(value, options) {
66
+ const msg = {
67
+ typeUrl: R.MsgSetMailbox.proto.type,
68
+ value: R.MsgSetMailbox.proto.converter.create({
69
+ ...value,
70
+ owner: this.account.address,
71
+ }),
72
+ };
73
+ return this.submitTx(msg, options);
74
+ }
75
+ async processMessage(value, options) {
76
+ const msg = {
77
+ typeUrl: R.MsgProcessMessage.proto.type,
78
+ value: R.MsgProcessMessage.proto.converter.create({
79
+ ...value,
80
+ relayer: this.account.address,
81
+ }),
82
+ };
83
+ return this.submitTx(msg, options);
84
+ }
85
+ async createMessageIdMultisigIsm(value, options) {
86
+ const msg = {
87
+ typeUrl: R.MsgCreateMessageIdMultisigIsm.proto.type,
88
+ value: R.MsgCreateMessageIdMultisigIsm.proto.converter.create({
89
+ ...value,
90
+ creator: this.account.address,
91
+ }),
92
+ };
93
+ return this.submitTx(msg, options);
94
+ }
95
+ async createMerkleRootMultisigIsm(value, options) {
96
+ const msg = {
97
+ typeUrl: R.MsgCreateMerkleRootMultisigIsm.proto.type,
98
+ value: R.MsgCreateMerkleRootMultisigIsm.proto.converter.create({
99
+ ...value,
100
+ creator: this.account.address,
101
+ }),
102
+ };
103
+ return this.submitTx(msg, options);
104
+ }
105
+ async createNoopIsm(value, options) {
106
+ const msg = {
107
+ typeUrl: R.MsgCreateNoopIsm.proto.type,
108
+ value: R.MsgCreateNoopIsm.proto.converter.create({
109
+ ...value,
110
+ creator: this.account.address,
111
+ }),
112
+ };
113
+ return this.submitTx(msg, options);
114
+ }
115
+ async announceValidator(value, options) {
116
+ const msg = {
117
+ typeUrl: R.MsgAnnounceValidator.proto.type,
118
+ value: R.MsgAnnounceValidator.proto.converter.create({
119
+ ...value,
120
+ creator: this.account.address,
121
+ }),
122
+ };
123
+ return this.submitTx(msg, options);
124
+ }
125
+ async createIgp(value, options) {
126
+ const msg = {
127
+ typeUrl: R.MsgCreateIgp.proto.type,
128
+ value: R.MsgCreateIgp.proto.converter.create({
129
+ ...value,
130
+ owner: this.account.address,
131
+ }),
132
+ };
133
+ return this.submitTx(msg, options);
134
+ }
135
+ async setIgpOwner(value, options) {
136
+ const msg = {
137
+ typeUrl: R.MsgSetIgpOwner.proto.type,
138
+ value: R.MsgSetIgpOwner.proto.converter.create({
139
+ ...value,
140
+ owner: this.account.address,
141
+ }),
142
+ };
143
+ return this.submitTx(msg, options);
144
+ }
145
+ async setDestinationGasConfig(value, options) {
146
+ const msg = {
147
+ typeUrl: R.MsgSetDestinationGasConfig.proto.type,
148
+ value: R.MsgSetDestinationGasConfig.proto.converter.create({
149
+ ...value,
150
+ owner: this.account.address,
151
+ }),
152
+ };
153
+ return this.submitTx(msg, options);
154
+ }
155
+ async payForGas(value, options) {
156
+ const msg = {
157
+ typeUrl: R.MsgPayForGas.proto.type,
158
+ value: R.MsgPayForGas.proto.converter.create({
159
+ ...value,
160
+ sender: this.account.address,
161
+ }),
162
+ };
163
+ return this.submitTx(msg, options);
164
+ }
165
+ async claim(value, options) {
166
+ const msg = {
167
+ typeUrl: R.MsgClaim.proto.type,
168
+ value: R.MsgClaim.proto.converter.create({
169
+ ...value,
170
+ sender: this.account.address,
171
+ }),
172
+ };
173
+ return this.submitTx(msg, options);
174
+ }
175
+ async createMerkleTreeHook(value, options) {
176
+ const msg = {
177
+ typeUrl: R.MsgCreateMerkleTreeHook.proto.type,
178
+ value: R.MsgCreateMerkleTreeHook.proto.converter.create({
179
+ ...value,
180
+ owner: this.account.address,
181
+ }),
182
+ };
183
+ return this.submitTx(msg, options);
184
+ }
185
+ async createNoopHook(value, options) {
186
+ const msg = {
187
+ typeUrl: R.MsgCreateNoopHook.proto.type,
188
+ value: R.MsgCreateNoopHook.proto.converter.create({
189
+ ...value,
190
+ owner: this.account.address,
191
+ }),
192
+ };
193
+ return this.submitTx(msg, options);
194
+ }
195
+ async createCollateralToken(value, options) {
196
+ const msg = {
197
+ typeUrl: R.MsgCreateCollateralToken.proto.type,
198
+ value: R.MsgCreateCollateralToken.proto.converter.create({
199
+ ...value,
200
+ owner: this.account.address,
201
+ }),
202
+ };
203
+ return this.submitTx(msg, options);
204
+ }
205
+ async createSyntheticToken(value, options) {
206
+ const msg = {
207
+ typeUrl: R.MsgCreateSyntheticToken.proto.type,
208
+ value: R.MsgCreateSyntheticToken.proto.converter.create({
209
+ ...value,
210
+ owner: this.account.address,
211
+ }),
212
+ };
213
+ return this.submitTx(msg, options);
214
+ }
215
+ async setToken(value, options) {
216
+ const msg = {
217
+ typeUrl: R.MsgSetToken.proto.type,
218
+ value: R.MsgSetToken.proto.converter.create({
219
+ ...value,
220
+ owner: this.account.address,
221
+ }),
222
+ };
223
+ return this.submitTx(msg, options);
224
+ }
225
+ async enrollRemoteRouter(value, options) {
226
+ const msg = {
227
+ typeUrl: R.MsgEnrollRemoteRouter.proto.type,
228
+ value: R.MsgEnrollRemoteRouter.proto.converter.create({
229
+ ...value,
230
+ owner: this.account.address,
231
+ }),
232
+ };
233
+ return this.submitTx(msg, options);
234
+ }
235
+ async unrollRemoteRouter(value, options) {
236
+ const msg = {
237
+ typeUrl: R.MsgUnrollRemoteRouter.proto.type,
238
+ value: R.MsgUnrollRemoteRouter.proto.converter.create({
239
+ ...value,
240
+ owner: this.account.address,
241
+ }),
242
+ };
243
+ return this.submitTx(msg, options);
244
+ }
245
+ async remoteTransfer(value, options) {
246
+ const msg = {
247
+ typeUrl: R.MsgRemoteTransfer.proto.type,
248
+ value: R.MsgRemoteTransfer.proto.converter.create({
249
+ ...value,
250
+ sender: this.account.address,
251
+ }),
252
+ };
253
+ return this.submitTx(msg, options);
254
+ }
255
+ }
256
+ //# sourceMappingURL=signingClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signingClient.js","sourceRoot":"","sources":["../../src/clients/signingClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,UAAU,EAGV,WAAW,EACX,qBAAqB,EAGrB,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAe,YAAY,EAAE,MAAM,wBAAwB,CAAC;AASnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAOhE,OAAO,EAAE,gCAAgC,EAAE,MAAM,2CAA2C,CAAC;AAU7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AASjF,OAAO,E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AC;QAEF,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;IAEM,KAAK,CAAC,cAAc,CACzB,KAA+C,EAC/C,OAAmB;QAEnB,MAAM,GAAG,GAAkC;YACzC,OAAO,EAAE,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI;YACvC,KAAK,EAAE,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;gBAChD,GAAG,KAAK;gBACR,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO;aAC7B,CAAC;SACH,CAAC;QAEF,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;CACF"}
@@ -0,0 +1,16 @@
1
+ import { EncodeObject } from '@cosmjs/proto-signing';
2
+ import { coreTx } from '@hyperlane-xyz/cosmos-types';
3
+ import { COSMOS_MODULE_MESSAGE_REGISTRY as R } from '../../registry.js';
4
+ export interface MsgCreateMailboxEncodeObject extends EncodeObject {
5
+ readonly typeUrl: typeof R.MsgCreateMailbox.proto.type;
6
+ readonly value: Partial<coreTx.MsgCreateMailbox>;
7
+ }
8
+ export interface MsgSetMailboxEncodeObject extends EncodeObject {
9
+ readonly typeUrl: typeof R.MsgSetMailbox.proto.type;
10
+ readonly value: Partial<coreTx.MsgSetMailbox>;
11
+ }
12
+ export interface MsgProcessMessageEncodeObject extends EncodeObject {
13
+ readonly typeUrl: typeof R.MsgProcessMessage.proto.type;
14
+ readonly value: Partial<coreTx.MsgProcessMessage>;
15
+ }
16
+ //# sourceMappingURL=messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/hyperlane/core/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAErD,OAAO,EAAE,8BAA8B,IAAI,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAExE,MAAM,WAAW,4BAA6B,SAAQ,YAAY;IAChE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC;IACvD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,yBAA0B,SAAQ,YAAY;IAC7D,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC;IACpD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,6BAA8B,SAAQ,YAAY;IACjE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC;IACxD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;CACnD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/hyperlane/core/messages.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ import { QueryClient } from '@cosmjs/stargate';
2
+ import { coreQuery } from '@hyperlane-xyz/cosmos-types';
3
+ export interface CoreExtension {
4
+ readonly core: {
5
+ /** Mailboxes ... */
6
+ readonly Mailboxes: (req: coreQuery.QueryMailboxesRequest) => Promise<coreQuery.QueryMailboxesResponse>;
7
+ /** Mailbox ... */
8
+ readonly Mailbox: (req: coreQuery.QueryMailboxRequest) => Promise<coreQuery.QueryMailboxResponse>;
9
+ /** Delivered ... */
10
+ readonly Delivered: (req: coreQuery.QueryDeliveredRequest) => Promise<coreQuery.QueryDeliveredResponse>;
11
+ /** RecipientIsm ... */
12
+ readonly RecipientIsm: (req: coreQuery.QueryRecipientIsmRequest) => Promise<coreQuery.QueryRecipientIsmResponse>;
13
+ /** VerifyDryRun ... */
14
+ readonly VerifyDryRun: (req: coreQuery.QueryVerifyDryRunRequest) => Promise<coreQuery.QueryVerifyDryRunResponse>;
15
+ };
16
+ }
17
+ export declare function setupCoreExtension(base: QueryClient): CoreExtension;
18
+ //# sourceMappingURL=query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/hyperlane/core/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA2B,MAAM,kBAAkB,CAAC;AAExE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE;QACb,oBAAoB;QACpB,QAAQ,CAAC,SAAS,EAAE,CAClB,GAAG,EAAE,SAAS,CAAC,qBAAqB,KACjC,OAAO,CAAC,SAAS,CAAC,sBAAsB,CAAC,CAAC;QAC/C,kBAAkB;QAClB,QAAQ,CAAC,OAAO,EAAE,CAChB,GAAG,EAAE,SAAS,CAAC,mBAAmB,KAC/B,OAAO,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;QAC7C,oBAAoB;QACpB,QAAQ,CAAC,SAAS,EAAE,CAClB,GAAG,EAAE,SAAS,CAAC,qBAAqB,KACjC,OAAO,CAAC,SAAS,CAAC,sBAAsB,CAAC,CAAC;QAC/C,uBAAuB;QACvB,QAAQ,CAAC,YAAY,EAAE,CACrB,GAAG,EAAE,SAAS,CAAC,wBAAwB,KACpC,OAAO,CAAC,SAAS,CAAC,yBAAyB,CAAC,CAAC;QAClD,uBAAuB;QACvB,QAAQ,CAAC,YAAY,EAAE,CACrB,GAAG,EAAE,SAAS,CAAC,wBAAwB,KACpC,OAAO,CAAC,SAAS,CAAC,yBAAyB,CAAC,CAAC;KACnD,CAAC;CACH;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,WAAW,GAAG,aAAa,CAoBnE"}
@@ -0,0 +1,18 @@
1
+ import { createProtobufRpcClient } from '@cosmjs/stargate';
2
+ import { coreQuery } from '@hyperlane-xyz/cosmos-types';
3
+ export function setupCoreExtension(base) {
4
+ const rpc = createProtobufRpcClient(base);
5
+ // Use this service to get easy typed access to query methods
6
+ // This cannot be used for proof verification
7
+ const queryService = new coreQuery.QueryClientImpl(rpc);
8
+ return {
9
+ core: {
10
+ Mailboxes: (req) => queryService.Mailboxes(req),
11
+ Mailbox: (req) => queryService.Mailbox(req),
12
+ Delivered: (req) => queryService.Delivered(req),
13
+ RecipientIsm: (req) => queryService.RecipientIsm(req),
14
+ VerifyDryRun: (req) => queryService.VerifyDryRun(req),
15
+ },
16
+ };
17
+ }
18
+ //# sourceMappingURL=query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/hyperlane/core/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AA2BxD,MAAM,UAAU,kBAAkB,CAAC,IAAiB;IAClD,MAAM,GAAG,GAAG,uBAAuB,CAAC,IAAI,CAAC,CAAC;IAC1C,6DAA6D;IAC7D,6CAA6C;IAE7C,MAAM,YAAY,GAAG,IAAI,SAAS,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;IACxD,OAAO;QACL,IAAI,EAAE;YACJ,SAAS,EAAE,CAAC,GAAoC,EAAE,EAAE,CAClD,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC;YAC7B,OAAO,EAAE,CAAC,GAAkC,EAAE,EAAE,CAC9C,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC;YAC3B,SAAS,EAAE,CAAC,GAAoC,EAAE,EAAE,CAClD,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC;YAC7B,YAAY,EAAE,CAAC,GAAuC,EAAE,EAAE,CACxD,YAAY,CAAC,YAAY,CAAC,GAAG,CAAC;YAChC,YAAY,EAAE,CAAC,GAAuC,EAAE,EAAE,CACxD,YAAY,CAAC,YAAY,CAAC,GAAG,CAAC;SACjC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { EncodeObject } from '@cosmjs/proto-signing';
2
+ import { isTx } from '@hyperlane-xyz/cosmos-types';
3
+ import { COSMOS_MODULE_MESSAGE_REGISTRY as R } from '../../registry.js';
4
+ export interface MsgCreateMessageIdMultisigIsmEncodeObject extends EncodeObject {
5
+ readonly typeUrl: typeof R.MsgCreateMessageIdMultisigIsm.proto.type;
6
+ readonly value: Partial<isTx.MsgCreateMessageIdMultisigIsm>;
7
+ }
8
+ export interface MsgCreateMerkleRootMultisigIsmEncodeObject extends EncodeObject {
9
+ readonly typeUrl: typeof R.MsgCreateMerkleRootMultisigIsm.proto.type;
10
+ readonly value: Partial<isTx.MsgCreateMerkleRootMultisigIsm>;
11
+ }
12
+ export interface MsgCreateNoopIsmEncodeObject extends EncodeObject {
13
+ readonly typeUrl: typeof R.MsgCreateNoopIsm.proto.type;
14
+ readonly value: Partial<isTx.MsgCreateNoopIsm>;
15
+ }
16
+ export interface MsgAnnounceValidatorEncodeObject extends EncodeObject {
17
+ readonly typeUrl: typeof R.MsgAnnounceValidator.proto.type;
18
+ readonly value: Partial<isTx.MsgAnnounceValidator>;
19
+ }
20
+ //# sourceMappingURL=messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/hyperlane/interchain_security/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAEnD,OAAO,EAAE,8BAA8B,IAAI,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAExE,MAAM,WAAW,yCACf,SAAQ,YAAY;IACpB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,6BAA6B,CAAC,KAAK,CAAC,IAAI,CAAC;IACpE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;CAC7D;AAED,MAAM,WAAW,0CACf,SAAQ,YAAY;IACpB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,8BAA8B,CAAC,KAAK,CAAC,IAAI,CAAC;IACrE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC;CAC9D;AAED,MAAM,WAAW,4BAA6B,SAAQ,YAAY;IAChE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC;IACvD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,gCAAiC,SAAQ,YAAY;IACpE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,oBAAoB,CAAC,KAAK,CAAC,IAAI,CAAC;IAC3D,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;CACpD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/hyperlane/interchain_security/messages.ts"],"names":[],"mappings":""}
@@ -0,0 +1,30 @@
1
+ import { QueryClient } from '@cosmjs/stargate';
2
+ import { any, isQuery, isTypes, pagination } from '@hyperlane-xyz/cosmos-types';
3
+ type ISM = isTypes.NoopISM | isTypes.MerkleRootMultisigISM | isTypes.MessageIdMultisigISM;
4
+ type QueryDecodedIsmResponse = {
5
+ ism: ISM;
6
+ };
7
+ type QueryDecodedIsmsResponse = {
8
+ isms: ISM[];
9
+ pagination: pagination.PageResponse | undefined;
10
+ };
11
+ export declare const decodeIsm: (ism: any.Any | undefined) => ISM;
12
+ export interface InterchainSecurityExtension {
13
+ readonly interchainSecurity: {
14
+ /** AnnouncedStorageLocations ... */
15
+ readonly AnnouncedStorageLocations: (req: isQuery.QueryAnnouncedStorageLocationsRequest) => Promise<isQuery.QueryAnnouncedStorageLocationsResponse>;
16
+ /** Only the latest announced location from the validator */
17
+ readonly LatestAnnouncedStorageLocation: (req: isQuery.QueryLatestAnnouncedStorageLocationRequest) => Promise<isQuery.QueryLatestAnnouncedStorageLocationResponse>;
18
+ /** Isms ... */
19
+ readonly Isms: (req: isQuery.QueryIsmsRequest) => Promise<isQuery.QueryIsmsResponse>;
20
+ /** Ism ... */
21
+ readonly Ism: (req: isQuery.QueryIsmRequest) => Promise<isQuery.QueryIsmResponse>;
22
+ /** DecodedIsms ... */
23
+ readonly DecodedIsms: (req: isQuery.QueryIsmsRequest) => Promise<QueryDecodedIsmsResponse>;
24
+ /** DecodedIsm ... */
25
+ readonly DecodedIsm: (req: isQuery.QueryIsmRequest) => Promise<QueryDecodedIsmResponse>;
26
+ };
27
+ }
28
+ export declare function setupInterchainSecurityExtension(base: QueryClient): InterchainSecurityExtension;
29
+ export {};
30
+ //# sourceMappingURL=query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/hyperlane/interchain_security/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA2B,MAAM,kBAAkB,CAAC;AAExE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEhF,KAAK,GAAG,GACJ,OAAO,CAAC,OAAO,GACf,OAAO,CAAC,qBAAqB,GAC7B,OAAO,CAAC,oBAAoB,CAAC;AAEjC,KAAK,uBAAuB,GAAG;IAC7B,GAAG,EAAE,GAAG,CAAC;CACV,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,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