Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Near Protocol + NFT-Kit Integration Diagramm
The NFT Kit is designed to make the process of creating, managing and transferring NFTs easy and accessible to anyone.
Our NFT kit implements the NEP-171 standard for NFTs on the NEAR Protocol that provides the core functionalities of creating, transferring and managing ownership of unique digital assets .
Creation | Management Controller
One of the main ways we integrate the Near Protocol ecosystem is through the use of the NEAR JavaScript API. This API allows us to interact with the NEAR blockchain and perform a variety of operations such as deploying contracts and minting NFTs. By using the NEAR JavaScript API, we are able to easily and securely interact with the Near Protocol and perform the necessary actions to create and manage NFTs.
Querying NFT information controller
Another way we integrate the Near Protocol ecosystem is through the use of the Near Java API. This is a library that allows for interaction with the NEAR Protocol through the use of the RPC API. This means that we are able to query information from the NEAR blockchain and retrieve data such as NFTs metadata. By using the Near Java API, we are able to easily access the data stored on the Near Protocol and use it within our NFT Kit.
All of these functionalities are exposed through a Rest API in our NFT Kit.
The NEAR protocol is a sharded, proof-of-stake, layer-one blockchain that is simple to use, secure and scalable.
NEAR Protocol is a public Proof-of-Stake (PoS) blockchain that aims to bring DeFi to the masses with low transfer fees and fast transactions. NEAR competes with Avalanche, Solana, Cardano, Algorand, the new version of Ethereum, and other PoS networks.
Depending on your preference, start exploring with the deep dive or a tutorial.
Deep dive
Architecture - See how Near was integrated into the NFT-Kit
NFT | Minting - How to deploy Smart Contracts and mint NFTs
NFT | Ownership - How to verify NFT ownership within a collection and traits
NFT | Wallet - View NFTs via a Web-Wallet
Tutorials
Mint an NFT - Learn how to mint an NFT on Near using the REST interface
Verify NFT Ownership - Learn how to verify NFT ownership on Near using the REST interface
📎 Create a Sub-account
📎 Deploy NFT Contract
🖼️ NFT | Minting
To acquire information from the Near Blockchain, we have incorporated the near-java-api
into our NFTKit. This allows us to effectively interact with the rpc-api
, providing us with the ability to retrieve and process data from the blockchain in a efficient and streamlined manner.
Smart contracts are simple programs that live in a NEAR network. As any modern application, smart contracts store data and expose methods to interact with them.
NEP-171 is the standard for creating and managing NFTs on the NEAR blockchain. It specifies the data structure and smart contract interface for NFTs, allowing developers to create and manage NFTs in a consistent and interoperable way.
The NEAR Pathway utilizes AssemblyScript as the primary programming language for its smart contracts, which are then compiled to WebAssembly (WASM) for execution on the blockchain.
However, NEAR also supports the use of Rust, a language that is particularly well-suited for server applications and has gained popularity for its built-in safety checks and testing infrastructure.
The NEAR team highly recommends the use of Rust for any smart contracts of a financial nature.
which is a framework of how Dapps work
The NEAR Protocol provides a JavaScript API, known as near-api-js, that allows developers to interact with the Smart Contract and perform various operations related to Non-Fungible Tokens (NFTs).
near-api-js
is a complete library to interact with the NEAR blockchain. You can use it in the browser, or in Node.js runtime.
Using near-api-js
, developers can deploy smart contracts , mint new NFTs and transfer ownership of NFTs.
In the NFT kit we are using near-api-js to do interactions with the Near Protocol Blockchain
When developing it's a best practice to create a subaccount and deploy the contract to it. This function allows the subaccount creation and transfering Near token from the main account to use them for gas fees and storage.
Every NFT smart contract should be initialized , here we can deploy it with walt.id default metadata.
For more flexibility we offer a custom metadata initialization to the deployed smart contract.
Finally we mint the non-fungible token with the custom metadata .
In NEAR, users can register named accounts (e.g. bob.near) which are simpler to use and remember.
Named accounts can create sub-accounts of themselves, helping to better organize related-accounts. In this way, named accounts work as domains, particularly:
Only can create short top-level accounts (e.g. near
, aurora
).
Anyone can create long top-level accounts, e.g. verylongaccountnamethatis32chars
.
near
can create bob.near
, and bob.near
can create app.bob.near
.
near
cannot create app.bob.near
, and test.near
cannot create sub.example.near
.
Smart contract is responsible for NFTs ownership as it keeps a record of minted NFT per owner
With this API , you can verify the ownership of All The NFTs for a given account.
On Near Protocol , NFTs are not stored in the user's wallet, instead, each NFT lives in a NFT contract. The NFT contract works as a bookkeeper, this is: it is in charge of handling the creation, storage and transfers of NFTs.
In order for a contract to be considered a NFT-contract it has to follow the . The NEP-171 & NEP-177 standards explain the minimum interface required to be implemented, as well as the expected functionality.
Swagger Doc | ReDoc
Path parameters:
chain
: [string] chain to work with. Either testnet
or mainnet
.
account_id
:[string] your account.
Body Details:
Body parameters:
spec
: a string that MUST be formatted nft-n.n.n
where "n.n.n" is replaced with the implemented version of this Metadata spec.
name
: the human-readable name of the contract.
symbol
: the abbreviated symbol of the contract.
base_uri
: Centralized gateway known to have reliable access to decentralized storage assets referenced by reference
or media
URLs. Can be used by other frontends for initial retrieval of assets, even if these frontends then replicate the data to their own decentralized nodes, which they are encouraged to do.
Minting an NFT on a blockchain allows the creator to prove ownership and authenticity of the digital asset
Swagger Doc | ReDoc
Path parameters:
chain
:[string] chain to work with. Either testnet
or mainnet
.
contract_id
:[string] smart contract account .
Body parameters:
account_id
: Your account id.
token_id
: The token ID , must be unique.
title
: The name of this specific token.
description
: A longer description of the token.
media
: URL to associated media. Preferably to decentralized, content-addressed storage.
media_hash
: The base64-encoded sha256 hash of content referenced by the media
field. This is to guard against off-chain tampering.
reference
: URL to an off-chain JSON file with more info.
reference_hash
: Base64-encoded sha256 hash of JSON from reference field. Required if reference
is included.
receiver_id
: The account that's receiving the token.
Example:
icon
: a small image associated with this contract. Encouraged to be a .
Smart contract is responsible for NFTs ownership as it keeps a record of minted NFT per owner .
With this API , you can verify the ownership of a specific NFT by its unique Token_id
.
We will learn how to use this NFT-kit to mint our first NFT on Near Protocol
NFTs (Non-Fungible Tokens) are a type of digital asset that are stored on a blockchain network and represent unique items or pieces of content. NFTs are typically used to represent things like artwork, music, videos, or other types of creative works, as they allow creators to verify and authenticate the ownership and provenance of their creations.
On the Near Protocol, NFTs are created and managed through smart contracts that are stored on the blockchain. These contracts define the rules and logic for how the NFTs are created, transferred, and managed.
To create an NFT on the Near Protocol, you would first need to create a smart contract that defines the NFT's properties and behaviors. This contract would typically include things like the NFT's name, description, image, and any other relevant metadata.
Once the NFT contract is deployed to the blockchain, you can then use it to mint new NFTs. To mint an NFT, you would typically need to provide some sort of payment, such as Near tokens, in exchange for the new NFT.
Once the NFT is minted, it can be transferred and traded just like any other asset on the blockchain. The unique properties of NFTs, such as their provenance and authenticity, make them particularly valuable for creators and collectors of digital content.
Using our , you can fetch and list your NFTs on Near Protocol blockchain.
Step1: Click on "Connect with web3" button.
Step 2: Click on "Near"
Step 3: Choose your wallet.
Step 4: Choose an account.
Step 5 : You will have the list of NFTs on the selected Network.
Step 6 : Click on "View" to see more details.
We will need a Near wallet in order to mint our NFT , creating a wallet is very easy! Here are a few easy steps to get you started
Click on “Get Started”
To protect your account, you’ll have to select an option to secure your NEAR wallet.
Choose from the three security methods mentioned to start your wallet initialization — Secure Passphrase / Ledger Hardware Wallet / Email
Minting NFTs
Ownership verification
Wallet integration
Before we can start with configuring our NFT collection, we need to clone and run the NFT-Kits REST API on our machine.
Make sure you have a JDK 16 build environment including Gradle installed on your machine
Make sure you have a Node.js and the npm installed on your machine.
Clone the project
2. Change the folder
3. Put the configuration needed by the file under the path: js/.env
of the project
4. Run the following command:
4. Run the following command:
5. Open new terminal under the path: waltid-nftkit
6. Make the rest of the configuration
7. Build the project
8. Run the executable
In build/distributions/
you have two archives, a .tar, and a .zip.
Extract the one that is built for your system and run it.
Now we can visit the REST API at the endpoint displayed in the terminal after running the project. In the next section, we will be configuring our NFT collection and deploy the Smart Contract on Near Protocol blockchain
Now, you're able to mint your first NFT. We will use the deployed smart contract in the previous section to mint a new NFT. We also need to provide the token id and the recipient account for the NFT.
Before we can mint an NFT, we need to define the collection, of which the NFT will be a part, via the deployment of a smart contract.
Before you mint a new NFT, you need to have an already deployed smart contract or deploy a new one. For this tutorial, we will deploy a new smart contract.
We will deploy the smart contract on the Near testnet. We need to provide the owner and the metadata of smart contract.
NFTs verification enables multiple use cases. The NFT Kit provides numerous approaches to verify the ownership of the NFTs and that the NFTs have customized properties.
1- You can verify that an account owns a particular NFT.
2- You can verify that an account owns an NFT in a specific collection.
3- You can also verify that an NFT metadata confirms a policy. The policy is implemented using the high-level declarative language called Rego. It is based on open policy agent(OPA).
You need to add new policy: