You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// value: "Register your validator node on the discord server\n• Run without parameters for detailed registration instructions\n• Or use with:\n`address` - Your validator address\n`block-number` - Block number for verification\n`proof` - Your sync proof",
52
+
// inline: false,
53
+
// },
54
+
// ])
55
+
// .setFooter({
56
+
// text: "Use these commands to manage your node operations",
57
+
// })
58
+
// .setTimestamp();
59
+
60
+
// await interaction.editReply({
61
+
// embeds: [helpEmbed],
62
+
// });
63
+
64
+
// return "Operator help information displayed successfully";
value: "Display this help message with available commands",
94
+
name: "📋 Step 1: Get the latest proven block number",
95
+
value: '```bash\ncurl -s -X POST -H \'Content-Type: application/json\' \\\n-d \'{"jsonrpc":"2.0","method":"node_getL2Tips","params":[],"id":67}\' \\\n<your-node>:<your-port> | jq -r ".result.proven.number"\n```\n• Replace `<your-node>:<your-port>` with your node\'s URL, for example `http://localhost:8545` or `https://mynode.example.com:8545`\n• Save this block number for the next steps\n• Example output: `12345`',
96
+
inline: false,
97
+
},
98
+
{
99
+
name: "🔍 Step 2: Generate your sync proof",
100
+
value: '```bash\ncurl -s -X POST -H \'Content-Type: application/json\' \\\n-d \'{"jsonrpc":"2.0","method":"node_getArchiveSiblingPath","params":["<block-number>","<block-number>"],"id":67}\' \\\n<your-node>:<your-port> | jq -r ".result"\n```\n• Replace `<your-node>:<your-port>` with the same URL you used in Step 1\n• Replace both instances of `<block-number>` with the number from Step 1 (example: 12345)\n• This will output a long base64-encoded string - copy it completely\n• Example command with values filled in:\n```bash\ncurl -s -X POST -H \'Content-Type: application/json\' \\\n-d \'{"jsonrpc":"2.0","method":"node_getArchiveSiblingPath","params":["12345","12345"],"id":67}\' \\\nhttp://localhost:8545 | jq -r ".result"\n```',
value: "Get current information about the Sparta Network chain status",
104
+
name: "✅ Step 3: Register with Discord",
105
+
value: "Type the following command in this Discord server:\n```\n/operator register\n```\n**IMPORTANT**: After typing the command, Discord will display option fields that look like this:\n```\nOPTIONS\naddress Your validator address\nblock-number Block number for verification\nproof Your sync proof\n```\nClick on each option to fill in your information:\n• `address`: Your Ethereum validator address (must start with 0x, example: 0x1234567890abcdef1234567890abcdef12345678)\n• `block-number`: The block number from Step 1 (example: 12345)\n• `proof`: The complete base64 string from Step 2\n\n❗ **Common mistake**: Do not type all parameters in a single line. You must click on each option field separately to input your data.",
value: "Check your validator statistics and performance\n`address` - Your validator address (required)",
109
+
name: "💡 Tips for Success",
110
+
value: "• Ensure your node is fully synced before attempting registration\n• Double-check your validator Ethereum address format (must begin with 0x followed by 40 hex characters)\n• Make sure to copy the entire proof string without missing any characters\n• If you don't have jq installed, you can omit the `| jq` part and extract the needed values manually\n• If registration fails, try generating a new proof with a more recent block\n• Common errors: incorrect URL format, node not synced, or incomplete proof string",
value: "Register your validator node on the discord server\n• Run without parameters for detailed registration instructions\n• Or use with:\n`address` - Your validator address\n`block-number` - Block number for verification\n`proof` - Your sync proof",
114
+
name: "🛠️ Troubleshooting",
115
+
value: "• If you get `Connection refused`: Check that your node is running and the URL is correct\n• If your proof is invalid: Ensure your node is fully synced and try again with a newer block\n• If you can't format the commands properly: Ask for help in the support channel",
52
116
inline: false,
53
117
},
54
-
])
55
-
.setFooter({
56
-
text: "Use these commands to manage your node operations",
57
-
})
58
-
.setTimestamp();
118
+
]);
59
119
60
120
awaitinteraction.editReply({
61
-
embeds: [helpEmbed],
121
+
embeds: [registrationEmbed],
62
122
});
63
123
64
-
return"Operator help information displayed successfully";
* Display detailed instructions for validator registration
14
-
*/
15
-
exportasyncfunctionshowRegistrationHelp(
16
-
interaction: ChatInputCommandInteraction
17
-
): Promise<string>{
18
-
try{
19
-
// Create a registration instructions embed
20
-
constregistrationEmbed=newEmbedBuilder()
21
-
.setTitle("📝 How to Get the Apprentice Role")
22
-
.setDescription(
23
-
"Follow these simple steps to generate a sync proof and register your validator node on the Discord server"
24
-
)
25
-
.setColor(0x4bb543)// Green color
26
-
.addFields([
27
-
{
28
-
name: "📋 Step 1: Get the latest proven block number",
29
-
value: '```bash\ncurl -s -X POST -H \'Content-Type: application/json\' \\\n-d \'{"jsonrpc":"2.0","method":"node_getL2Tips","params":[],"id":67}\' \\\n<your-node>:<your-port> | jq -r ".result.proven.number"\n```\n• Replace `<your-node>:<your-port>` with your node\'s URL, for example `http://localhost:8545` or `https://mynode.example.com:8545`\n• Save this block number for the next steps\n• Example output: `12345`',
30
-
inline: false,
31
-
},
32
-
{
33
-
name: "🔍 Step 2: Generate your sync proof",
34
-
value: '```bash\ncurl -s -X POST -H \'Content-Type: application/json\' \\\n-d \'{"jsonrpc":"2.0","method":"node_getArchiveSiblingPath","params":["<block-number>","<block-number>"],"id":67}\' \\\n<your-node>:<your-port> | jq -r ".result"\n```\n• Replace `<your-node>:<your-port>` with the same URL you used in Step 1\n• Replace both instances of `<block-number>` with the number from Step 1 (example: 12345)\n• This will output a long base64-encoded string - copy it completely\n• Example command with values filled in:\n```bash\ncurl -s -X POST -H \'Content-Type: application/json\' \\\n-d \'{"jsonrpc":"2.0","method":"node_getArchiveSiblingPath","params":["12345","12345"],"id":67}\' \\\nhttp://localhost:8545 | jq -r ".result"\n```',
35
-
inline: false,
36
-
},
37
-
{
38
-
name: "✅ Step 3: Register with Discord",
39
-
value: "Type the following command in this Discord server:\n```\n/operator register\n```\n**IMPORTANT**: After typing the command, Discord will display option fields that look like this:\n```\nOPTIONS\naddress Your validator address\nblock-number Block number for verification\nproof Your sync proof\n```\nClick on each option to fill in your information:\n• `address`: Your Ethereum validator address (must start with 0x, example: 0x1234567890abcdef1234567890abcdef12345678)\n• `block-number`: The block number from Step 1 (example: 12345)\n• `proof`: The complete base64 string from Step 2\n\n❗ **Common mistake**: Do not type all parameters in a single line. You must click on each option field separately to input your data.",
40
-
inline: false,
41
-
},
42
-
{
43
-
name: "💡 Tips for Success",
44
-
value: "• Ensure your node is fully synced before attempting registration\n• Double-check your validator Ethereum address format (must begin with 0x followed by 40 hex characters)\n• Make sure to copy the entire proof string without missing any characters\n• If you don't have jq installed, you can omit the `| jq` part and extract the needed values manually\n• If registration fails, try generating a new proof with a more recent block\n• Common errors: incorrect URL format, node not synced, or incomplete proof string",
45
-
inline: false,
46
-
},
47
-
{
48
-
name: "🛠️ Troubleshooting",
49
-
value: "• If you get `Connection refused`: Check that your node is running and the URL is correct\n• If your proof is invalid: Ensure your node is fully synced and try again with a newer block\n• If you can't format the commands properly: Ask for help in the support channel",
0 commit comments