Documentation ¶
Index ¶
- Constants
- Variables
- func CreateChangePubKeyTx(accountId uint32, fromAddress, pubKeyHash string, feeToken *core.Token, ...) *core.ChangePubKey
- func CreateMintNFTTx(accountId uint32, creator, recipient, contentHash string, feeToken *core.Token, ...) *core.MintNFT
- func CreateTransferNFTTx(accountId uint32, fromAddress, toAddress, nftSymbol string, ...) ([]*core.Transfer, error)
- func CreateTransferTx(accountId uint32, fromAddress, toAddress string, amount *big.Int, fee *big.Int, ...) *core.Transfer
- func CreateTransferWithFeeTokenTx(accountId uint32, fromAddress, toAddress string, amount *big.Int, ...) []*core.Transfer
- func CreateWithdrawNFTTx(accountId uint32, addr string, nftId uint32, feeToken *core.Token, ...) *core.WithdrawNFT
- func CreateWithdrawTx(accountId uint32, address string, amount *big.Int, fee *big.Int, ...) *core.Withdraw
- func GetAddress(ethPrivKeyHex string) (string, error)
- func GetPubKeyHash(ethPrivKeyHex string, chainId int) (string, error)
- func SignChangePubKey(changePubKey *core.ChangePubKey, ethPrivKeyHex string, chainId int) (*core.SignedTransaction, error)
- func SignMintNFT(mintNFT *core.MintNFT, feeToken *core.Token, ethPrivKeyHex string, chainId int) (*core.SignedTransaction, error)
- func SignTransfer(transfer *core.Transfer, ethPrivKeyHex string, chainId int) (*core.SignedTransaction, error)
- func SignWithdraw(withdraw *core.Withdraw, feeToken *core.Token, ethPrivKeyHex string, ...) (*core.SignedTransaction, error)
- func SignWithdrawNFT(withdrawNft *core.WithdrawNFT, feeToken *core.Token, ethPrivKeyHex string, ...) (*core.SignedTransaction, error)
- type BatchTransaction
Constants ¶
View Source
const ( WITHDRAW = "Withdraw" TRANSFER = "Transfer" CHANGE_PUB_KEY = "ChangePubKey" MINT_NFT = "MintNFT" WITHDRAW_NFT = "WithdrawNFT" )
View Source
const UINT32_MAX = ^uint32(0)
Variables ¶
View Source
var ETH = core.CreateETH()
View Source
var RinkebyUSDC = &core.Token{ Id: 2, Address: "0xeb8f08a975ab53e34d8a0330e0d34de942c95926", Symbol: "USDC", Decimals: 6, IsNft: false, }
View Source
var RinkebyUSDT = &core.Token{ Id: 1, Address: "0x3b00ef435fa4fcff5c209a37d1f3dcff37c705ad", Symbol: "USDT", Decimals: 6, IsNft: false, }
View Source
var USDT = &core.Token{ Id: 4, Address: "0xdac17f958d2ee523a2206206994597c13d831ec7", Symbol: "USDT", Decimals: 6, IsNft: false, }
Functions ¶
func CreateChangePubKeyTx ¶
func CreateMintNFTTx ¶
func CreateTransferNFTTx ¶
func CreateTransferTx ¶
func CreateWithdrawNFTTx ¶
func CreateWithdrawTx ¶
func GetAddress ¶
func SignChangePubKey ¶
func SignChangePubKey(changePubKey *core.ChangePubKey, ethPrivKeyHex string, chainId int) (*core.SignedTransaction, error)
func SignMintNFT ¶
func SignTransfer ¶
func SignWithdraw ¶
func SignWithdrawNFT ¶
func SignWithdrawNFT(withdrawNft *core.WithdrawNFT, feeToken *core.Token, ethPrivKeyHex string, chainId int) (*core.SignedTransaction, error)
Types ¶
type BatchTransaction ¶
type BatchTransaction struct { Txs []core.SignedTransaction `json:"txs"` Signature *core.EthSignature `json:"signature"` }
func SignBatchTransfer ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.