PollinationX
  • Welcome to PX
  • INTRODUCTION
    • Start Here
    • FAQ
    • Library
  • OVERVIEW
    • PX dApp
      • PX dApp User Guide
    • PX Storage NFTs
    • Supported Networks & Storages
    • Fees
  • DEVELOPER SECTION
    • PX Architecture
    • PX Processes
    • PX Nodes
    • PX API Reference
      • Auth
      • Upload
      • Download
    • PX SDK
      • Quick start
    • PX GitHub
Powered by GitBook
On this page
  • Authentication
  • Authenticate user
  • Auth URL:
  1. DEVELOPER SECTION
  2. PX API Reference

Auth

Auth authenticates the user and checks their PollinationX (PX) storage NFTs.

Authentication

Authenticate user

GET /auth/login

Query Parameters

Name
Type
Description

wallet*

String

The user's wallet address.

chain *

String

The chain identifier.

nonce*

String

A non-reusable value provided by the client to prevent replay attacks.

signature*

String

The signature generated by signing the request data using the user's private key.

{
    "success": true, //  Indicates whether the request was successful or not.
    "nfts":  // An array of NFT objects.
	[
        {
            "contract": {
                "address": Address of the NFT contract,
            },
            "id": {
                "tokenId": Unique identifier of the NFT,
                "tokenMetadata": {
                    "tokenType": Type of the token
                }
            },
            "balance": Balance of the NFT,
            "title": Name of the NFT,
            "description": Description of the NFT,
            "tokenUri": {
                "gateway": Gateway URL for accessing the token URI,
                "raw": Raw token URI
            },
            "media": [
                {
                    "gateway": Gateway URL for accessing the media file,
                    "thumbnail": URL of the thumbnail image associated with the media,
                    "raw": Base64 encoded SVG image data,
                    "format": "svg+xml",
                    "bytes": media size
                }
            ],
            "metadata": {
                "name":  Name of the NFT metadata,
                "description":  Description of the NFT metadata,
                "image": Base64 encoded SVG image data for the NFT metadata,
                "attributes": [
                    {
                        "display_type": "boost_percentage", // Display type of the attribute
                        "value": 3, // Value of the attribute define how much storage is already used
                        "trait_type": "Usage" // Trait type of the attribute.
                    },
                    {
                        "value": "5GB", // Maximum PX Storage NFT capacity
                        "trait_type": "Capacity"
                    }
                ]
            },
            "timeLastUpdated": Timestamp indicating the last update time,
            "contractMetadata": {
                "name": Name of the NFT contract metadata,
                "symbol": Symbol of the NFT contract metadata,
                "tokenType": Type of the token supported by the contract,
                "contractDeployer": Address of the contract deployer,,
                "deployedBlockNumber": Block number at which the contract was deployed,
                "openSea": {
                    "lastIngestedAt": Timestamp indicating the last ingestion time by OpenSea.
                }
            },
            "jwt": JWT (JSON Web Token) for authentication purposes,
            "endpoint": API endpoint for interacting with the PollinationX.
        },
     ],
    "totalCount": Total count of NFTs returned
}

{ error: Error message }

Tip: This endpoint allows you to authenticate a user and check their PollinationX (PX) storage NFTs without triggering a blockchain transaction or incurring any gas fees.

Auth URL:

The URL link defines which parameters must be sent. The user proves the storage ownership (i.e. PX sNFT) by signing with MetaMask. PX sNFTs are available for minting at the PX Dashboard.

PreviousPX API ReferenceNextUpload

Last updated 1 year ago

https://6cp0k0.pollinationx.io/auth/login6cp0k0.pollinationx.io