ServerWallet API

ServerWallet APIs support HTTP protocol. It uses /wallet path.

Endpoint

Real Server : https://api.vixco.net/wallet

Test Server : https://test-api.vixco.net/wallet

createAddress

Returns a new address. After generating a new private key in Server Wallet, Address, secretKey, and mnemonic are returned.

Parameters

NameTypeDescription

addInfo

String

Address Information. This can be retrieved using the getAddressInfo API. Max length : 200

Return Value

NameTypeDescription

address

String

Address

secretKey

String

It is used for authentication when requesting SignData to the Server Wallet. It cannot be viewed or exported, so it must be kept well.

mnemonic

String

Used for address recovery if necessary

A new secretKey is created when ImportAddress is called.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "address": "0xce808360b37030c29bdf3eacbc6c8cda62c04c39",
            "mnemonic": "bulk tomorrow beauty tag fragile rough quit antique shock river powder ghost",
            "secretKey": "49d274d8fcbd00b862dbfb01a759d233"
        }
    }
}

getAddressInfo

Return an address information.

Parameters

NameTypeDescription

address

String

Address

Return Value

NameTypeDescription

address

String

Address

addInfo

String

Address information saved when creating an address.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "address": "0xce808360b37030c29bdf3eacbc6c8cda62c04c39",
            "mnemonic": "My Test Address"
        }
    }
}

exportAddress

Returns the mnemonic of a given address. if hashKey is not correct, it will return error.

Parameters

NameTypeDescription

address

String

Address

languageType

String

mnemonic language (Currently only "en" available)

tempKey

String

tempKey for "exportAddress"

hashKey

String

hash(tempKey | secretKey)

Return Value

NameTypeDescription

mnemonic

String

Used for address recovery if necessary.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "mnemonic": "bulk tomorrow beauty tag fragile rough quit antique shock river powder ghost"
        }
    }
}

importAddress

Import an Address using mnemonic. Store private key in Server Wallet, and Address, secretKey, and mnemonic are returned.

Parameters

NameTypeDescription

languageType

String

mnemonic language (Currently only "en" available)

mnemonic

String

Mnemonic String

addInfo

String

Address Information. This can be retrieved using the getAddressInfo API. Max length : 200

Return Value

NameTypeDescription

address

String

Address

secretKey

String

It is used for authentication when requesting SignData to the Server Wallet. It cannot be viewed or exported, so it must be kept well.

mnemonic

String

Address can be restored using Mnemonic.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "address": "0xce808360b37030c29bdf3eacbc6c8cda62c04c39",
            "mnemonic": "bulk tomorrow beauty tag fragile rough quit antique shock river powder ghost",
            "secretKey": "49d274d8fcbd00b862dbfb01a759d233"
        }
    }
}

importAddressWithPrivateKey

Import an Address using private key. Store private key in Server Wallet, and Address, secretKey are returned. Unlike importAddress , mnemonic is not returned.

Parameters

NameTypeDescription

privateKey

String

private Key

addInfo

String

Address Information. This can be retrieved using the getAddressInfo API. Max length : 200

Return Value

NameTypeDescription

address

String

Address (0x....)

secretKey

String

It is used for authentication when requesting SignData to the Server Wallet. It cannot be viewed or exported, so it must be kept well.

mnemonic

String

empty.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "address": "0xce808360b37030c29bdf3eacbc6c8cda62c04c39",
            "mnemonic": "",
            "secretKey": "49d274d8fcbd00b862dbfb01a759d233"
        }
    }
}

getAddressTokenList

Returns a list of tokens held by address.

Parameters

NameTypeDescription

address

String

Address

Return Value

NameTypeDescription

address

String

Address

contractAddress

String

Contract address of token.

symbol

String

Symbol of token.

tokenType

String

Type of token "ERC20", "ERC721", "ERC1155"

tokenId

BigInteger

tokenId of ERC1155, In case of ERC20, ERC721 token, it is the blank.

balance

BigDecimal

Balance of token. In case of ERC1155 token, it is the balance of tokenId.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": { 
            [ 
                { 
                    "address": "0x39fdfdsfsdsdfsdf9sd0sfds9fsd0fsdgsd",
                    "contractAddress": "0xce808360b37030c29bdf3eacbc6c8cda62c04c39",
                    "symbol": "TOK1",
                    "tokenType": "ERC20",
                    "tokenId": "",
                    "balance": "10.292"
                },
                { 
                    "address": "0x39fdfdsfsdsdfsdf9sd0sfds9fsd0fsdgsd",
                    "contractAddress": "0xce808360b37030c29bdf3eacbc6c8cda62c04c39",
                    "symbol": "TOK2",
                    "tokenType": "ERC1155",
                    "tokenId": "2",
                    "balance": "10"
                }
            ]
        }
    }
}

signData

Returns data signed with the private key of address to make a transaction.

Parameters

NameTypeDescription

address

String

Address

data

String

Data to be signed. This is probably a hash value.

tempKey

String

tempKey for "signData"

hashKey

String

hash(tempKey | secretKey)

Return Value

NameTypeDescription

signedData

String

Signed data

Example

{
    "jsonrpc": "2.0",
    "id": "00456", 
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "signedData": "3043021f6741c7c4ec...ac6d7f7ba8350608"
        }
    }
}

Last updated