@hyperlane-xyz/cli 3.10.0 → 3.10.1-beta0

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 (109) hide show
  1. package/dist/cli.js +4 -0
  2. package/dist/cli.js.map +1 -1
  3. package/dist/src/commands/deploy.d.ts +6 -0
  4. package/dist/src/commands/deploy.d.ts.map +1 -1
  5. package/dist/src/commands/deploy.js +66 -54
  6. package/dist/src/commands/deploy.js.map +1 -1
  7. package/dist/src/commands/hook.d.ts +7 -0
  8. package/dist/src/commands/hook.d.ts.map +1 -0
  9. package/dist/src/commands/hook.js +42 -0
  10. package/dist/src/commands/hook.js.map +1 -0
  11. package/dist/src/commands/ism.d.ts +7 -0
  12. package/dist/src/commands/ism.d.ts.map +1 -0
  13. package/dist/src/commands/ism.js +44 -0
  14. package/dist/src/commands/ism.js.map +1 -0
  15. package/dist/src/commands/options.d.ts +37 -2
  16. package/dist/src/commands/options.d.ts.map +1 -1
  17. package/dist/src/commands/options.js +45 -2
  18. package/dist/src/commands/options.js.map +1 -1
  19. package/dist/src/commands/send.d.ts +8 -1
  20. package/dist/src/commands/send.d.ts.map +1 -1
  21. package/dist/src/commands/send.js +14 -4
  22. package/dist/src/commands/send.js.map +1 -1
  23. package/dist/src/commands/status.d.ts.map +1 -1
  24. package/dist/src/commands/status.js +8 -7
  25. package/dist/src/commands/status.js.map +1 -1
  26. package/dist/src/config/artifacts.d.ts +6 -1
  27. package/dist/src/config/artifacts.d.ts.map +1 -1
  28. package/dist/src/config/artifacts.js +7 -1
  29. package/dist/src/config/artifacts.js.map +1 -1
  30. package/dist/src/config/ism.d.ts +18 -0
  31. package/dist/src/config/ism.d.ts.map +1 -1
  32. package/dist/src/config/ism.js +22 -7
  33. package/dist/src/config/ism.js.map +1 -1
  34. package/dist/src/config/warp.d.ts +30 -180
  35. package/dist/src/config/warp.d.ts.map +1 -1
  36. package/dist/src/config/warp.js +19 -56
  37. package/dist/src/config/warp.js.map +1 -1
  38. package/dist/src/context.d.ts +22 -5
  39. package/dist/src/context.d.ts.map +1 -1
  40. package/dist/src/context.js +57 -18
  41. package/dist/src/context.js.map +1 -1
  42. package/dist/src/deploy/core.d.ts +6 -2
  43. package/dist/src/deploy/core.d.ts.map +1 -1
  44. package/dist/src/deploy/core.js +37 -16
  45. package/dist/src/deploy/core.js.map +1 -1
  46. package/dist/src/deploy/dry-run.d.ts +20 -0
  47. package/dist/src/deploy/dry-run.d.ts.map +1 -0
  48. package/dist/src/deploy/dry-run.js +45 -0
  49. package/dist/src/deploy/dry-run.js.map +1 -0
  50. package/dist/src/deploy/utils.d.ts +6 -1
  51. package/dist/src/deploy/utils.d.ts.map +1 -1
  52. package/dist/src/deploy/utils.js +40 -6
  53. package/dist/src/deploy/utils.js.map +1 -1
  54. package/dist/src/deploy/warp.d.ts +3 -2
  55. package/dist/src/deploy/warp.d.ts.map +1 -1
  56. package/dist/src/deploy/warp.js +94 -89
  57. package/dist/src/deploy/warp.js.map +1 -1
  58. package/dist/src/hook/read.d.ts +14 -0
  59. package/dist/src/hook/read.d.ts.map +1 -0
  60. package/dist/src/hook/read.js +29 -0
  61. package/dist/src/hook/read.js.map +1 -0
  62. package/dist/src/ism/read.d.ts +14 -0
  63. package/dist/src/ism/read.d.ts.map +1 -0
  64. package/dist/src/ism/read.js +29 -0
  65. package/dist/src/ism/read.js.map +1 -0
  66. package/dist/src/logger.d.ts +1 -0
  67. package/dist/src/logger.d.ts.map +1 -1
  68. package/dist/src/logger.js +1 -0
  69. package/dist/src/logger.js.map +1 -1
  70. package/dist/src/send/message.d.ts +3 -2
  71. package/dist/src/send/message.d.ts.map +1 -1
  72. package/dist/src/send/message.js +8 -2
  73. package/dist/src/send/message.js.map +1 -1
  74. package/dist/src/send/transfer.d.ts +3 -2
  75. package/dist/src/send/transfer.d.ts.map +1 -1
  76. package/dist/src/send/transfer.js +9 -3
  77. package/dist/src/send/transfer.js.map +1 -1
  78. package/dist/src/status/message.d.ts +4 -1
  79. package/dist/src/status/message.d.ts.map +1 -1
  80. package/dist/src/status/message.js +14 -3
  81. package/dist/src/status/message.js.map +1 -1
  82. package/dist/src/tests/deployTestErc20.js +4 -4
  83. package/dist/src/tests/deployTestErc20.js.map +1 -1
  84. package/dist/src/utils/env.d.ts +2 -0
  85. package/dist/src/utils/env.d.ts.map +1 -1
  86. package/dist/src/utils/env.js +2 -0
  87. package/dist/src/utils/env.js.map +1 -1
  88. package/dist/src/utils/files.d.ts +12 -4
  89. package/dist/src/utils/files.d.ts.map +1 -1
  90. package/dist/src/utils/files.js +35 -11
  91. package/dist/src/utils/files.js.map +1 -1
  92. package/dist/src/utils/fork.d.ts +37 -0
  93. package/dist/src/utils/fork.d.ts.map +1 -0
  94. package/dist/src/utils/fork.js +91 -0
  95. package/dist/src/utils/fork.js.map +1 -0
  96. package/dist/src/utils/keys.d.ts +16 -2
  97. package/dist/src/utils/keys.d.ts.map +1 -1
  98. package/dist/src/utils/keys.js +67 -6
  99. package/dist/src/utils/keys.js.map +1 -1
  100. package/dist/src/version.d.ts +1 -1
  101. package/dist/src/version.d.ts.map +1 -1
  102. package/dist/src/version.js +1 -1
  103. package/dist/src/version.js.map +1 -1
  104. package/examples/dry-run/anvil-chains.yaml +17 -0
  105. package/examples/dry-run/ism.yaml +8 -0
  106. package/examples/dry-run/warp-route-deployment.yaml +4 -0
  107. package/examples/fork/warp-route-deployment.yaml +17 -9
  108. package/examples/warp-route-deployment.yaml +17 -10
  109. package/package.json +9 -7
