Skip to content

Commit

Permalink
[guides] refs fibercrypto#130 - Describe wallet contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
olemis committed Dec 8, 2019
1 parent 17d5164 commit 4fb4d0a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions content/dev-docs/guides/v2.wallet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
+++
title = "FiberCrypto Wallets Guide v2"
weight = 4
+++

### Introduction

Wallets create public keys to receive coins and use the corresponding private keys to spend them. Wallet files are specific to altcoin plugin implementations. They store private keys and (optionally) other information related to transactions for a given wallet in particular.

Wallet contracts are addressed below in separate subsections whereas supported wallet files are documented in individual altcoin plugin implementations. This document attempts to always make it clear whether we are talking about wallet contracts or wallet files.

### Wallet Contracts

Permitting receiving and spending of coins is the only essential feature of all wallet contracts. Nonetheless a particular wallet imstance does not need to do both things. Two wallet objects can work together, one distributing public keys in order to receive coins and another one signing transactions spending those coins.

Wallet also need to interact with the peer-to-peer network to get information from the block chain and to broadcast new transactions. However, the objects which distribute public keys or sign transactions don’t need to interact with the peer-to-peer network themselves. Moreover it is possible for a wallet to have access to a local copy of the block chain, thus enabling offline operations.

This leaves us with four necessary, but separable, parts of a wallet system: a public key distribution subsystem, a set of signing strategies, a blockchain aware visor, and a networked component. In the subsections below, we will describe specific contracts and possible relations between them.

Note: We speak about distributing public keys generically. In many cases, hashes will be distributed instead of public keys, with the actual public keys only being distributed when the outputs they control are spent.

0 comments on commit 4fb4d0a

Please sign in to comment.