Documentation
¶
Index ¶
- func CompleteEthWithdrawal(ctx context.Context, ethClient *ethereumutil.Client, clientAPI *api.APIClient, ...) (*eth.Transaction, error)
- func PrepareWithdrawal(ctx context.Context, withdrawalsAPI api.WithdrawalsApi, ...) (*api.CreateWithdrawalResponse, error)
- type ERC20Withdrawal
- type ERC721Withdrawal
- type TokenWithdrawal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompleteEthWithdrawal ¶
func CompleteEthWithdrawal( ctx context.Context, ethClient *ethereumutil.Client, clientAPI *api.APIClient, l1signer signers.L1Signer, starkKeyHex string, ) (*eth.Transaction, error)
CompleteEthWithdrawal performs the complete withdrawal workflow for ETH
func PrepareWithdrawal ¶
func PrepareWithdrawal( ctx context.Context, withdrawalsAPI api.WithdrawalsApi, l1signer signers.L1Signer, l2signer signers.L2Signer, request api.GetSignableWithdrawalRequest, ) (*api.CreateWithdrawalResponse, error)
PrepareWithdrawal submits a withdrawal request for ETH, ERC20 and ERC721 tokens to be included in the generation and submission of the next batch. Upon batch confirmation (on-chain state update), the asset is available to be withdrawn by the initial owner / originator of the asset.
Types ¶
type ERC20Withdrawal ¶
type ERC20Withdrawal struct {
TokenAddress string
}
ERC20Withdrawal implements TokenWithdrawal. Used for withdrawal of ERC20 Tokens.
func NewERC20Withdrawal ¶
func NewERC20Withdrawal(tokenAddress string) *ERC20Withdrawal
NewERC20Withdrawal instantiates a new ERC20Withdrawal object with the given tokenAddress.
func (*ERC20Withdrawal) CompleteWithdrawal ¶
func (w *ERC20Withdrawal) CompleteWithdrawal( ctx context.Context, ethClient *ethereumutil.Client, clientAPI *api.APIClient, l1signer signers.L1Signer, starkKeyHex string, ) (*eth.Transaction, error)
CompleteWithdrawal performs the complete withdrawal workflow on ERC20Withdrawal
type ERC721Withdrawal ¶
ERC721Withdrawal implements TokenWithdrawal. Used for withdrawal of ERC721 Tokens.
func NewERC721Withdrawal ¶
func NewERC721Withdrawal(tokenID, tokenAddress string) *ERC721Withdrawal
NewERC721Withdrawal instantiates a new ERC721Withdrawal object with the given tokenId and tokenAddress.
func (*ERC721Withdrawal) CompleteWithdrawal ¶
func (w *ERC721Withdrawal) CompleteWithdrawal( ctx context.Context, ethClient *ethereumutil.Client, clientAPI *api.APIClient, l1signer signers.L1Signer, starkKeyHex string, ) (*eth.Transaction, error)
CompleteWithdrawal performs the completion step of the withdrawal process for ERC721 token.