Transactions
General information about Alpaca transactions
-
By default, all transactions are signed seamlessly on the server, using your encrypted account private keys. This makes placing-, accepting- and finalising orders as simple as clicking on a button. If, however, you prefer to sign your transactions manually, you may enable manual multisig in your account settings.
Alpaca supports BIP32 extended public keys as well as traditional bitcoin public keys. While BIP32 offers significant advantages in terms of security and anonymity, it requires working knowledge of child key derivation.
When you add or change your public key, you will be asked to verify ownership by signing a message. Console commands are given for Bitcoin Core and Electrum. Having imported the relevant private key, you simply copy-paste the command into the console, press enter and the client will compute a signature. Paste this signature into the box on Alpaca and click 'Submit'.
Note: for BIP32, you first have to derive and import the correct child private key. The derivation path is given in the upper right corner of the signature window.
With manual multisig enabled, you will be prompted to manually sign raw transactions when you place-, accept and finalize orders. The process is similar to verifying your public key from earlier:
- Ensure that the raw transaction has correct outputs. If you notice any suspect recipients, please notify a moderator or admin as soon as possible.
- Console commands have been pre-generated for Bitcoin Core and Electrum. These can be entered in the console to easily sign the transaction. In Bitcoin-Qt, the console window is found under Help→Debug window→Console. If you wallet is locked, you will need to enter
walletpassphrase yourpassphrase 120
to unlock the wallet. - If you haven't already, import the relevant private key into your bitcoin client.
In Electrum: Wallet→Private keys→Import.
In Bitcoin-Qt: Enter into console:importprivkey "5yourveryveryveryverylongprivatekeystring"
- Copy-paste the command into console and press enter.
- If the transaction was valid, the console will output a signed raw transaction. Look for 'hex' followed by a large block of text. This is the signed transaction.
- Copy-paste the signed transaction into the prompt on the site
- Click 'Sign'
If everything went well, you should be redirected to the next step. If not, you will be made aware of any errors. Be aware that you may sometimes have to sign multiple transactions in a row.
-
Did you accidentally deposit more than required on an order?
- All confirmed excess funds gets sent back to your return address once the order is placed.
Did you deposit after placing the order?
- All funds in deposit addresses can be recovered manually using your account's encrypted private keys.
-
Should you ever want to recover funds from a deposit address, you can do so easily.
Using seamless multisig (default):
- First, you need to determine your account's BIP32 private key. This and other information about your account can be found in your account backup file, which you can download from your account overview.
Note: the contents of this file are strictly for your eyes only - it contains encryption- and bitcoin private keys.
Look for "BIP32 Private Key": and take note of the following text, which should start with "xprv..." - this is your BIP32 private key used to derive private keys for all your transactions. - You will need to use your BIP32 private key to derive the relevant bitcoin private key for your deposit address. In this guide, we will be using the javascript implementation at bip32.org to achieve this.
Note: as with any other javascript applications, you are advised to ensure that the application cannot make outgoing connections. The safest would be to disconnect your internet completely while using the application.
- Under Derive from, choose BIP32 Key.
- In the box BIP32 Extended Key, copy-paste your BIP32 Private Key (from earlier).
- For Derivation Path, choose Simple: m/i.
- In Keypair Index (i), enter the transaction ID of the deposit address you wish to gain access to.
To find the transaction ID, go to your transaction overview. The number in the '#' column is the transaction ID.
- Your private key will be displayed under Private Key (WIF).
- Now, you need to import this private key into your bitcoin client:
- Electrum: from the top menu bar, choose Wallet → Private keys → Import. Paste the private key from earlier into this box and click 'Import'.
- Bitcoin-Qt: from the menu bar, choose Help → Debug Windows. Select Console. If you wallet is encrypted, you will need to unlock it by entering
walletpassphrase "YourLongPassphrase" 600
in the input box. Then enterimportprivkey <bitcoinprivkey>
- You will now have full access to funds in the deposit address.
Using manual multisig:
With manual multisig, you are already in full control of all deposit addresses.
- First, you need to determine your account's BIP32 private key. This and other information about your account can be found in your account backup file, which you can download from your account overview.