Import Key
IBM Digital Asset Haven secures private keys by generating them as MPC key shares in its decentralized key management network. This is the default behavior when you create a key or wallet.
In some cases, you may need to import an existing private key into the IBM Digital Asset Haven infrastructure instead of creating a new key and transferring funds. For example, you may want to preserve an existing wallet whose address is tied to a smart contract that cannot be redeployed. This endpoint enables key import and is designed for first‑time migrations when onboarding to the IBM Digital Asset Haven platform. It must be used in conjunction with the IBM Digital Asset Haven import SDK. IBM Digital Asset Haven cannot guarantee the security of imported keys because it cannot control who had access to the private key before import. For this reason, key import is restricted to Enterprise customers who have signed a contractual addendum limiting IBM Digital Asset Haven liability. Contact your sales representative for details.
- HTTP request
- POST /keys/import
- Authorization requirements
-
Header Type Required Description Authorizationstring Yes Bearer token used to authenticate the request. See Authentication flows for instructions on generating this token. X-DFNS-USERACTIONstring Yes User action signature used to authorize change-inducing requests. See User Action Signing flows for instructions on generating this signature. - Request body
-
Field Type Required curve enum (string) Yes protocol enum (string) Yes minSigners integer Yes encryptedKeyShares object[] Yes name string No masterKey boolean No curl --request POST \ --url https://api.digitalassets.ibm.com/keys/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>" } ], "name": "<string>", "masterKey": true } ' - Response
- 200: Success
Example response:
{ "id": "key-01snl-t56gb-j8tsok0vn802p80i", "scheme": "ECDSA", "curve": "ed25519", "publicKey": "<string>", "status": "Active", "custodial": true, "dateCreated": "2023-04-14T20:41:28.715Z", "masterKey": true, "derivedFrom": { "keyId": "key-01snl-t56gb-j8tsok0vn802p80i", "path": "<string>" }, "name": "<string>", "imported": true, "exported": true, "dateExported": "2023-04-14T20:41:28.715Z", "dateDeleted": "2023-04-14T20:41:28.715Z" }