SecretNET.NFT Namespace

Snip721Querier..::..GetPrivateMetadata Method

PrivateMetadata returns the private metadata of a token if the querier is permitted to view it. It follows CW-721 metadata specification, which is based on ERC-721 Metadata JSON Schema. At most, one of the fields token_uri OR extension will be defined. If the metadata is sealed, no one is permitted to view it until it has been unwrapped with Reveal. If no viewer is provided, PrivateMetadata will only display the private metadata if the private metadata is public for this token.

Namespace:  SecretNET.NFT
Assembly:  SecretNET.NFT (in SecretNET.NFT.dll)

Syntax


public Task<SecretQueryContractResult<GetPrivateMetadataResponse>> GetPrivateMetadata(
	string contractAddress,
	string tokenId,
	ViewerInfo viewerInfo,
	Nullable<Permit> permit,
	Nullable<string> codeHash
)
Public Function GetPrivateMetadata ( _
	contractAddress As String, _
	tokenId As String, _
	viewerInfo As ViewerInfo, _
	permit As Nullable(Of Permit), _
	codeHash As Nullable(Of String) _
) As Task(Of SecretQueryContractResult(Of GetPrivateMetadataResponse))
public:
Task<SecretQueryContractResult<GetPrivateMetadataResponse^>^>^ GetPrivateMetadata(
	String^ contractAddress, 
	String^ tokenId, 
	ViewerInfo^ viewerInfo, 
	Nullable<Permit^> permit, 
	Nullable<String^> codeHash
)

Parameters

contractAddress
Type: String
The contract address.
tokenId
Type: String
ID of the token being queried.
viewerInfo
Type: SecretNET.NFT..::..ViewerInfo
The address and viewing key performing this query.
permit
Type: Nullable<(Of <(<'Permit>)>)>
Authenticate with permit.
codeHash
Type: Nullable<(Of <(<'String>)>)>
CodeHash is (not really) optional and makes a call way faster.

Return Value

SecretQueryContractResult<GetPrivateMetadataResponse>.