package/dist/cli.js CHANGED
@@ -5,6 +5,8 @@ import './env.js';
5
5
  import { chainsCommand } from './src/commands/chains.js';
6
6
  import { configCommand } from './src/commands/config.js';
7
7
  import { deployCommand } from './src/commands/deploy.js';
8
+ import { hookCommand } from './src/commands/hook.js';
9
+ import { ismCommand } from './src/commands/ism.js';
8
10
  import { logFormatCommandOption, logLevelCommandOption, } from './src/commands/options.js';
9
11
  import { sendCommand } from './src/commands/send.js';
10
12
  import { statusCommand } from './src/commands/status.js';
@@ -27,6 +29,8 @@ try {
27
29
  .command(chainsCommand)
28
30
  .command(configCommand)
29
31
  .command(deployCommand)
32
+ .command(hookCommand)
33
+ .command(ismCommand)
30
34
  .command(sendCommand)
31
35
  .command(statusCommand)
32
36
  .version(VERSION)
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,UAAU,CAAC;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EACL,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,mBAAmB;AACnB,MAAM,oBAAoB,GAAG,iCAAiC,CAAC;AAE/D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AAEjE,MAAM,YAAY,EAAE,CAAC;AAErB,IAAI,CAAC;IACH,MAAM,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAC/B,UAAU,CAAC,WAAW,CAAC;SACvB,MAAM,CAAC,KAAK,EAAE,sBAAsB,CAAC;SACrC,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,aAAa,CAAC;SACtB,OAAO,CAAC,aAAa,CAAC;SACtB,OAAO,CAAC,WAAW,CAAC;SACpB,OAAO,CAAC,UAAU,CAAC;SACnB,OAAO,CAAC,WAAW,CAAC;SACpB,OAAO,CAAC,aAAa,CAAC;SACtB,OAAO,CAAC,OAAO,CAAC;SAChB,aAAa,EAAE;SACf,MAAM,EAAE;SACR,IAAI,EAAE;SACN,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE;QACxB,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,oBAAoB,CAAC;YAAE,QAAQ,CAAC,SAAS,GAAG,GAAG,CAAC,CAAC;QAC1E,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,IAAI,GAAG;YAAE,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;QAClC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC,IAAI,CAAC;AACZ,CAAC;AAAC,OAAO,KAAU,EAAE,CAAC;IACpB,QAAQ,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;AACtC,CAAC"}
@@ -1,4 +1,10 @@
1
1
  import { CommandModule } from 'yargs';
2
+ export declare enum Command {
3
+ DEPLOY = "deploy",
4
+ KURTOSIS_AGENTS = "kurtosis-agents",
5
+ CORE = "core",
6
+ WARP = "warp"
7
+ }
2
8
  /**
3
9
  * Parent command
4
10
  */
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAiBtC;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,aAW3B,CAAC"}
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AA2BtC,oBAAY,OAAO;IACjB,MAAM,WAAW;IACjB,eAAe,oBAAoB;IACnC,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,aAW3B,CAAC"}
@@ -1,14 +1,21 @@
1
1
  import { runKurtosisAgentDeploy } from '../deploy/agent.js';
2
2
  import { runCoreDeploy } from '../deploy/core.js';
3
+ import { evaluateIfDryRunFailure, verifyAnvil } from '../deploy/dry-run.js';
3
4
  import { runWarpRouteDeploy } from '../deploy/warp.js';
4
5
  import { log, logGray } from '../logger.js';
5
- import { ENV } from '../utils/env.js';
6
- import { agentConfigurationOption, chainsCommandOption, coreArtifactsOption, keyCommandOption, outDirCommandOption, skipConfirmationOption, } from './options.js';
6
+ import { agentConfigCommandOption, agentTargetsCommandOption, chainsCommandOption, coreArtifactsOption, coreTargetsCommandOption, dryRunOption, hookCommandOption, ismCommandOption, keyCommandOption, originCommandOption, outDirCommandOption, skipConfirmationOption, warpConfigCommandOption, } from './options.js';
7
+ export var Command;
8
+ (function (Command) {
9
+ Command["DEPLOY"] = "deploy";
10
+ Command["KURTOSIS_AGENTS"] = "kurtosis-agents";
11
+ Command["CORE"] = "core";
12
+ Command["WARP"] = "warp";
13
+ })(Command || (Command = {}));
7
14
  /**
8
15
  * Parent command
9
16
  */
10
17
  export const deployCommand = {
11
- command: 'deploy',
18
+ command: Command.DEPLOY,
12
19
  describe: 'Permissionlessly deploy a Hyperlane contracts or extensions',
13
20
  builder: (yargs) => yargs
14
21
  .command(coreCommand)
@@ -22,19 +29,13 @@ export const deployCommand = {
22
29
  * Agent command
23
30
  */
24
31
  const agentCommand = {
25
- command: 'kurtosis-agents',
32
+ command: Command.KURTOSIS_AGENTS,
26
33
  describe: 'Deploy Hyperlane agents with Kurtosis',
27
34
  builder: (yargs) => yargs.options({
28
- origin: {
29
- type: 'string',
30
- description: 'The name of the origin chain to deploy to',
31
- },
32
- targets: {
33
- type: 'string',
34
- description: 'Comma separated list of chains to relay between',
35
- },
35
+ origin: originCommandOption,
36
+ targets: agentTargetsCommandOption,
36
37
  chains: chainsCommandOption,
37
- config: agentConfigurationOption,
38
+ config: agentConfigCommandOption,
38
39
  }),
39
40
  handler: async (argv) => {
40
41
  logGray('Hyperlane Agent Deployment with Kurtosis');
@@ -56,31 +57,21 @@ const agentCommand = {
56
57
  * Core command
57
58
  */
58
59
  const coreCommand = {
59
- command: 'core',
60
+ command: Command.CORE,
60
61
  describe: 'Deploy core Hyperlane contracts',
61
62
  builder: (yargs) => yargs.options({
62
- targets: {
63
- type: 'string',
64
- description: 'Comma separated list of chain names to which contracts will be deployed',
65
- },
63
+ targets: coreTargetsCommandOption,
66
64
  chains: chainsCommandOption,
67
65
  artifacts: coreArtifactsOption,
68
- ism: {
69
- type: 'string',
70
- description: 'A path to a JSON or YAML file with basic or advanced ISM configs (e.g. Multisig)',
71
- },
72
- hook: {
73
- type: 'string',
74
- description: 'A path to a JSON or YAML file with Hook configs (for every chain)',
75
- },
66
+ ism: ismCommandOption,
67
+ hook: hookCommandOption,
76
68
  out: outDirCommandOption,
77
69
  key: keyCommandOption,
78
70
  yes: skipConfirmationOption,
71
+ 'dry-run': dryRunOption,
79
72
  }),
80
73
  handler: async (argv) => {
81
- logGray('Hyperlane permissionless core deployment');
82
- logGray('----------------------------------------');
83
- const key = argv.key || ENV.HYP_KEY;
74
+ const key = argv.key;
84
75
  const chainConfigPath = argv.chains;
85
76
  const outPath = argv.out;
86
77
  const chains = argv.targets
@@ -90,16 +81,28 @@ const coreCommand = {
90
81
  const ismConfigPath = argv.ism;
91
82
  const hookConfigPath = argv.hook;
92
83
  const skipConfirmation = argv.yes;
93
- await runCoreDeploy({
94
- key,
95
- chainConfigPath,
96
- chains,
97
- artifactsPath,
98
- ismConfigPath,
99
- hookConfigPath,
100
- outPath,
101
- skipConfirmation,
102
- });
84
+ const dryRun = argv.dryRun;
85
+ logGray(`Hyperlane permissionless core deployment${dryRun ? ' dry-run' : ''}`);
86
+ logGray('------------------------------------------------');
87
+ if (dryRun)
88
+ await verifyAnvil();
89
+ try {
90
+ await runCoreDeploy({
91
+ key,
92
+ chainConfigPath,
93
+ chains,
94
+ artifactsPath,
95
+ ismConfigPath,
96
+ hookConfigPath,
97
+ outPath,
98
+ skipConfirmation,
99
+ dryRun,
100
+ });
101
+ }
102
+ catch (error) {
103
+ evaluateIfDryRunFailure(error, dryRun);
104
+ throw error;
105
+ }
103
106
  process.exit(0);
104
107
  },
105
108
  };
@@ -107,35 +110,44 @@ const coreCommand = {
107
110
  * Warp command
108
111
  */
109
112
  const warpCommand = {
110
- command: 'warp',
113
+ command: Command.WARP,
111
114
  describe: 'Deploy Warp Route contracts',
112
115
  builder: (yargs) => yargs.options({
113
- config: {
114
- type: 'string',
115
- description: 'A path to a JSON or YAML file with a warp route deployment config.',
116
- default: './configs/warp-route-deployment.yaml',
117
- },
116
+ config: warpConfigCommandOption,
118
117
  core: coreArtifactsOption,
119
118
  chains: chainsCommandOption,
120
119
  out: outDirCommandOption,
121
120
  key: keyCommandOption,
122
121
  yes: skipConfirmationOption,
122
+ 'dry-run': dryRunOption,
123
123
  }),
124
124
  handler: async (argv) => {
125
- const key = argv.key || ENV.HYP_KEY;
125
+ const key = argv.key;
126
126
  const chainConfigPath = argv.chains;
127
127
  const warpRouteDeploymentConfigPath = argv.config;
128
128
  const coreArtifactsPath = argv.core;
129
129
  const outPath = argv.out;
130
130
  const skipConfirmation = argv.yes;
131
- await runWarpRouteDeploy({
132
- key,
133
- chainConfigPath,
134
- warpRouteDeploymentConfigPath,
135
- coreArtifactsPath,
136
- outPath,
137
- skipConfirmation,
138
- });
131
+ const dryRun = argv.dryRun;
132
+ logGray(`Hyperlane warp route deployment${dryRun ? ' dry-run' : ''}`);
133
+ logGray('------------------------------------------------');
134
+ if (dryRun)
135
+ await verifyAnvil();
136
+ try {
137
+ await runWarpRouteDeploy({
138
+ key,
139
+ chainConfigPath,
140
+ warpRouteDeploymentConfigPath,
141
+ coreArtifactsPath,
142
+ outPath,
143
+ skipConfirmation,
144
+ dryRun,
145
+ });
146
+ }
147
+ catch (error) {
148
+ evaluateIfDryRunFailure(error, dryRun);
149
+ throw error;
150
+ }
139
151
  process.exit(0);
140
152
  },
141
153
  };
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../../src/commands/deploy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAkB;IAC1C,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,6DAA6D;IACvE,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,OAAO,CAAC,WAAW,CAAC;SACpB,OAAO,CAAC,WAAW,CAAC;SACpB,OAAO,CAAC,YAAY,CAAC;SACrB,OAAO,CAAC,KAAK,CAAC;SACd,aAAa,EAAE;IACpB,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,kBAAkB,CAAC;CACvC,CAAC;AAEF;;GAEG;AACH,MAAM,YAAY,GAAkB;IAClC,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,uCAAuC;IACjD,OAAO,EAAE,CAA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C,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACtE,OAAO,CAAC,kDAAkD,CAAC,CAAC;QAE5D,IAAI,MAAM;YAAE,MAAM,WAAW,EAAE,CAAC;QAEhC,IAAI,CAAC;YACH,MAAM,kBAAkB,CAAC;gBACvB,GAAG;gBACH,eAAe;gBACf,6BAA6B;gBAC7B,iBAAiB;gBACjB,OAAO;gBACP,gBAAgB;gBAChB,MAAM;aACP,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,uBAAuB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;YACvC,MAAM,KAAK,CAAC;QACd,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;CACF,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { CommandModule } from 'yargs';
2
+ /**
3
+ * Parent command
4
+ */
5
+ export declare const hookCommand: CommandModule;
6
+ export declare const read: CommandModule;
7
+ //# sourceMappingURL=hook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/commands/hook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAatC;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,aAKzB,CAAC;AAOF,eAAO,MAAM,IAAI,EAAE,aAwBlB,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { readHookConfig } from '../hook/read.js';
2
+ import { log } from '../logger.js';
3
+ import { addressCommandOption, chainCommandOption, chainsCommandOption, fileFormatOption, outputFileOption, } from './options.js';
4
+ /**
5
+ * Parent command
6
+ */
7
+ export const hookCommand = {
8
+ command: 'hook',
9
+ describe: 'Operations relating to Hooks',
10
+ builder: (yargs) => yargs.command(read).version(false).demandCommand(),
11
+ handler: () => log('Command required'),
12
+ };
13
+ // Examples for testing:
14
+ // Fallback routing hook on polygon (may take 5s):
15
+ // hyperlane hook read --chain polygon --address 0xca4cCe24E7e06241846F5EA0cda9947F0507C40C
16
+ // IGP hook on inevm (may take 5s):
17
+ // hyperlane hook read --chain inevm --address 0x19dc38aeae620380430C200a6E990D5Af5480117
18
+ export const read = {
19
+ command: 'read',
20
+ describe: 'Reads onchain Hook configuration for a given address',
21
+ builder: (yargs) => yargs.options({
22
+ chains: chainsCommandOption,
23
+ chain: {
24
+ ...chainCommandOption,
25
+ demandOption: true,
26
+ },
27
+ address: addressCommandOption('Address of the Hook to read.', true),
28
+ format: fileFormatOption,
29
+ output: outputFileOption(),
30
+ }),
31
+ handler: async (argv) => {
32
+ await readHookConfig({
33
+ chain: argv.chain,
34
+ address: argv.address,
35
+ chainConfigPath: argv.chains,
36
+ format: argv.format,
37
+ output: argv.output,
38
+ });
39
+ process.exit(0);
40
+ },
41
+ };
42
+ //# sourceMappingURL=hook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hook.js","sourceRoot":"","sources":["../../../src/commands/hook.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAkB;IACxC,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,8BAA8B;IACxC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,aAAa,EAAE;IACtE,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,kBAAkB,CAAC;CACvC,CAAC;AAEF,wBAAwB;AACxB,kDAAkD;AAClD,+FAA+F;AAC/F,mCAAmC;AACnC,6FAA6F;AAC7F,MAAM,CAAC,MAAM,IAAI,GAAkB;IACjC,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,sDAAsD;IAChE,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK,CAAC,OAAO,CAAC;QACZ,MAAM,EAAE,mBAAmB;QAC3B,KAAK,EAAE;YACL,GAAG,kBAAkB;YACrB,YAAY,EAAE,IAAI;SACnB;QACD,OAAO,EAAE,oBAAoB,CAAC,8BAA8B,EAAE,IAAI,CAAC;QACnE,MAAM,EAAE,gBAAgB;QACxB,MAAM,EAAE,gBAAgB,EAAE;KAC3B,CAAC;IACJ,OAAO,EAAE,KAAK,EAAE,IAAS,EAAE,EAAE;QAC3B,MAAM,cAAc,CAAC;YACnB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,eAAe,EAAE,IAAI,CAAC,MAAM;YAC5B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;CACF,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { CommandModule } from 'yargs';
2
+ /**
3
+ * Parent command
4
+ */
5
+ export declare const ismCommand: CommandModule;
6
+ export declare const read: CommandModule;
7
+ //# sourceMappingURL=ism.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ism.d.ts","sourceRoot":"","sources":["../../../src/commands/ism.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAatC;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,aAKxB,CAAC;AASF,eAAO,MAAM,IAAI,EAAE,aA2BlB,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { readIsmConfig } from '../ism/read.js';
2
+ import { log } from '../logger.js';
3
+ import { addressCommandOption, chainCommandOption, chainsCommandOption, fileFormatOption, outputFileOption, } from './options.js';
4
+ /**
5
+ * Parent command
6
+ */
7
+ export const ismCommand = {
8
+ command: 'ism',
9
+ describe: 'Operations relating to ISMs',
10
+ builder: (yargs) => yargs.command(read).version(false).demandCommand(),
11
+ handler: () => log('Command required'),
12
+ };
13
+ // Examples for testing:
14
+ // Top-level aggregation ISM on celo (may take 10s)
15
+ // hyperlane ism read --chain celo --address 0x99e8E56Dce3402D6E09A82718937fc1cA2A9491E
16
+ // Aggregation ISM for bsc domain on inevm (may take 5s)
17
+ // hyperlane ism read --chain inevm --address 0x79A7c7Fe443971CBc6baD623Fdf8019C379a7178
18
+ // Test ISM on alfajores testnet
19
+ // hyperlane ism read --chain alfajores --address 0xdB52E4853b6A40D2972E6797E0BDBDb3eB761966
20
+ export const read = {
21
+ command: 'read',
22
+ describe: 'Reads onchain ISM configuration for a given address',
23
+ builder: (yargs) => yargs.options({
24
+ chains: chainsCommandOption,
25
+ chain: {
26
+ ...chainCommandOption,
27
+ demandOption: true,
28
+ },
29
+ address: addressCommandOption('Address of the Interchain Security Module to read.', true),
30
+ format: fileFormatOption,
31
+ output: outputFileOption(),
32
+ }),
33
+ handler: async (argv) => {
34
+ await readIsmConfig({
35
+ chain: argv.chain,
36
+ address: argv.address,
37
+ chainConfigPath: argv.chains,
38
+ format: argv.format,
39
+ output: argv.output,
40
+ });
41
+ process.exit(0);
42
+ },
43
+ };
44
+ //# sourceMappingURL=ism.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ism.js","sourceRoot":"","sources":["../../../src/commands/ism.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAkB;IACvC,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,6BAA6B;IACvC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,aAAa,EAAE;IACtE,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,kBAAkB,CAAC;CACvC,CAAC;AAEF,wBAAwB;AACxB,mDAAmD;AACnD,2FAA2F;AAC3F,wDAAwD;AACxD,4FAA4F;AAC5F,gCAAgC;AAChC,gGAAgG;AAChG,MAAM,CAAC,MAAM,IAAI,GAAkB;IACjC,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,qDAAqD;IAC/D,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK,CAAC,OAAO,CAAC;QACZ,MAAM,EAAE,mBAAmB;QAC3B,KAAK,EAAE;YACL,GAAG,kBAAkB;YACrB,YAAY,EAAE,IAAI;SACnB;QACD,OAAO,EAAE,oBAAoB,CAC3B,oDAAoD,EACpD,IAAI,CACL;QACD,MAAM,EAAE,gBAAgB;QACxB,MAAM,EAAE,gBAAgB,EAAE;KAC3B,CAAC;IACJ,OAAO,EAAE,KAAK,EAAE,IAAS,EAAE,EAAE;QAC3B,MAAM,aAAa,CAAC;YAClB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,eAAe,EAAE,IAAI,CAAC,MAAM;YAC5B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;CACF,CAAC"}
@@ -1,13 +1,48 @@
1
1
  import { Options } from 'yargs';
2
2
  export declare const logFormatCommandOption: Options;
3
3
  export declare const logLevelCommandOption: Options;
4
+ export type CommandOptions = {
5
+ chains: Options;
6
+ };
7
+ export type AgentCommandOptions = CommandOptions & {
8
+ origin: Options;
9
+ targets: Options;
10
+ config: Options;
11
+ };
12
+ export type CoreCommandOptions = CommandOptions & {
13
+ targets: Options;
14
+ artifacts: Options;
15
+ ism: Options;
16
+ hook: Options;
17
+ out: Options;
18
+ key: Options;
19
+ yes: Options;
20
+ 'dry-run': Options;
21
+ };
22
+ export type WarpCommandOptions = CommandOptions & {
23
+ config: Options;
24
+ core: Options;
25
+ out: Options;
26
+ key: Options;
27
+ yes: Options;
28
+ 'dry-run': Options;
29
+ };
30
+ export declare const coreTargetsCommandOption: Options;
31
+ export declare const agentTargetsCommandOption: Options;
32
+ export declare const originCommandOption: Options;
33
+ export declare const ismCommandOption: Options;
34
+ export declare const hookCommandOption: Options;
35
+ export declare const warpConfigCommandOption: Options;
4
36
  export declare const keyCommandOption: Options;
5
37
  export declare const chainsCommandOption: Options;
6
38
  export declare const outDirCommandOption: Options;
7
39
  export declare const coreArtifactsOption: Options;
8
40
  export declare const warpConfigOption: Options;
9
- export declare const agentConfigurationOption: Options;
41
+ export declare const agentConfigCommandOption: Options;
10
42
  export declare const fileFormatOption: Options;
11
- export declare const outputFileOption: (defaultPath: string) => Options;
43
+ export declare const outputFileOption: (defaultPath?: string) => Options;
12
44
  export declare const skipConfirmationOption: Options;
45
+ export declare const dryRunOption: Options;
46
+ export declare const chainCommandOption: Options;
47
+ export declare const addressCommandOption: (description: string, demandOption?: boolean) => Options;
13
48
  //# sourceMappingURL=options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/commands/options.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAIhC,eAAO,MAAM,sBAAsB,EAAE,OAIpC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,OAInC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,OAK9B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,OAKj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AAG,EAAE,OAAO,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,OAItC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,OAGvC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,OAGjC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,OAI9B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,OAI/B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,OAMrC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,OAM9B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,OAKjC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,OAKjC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,OAIjC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,OAI9B,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,OAGtC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,OAM9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,iBAAkB,MAAM,KAAG,OAKtD,CAAC;AAEH,eAAO,MAAM,sBAAsB,EAAE,OAKpC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,OAK1B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,OAGhC,CAAC;AAEF,eAAO,MAAM,oBAAoB,gBAClB,MAAM,6BAElB,OAID,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { LogFormat, LogLevel } from '@hyperlane-xyz/utils';
2
+ import { ENV } from '../utils/env.js';
2
3
  export const logFormatCommandOption = {
3
4
  type: 'string',
4
5
  description: 'Log output format',
@@ -9,10 +10,38 @@ export const logLevelCommandOption = {
9
10
  description: 'Log verbosity level',
10
11
  choices: Object.values(LogLevel),
11
12
  };
13
+ export const coreTargetsCommandOption = {
14
+ type: 'string',
15
+ description: 'Comma separated list of chain names to which contracts will be deployed',
16
+ };
17
+ export const agentTargetsCommandOption = {
18
+ type: 'string',
19
+ description: 'Comma separated list of chains to relay between',
20
+ };
21
+ export const originCommandOption = {
22
+ type: 'string',
23
+ description: 'The name of the origin chain to deploy to',
24
+ };
25
+ export const ismCommandOption = {
26
+ type: 'string',
27
+ description: 'A path to a JSON or YAML file with basic or advanced ISM configs (e.g. Multisig)',
28
+ };
29
+ export const hookCommandOption = {
30
+ type: 'string',
31
+ description: 'A path to a JSON or YAML file with Hook configs (for every chain)',
32
+ };
33
+ export const warpConfigCommandOption = {
34
+ type: 'string',
35
+ description: 'A path to a JSON or YAML file with a warp route deployment config.',
36
+ default: './configs/warp-route-deployment.yaml',
37
+ alias: 'w',
38
+ };
12
39
  export const keyCommandOption = {
13
40
  type: 'string',
14
- description: 'A hex private key or seed phrase for transaction signing. Or use the HYP_KEY env var',
41
+ description: `Default: A hex private key or seed phrase for transaction signing, or use the HYP_KEY env var.
42
+ Dry-run: An address to simulate transaction signing on a forked network, or use the HYP_KEY env var.`,
15
43
  alias: 'k',
44
+ default: ENV.HYP_KEY,
16
45
  };
17
46
  export const chainsCommandOption = {
18
47
  type: 'string',
@@ -36,7 +65,7 @@ export const warpConfigOption = {
36
65
  description: 'File path to Warp config',
37
66
  alias: 'w',
38
67
  };
39
- export const agentConfigurationOption = {
68
+ export const agentConfigCommandOption = {
40
69
  type: 'string',
41
70
  description: 'File path to agent configuration artifacts',
42
71
  };
@@ -59,4 +88,18 @@ export const skipConfirmationOption = {
59
88
  default: false,
60
89
  alias: 'y',
61
90
  };
91
+ export const dryRunOption = {
92
+ type: 'string',
93
+ description: 'Chain name to fork and simulate deployment. Please ensure an anvil node instance is running during execution via `anvil`.',
94
+ alias: ['d', 'dr'],
95
+ };
96
+ export const chainCommandOption = {
97
+ type: 'string',
98
+ description: 'The specific chain to perform operations with.',
99
+ };
100
+ export const addressCommandOption = (description, demandOption = false) => ({
101
+ type: 'string',
102
+ description,
103
+ demandOption,
104
+ });
62
105
  //# sourceMappingURL=options.js.map
@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AE,QAAQ;IACd,WAAW,EAAE,4CAA4C;CAC1D,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAY;IACvC,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,oBAAoB;IACjC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM;IACf,KAAK,EAAE,GAAG;CACX,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,WAAoB,EAAW,EAAE,CAAC,CAAC;IAClE,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,kBAAkB;IAC/B,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,GAAG;CACX,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAY;IAC7C,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,2BAA2B;IACxC,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,GAAG;CACX,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAY;IACnC,IAAI,EAAE,QAAQ;IACd,WAAW,EACT,2HAA2H;IAC7H,KAAK,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAY;IACzC,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,gDAAgD;CAC9D,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,WAAmB,EACnB,YAAY,GAAG,KAAK,EACX,EAAE,CAAC,CAAC;IACb,IAAI,EAAE,QAAQ;IACd,WAAW;IACX,YAAY;CACb,CAAC,CAAC"}
@@ -1,6 +1,13 @@
1
- import { CommandModule } from 'yargs';
1
+ import { CommandModule, Options } from 'yargs';
2
2
  /**
3
3
  * Parent command
4
4
  */
5
5
  export declare const sendCommand: CommandModule;
6
+ export declare const selfrelay: Options;
7
+ /**
8
+ * Message command
9
+ */
10
+ export declare const messageOptions: {
11
+ [k: string]: Options;
12
+ };
6
13
  //# sourceMappingURL=send.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../src/commands/send.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAW,MAAM,OAAO,CAAC;AAc/C;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,aAUzB,CAAC"}
1
+ {"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../src/commands/send.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAa/C;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,aAUzB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,OAKvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CAuBlD,CAAC"}
@@ -2,7 +2,6 @@ import { ethers } from 'ethers';
2
2
  import { log } from '../logger.js';
3
3
  import { sendTestMessage } from '../send/message.js';
4
4
  import { sendTestTransfer } from '../send/transfer.js';
5
- import { ENV } from '../utils/env.js';
6
5
  import { chainsCommandOption, coreArtifactsOption, keyCommandOption, warpConfigOption, } from './options.js';
7
6
  /**
8
7
  * Parent command
@@ -17,10 +16,16 @@ export const sendCommand = {
17
16
  .demandCommand(),
18
17
  handler: () => log('Command required'),
19
18
  };
19
+ export const selfrelay = {
20
+ type: 'boolean',
21
+ description: 'Relay message on destination chain',
22
+ default: false,
23
+ alias: ['s', 'sr'],
24
+ };
20
25
  /**
21
26
  * Message command
22
27
  */
23
- const messageOptions = {
28
+ export const messageOptions = {
24
29
  key: keyCommandOption,
25
30
  origin: {
26
31
  type: 'string',
@@ -37,6 +42,7 @@ const messageOptions = {
37
42
  description: 'Timeout in seconds',
38
43
  default: 5 * 60,
39
44
  },
45
+ 'self-relay': selfrelay,
40
46
  quick: {
41
47
  type: 'boolean',
42
48
  description: 'Skip wait for message to be delivered',
@@ -55,7 +61,7 @@ const messageCommand = {
55
61
  },
56
62
  }),
57
63
  handler: async (argv) => {
58
- const key = argv.key || ENV.HYP_KEY;
64
+ const key = argv.key;
59
65
  const chainConfigPath = argv.chains;
60
66
  const coreArtifactsPath = argv.core;
61
67
  const origin = argv.origin;
@@ -63,6 +69,7 @@ const messageCommand = {
63
69
  const timeoutSec = argv.timeout;
64
70
  const skipWaitForDelivery = argv.quick;
65
71
  const messageBody = argv.messageBody;
72
+ const selfRelay = argv['selfrelay'];
66
73
  await sendTestMessage({
67
74
  key,
68
75
  chainConfigPath,
@@ -72,6 +79,7 @@ const messageCommand = {
72
79
  messageBody: ethers.utils.hexlify(ethers.utils.toUtf8Bytes(messageBody)),
73
80
  timeoutSec,
74
81
  skipWaitForDelivery,
82
+ selfRelay,
75
83
  });
76
84
  process.exit(0);
77
85
  },
@@ -100,7 +108,7 @@ const transferCommand = {
100
108
  },
101
109
  }),
102
110
  handler: async (argv) => {
103
- const key = argv.key || ENV.HYP_KEY;
111
+ const key = argv.key;
104
112
  const chainConfigPath = argv.chains;
105
113
  const coreArtifactsPath = argv.core;
106
114
  const warpConfigPath = argv.warp;
@@ -111,6 +119,7 @@ const transferCommand = {
111
119
  const wei = argv.wei;
112
120
  const recipient = argv.recipient;
113
121
  const skipWaitForDelivery = argv.quick;
122
+ const selfRelay = argv['self-relay'];
114
123
  await sendTestTransfer({
115
124
  key,
116
125
  chainConfigPath,
@@ -123,6 +132,7 @@ const transferCommand = {
123
132
  recipient,
124
133
  timeoutSec,
125
134
  skipWaitForDelivery,
135
+ selfRelay,
126
136
  });
127
137
  process.exit(0);
128
138
  },
@@ -1 +1 @@
1
- {"version":3,"file":"send.js","sourceRoot":"","sources":["../../../src/commands/send.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EA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