bank

package
v0.0.0-...-efa6d4e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2020 License: MIT-0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BankChaincode

type BankChaincode struct {
}

BankChaincode is the struct that all chaincode methods are associated with The bank chaincode provides a simple representation of a bank. It allows for the creation of bank accounts and the transfer of funds between bank accounts. There are several functions:

init - initialize the chaincode
invoke - called upon invocation and calls other functions
createAccount - create a bank account
deposit - deposit funds into a bank account
transfer - transfer funds between accounts, either interbank or intrabank

func (*BankChaincode) Init

Init method is run on chaincode installation and upgrade Args:

	Name 				string 		The Name of the Bank
	ID					string		The institution ID of the bank, (e.g. IBAN, SWIFT or other routing code)
	ForexContract		string		The name of the contract that provides Forex services to this bank
 InterbankContract	string	The name of the contrat providing interbank transfer to this bank

func (*BankChaincode) Invoke

Invoke is called when external applications invoke the smart contract

type Transaction

type Transaction struct {
	Timestamp int64  `json: timestamp`
	Value     string `json: value`
}

type Transactions

type Transactions struct {
	History []Transaction `json: transactions`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL