Import Wallet

This endpoint is not enabled by default. Contact IBM support to have it activated.

IBM Digital Asset Haven secures private keys by generating them as MPC key shares in its decentralized key management network. This happens by default when you create a wallet.In some cases, you may need to import an existing wallet, meaning an existing private key, into IBM Digital Asset Haven infrastructure instead of creating a new wallet and transferring funds. For example, you may need to retain an existing wallet if its address is tied to a smart contract that you do not want to redeploy. This import API endpoint is intended for one-time migration when onboarding to the IBM Digital Asset Haven platform. It must be used with the IBM Digital Asset Haven import SDK. IBM Digital Asset Haven cannot guarantee the security of imported wallets because IBM Digital Asset Haven cannot determine who had prior access to the private key. This feature is restricted to Enterprise customers who have signed a contractual addendum limiting IBM Digital Asset Haven liability. Contact your sales representative for more information.

HTTP request
POST /wallets/import
Authorization requirements
Header Type Required Description
Authorization string Yes Bearer token used to authenticate the request. See Authentication flows for instructions on generating this token.
X-DFNS-USERACTION string Yes User action signature used to authorize change-inducing requests. See User Action Signing flows for instructions on generating this signature.
Request body
a
Field Type Required
curve enum (string) Yes
protocol enum (string) Yes
minSigners integer Yes
encryptedKeyShares object[] Yes
network enum (string) Yes
name string No
externalId string No
validatorId string No
curl --request POST \
  --url https://api.digitalassets.ibm.com/wallets/import \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-DFNS-USERACTION: <api-key>' \
  --data '
{
  "curve": "ed25519",
  "protocol": "CGGMP24",
  "minSigners": 123,
  "encryptedKeyShares": [
    {
      "signerId": "<string>",
      "encryptedKeyShare": "<string>"
    }
  ],
  "network": "Algorand",
  "name": "<string>",
  "externalId": "<string>",
  "validatorId": "<string>"
}
'
Response
200: Success

Returns the details of the imported wallet.

Example response:

{
  "id": "wa-1f04s-lqc9q-xxxxxxxxxxxxxxxx",
  "network": "Ethereum",
  "address": "0x00e3495cf6af59008f22ffaf32d4c92ac33dac47",
  "name": "trading hot wallet",
  "signingKey": {
    "id": "key-6ece3-9l565-xxxxxxxxxxxxxxxx",
    "scheme": "ECDSA",
    "curve": "secp256k1",
    "publicKey": "e2375c8c9e87bfcd0be8f29d76c818cabacd51584f72cb2222d49a13b036d84d3d"
  },
  "status": "Active",
  "dateCreated": "2023-04-14T20:41:28.715Z",
  "custodial": true,
  "tags": []
}