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 ¶
func (s *BankChaincode) Init(stub shim.ChaincodeStubInterface) sc.Response
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 ¶
func (s *BankChaincode) Invoke(stub shim.ChaincodeStubInterface) sc.Response
Invoke is called when external applications invoke the smart contract
type Transaction ¶
type Transactions ¶
type Transactions struct {
History []Transaction `json: transactions`
}
Click to show internal directories.
Click to hide internal directories.