Skip to content

deployNFT Internal Action

Nilson Lazarin edited this page Sep 11, 2024 · 1 revision
Internal Actions Wiki

.velluscinum.deployNFT

Registers an asset and returns a belief like: b(A);

DESCRIPTION

.velluscinum.deployNFT(S,P,Q,I,M,b);
Parameters Description
b It's a belief that represents the result of an operation in DLT.
I It's a key-value array that represents the immutable data of an asset.
M It's a key-value array representing asset or transaction metadata.
P It's a literal that represents the agent's private key.
Q It's a literal that represents the agent's public key.
S It's a literal that represents the address of a DLT node.

EXAMPLE

/* Initial beliefs and rules */
bigChainDB("http://testchain.chon.group:9984/").
immutableInformation("myname:bobAgent;description:NFT as a promisse").
mutableInformation("othersInfo:I promise to execute whatever is promised in this digital asset").

/* Initial goals */
!start.

/* Plans */
+!start <- 
	.velluscinum.buildWallet(myWallet);
	.wait(myWallet(PrivK,PublK));
	?bigChainDB(Server);
	?immutableInformation(Immutable);
	?mutableInformation(Mutable);
	.velluscinum.deployNFT(Server,PrivK,PublK,Immutable,Mutable,nft);
	.wait(nft(ID));
	.print("NFT registred at: ",S,"api/v1/transactions/",ID);
.