@recoillink/cli 0.0.0-stage → 45.0.1

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 (81) hide show
  1. package/LICENSE.md +193 -0
  2. package/README.md +149 -2
  3. package/bundle/154.index.js +462 -0
  4. package/bundle/230.index.js +569 -0
  5. package/bundle/25.index.js +9569 -0
  6. package/bundle/267.index.js +1386 -0
  7. package/bundle/308.index.js +5121 -0
  8. package/bundle/367.index.js +4 -0
  9. package/bundle/369.index.js +3443 -0
  10. package/bundle/529.index.js +3596 -0
  11. package/bundle/576.index.js +36 -0
  12. package/bundle/610.index.js +86 -0
  13. package/bundle/617.index.js +1612 -0
  14. package/bundle/628.index.js +152 -0
  15. package/bundle/633.index.js +86 -0
  16. package/bundle/697.index.js +410 -0
  17. package/bundle/7183ea1c1bf0a5da980d.js +214 -0
  18. package/bundle/748.index.js +672 -0
  19. package/bundle/78.index.js +372 -0
  20. package/bundle/841.index.js +2093 -0
  21. package/bundle/868.index.js +290 -0
  22. package/bundle/902.index.js +173 -0
  23. package/bundle/956.index.js +9901 -0
  24. package/bundle/aleo_wasm.wasm +0 -0
  25. package/bundle/aleo_wasm1.wasm +0 -0
  26. package/bundle/build/Release/bigint_buffer.node +0 -0
  27. package/bundle/file.js +12 -0
  28. package/bundle/index.js +4 -0
  29. package/bundle/package.json +3 -0
  30. package/bundle/worker-pipeline.js +38 -0
  31. package/bundle/worker.js +54 -0
  32. package/bundle/worker1.js +171 -0
  33. package/bundle/worker2.js +19834 -0
  34. package/bundle/worker3.js +19834 -0
  35. package/examples/aleo/core-config.yaml +19 -0
  36. package/examples/ccip/ccip-warp-route.yaml +26 -0
  37. package/examples/ccip/multi-chain-ccip-warp-route.yaml +81 -0
  38. package/examples/chain-config.yaml +42 -0
  39. package/examples/contract-artifacts.yaml +20 -0
  40. package/examples/core-config.yaml +19 -0
  41. package/examples/cosmosnative/core-config.yaml +20 -0
  42. package/examples/cosmosnative/warp-route-deployment.yaml +21 -0
  43. package/examples/crosschain/README.md +31 -0
  44. package/examples/crosschain/cosmosnative/core-config.yaml +69 -0
  45. package/examples/crosschain/ethereum/core-config.yaml +70 -0
  46. package/examples/crosschain/radix/core-config.yaml +96 -0
  47. package/examples/fork/file-transactions.yaml +5 -0
  48. package/examples/fork/timelock-testing.yaml +36 -0
  49. package/examples/fork/warp-route-update.yaml +100 -0
  50. package/examples/hooks.yaml +70 -0
  51. package/examples/ism-advanced.yaml +33 -0
  52. package/examples/ism.yaml +13 -0
  53. package/examples/radix/core-config.yaml +29 -0
  54. package/examples/sealevel/core-config-apply.yaml +7 -0
  55. package/examples/sealevel/core-config-composite-ism.yaml +21 -0
  56. package/examples/sealevel/core-config.yaml +12 -0
  57. package/examples/sealevel/igp-hook-config.yaml +13 -0
  58. package/examples/sealevel/warp-config-routing-message-id-multisig-ism.yaml +21 -0
  59. package/examples/starknet/core-config.yaml +20 -0
  60. package/examples/submit/strategy/file-strategy.yaml +8 -0
  61. package/examples/submit/strategy/gnosis-chain-strategy.yaml +10 -0
  62. package/examples/submit/strategy/gnosis-chain-tx-builder-strategy.yaml +6 -0
  63. package/examples/submit/strategy/gnosis-strategy-avalanche.yaml +4 -0
  64. package/examples/submit/strategy/gnosis-tx-builder-ica-strategy.yaml +20 -0
  65. package/examples/submit/strategy/ica-timelock-strategy.yaml +15 -0
  66. package/examples/submit/strategy/impersonated-account-strategy.yaml +4 -0
  67. package/examples/submit/strategy/json-rpc-chain-strategy.yaml +8 -0
  68. package/examples/submit/strategy/json-rpc-ica-strategy.yaml +13 -0
  69. package/examples/submit/strategy/json-rpc-strategy.yaml +3 -0
  70. package/examples/submit/strategy/json-rpc-timelock-strategy.yaml +17 -0
  71. package/examples/submit/strategy/starknet-json-rpc-chain-strategy.yaml +11 -0
  72. package/examples/submit/transactions/anvil-transactions.yaml +10 -0
  73. package/examples/submit/transactions/avalanche-transactions.json +8 -0
  74. package/examples/submit/transactions/sepolia-transactions.json +8 -0
  75. package/examples/tron-core-config.yaml +18 -0
  76. package/examples/warp-base.yaml +24 -0
  77. package/examples/warp-config-predicate-mainnet.yaml +14 -0
  78. package/examples/warp-deployed-predicate-mainnet.yaml +19 -0
  79. package/examples/warp-ethereum.yaml +19 -0
  80. package/examples/warp-route-deployment.yaml +21 -0
  81. package/package.json +117 -3
