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

Return Value

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

Return Value

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

Return Value

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

Return Value

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

Return Value

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

Return Value

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

Return Value

Example

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

Last updated