Skip to content

borispovod/crypti-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crypti-js

Crypti Pure JS Transactions library. Send transactions from browser. Yeah, yeah!

Installation

To installation run:

npm install crypti-js

Tests

To run tests use command:

npm test

Tests written in mocha + schedule.js

How to use

Each function call has secondSecret parameter, this parameter is optional.

Create transaction

Send 1000 XCR to 1859190791819301C

var crypti = require('crypti');
var transaction = crypti.transaction.createTransaction("1859190791819301C", 1000, "secret", "secondSecret");

Create second signature transaction

var crypti = require('crypti');
var transaction = crypti.transaction.createTransaction("secret", "secondSecret");

Create delegate transaction

var crypti = require('crypti');
var transaction = crypti.transaction.createDelegate("secret", "username", "secondSecret");

Create vote transaction

var crypti = require('crypti');
var transaction = createVote("secret", ["+58199578191950019299181920120128129"], "secondSecret");

Communication with peers

All transactions most go to /peer/transactions with method "POST"

Example:

Method: POST
Content-Type: application/json

{
    "transaction" : {
        .....
    }
}

License

MIT

About

Crypti pure js functional

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published