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

@web3-onboard/cede-store

v2.2.0

Published

cede.store SDK wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic mod

Downloads

901

Readme

@web3-onboard/cede-store

CEX module for connecting cede.store through web3-onboard. Check out the cede.store Wallet Developer Docs for more information.

As cede.store is not a traditional 1193 wallet behavior is a little different from other wallets that connect through web3-onboard in that there is no on-chain user address to interact with and there isn't a specific chain associated. With this behavior dapp devs will need to handle accordingly and differently from traditional 1193 wallets. The dapp dev can expect the connect account to not be shown as a hex value (or at all) and the chain to always be 0x0 when a user connects with cede.store for that specific wallet account.

Install

npm i @web3-onboard/cede-store

Usage

import Onboard from '@web3-onboard/core'
import cedeStoreWalletModule from '@web3-onboard/cede-store'

const cedeStoreWallet = cedeStoreWalletModule()

const onboard = Onboard({
  // ... other Onboard options
  wallets: [
    cedeStoreWallet
    //... other wallets
  ]
})

const connectedWallets = await onboard.connectWallet()
console.log(connectedWallets)

Vault management

Vaults allow creating bundles of CEX accounts. The extension connects with CEX through CEX API keys and everything is stored in the Local Storage of the browser. Mobile and Ledger storage are coming soon. We can compare Vaults with the Keyring concept of Metamask.

A user can have multiple vaults with different CEX accounts inside. This system allows the user to give a dApp custom access to his accounts depending on the degree of trust he has in the dApp in question.

Let's say the user has three vaults: a main one with full access (track, trade, withdraw) to all his CEX, one just for tracking and one just for trading. If the user does not know the reputation of the dApp he is using, the most logical solution would be to give access only to the tracking vault so the dApp will not be able to initiate trade requests.

CEX connection

All requests are divided into two categories:

  • private requests
  • public requests

All public data, such as prices, volumes, historical data are collected from different exchanges and streamed in real time through our API.

All private requests, such as user balances, trades, open positions are coming from cede.store (from the user's machine).

You can access both public and private data through the extension's API. Cede.store handles all exchanges requests, as well as API keys secure storage.

Example of a workflow (fetch user's balances and transactions)

// Get available vaults and accounts
const { vaultPreview } = provider.getVaultPreviews()
console.log(vaultPreview)

// Fetch user's balances from Binance and Coinbase
const vaultId = vaultPreview[0].id
await provider.request({
  method: 'balances',
  params: {
    vaultId,
    accountNames: ['Binance 1', 'Coinbase 1']
  }
})

// Fetch user's transactions
await provider.request({
  method: 'transactions',
  params: {
    vaultId
  }
})