pactus

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bridge

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

func (*Bridge) Start

func (b *Bridge) Start() error

type Client

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

func NewClient added in v1.1.0

func NewClient(ctx context.Context, endpoint string) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) GetBlock

func (c *Client) GetBlock(h uint32) (*pactus.GetBlockResponse, error)

func (*Client) GetLastBlockHeight

func (c *Client) GetLastBlockHeight() (uint32, error)

func (*Client) GetTotalLocked added in v1.1.0

func (c *Client) GetTotalLocked() (float64, error)

! PACTUS CHANGE.

func (*Client) GetTransaction added in v1.2.0

func (c *Client) GetTransaction(id string) (*pactus.GetTransactionResponse, error)

type ClientError

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

func (ClientError) Error

func (e ClientError) Error() string

type Config

type Config struct {
	WalletPath string `yaml:"wallet_path"`
	WalletPass string
	LockAddr   string  `yaml:"lock_address"`
	WalletAddr string  `yaml:"wallet_address"`
	RPCNode    string  `yaml:"rpc_url"`
	TxFee      float64 `yaml:"tx_fee"`
}

type Dest

type Dest struct {
	BypassName bypass.Name
	Addr       string
}

func ParseMemo

func ParseMemo(memo string) (Dest, error)

func (*Dest) GetBridgeType added in v1.3.1

func (d *Dest) GetBridgeType() order.BridgeType

! NEW EVM!

type InvalidMemoError

type InvalidMemoError struct{}

func (InvalidMemoError) Error

func (e InvalidMemoError) Error() string

type Listener

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

func (*Listener) Start

func (l *Listener) Start() error

type Side

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

func NewSide

func NewSide(ctx context.Context,
	highway chan message.Message, startBlock uint32,
	bp chan message.Message, cfg *Config,
	db *database.Database,
) (*Side, error)

func (*Side) Start

func (s *Side) Start()

type Wallet

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

func (*Wallet) Address

func (w *Wallet) Address() string

func (*Wallet) Balance

func (w *Wallet) Balance() amount.Amount

type WalletNotExistError

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

func (WalletNotExistError) Error

func (e WalletNotExistError) Error() string

Jump to

Keyboard shortcuts

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