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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kinecosystem/jwt-service

v2.0.3

Published

A helper service for the creation of JWT needed to work with the Kin ecosystem SDKs

Readme

Kin ecosystem JWT service

A helper tool to create/sign JWT.
Tokens are needed, in some cases, when interacting with our marketplace server, and as a result of that, the tokens are also needed when working with our SDKs.

In order to make the first integration with our SDKs simpler we supply this service, which can easily be installed and used by anyone who wants to try integrating Kin into their app.

Keys

The repo contains private/public RSA keys and private/public stellar keys.
These keys are for testing porpuses only.

Install

npm install -g @kinecosystem/jwt-service

Run

jwt-service

Using the service

The service supports 4 endpoints:

offers

Returns a collection of made up offers:
GET SERVICE_URL/offers

Result:

{
    "offers": [
        {
            "id": "offer1",
            "title": "first offer",
            "amount": 10,
            "description": "the 1st test offer",
            "wallet_address": "GDC6UAWZETQRXDFJHHZS2O7JK2OQ3F5MNOZLHJP4TD7J6MB5Q2NH5YGU"
        },
        {
            "id": "offer2",
            "title": "second offer",
            "amount": 20,
            "description": "the 2nd test offer",
            "wallet_address": "GDC6UAWZETQRXDFJHHZS2O7JK2OQ3F5MNOZLHJP4TD7J6MB5Q2NH5YGU"
        },
        {
            "id": "offer1",
            "title": "third offer",
            "amount": 30,
            "description": "the 3rd test offer",
            "wallet_address": "GDC6UAWZETQRXDFJHHZS2O7JK2OQ3F5MNOZLHJP4TD7J6MB5Q2NH5YGU"
        }
    ]
}

earn

Returns a token which can be used to create an earn order:
GET SERVICE_URL/earn/token?user_id=userA&device_id=deviceA&offer_id=offer1&nonce=MyUniqueNonce

Result:

{
    "jwt": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCIsImtpZCI6ImRlZmF1bHQifQ.eyJ0eXAiOiJKV1QiLCJpZCI6Im9mZmVyMSIsInRpdGxlIjoidGhpcmQgb2ZmZXIiLCJhbW91bnQiOjMwLCJkZXNjcmlwdGlvbiI6InRoZSAzcmQgdGVzdCBvZmZlciIsIndhbGxldF9hZGRyZXNzIjoiR0RDNlVBV1pFVFFSWERGSkhIWlMyTzdKSzJPUTNGNU1OT1pMSEpQNFREN0o2TUI1UTJOSDVZR1UiLCJpYXQiOjE1MjM4NzI4MDYsImV4cCI6MTUyNTQxODI3OTE3MCwic3ViIjoic3BlbmQifQ.d2pEsXzWMr-XXNfnKYL52C-GscRMdIqtrETdpGc2R_TOnLcScXMLFU62HshP3hxZW88vi5JY42MszVApNmCQ_XI9XgVcZcAIYx6Ef63sO-e1WG8_oPRFFLwHf1p8VylArtkvaz2JkWbHVPQuCNdcwf31JUMVSqJZHGk6ez3KaSQ"
}

The user_id the id for the user which will receive the kin.
The device_id the id of the device for the user which will receive the kin.
The offer_id needs to match one of the offers which returns from the SERVICE_URL/offers endpoint.
The nonce is an optional id (string) which can be used to differentiate between multiple requests for the same offer_id.

spend

Returns a token which can be used to create a spend order:
GET SERVICE_URL/spend/token?user_id=userA&offer_id=offer1&device_id=deviceA&nonce=MyUniqueNonce

Result:

{
    "jwt": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCIsImtpZCI6ImRlZmF1bHQifQ.eyJ0eXAiOiJKV1QiLCJpZCI6Im9mZmVyMSIsInRpdGxlIjoidGhpcmQgb2ZmZXIiLCJhbW91bnQiOjMwLCJkZXNjcmlwdGlvbiI6InRoZSAzcmQgdGVzdCBvZmZlciIsIndhbGxldF9hZGRyZXNzIjoiR0RDNlVBV1pFVFFSWERGSkhIWlMyTzdKSzJPUTNGNU1OT1pMSEpQNFREN0o2TUI1UTJOSDVZR1UiLCJpYXQiOjE1MjM4NzI4MDYsImV4cCI6MTUyNTQxODI3OTE3MCwic3ViIjoic3BlbmQifQ.d2pEsXzWMr-XXNfnKYL52C-GscRMdIqtrETdpGc2R_TOnLcScXMLFU62HshP3hxZW88vi5JY42MszVApNmCQ_XI9XgVcZcAIYx6Ef63sO-e1WG8_oPRFFLwHf1p8VylArtkvaz2JkWbHVPQuCNdcwf31JUMVSqJZHGk6ez3KaSQ"
}

