0.0.15 • Published 6 years ago

celadon v0.0.15

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

Installation

$ npm i --save celadon

Usage

import { trasactionWithCeledon, donateTo } from 'celadon';
console.log(NPOs)
// [
//   // special wallet
//   'celadon_wallet',
//   'cosmos_wallet',
//   'impacthub_wallet',
//   'andy_wallettttttt'
// ]

export default function handler(state, tx) {
  // verify the tx
  // secp256k1.verify(tx.data, tx.signature, tx.data.from)

  let senderAddress = tx.data.from.toString('hex')
  let receiverAddress = tx.data.to.toString('hex')
  trasactionWithCeledon(state, {
    from: senderAddress,
    to: receiverAddress,
    org: donateTo(NPOs),
    feePortion: tx.data.feePortion,
    amount: tx.data.amount
  })
}

<!-- customize NPOs -->
donateTo() // default to celadon_wallet
donateTo('cosmos_wallet')
donateTo(['cosmos_wallet', 'impacthub_wallet', 'andy_wallettttttt'])

In the lotionjs

import lotion from 'lotion';
import handler from './handler';

let app = lotion({ 
  devMode: true,
  initialState: {
    ...data
  }
});

app.use(handler);
app.listen(3000);

Walkthrough

introduction - celadon

Join the NPOs wallet list

Author

reforest

Resources

Standard

JavaScript Style Guide

License

MIT

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago