The Hut34 Wallet's enterprise grade API binds tokenised value and a blockchain based settlement layer to data secured by Colossus encryption service.
Prior to using API calls, you need to enable API access in your account.
First, Sign in using your Google account credentials at:
Next, click on your profile on the top right of your screen and click on API settings.
On the next page, click on "Enable API". It's done! You have successfully enabled API access to this account.
Wallet as a service API v.0.0.1
API based security applies to all URLs /api/v1/
Regular OAuth based security applies to all other URLs
we recommend using other providers such as infura, etherscan, or ethers.js in a client, to query balances and view transaction history.
All endpoints are served at:
https://wallet.hut34.io/api/v1
Note: The API tag displayed against an address in the browser window indicates that this address was created using the API.
To enable API access, first log in to your wallet, and select ‘API access’ from the top right hand corner of the screen. Record your API key, and ensure all requests contain an ‘Authorization’ request header as follows:
Authorization: Hut34 [APIKEY]
For example:
Authorization: Hut34 CKooV3KaDPg6K70H06aF9IgQi7zFCSkO
Note: This Authorization header must be included in all further API calls.
[{"created": "2018-05-15T15:34:10.938+10:00","updated": "2018-05-15T15:34:10.938+10:00","address": "0x1a7ede45aac5ea993f5d3a5c1c966764d1313740"},{"created": "2018-05-14T11:35:04.142+10:00","updated": "2018-05-14T11:35:04.142+10:00","address": "0xf7b024a32cE0183616ee62bBA00786a71e987390"}]
// RETURNS A NEWLY CREATED ADDRESS DETAILS// NOTE: this creates a new address with the password you have chosen{"created": "2018-05-15T15:34:10.938+10:00","updated": "2018-05-15T15:34:10.938+10:00","address": "0x1a7ede45aac5ea993f5d3a5c1c966764d1313740"}
// returns: Submitted tx hash{"transactionHash": "0x6382c86eeb550cfb32eda5bb466ec99208b48a72532b01d8a53d3d2a1fe990f6"}
//Returning submitting tx hash{"password": "p455w0rd","to": "0xADDRESS","tokenAddress": "0xTOKENADDRESS","value": "100000000000000"
https://wallet.hut34.io/api/v1/?redirectAddressTo={redirect address}
After sign in, this will perform a redirect in the browser to the given address, with the parameter "walletAddress" set to the first address in the wallet.
For example:
https://wallet.hut34.io/api/v1?redirectAddressTo=https://hut34.io
will direct you to
https://hut34.io/?walletAddress=0xf7b024a32cE0183616ee62bBA00786a71e987390
Your application can prepare a transaction for your user to approve. Prepare a JSON object which describes the transaction, as outlined below. Encode this JSON object in Base 64, and provide this information as a 'data' GET variable within a link to the user's wallet, as shown below;
If no token is mentioned in the JSON object, it will automatically prepare to transfer ETH.
{"toAddress": "0x95c8c55bb34e9701a80507c83cf488d5b85166e2","amount": "1","redirectOnSuccess": "https://www.youtube.com/watch?v=SC4xMk98Pdc","token": {"symbol": "ENTRP","decimals": 18,"address": "0x5BC7e5f0Ab8b2E10D2D0a3F21739FCe62459aeF3"}}
After encoding the above JSON object in base64, we find the following link:
https://wallet.hut34.io/?data=ewogICJ0b0FkZHJlc3MiOiAiMHg5NWM4YzU1YmIzNGU5NzAxYTgwNTA3YzgzY2Y0ODhkNWI4NTE2NmUyIiwKICAiYW1vdW50IjogIjEiLAogICJyZWRpcmVjdE9uU3VjY2VzcyI6ICJodHRwczovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PVNDNHhNazk4UGRjIiwKICAidG9rZW4iOiB7CiAgICAic3ltYm9sIjogIkVOVFJQIiwKICAgICJkZWNpbWFscyI6IDE4LAogICAgImFkZHJlc3MiOiAiMHg1QkM3ZTVmMEFiOGIyRTEwRDJEMGEzRjIxNzM5RkNlNjI0NTlhZUYzIgogIH0KfQ==
Do not forget to include the Authorization header containing your Hut34 API key.
{"result": "0x..................."}
"result": "0x......"
"result": "0x......"
If you ever want to disable API calls for your account for any reason, complete the following steps:
First, Log In your Hut34 Wallet using your Google Account credentials.
Next, click on your profile, on the top right corner of the page.
Finally, click on "Disable API".
You have now disabled API access in your wallet.