Giter VIP home page Giter VIP logo

katja's Introduction

Katja

A library for creating profitable decentralized applications

Katja offers a an easy-to-use wrapper to store and retrieve links on the Interplanetary File System. (IPFS)

Katja lets you...

Add data to IPFS.
Retrieve data from IPFS.
Resolve a peerID to get their data address
Generate your own dapp asset address
Pay anyone with dapp assets

TODO

-Implement IPFS Keystore for encrypting data and sharing it with trusted nodes.
-Namecoin registration for PeerIDs

#All pull requests, issue creation, and advice are welcome.

Install

$ go get -u -d github.com/ilovelili/Katja

Katja depends on IPFS and CoinPrism

Usage

//Start a node
node, err := Katja.StartNode()
	if err != nil {
		panic(err)
	}

//Add your text to IPFS (Creates MerkleDAG)
var userInput = r.Form["sometext"]
Key, err := Katja.AddString(node, userInput[0])

//Resolve PeerID to get MerkleDAG
pointsTo, err := Katja.GetDAG(node, node.Identity.Pretty())

//Get all your text from IPFS (Retrieves MerkleDAG)  
tweetArray, err := Katja.GetStrings(node, pointsTo.B58String())

//Pay another node (Arguments are - fee, your address, their address, amount, asset address, private keys)
hash := Katja.Pay("1000","1HihKUXo6UEjJzm4DZ9oQFPu2uVc9YK9Wh", "akSjSW57xhGp86K6JFXXroACfRCw7SPv637", "10", "AHthB6AQHaSS9VffkfMqTKTxVV43Dgst36", "L1jftH241t2rhQSTrru9Vd2QumX4VuGsPhVfSPvibc4TYU4aGdaa" )

//Generate an asset address
address := Katja.GenerateAddress()

//Get your current balance
balance := Katja.GetBalance("1HihKUXo6UEjJzm4DZ9oQFPu2uVc9YK9Wh")

katja's People

Contributors

min-cimpress avatar ilovelili avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.