Choose smart way for developing
We always create and support actual ready-made examples. Just insert them into your code and use it working with Waves
Add library initialization to your app
package com.wavesplatform.examples;
import com.wavesplatform.transactions.account.PrivateKey;
import com.wavesplatform.transactions.IssueTransaction;
import com.wavesplatform.wavesj.Node;
import com.wavesplatform.wavesj.Profile;
import com.wavesplatform.wavesj.exceptions.NodeException;
import com.wavesplatform.wavesj.info.IssueTransactionInfo;
import java.io.IOException;
public class WavesExample {
public static void main(String[] args) throws NodeException, IOException {
// create a node instance
Node node = new Node(Profile.TESTNET);
// create private key from seed
PrivateKey privateKey = PrivateKey.fromSeed("seed phrase");
// create IssueTransaction
IssueTransaction tx = new IssueTransaction(
privateKey.publicKey(),
"asset",
"description",
1000,
2,
false,
null)
.addProof(privateKey);
// publish the transaction and wait for it to be included in the blockchain
node.waitForTransaction(node.broadcast(tx).id());
// get transaction info from node
IssueTransactionInfo txInfo = node.getTransactionInfo(tx.id(), IssueTransactionInfo.class);
// print all information
System.out.println("type:" + txInfo.tx().type());
System.out.println("id:" + txInfo.tx().id());
System.out.println("fee:" + txInfo.tx().fee().value());
System.out.println("feeAssetId:" + txInfo.tx().fee().assetId().encoded());
System.out.println("timestamp:" + txInfo.tx().timestamp());
System.out.println("version:" + txInfo.tx().version());
System.out.println("chainId:" + txInfo.tx().chainId());
System.out.println("sender:" + txInfo.tx().sender().address().encoded());
System.out.println("senderPublicKey:" + txInfo.tx().sender().encoded());
System.out.println("proofs:" + txInfo.tx().proofs());
System.out.println("assetId:" + txInfo.tx().assetId().encoded());
System.out.println("name:" + txInfo.tx().name());
System.out.println("quantity:" + txInfo.tx().quantity());
System.out.println("reissuable:" + txInfo.tx().reissuable());
System.out.println("decimals:" + txInfo.tx().decimals());
System.out.println("description:" + txInfo.tx().description());
System.out.println("script:" + txInfo.tx().script().encoded());
System.out.println("height:" + txInfo.height());
System.out.println("applicationStatus:" + txInfo.applicationStatus());
}
}
Add library initialization to your app
package com.wavesplatform.examples;
import com.wavesplatform.transactions.account.PrivateKey;
import com.wavesplatform.transactions.IssueTransaction;
import com.wavesplatform.wavesj.Node;
import com.wavesplatform.wavesj.Profile;
import com.wavesplatform.wavesj.exceptions.NodeException;
import com.wavesplatform.wavesj.info.IssueTransactionInfo;
import java.io.IOException;
public class WavesExample {
public static void main(String[] args) throws NodeException, IOException {
// create a node instance
Node node = new Node(Profile.TESTNET);
// create private key from seed
PrivateKey privateKey = PrivateKey.fromSeed("seed phrase");
// create IssueTransaction
IssueTransaction tx = new IssueTransaction(
privateKey.publicKey(),
"asset",
"description",
1000,
2,
false,
null)
.addProof(privateKey);
// publish the transaction and wait for it to be included in the blockchain
node.waitForTransaction(node.broadcast(tx).id());
// get transaction info from node
IssueTransactionInfo txInfo = node.getTransactionInfo(tx.id(), IssueTransactionInfo.class);
// print all information
System.out.println("type:" + txInfo.tx().type());
System.out.println("id:" + txInfo.tx().id());
System.out.println("fee:" + txInfo.tx().fee().value());
System.out.println("feeAssetId:" + txInfo.tx().fee().assetId().encoded());
System.out.println("timestamp:" + txInfo.tx().timestamp());
System.out.println("version:" + txInfo.tx().version());
System.out.println("chainId:" + txInfo.tx().chainId());
System.out.println("sender:" + txInfo.tx().sender().address().encoded());
System.out.println("senderPublicKey:" + txInfo.tx().sender().encoded());
System.out.println("proofs:" + txInfo.tx().proofs());
System.out.println("assetId:" + txInfo.tx().assetId().encoded());
System.out.println("name:" + txInfo.tx().name());
System.out.println("quantity:" + txInfo.tx().quantity());
System.out.println("reissuable:" + txInfo.tx().reissuable());
System.out.println("decimals:" + txInfo.tx().decimals());
System.out.println("description:" + txInfo.tx().description());
System.out.println("script:" + txInfo.tx().script().encoded());
System.out.println("height:" + txInfo.height());
System.out.println("applicationStatus:" + txInfo.applicationStatus());
}
}
Add library initialization to your app
package com.wavesplatform.examples;
import com.wavesplatform.transactions.account.PrivateKey;
import com.wavesplatform.transactions.IssueTransaction;
import com.wavesplatform.wavesj.Node;
import com.wavesplatform.wavesj.Profile;
import com.wavesplatform.wavesj.exceptions.NodeException;
import com.wavesplatform.wavesj.info.IssueTransactionInfo;
import java.io.IOException;
public class WavesExample {
public static void main(String[] args) throws NodeException, IOException {
// create a node instance
Node node = new Node(Profile.TESTNET);
// create private key from seed
PrivateKey privateKey = PrivateKey.fromSeed("seed phrase");
// create IssueTransaction
IssueTransaction tx = new IssueTransaction(
privateKey.publicKey(),
"asset",
"description",
1000,
2,
false,
null)
.addProof(privateKey);
// publish the transaction and wait for it to be included in the blockchain
node.waitForTransaction(node.broadcast(tx).id());
// get transaction info from node
IssueTransactionInfo txInfo = node.getTransactionInfo(tx.id(), IssueTransactionInfo.class);
// print all information
System.out.println("type:" + txInfo.tx().type());
System.out.println("id:" + txInfo.tx().id());
System.out.println("fee:" + txInfo.tx().fee().value());
System.out.println("feeAssetId:" + txInfo.tx().fee().assetId().encoded());
System.out.println("timestamp:" + txInfo.tx().timestamp());
System.out.println("version:" + txInfo.tx().version());
System.out.println("chainId:" + txInfo.tx().chainId());
System.out.println("sender:" + txInfo.tx().sender().address().encoded());
System.out.println("senderPublicKey:" + txInfo.tx().sender().encoded());
System.out.println("proofs:" + txInfo.tx().proofs());
System.out.println("assetId:" + txInfo.tx().assetId().encoded());
System.out.println("name:" + txInfo.tx().name());
System.out.println("quantity:" + txInfo.tx().quantity());
System.out.println("reissuable:" + txInfo.tx().reissuable());
System.out.println("decimals:" + txInfo.tx().decimals());
System.out.println("description:" + txInfo.tx().description());
System.out.println("script:" + txInfo.tx().script().encoded());
System.out.println("height:" + txInfo.height());
System.out.println("applicationStatus:" + txInfo.applicationStatus());
}
}
Add library initialization to your app
package com.wavesplatform.examples;
import com.wavesplatform.transactions.account.PrivateKey;
import com.wavesplatform.transactions.IssueTransaction;
import com.wavesplatform.wavesj.Node;
import com.wavesplatform.wavesj.Profile;
import com.wavesplatform.wavesj.exceptions.NodeException;
import com.wavesplatform.wavesj.info.IssueTransactionInfo;
import java.io.IOException;
public class WavesExample {
public static void main(String[] args) throws NodeException, IOException {
// create a node instance
Node node = new Node(Profile.TESTNET);
// create private key from seed
PrivateKey privateKey = PrivateKey.fromSeed("seed phrase");
// create IssueTransaction
IssueTransaction tx = new IssueTransaction(
privateKey.publicKey(),
"asset",
"description",
1000,
2,
false,
null)
.addProof(privateKey);
// publish the transaction and wait for it to be included in the blockchain
node.waitForTransaction(node.broadcast(tx).id());
// get transaction info from node
IssueTransactionInfo txInfo = node.getTransactionInfo(tx.id(), IssueTransactionInfo.class);
// print all information
System.out.println("type:" + txInfo.tx().type());
System.out.println("id:" + txInfo.tx().id());
System.out.println("fee:" + txInfo.tx().fee().value());
System.out.println("feeAssetId:" + txInfo.tx().fee().assetId().encoded());
System.out.println("timestamp:" + txInfo.tx().timestamp());
System.out.println("version:" + txInfo.tx().version());
System.out.println("chainId:" + txInfo.tx().chainId());
System.out.println("sender:" + txInfo.tx().sender().address().encoded());
System.out.println("senderPublicKey:" + txInfo.tx().sender().encoded());
System.out.println("proofs:" + txInfo.tx().proofs());
System.out.println("assetId:" + txInfo.tx().assetId().encoded());
System.out.println("name:" + txInfo.tx().name());
System.out.println("quantity:" + txInfo.tx().quantity());
System.out.println("reissuable:" + txInfo.tx().reissuable());
System.out.println("decimals:" + txInfo.tx().decimals());
System.out.println("description:" + txInfo.tx().description());
System.out.println("script:" + txInfo.tx().script().encoded());
System.out.println("height:" + txInfo.height());
System.out.println("applicationStatus:" + txInfo.applicationStatus());
}
}
Add library initialization to your app
package com.wavesplatform.examples;
import com.wavesplatform.transactions.account.PrivateKey;
import com.wavesplatform.transactions.IssueTransaction;
import com.wavesplatform.wavesj.Node;
import com.wavesplatform.wavesj.Profile;
import com.wavesplatform.wavesj.exceptions.NodeException;
import com.wavesplatform.wavesj.info.IssueTransactionInfo;
import java.io.IOException;
public class WavesExample {
public static void main(String[] args) throws NodeException, IOException {
// create a node instance
Node node = new Node(Profile.TESTNET);
// create private key from seed
PrivateKey privateKey = PrivateKey.fromSeed("seed phrase");
// create IssueTransaction
IssueTransaction tx = new IssueTransaction(
privateKey.publicKey(),
"asset",
"description",
1000,
2,
false,
null)
.addProof(privateKey);
// publish the transaction and wait for it to be included in the blockchain
node.waitForTransaction(node.broadcast(tx).id());
// get transaction info from node
IssueTransactionInfo txInfo = node.getTransactionInfo(tx.id(), IssueTransactionInfo.class);
// print all information
System.out.println("type:" + txInfo.tx().type());
System.out.println("id:" + txInfo.tx().id());
System.out.println("fee:" + txInfo.tx().fee().value());
System.out.println("feeAssetId:" + txInfo.tx().fee().assetId().encoded());
System.out.println("timestamp:" + txInfo.tx().timestamp());
System.out.println("version:" + txInfo.tx().version());
System.out.println("chainId:" + txInfo.tx().chainId());
System.out.println("sender:" + txInfo.tx().sender().address().encoded());
System.out.println("senderPublicKey:" + txInfo.tx().sender().encoded());
System.out.println("proofs:" + txInfo.tx().proofs());
System.out.println("assetId:" + txInfo.tx().assetId().encoded());
System.out.println("name:" + txInfo.tx().name());
System.out.println("quantity:" + txInfo.tx().quantity());
System.out.println("reissuable:" + txInfo.tx().reissuable());
System.out.println("decimals:" + txInfo.tx().decimals());
System.out.println("description:" + txInfo.tx().description());
System.out.println("script:" + txInfo.tx().script().encoded());
System.out.println("height:" + txInfo.height());
System.out.println("applicationStatus:" + txInfo.applicationStatus());
}
}
Add library initialization to your app
package com.wavesplatform.examples;
import com.wavesplatform.transactions.account.PrivateKey;
import com.wavesplatform.transactions.IssueTransaction;
import com.wavesplatform.wavesj.Node;
import com.wavesplatform.wavesj.Profile;
import com.wavesplatform.wavesj.exceptions.NodeException;
import com.wavesplatform.wavesj.info.IssueTransactionInfo;
import java.io.IOException;
public class WavesExample {
public static void main(String[] args) throws NodeException, IOException {
// create a node instance
Node node = new Node(Profile.TESTNET);
// create private key from seed
PrivateKey privateKey = PrivateKey.fromSeed("seed phrase");
// create IssueTransaction
IssueTransaction tx = new IssueTransaction(
privateKey.publicKey(),
"asset",
"description",
1000,
2,
false,
null)
.addProof(privateKey);
// publish the transaction and wait for it to be included in the blockchain
node.waitForTransaction(node.broadcast(tx).id());
// get transaction info from node
IssueTransactionInfo txInfo = node.getTransactionInfo(tx.id(), IssueTransactionInfo.class);
// print all information
System.out.println("type:" + txInfo.tx().type());
System.out.println("id:" + txInfo.tx().id());
System.out.println("fee:" + txInfo.tx().fee().value());
System.out.println("feeAssetId:" + txInfo.tx().fee().assetId().encoded());
System.out.println("timestamp:" + txInfo.tx().timestamp());
System.out.println("version:" + txInfo.tx().version());
System.out.println("chainId:" + txInfo.tx().chainId());
System.out.println("sender:" + txInfo.tx().sender().address().encoded());
System.out.println("senderPublicKey:" + txInfo.tx().sender().encoded());
System.out.println("proofs:" + txInfo.tx().proofs());
System.out.println("assetId:" + txInfo.tx().assetId().encoded());
System.out.println("name:" + txInfo.tx().name());
System.out.println("quantity:" + txInfo.tx().quantity());
System.out.println("reissuable:" + txInfo.tx().reissuable());
System.out.println("decimals:" + txInfo.tx().decimals());
System.out.println("description:" + txInfo.tx().description());
System.out.println("script:" + txInfo.tx().script().encoded());
System.out.println("height:" + txInfo.height());
System.out.println("applicationStatus:" + txInfo.applicationStatus());
}
}
Getting started with Waves blockchain is easy. Click on how to use and go to Waves Lessons where you can learn how to work with blockchain with examples in your programming language
Sections of documentation will allow you to dive quickly into developing
We are always happy to hear from you what can be improved in Waves ecosystem products