Documentation ¶
Index ¶
- func BitcoinSignature(data []byte, hexPrivateKey string, compress bool, segwitType SegwitType) ([]byte, error)
- func DoEIP712Sign(chainId int64, signMsg, private string, mmJsonObj *common.MMJsonObj) (string, error)
- func DogeSignature(data []byte, hexPrivateKey string, compress bool) ([]byte, error)
- func EIP712Signature(typedData apitypes.TypedData, hexPrivateKey string) ([]byte, []byte, error)
- func Ed25519Signature(privateKey, message []byte) []byte
- func EthSignature(data []byte, hexPrivateKey string) ([]byte, error)
- func GenerateAddressByArgs(net common.DasNetType, args string) (string, error)
- func GetSignedPubKey(rawByte []byte, sign []byte) (*ecdsa.PublicKey, error)
- func PersonalSignature(data []byte, hexPrivateKey string) ([]byte, error)
- func TronSignature(signType bool, data []byte, hexPrivateKey string) ([]byte, error)
- func TronVerifySignature(signType bool, sign []byte, rawByte []byte, base58Addr string) bool
- func VerifyBitcoinSignature(sig []byte, data []byte, payload string) (bool, error)
- func VerifyDogeSignature(sig []byte, data []byte, payload string) (bool, error)
- func VerifyEIP712Signature(typedData apitypes.TypedData, sign []byte, address string) (bool, error)
- func VerifyEcdsaP256Signature(hash []byte, R, S *big.Int, pubkey *ecdsa.PublicKey) (res bool, err error)
- func VerifyEd25519Signature(publicKey, message, sig []byte) bool
- func VerifyEthSignature(sign []byte, rawByte []byte, address string) (bool, error)
- func VerifyPersonalSignature(sign []byte, rawByte []byte, address string) (bool, error)
- func VerifyWebauthnSignature(challenge, dataBys []byte, signAddressPk1 string) (res bool, err error)
- type Client
- type ClientDataJson
- type HandleSignCkbMessage
- type SegwitType
- type SignatureInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BitcoinSignature ¶ added in v1.2.0
func DoEIP712Sign ¶ added in v1.2.0
func DogeSignature ¶ added in v1.0.1
func EIP712Signature ¶
func Ed25519Signature ¶
func GenerateAddressByArgs ¶
func GenerateAddressByArgs(net common.DasNetType, args string) (string, error)
func TronSignature ¶
func TronVerifySignature ¶
func VerifyBitcoinSignature ¶ added in v1.2.0
func VerifyDogeSignature ¶ added in v1.0.1
func VerifyEIP712Signature ¶
func VerifyEcdsaP256Signature ¶ added in v1.1.0
func VerifyEd25519Signature ¶
func VerifyEthSignature ¶
func VerifyPersonalSignature ¶
Types ¶
type ClientDataJson ¶ added in v1.1.0
type HandleSignCkbMessage ¶
func LocalSign ¶
func LocalSign(privateKey string) HandleSignCkbMessage
func RemoteSign ¶
func RemoteSign(c *Client, net common.DasNetType, args string) HandleSignCkbMessage
func RemoteSignNew ¶ added in v1.0.1
func RemoteSignNew(c *Client, addr string) HandleSignCkbMessage
type SegwitType ¶ added in v1.0.1
type SegwitType int
const ( P2WPKH SegwitType = iota P2SH_P2WPKH P2PKH SegwitType = 255 )
type SignatureInfo ¶ added in v1.0.1
type SignatureInfo struct { Compressed bool SegwitType *SegwitType Recovery int Signature []byte }
func DecodeSignature ¶ added in v1.0.1
func DecodeSignature(buffer []byte) (*SignatureInfo, error)
func (*SignatureInfo) ToSig ¶ added in v1.0.1
func (s *SignatureInfo) ToSig() []byte
Click to show internal directories.
Click to hide internal directories.