Documentation
¶
Index ¶
- Constants
- Variables
- type CollectionMetadata
- type CreateCollectionArgs
- type CreatePackArgs
- type Currency
- type CurrencyMetadata
- type CurrencyModule
- func (sdk *CurrencyModule) Allowance(spender string) (*big.Int, error)
- func (sdk *CurrencyModule) AllowanceOf(owner string, spender string) (*big.Int, error)
- func (sdk *CurrencyModule) Balance() (CurrencyValue, error)
- func (sdk *CurrencyModule) BalanceOf(address string) (CurrencyValue, error)
- func (sdk *CurrencyModule) Burn(amount *big.Int) error
- func (sdk *CurrencyModule) BurnFrom(from string, amount *big.Int) error
- func (sdk *CurrencyModule) Get() (CurrencyMetadata, error)
- func (sdk *CurrencyModule) GetValue(value *big.Int) (CurrencyValue, error)
- func (manager *CurrencyModule) GrantRole(role Role, address string) error
- func (sdk *CurrencyModule) Mint(amount *big.Int) error
- func (sdk *CurrencyModule) MintTo(to string, amount *big.Int) error
- func (manager *CurrencyModule) RevokeRole(role Role, address string) error
- func (sdk *CurrencyModule) SetAllowance(spender string, amount *big.Int) error
- func (sdk *CurrencyModule) SetRestrictedTransfer(restricted bool) error
- func (sdk *CurrencyModule) TotalSupply() (*big.Int, error)
- func (sdk *CurrencyModule) Transfer(to string, amount *big.Int) error
- func (sdk *CurrencyModule) TransferFrom(from string, to string, amount *big.Int) error
- type CurrencyValue
- type FailedToUploadError
- type ISdk
- type IpfsStorage
- type Listing
- type ListingFilter
- type Market
- type MarketModule
- func (sdk *MarketModule) Buy(listingId *big.Int, quantity *big.Int) error
- func (sdk *MarketModule) GetAll(filter ListingFilter) ([]Listing, error)
- func (sdk *MarketModule) GetListing(listingId *big.Int) (Listing, error)
- func (sdk *MarketModule) GetMarketFeeBps() (*big.Int, error)
- func (sdk *MarketModule) List(args NewListingArgs) (Listing, error)
- func (sdk *MarketModule) SetMarketFeeBps(fee *big.Int) error
- func (sdk *MarketModule) Unlist(listingId *big.Int, quantity *big.Int) error
- func (sdk *MarketModule) UnlistAll(listingId *big.Int) error
- type Marketplace
- type MarketplaceModule
- type Metadata
- type MintCollectionArgs
- type MintNftMetadata
- type NewListingArgs
- type Nft
- type NftCollection
- type NftCollectionBatchArgs
- type NftCollectionModule
- func (sdk *NftCollectionModule) Balance(tokenId *big.Int) (*big.Int, error)
- func (sdk *NftCollectionModule) BalanceOf(address string, tokenId *big.Int) (*big.Int, error)
- func (sdk *NftCollectionModule) Burn(args NftCollectionBatchArgs) error
- func (sdk *NftCollectionModule) BurnBatch(args []NftCollectionBatchArgs) error
- func (sdk *NftCollectionModule) BurnBatchFrom(account string, args []NftCollectionBatchArgs) error
- func (sdk *NftCollectionModule) BurnFrom(account string, args NftCollectionBatchArgs) error
- func (sdk *NftCollectionModule) Create(metadata Metadata) (CollectionMetadata, error)
- func (sdk *NftCollectionModule) CreateAndMint(metadataWithSupply CreateCollectionArgs) (CollectionMetadata, error)
- func (sdk *NftCollectionModule) CreateAndMintBatch(metadataWithSupply []CreateCollectionArgs) ([]CollectionMetadata, error)
- func (sdk *NftCollectionModule) CreateBatch(metadata []Metadata) ([]CollectionMetadata, error)
- func (sdk *NftCollectionModule) CreateWithErc20(tokenContract string, tokenAmount *big.Int, args CreateCollectionArgs) error
- func (sdk *NftCollectionModule) CreateWithErc721(tokenContract string, tokenAmount *big.Int, args CreateCollectionArgs) error
- func (sdk *NftCollectionModule) Get(tokenId *big.Int) (CollectionMetadata, error)
- func (sdk *NftCollectionModule) GetAll() ([]CollectionMetadata, error)
- func (sdk *NftCollectionModule) GetAsync(tokenId *big.Int, ch chan<- CollectionMetadata, wg *sync.WaitGroup)
- func (manager *NftCollectionModule) GrantRole(role Role, address string) error
- func (sdk *NftCollectionModule) IsApproved(address string, operator string) (bool, error)
- func (sdk *NftCollectionModule) Mint(args MintCollectionArgs) error
- func (sdk *NftCollectionModule) MintBatch(args []MintCollectionArgs) error
- func (sdk *NftCollectionModule) MintBatchTo(toAddress string, args []MintCollectionArgs) error
- func (sdk *NftCollectionModule) MintTo(toAddress string, args MintCollectionArgs) error
- func (manager *NftCollectionModule) RevokeRole(role Role, address string) error
- func (sdk *NftCollectionModule) SetApproval(operator string, approved bool) error
- func (sdk *NftCollectionModule) SetApproved(operator string, approved bool) error
- func (sdk *NftCollectionModule) SetRestrictedTransfer(restricted bool) error
- func (sdk *NftCollectionModule) SetRoyaltyBps(amount *big.Int) error
- func (sdk *NftCollectionModule) Transfer(to string, tokenId *big.Int, amount *big.Int) error
- func (sdk *NftCollectionModule) TransferBatchFrom(from string, to string, args []NftCollectionBatchArgs, amount *big.Int) error
- func (sdk *NftCollectionModule) TransferFrom(from string, to string, args NftCollectionBatchArgs) error
- type NftMetadata
- type NftModule
- func (sdk *NftModule) Balance(tokenId *big.Int) (*big.Int, error)
- func (sdk *NftModule) BalanceOf(address string) (*big.Int, error)
- func (sdk *NftModule) Burn(tokenId *big.Int) error
- func (sdk *NftModule) Get(tokenId *big.Int) (NftMetadata, error)
- func (sdk *NftModule) GetAll() ([]NftMetadata, error)
- func (sdk *NftModule) GetAsync(tokenId *big.Int, ch chan<- NftMetadata, errCh chan<- error, ...)
- func (sdk *NftModule) GetOwned(address string) ([]NftMetadata, error)
- func (manager *NftModule) GrantRole(role Role, address string) error
- func (sdk *NftModule) Mint(metadata MintNftMetadata) (NftMetadata, error)
- func (sdk *NftModule) MintBatch(meta []MintNftMetadata) ([]NftMetadata, error)
- func (sdk *NftModule) MintBatchTo(to string, meta []MintNftMetadata) ([]NftMetadata, error)
- func (sdk *NftModule) MintTo(to string, metadata MintNftMetadata) (NftMetadata, error)
- func (manager *NftModule) RevokeRole(role Role, address string) error
- func (sdk *NftModule) SetApproval(operator string, approved bool) error
- func (sdk *NftModule) SetRestrictedTransfer(restricted bool) error
- func (sdk *NftModule) SetRoyaltyBps(amount *big.Int) error
- func (sdk *NftModule) TotalSupply() (*big.Int, error)
- func (sdk *NftModule) Transfer(to string, tokenId *big.Int) error
- func (sdk *NftModule) TransferFrom(from string, to string, tokenId *big.Int) error
- type NoAddressError
- type NoSignerError
- type NotFoundError
- type Pack
- type PackAssetAddition
- type PackMetadata
- type PackModule
- func (sdk *PackModule) Balance(tokenId *big.Int) (*big.Int, error)
- func (sdk *PackModule) BalanceOf(address string, tokenId *big.Int) (*big.Int, error)
- func (sdk *PackModule) Create(args CreatePackArgs) (PackMetadata, error)
- func (sdk *PackModule) Get(packId *big.Int) (PackMetadata, error)
- func (sdk *PackModule) GetAll() ([]PackMetadata, error)
- func (sdk *PackModule) GetAsync(tokenId *big.Int, ch chan<- PackMetadata, wg *sync.WaitGroup)
- func (sdk *PackModule) GetNfts(packId *big.Int) ([]PackNft, error)
- func (sdk *PackModule) Open(packId *big.Int) (PackNft, error)
- func (sdk *PackModule) SetRestrictedTransfer(restricted bool) error
- func (sdk *PackModule) Transfer(to string, tokenId *big.Int, quantity *big.Int) error
- type PackNft
- type Role
- type Sdk
- func (sdk *Sdk) GetCurrencyModule(address string) (Currency, error)
- func (sdk *Sdk) GetMarketModule(address string) (Market, error)
- func (sdk *Sdk) GetMarketplaceModule(address string) (Marketplace, error)
- func (sdk *Sdk) GetNftCollectionModule(address string) (NftCollection, error)
- func (sdk *Sdk) GetNftModule(address string) (Nft, error)
- func (sdk *Sdk) GetPackModule(address string) (Pack, error)
- func (sdk *Sdk) GetStorage() (Storage, error)
- func (sdk *Sdk) SetStorage(gateway Storage)
- func (sdk *Sdk) TransferNativeToken(to string, amount *big.Int) error
- type SdkOptions
- type SigningMethod
- type Storage
- type UnmarshalError
- type UnsupportedFunctionError
Constants ¶
View Source
const ( AdminRole Role = "" MinterRole = "MINTER_ROLE" TransferRole = "TRANSFER_ROLE" PauserRole = "PAUSER_ROLE" )
Variables ¶
View Source
var ( InterfaceIdErc165 = [4]byte{1, 255, 201, 167} // 0x01ffc9a7 InterfaceIdErc721 = [4]byte{128, 172, 88, 205} // 0x80ac58cd InterfaceIdErc721Metadata = [4]byte{91, 94, 19, 159} // 0x5b5e139f InterfaceIdErc721Enumerable = [4]byte{120, 14, 157, 99} // 0x780e9d63 InterfaceIdErc1155 = [4]byte{217, 182, 122, 38} // 0xd9b67a26 )
Functions ¶
This section is empty.
Types ¶
type CollectionMetadata ¶
type CollectionMetadata struct {
NftMetadata
Creator string `json:"creator"`
Supply *big.Int `json:"supply"`
}
type CreateCollectionArgs ¶
CreateCollectionArgs to create collections Supply should be non-nil
type CreatePackArgs ¶
type Currency ¶
type Currency interface {
Balance() (CurrencyValue, error)
Get() (CurrencyMetadata, error)
BalanceOf(address string) (CurrencyValue, error)
GetValue(value *big.Int) (CurrencyValue, error)
Transfer(to string, amount *big.Int) error
Allowance(spender string) (*big.Int, error)
SetAllowance(spender string, amount *big.Int) error
AllowanceOf(owner string, spender string) (*big.Int, error)
Mint(amount *big.Int) error
MintTo(to string, amount *big.Int) error
Burn(amount *big.Int) error
BurnFrom(from string, amount *big.Int) error
TransferFrom(from string, to string, amount *big.Int) error
GrantRole(role Role, address string) error
RevokeRole(role Role, address string) error
TotalSupply() (*big.Int, error)
SetRestrictedTransfer(restricted bool) error
// contains filtered or unexported methods
}
type CurrencyMetadata ¶
type CurrencyModule ¶
type CurrencyModule struct {
Client *ethclient.Client
Address string
// contains filtered or unexported fields
}
func (*CurrencyModule) Allowance ¶
func (sdk *CurrencyModule) Allowance(spender string) (*big.Int, error)
func (*CurrencyModule) AllowanceOf ¶
func (*CurrencyModule) Balance ¶
func (sdk *CurrencyModule) Balance() (CurrencyValue, error)
func (*CurrencyModule) BalanceOf ¶
func (sdk *CurrencyModule) BalanceOf(address string) (CurrencyValue, error)
func (*CurrencyModule) BurnFrom ¶
func (sdk *CurrencyModule) BurnFrom(from string, amount *big.Int) error
func (*CurrencyModule) Get ¶
func (sdk *CurrencyModule) Get() (CurrencyMetadata, error)
func (*CurrencyModule) GetValue ¶
func (sdk *CurrencyModule) GetValue(value *big.Int) (CurrencyValue, error)
func (*CurrencyModule) RevokeRole ¶
func (*CurrencyModule) SetAllowance ¶
func (sdk *CurrencyModule) SetAllowance(spender string, amount *big.Int) error
func (*CurrencyModule) SetRestrictedTransfer ¶
func (sdk *CurrencyModule) SetRestrictedTransfer(restricted bool) error
SetRestrictedTransfer will disable all transfers if set to true
func (*CurrencyModule) TotalSupply ¶
func (sdk *CurrencyModule) TotalSupply() (*big.Int, error)
func (*CurrencyModule) Transfer ¶
func (sdk *CurrencyModule) Transfer(to string, amount *big.Int) error
func (*CurrencyModule) TransferFrom ¶
type CurrencyValue ¶
type CurrencyValue struct {
CurrencyMetadata
Value *big.Int `json:"value"`
DisplayValue string `json:"displayValue"`
}
type FailedToUploadError ¶
type FailedToUploadError struct {
Payload interface{}
UnderlyingError error
// contains filtered or unexported fields
}
func (*FailedToUploadError) Error ¶
func (m *FailedToUploadError) Error() string
type ISdk ¶
type ISdk interface {
GetNftModule(address string) (Nft, error)
GetMarketModule(address string) (Market, error)
GetMarketplaceModule(address string) (Marketplace, error)
GetCurrencyModule(address string) (Currency, error)
GetPackModule(address string) (Pack, error)
GetNftCollectionModule(address string) (NftCollection, error)
GetStorage() (Storage, error)
TransferNativeToken(to string, amount *big.Int) error
SetStorage(gateway Storage)
// contains filtered or unexported methods
}
type IpfsStorage ¶
type IpfsStorage struct {
Url string
}
func (*IpfsStorage) Upload ¶
func (gw *IpfsStorage) Upload(data interface{}, contractAddress string, signerAddress string) (string, error)
Upload method can be used to upload a generic payload to IPFS. NftLabs provides a default proxy in the SDK. You can override this with the ISdk.SetStorage
func (*IpfsStorage) UploadBatch ¶
func (gw *IpfsStorage) UploadBatch(data []interface{}, contractAddress string, signerAddress string) ([]string, error)
UploadBatch uploads a list of arbitrary objects and returns their URIs *in the order they were passed*
type Listing ¶
type Listing struct {
Id *big.Int `json:"id"`
Seller common.Address `json:"seller"`
TokenContract common.Address `json:"tokenContract"`
TokenId *big.Int `json:"tokenId"`
TokenMetadata *NftMetadata `json:"tokenMetadata"`
Quantity *big.Int `json:"quantity"`
CurrentContract common.Address `json:"currentContract"`
CurrencyMetadata *CurrencyValue `json:"currencyMetadata"`
Price *big.Int `json:"price"`
SaleStart *time.Time `json:"saleStart"`
SaleEnd *time.Time `json:"saleEnd"`
}
type ListingFilter ¶
type Market ¶
type Market interface {
GetListing(listingId *big.Int) (Listing, error)
GetAll(filter ListingFilter) ([]Listing, error)
List(args NewListingArgs) (Listing, error)
UnlistAll(listingId *big.Int) error
Unlist(listingId *big.Int, quantity *big.Int) error
Buy(listingId *big.Int, quantity *big.Int) error
GetMarketFeeBps() (*big.Int, error)
SetMarketFeeBps(fee *big.Int) error
}
type MarketModule ¶
type MarketModule struct {
Client *ethclient.Client
Address string
// contains filtered or unexported fields
}
func (*MarketModule) GetAll ¶
func (sdk *MarketModule) GetAll(filter ListingFilter) ([]Listing, error)
func (*MarketModule) GetListing ¶
func (sdk *MarketModule) GetListing(listingId *big.Int) (Listing, error)
func (*MarketModule) GetMarketFeeBps ¶
func (sdk *MarketModule) GetMarketFeeBps() (*big.Int, error)
func (*MarketModule) List ¶
func (sdk *MarketModule) List(args NewListingArgs) (Listing, error)
func (*MarketModule) SetMarketFeeBps ¶
func (sdk *MarketModule) SetMarketFeeBps(fee *big.Int) error
type Marketplace ¶
type MarketplaceModule ¶
type MarketplaceModule struct {
Client *ethclient.Client
Address string
// contains filtered or unexported fields
}
func (*MarketplaceModule) GetAll ¶
func (sdk *MarketplaceModule) GetAll(filter ListingFilter) ([]Listing, error)
func (*MarketplaceModule) GetListing ¶
func (sdk *MarketplaceModule) GetListing(listingId *big.Int) (Listing, error)
func (*MarketplaceModule) GetMarketFeeBps ¶
func (sdk *MarketplaceModule) GetMarketFeeBps() (*big.Int, error)
func (*MarketplaceModule) SetMarketFeeBps ¶
func (sdk *MarketplaceModule) SetMarketFeeBps(fee *big.Int) error
type Metadata ¶
type Metadata struct {
MetadataUri string
MetadataObject interface{}
}
func (*Metadata) MarshalJSON ¶
func (*Metadata) UnmarshalJSON ¶
type MintCollectionArgs ¶
type MintNftMetadata ¶
type NewListingArgs ¶
type NewListingArgs struct {
AssetContractAddress string `json:"assetContractAddress"`
TokenId *big.Int `json:"tokenId"`
CurrencyContractAddress string `json:"currencyContractAddress"`
Price *big.Int `json:"price"`
Quantity *big.Int `json:"quantity"`
SecondsUntilOpenStart *big.Int `json:"secondsUntilOpenStart"`
SecondsUntilOpenEnd *big.Int `json:"secondsUntilOpenEnd"`
TokensPerBuyer *big.Int `json:"tokensPerBuyer"`
}
type Nft ¶
type Nft interface {
Get(tokenId *big.Int) (NftMetadata, error)
GetAll() ([]NftMetadata, error)
GetOwned(address string) ([]NftMetadata, error)
Balance(tokenId *big.Int) (*big.Int, error)
BalanceOf(address string) (*big.Int, error)
Transfer(to string, tokenId *big.Int) error
TotalSupply() (*big.Int, error)
SetApproval(operator string, approved bool) error
Mint(metadata MintNftMetadata) (NftMetadata, error)
MintBatch(meta []MintNftMetadata) ([]NftMetadata, error)
MintBatchTo(to string, meta []MintNftMetadata) ([]NftMetadata, error)
Burn(tokenId *big.Int) error
TransferFrom(from string, to string, tokenId *big.Int) error
SetRoyaltyBps(amount *big.Int) error
SetRestrictedTransfer(restricted bool) error
MintTo(to string, meta MintNftMetadata) (NftMetadata, error)
// contains filtered or unexported methods
}
type NftCollection ¶
type NftCollection interface {
Balance(tokenId *big.Int) (*big.Int, error)
BalanceOf(address string, tokenId *big.Int) (*big.Int, error)
Burn(args NftCollectionBatchArgs) error
BurnBatch(args []NftCollectionBatchArgs) error
BurnBatchFrom(account string, args []NftCollectionBatchArgs) error
BurnFrom(account string, args NftCollectionBatchArgs) error
Create(metadata Metadata) (CollectionMetadata, error)
CreateAndMint(metadataWithSupply CreateCollectionArgs) (CollectionMetadata, error)
CreateAndMintBatch(metadataWithSupply []CreateCollectionArgs) ([]CollectionMetadata, error)
CreateBatch(metadata []Metadata) ([]CollectionMetadata, error)
CreateWithErc20(tokenContract string, tokenAmount *big.Int, args CreateCollectionArgs) error
CreateWithErc721(tokenContract string, tokenAmount *big.Int, args CreateCollectionArgs) error
Get(tokenId *big.Int) (CollectionMetadata, error)
GetAll() ([]CollectionMetadata, error)
IsApproved(address string, operator string) (bool, error)
Mint(args MintCollectionArgs) error
MintBatch(args []MintCollectionArgs) error
MintBatchTo(toAddress string, args []MintCollectionArgs) error
MintTo(toAddress string, args MintCollectionArgs) error
SetApproval(operator string, approved bool) error
SetRoyaltyBps(amount *big.Int) error
SetRestrictedTransfer(restricted bool) error
Transfer(to string, tokenId *big.Int, amount *big.Int) error
TransferBatchFrom(from string, to string, args []NftCollectionBatchArgs, amount *big.Int) error
TransferFrom(from string, to string, args NftCollectionBatchArgs) error
// contains filtered or unexported methods
}
type NftCollectionBatchArgs ¶
type NftCollectionModule ¶
type NftCollectionModule struct {
Client *ethclient.Client
Address string
// contains filtered or unexported fields
}
func (*NftCollectionModule) Burn ¶
func (sdk *NftCollectionModule) Burn(args NftCollectionBatchArgs) error
func (*NftCollectionModule) BurnBatch ¶
func (sdk *NftCollectionModule) BurnBatch(args []NftCollectionBatchArgs) error
func (*NftCollectionModule) BurnBatchFrom ¶
func (sdk *NftCollectionModule) BurnBatchFrom(account string, args []NftCollectionBatchArgs) error
func (*NftCollectionModule) BurnFrom ¶
func (sdk *NftCollectionModule) BurnFrom(account string, args NftCollectionBatchArgs) error
func (*NftCollectionModule) Create ¶
func (sdk *NftCollectionModule) Create(metadata Metadata) (CollectionMetadata, error)
func (*NftCollectionModule) CreateAndMint ¶
func (sdk *NftCollectionModule) CreateAndMint(metadataWithSupply CreateCollectionArgs) (CollectionMetadata, error)
func (*NftCollectionModule) CreateAndMintBatch ¶
func (sdk *NftCollectionModule) CreateAndMintBatch(metadataWithSupply []CreateCollectionArgs) ([]CollectionMetadata, error)
func (*NftCollectionModule) CreateBatch ¶
func (sdk *NftCollectionModule) CreateBatch(metadata []Metadata) ([]CollectionMetadata, error)
func (*NftCollectionModule) CreateWithErc20 ¶
func (sdk *NftCollectionModule) CreateWithErc20(tokenContract string, tokenAmount *big.Int, args CreateCollectionArgs) error
func (*NftCollectionModule) CreateWithErc721 ¶
func (sdk *NftCollectionModule) CreateWithErc721(tokenContract string, tokenAmount *big.Int, args CreateCollectionArgs) error
func (*NftCollectionModule) Get ¶
func (sdk *NftCollectionModule) Get(tokenId *big.Int) (CollectionMetadata, error)
func (*NftCollectionModule) GetAll ¶
func (sdk *NftCollectionModule) GetAll() ([]CollectionMetadata, error)
func (*NftCollectionModule) GetAsync ¶
func (sdk *NftCollectionModule) GetAsync(tokenId *big.Int, ch chan<- CollectionMetadata, wg *sync.WaitGroup)
func (*NftCollectionModule) IsApproved ¶
func (sdk *NftCollectionModule) IsApproved(address string, operator string) (bool, error)
func (*NftCollectionModule) Mint ¶
func (sdk *NftCollectionModule) Mint(args MintCollectionArgs) error
func (*NftCollectionModule) MintBatch ¶
func (sdk *NftCollectionModule) MintBatch(args []MintCollectionArgs) error
func (*NftCollectionModule) MintBatchTo ¶
func (sdk *NftCollectionModule) MintBatchTo(toAddress string, args []MintCollectionArgs) error
func (*NftCollectionModule) MintTo ¶
func (sdk *NftCollectionModule) MintTo(toAddress string, args MintCollectionArgs) error
func (*NftCollectionModule) RevokeRole ¶
func (*NftCollectionModule) SetApproval ¶
func (sdk *NftCollectionModule) SetApproval(operator string, approved bool) error
func (*NftCollectionModule) SetApproved ¶
func (sdk *NftCollectionModule) SetApproved(operator string, approved bool) error
func (*NftCollectionModule) SetRestrictedTransfer ¶
func (sdk *NftCollectionModule) SetRestrictedTransfer(restricted bool) error
SetRestrictedTransfer will disable all transfers if set to true
func (*NftCollectionModule) SetRoyaltyBps ¶
func (sdk *NftCollectionModule) SetRoyaltyBps(amount *big.Int) error
func (*NftCollectionModule) TransferBatchFrom ¶
func (sdk *NftCollectionModule) TransferBatchFrom(from string, to string, args []NftCollectionBatchArgs, amount *big.Int) error
func (*NftCollectionModule) TransferFrom ¶
func (sdk *NftCollectionModule) TransferFrom(from string, to string, args NftCollectionBatchArgs) error
type NftMetadata ¶
type NftModule ¶
type NftModule struct {
Client *ethclient.Client
Address string
Options *SdkOptions
// contains filtered or unexported fields
}
func (*NftModule) GetAll ¶
func (sdk *NftModule) GetAll() ([]NftMetadata, error)
func (*NftModule) Mint ¶
func (sdk *NftModule) Mint(metadata MintNftMetadata) (NftMetadata, error)
func (*NftModule) MintBatch ¶
func (sdk *NftModule) MintBatch(meta []MintNftMetadata) ([]NftMetadata, error)
func (*NftModule) MintBatchTo ¶
func (sdk *NftModule) MintBatchTo(to string, meta []MintNftMetadata) ([]NftMetadata, error)
func (*NftModule) MintTo ¶
func (sdk *NftModule) MintTo(to string, metadata MintNftMetadata) (NftMetadata, error)
func (*NftModule) RevokeRole ¶
func (*NftModule) SetApproval ¶
func (*NftModule) SetRestrictedTransfer ¶
SetRestrictedTransfer will disable all transfers if set to true
type NoAddressError ¶
type NoAddressError struct {
// contains filtered or unexported fields
}
func (*NoAddressError) Error ¶
func (m *NoAddressError) Error() string
type NoSignerError ¶
type NoSignerError struct {
Err error
// contains filtered or unexported fields
}
func (*NoSignerError) Error ¶
func (m *NoSignerError) Error() string
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
func (*NotFoundError) Error ¶
func (m *NotFoundError) Error() string
type Pack ¶
type Pack interface {
Open(packId *big.Int) (PackNft, error)
Get(tokenId *big.Int) (PackMetadata, error)
GetAll() ([]PackMetadata, error)
GetNfts(packId *big.Int) ([]PackNft, error)
Balance(tokenId *big.Int) (*big.Int, error)
BalanceOf(address string, tokenId *big.Int) (*big.Int, error)
Transfer(to string, tokenId *big.Int, quantity *big.Int) error
Create(args CreatePackArgs) (PackMetadata, error)
SetRestrictedTransfer(restricted bool) error
}
type PackMetadata ¶
type PackModule ¶
type PackModule struct {
Client *ethclient.Client
Address string
// contains filtered or unexported fields
}
func (*PackModule) Create ¶
func (sdk *PackModule) Create(args CreatePackArgs) (PackMetadata, error)
Still a WIP, do not use
func (*PackModule) Get ¶
func (sdk *PackModule) Get(packId *big.Int) (PackMetadata, error)
func (*PackModule) GetAll ¶
func (sdk *PackModule) GetAll() ([]PackMetadata, error)
func (*PackModule) GetAsync ¶
func (sdk *PackModule) GetAsync(tokenId *big.Int, ch chan<- PackMetadata, wg *sync.WaitGroup)
func (*PackModule) Open ¶
func (sdk *PackModule) Open(packId *big.Int) (PackNft, error)
Work in progress, do not use
func (*PackModule) SetRestrictedTransfer ¶
func (sdk *PackModule) SetRestrictedTransfer(restricted bool) error
SetRestrictedTransfer will disable all transfers if set to true
type PackNft ¶
type PackNft struct {
NftMetadata
Supply *big.Int
}
type Sdk ¶
type Sdk struct {
// contains filtered or unexported fields
}
func (*Sdk) GetMarketplaceModule ¶
func (sdk *Sdk) GetMarketplaceModule(address string) (Marketplace, error)
func (*Sdk) GetNftCollectionModule ¶
func (sdk *Sdk) GetNftCollectionModule(address string) (NftCollection, error)
func (*Sdk) GetStorage ¶
func (*Sdk) SetStorage ¶
type SdkOptions ¶
type SigningMethod ¶
type SigningMethod = func(common.Address, *types.Transaction) (*types.Transaction, error)
type UnmarshalError ¶
type UnmarshalError struct {
UnderlyingError error
// contains filtered or unexported fields
}
func (*UnmarshalError) Error ¶
func (m *UnmarshalError) Error() string
type UnsupportedFunctionError ¶
type UnsupportedFunctionError struct {
// contains filtered or unexported fields
}
func (*UnsupportedFunctionError) Error ¶
func (m *UnsupportedFunctionError) Error() string
Source Files
¶
- collection.go
- collection_metadata.go
- configuration.go
- currency.go
- currency_metadata.go
- erc1155.go
- erc165.go
- erc20.go
- erc721.go
- errors.go
- ipfs.go
- ipfs_gateway.go
- market.go
- market_metadata.go
- marketplace.go
- metadata.go
- module.go
- nft.go
- nft_metadata.go
- options.go
- pack.go
- pack_metadata.go
- role.go
- sdk.go
- storage.go
- tx.go
- wallet.go
Click to show internal directories.
Click to hide internal directories.