Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertCancelOfferTxInfo(tx *CancelOfferTxInfo) *legendTxTypes.CancelOfferTxInfo
- func CreateL1Account() (l1Addr, privateKeyStr, l2pk, seed string, err error)
- func GetAccountIndex(accountName string) (int64, error)
- func GetAccountInfoBySeed(seed string) (*legendSdk.RespGetAccountInfoByPubKey, error)
- func GetAccountL1Address(accountName string) (common.Address, error)
- func GetAddressL1NftList(address, testNet string) ([]byte, error)
- func GetDefaultCollectionId(accountName string) (int64, error)
- func GetNextNonce(accountIdx int64) (int64, error)
- func GetSeedAndL2Pk(privateKeyStr string) (l2pk, seed string, err error)
- func GetSeedAndL2PkAmber(privateKeyStr string) (l2pk, seed string, err error)
- func IfAccountRegistered(accountName string) (bool, error)
- func SignMessage(seed string, message string) (string, error)
- func VerifyMessage(l2publicKey string, eddsaSig, rawMessage string) (bool, error)
- type AccountAsset
- type AccountInfo
- type Asset
- type AssetInfo
- type AtomicMatchTxInfo
- type CancelOfferTxInfo
- type Categorie
- type Client
- func (c *Client) AcceptOffer(offerId int64, isSell bool, assetAmount *big.Int) (*RespAcceptOffer, error)
- func (c *Client) CancelOffer(offerId int64) (*RespCancelOffer, error)
- func (c *Client) CreateBuyOffer(AssetId int64, AssetType int64, AssetAmount *big.Int) (*RespListOffer, error)
- func (c *Client) CreateCollection(ShortName string, CategoryId string, CreatorEarningRate string, ...) (*RespCreateCollection, error)
- func (c *Client) CreateSellOffer(AssetId int64, AssetType int64, AssetAmount *big.Int) (*RespListOffer, error)
- func (c *Client) Deposit(accountName, privateKey string, assetId, assetAmount int64, ...) (*types.Transaction, error)
- func (c *Client) DepositNft(accountName, privateKey string, _nftL1Address common.Address, ...) (*types.Transaction, error)
- func (c *Client) FullExit(accountName, privateKey string, assetAddress common.Address, amount int64) (*types.Transaction, error)
- func (c *Client) FullExitNft(accountName, privateKey string, _nftIndex uint32) (*types.Transaction, error)
- func (c *Client) GetKeyManager() KeyManager
- func (c *Client) GetMyInfo() (accountName string, l2pk string, seed string)
- func (c *Client) MintNft(CollectionId int64, toAccountName, NftUrl string, Name string, ...) (*RespCreateAsset, error)
- func (c *Client) Offer(accountName string, tx string) (*RespListOffer, error)
- func (c *Client) SetKeyManager(keyManager KeyManager)
- func (c *Client) TransferNft(AssetId int64, toAccountName string) (*RespSendTransferNft, error)
- func (c *Client) UpdateCollection(Id string, Name string, ops ...model.CollectionOption) (*RespUpdateCollection, error)
- func (c *Client) Withdraw(tol1Address string, assetId, assetAmount int64) (*RespSendWithdrawTx, error)
- func (c *Client) WithdrawNft(AssetId int64, tol1Address string) (*RespSendWithdrawNft, error)
- type Collection
- type CreateCollectionTxInfo
- type CreatePairTxInfo
- type DepositNftTxInfo
- type DepositTxInfo
- type FullExitNftTxInfo
- type FullExitTxInfo
- type HasuraCollectionId
- type HasuraDataCollectionId
- type HasuraDataOffer
- type HasuraLevel
- type HasuraNfts
- type HasuraOffer
- type HasuraPropertie
- type HasuraStat
- type HauaraNftInfo
- type KeyManager
- type Level
- type MediaDetail
- type MintNftTxInfo
- type NftAccountInfo
- type NftInfo
- type Offer
- type OfferTxInfo
- type Propertie
- type RegisterZnsTxInfo
- type ReqGetAllCollectionByCategoryId
- type ReqGetOfferByOfferId
- type ReqGetPrepareCreateCollectionTxInfo
- type ReqGetPrepareTransferNftTxInfo
- type ReqGetPrepareWithdrawNftTxInfo
- type ReqGetSdkAccountAssets
- type ReqGetSdkAccountCollections
- type ReqGetSdkAccountOffers
- type ReqGetSdkAssetById
- type ReqGetSdkAssetOffers
- type ReqGetSdkAtomicMatchWithTx
- type ReqGetSdkCancelOfferTxInfo
- type ReqGetSdkCollection
- type ReqGetSdkCollectionAssets
- type ReqGetSdkCollectionById
- type ReqGetSdkCreateCollectionTxInfo
- type ReqGetSdkMintNftTxInfo
- type ReqGetSdkOffer
- type ReqGetSdkOfferTxInfo
- type ReqGetSdkTransferNftTxInfo
- type ReqGetSdkWithdrawNftTxInfo
- type ReqMediaUpload
- type RespAcceptOffer
- type RespApplyRegisterHost
- type RespCancelOffer
- type RespCategoryById
- type RespCreateAsset
- type RespCreateCollection
- type RespGetAccountByAccountName
- type RespGetAccountInfoByPubKey
- type RespGetAllAssetByCollectionId
- type RespGetAllCollectionByCategoryId
- type RespGetAssetsList
- type RespGetCollectionAction
- type RespGetCollectionCategories
- type RespGetCollectionOwnerNum
- type RespGetContentHash
- type RespGetDefaultCollectionId
- type RespGetLayer2BasicInfo
- type RespGetListingOffers
- type RespGetNFts
- type RespGetNextNonce
- type RespGetNextOfferId
- type RespGetNftBeingBuy
- type RespGetOfferByAccountNameAndAssetId
- type RespGetOfferById
- type RespGetOfferByOfferId
- type RespGetSdkAccountAssets
- type RespGetSdkAccountCollections
- type RespGetSdkAccountOffers
- type RespGetSdkAssetById
- type RespGetSdkAssetOffers
- type RespGetSdkCollectionById
- type RespGetSdkOfferById
- type RespListOffer
- type RespMediaUpload
- type RespSearchAsset
- type RespSearchCollection
- type RespSearchOffer
- type RespSendTransferNft
- type RespSendWithdrawNft
- type RespSendWithdrawTx
- type RespUpdateCollection
- type RespetPreparetxInfo
- type RespetSdktxInfo
- type ResqGetSdkCollectionAssets
- type SeedKeyManager
- type Stat
- type TransferNftTxInfo
- type TransferTxInfo
- type Tx
- type TxDetail
- type UpdatePairRateTxInfo
- type WithdrawNftTxInfo
- type WithdrawTxInfo
Constants ¶
View Source
const ( QueryNftUrl = "https://deep-index.moralis.io" QueryNftUrlKey = "" DefaultGasLimit = 5000000 NameSuffix = ".zec" MinGasFee = 100000000000000 // 0.0001BNB BNBAssetId = 0 LEGAssetId = 1 REYAssetId = 2 )
View Source
const ( TxTypeEmpty = iota TxTypeRegisterZns TxTypeCreatePair TxTypeUpdatePairRate TxTypeDeposit TxTypeDepositNft TxTypeTransfer TxTypeSwap TxTypeAddLiquidity TxTypeRemoveLiquidity TxTypeWithdraw TxTypeCreateCollection //11 TxTypeMintNft //12 TxTypeTransferNft //13 TxTypeAtomicMatch //----> 14 TxTypeCancelOffer //----> 15 TxTypeWithdrawNft //16 TxTypeFullExit TxTypeFullExitNft //18 TxTypeOffer )
Variables ¶
View Source
var (
GlobalAssetId = BNBAssetId
)
Functions ¶
func ConvertCancelOfferTxInfo ¶ added in v1.0.6
func ConvertCancelOfferTxInfo(tx *CancelOfferTxInfo) *legendTxTypes.CancelOfferTxInfo
func CreateL1Account ¶
func GetAccountIndex ¶
func GetAccountInfoBySeed ¶ added in v1.0.12
func GetAccountInfoBySeed(seed string) (*legendSdk.RespGetAccountInfoByPubKey, error)
func GetAddressL1NftList ¶ added in v1.0.7
func GetDefaultCollectionId ¶ added in v1.0.9
func GetNextNonce ¶
func GetSeedAndL2Pk ¶
func GetSeedAndL2PkAmber ¶ added in v1.0.7
func IfAccountRegistered ¶
Types ¶
type AccountAsset ¶ added in v1.0.13
type AccountInfo ¶
type Asset ¶
type Asset struct { AssetId uint32 `json:"asset_id"` Balance string `json:"balance"` LpAmount string `json:"lp_amount"` OfferCanceledOrFinalized string `json:"offer_canceled_or_finalized"` }
func GetAccountAssetsInfoByAccountName ¶ added in v1.0.6
type AtomicMatchTxInfo ¶
type CancelOfferTxInfo ¶ added in v1.0.6
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientNoSuffix ¶ added in v1.0.7
func (*Client) AcceptOffer ¶
func (*Client) CancelOffer ¶
func (c *Client) CancelOffer(offerId int64) (*RespCancelOffer, error)
func (*Client) CreateBuyOffer ¶
func (*Client) CreateCollection ¶
func (c *Client) CreateCollection(ShortName string, CategoryId string, CreatorEarningRate string, ops ...model.CollectionOption) (*RespCreateCollection, error)
func (*Client) CreateSellOffer ¶
func (*Client) DepositNft ¶ added in v1.0.6
func (*Client) FullExitNft ¶ added in v1.0.6
func (*Client) GetKeyManager ¶ added in v1.0.6
func (c *Client) GetKeyManager() KeyManager
func (*Client) Offer ¶
func (c *Client) Offer(accountName string, tx string) (*RespListOffer, error)
func (*Client) SetKeyManager ¶
func (c *Client) SetKeyManager(keyManager KeyManager)
func (*Client) TransferNft ¶
func (c *Client) TransferNft( AssetId int64, toAccountName string) (*RespSendTransferNft, error)
func (*Client) UpdateCollection ¶
func (c *Client) UpdateCollection(Id string, Name string, ops ...model.CollectionOption) (*RespUpdateCollection, error)
func (*Client) Withdraw ¶ added in v1.0.6
func (c *Client) Withdraw(tol1Address string, assetId, assetAmount int64) (*RespSendWithdrawTx, error)
func (*Client) WithdrawNft ¶
func (c *Client) WithdrawNft(AssetId int64, tol1Address string) (*RespSendWithdrawNft, error)
type Collection ¶
type Collection struct { Id int64 `json:"id"` L2CollectionId int64 `json:"l2_collection_id"` AccountName string `json:"account_name"` Name string `json:"name"` ShortName string `json:"short_name"` Description string `json:"description"` CategoryId int64 `json:"category_id"` CollectionUrl string `json:"collection_url"` ExternalLink string `json:"external_link"` TwitterLink string `json:"twitter_link"` InstagramLink string `json:"instagram_link"` TelegramLink string `json:"telegram_link"` DiscordLink string `json:"discord_link"` LogoImage string `json:"logo_image"` LogoThumb string `json:"logo_thumb"` FeaturedImage string `json:"featured_image"` FeaturedThumb string `json:"featured_Thumb"` BannerImage string `json:"banner_image"` BannerThumb string `json:"banner_thumb"` CreatorEarningRate int64 `json:"creator_earning_rate"` Status string `json:"status"` ExpiredAt int64 `json:"expired_at"` CreatedAt int64 `json:"created_at"` ItemCount int64 `json:"item_count"` BrowseCount int64 `json:"browse_count"` FloorPrice int64 `json:"floor_price"` OneDayTradeVolume int64 `json:"one_day_trade_volume"` TotalTradeVolume int64 `json:"total_trade_volume"` }
type CreateCollectionTxInfo ¶
type CreatePairTxInfo ¶
type DepositNftTxInfo ¶
type DepositTxInfo ¶
type FullExitNftTxInfo ¶
type FullExitTxInfo ¶
type HasuraCollectionId ¶ added in v1.0.9
type HasuraCollectionId struct {
Id int64 `json:"id"`
}
type HasuraDataCollectionId ¶ added in v1.0.9
type HasuraDataCollectionId struct {
Collection []*HasuraCollectionId `json:"collection"`
}
type HasuraDataOffer ¶
type HasuraDataOffer struct {
Offers []*HasuraOffer `json:"offer"`
}
type HasuraLevel ¶ added in v1.0.10
type HasuraNfts ¶ added in v1.0.10
type HasuraNfts struct {
Assets []*HauaraNftInfo `json:"asset"`
}
type HasuraOffer ¶
type HasuraOffer struct { Id int64 `json:"id"` L2OfferId int64 `json:"l2_offer_id"` Direction int `json:"direction"` AssetId int64 `json:"asset_id"` PaymentAssetId int64 `json:"payment_asset_id"` PaymentAssetAmount float64 `json:"payment_asset_amount"` Status int `json:"status"` Signature string `json:"signature"` ExpiredAt int64 `json:"expired_at"` CreatedAt string `json:"created_at"` Asset *HauaraNftInfo `json:"asset"` }
type HasuraPropertie ¶ added in v1.0.10
type HasuraStat ¶ added in v1.0.10
type HauaraNftInfo ¶
type HauaraNftInfo struct { Id int64 `json:"id"` NftIndex int64 `json:"nft_index"` CollectionId int64 `json:"collection_id"` CreatorEarningRate int64 `json:"creator_earning_rate"` Name string `json:"name"` Description string `json:"description"` Media MediaDetail `json:"media_detail"` ImageThumb string `json:"image_thumb"` VideoThumb string `json:"video_thumb"` AudioThumb string `json:"audio_thumb"` Status int64 `json:"status"` ContentHash string `json:"content_hash"` NftUrl string `json:"nft_url"` ExpiredAt int64 `json:"expired_at"` CreatedAt string `json:"created_at"` Properties []HasuraPropertie `json:"asset_properties"` Levels []HasuraLevel `json:"asset_levels"` Stats []HasuraStat `json:"asset_stats"` }
func GetCollectionAccountNftsByIregex ¶ added in v1.0.10
func GetCollectionAccountNftsByIregex(collectionId int64, accountName, iregex string) ([]*HauaraNftInfo, error)
func GetCollectionNftsByIregex ¶ added in v1.0.10
func GetCollectionNftsByIregex(collectionId int64, iregex string) ([]*HauaraNftInfo, error)
type KeyManager ¶
type KeyManager interface { Sign(message []byte, hFunc hash.Hash) ([]byte, error) Public() signature.PublicKey }
func NewSeedKeyManager ¶
func NewSeedKeyManager(seed string) (KeyManager, error)
type MediaDetail ¶
type MediaDetail struct {
Url string `json:"url"`
}
========================= hasura struct ============================
type MintNftTxInfo ¶
type NftAccountInfo ¶
type NftAccountInfo struct { Id int64 `json:"id"` AccountIndex int64 `json:"account_index"` AccountPk string `json:"account_pk"` AccountName string `json:"account_name"` Bio string `json:"bio"` Email string `json:"email"` ExternalLink string `json:"external_link"` TwitterLink string `json:"twitter_link"` InstagramLink string `json:"instagram_link"` ProfileImage string `json:"profile_image"` ProfileThumb string `json:"profile_thumb"` BannerImage string `json:"banner_image"` BannerThumb string `json:"banner_thumb"` CreatedAt int64 `json:"created_at"` }
type NftInfo ¶
type NftInfo struct { Id int64 `json:"id"` AccountName string `json:"account_name"` NftIndex int64 `json:"nft_index"` CollectionId int64 `json:"collection_id"` CreatorEarningRate int64 `json:"creator_earning_rate"` Name string `json:"name"` Description string `json:"description"` Media string `json:"media"` ImageThumb string `json:"image_thumb"` VideoThumb string `json:"video_thumb"` AudioThumb string `json:"audio_thumb"` Status string `json:"status"` ContentHash string `json:"content_hash"` NftUrl string `json:"nft_url"` ExpiredAt int64 `json:"expired_at"` CreatedAt int64 `json:"created_at"` Properties []Propertie `json:"properties"` Levels []Level `json:"levels"` Stats []Stat `json:"stats"` }
type Offer ¶
type Offer struct { Id int64 `json:"id"` L2OfferId int64 `json:"l2_offer_id"` AccountName string `json:"account_name"` Direction string `json:"direction"` AssetId int64 `json:"asset_id"` PaymentAssetId int64 `json:"payment_asset_id"` PaymentAssetAmount string `json:"payment_asset_amount"` Status string `json:"status"` Signature string `json:"signature"` ExpiredAt int64 `json:"expired_at"` CreatedAt int64 `json:"created_at"` }
type OfferTxInfo ¶
type RegisterZnsTxInfo ¶
type ReqGetAllCollectionByCategoryId ¶
type ReqGetAllCollectionByCategoryId struct {
CategoryId int64 `form:"category_id"`
}
type ReqGetOfferByOfferId ¶
type ReqGetOfferByOfferId struct {
OfferId int64 `form:"offer_id"`
}
type ReqGetPrepareCreateCollectionTxInfo ¶
type ReqGetPrepareCreateCollectionTxInfo struct {
AccountName string `form:"account_name"`
}
type ReqGetSdkAccountAssets ¶ added in v1.0.5
type ReqGetSdkAccountAssets struct {
AccountIndex int64 `json:"account_index"`
}
type ReqGetSdkAccountCollections ¶ added in v1.0.5
type ReqGetSdkAccountCollections struct {
AccountIndex int64 `json:"account_index"`
}
type ReqGetSdkAccountOffers ¶ added in v1.0.5
type ReqGetSdkAccountOffers struct {
AccountIndex int64 `json:"account_index"`
}
type ReqGetSdkAssetById ¶ added in v1.0.5
type ReqGetSdkAssetById struct {
AssetId int64 `json:"asset_id"`
}
type ReqGetSdkAssetOffers ¶ added in v1.0.5
type ReqGetSdkAssetOffers struct {
AssetId int64 `json:"asset_id"`
}
type ReqGetSdkAtomicMatchWithTx ¶ added in v1.0.5
type ReqGetSdkCancelOfferTxInfo ¶ added in v1.0.5
type ReqGetSdkCollection ¶ added in v1.0.5
type ReqGetSdkCollection struct {
CollectionId int64 `json:"collection_id"`
}
type ReqGetSdkCollectionAssets ¶ added in v1.0.5
type ReqGetSdkCollectionAssets struct {
CollectionId int64 `json:"collection_id"`
}
type ReqGetSdkCollectionById ¶ added in v1.0.5
type ReqGetSdkCollectionById struct {
CollectionId int64 `json:"collection_id"`
}
type ReqGetSdkCreateCollectionTxInfo ¶ added in v1.0.5
type ReqGetSdkCreateCollectionTxInfo struct {
AccountName string `form:"account_name"`
}
======================= sdk ======================================
type ReqGetSdkMintNftTxInfo ¶ added in v1.0.5
type ReqGetSdkOffer ¶ added in v1.0.5
type ReqGetSdkOffer struct {
OfferId int64 `json:"offer_id"`
}
type ReqGetSdkOfferTxInfo ¶ added in v1.0.5
type ReqGetSdkTransferNftTxInfo ¶ added in v1.0.5
type ReqGetSdkWithdrawNftTxInfo ¶ added in v1.0.5
type ReqMediaUpload ¶
type ReqMediaUpload struct {
// contains filtered or unexported fields
}
type RespAcceptOffer ¶
type RespAcceptOffer struct {
Offer Offer `json:"offer"`
}
type RespApplyRegisterHost ¶
type RespApplyRegisterHost struct {
Ok bool `json:"ok"`
}
func ApplyRegisterHost ¶
func ApplyRegisterHost( accountName string, l2Pk string, OwnerAddr string) (*RespApplyRegisterHost, error)
type RespCancelOffer ¶
type RespCancelOffer struct {
Offer Offer `json:"offer"`
}
type RespCategoryById ¶
type RespCategoryById struct {
Category Categorie `json:"categorie"`
}
type RespCreateAsset ¶
type RespCreateAsset struct {
Asset NftInfo `json:"asset"`
}
type RespCreateCollection ¶
type RespCreateCollection struct {
Collection Collection `json:"collection"`
}
type RespGetAccountByAccountName ¶
type RespGetAccountByAccountName struct {
Account NftAccountInfo `json:"account"`
}
func GetAccountByAccountName ¶
func GetAccountByAccountName(accountName string) (*RespGetAccountByAccountName, error)
type RespGetAccountInfoByPubKey ¶ added in v1.0.13
type RespGetAccountInfoByPubKey struct { AccountStatus uint32 `json:"account_status"` AccountName string `json:"account_name"` AccountIndex int64 `json:"account_index"` Assets []*AccountAsset `json:"assets"` }
type RespGetAllCollectionByCategoryId ¶
type RespGetAllCollectionByCategoryId struct { Total int64 `json:"total"` Collections []Collection `json:"collections"` }
type RespGetAssetsList ¶ added in v1.0.6
type RespGetAssetsList struct {
Assets []*AssetInfo `json:"assets"`
}
func GetAssetsList ¶ added in v1.0.6
func GetAssetsList() (*RespGetAssetsList, error)
type RespGetCollectionAction ¶
type RespGetCollectionAction struct { OpCode string `json:"opCode"` Collection Collection `json:"collection"` }
type RespGetCollectionCategories ¶
type RespGetCollectionCategories struct {
Categories []*Categorie `json:"categories"`
}
func GetCategories ¶
func GetCategories() (*RespGetCollectionCategories, error)
type RespGetCollectionOwnerNum ¶ added in v1.0.6
type RespGetCollectionOwnerNum struct {
OwnerNum int64 `json:"owner_num"`
}
type RespGetContentHash ¶
type RespGetContentHash struct {
ContentHash string `json:"content_hash"`
}
type RespGetDefaultCollectionId ¶ added in v1.0.9
type RespGetDefaultCollectionId struct {
Data *HasuraDataCollectionId `json:"data"`
}
type RespGetLayer2BasicInfo ¶
type RespGetLayer2BasicInfo struct { BlockCommitted int64 `json:"block_committed"` BlockVerified int64 `json:"block_verified"` TotalTransactions int64 `json:"total_transactions"` TransactionsCountYesterday int64 `json:"transactions_count_yesterday"` TransactionsCountToday int64 `json:"transactions_count_today"` DauYesterday int64 `json:"dau_yesterday"` DauToday int64 `json:"dau_today"` ContractAddresses []string `json:"contract_addresses"` NftOfferTreasuryRate int64 `json:"nft_offer_treasury_rate"` }
func GetLayer2BasicInfo ¶
func GetLayer2BasicInfo() (*RespGetLayer2BasicInfo, error)
type RespGetListingOffers ¶ added in v1.0.5
type RespGetListingOffers struct {
Data *HasuraDataOffer `json:"data"`
}
func GetListingOffers ¶
func GetListingOffers(isSell int64) (*RespGetListingOffers, error)
type RespGetNFts ¶ added in v1.0.10
type RespGetNFts struct {
Data *HasuraNfts `json:"data"`
}
type RespGetNextNonce ¶
type RespGetNextNonce struct {
Nonce int64 `json:"nonce"`
}
type RespGetNextOfferId ¶
type RespGetNextOfferId struct {
Id int64 `json:"id"`
}
func GetNextOfferId ¶
func GetNextOfferId(AccountName string) (*RespGetNextOfferId, error)
type RespGetNftBeingBuy ¶
type RespGetNftBeingBuy struct {
Data *HasuraDataOffer `json:"data"`
}
type RespGetOfferByAccountNameAndAssetId ¶
type RespGetOfferByAccountNameAndAssetId struct {
Offer Offer `json:"offer"`
}
type RespGetOfferById ¶
type RespGetOfferById struct {
OfferId Offer `json:"offer"`
}
type RespGetOfferByOfferId ¶
type RespGetOfferByOfferId struct {
Offer Offer `json:"offer"`
}
func GetOfferById ¶
func GetOfferById(OfferId int64) (*RespGetOfferByOfferId, error)
type RespGetSdkAccountAssets ¶ added in v1.0.5
type RespGetSdkAccountAssets struct {
SdkAssets []*NftInfo `json:"sdkAssets"`
}
func GetAccountNFTs ¶
func GetAccountNFTs(AccountIndex int64) (*RespGetSdkAccountAssets, error)
type RespGetSdkAccountCollections ¶ added in v1.0.5
type RespGetSdkAccountCollections struct {
SdkCollections []*Collection `json:"sdkCollections"`
}
func GetCollectionsByAccountIndex ¶
func GetCollectionsByAccountIndex(AccountIndex int64) (*RespGetSdkAccountCollections, error)
type RespGetSdkAccountOffers ¶ added in v1.0.5
type RespGetSdkAccountOffers struct {
SdkOffers []*Offer `json:"sdkOffers"`
}
func GetAccountOffers ¶
func GetAccountOffers(AccountIndex int64) (*RespGetSdkAccountOffers, error)
type RespGetSdkAssetById ¶ added in v1.0.5
type RespGetSdkAssetById struct {
Asset *NftInfo `json:"asset"`
}
func GetNftById ¶
func GetNftById(nftId int64) (*RespGetSdkAssetById, error)
type RespGetSdkAssetOffers ¶ added in v1.0.5
type RespGetSdkAssetOffers struct {
SdkOffers []*Offer `json:"sdkOffers"`
}
func GetNftOffers ¶
func GetNftOffers(NftId int64) (*RespGetSdkAssetOffers, error)
type RespGetSdkCollectionById ¶ added in v1.0.5
type RespGetSdkCollectionById struct {
Collection Collection `json:"collection"`
}
func GetCollectionById ¶
func GetCollectionById(collectionId int64) (*RespGetSdkCollectionById, error)
type RespGetSdkOfferById ¶ added in v1.0.5
type RespGetSdkOfferById struct {
OfferId Offer `json:"offer"`
}
type RespListOffer ¶
type RespListOffer struct {
Offer Offer `json:"offer"`
}
type RespMediaUpload ¶
type RespMediaUpload struct { PublicId string `json:"public_id"` Url string `json:"url,omitempty"` }
func UploadMedia ¶
func UploadMedia(filePath string) (*RespMediaUpload, error)
type RespSearchAsset ¶
type RespSearchCollection ¶
type RespSearchCollection struct { Total int64 `json:"total"` Collections []Collection `json:"collections"` }
type RespSearchOffer ¶
type RespSearchOffer struct {
Offer []Offer `json:"offers"`
}
type RespSendTransferNft ¶ added in v1.0.6
type RespSendTransferNft struct {
Success bool `json:"success"`
}
type RespSendWithdrawNft ¶ added in v1.0.6
type RespSendWithdrawNft struct {
Success bool `json:"success"`
}
type RespSendWithdrawTx ¶ added in v1.0.6
type RespSendWithdrawTx struct {
TxId string `json:"tx_id"`
}
type RespUpdateCollection ¶
type RespUpdateCollection struct {
Collection Collection `json:"collection"`
}
type RespetPreparetxInfo ¶
type RespetSdktxInfo ¶ added in v1.0.5
type ResqGetSdkCollectionAssets ¶ added in v1.0.5
type ResqGetSdkCollectionAssets struct {
SdkAssets []*NftInfo `json:"sdkAssets"`
}
type SeedKeyManager ¶
type SeedKeyManager struct {
// contains filtered or unexported fields
}
func (*SeedKeyManager) Public ¶
func (key *SeedKeyManager) Public() signature.PublicKey
type TransferNftTxInfo ¶
type TransferTxInfo ¶
type Tx ¶
type Tx struct { TxId int64 `json:"tx_id"` TxHash string `json:"tx_hash"` TxType int64 `json:"tx_type"` GasFee string `json:"gas_fee"` GasFeeAssetId int64 `json:"gas_fee_asset_id"` TxStatus int64 `json:"tx_status"` BlockHeight int64 `json:"block_height"` BlockId int64 `json:"block_id"` StateRoot string `json:"state_root"` NftIndex int64 `json:"nft_index"` PairIndex int64 `json:"pair_index"` AssetId int64 `json:"asset_id"` TxAmount string `json:"tx_amount"` NativeAddress string `json:"native_address"` TxInfo string `json:"tx_info"` TxDetails []*TxDetail `json:"tx_details"` ExtraInfo string `json:"extra_info"` Memo string `json:"memo"` AccountIndex int64 `json:"account_index"` Nonce int64 `json:"nonce"` ExpiredAt int64 `json:"expired_at"` }
type TxDetail ¶
type TxDetail struct { TxId int64 `json:"tx_id"` AssetId int64 `json:"asset_id"` AssetType int64 `json:"asset_type"` AccountIndex int64 `json:"account_index"` AccountName string `json:"account_name"` Balance string `json:"balance"` BalanceDelta string `json:"balance_delta"` Order int64 `json:"order"` AccountOrder int64 `json:"account_order"` Nonce int64 `json:"nonce"` CollectionNonce int64 `json:"collection_nonce"` }
type UpdatePairRateTxInfo ¶
type WithdrawNftTxInfo ¶
type WithdrawNftTxInfo struct { AccountIndex int64 CreatorAccountIndex int64 CreatorAccountNameHash []byte CreatorTreasuryRate int64 NftIndex int64 NftContentHash []byte NftL1Address string NftL1TokenId *big.Int CollectionId int64 ToAddress string GasAccountIndex int64 GasFeeAssetId int64 GasFeeAssetAmount *big.Int ExpiredAt int64 Nonce int64 Sig []byte }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.