Documentation ¶
Index ¶
- Constants
- func GetTxHash(_ []byte) ([]byte, error)
- type BinanceSigner
- type Ed25519Signer
- type EthSigner66Byte
- type NonceTx
- func (*NonceTx) Descriptor() ([]byte, []int)
- func (m *NonceTx) GetInner() []byte
- func (m *NonceTx) GetSequence() uint64
- func (*NonceTx) ProtoMessage()
- func (m *NonceTx) Reset()
- func (m *NonceTx) String() string
- func (m *NonceTx) XXX_DiscardUnknown()
- func (m *NonceTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *NonceTx) XXX_Merge(src proto.Message)
- func (m *NonceTx) XXX_Size() int
- func (m *NonceTx) XXX_Unmarshal(b []byte) error
- type SignedTx
- func (*SignedTx) Descriptor() ([]byte, []int)
- func (m *SignedTx) GetInner() []byte
- func (m *SignedTx) GetPublicKey() []byte
- func (m *SignedTx) GetSignature() []byte
- func (*SignedTx) ProtoMessage()
- func (m *SignedTx) Reset()
- func (m *SignedTx) String() string
- func (m *SignedTx) XXX_DiscardUnknown()
- func (m *SignedTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *SignedTx) XXX_Merge(src proto.Message)
- func (m *SignedTx) XXX_Size() int
- func (m *SignedTx) XXX_Unmarshal(b []byte) error
- type Signer
- type TronSigner
Constants ¶
View Source
const ( SignerTypeEd25519 = "ed25519" SignerTypeSecp256k1 = "secp256k1" SignerTypeYubiHsm = "yubihsm" SignerTypeTron = "tron" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BinanceSigner ¶
type BinanceSigner struct {
PrivateKey *ecdsa.PrivateKey
}
func NewBinanceSigner ¶
func NewBinanceSigner(privateKey []byte) *BinanceSigner
func (*BinanceSigner) PublicKey ¶
func (k *BinanceSigner) PublicKey() []byte
func (*BinanceSigner) Sign ¶
func (k *BinanceSigner) Sign(_ []byte) []byte
type Ed25519Signer ¶
type Ed25519Signer struct {
// contains filtered or unexported fields
}
Ed25519Signer implements the Signer interface using ed25519 keys.
func NewEd25519Signer ¶
func NewEd25519Signer(privateKey []byte) *Ed25519Signer
func (*Ed25519Signer) PublicKey ¶
func (s *Ed25519Signer) PublicKey() []byte
func (*Ed25519Signer) Sign ¶
func (s *Ed25519Signer) Sign(msg []byte) []byte
type EthSigner66Byte ¶
type EthSigner66Byte struct {
PrivateKey *ecdsa.PrivateKey
}
func (*EthSigner66Byte) PublicKey ¶
func (k *EthSigner66Byte) PublicKey() []byte
func (*EthSigner66Byte) Sign ¶
func (k *EthSigner66Byte) Sign(_ []byte) []byte
type NonceTx ¶
type NonceTx struct { Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*NonceTx) Descriptor ¶
func (*NonceTx) GetSequence ¶
func (*NonceTx) ProtoMessage ¶
func (*NonceTx) ProtoMessage()
func (*NonceTx) XXX_DiscardUnknown ¶
func (m *NonceTx) XXX_DiscardUnknown()
func (*NonceTx) XXX_Marshal ¶
func (*NonceTx) XXX_Unmarshal ¶
type SignedTx ¶
type SignedTx struct { Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` PublicKey []byte `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SignedTx) Descriptor ¶
func (*SignedTx) GetPublicKey ¶
func (*SignedTx) GetSignature ¶
func (*SignedTx) ProtoMessage ¶
func (*SignedTx) ProtoMessage()
func (*SignedTx) XXX_DiscardUnknown ¶
func (m *SignedTx) XXX_DiscardUnknown()
func (*SignedTx) XXX_Marshal ¶
func (*SignedTx) XXX_Unmarshal ¶
type TronSigner ¶
type TronSigner struct {
PrivateKey *ecdsa.PrivateKey
}
func NewTronSigner ¶
func NewTronSigner(privateKey []byte) *TronSigner
func (*TronSigner) PublicKey ¶
func (k *TronSigner) PublicKey() []byte
func (*TronSigner) Sign ¶
func (k *TronSigner) Sign(_ []byte) []byte
Click to show internal directories.
Click to hide internal directories.