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

@mozeyinedu/coinbase

v0.1.0

Published

coinbase api for transactions using oauth authentication (accesstoken)

Downloads

2

Readme

  • coinbase
    const Coinbase = require('@mozeyinedu/coinbase');
    const coinbase = new Coinbase({accessToken})

    require('dotenv').config()
    const accessToken = process.env.ACCESSTOKEN;

    async function run(){
        try{
            // get current user (current user is the user whose accesstoken is used)
            const res1 = await coinbase.user.getCurrentUser();

            // get current user oauth
            //const res2 = await coinbase.user.getCurrentUserOauth();

            // get any user whose user_id is provided
            //const res3 = await coinbase.user.getSelectedUser({user_id: '9da7a204-544e-5fd1-9a12-61176c5d4cd8'});

            // get the oauth of any user whose user_id is provided
            //const res4 = await coinbase.user.getSelectedUserOauth({user_id: '9da7a204-544e-5fd1-9a12-61176c5d4cd8'});

            //get all accounts of the current user
            //const res5 = await coinbase.account.getAccounts();

            //get a selected account of the current uses
            //const res6 = await coinbase.account.getAccount({account_id: '824afca5-6497-5a7e-a3e7-8b8cec1d22fa'});

            // get all wallet addresses of a selected account
            //const res7 = await coinbase.account.getWalletAddresses({account_id: '824afca5-6497-5a7e-a3e7-8b8cec1d22fa'});

            // get the selected wallet addresse (using the address_id) of a selected account (note: a wallet can has more than one wallet addresses, hence this will you to select only the wallet address whose address_id is provided)
            //const res8 = await coinbase.account.getSelectedWalletAddresse({account_id: '824afca5-6497-5a7e-a3e7-8b8cec1d22fa', address_id: "e1332f73-a490-5440-9cce-6c0488ad926d"});

            // list all transactions
            //const res9 = await coinbase.account.getTransactions({account_id: '824afca5-6497-5a7e-a3e7-8b8cec1d22fa'});

            // list a transactions
            //const res10 = await coinbase.account.getTransaction({account_id: '824afca5-6497-5a7e-a3e7-8b8cec1d22fa', transaction_id: "e1332f73-a490-5440-9cce-6c0488ad926d"});

            //send coins to other wallet outside of coinbase
            // provide the account_id of this user (user sending the coins, the owner of the accesstoken)
            // provide the receiving's wallet address e.g {to:  EGHkndcugkgjkjj5fgfgR}
            // provide the amount in string e.g {amount: 0.1}
            // provide the currency of the account e.g {currency: BTC}
            // const res12 = await coinbase.account.send({account_id: '5f10e9e5-02a0-526a-a24a-7fa53a2b8fe1', address_id: "e1332f73-a490-5440-9cce-6c0488ad926d", amount: '0.1', currency: 'BTC'});

            console.log(res1)
        }
        catch(err){
            console.log(err.message);
        }
    }

    run()