Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gasbit-alpha-sdk

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gasbit-alpha-sdk - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

7

package.json
{
"name": "gasbit-alpha-sdk",
"version": "0.0.1",
"version": "0.0.2",
"description": "",

@@ -18,3 +18,6 @@ "main": "src/index.js",

},
"homepage": "https://github.com/niltonheck/gasbit-alpha-sdk#readme"
"homepage": "https://github.com/niltonheck/gasbit-alpha-sdk#readme",
"dependencies": {
"axios": "^1.1.3"
}
}

@@ -0,6 +1,37 @@

const axios = require('axios').default;
module.exports = {
sendTransactions: () => {
alert('Send Transaction');
// ...
sendTransaction: ({
from,
to,
provider
}) => {
try {
let { data } = await axios.post(
"https://gasbit-demo-backend.herokuapp.com/message",
{ from, to }
);
// Sign the transaction
let signature = await provider.request({
method: "eth_signTypedData_v4",
params: [from, JSON.stringify(data)],
from: from
});
console.log("signature: " + signature);
let execute = await axios.post(
"https://gasbit-demo-backend.herokuapp.com/execute",
{
message: data.message,
signature: signature
}
);
console.log("execute: ", execute.data.tx.hash);
} catch (e) {
console.error(e);
}
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc