Documentation ¶
Index ¶
- 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 (sdk *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 (sdk *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 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 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) 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) 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 ¶
This section is empty.
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 ¶ added in v0.1.1
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) GrantRole ¶
func (sdk *CurrencyModule) GrantRole(role Role, address string) error
WIP, do not call yet, need to encode role
func (*CurrencyModule) MintTo ¶ added in v0.0.7
func (sdk *CurrencyModule) MintTo(to string, amount *big.Int) error
func (*CurrencyModule) RevokeRole ¶
func (sdk *CurrencyModule) RevokeRole(role Role, address string) error
WIP, do not call yet, need to encode role
func (*CurrencyModule) SetAllowance ¶
func (sdk *CurrencyModule) SetAllowance(spender string, amount *big.Int) error
func (*CurrencyModule) SetRestrictedTransfer ¶ added in v0.1.2
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 ISdk ¶
type ISdk interface { GetNftModule(address string) (Nft, error) GetMarketModule(address string) (Market, 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)
func (*IpfsStorage) UploadBatch ¶ added in v0.1.0
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)
TODO: change args to struct
func (*MarketModule) SetMarketFeeBps ¶
func (sdk *MarketModule) SetMarketFeeBps(fee *big.Int) error
type Metadata ¶ added in v0.1.0
type Metadata struct { MetadataUri string MetadataObject interface{} }
func (*Metadata) MarshalJSON ¶ added in v0.1.0
func (*Metadata) UnmarshalJSON ¶ added in v0.1.0
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) 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 ¶ added in v0.1.0
type NftCollectionModule ¶
type NftCollectionModule struct { Client *ethclient.Client Address string // contains filtered or unexported fields }
func (*NftCollectionModule) Burn ¶ added in v0.1.0
func (sdk *NftCollectionModule) Burn(args NftCollectionBatchArgs) error
func (*NftCollectionModule) BurnBatch ¶ added in v0.1.0
func (sdk *NftCollectionModule) BurnBatch(args []NftCollectionBatchArgs) error
func (*NftCollectionModule) BurnBatchFrom ¶ added in v0.1.0
func (sdk *NftCollectionModule) BurnBatchFrom(account string, args []NftCollectionBatchArgs) error
func (*NftCollectionModule) BurnFrom ¶ added in v0.1.0
func (sdk *NftCollectionModule) BurnFrom(account string, args NftCollectionBatchArgs) error
func (*NftCollectionModule) Create ¶
func (sdk *NftCollectionModule) Create(metadata Metadata) (CollectionMetadata, error)
func (*NftCollectionModule) CreateAndMint ¶ added in v0.1.0
func (sdk *NftCollectionModule) CreateAndMint(metadataWithSupply CreateCollectionArgs) (CollectionMetadata, error)
func (*NftCollectionModule) CreateAndMintBatch ¶ added in v0.1.0
func (sdk *NftCollectionModule) CreateAndMintBatch(metadataWithSupply []CreateCollectionArgs) ([]CollectionMetadata, error)
func (*NftCollectionModule) CreateBatch ¶ added in v0.1.0
func (sdk *NftCollectionModule) CreateBatch(metadata []Metadata) ([]CollectionMetadata, error)
func (*NftCollectionModule) CreateWithErc20 ¶ added in v0.1.0
func (sdk *NftCollectionModule) CreateWithErc20(tokenContract string, tokenAmount *big.Int, args CreateCollectionArgs) error
func (*NftCollectionModule) CreateWithErc721 ¶ added in v0.1.0
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 ¶ added in v0.1.0
func (sdk *NftCollectionModule) MintBatch(args []MintCollectionArgs) error
func (*NftCollectionModule) MintBatchTo ¶ added in v0.1.0
func (sdk *NftCollectionModule) MintBatchTo(toAddress string, args []MintCollectionArgs) error
func (*NftCollectionModule) MintTo ¶ added in v0.1.0
func (sdk *NftCollectionModule) MintTo(toAddress string, args MintCollectionArgs) error
func (*NftCollectionModule) RevokeRole ¶ added in v0.1.0
func (*NftCollectionModule) SetApproval ¶ added in v0.1.0
func (sdk *NftCollectionModule) SetApproval(operator string, approved bool) error
func (*NftCollectionModule) SetApproved ¶
func (sdk *NftCollectionModule) SetApproved(operator string, approved bool) error
func (*NftCollectionModule) SetRestrictedTransfer ¶ added in v0.1.2
func (sdk *NftCollectionModule) SetRestrictedTransfer(restricted bool) error
SetRestrictedTransfer will disable all transfers if set to true
func (*NftCollectionModule) SetRoyaltyBps ¶ added in v0.1.0
func (sdk *NftCollectionModule) SetRoyaltyBps(amount *big.Int) error
func (*NftCollectionModule) TransferBatchFrom ¶ added in v0.1.0
func (sdk *NftCollectionModule) TransferBatchFrom(from string, to string, args []NftCollectionBatchArgs, amount *big.Int) error
func (*NftCollectionModule) TransferFrom ¶ added in v0.1.0
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) MintTo ¶ added in v0.0.5
func (sdk *NftModule) MintTo(to string, metadata MintNftMetadata) (NftMetadata, error)
func (*NftModule) RevokeRole ¶
func (*NftModule) SetApproval ¶
func (*NftModule) SetRestrictedTransfer ¶ added in v0.1.2
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 ¶ added in v0.1.2
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 Role ¶
type Role string
const ( AdminRole Role = "PROTOCOL_ADMIN" MinterRole = "MINTER_ROLE" )
func RoleFromString ¶ added in v0.0.7
type Sdk ¶
type Sdk struct {
// contains filtered or unexported fields
}
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 {
// 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
- 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.