Documentation ¶
Index ¶
- Variables
- func DecryptAES256GCM(ciphertext []byte, password string) ([]byte, error)
- func DecryptAES256GCMBase64(ciphertextBase64 string, password string) (string, error)
- func EncryptAES256GCM(plaintext []byte, password string) ([]byte, error)
- func EncryptAES256GCMBase64(plaintext string, password string) (string, error)
- func GetAddressFromPubkeyString(pubkey string) (sdk.AccAddress, error)
- func GetPubkeyBech32FromRecord(record *keyring.Record) (string, error)
- func GetTssAddrBTC(tssPubkey string, bitcoinParams *chaincfg.Params) (string, error)
- func GetTssAddrEVM(tssPubkey string) (ethcommon.Address, error)
- func IsEmptyAddress(address common.Address) bool
- type PubKey
- func (pubKey PubKey) Equals(pubKey1 PubKey) bool
- func (pubKey PubKey) GetAddress(chain chains.Chain) (chains.Address, error)
- func (pubKey PubKey) GetEVMAddress() (chains.Address, error)
- func (pubKey PubKey) IsEmpty() bool
- func (pubKey PubKey) MarshalJSON() ([]byte, error)
- func (pubKey PubKey) String() string
- func (pubKey *PubKey) UnmarshalJSON(data []byte) error
- type PubKeySet
- func (*PubKeySet) Descriptor() ([]byte, []int)
- func (m *PubKeySet) GetEd25519() PubKey
- func (m *PubKeySet) GetSecp256k1() PubKey
- func (m *PubKeySet) Marshal() (dAtA []byte, err error)
- func (m *PubKeySet) MarshalTo(dAtA []byte) (int, error)
- func (m *PubKeySet) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PubKeySet) ProtoMessage()
- func (m *PubKeySet) Reset()
- func (m *PubKeySet) Size() (n int)
- func (m *PubKeySet) String() string
- func (m *PubKeySet) Unmarshal(dAtA []byte) error
- func (m *PubKeySet) XXX_DiscardUnknown()
- func (m *PubKeySet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PubKeySet) XXX_Merge(src proto.Message)
- func (m *PubKeySet) XXX_Size() int
- func (m *PubKeySet) XXX_Unmarshal(b []byte) error
- type PubKeys
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DecryptAES256GCM ¶
DecryptAES256GCM decrypts the given ciphertext using AES-256-GCM with the given password.
func DecryptAES256GCMBase64 ¶
DecryptAES256GCMBase64 decrypts the given base64-encoded ciphertext using AES-256-GCM with the given password.
func EncryptAES256GCM ¶
EncryptAES256GCM encrypts the given plaintext using AES-256-GCM with the given password.
func EncryptAES256GCMBase64 ¶
EncryptAES256GCMBase64 encrypts the given string plaintext using AES-256-GCM with the given password and returns the base64-encoded ciphertext.
func GetAddressFromPubkeyString ¶
func GetAddressFromPubkeyString(pubkey string) (sdk.AccAddress, error)
func GetTssAddrBTC ¶
GetTssAddrBTC returns the bitcoin address of the tss pubkey
func GetTssAddrEVM ¶
GetTssAddrEVM returns the ethereum address of the tss pubkey
func IsEmptyAddress ¶
IsEmptyAddress returns true if the address is empty
Types ¶
type PubKey ¶
type PubKey string
var EmptyPubKey PubKey
func (PubKey) GetAddress ¶
GetAddress will return an address for the given chain
func (PubKey) GetEVMAddress ¶
GetEVMAddress will return the evm address
func (PubKey) MarshalJSON ¶
MarshalJSON to Marshals to JSON using Bech32
func (*PubKey) UnmarshalJSON ¶
UnmarshalJSON to Unmarshal from JSON assuming Bech32 encoding
type PubKeySet ¶
type PubKeySet struct { Secp256k1 PubKey `protobuf:"bytes,1,opt,name=secp256k1,proto3,casttype=PubKey" json:"secp256k1,omitempty"` Ed25519 PubKey `protobuf:"bytes,2,opt,name=ed25519,proto3,casttype=PubKey" json:"ed25519,omitempty"` }
PubKeySet contains two pub keys , secp256k1 and ed25519
func (*PubKeySet) Descriptor ¶
func (*PubKeySet) GetEd25519 ¶
func (*PubKeySet) GetSecp256k1 ¶
func (*PubKeySet) MarshalToSizedBuffer ¶
func (*PubKeySet) ProtoMessage ¶
func (*PubKeySet) ProtoMessage()
func (*PubKeySet) XXX_DiscardUnknown ¶
func (m *PubKeySet) XXX_DiscardUnknown()