near

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ADD_TO_BLACKLIST      = 0
	REMOVE_FROM_BLACKLIST = 1
	BLACKLIST_MESSAGE     = 3
	CHANGE_TOKEN_LIMIT    = 4
	FEE_GATHERING         = "FeeGathering"
)

Variables

This section is empty.

Functions

func GetWalletFromPrivKey

func GetWalletFromPrivKey(privKey string) (*wallet.NearWallet, error)

func NewApi

func NewApi(l log.Logger, cfg *chain.Config) (chain.ChainAPI, error)

func NewClient

func NewClient(url string, logger log.Logger) (*client, error)

func NewFinder

func NewFinder(l log.Logger, nameToAddrMap map[chain.ContractName]string) *finder

func NewParser

func NewParser(nameToAddr map[chain.ContractName]string) (*parser, error)

Types

type AssetDetails

type AssetDetails struct {
	Name  string
	Value types.BigInt
	Fee   types.BigInt
}

type BMCMessage

type BMCMessage struct {
	Src     string //  an address of BMC (i.e. btp://1234.PARA/0x1234)
	Dst     string //  an address of destination BMC
	Svc     string //  service name of BSH
	Sn      []byte //  sequence number of BMC
	Message []byte //  serialized Service Message from BSH
}

type BlockNotification

type BlockNotification struct {
	*types.BlockNotification
	// contains filtered or unexported fields
}

func NewBlockNotification

func NewBlockNotification(offset int64) BlockNotification

func (*BlockNotification) AddTransactions

func (bn *BlockNotification) AddTransactions(transactions []types.Transaction)

type CoinMetadata

type CoinMetadata struct {
	Name         string `json:"name"`
	Symbol       string `json:"symbol"`
	Uri          string `json:"uri"`
	Network      string `json:"network"`
	FeeNumerator string `json:"fee_numerator"`
	FixedFee     string `json:"fixed_fee"`
	Extras       Extras `json:"extras"`
}

type Event

type Event struct {
	Name            chain.EventLogType `json:"event"`
	Code            types.BigInt       `json:"code"`
	SenderAddress   types.AccountId    `json:"sender_address,omitempty"`
	SerialNumber    types.BigInt       `json:"serial_number"`
	ReceiverAddress chain.BTPAddress   `json:"receiver_address,omitempty"`
	Assets          []AssetDetails     `json:"assets,omitempty"`
	TokenName       string             `json:"token_name,omitempty"`
	Message         string             `json:"message,omitempty"`
	TokenAccount    types.AccountId    `json:"token_account,omitempty"`
}

type Extras

type Extras struct {
	Spec          string      `json:"spec"`
	Icon          interface{} `json:"icon,omitempty"`
	Refrence      interface{} `json:"refrence,omitempty"`
	ReferenceHash interface{} `json:"reference_hash,omitempty"`
	Decimals      int64       `json:"decimals"`
}

type Metadata

type Metadata struct {
	CoinMetadata CoinMetadata `json:"metadata,omitempty"`
}

type ServiceBlacklistMessagePayload

type ServiceBlacklistMessagePayload struct {
	RequestType []byte
	Addresses   []string
	Net         string
}

type ServiceFeeGatheringRequestPayload

type ServiceFeeGatheringRequestPayload struct {
	FeeAggregator string
	Services      []string
}

type ServiceMessage

type ServiceMessage struct {
	ServiceType []byte
	Payload     []byte
}

type ServiceTokenlimitMessagePayload

type ServiceTokenlimitMessagePayload struct {
	CoinNames   []string
	TokenLimits [][]byte
	Net         string
}

Jump to

Keyboard shortcuts

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