npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@arianee/arianee-server

v0.0.1-beta

Published

[![Build Status](https://travis-ci.org/Arianee/arianee-server.svg?branch=master)](https://travis-ci.org/Arianee/arianee-server)

Downloads

4

Readme

Build Status

What is it?

use arianeejs with http

post(nameOfMethod,[params])

ex post('url.com/requestPoa)

process.env

process.env.useBDH => url of bdh to use bdh vault apiKey => to pass in header chain => testnet, mainnet...etc privateKey => private key of wallet


title: Wallet sidebar_label: Wallet

Authentification with ApiKey

To interact with Arianee-server, you need a an apiKey. and pass it in header field authorization

curl GET https://arianeeexample.cleverapps.io/hello -H "authorization: Basic YourApiKey"
// output: world

Calling methods

All methods available in arianeeJS's wallet object can be called in http. Obviously you cannot call method like fromRandomKey, or useBDH. These methods are set with environment variables.

List of availables endpoints

  • GET /hello
  • POST /publicKey
  • POST /createCertificate
  • POST /getMyCertificates
  • POST /getCertificate
  • POST /requestPoa
  • POST /requestAria
  • POST /approveStore
  • POST /refuseArianeeEvent
  • POST /requestCertificateOwnership
  • POST /getMessageSenders
  • POST /acceptArianeeEvent
  • POST /createCertificateRequestOwnershipLink
  • POST /storeContentInRPCServer
  • POST /setMessageAuthorizationFor
  • POST /getIdentity
  • POST /getMyCertificatesGroupByIssuer
  • POST /isCertificateOwnershipRequestable
  • POST /isCertificateProofValid
  • POST /getCertificateFromLink
  • POST /buyCredits
  • POST /balanceOfAria
  • POST /balanceOfPoa
  • POST /storeArianeeEvent
  • POST /createCertificateProofLink
  • POST /createArianeeEvent

Methods, endpoints and parameters

Method without parameters

For method without parameter, just call method with empty parameters

curl -H Content-Type:application/json -H "authorization: Basic YourApiKey" POST https://arianeeexample.cleverapps.io/publicKey 
// output: 0xAC6943CEA275E8392c49905c960e580CfEaC0bd5

Method with parameters

You just need to pass data as an array. Parameters are exactly the same as arianeeJS doc.

curl POST https://arianeeexample.cleverapps.io/buyCredits -H Content-Type:application/json -H "authorization: Basic YourApiKey" -d "["certificate",1]"

Example

Create event: createArianeeEvent

curl POST https://arianeeexample.cleverapps.io/createArianeeEvent -H Content-Type:application/json -H "authorization: Basic YourApiKey" 
-d "[{certificateId:certificateId,
                   content:{
                       $schema:'https://cert.arianee.org/version1/ArianeeEvent-i18n.json',
                       title:'My Title'
                   }
               }]"

store Arianee event content: storeArianeeEvent

curl POST https://arianeeexample.cleverapps.io/storeArianeeEvent -H Content-Type:application/json -H "authorization: Basic YourApiKey" 
-d "["YourCertificateId",yourArianeeEventId,"yourArianeeEventContent","https://arianee.cleverapps.io/arianeetestnet/rpc"]"

Middleware logs

You can log before and after request:

app.logBefore=(req,res,next)=>{
    console.log("before");
    next();
}

app.logAfter=(req,res,next)=>{
    console.log("after");

    console.log(req.inError) // careful with error. Sometimes they are not well propagated
    next();
}

app.listen(port, () => console.log(`Example app listening on port ${port}!`));