class Pack
class Pack
: public Thirdweb.Routable
Interact with a Pack contract.
Summary
Members | Type | Descriptions |
---|---|---|
chain | variable | |
address | variable | |
Pack | function | Interact with a Marketplace contract. |
Get | function | READ FUNCTIONS. |
GetAll | function | Get a all NFTs in this contract |
GetOwned | function | Get a all NFTs owned by the connected wallet |
Balance | function | Get the balance of the given NFT for the connected wallet |
BalanceOf | function | Get the balance of the given NFT for the given wallet address |
IsApprovedForAll | function | Check whether the given contract address has been approved to transfer NFTs on behalf of the given wallet address |
TotalCount | function | |
TotalSupply | function | Get the total suppply in circulation for thge given NFT |
GetPackContents | function | Get all the possible contents of a given pack |
SetApprovalForAll | function | WRITE FUNCTIONS. |
Transfer | function | Transfer NFTs to the given address |
Create | function | Create a new Pack with all the possible rewards (requires approval to transfer tokens/NFTs defined as rewards) |
CreateTo | function | Create a new Pack with all the possible rewards and mints it to the given address (requires approval to transfer tokens/NFTs defined as rewards) |
AddPackContents | function | Add new contents to an existing pack |
Open | function | Open a pack and transfer the rewards to the connected wallet |
Members
public string
chain
public string
address
public inline
Pack
(string chain,string address)
Interact with a Marketplace contract.
public inline async Task<
NFT
>
Get
(string tokenId)
READ FUNCTIONS.
Get a NFT in this contract by its ID
public inline async Task< List<
NFT
> >
GetAll
(
QueryAllParams
queryParams)
Get a all NFTs in this contract
public inline async Task< List<
NFT
> >
GetOwned
(string address)
Get a all NFTs owned by the connected wallet
Parameters
address
Optional wallet address to query NFTs of
public inline async Task< string >
Balance
(string tokenId)
Get the balance of the given NFT for the connected wallet
public inline async Task< string >
BalanceOf
(string address,string tokenId)
Get the balance of the given NFT for the given wallet address
public inline async Task< string >
IsApprovedForAll
(string address,string approvedContract)
Check whether the given contract address has been approved to transfer NFTs on behalf of the given wallet address
Parameters
address
The wallet addresscontractAddress
The contract address to check approval for
public inline async Task< int >
TotalCount
()
public inline async Task< int >
TotalSupply
(string tokenId)
Get the total suppply in circulation for thge given NFT
public inline async Task<
PackContents
>
GetPackContents
(string packId)
Get all the possible contents of a given pack
public inline async Task<
TransactionResult
>
SetApprovalForAll
(string contractToApprove,bool approved)
WRITE FUNCTIONS.
Set approval to the given contract to transfer NFTs on behalf of the connected wallet
public inline async Task<
TransactionResult
>
Transfer
(string to,string tokenId,int amount)
Transfer NFTs to the given address
public inline async Task<
TransactionResult
>
Create
(
NewPackInput
pack)
Create a new Pack with all the possible rewards (requires approval to transfer tokens/NFTs defined as rewards)
public inline async Task<
TransactionResult
>
CreateTo
(string receiverAddress,
NewPackInput
pack)
Create a new Pack with all the possible rewards and mints it to the given address (requires approval to transfer tokens/NFTs defined as rewards)
public inline async Task<
TransactionResult
>
AddPackContents
(string packId,
PackRewards
newContents)
Add new contents to an existing pack
public inline async Task<
PackRewards
>
Open
(string packId,string amount)
Open a pack and transfer the rewards to the connected wallet