util

package
v0.0.0-...-13d5c5d Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2018 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(value string, key []byte) (string, error)

func AesEncrypt

func AesEncrypt(origData []byte, key []byte) (string, error)

func ConvSingleCashAddr

func ConvSingleCashAddr(addr string, param *chaincfg.Params) (string, error)

func ConvToCashAddr

func ConvToCashAddr(addresses []string, param *chaincfg.Params) ([]string, error)

func ConvToCashAddrCopy

func ConvToCashAddrCopy(addresses []string, param *chaincfg.Params) ([]string, error)

func ConvTolegacyAddr

func ConvTolegacyAddr(addr string, param *chaincfg.Params) (string, error)

func CreateVinList

func CreateVinList(mtx *wire.MsgTx) []btcjson.Vin

CreateVinList returns a slice of JSON objects for the inputs of the passed transaction.

func CreateVoutList

func CreateVoutList(mtx *wire.MsgTx, chainParams *chaincfg.Params,
	filterAddrMap map[string]struct{}) []btcjson.Vout

CreateVoutList returns a slice of JSON objects for the outputs of the passed transaction.

func CryptoSha256

func CryptoSha256(key string) string

func DecodeRawTransaction

func DecodeRawTransaction(hexStr string, params *chaincfg.Params) (*btcjson.TxRawDecodeResult, error)

func GenSalt

func GenSalt(size int) string

func IsCashAddrFormat

func IsCashAddrFormat(address string) bool

func Mail

func Mail(param *view.WalletCreateParam, c context.Context)

func MailTo

func MailTo(param *view.WalletCreateParam) error

func MustConvSingleCashAddr

func MustConvSingleCashAddr(addr string, param *chaincfg.Params) string

func MustConvToLegacyAddr

func MustConvToLegacyAddr(addr string, param *chaincfg.Params) string

func PKCS7Padding

func PKCS7Padding(ciphertext []byte, blockSize int) []byte

func PKCS7UnPadding

func PKCS7UnPadding(origData []byte) []byte

func RandomBase32

func RandomBase32(n int) string

Types

type Cache

type Cache struct {
	Total int64
	Time  int64
}

type CacheMap

type CacheMap struct {
	Caches map[int64]Cache
	// contains filtered or unexported fields
}

func (*CacheMap) Add

func (m *CacheMap) Add(key int64, value *Cache)

func (*CacheMap) Get

func (m *CacheMap) Get(key int64) (*Cache, error)

func (*CacheMap) New

func (m *CacheMap) New()

type MailContent

type MailContent struct {
	WalletID string
}

type Result

type Result map[string]interface{}

func JsonStringArrayToMap

func JsonStringArrayToMap(src []string) []Result

func JsonStringToMap

func JsonStringToMap(src string) Result

Jump to

Keyboard shortcuts

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