This repository has been archived by the owner on Mar 1, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Working with the wallet API
ryan lemmer edited this page Jan 16, 2019
·
1 revision
First you'll need to build and run a local node (see "Building and Running a wallet node").
In the following API calls we refer to scripts/tls-files
- see "Generating TLS certs" for how to generate these.
Create an EOS wallet with an account for each Account Public Key provided:
curl -X POST https://localhost:8090/api/unimplemented/external-wallets \
-H "Content-Type: application/json" \
--cacert scripts/tls-files/ca.crt \
--cert scripts/tls-files/client.pem \
-d '{"accountsPublicKeys":["<Account PK - Base 64 encoded>"],
"addressPoolGap":{"addressPoolGap": 10},
"assuranceLevel": "strict",
"name":"The Wallet"}'
(returns a wallet id)
For EOS wallets, we create an unsigned transaction independently from signing it (with externally held keys). Here we create an unsigned transaction in the first hardened account of the given wallet:
curl -X POST https://localhost:8090/api/unimplemented/external-transactions/unsigned \
-H "Content-Type: application/json" \
--cacert scripts/tls-files/ca.crt \
--cert scripts/tls-files/client.pem \
-d '{"source": {"walletId": "<WALLET ID>", "accountIndex": 2147483648},
"destinations": [{"address": "<RECIPIENT ADDR 1 - base 58 encoded>", "amount": 4711}] }'
Sign the transaction with externally held keys: TODO