Difference between revisions of "Wallet (blockchain)"

From Open Transactions
Jump to navigation Jump to search
(Initial page creation)
 
m (Wallet Creation)
Line 42: Line 42:
 
==Wallet Creation==
 
==Wallet Creation==
  
When an audit server first initializes a voting pool contract, it must create the appropriate cryptocurrency wallets via the [[cryptocurrency wallet API#importmultisigwallet|importmultisigwallet]] call to a wallet provider of the appropriate coin type (Bitcoin, Litecoin, etc).
+
When an audit server first initializes a voting pool contract, it must create the appropriate cryptocurrency wallets via the [[Voting Pool Wallet API#importmultisigwallet|importmultisigwallet]] call to a wallet provider of the appropriate coin type (Bitcoin, Litecoin, etc).
  
 
The audit server must call this function for every defined series in the keyset, and must provide the xpubs in standard order (defined below).
 
The audit server must call this function for every defined series in the keyset, and must provide the xpubs in standard order (defined below).
  
When the private keys for a series are brought online, the wallet must call [[cryptocurrency wallet API#updatemultisigwallet|updatemultisigwallet]] to load them into the blockchain wallet.
+
When the private keys for a series are brought online, the wallet must call [[Voting Pool Wallet API#updatemultisigwallet|updatemultisigwallet]] to load them into the blockchain wallet.
  
 
Extended private keys must be loaded in the same order as their corresponding public keys. An audit server must return an error to the operator if he attempts to load the wrong extended private key.
 
Extended private keys must be loaded in the same order as their corresponding public keys. An audit server must return an error to the operator if he attempts to load the wrong extended private key.
  
 
[[Category:Voting Pool Components]]
 
[[Category:Voting Pool Components]]

Revision as of 22:50, 17 April 2014

Introduction

In order to avoid ambiguity, the terms "blockchain wallet" and "blockchain address" refers to the cryptocurrency for which is pool is tracking receipts. This differentiation is necessary to avoid confusion with OT wallets or nym addresses.

Responsibilities

The blockchain wallet tracks and manipulates cryptocurrencies balances on the appropriate blockchain. The wallet notifies the audit server of received deposits, constructs outgoing transactions, and monitors the state of all relevant incoming and outgoing transactions.

An audit server requires access to a wallet provider for every cryptocurrency its operator wishes to accept deposits for, and this wallet must support the Voting Pool Wallet API.

Wallets should understand both hierarchical determinism and multisig capability, and also output coloring.

Address Identification

The wallet used to store the pool’s funds must be capable of creating a hierarchical deterministic structure that generates and understands multisignature outputs.

Any blockchain address relevant to a voting pool participant can be referenced via unique identifier consisting of the following parameters:

Pool
UUID for a specific voting pool. This UUID is persistent even as members are added or removed.
Series
An index number that starts at 1 and increases monotonically (from the Keyset Definition)
Server
0 for change addresses, 1-through-n for deposit addresses.

Note the server index represents the position of a server’s xpub in the standard order for a given series. The audit server must reference the keyset definition to obtain the correct transaction server ID-to-server index mapping for a given series since the standard order may change between series.

Sequence
The index applied to the xpubs in a given series to obtain the desired multisig output script.


When the audit server needs to query a specific address from the blockchain wallet, will pass the following as an address identifier:


(pool,series,server,sequence)


The first two parameters (pool,series) define the wallet identifier. Note that the audit servers never pass raw blockchain addresses to the cryptocurrency wallets, but instead use these identifiers.

Wallet Creation

When an audit server first initializes a voting pool contract, it must create the appropriate cryptocurrency wallets via the importmultisigwallet call to a wallet provider of the appropriate coin type (Bitcoin, Litecoin, etc).

The audit server must call this function for every defined series in the keyset, and must provide the xpubs in standard order (defined below).

When the private keys for a series are brought online, the wallet must call updatemultisigwallet to load them into the blockchain wallet.

Extended private keys must be loaded in the same order as their corresponding public keys. An audit server must return an error to the operator if he attempts to load the wrong extended private key.