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

@codedartdev/coinsentry-kyc-react

v0.1.2

Published

Headless React hook for CoinSentry universal KYC flow state, navigation, submit and upload helpers.

Readme

@codedartdev/coinsentry-kyc-react

Hook React headless para o KYC universal CoinSentry. O pacote entrega estado, navegacao permitida e helpers de submit/upload, mas nao renderiza layout nem decide fluxo localmente.

Responsabilidade

  • useCoinSentryKycFlow.
  • Preservar requirements resolvidos server-side como anchor.
  • Usar apenas endpoints de overview/status permitidos no browser.
  • Enviar steps pelos endpoints configurados pelo contrato do backend.
  • Expor submitCurrentStep e uploadForCurrentStep para UI customizada.
  • Expor estados isLoading, isRefreshing, isSubmitting, isUploading e error.

Fora Do Escopo

  • Wizard visual obrigatorio.
  • Componentes de formulario especificos da whitelabel.
  • Chamada browser para /api/v1/kyc/requirements.
  • Setters publicos para jurisdicao, customer type, client_flow ou proxima tela.

Uso Com Provider

'use client';

import { useCoinSentryKycFlow } from '@codedartdev/coinsentry-kyc-react';

export function MyKycWizard() {
  const flow = useCoinSentryKycFlow();

  if (flow.isLoading) return <Loading />;
  if (flow.configMissing) return <KycUnavailable />;
  if (!flow.activeStep) return <KycState status={flow.status?.status} />;

  return (
    <MyWizard step={flow.activeStep} progress={flow.progress}>
      <MyStepRenderer
        step={flow.activeStep}
        canOpenStep={flow.canOpenStep}
        goToStep={flow.goToStep}
        submit={flow.submitCurrentStep}
        upload={flow.uploadForCurrentStep}
        submitting={flow.isSubmitting}
        uploading={flow.isUploading}
        error={flow.error}
      />
    </MyWizard>
  );
}

Este modo usa o client e o initialKycOverview fornecidos pelo CoinSentryProvider.

Uso Com Client Explicito

import { createCoinSentryClient } from '@codedartdev/coinsentry-sdk';
import { useCoinSentryKycFlow } from '@codedartdev/coinsentry-kyc-react';

const client = createCoinSentryClient({ baseUrl: '/' });

export function StandaloneKyc({ initialOverview }) {
  const flow = useCoinSentryKycFlow({
    client,
    initialOverview,
    autoRefresh: false,
  });

  return <MyKycWizardView flow={flow} />;
}

Submit E Upload

await flow.submitCurrentStep(payload);
await flow.uploadForCurrentStep(formData);
  • submitCurrentStep envia payload para o endpoint do step ativo.
  • uploadForCurrentStep envia FormData pelo BFF same-origin.
  • isSubmitting e isUploading representam apenas a acao em andamento.
  • Falhas de submit/upload sao normalizadas em flow.error.
  • Conflitos 409 provocam um refresh do overview para que required_action e flow_state.current_step do backend reposicionem o fluxo.
  • O pacote nunca cria um step de revisao ausente em client_flow.

Regras De Seguranca

  • A UI pode escolher composicao visual, labels e componentes.
  • A UI so deve navegar por flow.steps, flow.activeStep e flow.canOpenStep.
  • A UI nao deve inferir jurisdicao, tipo de cliente ou proxima tela por conta propria.
  • Ausencia de client_flow falha fechado por flow.configMissing.
  • Uploads devem usar flow.uploadForCurrentStep(formData) para manter o BFF como ponto unico de assinatura multipart.

Estado Atual

Beta npm (0.1.1, dist-tag latest). O pacote gera dist, .d.ts, .d.ts.map e sourcemaps. O pacote permanece UNLICENSED enquanto os contratos publicos seguem em beta.