Bitshares-Core  2.0.181105
BitShares blockchain implementation and command-line interface software
Classes | Public Member Functions | Public Attributes | List of all members
graphene::chain::blind_transfer_operation Struct Reference

Transfers from blind to blind. More...

#include <confidential.hpp>

Inheritance diagram for graphene::chain::blind_transfer_operation:
graphene::chain::base_operation

Classes

struct  fee_parameters_type
 

Public Member Functions

account_id_type fee_payer () const
 
void validate () const
 
share_type calculate_fee (const fee_parameters_type &k) const
 
void get_required_authorities (vector< authority > &a) const
 
- Public Member Functions inherited from graphene::chain::base_operation
template<typename T >
share_type calculate_fee (const T &params) const
 
void get_required_authorities (vector< authority > &) const
 
void get_required_active_authorities (flat_set< account_id_type > &) const
 
void get_required_owner_authorities (flat_set< account_id_type > &) const
 
void validate () const
 

Public Attributes

asset fee
 
vector< blind_inputinputs
 
vector< blind_outputoutputs
 

Additional Inherited Members

- Static Public Member Functions inherited from graphene::chain::base_operation
static uint64_t calculate_data_fee (uint64_t bytes, uint64_t price_per_kbyte)
 

Detailed Description

Transfers from blind to blind.

There are two ways to transfer value while maintaining privacy:

  1. account to account with amount kept secret
  2. stealth transfers with amount sender/receiver kept secret

When doing account to account transfers, everyone with access to the memo key can see the amounts, but they will not have access to the funds.

When using stealth transfers the same key is used for control and reading the memo.

This operation is more expensive than a normal transfer and has a fee proportional to the size of the operation.

All assets in a blind transfer must be of the same type: fee.asset_id The fee_payer is the temp account and can be funded from the blinded values.

Using this operation you can transfer from an account and/or blinded balances to an account and/or blinded balances.

Stealth Transfers:

Assuming Receiver has key pair R,r and has shared public key R with Sender Assuming Sender has key pair S,s Generate one time key pair O,o as s.child(nonce) where nonce can be inferred from transaction Calculate secret V = o*R blinding_factor = sha256(V) memo is encrypted via aes of V owner = R.child(sha256(blinding_factor))

Sender gives Receiver output ID to complete the payment.

This process can also be used to send money to a cold wallet without having to pre-register any accounts.

Outputs are assigned the same IDs as the inputs until no more input IDs are available, in which case a the return value will be the first ID allocated for an output. Additional output IDs are allocated sequentially thereafter. If there are fewer outputs than inputs then the input IDs are freed and never used again.

Definition at line 236 of file confidential.hpp.

Member Function Documentation

◆ calculate_fee()

share_type graphene::chain::blind_transfer_operation::calculate_fee ( const fee_parameters_type k) const

Definition at line 139 of file confidential.cpp.

◆ fee_payer()

account_id_type graphene::chain::blind_transfer_operation::fee_payer ( ) const

graphene TEMP account

If fee_payer = temp_account_id, then the fee is paid by the surplus balance of inputs-outputs and 100% of the fee goes to the network.

Definition at line 99 of file confidential.cpp.

◆ get_required_authorities()

void graphene::chain::blind_transfer_operation::get_required_authorities ( vector< authority > &  a) const
inline

Definition at line 252 of file confidential.hpp.

◆ validate()

void graphene::chain::blind_transfer_operation::validate ( ) const

This method can be computationally intensive because it verifies that input commitments - output commitments add up to 0

by requiring all inputs to be sorted we also prevent duplicate commitments on the input

Definition at line 108 of file confidential.cpp.

Member Data Documentation

◆ fee

asset graphene::chain::blind_transfer_operation::fee

Definition at line 243 of file confidential.hpp.

◆ inputs

vector<blind_input> graphene::chain::blind_transfer_operation::inputs

Definition at line 244 of file confidential.hpp.

◆ outputs

vector<blind_output> graphene::chain::blind_transfer_operation::outputs

Definition at line 245 of file confidential.hpp.


The documentation for this struct was generated from the following files: