wallet

package
v0.0.0-...-ddef44d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base58Decode

func Base58Decode(input []byte) []byte

Base58Decode fonksiyonu, verilen base58 kodunu byte dizisine dönüştürür

func Base58Encode

func Base58Encode(input []byte) []byte

Base58 fonksiyonu, verilen byte dizisini base58 koduna doğru dönüştürür

func Checksum

func Checksum(payload []byte) []byte

Checksum fonksiyonu, bir checksum kodu olusturur

func NewKeyPair

func NewKeyPair() (ecdsa.PrivateKey, []byte)

NewKeyPair fonksiyonu, bir private ve public key olusturur

func PublicKeyHash

func PublicKeyHash(pubKey []byte) []byte

PublicKeyHash fonksiyonu, bir public key hash kodu olusturur

func ValidateAddress

func ValidateAddress(address string) bool

ValidateAddress fonksiyonu, bir adresin gecerli olup olmadıgını kontrol eder

Types

type Wallet

type Wallet struct {
	PrivateKey ecdsa.PrivateKey //eliptik eğrisi ile private key
	PublicKey  []byte
}

func DeserializeWallet

func DeserializeWallet(data []byte) *Wallet

DeserializeWallet, serileştirilmiş veriyi Wallet yapısına dönüştürür

func MakeWallet

func MakeWallet() *Wallet

MakeWallet fonksiyonu, bir Wallet nesnesi olusturur

func (Wallet) Address

func (w Wallet) Address() []byte

Address fonksiyonu, bir adres olusturur

func (*Wallet) Serialize

func (w *Wallet) Serialize() []byte

Serialize, cüzdanı serileştirmek için özel bir yöntem

type Wallets

type Wallets struct {
	Wallets map[string]*Wallet
}

func CreateWallets

func CreateWallets(nodeId string) (*Wallets, error)

CreateWallets fonksiyonu, bir Wallets nesnesi olusturur

func (*Wallets) AddWallet

func (ws *Wallets) AddWallet() string

AddWallet fonksiyonu, bir Wallet nesnesi ekler

func (*Wallets) GetAllAddress

func (ws *Wallets) GetAllAddress() []string

GetAllAddress fonksiyonu, tüm wallet adreslerini döndürür

func (*Wallets) GetWallet

func (ws *Wallets) GetWallet(address string) Wallet

GetWallet fonksiyonu, bir Wallet nesnesini döndürür

func (*Wallets) LoadFile

func (ws *Wallets) LoadFile(nodeId string) error

LoadFile fonksiyonu, cüzdanları dosyadan yükler

func (*Wallets) SaveFile

func (ws *Wallets) SaveFile(nodeId string)

SaveFile fonksiyonu, cüzdanları dosyaya kaydeder

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL