Bridge Digital Passports API

⚠️

Please get in touch with our account manager to make sure your API is correctly configured.

Overview

Key Terms

  • destinationNmp: To migrate your digital passports, you'll need a brand new NFT Management Platform plugged into chain2.
  • originNmpUrl: URL of the NFT Management Platform plugged into the chain1.
  • thread: content and history of a digital passport from chain1. A thread can be composed of one or multiple fibers if the digital passport is bridged multiple times.

Blockchain Shift Flow

Recover Digital Passport & Bridge Transfer

URL

This endpoint will recover in the case that the brand is not the owner of the tokenId, then transfer it to the bridge address. To recover the digital passport from chain1, use /certificate/recoverAndTransferToBridge.

💡

Bridge address: 0x0000000000000000000000000000000B7269d67e

POST - https://{{originNmpUrl}}/certificate/recoverAndTransferToBridge

Body

FieldTypeMandatoryDescription
tokenIdStringIdentification number of the digital passport to recover for the bridge.
{
    "tokenId": "99469892"
}

Migrate Digital Passports to Supernet

  • The previous transfer event will trigger the webhook that will call the migrateCertificateToSupernet.
  • This builds the new digital passport history with the thread. The thread is into the digital passport content.
  • The digital passport will be minted on the associated destinationNmp.
  • The digital passport content will be updated on chain1 with the new thread.
  • If the brand is not the owner, then the digital passport is airdropped to the previous owner.

URL

POST - https://{{originNmpUrl}}/certificate/migrateCertificateToSupernet

Body

{
  "data": {
    "name": "smartAssetContract.Transfer",
    "tokenId": "99469892",
    "chainId": 77,
    "network": "testnet",
    "blocknumber": 35292862,
    "raw": {
      "address": "0x512C1FCF401133680f373a386F3f752b98070BC5",
      "blockHash": "0xb26bece9485feffb4a91f32e0e8bb0105768dca153513ac766578ed41731d4f9",
      "blockNumber": 35292862,
      "logIndex": 0,
      "removed": false,
      "transactionHash": "0xe38d4d3ebbca1cbf09df50409600c79d6e5ebb588546e12a107a4d4067daf33f",
      "transactionIndex": 1,
      "transactionLogIndex": "0x0",
      "id": "log_527a464c",
      "returnValues": {
        "0": "0x305051e9a023fe881EE21cA43fd90c460B427Caa",
        "1": "0x012ede30B64074be070d548FC04E5D3caFaFfB70",
        "2": "99469892",
        "_from": "0x305051e9a023fe881EE21cA43fd90c460B427Caa",
        "_to": "0x012ede30B64074be070d548FC04E5D3caFaFfB70",
        "_tokenId": "99469892"
      },
      "event": "Transfer",
      "signature": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
      "raw": {
        "data": "0x",
        "topics": [
          "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
          "0x000000000000000000000000305051e9a023fe881ee21ca43fd90c460b427caa",
          "0x000000000000000000000000012ede30b64074be070d548fc04e5d3cafaffb70",
          "0x0000000000000000000000000000000000000000000000000000000005edca44"
        ]
      }
    },
    "issuer": "0x305051e9a023fe881EE21cA43fd90c460B427Caa",
    "owner": "0x012ede30B64074be070d548FC04E5D3caFaFfB70",
    "previousOwner": "0x305051e9a023fe881EE21cA43fd90c460B427Caa"
  },
  "signature": "3045022100bfb18d7b0d8dfff588a22d528eea46fb2383ea6a11a57d9e95099667027a31aa02202e4ac552d7b593dc73d67d8d13806e182a6809efa504f61cad8fbec4f032c10b"
}