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

@purple-pay/sdk

v0.1.6

Published

Purple Pay SDK

Downloads

2

Readme

Purple Pay Specification

Summary

A standardised implementation for encoding payment requests as URLs and QRs EIP 67 is used as a reference.

Direct Transfer Request

Direct Transfer Request is a URL encoding scheme which can be used by a wallet to directly create and inititate a transaction

For ERC20 transfers

ethereum:<tokenAddress>@<chainId>/transfer
    ?uint256=<amount>
    &address=<recipient>
    &label=<label>
    &message=<message>
    &redirectURL=<redirectURL>

For Native transfers

ethereum:<recipient>@<chainId>
    ?value=<amount>
    &label=<label>
    &message=<message>
    &redirectURL=<redirectURL>

Recipient

It is the address that is receiving the payment. To receive an ERC20 token (USDC), tokenAddress field needs to be populated.

Amount

Amount field is the amount of token to be transferred. It must be non-negative integer. Wallet should prompt the user for amount if value is not provided.

Token Address

tokenAddress field should contain the address of the ERC20 token being used to transfer the payment in.

Redirect URL

redirectURL field should be a URL-encoded absolute HTTPS or ethereum: URL.

This optional query paramaeter enables wallet to URL-decode the value and display it to the user.

This parameter is needed for exchange of information between the wallet and the merchant server to receive transaction hash, payment confirmation etc.

redirectURL should be followed only if the transaction is successful.

There may be atleast two following cases that can be encoded in this parameter:

  • If the redirect is a HTTPS URL then the wallet should open the URL using any browser.
  • This may be a browser included in the wallet. If it is a ethereum: URL then the wallet should treat it as a new Purple Pay request.

This needs to be paired with a signature scheme to ensure integrity of the wallet making the request to the server.

Label

label should be a URL-encoded UTF-8 string to describe the recipient of the transfer request (merchant, brand, store, application, individual).

This parameter is decoded and shown to the user by the wallet for additional context vis-a-vis the recipient/merchant

Message

message should be a URL-encoded UTF-8 string that describes the details of the transfer request.

This may contain item details, order details, acknowledgement of transaction completion for additional context. Collapse message.txt 3 KB This parameter is decoded and shown to the user by the wallet for additional context vis-a-vis the recipient/merchant

Message

message should be a URL-encoded UTF-8 string that describes the details of the transfer request.

This may contain item details, order details, acknowledgement of transaction completion for additional context.

Chain Id

chainId should be used to specify the chain handling the transaction.