Documentation ¶
Index ¶
- type LiteClient
- type Outcome
- type Signable
- type Signer
- func (s *Signer) GetERC20CustodyAddress() (_ ethcommon.Address)
- func (s *Signer) GetGatewayAddress() string
- func (s *Signer) GetZetaConnectorAddress() (_ ethcommon.Address)
- func (s *Signer) ProcessOutbound(ctx context.Context, cctx *cc.CrossChainTx, zetacore interfaces.ZetacoreClient, ...) (Outcome, error)
- func (s *Signer) SetERC20CustodyAddress(_ ethcommon.Address)
- func (s *Signer) SetGatewayAddress(addr string)
- func (s *Signer) SetZetaConnectorAddress(_ ethcommon.Address)
- func (s *Signer) SignMessage(ctx context.Context, msg Signable, zetaHeight, nonce uint64) error
- func (s *Signer) TryProcessOutbound(ctx context.Context, cctx *cc.CrossChainTx, proc *outboundprocessor.Processor, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LiteClient ¶
type LiteClient interface { GetTransactionsSince(ctx context.Context, acc ton.AccountID, lt uint64, hash ton.Bits256) ([]ton.Transaction, error) GetAccountState(ctx context.Context, accountID ton.AccountID) (tlb.ShardAccount, error) SendMessage(ctx context.Context, payload []byte) (uint32, error) }
LiteClient represents a TON client see https://github.com/ton-blockchain/ton/blob/master/tl/generate/scheme/tonlib_api.tl
type Signer ¶
Signer represents TON signer.
func New ¶
func New(baseSigner *base.Signer, client LiteClient, gateway *toncontracts.Gateway) *Signer
New Signer constructor.
func (*Signer) GetERC20CustodyAddress ¶
func (*Signer) GetGatewayAddress ¶
GetGatewayAddress returns gateway address as raw TON address "0:ABC..."
func (*Signer) GetZetaConnectorAddress ¶
func (*Signer) ProcessOutbound ¶
func (s *Signer) ProcessOutbound( ctx context.Context, cctx *cc.CrossChainTx, zetacore interfaces.ZetacoreClient, zetaHeight uint64, ) (Outcome, error)
ProcessOutbound signs and broadcasts an outbound cross-chain transaction.
func (*Signer) SetERC20CustodyAddress ¶
func (*Signer) SetGatewayAddress ¶
SetGatewayAddress sets gateway address. Has a check for noop.
func (*Signer) SetZetaConnectorAddress ¶
func (*Signer) SignMessage ¶
SignMessage signs TON external message using TSS
func (*Signer) TryProcessOutbound ¶
func (s *Signer) TryProcessOutbound( ctx context.Context, cctx *cc.CrossChainTx, proc *outboundprocessor.Processor, outboundID string, _ interfaces.ChainObserver, zetacore interfaces.ZetacoreClient, zetaBlockHeight uint64, )
TryProcessOutbound tries to process outbound cctx. Note that this API signature will be refactored in orchestrator V2
Click to show internal directories.
Click to hide internal directories.