Documentation ¶
Index ¶
- Constants
- Variables
- func FromECDSAPub(pub *ecdsa.PublicKey) []byte
- func GetAddressHexFromPrikey(priKey string) (string, error)
- func GetInvokeHash(chaincodeSpec *pb.ChaincodeSpec, geneAlg string, senderSpec *pb.SenderSpec) ([]byte, error)
- func HexToECDSA(hexkey string) (*ecdsa.PrivateKey, error)
- func Keccak256(data ...[]byte) []byte
- func NewECDSAPrivateKeyFromD(c elliptic.Curve, D *big.Int) *ecdsa.PrivateKey
- func S256() elliptic.Curve
- func SignInvoke(chaincodeSpec *pb.ChaincodeSpec, geneAlg string, senderSpec *pb.SenderSpec, ...) ([]byte, error)
- func SignJson(json []byte, priKey string) ([]byte, error)
- func SignatureBytesToString(sig []byte) string
- func SignatureStringToBytes(sig string) ([]byte, error)
- func ToECDSA(d []byte) (*ecdsa.PrivateKey, error)
- func ToECDSAPub(pub []byte) *ecdsa.PublicKey
- type Account
- type Address
- func BytesToAddress(b []byte) *Address
- func GetAddressFromPrikey(priKey string) (*Address, error)
- func GetSenderFromSignature(hashT []byte, signature []byte) (*Address, error)
- func HexToAddress(hexKey string) (*Address, error)
- func PubkeyToAddress(p ecdsa.PublicKey) *Address
- func StringToAddress(b string) *Address
- type Hash
- type TxData
Constants ¶
View Source
const ( HashLength = 32 AddressLength = 20 HashStringLength = 64 AddressStringLength = 40 PriKeyLength = 32 PriKeyStringLength = 64 WALLET_NAMESPACE = "ink" MAIN_BALANCE_NAME = "INK" )
Variables ¶
View Source
var InkMinimumFee *big.Int
Functions ¶
func FromECDSAPub ¶
func GetAddressHexFromPrikey ¶
func GetInvokeHash ¶
func GetInvokeHash(chaincodeSpec *pb.ChaincodeSpec, geneAlg string, senderSpec *pb.SenderSpec) ([]byte, error)
func HexToECDSA ¶
func HexToECDSA(hexkey string) (*ecdsa.PrivateKey, error)
func NewECDSAPrivateKeyFromD ¶
func SignInvoke ¶
func SignInvoke(chaincodeSpec *pb.ChaincodeSpec, geneAlg string, senderSpec *pb.SenderSpec, priKey string) ([]byte, error)
func SignatureBytesToString ¶
func SignatureStringToBytes ¶
func ToECDSAPub ¶
--------------------------------------
Types ¶
type Address ¶
type Address [AddressLength]byte
func BytesToAddress ¶
func GetAddressFromPrikey ¶
func GetSenderFromSignature ¶
func HexToAddress ¶
func PubkeyToAddress ¶
func StringToAddress ¶
Click to show internal directories.
Click to hide internal directories.