@getyoti/sdk-sandbox

中文文档
1.7.0发布于 2023/01/20MIT近 30 天下载 1.4万

Yoti NodeJS Sandbox for back-end integration

原始使用文档
文档目录7 节
  1. Requirements
  2. Node version
  3. Installing the Sandbox
  4. Configuration
  5. Profile
  6. IDV
  7. Examples

Yoti NodeJS Sandbox SDK

Build Status Coverage Bugs Code Smells Vulnerabilities

Welcome to the Yoti NodeJS Sandbox. This repo contains the tools you need to test your NodeJS back-end integration.

Requirements

Node version

Please refer to Travis to see all compatible Node versions.

Installing the Sandbox

To import the Yoti SDK inside your project, you can use your favourite dependency management system. If you are using NPM, you can use the following command to set the Yoti Sandbox SDK as a dependency:

npm install @getyoti/sdk-sandbox

Configuration

  • SANDBOX_CLIENT_SDK_ID is the SDK identifier generated by Yoti Hub in the Key tab when you create your app.

  • /path/to/your-pem-file.pem is the path to the application pem file. It can be downloaded only once from the Keys tab in your Yoti Hub.

Please do not open the pem file as this might corrupt the key and you will need to recreate the keys on the Yoti Hub.

Profile

Yoti Client

Point the Yoti client at the sandbox by setting environment variable YOTI_API_URL to https://api.yoti.com/sandbox/v1

const { Client } = require('yoti');
const fs = require('fs');

const SANDBOX_CLIENT_SDK_ID = 'SANDBOX_CLIENT_SDK_ID';
const PEM = fs.readFileSync('/path/to/your-pem-file.pem', 'utf8');

const yotiClient = new Client(SANDBOX_CLIENT_SDK_ID, PEM);

Profile Sandbox Client

const { SandboxProfileClientBuilder } = require('@getyoti/sdk-sandbox');

const sandboxProfileClient = new SandboxProfileClientBuilder()
  .withClientSdkId(SANDBOX_CLIENT_SDK_ID)
  .withPemString(PEM)
  .build();

IDV

IDV Client

Point the IDV client at the sandbox by setting environment variable YOTI_IDV_API_URL to https://api.yoti.com/sandbox/idverify/v1

const { IDVClient } = require('yoti');
const fs = require('fs');

const SANDBOX_CLIENT_SDK_ID = 'SANDBOX_CLIENT_SDK_ID';
const PEM = fs.readFileSync('/path/to/your-pem-file.pem', 'utf8');

const idvClient = new IDVClient(SANDBOX_CLIENT_SDK_ID, PEM);

IDV Sandbox Client

const { SandboxIDVClientBuilder } = require('@getyoti/sdk-sandbox');

const sandboxClient = new SandboxIDVClientBuilder()
  .withClientSdkId(SANDBOX_CLIENT_SDK_ID)
  .withPemString(PEM)
  .build();

Examples

版本与发布记录

@getyoti/sdk-sandbox 共发布 9 个版本,首次发布于 2020/03/20;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.7.0latest2023/01/203 年前
1.6.02021/02/025 年前
1.5.02020/10/276 年前
1.4.02020/10/056 年前
1.3.12020/08/136 年前
1.3.02020/07/076 年前

关于 @getyoti/sdk-sandbox 的常见问题

@getyoti/sdk-sandbox 是什么?

Yoti NodeJS Sandbox for back-end integration

如何安装 @getyoti/sdk-sandbox?

在项目目录运行 npm install @getyoti/sdk-sandbox,或使用 pnpm add / yarn add / bun add。

@getyoti/sdk-sandbox 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/getyoti__sdk-sandbox 是否存在。

@getyoti/sdk-sandbox 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=16。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@getyoti/sdk-sandbox 可以商用吗?

@getyoti/sdk-sandbox 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@getyoti/sdk-sandbox 的下载量有多少?

根据 npm 官方下载统计,@getyoti/sdk-sandbox 在 2026/10/17 – 2026/11/15 这 30 天内被下载 13,652 次,日均约 455 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@getyoti/sdk-sandbox 还在维护吗?

最新版本 1.7.0 发布于 2023/01/20(3 年前);至今共发布 9 个版本,其中过去 12 个月发布了 0 个;首次发布于 2020/03/20。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。