package/LICENSE.md ADDED
@@ -0,0 +1,193 @@
1
+ # Apache License
2
+
3
+ _Version 2.0, January 2004_
4
+ _&lt;<http://www.apache.org/licenses/>&gt;_
5
+
6
+ ### Terms and Conditions for use, reproduction, and distribution
7
+
8
+ #### 1. Definitions
9
+
10
+ “License” shall mean the terms and conditions for use, reproduction, and
11
+ distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ “Licensor” shall mean the copyright owner or entity authorized by the copyright
14
+ owner that is granting the License.
15
+
16
+ “Legal Entity” shall mean the union of the acting entity and all other entities
17
+ that control, are controlled by, or are under common control with that entity.
18
+ For the purposes of this definition, “control” means **(i)** the power, direct or
19
+ indirect, to cause the direction or management of such entity, whether by
20
+ contract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or **(iii)** beneficial ownership of such entity.
22
+
23
+ “You” (or “Your”) shall mean an individual or Legal Entity exercising
24
+ permissions granted by this License.
25
+
26
+ “Source” form shall mean the preferred form for making modifications, including
27
+ but not limited to software source code, documentation source, and configuration
28
+ files.
29
+
30
+ “Object” form shall mean any form resulting from mechanical transformation or
31
+ translation of a Source form, including but not limited to compiled object code,
32
+ generated documentation, and conversions to other media types.
33
+
34
+ “Work” shall mean the work of authorship, whether in Source or Object form, made
35
+ available under the License, as indicated by a copyright notice that is included
36
+ in or attached to the work (an example is provided in the Appendix below).
37
+
38
+ “Derivative Works” shall mean any work, whether in Source or Object form, that
39
+ is based on (or derived from) the Work and for which the editorial revisions,
40
+ annotations, elaborations, or other modifications represent, as a whole, an
41
+ original work of authorship. For the purposes of this License, Derivative Works
42
+ shall not include works that remain separable from, or merely link (or bind by
43
+ name) to the interfaces of, the Work and Derivative Works thereof.
44
+
45
+ “Contribution” shall mean any work of authorship, including the original version
46
+ of the Work and any modifications or additions to that Work or Derivative Works
47
+ thereof, that is intentionally submitted to Licensor for inclusion in the Work
48
+ by the copyright owner or by an individual or Legal Entity authorized to submit
49
+ on behalf of the copyright owner. For the purposes of this definition,
50
+ “submitted” means any form of electronic, verbal, or written communication sent
51
+ to the Licensor or its representatives, including but not limited to
52
+ communication on electronic mailing lists, source code control systems, and
53
+ issue tracking systems that are managed by, or on behalf of, the Licensor for
54
+ the purpose of discussing and improving the Work, but excluding communication
55
+ that is conspicuously marked or otherwise designated in writing by the copyright
56
+ owner as “Not a Contribution.”
57
+
58
+ “Contributor” shall mean Licensor and any individual or Legal Entity on behalf
59
+ of whom a Contribution has been received by Licensor and subsequently
60
+ incorporated within the Work.
61
+
62
+ #### 2. Grant of Copyright License
63
+
64
+ Subject to the terms and conditions of this License, each Contributor hereby
65
+ grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
66
+ irrevocable copyright license to reproduce, prepare Derivative Works of,
67
+ publicly display, publicly perform, sublicense, and distribute the Work and such
68
+ Derivative Works in Source or Object form.
69
+
70
+ #### 3. Grant of Patent License
71
+
72
+ Subject to the terms and conditions of this License, each Contributor hereby
73
+ grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
74
+ irrevocable (except as stated in this section) patent license to make, have
75
+ made, use, offer to sell, sell, import, and otherwise transfer the Work, where
76
+ such license applies only to those patent claims licensable by such Contributor
77
+ that are necessarily infringed by their Contribution(s) alone or by combination
78
+ of their Contribution(s) with the Work to which such Contribution(s) was
79
+ submitted. If You institute patent litigation against any entity (including a
80
+ cross-claim or counterclaim in a lawsuit) alleging that the Work or a
81
+ Contribution incorporated within the Work constitutes direct or contributory
82
+ patent infringement, then any patent licenses granted to You under this License
83
+ for that Work shall terminate as of the date such litigation is filed.
84
+
85
+ #### 4. Redistribution
86
+
87
+ You may reproduce and distribute copies of the Work or Derivative Works thereof
88
+ in any medium, with or without modifications, and in Source or Object form,
89
+ provided that You meet the following conditions:
90
+
91
+ - **(a)** You must give any other recipients of the Work or Derivative Works a copy of
92
+ this License; and
93
+ - **(b)** You must cause any modified files to carry prominent notices stating that You
94
+ changed the files; and
95
+ - **(c)** You must retain, in the Source form of any Derivative Works that You distribute,
96
+ all copyright, patent, trademark, and attribution notices from the Source form
97
+ of the Work, excluding those notices that do not pertain to any part of the
98
+ Derivative Works; and
99
+ - **(d)** If the Work includes a “NOTICE” text file as part of its distribution, then any
100
+ Derivative Works that You distribute must include a readable copy of the
101
+ attribution notices contained within such NOTICE file, excluding those notices
102
+ that do not pertain to any part of the Derivative Works, in at least one of the
103
+ following places: within a NOTICE text file distributed as part of the
104
+ Derivative Works; within the Source form or documentation, if provided along
105
+ with the Derivative Works; or, within a display generated by the Derivative
106
+ Works, if and wherever such third-party notices normally appear. The contents of
107
+ the NOTICE file are for informational purposes only and do not modify the
108
+ License. You may add Your own attribution notices within Derivative Works that
109
+ You distribute, alongside or as an addendum to the NOTICE text from the Work,
110
+ provided that such additional attribution notices cannot be construed as
111
+ modifying the License.
112
+
113
+ You may add Your own copyright statement to Your modifications and may provide
114
+ additional or different license terms and conditions for use, reproduction, or
115
+ distribution of Your modifications, or for any such Derivative Works as a whole,
116
+ provided Your use, reproduction, and distribution of the Work otherwise complies
117
+ with the conditions stated in this License.
118
+
119
+ #### 5. Submission of Contributions
120
+
121
+ Unless You explicitly state otherwise, any Contribution intentionally submitted
122
+ for inclusion in the Work by You to the Licensor shall be under the terms and
123
+ conditions of this License, without any additional terms or conditions.
124
+ Notwithstanding the above, nothing herein shall supersede or modify the terms of
125
+ any separate license agreement you may have executed with Licensor regarding
126
+ such Contributions.
127
+
128
+ #### 6. Trademarks
129
+
130
+ This License does not grant permission to use the trade names, trademarks,
131
+ service marks, or product names of the Licensor, except as required for
132
+ reasonable and customary use in describing the origin of the Work and
133
+ reproducing the content of the NOTICE file.
134
+
135
+ #### 7. Disclaimer of Warranty
136
+
137
+ Unless required by applicable law or agreed to in writing, Licensor provides the
138
+ Work (and each Contributor provides its Contributions) on an “AS IS” BASIS,
139
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
140
+ including, without limitation, any warranties or conditions of TITLE,
141
+ NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
142
+ solely responsible for determining the appropriateness of using or
143
+ redistributing the Work and assume any risks associated with Your exercise of
144
+ permissions under this License.
145
+
146
+ #### 8. Limitation of Liability
147
+
148
+ In no event and under no legal theory, whether in tort (including negligence),
149
+ contract, or otherwise, unless required by applicable law (such as deliberate
150
+ and grossly negligent acts) or agreed to in writing, shall any Contributor be
151
+ liable to You for damages, including any direct, indirect, special, incidental,
152
+ or consequential damages of any character arising as a result of this License or
153
+ out of the use or inability to use the Work (including but not limited to
154
+ damages for loss of goodwill, work stoppage, computer failure or malfunction, or
155
+ any and all other commercial damages or losses), even if such Contributor has
156
+ been advised of the possibility of such damages.
157
+
158
+ #### 9. Accepting Warranty or Additional Liability
159
+
160
+ While redistributing the Work or Derivative Works thereof, You may choose to
161
+ offer, and charge a fee for, acceptance of support, warranty, indemnity, or
162
+ other liability obligations and/or rights consistent with this License. However,
163
+ in accepting such obligations, You may act only on Your own behalf and on Your
164
+ sole responsibility, not on behalf of any other Contributor, and only if You
165
+ agree to indemnify, defend, and hold each Contributor harmless for any liability
166
+ incurred by, or claims asserted against, such Contributor by reason of your
167
+ accepting any such warranty or additional liability.
168
+
169
+ _END OF TERMS AND CONDITIONS_
170
+
171
+ ### APPENDIX: How to apply the Apache License to your work
172
+
173
+ To apply the Apache License to your work, attach the following boilerplate
174
+ notice, with the fields enclosed by brackets `[]` replaced with your own
175
+ identifying information. (Don't include the brackets!) The text should be
176
+ enclosed in the appropriate comment syntax for the file format. We also
177
+ recommend that a file or class name and description of purpose be included on
178
+ the same “printed page” as the copyright notice for easier identification within
179
+ third-party archives.
180
+
181
+ Copyright [yyyy] [name of copyright owner]
182
+
183
+ Licensed under the Apache License, Version 2.0 (the "License");
184
+ you may not use this file except in compliance with the License.
185
+ You may obtain a copy of the License at
186
+
187
+ http://www.apache.org/licenses/LICENSE-2.0
188
+
189
+ Unless required by applicable law or agreed to in writing, software
190
+ distributed under the License is distributed on an "AS IS" BASIS,
191
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
192
+ See the License for the specific language governing permissions and
193
+ limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,150 @@
1
- # Temporary Holding Version
1
+ # Hyperlane CLI
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The Hyperlane CLI is a command-line tool written in Typescript that facilitates common operations on Hyperlane, such as deploying the core contracts and/or warp routes to new chains.
4
+
5
+ ## Hyperlane overview
6
+
7
+ Hyperlane is an interchain messaging protocol that allows applications to communicate between blockchains.
8
+
9
+ Developers can use Hyperlane to share state between blockchains, allowing them to build interchain applications that live natively across multiple chains.
10
+
11
+ To read more about interchain applications, how the protocol works, and how to integrate with Hyperlane, please see the [documentation](https://docs.hyperlane.xyz).
12
+
13
+ ## Setup
14
+
15
+ Node 22 or newer is required.
16
+
17
+ **Option 1: Global install:**
18
+
19
+ ```bash
20
+ # Install with NPM
21
+ npm install -g @recoillink/cli
22
+ # Or uninstall old versions
23
+ npm uninstall -g @recoillink/cli
24
+ ```
25
+
26
+ **Option 2: Temp install:**
27
+
28
+ ```bash
29
+ # Run via NPM's npx command
30
+ npx @recoillink/cli
31
+ # Or via pnpm's dlx command
32
+ pnpm dlx @recoillink/cli
33
+ ```
34
+
35
+ **Option 3: Run from source:**
36
+
37
+ ```bash
38
+ git clone https://github.com/hyperlane-xyz/hyperlane-monorepo.git
39
+ cd hyperlane-monorepo
40
+ pnpm install && pnpm build
41
+ cd typescript/cli
42
+ pnpm rlink
43
+ ```
44
+
45
+ ## Common commands
46
+
47
+ View help: `rlink --help`
48
+
49
+ Create a core deployment config: `rlink config create`
50
+
51
+ Run rlink core deployments: `hyperlane deploy core`
52
+
53
+ Run warp route deployments: `hyperlane deploy warp`
54
+
55
+ View SDK contract addresses: `hyperlane chains addresses`
56
+
57
+ Send test message: `rlink send message`
58
+
59
+ ### Address conversion utilities
60
+
61
+ Convert address to bytes32: `rlink address to-bytes32 --address <address> [--protocol <protocol>]`
62
+
63
+ Convert bytes32 to address: `rlink address from-bytes32 --bytes32 <bytes32> --protocol <protocol> [--prefix <prefix> | --chain <chain>]`
64
+
65
+ ## Logging
66
+
67
+ The logging format can be toggled between human-readable vs JSON-structured logs using the `LOG_FORMAT` environment variable or the `--log <pretty|json>` flag.
68
+
69
+ Note: If you are unable to see color output after setting `LOG_FORMAT`, you may set the `FORCE_COLOR=true` environment variable as a last resort. See https://force-color.org/ & https://github.com/chalk for more info.
70
+
71
+ The logging verbosity can be configured using the `LOG_LEVEL` environment variable or the `--verbosity <trace|debug|info|warn|error|off>` flag.
72
+
73
+ ## Address Conversion Utilities
74
+
75
+ Hyperlane uses bytes32 format for addresses in cross-chain messages to support multiple blockchain protocols. The CLI provides utilities to convert between protocol-specific addresses and bytes32 format.
76
+
77
+ ### to-bytes32
78
+
79
+ Convert an address to bytes32 format (used in Hyperlane messages).
80
+
81
+ **Usage:**
82
+
83
+ ```bash
84
+ rlink address to-bytes32 --address <address> [--protocol <protocol>]
85
+ ```
86
+
87
+ **Flags:**
88
+
89
+ - `--address, -a` - The address to convert (required)
90
+ - `--protocol, -p` (optional) - Protocol type: ethereum, sealevel, cosmos, cosmosnative, starknet, radix, aleo, tron. Auto-detected if not specified.
91
+
92
+ **Examples:**
93
+
94
+ ```bash
95
+ # EVM address (auto-detected)
96
+ rlink address to-bytes32 --address 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
97
+
98
+ # Solana address with explicit protocol
99
+ rlink address to-bytes32 -a EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v -p sealevel
100
+
101
+ # Cosmos address
102
+ rlink address to-bytes32 --address cosmos1wxeyh7zgn4tctjzs0vtqpc6p5cxq5t2muzl7ng --protocol cosmos
103
+ ```
104
+
105
+ ### from-bytes32
106
+
107
+ Convert bytes32 to an address for a specific protocol.
108
+
109
+ **Usage:**
110
+
111
+ ```bash
112
+ rlink address from-bytes32 --bytes32 <bytes32> --protocol <protocol> [--prefix <prefix> | --chain <chain>]
113
+ ```
114
+
115
+ **Flags:**
116
+
117
+ - `--bytes32, -b` - The bytes32 hex string to convert (with or without 0x prefix) (required)
118
+ - `--protocol, -p` - Target protocol type (required)
119
+ - `--prefix` (optional) - Address prefix for Cosmos chains (e.g., "cosmos", "osmo", "neutron") and Radix chains (e.g., "account_rdx")
120
+ - `--chain, -c` (optional) - Chain name to automatically lookup the prefix from registry (e.g., "osmosis", "neutron", "cosmoshub"). Cannot be used with `--prefix`.
121
+
122
+ **Examples:**
123
+
124
+ ```bash
125
+ # Convert to EVM address
126
+ rlink address from-bytes32 --bytes32 0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266 --protocol ethereum
127
+
128
+ # Convert to Solana address (using aliases)
129
+ rlink address from-bytes32 -b 0xc6fa7af3bedbad3a3d65f36aabc97431b1bbe4c2d2f6e0e47ca60203452f5d61 -p sealevel
130
+
131
+ # Convert to Cosmos address with explicit prefix
132
+ rlink address from-bytes32 --bytes32 0x00000000000000000000000071b24bf8489d5785c8507b1600e341a60c0a2d5b --protocol cosmos --prefix cosmos
133
+
134
+ # Convert to Osmosis address using chain lookup
135
+ rlink address from-bytes32 -b 0x00000000000000000000000071b24bf8489d5785c8507b1600e341a60c0a2d5b -p cosmos --chain osmosis
136
+
137
+ # Convert to Neutron address using chain name
138
+ rlink address from-bytes32 -b 0x00000000000000000000000071b24bf8489d5785c8507b1600e341a60c0a2d5b -p cosmos -c neutron
139
+ ```
140
+
141
+ **Supported Protocols:**
142
+
143
+ - `ethereum` - EVM-compatible chains (Ethereum, Polygon, Arbitrum, etc.)
144
+ - `sealevel` - Solana and SVM chains
145
+ - `cosmos` - Cosmos SDK chains using CosmWasm
146
+ - `cosmosnative` - Cosmos SDK chains using native modules
147
+ - `starknet` - StarkNet
148
+ - `radix` - Radix DLT
149
+ - `aleo` - Aleo
150
+ - `tron` - Tron