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

javalon

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

javalon - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

package.json
{
"name": "javalon",
"version": "1.0.4",
"version": "1.0.5",
"description": "javascript api for the avalon blockchain",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -103,4 +103,5 @@ # Javalon

To send a transaction to the network, you will need multiple steps. First you need to define your transaction and sign it.
```
// first you need to define your transaction
var newTx = {

@@ -115,14 +116,16 @@ type: javalon.TransactionType.FOLLOW,

newTx = javalon.sign(alice_key, 'alice', newTx)
// after this step, the transaction is forged with a timestamp, hash, and signature
// and the transaction needs to be sent in the next 60 secs or will be forever invalid
// finally you send it with
```
After this step, the transaction is forged with a timestamp, hash, and signature. This transaction needs to be sent in the next 60 secs or will be forever invalid.
You can send it like so
```
javalon.sendTransaction(newTx, function(err, res) {
// and it should answer once the transaction is fully validated and included in a block !
cb(err, res)
})
```
The callback will return once your transaction has been included in a new block.
// alternatively, if you just want to send the transaction without waiting for validation
Alternatively, you can just want the callback as soon as the receiving node has it, you can do:
```
javalon.sendRawTransaction(newTx, function(err, res) {
// and it will answer quickly with the current head block
cb(err, res)

@@ -129,0 +132,0 @@ })

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