Documentation
¶
Index ¶
- type Key
- func (key Key) AddressBase64() string
- func (key Key) GetPublic() ed25519.PublicKey
- func (key Key) ID() string
- func (key Key) PubkeyToAddress() *address.Address
- func (key Key) PubkeyToAddressWith(version wallet.VersionConfig, workchain int8) (*address.Address, error)
- func (key Key) PublicKeyStr() string
- func (key Key) Raw() internal.Raw
- func (key Key) RawAddress() string
- func (key Key) Sign(msg []byte) ([]byte, error)
- func (key Key) ToEncryptedJSON(password string, scryptParams commonkeystore.ScryptParams) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶
type Key struct {
// contains filtered or unexported fields
}
Key represents a TON ed25519 key
func FromEncryptedJSON ¶
FromEncryptedJSON gets key from json and password
func MustNewInsecure ¶
MustNewInsecure creates a Key or panics if an error occurs
func (Key) AddressBase64 ¶
AddressBase64 returns the user-friendly version of the TON address https://docs.ton.org/v3/concepts/dive-into-ton/ton-blockchain/smart-contract-addresses#user-friendly-address
func (Key) PubkeyToAddress ¶
PubkeyToAddress returns the wallet v3 address for workchain 0
func (Key) PubkeyToAddressWith ¶
func (key Key) PubkeyToAddressWith(version wallet.VersionConfig, workchain int8) (*address.Address, error)
PubkeyToAddressWith returns the TON wallet address for the given wallet version and workchain
func (Key) PublicKeyStr ¶
PublicKeyStr returns the hex-encoded public key
func (Key) RawAddress ¶
RawAddress returns the raw version of the TON address, which includes the workchain https://docs.ton.org/v3/concepts/dive-into-ton/ton-blockchain/smart-contract-addresses#raw-address
func (Key) ToEncryptedJSON ¶
func (key Key) ToEncryptedJSON(password string, scryptParams commonkeystore.ScryptParams) ([]byte, error)
ToEncryptedJSON returns encrypted JSON representing key