merkle

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auction

type Auction struct {
	Id           string
	FeeRecipient string
	ClosesAt     time.Time
	ChainId      int64
	CreatedAt    time.Time
	Connection   *websocket.Conn

	Transaction *AuctionTransaction
}

func (*Auction) SendBid

func (a *Auction) SendBid(tx types.Transaction) error

func (*Auction) SendRawBid

func (a *Auction) SendRawBid(txs []string) error

type AuctionOptions

type AuctionOptions struct {
	Transaction  *types.Transaction
	FeeRecipient common.Address
}

type AuctionTransaction

type AuctionTransaction struct {
	Hash  common.Hash
	From  common.Address
	To    common.Address
	Value *big.Int
	Data  []byte
	Gas   uint64
}

type BuilderSDK

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

func NewBuilderSDK

func NewBuilderSDK(sdk *MerkleSDK) *BuilderSDK

type BundleParams

type BundleParams struct {
	Txs         []string `json:"txs"`
	BlockNumber string   `json:"blockNumber"`
}

type MerkleChainId

type MerkleChainId int32
const (
	EthereumMainnet MerkleChainId = 1
)

type MerkleSDK

type MerkleSDK struct {
	ApiKey string
	// contains filtered or unexported fields
}

func New

func New() *MerkleSDK

func (*MerkleSDK) Builder

func (m *MerkleSDK) Builder() *BuilderSDK

func (*MerkleSDK) GetApiKey

func (m *MerkleSDK) GetApiKey() string

get the api key

func (*MerkleSDK) Pool

func (m *MerkleSDK) Pool() *PrivatePool

func (*MerkleSDK) SetApiKey

func (m *MerkleSDK) SetApiKey(apiKey string)

func (*MerkleSDK) Transactions

func (m *MerkleSDK) Transactions() *TransactionStream

type PrivatePool

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

func NewPrivatePool

func NewPrivatePool(sdk *MerkleSDK) *PrivatePool

func (*PrivatePool) Auctions

func (p *PrivatePool) Auctions() (chan *Auction, chan error)

func (*PrivatePool) CreateAuction

func (p *PrivatePool) CreateAuction(options *AuctionOptions) error

type RawAuction

type RawAuction struct {
	Id           string `json:"id"`
	FeeRecipient string `json:"fee_recipient"`
	ClosesAtUnix int64  `json:"closes_at_unix"`
	ChainId      int64  `json:"chain_id"`
	CreatedAt    int64  `json:"created_at_unix"`
	Transaction  struct {
		Data  string `json:"data"`
		From  string `json:"from"`
		Gas   int64  `json:"gas"`
		Hash  string `json:"hash"`
		To    string `json:"to"`
		Value string `json:"value"`
	} `json:"transaction"`
}

type RelaySubmitRequest

type RelaySubmitRequest struct {
	Method  string         `json:"method"`
	Params  []BundleParams `json:"params"`
	Jsonrpc string         `json:"jsonrpc"`
}

type TransactionStream

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

func NewTransactionStream

func NewTransactionStream(sdk *MerkleSDK) *TransactionStream

func (*TransactionStream) Stream

func (t *TransactionStream) Stream(chainId MerkleChainId) (chan *types.Transaction, chan error)

Jump to

Keyboard shortcuts

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