This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Path, Socket } from "@socket.tech/socket-v2-sdk"; | |
import { ethers } from "ethers"; | |
const PRIVATE_KEY = '<Paste your Private key here>' | |
const wallet = new ethers.Wallet(PRIVATE_KEY) | |
const socket = new Socket({ | |
apiKey: "72a5b4b0-e727-48be-8aa1-5da9d62fe635", | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/hex" | |
"fmt" | |
"github.com/maticnetwork/bor/rlp" | |
hmTypes "github.com/maticnetwork/heimdall/types" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const WebSocket = require('ws') | |
const ws = new WebSocket('wss://ws-mumbai.matic.today/') | |
ws.on('open', function open() { | |
ws.send('{"id": 1, "method": "eth_subscribe", "params": ["newDeposits", {}]}') | |
}) | |
ws.on('message', function incoming(data) { | |
console.log(data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"workbench.colorTheme": "Atom One Dark", | |
"editor.fontFamily": "FiraCode-Medium", | |
"editor.fontLigatures": true, | |
"editor.fontSize": 16, | |
"editor.scrollBeyondLastLine": false, | |
"editor.tabSize": 2, | |
"prettier-eslint.eslintIntegration": true, | |
"prettier.jsxSingleQuote": true, | |
"prettier.semi": false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import signUtil from "eth-sig-util" | |
const getLoginTypedData = ({ address, timestamp, primaryType }) => ({ | |
types: { | |
EIP712Domain: [ | |
{ name: 'name', type: 'string' }, | |
{ name: 'host', type: 'string' }, | |
{ name: 'version', type: 'string' }, | |
], | |
WebLogin: [ |