forked from manoj-vaionex/socket-notification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
token-sender.js
25 lines (21 loc) · 903 Bytes
/
token-sender.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const axios = require('axios').default;
const relysiaEndpoint = 'https://api.relysia.com';
(async () => {
// Login int op account
const loginObject = await axios.post(`${relysiaEndpoint}/v1/auth`, {email: "test15@vaionex.com", password: "123456"});
// Send BSV to the receiver address
console.log('Sending BSV to the receiver address');
const sendResp = await axios.post(`${relysiaEndpoint}/v1/send`, {
"dataArray":[
{
"to":"2822@relysia.com", // Receiver address
"amount": 0.0000001, // Amount to send
"notes": "Good test token for BSV" // Notes to send
}
]
}, {headers: {
authToken: loginObject.data.data.token, // Auth token of sender
walletID: '00000000-0000-0000-0000-000000000000', // Wallet Id of the sender
}});
console.log('Send completed', sendResp.data);
})()