開発者
ひとつの API で、すべてのプロダクトに。
先に本人確認を行い、その後にスポンサー付きアカウントを作り、バインドしてアンロックします。API キーは自社サーバーに置いたまま、ブラウザやモバイルアプリは自社バックエンドと通信し、そのバックエンドが当社と通信します。WharfKit のウォレットセッションとパスキーに対応しています。
const baseUrl = process.env.BOUND_IDENTITY_URL!;
const apiKey = process.env.BOUND_IDENTITY_API_KEY!; // server-side only
async function identityFetch(path, init) {
const res = await fetch(baseUrl + path, {
...init,
headers: {
Authorization: "Bearer " + apiKey,
Accept: "application/json",
"Content-Type": "application/json",
...init?.headers,
},
});
const body = await res.json();
if (!res.ok) throw new Error(body.message || "HTTP " + res.status);
return body;
}
// 1. Verify the person first — no chain account yet (default organization policy).
const { personDid, verificationUrl } = await identityFetch("/v1/kyc/start", {
method: "POST",
body: JSON.stringify({}),
});
// … open verificationUrl from your KYC provider …
// 2. When approved, take the one-time create token.
const { kycCreateToken } = await identityFetch(
"/v1/kyc/status?personDid=" + encodeURIComponent(personDid),
);
// 3. Sponsor the provisional account. Token replay is rejected.
const { accountDid } = await identityFetch("/v1/accounts/free", {
method: "POST",
body: JSON.stringify({
ownerPublicKey,
personDid,
kycCreateToken,
// Production also requires emailProofToken + phoneProofToken
}),
});
// 4. Bind the approved person to this account: the user signs once.
const { payloadToSign, message } = await identityFetch("/v1/bind/challenge", {
method: "POST",
body: JSON.stringify({ accountDid, personDid }),
});
await identityFetch("/v1/bind/confirm", {
method: "POST",
body: JSON.stringify({
accountDid,
personDid,
nonce: message.nonce,
signature, // WharfKit / passkey over payloadToSign
}),
});
// 5. Lift faucet limits. Done.
await identityFetch("/v1/accounts/unlock", {
method: "POST",
body: JSON.stringify({ accountDid }),
});本人確認書類がコードを通ることはなく、シークレットがブラウザーに届くこともありません。既定の組織は KYC 承認まで無料アカウント作成を拒否します。まず sandbox.identityinc.io のサンドボックスに統合し——無料テスト確認、シミュレートされたチェーン——その後本番トラフィックを Builder または Growth に移してください。
ガイドとリファレンス
クイックスタート、認証、Webhook、API が返すすべてのエラーコード。英語で公開しています。
API
OpenAPI 仕様: https://identityinc.io/openapi.yaml。本番: https://api.identityinc.io。サンドボックス: https://sandbox.identityinc.io(bi_test_ キー、無料テスト確認、シミュレートされたチェーン)。ローカル開発の既定は http://127.0.0.1:4100 です。
プロダクトごとに 1 つの鍵
運用するプロダクトごとに別々の API キーを発行してください。ウォレット、マーケットプレイス、基幹バンキング連携など。各キーは自分のデータしか見えず、分離は取り決めではなく API が強制します。サンドボックスキーは sandbox.identityinc.io のチェックアウトで bi_test_…、本番キーは identityinc.io の登録で bi_… — ホストを混ぜないでください。