Discover Packages
github.com/hyperledger-labs/cckit
examples
cpaper
package
Version:
v1.0.5
Opens a new window with list of versions in this module.
Published: Jun 25, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: ? modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
README
README
¶
Commercial paper Hyperledger Fabric chaincode example
This is an faithful reimplementation of the official example Commercial paper scenario
Original code written in JavaScript using the Fabric Chaincode Node SDK is available here
Expand ▾
Collapse ▴
Documentation
¶
type BuyCommercialPaper struct {
Issuer string `json:"issuer,omitempty"`
PaperNumber string `json:"paper_number,omitempty"`
CurrentOwner string `json:"current_owner,omitempty"`
NewOwner string `json:"new_owner,omitempty"`
Price int32 `json:"price,omitempty"`
PurchaseDate time .Time `json:"purchase_date,omitempty"`
}
type CommercialPaper struct {
Issuer string `json:"issuer,omitempty"`
PaperNumber string `json:"paper_number,omitempty"`
Owner string `json:"owner,omitempty"`
IssueDate time .Time `json:"issue_date,omitempty"`
MaturityDate time .Time `json:"maturity_date,omitempty"`
FaceValue int32 `json:"face_value,omitempty"`
State TaskState `json:"state,omitempty"`
}
Key commercial paper has a composite key < CommercialPaper, Issuer, PaperNumber >
type IssueCommercialPaper struct {
Issuer string `json:"issuer,omitempty"`
PaperNumber string `json:"paper_number,omitempty"`
IssueDate time .Time `json:"issue_date,omitempty"`
MaturityDate time .Time `json:"maturity_date,omitempty"`
FaceValue int32 `json:"face_value,omitempty"`
}
type RedeemCommercialPaper struct {
Issuer string `json:"issuer,omitempty"`
PaperNumber string `json:"paper_number,omitempty"`
RedeemingOwner string `json:"redeeming_owner,omitempty"`
RedeemDate time .Time `json:"redeem_date,omitempty"`
}
const (
CommercialPaperTypeName = "CommercialPaper"
CommercialPaperIssued TaskState = "issued"
CommercialPaperTrading TaskState = "trading"
CommercialPaperRedeemed TaskState = "redeemed"
)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.