substrate

package
v0.0.0-...-77e684b Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//ErrInvalidVersion is returned if version 4bytes is invalid
	ErrInvalidVersion = fmt.Errorf("invalid version")
	//ErrUnknownVersion is returned if version number is not supported
	ErrUnknownVersion = fmt.Errorf("unknown version")
	//ErrNotFound is returned if an object is not found
	ErrNotFound = fmt.Errorf("object not found")
)

Functions

This section is empty.

Types

type EventSubscription

type EventSubscription struct {
	Events Events
	Err    error
}

type Events

type Events struct {
	WithdrawCreatedEvents []WithdrawCreatedEvent
	WithdrawReadyEvents   []WithdrawReadyEvent
	WithdrawExpiredEvents []WithdrawExpiredEvent
	RefundCreatedEvents   []RefundTransactionCreatedEvent
	RefundReadyEvents     []RefundTransactionReadyEvent
	RefundExpiredEvents   []RefundTransactionExpiredEvent
}

type RefundTransactionCreatedEvent

type RefundTransactionCreatedEvent struct {
	Hash   string
	Target string
	Amount uint64
	TxID   string
}

type RefundTransactionExpiredEvent

type RefundTransactionExpiredEvent struct {
	Hash   string
	Target string
	Amount uint64
}

type RefundTransactionReadyEvent

type RefundTransactionReadyEvent struct {
	Hash string
}

type SubstrateClient

type SubstrateClient struct {
	*substrate.Substrate
	// contains filtered or unexported fields
}

func NewSubstrateClient

func NewSubstrateClient(url string, seed string) (*SubstrateClient, error)

NewSubstrate creates a substrate client

func (*SubstrateClient) RetryCreateRefundTransactionOrAddSig

func (s *SubstrateClient) RetryCreateRefundTransactionOrAddSig(ctx context.Context, txHash string, target string, amount int64, signature string, stellarAddress string, sequence_number uint64) error

func (*SubstrateClient) RetryProposeMintOrVote

func (s *SubstrateClient) RetryProposeMintOrVote(ctx context.Context, txID string, target substrate.AccountID, amount *big.Int) error

func (*SubstrateClient) RetryProposeWithdrawOrAddSig

func (s *SubstrateClient) RetryProposeWithdrawOrAddSig(ctx context.Context, txID uint64, target string, amount *big.Int, signature string, stellarAddress string, sequence_number uint64) error

func (*SubstrateClient) RetrySetRefundTransactionExecutedTx

func (s *SubstrateClient) RetrySetRefundTransactionExecutedTx(ctx context.Context, txHash string) error

func (*SubstrateClient) RetrySetWithdrawExecuted

func (s *SubstrateClient) RetrySetWithdrawExecuted(ctx context.Context, tixd uint64) error

func (*SubstrateClient) SubscribeTfchainBridgeEvents

func (client *SubstrateClient) SubscribeTfchainBridgeEvents(ctx context.Context, eventChannel chan<- EventSubscription) error

type Versioned

type Versioned struct {
	Version uint32
}

Versioned base for all types

type WithdrawCreatedEvent

type WithdrawCreatedEvent struct {
	ID     uint64
	Source types.AccountID
	Target string
	Amount uint64
}

type WithdrawExpiredEvent

type WithdrawExpiredEvent struct {
	ID     uint64
	Source types.OptionAccountID
	Target string
	Amount uint64
}

type WithdrawReadyEvent

type WithdrawReadyEvent struct {
	ID uint64
}

Jump to

Keyboard shortcuts

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