Skip to main content
POST
/
v1
/
wallets
/
import
curl --request POST \
  --url https://api.moonkey.fun/v1/wallets/import \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "user_id": "user_2sfOL5Kwoymy8KdtzWrhZQY5V6s",
  "wallet": {
    "public_address": "HJkpTBbR7Q5dg3cuuXgrFptyftGB5gDFqs5BvnVaHRr8",
    "wallet_type": "solana",
    "encryption_type": "HPKE",
    "entropy_type": "private_key",
    "ciphertext": "YRl6RRq7En6SoxR9GfAh7nre7ubQBpMoeIHGzcfviw8VCcfwl9+b6vtRJm3ESIGm11n++09AfZoqspogSvDIw5LHZgbNEyTHj6VV/xTTikY9D3Btlz9UqqtW5NLYNBPHx+xD6Y5zQ80=",
    "encapsulated_key": "KYWtb3Q4IOm2iMespNPMm/n691cxE2vJoFE7wLDe1gI="
  }
}
'
{
  "id": "wallet_36l2o0DBM2fSGozFKrVxgNWdKYW",
  "app_id": "6e7c9f1b-5e66-400c-99a7-783411e03aac",
  "user_id": "user_2sfOL5Kwoymy8KdtzWrhZQY5V6s",
  "public_address": "HJkpTBbR7Q5dg3cuuXgrFptyftGB5gDFqs5BvnVaHRr8",
  "wallet_type": "solana",
  "wallet_client_type": null,
  "wallet_pk_id": "walletpk_36l2o1Q0L2H3mnfGZJ51O2cgqv6",
  "verified": true,
  "is_default": false,
  "is_read_only": false,
  "is_imported": true,
  "delegated": false,
  "account_index": null,
  "updated_at": 1765567007,
  "created_at": 1765567007
}

Authorizations

Authorization
string
header
required

Auth Platform API includes all the Auth related features. All Users, Phone Numbers, Emails, and OTPs are associated with an App as the container.

Endpoints only accept App's Secret API keys other than certain endpoints that are used client side or via SDK that accept the public_token.

Authentication using App Api Key

Header:

Authorization: Bearer {api_key}

Authenticated Request

curl \
-X GET https://api.moonkey.fun/v1/auth/users/user_24wFP9pDa9YiMJLun94iKykoZs2 \
-H "Authorization: Bearer sk_test_pRqweh3wvWmJAAVYv7Z0T5iPLzFM4ql0muoyQcjOxGeN3p1r"

Body

application/json
user_id
string
required

Required Unique User ID of the user to import the wallet for.

Minimum string length: 1
wallet
object
required

Required Wallet import data containing encrypted entropy.

Response

200 - application/json

Import Wallet response

id
string
required

Unique wallet ID.

app_id
string
required

App ID the wallet belongs to.

user_id
string
required

User ID the wallet belongs to.

public_address
string
required

Public address of the imported wallet.

wallet_type
string
required

Blockchain type of the wallet.

verified
boolean
required

Whether the wallet is verified.

is_default
boolean
required

Whether this is the default wallet for the user.

is_read_only
boolean
required

Whether the wallet is read-only.

is_imported
boolean
required

Whether the wallet was imported. Always true for imported wallets.

delegated
boolean
required

Whether the wallet is delegated.

updated_at
integer
required

Unix timestamp of last update.

created_at
integer
required

Unix timestamp of creation.

wallet_client_type
string | null

Client type of the wallet, if applicable.

wallet_pk_id
string

Wallet private key ID.

account_index
integer | null

Account derivation index for HD-derived wallets. Returns the index used during wallet generation or import, null if the wallet was created from a private key.