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

@nuveminc/pharos-sdk

v0.0.7

Published

<p style="text-align:center"> </span> <img src="https://img.shields.io/github/actions/workflow/status/mkpace/npm-sdk/publish.yml" /> </span> <span> <img src="https://img.shields.io/npm/l/@nuveminc/pharos-sdk" /> </span> <span>

Downloads

16

Readme

Polymesh Core Principles

The Polymesh network operates on a few principles which are distinct and separate from your typical public chains such as Bitcoin or Ethereum. These principles are specific to Polymesh as they are core primitives by which a security token network is able to provide an institutional grade permissioned blockchain.

Identity (uID)

Every user on the Polymesh network has a unique user Id (uID). This unique id is assigned to a user whether they are a juridical person or a natural person. Each of these identities can control one or more accounts on the network. Each uID is verified by a KYC provider which guarantees and uniquely identifies that entity or individual. A KYC provider will issue attestations for the specific entity or user. These signed attestations are evidence of the KYC provider testifying to their review process.

Account (DID)

Each entity or individual can control one or more accounts on the network. Each of these accounts is represented by a DID which also maps to a single uID.

Signing Keys

Each identity uID has a single primary key they use to sign transactions when acting on behalf of themselves. An identity can also posess multiple secondary keys (signing keys) which allow the user (uID) to act on behalf of another entity or individual.

Each of these keys (primary or secondary) can be one of two types:

  • simple private key: based on a seed or mnemonic and is sufficient for an individual.
  • mulit-signature key: that is based on n-keys of which q, a quorum, must be presented for any action to be validated.

Portfolios

Portfolios are logical containers which are managed by DIDs. These portfolios provide a way to manage assets and create permission boundaries for various assets held in portfolios.

PharosDEX SDK

The PharosDEX SDK provides the abstractions and interfaces to simplify interaction with the PharosDEX contracts on the Polymesh network. The PharosDEX assist you with developing your own web application to provide investors with an easy to use user interface for interacting with the PharosDEX.

Installation

Installing the PharosDEX SDK with pnpm:

$ pnpm i --save @pharos/sdk

Installing the PharosDEX SDK with npm:

$ npm i --save @pharos/sdk

Installing the PharosDEX SDK with yarn:

$ yarn add @pharos/sdk

Pool Deployer / Contract Deployer

Using a contract deployer account

  1. Create a new "pool" contract for the two ticker symbols

    1.1 The contract creates a venue and and portfolio ** what are these?

  2. Deploy the contract and get the contract address

  3. Grant permission for the contract to create a venue and portfolio

  4. Add a name for the porfolio and initialize the portfolio contract

Liquidity Provider

Using the LP account

A Custody Portfolio (CP) is required to be created because funds can't be transferred unless the pool has custody of a portfolio that is owned by the user.

Each and every pool will need to use a CP contract to allow the transfer of funds from the user to the pool.

LP Account (grants custody) => Custody Portfolio (proxy) => Pool (is able to transfer from portfolio)

  1. Create a CP so the CP contract can transfer. Name portfolio
  2. Grant the newly created CP contract custody of the user account to allow transfer of tokens to the pool.
  3. Accept custody is manual as the Custody Portfolio must "accept" custody from the user account.

Adding Liquidity

Adding tokens to the liquidity pool requires transferring tokens from their Default Portfolio account (DP) to the CP then transferring those tokens from the CP to the pool.

  1. A user must transfer tokens from their "default" portfolio (DP) to the custody portfolio to allow the pool to gain access to those tokens. Recall that the pool contract requires access (granted permission) to access the Custody Portfolio contract (CP)