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

cobo-api

v1.0.2

Published

A library for interacting with the Cobo API with Ed25519 signing

Readme

Cobo API Library

Biblioteca TypeScript para interagir com a API da Cobo, permitindo criar wallets, gerar endereços e realizar requisições seguras com assinatura Ed25519.

Instalação

npm install cobo-api

Nota: O api_secret deve ser uma chave privada Ed25519 de 32 bytes (64 caracteres hexadecimais). Acesse a documentação da Cobo para maiores informações.

Uso

import CoboAPI from 'cobo-api';
import { CoboEnvironment, CoboWalletType, CoboWalletSubtype } from 'cobo-api/types';

const coboApi = new CoboAPI({
    apiKey: 'sua_api_key',
    apiSecret: 'sua_chave_privada_ed25519',
    environment: CoboEnvironment.DEV // ou SANDBOX, PROD
});

Criar uma Wallet

const wallet = await coboApi.createWallet({
    name: 'Minha Wallet',
    wallet_type: CoboWalletType.MPC,
    wallet_subtype: CoboWalletSubtype.ORG_CONTROLLED,
    vault_id: 'seu_vault_id'
});
console.log(wallet);

Criar um Endereço

const addresses = await coboApi.createAddress(wallet.wallet_id, 'ETH', 1);
console.log(addresses);

Ambientes Disponíveis

| Ambiente | URL Base | |----------|----------| | CoboEnvironment.DEV | https://api.dev.cobo.com/v2 | | CoboEnvironment.SANDBOX | https://api.sandbox.cobo.com/v2 | | CoboEnvironment.PROD | https://api.cobo.com/v2 |

Tipos de Wallet

CoboWalletType

| Tipo | Valor | Descrição | |------|-------|-----------| | CUSTODIAL | "Custodial" | Custodial Wallets | | MPC | "MPC" | MPC Wallets | | SMART_CONTRACT | "SmartContract" | Smart Contract Wallets | | EXCHANGE | "Exchange" | Exchange Wallets |

CoboWalletSubtype

| Subtipo | Valor | Descrição | |---------|-------|-----------| | ASSET | "Asset" | Custodial Wallets (Asset Wallets) | | WEB3 | "Web3" | Custodial Wallets (Web3 Wallets) | | ORG_CONTROLLED | "Org-Controlled" | MPC Wallets (Organization-Controlled) | | USER_CONTROLLED | "User-Controlled" | MPC Wallets (User-Controlled) | | SAFE_WALLET | "Safe{Wallet}" | Smart Contract Wallets (Safe) | | MAIN | "Main" | Exchange Wallets (Main Account) | | SUB | "Sub" | Exchange Wallets (Sub Account) |

Métodos da API

| Método | Descrição | |--------|-----------| | createWallet(params: CreateWalletRequest) | Cria uma nova wallet com os parâmetros especificados | | createAddress(walletId: string, chainId: string, count?: number) | Cria endereços para a wallet especificada |

Configuração

interface CoboAPIConfig {
    apiKey: string;      // Chave de API para autenticação
    apiSecret: string;   // Chave privada Ed25519 (seed de 32 bytes em hex)
    environment: CoboEnvironment; // Ambiente da API
}

Autenticação

Todas as requisições são automaticamente assinadas usando Ed25519. A biblioteca:

  1. Constrói a string de assinatura no formato: method|path|nonce|queryString|body
  2. Aplica duplo SHA256 hash
  3. Assina com a chave privada Ed25519
  4. Adiciona os headers Biz-Api-Key, Biz-Api-Nonce e Biz-Api-Signature

Licença

MIT License

Contribuições

Contribuições são bem-vindas! Abra uma issue ou envie um pull request.