curl -X POST https://verification.didit.me/v3/travel-rule/inbound/ \
-H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \
-d '{"chain":"ETH","txid":"0xdeposit-hash","wallet_address":"0xYourDepositWallet","amount":"500.00","currency":"USDC"}'from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.travel_rule.register_inbound(
chain="ETH",
txid="0xdeposit-hash",
wallet_address="0xYourDepositWallet",
amount="500.00",
currency="USDC",
originator_data={"name": "Origin CASP SL"},
beneficiary_data={"name": "Ana Diaz"},
originating_vasp={
"name": "Origin CASP SL",
"lei": "",
"travel_address": "ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC",
},
)
print(result)import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.travelRule.registerInbound({
chain: "ETH",
txid: "0xdeposit-hash",
wallet_address: "0xYourDepositWallet",
amount: "500.00",
currency: "USDC",
originator_data: { name: "Origin CASP SL" },
beneficiary_data: { name: "Ana Diaz" },
originating_vasp: {
name: "Origin CASP SL",
lei: "",
travel_address: "ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC",
},
});
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.TravelRule.RegisterInbound(ctx, didit.TravelRuleInboundRequest{
Chain: "ETH",
Txid: "0xdeposit-hash",
WalletAddress: "0xYourDepositWallet",
Amount: "500.00",
Currency: "USDC",
OriginatorData: didit.Some(map[string]any{"name": "Origin CASP SL"}),
BeneficiaryData: didit.Some(map[string]any{"name": "Ana Diaz"}),
OriginatingVASP: didit.Some(didit.TravelRuleInboundRequestOriginatingVASP{
Name: didit.String("Origin CASP SL"),
Lei: didit.String(""),
TravelAddress: didit.String("ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC"),
}),
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import java.util.Map;
import me.didit.Didit;
import me.didit.types.TravelRuleInboundRequest;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.travelRule().registerInbound(TravelRuleInboundRequest.builder()
.chain("ETH")
.txid("0xdeposit-hash")
.walletAddress("0xYourDepositWallet")
.amount("500.00")
.currency("USDC")
.originatorData(Map.of("name", "Origin CASP SL"))
.beneficiaryData(Map.of("name", "Ana Diaz"))
.originatingVasp(TravelRuleInboundRequest.OriginatingVasp.builder()
.name("Origin CASP SL")
.lei("")
.travelAddress("ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC")
.build())
.build());
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->travelRule->registerInbound([
'chain' => 'ETH',
'txid' => '0xdeposit-hash',
'wallet_address' => '0xYourDepositWallet',
'amount' => '500.00',
'currency' => 'USDC',
'originator_data' => ['name' => 'Origin CASP SL'],
'beneficiary_data' => ['name' => 'Ana Diaz'],
'originating_vasp' => [
'name' => 'Origin CASP SL',
'lei' => '',
'travel_address' => 'ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC',
],
]);
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.travel_rule.register_inbound(
chain: "ETH",
txid: "0xdeposit-hash",
wallet_address: "0xYourDepositWallet",
amount: "500.00",
currency: "USDC",
originator_data: { name: "Origin CASP SL" },
beneficiary_data: { name: "Ana Diaz" },
originating_vasp: {
name: "Origin CASP SL",
lei: "",
travel_address: "ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC",
}
)
puts result.to_husing System;
using System.Collections.Generic;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.TravelRule.RegisterInboundAsync(new TravelRuleInboundRequest
{
Chain = "ETH",
Txid = "0xdeposit-hash",
WalletAddress = "0xYourDepositWallet",
Amount = "500.00",
Currency = "USDC",
OriginatorData = new Dictionary<string, object> { ["name"] = "Origin CASP SL" },
BeneficiaryData = new Dictionary<string, object> { ["name"] = "Ana Diaz" },
OriginatingVasp = new TravelRuleInboundRequestOriginatingVasp
{
Name = "Origin CASP SL",
Lei = "",
TravelAddress = "ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC",
},
});
Console.WriteLine(JsonSerializer.Serialize(result));{
"transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"txn_id": "<string>",
"created": true,
"travel_rule": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "AWAITING_COUNTERPARTY",
"direction": "INBOUND",
"rail": "INTERNAL",
"protocol": "<string>",
"ivms_version": "ivms101.2023",
"required": true,
"ownership_confirmed": true,
"deadline_at": "2023-11-07T05:31:56Z",
"timeline": [
{
"status": "<string>",
"at": "2023-11-07T05:31:56Z",
"detail": "<string>",
"name_match": {
"score": 50,
"matched": true,
"method": "none",
"strictness": "NONE",
"compared_with": "wallet_holder",
"transfer_name": "<string>",
"compared_name": "<string>",
"matched_names": [
"<string>"
],
"mismatched_names": [
"<string>"
]
},
"reason": "<string>"
}
],
"counterparty_vasp": {
"name": "<string>",
"lei": "<string>",
"dd_score": 123,
"dd_score_breakdown": {},
"dd_assessed_at": "2023-11-07T05:31:56Z"
},
"originator_data": {},
"beneficiary_data": {},
"name_match": {
"score": 50,
"matched": true,
"method": "none",
"strictness": "NONE",
"compared_with": "wallet_holder",
"transfer_name": "<string>",
"compared_name": "<string>",
"matched_names": [
"<string>"
],
"mismatched_names": [
"<string>"
]
},
"data_match": {
"matched": true,
"mismatched_fields": [
"name"
],
"fields": {}
},
"mismatched_fields": [
"<string>"
],
"data_unmasked": {
"at": "2023-11-07T05:31:56Z",
"reason": "ownership_confirmed",
"actor": "<string>"
},
"data_masked": true,
"created_at": "2023-11-07T05:31:56Z",
"delivery": {
"kind": "SEND",
"status": "QUEUED",
"rail": "INTERNAL",
"attempts": 1,
"last_error": "email undeliverable",
"next_attempt_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z"
},
"discovery": [
{
"step": "internal_address_book",
"outcome": "match",
"reason": "<string>",
"vasp": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rail": "<string>",
"at": "2023-11-07T05:31:56Z"
}
],
"reason": "<string>",
"next_actions": [
{
"action": "select_counterparty_vasp",
"url": "<string>"
}
],
"chain_details": {
"chain": "<string>",
"shape": "utxo",
"originator": {
"address": "<string>",
"memo": "<string>",
"source": "declared"
},
"beneficiary": {
"address": "<string>",
"memo": "<string>",
"source": "declared"
},
"utxo": {
"inputs": [
{
"address": "<string>",
"amount": "0.0125",
"txid": "<string>",
"vout": 1
}
],
"outputs": [
{
"address": "<string>",
"amount": "0.0125",
"txid": "<string>",
"vout": 1
}
],
"change_output_indexes": [
123
],
"beneficiary_output_index": 123
},
"lightning": {},
"warnings": [
"declared_originator_not_an_input"
],
"not_applicable_reason": "LIGHTNING_NO_PAYEE_IDENTIFIER"
}
}
}注册入站 Sunrise 转账 API:Travel Rule
为已在链上先行到账、尚未发生任何交易所交易的加密货币入账登记 Travel Rule 数据,即先到账后登记的 Sunrise 流程。Didit 提供支持。
curl -X POST https://verification.didit.me/v3/travel-rule/inbound/ \
-H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \
-d '{"chain":"ETH","txid":"0xdeposit-hash","wallet_address":"0xYourDepositWallet","amount":"500.00","currency":"USDC"}'from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.travel_rule.register_inbound(
chain="ETH",
txid="0xdeposit-hash",
wallet_address="0xYourDepositWallet",
amount="500.00",
currency="USDC",
originator_data={"name": "Origin CASP SL"},
beneficiary_data={"name": "Ana Diaz"},
originating_vasp={
"name": "Origin CASP SL",
"lei": "",
"travel_address": "ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC",
},
)
print(result)import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.travelRule.registerInbound({
chain: "ETH",
txid: "0xdeposit-hash",
wallet_address: "0xYourDepositWallet",
amount: "500.00",
currency: "USDC",
originator_data: { name: "Origin CASP SL" },
beneficiary_data: { name: "Ana Diaz" },
originating_vasp: {
name: "Origin CASP SL",
lei: "",
travel_address: "ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC",
},
});
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.TravelRule.RegisterInbound(ctx, didit.TravelRuleInboundRequest{
Chain: "ETH",
Txid: "0xdeposit-hash",
WalletAddress: "0xYourDepositWallet",
Amount: "500.00",
Currency: "USDC",
OriginatorData: didit.Some(map[string]any{"name": "Origin CASP SL"}),
BeneficiaryData: didit.Some(map[string]any{"name": "Ana Diaz"}),
OriginatingVASP: didit.Some(didit.TravelRuleInboundRequestOriginatingVASP{
Name: didit.String("Origin CASP SL"),
Lei: didit.String(""),
TravelAddress: didit.String("ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC"),
}),
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import java.util.Map;
import me.didit.Didit;
import me.didit.types.TravelRuleInboundRequest;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.travelRule().registerInbound(TravelRuleInboundRequest.builder()
.chain("ETH")
.txid("0xdeposit-hash")
.walletAddress("0xYourDepositWallet")
.amount("500.00")
.currency("USDC")
.originatorData(Map.of("name", "Origin CASP SL"))
.beneficiaryData(Map.of("name", "Ana Diaz"))
.originatingVasp(TravelRuleInboundRequest.OriginatingVasp.builder()
.name("Origin CASP SL")
.lei("")
.travelAddress("ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC")
.build())
.build());
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->travelRule->registerInbound([
'chain' => 'ETH',
'txid' => '0xdeposit-hash',
'wallet_address' => '0xYourDepositWallet',
'amount' => '500.00',
'currency' => 'USDC',
'originator_data' => ['name' => 'Origin CASP SL'],
'beneficiary_data' => ['name' => 'Ana Diaz'],
'originating_vasp' => [
'name' => 'Origin CASP SL',
'lei' => '',
'travel_address' => 'ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC',
],
]);
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.travel_rule.register_inbound(
chain: "ETH",
txid: "0xdeposit-hash",
wallet_address: "0xYourDepositWallet",
amount: "500.00",
currency: "USDC",
originator_data: { name: "Origin CASP SL" },
beneficiary_data: { name: "Ana Diaz" },
originating_vasp: {
name: "Origin CASP SL",
lei: "",
travel_address: "ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC",
}
)
puts result.to_husing System;
using System.Collections.Generic;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.TravelRule.RegisterInboundAsync(new TravelRuleInboundRequest
{
Chain = "ETH",
Txid = "0xdeposit-hash",
WalletAddress = "0xYourDepositWallet",
Amount = "500.00",
Currency = "USDC",
OriginatorData = new Dictionary<string, object> { ["name"] = "Origin CASP SL" },
BeneficiaryData = new Dictionary<string, object> { ["name"] = "Ana Diaz" },
OriginatingVasp = new TravelRuleInboundRequestOriginatingVasp
{
Name = "Origin CASP SL",
Lei = "",
TravelAddress = "ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC",
},
});
Console.WriteLine(JsonSerializer.Serialize(result));{
"transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"txn_id": "<string>",
"created": true,
"travel_rule": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "AWAITING_COUNTERPARTY",
"direction": "INBOUND",
"rail": "INTERNAL",
"protocol": "<string>",
"ivms_version": "ivms101.2023",
"required": true,
"ownership_confirmed": true,
"deadline_at": "2023-11-07T05:31:56Z",
"timeline": [
{
"status": "<string>",
"at": "2023-11-07T05:31:56Z",
"detail": "<string>",
"name_match": {
"score": 50,
"matched": true,
"method": "none",
"strictness": "NONE",
"compared_with": "wallet_holder",
"transfer_name": "<string>",
"compared_name": "<string>",
"matched_names": [
"<string>"
],
"mismatched_names": [
"<string>"
]
},
"reason": "<string>"
}
],
"counterparty_vasp": {
"name": "<string>",
"lei": "<string>",
"dd_score": 123,
"dd_score_breakdown": {},
"dd_assessed_at": "2023-11-07T05:31:56Z"
},
"originator_data": {},
"beneficiary_data": {},
"name_match": {
"score": 50,
"matched": true,
"method": "none",
"strictness": "NONE",
"compared_with": "wallet_holder",
"transfer_name": "<string>",
"compared_name": "<string>",
"matched_names": [
"<string>"
],
"mismatched_names": [
"<string>"
]
},
"data_match": {
"matched": true,
"mismatched_fields": [
"name"
],
"fields": {}
},
"mismatched_fields": [
"<string>"
],
"data_unmasked": {
"at": "2023-11-07T05:31:56Z",
"reason": "ownership_confirmed",
"actor": "<string>"
},
"data_masked": true,
"created_at": "2023-11-07T05:31:56Z",
"delivery": {
"kind": "SEND",
"status": "QUEUED",
"rail": "INTERNAL",
"attempts": 1,
"last_error": "email undeliverable",
"next_attempt_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z"
},
"discovery": [
{
"step": "internal_address_book",
"outcome": "match",
"reason": "<string>",
"vasp": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rail": "<string>",
"at": "2023-11-07T05:31:56Z"
}
],
"reason": "<string>",
"next_actions": [
{
"action": "select_counterparty_vasp",
"url": "<string>"
}
],
"chain_details": {
"chain": "<string>",
"shape": "utxo",
"originator": {
"address": "<string>",
"memo": "<string>",
"source": "declared"
},
"beneficiary": {
"address": "<string>",
"memo": "<string>",
"source": "declared"
},
"utxo": {
"inputs": [
{
"address": "<string>",
"amount": "0.0125",
"txid": "<string>",
"vout": 1
}
],
"outputs": [
{
"address": "<string>",
"amount": "0.0125",
"txid": "<string>",
"vout": 1
}
],
"change_output_indexes": [
123
],
"beneficiary_output_index": 123
},
"lightning": {},
"warnings": [
"declared_originator_not_an_input"
],
"not_applicable_reason": "LIGHTNING_NO_PAYEE_IDENTIFIER"
}
}
}授权
您的应用 API 密钥,可在 Business Console 的“开发者 -> API 密钥”中获取。主密钥拥有完整访问权限。指定名称的密钥可设置作用域:针对每个资源设为无权限、只读或读写,限定于特定工作流或已通过的会话、限定于 IP 地址列表,以及设置到期日期。401 表示密钥错误、已撤销或已过期;403 表示未发送密钥、密钥无权访问该资源或操作,或请求来自其 IP 列表之外的地址;在会话路由上返回 404 表示该会话不在该密钥允许的工作流或状态范围内。没有媒体访问权限的密钥获取到的图片、视频和 PDF URL 将为 null;没有会话写入权限的密钥获取到的会话链接和 token 将为 null。请参阅 https://docs.didit.me/console/api-keys。
请求体
存款结算所在的区块链网络,例如 ETH。以小写形式存储,并与您的钱包地址簿条目进行不区分大小写的比对,因此请在地址簿中使用相同的区块链网络 token。
32链上交易哈希。与 wallet_address 一起去重。
128您接收充值的目标钱包。XRP X-address 会被拆分为其传统地址和标签。
128充值金额,采用十进制字符串表示,大于或等于零,最多保留 18 位小数。
充值资产,例如 "USDC"。
16来自发送方 VASP 的汇款人详情(如果已知),为扁平对象,例如 {"name": "..."}。Didit 会从中读取 name(或 full_name)、first_name、last_name 和 vendor_data。
收款人详情(您的客户),以扁平对象形式呈现,例如 {"name": "..."}。Didit 会将姓名与匹配的地址簿条目的 holder_name 进行比对,并根据请求设置 wallet_address 和 chain。
发送方 VASP 的可选描述。它仅保留在此笔转账中(metadata.originating_vasp,以及 GET /v3/travel-rule/transfers/ 中该转账的汇款人 VASP);它绝不会创建、编辑或关联共享的 VASP 目录条目。
Show child attributes
Show child attributes
可选。充值在支持 memo 的网络上的目标标签(destination tag)或 memo:在共享充值地址上,它用于区分您的不同客户,并将匹配该 memo 对应的地址簿条目。XRP:目标标签,为 0 到 4294967295 之间的整数(接受 JSON 数字)。XLM:最多 28 字节的文本 memo、64 位 ID 或 32 字节的十六进制哈希。EOS:最多 256 字节。ATOM:最多 256 个字符。HBAR:最多 100 字节。Bitcoin、EVM、Solana、Tron、Litecoin、Bitcoin Cash、Dogecoin 和 Lightning 钱包不接受 memo:若传入将返回 400。别名:destinationTag 或 destination_tag。
256可选,仅限 UTXO 链。充值交易的输入和输出:发送方钱包为声明的 originator_data.wallet_address,否则取最大输入。
Show child attributes
Show child attributes
响应
针对该 txid 和 wallet_address 的转账已注册;原样返回现有记录(created 为 false)。
入账存款的 Didit 交易 UUID。
入账交易的 txn_id:当由 Didit 创建该交易时为 Didit 生成的 ID,或者当复用未认领的入账交易时为您自己的 ID。
当本次调用注册了该转账时为 true (HTTP 201);当相同 txid 和 wallet_address 的转账已存在时为 false (HTTP 200)。
所有权确认以及完成/取消 endpoint 返回的完整转账对象。当入站转账的钱包所有权未确认时,交易对手的 originator_data 和 beneficiary_data 会被掩码返回(保留每个单词的首字母;钱包、链以及 VASP 路由保持可读),且 data_masked 为 true。
Show child attributes
Show child attributes