Documentation ¶
Index ¶
- Constants
- Variables
- func CheckAndGetSenderFromSignature(signature string, data []byte) (string, error)
- 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 Token
- type TxData
Constants ¶
View Source
const ( HashLength = 32 AddressLength = 20 HashStringLength = 64 AddressStringLength = 41 PriKeyLength = 32 PriKeyStringLength = 64 ADDRESS_PREFIX = "i" WALLET_NAMESPACE = "ink" MAIN_BALANCE_NAME = "INK" )
Variables ¶
View Source
var InkMinimumFee *big.Int
View Source
var SignPrivateKey string
Functions ¶
func CheckAndGetSenderFromSignature ¶ added in v0.17.0
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 ¶
type Token ¶ added in v0.15.0
type Token struct { // token name Name string `json:"tokenName"` // initial address to issue Address string `json:"address"` // token status : Created, Delivered, Invalidate Status string `json:"status"` // token decimals Decimals int `json:"decimals"` // contains filtered or unexported fields }
type GenAccount
Click to show internal directories.
Click to hide internal directories.