Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
/ crypti-js Public archive
forked from borispovod/crypti-js

A client-side transactions library for Crypti

Notifications You must be signed in to change notification settings

karmacoma/crypti-js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crypti JS

A client-side transactions library for Crypti. Allows transactions to be sent from within the browser, using a simple API.

Installation

git clone git@github.com:karmacoma/crypti-js.git
cd crypti-js
npm install

Tests

npm test

Tests written using mocha + schedule.js.

Usage

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

Create transaction

Send 1000 XCR to 1859190791819301C

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

Create second signature transaction

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

Create delegate transaction

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

Create vote transaction

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

Peers Communication

All transactions are sent to /api/peer/transactions using the POST method.

Example:

Method: POST
Content-Type: application/json

{
    "transaction" : {
        ...
    }
}

Authors

License

MIT

About

A client-side transactions library for Crypti

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%