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
Name | Type | Description |
---|---|---|
addInfo | String | Address Information. This can be retrieved using the getAddressInfo API. Max length : 200 |
Return Value
Name | Type | Description |
---|---|---|
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
getAddressInfo
Return an address information.
Parameters
Name | Type | Description |
---|---|---|
address | String | Address |
Return Value
Name | Type | Description |
---|---|---|
address | String | Address |
addInfo | String | Address information saved when creating an address. |
Example
exportAddress
Returns the mnemonic of a given address. if hashKey is not correct, it will return error.
Parameters
Name | Type | Description |
---|---|---|
address | String | Address |
languageType | String | mnemonic language (Currently only "en" available) |
tempKey | String | tempKey for "exportAddress" |
hashKey | String | hash(tempKey | secretKey) |
Return Value
Name | Type | Description |
---|---|---|
mnemonic | String | Used for address recovery if necessary. |
Example
importAddress
Import an Address using mnemonic. Store private key in Server Wallet, and Address, secretKey, and mnemonic are returned.
Parameters
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
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
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
Name | Type | Description |
---|---|---|
privateKey | String | private Key |
addInfo | String | Address Information. This can be retrieved using the getAddressInfo API. Max length : 200 |
Return Value
Name | Type | Description |
---|---|---|
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
getAddressTokenList
Returns a list of tokens held by address.
Parameters
Name | Type | Description |
---|---|---|
address | String | Address |
Return Value
Name | Type | Description |
---|---|---|
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
signData
Returns data signed with the private key of address to make a transaction.
Parameters
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
signedData | String | Signed data |
Example
Last updated