Import a wallet

How to import an existing wallet

Import using private key

POST https://api-wallet.venly.io/api/wallets/import

Request Body

NameTypeDescription

walletType

string

Make it recoverable or not

importWalletType

string

Type of import (eg. MATIC_PRIVATE_KEY)

pincode

string

PIN to encrypt the wallet with

privateKey

string

Private key of the existing wallet

{
    "success": true,
    "result": {
        "id": "08aa6c62-509c-4999-914b-f649c1812eb1",
        "address": "0x5b0BB5d41A3e24222257625e746aFc2275c78315",
        "secretType": "BSC",
        "walletType": "WHITE_LABEL",
        "createdAt": null,
        "archived": false,
        "alias": "white_hat_dogfish",
        "description": "White hat Dogfish",
        "primary": true,
        "hasCustomPin": true,
        "balance": {
            "available": true,
            "secretType": "BSC",
            "balance": 0.0,
            "gasBalance": 0.0,
            "symbol": "BNB",
            "gasSymbol": "BNB",
            "rawBalance": "0",
            "rawGasBalance": "0",
            "decimals": 18
        }
    }
}

Import using keystore

POST https://api-wallet.venly.io/api/wallets/import

Request Body

NameTypeDescription

pincode

string

PIN to encrypt the wallet with

walletType

string

Make it recoverable or not

importWalletType

string

Type of import (eg. MATIC_KEYSTORE)

keystore

string

JSON file that represents the wallet (warning: this is a string field so make sure the JSON body is escaped properly)

password

string

The password of the keystore

{
    "success": true,
    "result": {
        "id": "08aa6c62-509c-4999-914b-f649c1812eb1",
        "address": "0x5b0BB5d41A3e24222257625e746aFc2275c78315",
        "secretType": "BSC",
        "walletType": "WHITE_LABEL",
        "createdAt": null,
        "archived": false,
        "alias": "white_hat_dogfish",
        "description": "White hat Dogfish",
        "primary": true,
        "hasCustomPin": true,
        "balance": {
            "available": true,
            "secretType": "BSC",
            "balance": 0.0,
            "gasBalance": 0.0,
            "symbol": "BNB",
            "gasSymbol": "BNB",
            "rawBalance": "0",
            "rawGasBalance": "0",
            "decimals": 18
        }
    }
}

Import using WIF

POST https://api-wallet.venly.io/api/wallets/import

Request Body

NameTypeDescription

walletType

string

Make it recoverable or not

importWalletType*

string

Type of import (eg. BITCOIN_WIF)

pincode*

string

PIN to encrypt the wallet with

wif*

string

The wif (wallet import format)

{
    "success": true,
    "result": {
        "id": "08aa6c62-509c-4999-914b-f649c1812eb1",
        "address": "0x5b0BB5d41A3e24222257625e746aFc2275c78315",
        "secretType": "BSC",
        "walletType": "WHITE_LABEL",
        "createdAt": null,
        "archived": false,
        "alias": "white_hat_dogfish",
        "description": "White hat Dogfish",
        "primary": true,
        "hasCustomPin": true,
        "balance": {
            "available": true,
            "secretType": "BSC",
            "balance": 0.0,
            "gasBalance": 0.0,
            "symbol": "BNB",
            "gasSymbol": "BNB",
            "rawBalance": "0",
            "rawGasBalance": "0",
            "decimals": 18
        }
    }
}

Import using WIF with a passphrase

POST https://api-wallet.venly.io/api/wallets/import

Request Body

NameTypeDescription

wif*

string

The wif (wallet import format)

pincode*

string

PIN to encrypt the wallet with

importWalletType*

string

Type of import (eg. BITCOIN_WIF_PASSPHRASE)

walletType

string

Make it recoverable or not

{
    "success": true,
    "result": {
        "id": "4659d9ad-6189-47e9-a98e-de0e9aef2de9",
        "address": "13Y5p2kbRakDhXmchySAxRn9u2CaLjVfEv",
        "secretType": "BITCOIN",
        "walletType": "THREEWAY_SHARED",
        "createdAt": null,
        "archived": false,
        "description": "Delightful Pelican",
        "primary": true,
        "hasCustomPin": false,
        "balance": {
            "available": true,
            "secretType": "BITCOIN",
            "balance": 0.0,
            "gasBalance": 0.0,
            "symbol": "BTC",
            "gasSymbol": "BTC",
            "rawBalance": "0",
            "rawGasBalance": "0",
            "decimals": 8
        }
    }
}

Import from other secret type (blockchain)

POST https://api-wallet.venly.io/api/wallets/import

Using this endpoint, it is possible to use the same wallet (address) for a different blockchain. Currently it is only possible to import to/from these chains: ETHEREUM <-> MATIC BSC <-> ETHEREUM

Request Body

NameTypeDescription

walletType

string

Make it recoverable or not

importWalletType

string

Must be: MIGRATION

pincode

string

PIN for the wallet

walletId

string

The ID of the wallet you want to import into another secret type

to

object

Destination SecretType (blockchain), ex: MATIC

{
    "success": true,
    "result": {
        "id": "08aa6c62-509c-4999-914b-f649c1812eb1",
        "address": "0x5b0BB5d41A3e24222257625e746aFc2275c78315",
        "secretType": "MATIC",
        "walletType": "WHITE_LABEL",
        "createdAt": null,
        "archived": false,
        "alias": "white_hat_dogfish",
        "description": "White hat Dogfish",
        "primary": true,
        "hasCustomPin": true,
        "balance": {
            "available": true,
            "secretType": "BSC",
            "balance": 0.0,
            "gasBalance": 0.0,
            "symbol": "BNB",
            "gasSymbol": "BNB",
            "rawBalance": "0",
            "rawGasBalance": "0",
            "decimals": 18
        }
    }
}

For exporting a wallet please have a look at Export a wallet.

Object Types

pageWalletTypepageImportWalletTypepageSecretType

Last updated