Skip to content

deployToken Internal Action

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

.velluscinum.deployToken

Registers n units of an asset and returns a belief like: b(C);

DESCRIPTION

.velluscinum.deployToken(S,P,Q,I,V,b);
Parameters Description
b It's a belief that represents the result of an operation in DLT.
C It's a literal that represents a divisible asset;
I It's a key-value array that represents the immutable data of an asset.
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.
V It's a integer that represents the number of parts of a C

EXAMPLE

/* Initial beliefs and rules */
bigChainDB("http://testchain.chon.group:9984/").
cryptocurrencyInfo("name:Bob Coin;type:Cryptocurrency").

/* Initial goals */
!buildToken.

/* Plans */
+!buildToken <- 
	.velluscinum.buildWallet(myWallet);
	.wait(myWallet(P,Q));
	?bigChainDB(S);
	?cryptocurrencyInfo(I);
	.velluscinum.deployToken(S,P,Q,I,1000,myCoin);
	.wait(myCoin(TokenID));
	.print("Token registred at: ",S,"api/v1/transactions/",TokenID);
.