The user_id the id for the user which will send the kin.
The device_id the id of the device for the user which will send the kin. The offer_id needs to match one of the offers which returns from the SERVICE_URL/offers endpoint.
The nonce is an optional id (string) which can be used to differentiate between multiple requests for the same offer_id.

pay to user

Returns a token which can be used to create a p2p order:
GET SERVICE_URL/p2p/token?user_id=userA&device_id=deviceA&offer_id=offer1&amount=0.43&sender_title=paidTitle&sender_description=paid_desc&recipient_id=userB&recipient_title=receivedTitle&recipient_description=receivedDesc&nonce=MyUniqueNonce

Result:

{
    "jwt": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCIsImtpZCI6ImRlZmF1bHQifQ.eyJ0eXAiOiJKV1QiLCJpZCI6Im9mZmVyMSIsInRpdGxlIjoidGhpcmQgb2ZmZXIiLCJhbW91bnQiOjMwLCJkZXNjcmlwdGlvbiI6InRoZSAzcmQgdGVzdCBvZmZlciIsIndhbGxldF9hZGRyZXNzIjoiR0RDNlVBV1pFVFFSWERGSkhIWlMyTzdKSzJPUTNGNU1OT1pMSEpQNFREN0o2TUI1UTJOSDVZR1UiLCJpYXQiOjE1MjM4NzI4MDYsImV4cCI6MTUyNTQxODI3OTE3MCwic3ViIjoic3BlbmQifQ.d2pEsXzWMr-XXNfnKYL52C-GscRMdIqtrETdpGc2R_TOnLcScXMLFU62HshP3hxZW88vi5JY42MszVApNmCQ_XI9XgVcZcAIYx6Ef63sO-e1WG8_oPRFFLwHf1p8VylArtkvaz2JkWbHVPQuCNdcwf31JUMVSqJZHGk6ez3KaSQ"
}

The user_id the id for the user which will send the kin.
The device_id the id of the device for the user which will send the kin. The offer_id needs to match one of the offers which returns from the SERVICE_URL/offers endpoint. The amount is how many kin this payment represents. The sender_title is the title which the sender will see.
The sender_description is the description which the sender will see.
The recipient_id the id of the user which will receive the kin.
The recipient_title is the title which the recipient will see.
The recipient_description is the description which the recipient will see.
The nonce is an optional id (string) which can be used to differentiate between multiple requests for the same offer_id.

register

Returns a token which can be used to register a user:
GET SERVICE_URL/register/token?user_id=aUserID&device_id=deviceA

Result:

{
    "jwt": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCIsImtpZCI6ImRlZmF1bHQifQ.eyJ0eXAiOiJKV1QiLCJ1c2VyX2lkIjoiYVVzZXJJRCIsImlhdCI6MTUyMzg3Mjk5NSwiZXhwIjoxNTI1NDE4NDY4Mzc2LCJzdWIiOiJyZWdpc3RlciJ9.RenNzwLk7DQCi-U3vXZO4d-4pM4nA1X-RW3JHGWq3BNRLOrzePQZ7O6VgW7wV2-YBPjR9UEAU9XrKs8FT7DYDzgfQA5iFOpEHRlDoiILmwPrje601BE5LGvoNPR4HI4bIPgDiw2-XuIqqNXRVCx4oWqR_p_ex8GEA95ty0aoP4Q"
}

sign

Returns a token for a posted arbitrary payload (and subject):
POST '{"subject":"a subject", "payload":{"key1":"value1"}}' SERVICE_URL/sign

Result:

{
    "jwt":"eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCIsImtpZCI6ImRlZmF1bHQifQ.eyJ0eXAiOiJKV1QiLCJrZXkxIjoidmFsdWUxIiwiaWF0IjoxNTIzODczMjEzLCJleHAiOjE1MjU0MTg2ODY5MTQsInN1YiI6ImEgc3ViamVjdCJ9.KzkD8VSHNZmo0H6Mb5a83OEiaDKUugO3R7Z2JN4GJh7YepH_gz0-sZ0YlLffvYnohwhciysJ9wtcwJ8YwbO7sedObmdZbezEYaBBowaezGzIMJeZc9erfTWu7aYP_-je-DpyVbY1lLvoFF8AufF7xPmYQQweYqFGhIp-9AHtKds"
}

Configuration

The service can be configured by changing the config/default.json file.

The most important of which are the:

  • port: on which port this service will be bound to
  • offers: the collection of offers which are returned in the /offer endpoint and which are signed when calling the /spend?offer_id={ ID } endpoint
  • private_keys: the keys which will be used for signing the tokens