Skip to main content

QueryWithPermit

Enum QueryWithPermit 

Source
pub enum QueryWithPermit {
Show 15 variants RoyaltyInfo { token_id: Option<String>, }, PrivateMetadata { token_id: String, }, NftDossier { token_id: String, include_expired: Option<bool>, }, BatchNftDossier { token_ids: Vec<String>, include_expired: Option<bool>, }, OwnerOf { token_id: String, include_expired: Option<bool>, }, AllNftInfo { token_id: String, include_expired: Option<bool>, }, InventoryApprovals { include_expired: Option<bool>, }, VerifyTransferApproval { token_ids: Vec<String>, }, TransactionHistory { page: Option<u32>, page_size: Option<u32>, }, NumTokens {}, AllTokens { start_after: Option<String>, limit: Option<u32>, }, TokenApprovals { token_id: String, include_expired: Option<bool>, }, ApprovedForAll { include_expired: Option<bool>, }, Tokens { owner: HumanAddr, start_after: Option<String>, limit: Option<u32>, }, NumTokensOfOwner { owner: HumanAddr, },
}
Expand description

queries using permits instead of viewing keys

Variants§

§

RoyaltyInfo

display the royalty information of a token if a token ID is specified, or display the contract’s default royalty information in no token ID is provided

Fields

§token_id: Option<String>

optional ID of the token whose royalty information should be displayed. If not provided, display the contract’s default royalty information

§

PrivateMetadata

displays the private metadata if permitted to view it

Fields

§token_id: String
§

NftDossier

displays all the information about a token that the viewer has permission to see. This may include the owner, the public metadata, the private metadata, royalty information, mint run information, whether the token is unwrapped, whether the token is transferable, and the token and inventory approvals

Fields

§token_id: String
§include_expired: Option<bool>

optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response

§

BatchNftDossier

displays all the information about multiple tokens that the viewer has permission to see. This may include the owner, the public metadata, the private metadata, royalty information, mint run information, whether the token is unwrapped, whether the token is transferable, and the token and inventory approvals

Fields

§token_ids: Vec<String>
§include_expired: Option<bool>

optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response

§

OwnerOf

display the owner of the specified token if authorized to view it. If the requester is also the token’s owner, the response will also include a list of any addresses that can transfer this token. The transfer approval list is for CW721 compliance, but the NftDossier query will be more complete by showing viewing approvals as well

Fields

§token_id: String
§include_expired: Option<bool>

optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response

§

AllNftInfo

displays all the information contained in the OwnerOf and NftInfo queries

Fields

§token_id: String
§include_expired: Option<bool>

optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response

§

InventoryApprovals

list all the inventory-wide approvals in place for the permit creator

Fields

§include_expired: Option<bool>

optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response

§

VerifyTransferApproval

verify that the permit creator has approval to transfer every listed token.
A token will count as unapproved if it is non-transferable

Fields

§token_ids: Vec<String>

list of tokens to verify approval for

§

TransactionHistory

display the transaction history for the permit creator in reverse chronological order

Fields

§page: Option<u32>

optional page to display

§page_size: Option<u32>

optional number of transactions per page

§

NumTokens

display the number of tokens controlled by the contract. The token supply must either be public, or the querier must be an authenticated minter

§

AllTokens

display an optionally paginated list of all the tokens controlled by the contract. The token supply must either be public, or the querier must be an authenticated minter

Fields

§start_after: Option<String>

paginate by providing the last token_id received in the previous query

§limit: Option<u32>

optional number of token ids to display

§

TokenApprovals

list all the approvals in place for a specified token if given the owner’s permit

Fields

§token_id: String
§include_expired: Option<bool>

optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response

§

ApprovedForAll

displays a list of all the CW721-style operators (any address that was granted approval to transfer all of the owner’s tokens). This query is provided to maintain CW721 compliance

Fields

§include_expired: Option<bool>

optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response

§

Tokens

displays a list of all the tokens belonging to the input owner in which the permit creator has view_owner permission

Fields

§start_after: Option<String>

paginate by providing the last token_id received in the previous query

§limit: Option<u32>

optional number of token ids to display

§

NumTokensOfOwner

displays the number of tokens that the querier has permission to see the owner and that belong to the specified address

Fields

Trait Implementations§

Source§

impl Clone for QueryWithPermit

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for QueryWithPermit

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for QueryWithPermit

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for QueryWithPermit

Source§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
Source§

fn json_schema(gen: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for QueryWithPermit

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for QueryWithPermit

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for QueryWithPermit

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Permissions for T
where T: Clone + PartialEq + Serialize + for<'d> Deserialize<'d> + JsonSchema,

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V