Documentation ¶
Overview ¶
TODO tape.go was utils copied from tape project, now we can write our own powered by goutil
Index ¶
- Variables
- func CommitterFrom(connect *grpc.ClientConn) orderer.AtomicBroadcastClient
- func DERToPrivateKey(der []byte) (key interface{}, err error)
- func FindKeyFilesOrPanic(dirname string) []string
- func GetContractMetadata(ctx context.Context, connection grpc.ClientConnInterface, ...) (cm metadata.ContractChaincodeMetadata)
- func GetPrivateKey(f string) (*ecdsa.PrivateKey, error)
- func IsLowS(k *ecdsa.PublicKey, s *big.Int) (bool, error)
- func ListChannelOnPeer(ctx context.Context, connection grpc.ClientConnInterface, crypto *Crypto) (results []string)
- func PEMtoPrivateKey(raw []byte, pwd []byte) (interface{}, error)
- func Ping(target string, params Params) (connect *grpc.ClientConn, err error)
- func PingOrPanic(target string, params Params) *grpc.ClientConn
- func ToAddress(url string) string
- func ToLowS(k *ecdsa.PublicKey, s *big.Int) (*big.Int, bool, error)
- type Committer
- type Crypto
- func (c *Crypto) Credentials() []byte
- func (c *Crypto) DefaultMode()
- func (c *Crypto) Digest(message []byte) []byte
- func (c *Crypto) GatewayMode()
- func (c *Crypto) MspID() string
- func (c *Crypto) NewSignatureHeader() (*common.SignatureHeader, error)
- func (c *Crypto) Serialize() ([]byte, error)
- func (c *Crypto) SetDigest(digestFunc hash.Hash)
- func (c *Crypto) Sign(message []byte) ([]byte, error)
- type CryptoConfig
- type ECDSASignature
- type Endorser
- type Node
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // CurveHalfOrders contains the precomputed curve group orders halved. // It is used to ensure that signature' S value is lower or equal to the // curve group order halved. We accept only low-S signatures. // They are precomputed for efficiency reasons. CurveHalfOrders = map[elliptic.Curve]*big.Int{ elliptic.P224(): new(big.Int).Rsh(elliptic.P224().Params().N, 1), elliptic.P256(): new(big.Int).Rsh(elliptic.P256().Params().N, 1), elliptic.P384(): new(big.Int).Rsh(elliptic.P384().Params().N, 1), elliptic.P521(): new(big.Int).Rsh(elliptic.P521().Params().N, 1), } )
Functions ¶
func CommitterFrom ¶
func CommitterFrom(connect *grpc.ClientConn) orderer.AtomicBroadcastClient
func DERToPrivateKey ¶
DERToPrivateKey unmarshal a der to private key
func FindKeyFilesOrPanic ¶
func GetContractMetadata ¶ added in v0.0.10
func GetContractMetadata(ctx context.Context, connection grpc.ClientConnInterface, signingIdentity format.MessageSigningIdentity, channelID, chaincodeName string) (cm metadata.ContractChaincodeMetadata)
Only works when using the Contract API for your chaincode implementation , your chaincode should have a "org.hyperledger.fabric:GetMetadata" transaction function that will provide you with information on the smart contracts and transaction functions contained in the chaincode.
func GetPrivateKey ¶
func GetPrivateKey(f string) (*ecdsa.PrivateKey, error)
func ListChannelOnPeer ¶ added in v0.0.9
func PEMtoPrivateKey ¶
PEMtoPrivateKey unmarshal a pem to private key
func PingOrPanic ¶ added in v0.0.11
func PingOrPanic(target string, params Params) *grpc.ClientConn
Types ¶
type Committer ¶
type Committer struct { orderer.AtomicBroadcastClient orderer.AtomicBroadcast_BroadcastClient // not intrinsic }
type Crypto ¶
type Crypto struct { Creator []byte PrivKey *ecdsa.PrivateKey SignCert *x509.Certificate // contains filtered or unexported fields }
func LoadCryptoFrom ¶
func LoadCryptoFrom(config CryptoConfig) *Crypto
func (*Crypto) Credentials ¶ added in v0.0.9
func (*Crypto) DefaultMode ¶ added in v0.0.11
func (c *Crypto) DefaultMode()
func (*Crypto) GatewayMode ¶ added in v0.0.11
func (c *Crypto) GatewayMode()
func (*Crypto) NewSignatureHeader ¶
func (c *Crypto) NewSignatureHeader() (*common.SignatureHeader, error)
type CryptoConfig ¶
func (CryptoConfig) GetCertificate ¶ added in v0.0.10
func (c CryptoConfig) GetCertificate() (*x509.Certificate, []byte)
type ECDSASignature ¶
type Endorser ¶
type Endorser struct { peer.EndorserClient context.Context }
func EndorserFrom ¶
func EndorserFrom(ctx context.Context, connect *grpc.ClientConn) Endorser
func (*Endorser) ProcessProposal ¶
func (endorser *Endorser) ProcessProposal(in *peer.SignedProposal) (*peer.ProposalResponse, error)
type Node ¶
type Node struct { Addr string TLSCACert string TLSCAKey string TLSCARoot string TLSCACertByte []byte TLSCAKeyByte []byte TLSCARootByte []byte SslTargetNameOverride string `json:"ssl-target-name-override"` }
func (Node) AsGRPCClient ¶
func (node Node) AsGRPCClient() (connect *grpc.ClientConn, httpErr *http.Error)
func (Node) AsGRPCClientOrPanic ¶ added in v0.0.11
func (node Node) AsGRPCClientOrPanic() *grpc.ClientConn
Click to show internal directories.
Click to hide internal directories.