> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Travel Rule 地址簿：注册钱包地址 API

> 将您控制的钱包添加到 Travel Rule 地址簿，使入站 INTERNAL 通道转账可解析到该钱包，并可选择通过自我声明预先验证。Didit 提供支持。



注册钱包地址 API 提示词
        将提示词复制到剪贴板



      
      

\<pre>

\`Register a wallet address in the application's Travel Rule address book so inbound INTERNAL-rail transfers can resolve against it.

Endpoint:
POST https://verification.didit.me/v3/travel-rule/wallet-addresses/

Authentication:
Use the x-api-key header with my Didit API key.

Request body (application/json):
\{
"address": "0x8ba1f109551bD432803012645Ac136ddd64DBA72",   // required; one entry per address (case-insensitive) and chain (exact text) in the application, a duplicate returns 400
"chain": "ETH",                        // optional; use the same chain token your transfers carry (ETH, BTC), or leave blank to match any chain
"memo": "",                            // optional destination tag or memo on XRP, XLM, EOS, ATOM, HBAR (alias: destinationTag); part of the wallet's identity there
"holder_name": "Ana Diaz",             // used for the beneficiary name match
"holder_vendor_data": "user-042",      // your internal id for the holder
"entity_type": "individual",           // free text, defaults to "individual"
"travel_address": "taiwwrTeRpaRbqpQXB9A1JiLtdE686XtYRC316kPuQzbJSTgv7ndnF4ceHM7CReVGuzqcCCu5RfUHdL1FffHhdf3dzQDEgKAUMtAuD6uteY",   // optional: the counterparty VASP's travel address for this wallet, so outbound BTC, ETH and USDC transfers to it can route over TRP
"self_declared": true                  // write-only, POST only: create the entry already verified via a SELF_DECLARATION proof
}

Behavior:
\- self_declared: true creates the entry already ownership-verified - inbound transfers to it skip UNCONFIRMED_OWNERSHIP entirely and go straight to the name match.
It requires allow_self_declaration: true in Travel Rule settings, otherwise 400.
\- Without it, verify ownership later via the wallet-ownership widget (POST /v3/travel-rule/widget-session/).
\- Matching is scoped by chain.
When a transfer carries a chain, an entry matches only if its chain equals that chain (case-insensitive) or the entry's chain is blank.
Chain names are not translated: an entry with chain "ethereum" does not match a transfer with chain "ETH".
A transfer takes its chain from beneficiary_data.chain, else transaction_details.crypto_params.crypto_chain, else custom_properties.crypto_chain, else the currency, uppercased and used only when it is a chain Didit recognises (for example ETH or BTC).
Register entries with the same token your transfers carry (ETH, BTC), or leave chain blank to match any chain.
Inbound TRP inquiries ignore the chain: they match by address, or by the holder_name of a verified entry when the inquiry carries no address.
Confirming ownership with POST /v3/transactions/{transaction_id}/travel-rule/ownership/ also matches by address only.
\- On a memo network the memo is part of the wallet: an entry with a memo matches only transfers naming that memo, an entry without one matches the whole address. A transfer that names no memo never reaches an entry that has one.
\- An XRP X-address is stored as its classic address and its tag. A Lightning payee (node id or Lightning Address) registered on bitcoin is stored lowercased on the LIGHTNING chain, where Lightning transfers are matched.
\- The response carries address_hash (SHA-256 of the lowercased address, hex). To register many wallets at once, or by hash only, use POST /v3/travel-rule/wallet-addresses/import/.

Failure modes:
\- 400 - an entry with this address, chain and memo already exists: {"address": ["A wallet address entry with this address and chain already exists."]}.
\- 400 - a memo or X-address the chain cannot carry, missing address, an invalid travel_address ("Invalid travel address."), or self_declared: true while allow_self_declaration is off.
\- 403 - missing x-api-key (a wrong, revoked or expired key gets 401).

Full guide: /transaction-monitoring/travel-rule#wallet-address-book.`

\</pre>



      
      

粘贴到



## OpenAPI

