icap

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package icap

@author: xwc1125

Package icap

@author: xwc1125

Package icap

@author: xwc1125

Package icap

@author: xwc1125

Index

Constants

This section is empty.

Variables

View Source
var (
	AddressPrettyPrefix = 4
	AddressPrettyLen    = 37
	EmptyAddressPretty  = addressPretty{
		Addr: types.EmptyAddress,
	}
)
View Source
var (
	Big1  = big.NewInt(1)
	Big0  = big.NewInt(0)
	Big36 = big.NewInt(36)
	Big97 = big.NewInt(97)
	Big98 = big.NewInt(98)
)
View Source
var (
	Base36Chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
)

Functions

func AddressPrettyFromIban

func AddressPrettyFromIban(tAddr string) (addressPretty, error)

AddressPrettyFromIban 字符串转对象

func Base36Encode

func Base36Encode(i *big.Int) string

func ConvertAddressToICAP

func ConvertAddressToICAP(prefix string, orgCode string, a types.Address) string

func ConvertICAPToAddress

func ConvertICAPToAddress(prefix string, orgCodeLen int, s string) (types.Address, error)

func LeftJoin

func LeftJoin(str string, resultLen int) string

func NewAddressPretty

func NewAddressPretty(chainName string, address types.Address) addressPretty

Types

type Customer

type Customer struct {
	// contains filtered or unexported fields
}

func NewCustomer

func NewCustomer(currency, orgCode string, resultLen int, customer string) *Customer

func ParseICAP

func ParseICAP(iban IBanInfo) (*Customer, error)

func (*Customer) Currency

func (c *Customer) Currency() string

func (*Customer) Customer

func (c *Customer) Customer() string

func (*Customer) OrgCode

func (c *Customer) OrgCode() string

func (*Customer) ResultLen

func (c *Customer) ResultLen() int

type IBanInfo

type IBanInfo struct {
	// contains filtered or unexported fields
}

func NewIBanInfo

func NewIBanInfo(currencyLen, orgCodeLen, customerLen int, iban string) *IBanInfo

func ToICAP

func ToICAP(customer Customer) (*IBanInfo, error)

func (*IBanInfo) CurrencyLen

func (b *IBanInfo) CurrencyLen() int

func (*IBanInfo) CustomerLen

func (b *IBanInfo) CustomerLen() int

func (*IBanInfo) Iban

func (b *IBanInfo) Iban() string

func (*IBanInfo) OrgCodeLen

func (b *IBanInfo) OrgCodeLen() int

type THash

type THash struct {
	ChainName string     `json:"chainName" mapstructure:"chainName"` // 链名称
	Index     uint64     `json:"index" mapstructure:"index"`         // dbindex
	Hash      types.Hash `json:"hash" mapstructure:"hash"`           // 交易hash值
}

THash 交易Hash

func THashFromIban

func THashFromIban(tHash string) (THash, error)

THashFromIban 字符串转对象

func (THash) Bytes

func (h THash) Bytes() []byte

func (THash) MarshalJSON

func (h THash) MarshalJSON() ([]byte, error)

func (THash) Nil

func (h THash) Nil() bool

func (THash) String

func (h THash) String() string

String tHash的值

Jump to

Keyboard shortcuts

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