````yaml zh/openapi-25.json POST /v3/travel-rule/wallet-addresses/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: 身份证件验证 API。使用 x-api-key 请求头进行身份验证。
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/travel-rule/wallet-addresses/:
    post:
      tags:
        - Travel Rule
      summary: 注册地址
      description: 向您的 Travel Rule 钱包地址簿添加条目，以便入站的 INTERNAL 轨道转账可针对其进行解析。
      operationId: createTravelRuleWalletAddress
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WalletAddressEntryCreate'
            example:
              address: 0xBeneficiaryWallet01
              chain: ETH
              holder_name: Ana Diaz
              holder_vendor_data: user-042
              self_declared: true
      responses:
        '201':
          description: 已创建的条目。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletAddressEntry'
        '400':
          description: >-
            此应用存在重复钱包（地址、链和 memo）、该链无法承载的 memo 或 X-address、缺少 `address`、无效的
            `travel_address`、在 `allow_self_declaration` 未开启时设置了 `self_declared:
            true`，或在 `ownership_validation_mode` 为 `FULL` 时设置了 `self_declared:
            true`。
          content:
            application/json:
              schema:
                type: object
              examples:
                Duplicate entry:
                  value:
                    address:
                      - >-
                        A wallet address entry with this address and chain
                        already exists.
                Invalid travel address:
                  value:
                    travel_address:
                      - Invalid travel address.
                Self-declaration disabled:
                  value:
                    self_declared:
                      - >-
                        Self-declared ownership is disabled for this
                        application.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X POST
            https://verification.didit.me/v3/travel-rule/wallet-addresses/ \
              -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \
              -d '{"address": "0xBeneficiaryWallet01", "chain": "ETH", "holder_name": "Ana Diaz", "self_declared": true}'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.travel_rule.wallet_addresses.create(
                address="0xBeneficiaryWallet01",
                chain="ETH",
                holder_vendor_data="user-042",
                holder_name="Ana Diaz",
                self_declared=True,
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: |-
            import Didit from "@didit-protocol/sdk-node";

            // Reads DIDIT_API_KEY.
            const didit = new Didit();

            const result = await didit.travelRule.walletAddresses.create({
              address: "0xBeneficiaryWallet01",
              chain: "ETH",
              holder_vendor_data: "user-042",
              holder_name: "Ana Diaz",
              self_declared: true,
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.WalletAddresses.Create(ctx, didit.WalletAddressEntryCreate{\n\tAddress:          \"0xBeneficiaryWallet01\",\n\tChain:            didit.String(\"ETH\"),\n\tHolderVendorData: didit.String(\"user-042\"),\n\tHolderName:       didit.String(\"Ana Diaz\"),\n\tSelfDeclared:     didit.Bool(true),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;

            import me.didit.types.WalletAddressEntryCreate;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.travelRule().walletAddresses().create(WalletAddressEntryCreate.builder()
                    .address("0xBeneficiaryWallet01")
                    .chain("ETH")
                    .holderVendorData("user-042")
                    .holderName("Ana Diaz")
                    .selfDeclared(true)
                    .build());
            System.out.println(result);
        - lang: php
          label: PHP
          source: |-
            <?php

            require 'vendor/autoload.php';

            use Didit\DiditClient;

            // Reads DIDIT_API_KEY.
            $didit = new DiditClient();

            $result = $didit->travelRule->walletAddresses->create([
                'address' => '0xBeneficiaryWallet01',
                'chain' => 'ETH',
                'holder_vendor_data' => 'user-042',
                'holder_name' => 'Ana Diaz',
                'self_declared' => true,
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # Reads DIDIT_API_KEY.
            didit = Didit::Client.new

            result = didit.travel_rule.wallet_addresses.create(
              address: "0xBeneficiaryWallet01",
              chain: "ETH",
              holder_vendor_data: "user-042",
              holder_name: "Ana Diaz",
              self_declared: true
            )
            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            var result = await client.TravelRule.WalletAddresses.CreateAsync(new
            WalletAddressEntryCreate

            {
                Address = "0xBeneficiaryWallet01",
                Chain = "ETH",
                HolderVendorData = "user-042",
                HolderName = "Ana Diaz",
                SelfDeclared = true,
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    WalletAddressEntryCreate:
      type: object
      required:
        - address
      properties:
        address:
          type: string
          maxLength: 128
          description: 钱包地址。XRP X-address 会以其经典地址和标签的形式存储，因此可以匹配指定了任一形式的转账。
        chain:
          type: string
          maxLength: 32
          description: >-
            地址的链 token，例如 `ETH` 或 `BTC`。当 Didit
            路由或登记转账时，会在地址上匹配地址簿条目；当转账附带链信息时，也会在此值上进行不区分大小写的匹配。转账的链为
            `beneficiary_data.chain`，如果您未传入该值，则会根据交易的加密货币链或货币符号（例如
            `ETH`）填充，或采用存款后登记的 `chain`，因此请在所有位置使用相同的
            token。链为空的条目可匹配任意链。无论您传入何种拼写，已知链均按单一规范标识符存储：“ethereum”、“Ethereum”和“ERC20”均存储为
            ETH，“BNB Smart Chain”和“BEP20”存储为 BNB，“tron”存储为 TRX。未知的链名称将按原样保留。
        holder_vendor_data:
          type: string
          maxLength: 255
        holder_name:
          type: string
          maxLength: 255
        entity_type:
          type: string
          default: individual
          maxLength: 16
        self_declared:
          type: boolean
          default: false
          description: >-
            仅可写入。当为 true 时，创建的条目已通过 SELF_DECLARATION 证明完成股权结构核验。在您的 Travel Rule
            设置中 `allow_self_declaration` 未开启时返回 400。
        travel_address:
          type: string
          description: >-
            可选。交易对手 VASP 针对此钱包的 Travel Address，用于为 TRP 支持的资产（指定网络上的 BTC、ETH 和
            USDC）启用 TRP 路由。无效的 Travel Address 将返回 400。
          maxLength: 512
        memo:
          type: string
          maxLength: 256
          description: >-
            可选。作为钱包一部分的目标标签（destination tag）或 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：传入 memo 将返回 `400`。别名：`destinationTag` 或
            `destination_tag`。
    WalletAddressEntry:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
        address:
          type: string
          description: >-
            钱包地址；仅通过哈希导入的条目为 `""`。在每个应用、链和 memo
            维度内唯一，比对地址时不区分大小写。删除条目后，您可以再次注册相同的地址。
        chain:
          type: string
          description: >-
            地址的区块链网络 token，例如 `ETH` 或 `BTC`。当 Didit
            路由或登记转账时，它会按钱包地址进行地址簿条目匹配；如果转账包含区块链网络，还会对此值进行不区分大小写的匹配。转账的区块链网络为
            `beneficiary_data.chain`，如果您未发送，则从交易的加密区块链网络或货币符号（例如
            `ETH`）中填充，或是存款后登记的 `chain`，因此请在所有地方使用相同的
            token。区块链网络为空的条目可匹配任意网络。在比特币上登记的 Lightning 收款人（节点 ID 或 Lightning
            Address）以小写形式存储在 `LIGHTNING` 下，并在该处匹配 Lightning
            转账。无论您发送何种拼写，已知区块链网络均存储在同一个标准标识符下："ethereum"、"Ethereum" 和 "ERC20"
            均存储为 ETH，"BNB Smart Chain" 和 "BEP20" 存储为 BNB，"tron" 存储为
            TRX。未知区块链网络名称将按原样保留。
        holder_vendor_data:
          type: string
          description: 您为持有者指定的内部标识符。
        holder_name:
          type: string
          description: 钱包持有者姓名，用于收款人姓名比对。
        entity_type:
          type: string
          description: 自由格式文本，默认为 "individual"。
        is_ownership_verified:
          type: boolean
          description: 只读。此地址的所有权是否已得到证明。
        created_at:
          type: string
          format: date-time
        travel_address:
          type: string
          description: >-
            此钱包对应的交易对手 VASP 的 Travel Address（如果已知）。允许 Didit 针对 TRP 支持的资产（指定网络上的
            BTC、ETH 和 USDC），通过 TRP 渠道路由此收款人的转账。
        address_hash:
          type: string
          description: 只读。小写地址的 SHA-256，为小写十六进制格式。仅通过哈希导入的条目将基于此进行匹配。
        memo:
          type: string
          description: >-
            在 memo 网络（XRP、XLM、EOS、ATOM、HBAR）上作为钱包一部分的目标标签或 memo；整个地址为 `""`。带有
            memo 的条目仅匹配指定该 memo 的转账；不带 memo 的条目匹配整个地址。
        receiving_travel_address:
          type: string
          readOnly: true
          description: >-
            此钱包专属的 Travel Address：将其提供给发送方 VASP，以便其 TRP 查询能够指定此钱包。如果钱包被记录为另一个
            VASP 的钱包、Travel Rule 未启用或在您的 VASP 资料保存之前，此字段为空。
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        您的应用 API 密钥，可在 Business Console 的“开发者 -> API
        密钥”中获取。主密钥拥有完整访问权限。指定名称的密钥可设置作用域：针对每个资源设为无权限、只读或读写，限定于特定工作流或已通过的会话、限定于
        IP 地址列表，以及设置到期日期。401 表示密钥错误、已撤销或已过期；403 表示未发送密钥、密钥无权访问该资源或操作，或请求来自其 IP
        列表之外的地址；在会话路由上返回 404 表示该会话不在该密钥允许的工作流或状态范围内。没有媒体访问权限的密钥获取到的图片、视频和 PDF
        URL 将为 null；没有会话写入权限的密钥获取到的会话链接和 token 将为 null。请参阅
        https://docs.didit.me/console/api-keys。

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.