sdk

Categories:

Japanese version ๐Ÿ‘‰ here

Russian version ๐Ÿ‘‰ here

What is Node.js and NPM?

Node.js is an entire platform for building server-side applications using the JavaScript programming language. Node.js is based on a modular system that allows you to add individual packages to your application.

Node.js uses the Node Package Manager (npm) to manage dependencies. This allows you to download and install modules required for the project from third-party sources.

TL;DR

  1. What is the motivation NEMTUS created @nemtus/symbol-sdk-typescript?
    1. The motivation was to use the equivalent functionality of symbol-sdk v3 implemented in JS in a TypeScript environment, stress-free and without any special settings.
  2. How @nemtus/symbol-sdk-typescript was created from symbol-sdk v3, implemented for JavaScript, into TypeScript in the simplest way?
    1. It was created by building from original symbol-sdk v3 using the following link’s way.
      1. https://www.typescriptlang.org/docs/handbook/declaration-files/dts-from-js.html
    2. For more information, please refer to the following links to the SDK repository and the npm (Node Package Manager) package.
      1. https://github.com/nemtus/symbol/tree/dev/sdk/javascript
      2. https://www.npmjs.com/package/@nemtus/symbol-sdk-typescript
  3. How to send transactions on the Symbol blockchain using @nemtus/symbol-sdk-typescript
    1. Please refer to the source code in the link below.
      1. https://zenn.dev/nemtus/articles/nemtus-symbol-sdk-typescript#samplecode

Background

Symbol blockchain’s version 2 SDK for TypeScript/JavaScript has been deprecated, and the core development team is working on the development and maintenance of a version 3 SDK for JavaScript, which is easier to work with.

symbol-sdk v 2

symbol-sdk v2 is an SDK for JavaScript/TypeScript that made it very easy to develop with the Symbol blockchain using a rich feature set.

However, due to the differences in preferences regarding the rxjs used, the complexity of the rich functionality, and the organizational changes, the decision was made to create a new reference SDK that is more consistent with the core protocol. It has been officially announced that SDK v2 is deprecated.

symbol-sdk v 3

The new version of SDK 3 is written in JavaScript, so if you try to use it in a TypeScript environment, โ€œModule ‘***’ or corresponding type declaration not found.โ€ error will occur. In today’s front-end development environment, where the TypeScript programming language is very popular, the situation is not very good.

Therefore, in order to remedy this situation and try to somehow convert the SDK to a programming language in TypeScript, we have considered the following 3 methods:

  1. Fork the symbol-sdk v2 of the TypeScript SDK and continue to support (maintenance) independently of the NEMTUS developers and community developers.
  2. The Japanese organization NEMTUS and community developers will implement the TypeScript SDK and continue development and maintenance, referencing SDK version 3, for JavaScript.
  3. Fork version of SDK 3 for JavaScript used as is. Next, NEMTUS and  developers from the Symbol community will add or automatically generate the required TypeScript “.d.ts” files to simplify development and maintenance.

__________

Options that we rejected:

  1. The repositories for important dependency packages were not open to the public, and maintaining them seemed difficult to me.
  1. It is necessary to have a precise understanding of how NEM/Symbol blockchain transactions are to be binarized and processed as a โ€œDSLโ€ (Domain-Specific Language), so this is likely to take time and be a very complex factor.

We received advice from independent volunteer developers in the Symbol community and decided to go with method number 3, which is described earlier in this article.

Starting with the TypeScript programming language version 3.7 or later, you can create a “.d.ts” file (which describes the syntax and structure of functions and properties) from โ€œ.jsโ€ files. The JSDoc comments were relatively well written in the official SDK (Software Development Kit), so we were able to release an updated SDK that can be used to some extent in the TypeScript environment.

JSDoc comments are written to JavaScript source code and are used by authoring tools to provide developers with appropriate hints and additions, and to automatically generate documentation.

How to generate d.ts file from js file?

More details can be found in the following article:

https://www.typescriptlang.org/docs/handbook/declaration-files/dts-from-js.html

Example code for sending a transaction using @nemtus/symbol-sdk-typescript

Installation

  • Install Node.js (If you have, then skip this step).
  • Create an appropriate directory (symbol-sdk-typescript-sample-1 here as an example) and initialize.
<!-- wp:paragraph -->
<p>~/$ mkdir symbol-sdk-typescript-sample-1</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>~/$ cd symbol-sdk-typescript-sample-1</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>~/symbol-sdk-typescript-sample-1$ npm init -y</p>
<!-- /wp:paragraph -->

Install required packages

In this example, we will use the following packages to send transactions:

  • typescript, ts-node… The Typescript programming language is used to perform various actions, allowing (to more fully describe the properties and methods of objects and classes in Typescript), and ts-node is necessary for the convenience of performing these tasks.
  • Using the REST API, you can get information about the Symbol blockchain, as well as implement sending transactions and much more.@nemtus/symbol-sdk-openapi-generator-typescript-axios
  • The TypeScript Software Development Kit (SDK) created this time (handling account information, generating transaction data, signing, etc.). @nemtus/symbol-sdk-typescript
  • To use web sockets. Ws
  • To use the client’s REST API. Axios
  • To treat the private key as an environment variable and not write the private key to the source code. dotenv

You need to run the following command:


~/symbol-sdk-typescript-sample-1$ npm install -D typescript ts-node @types/ws

~/symbol-sdk-typescript-sample-1$ npm install @nemtus/symbol-sdk-typescript @nemtus/symbol-sdk-openapi-generator-typescript-axios axios ws dotenv

Create a tsconfig.json file

Run the following command to generate a tsconfig.json configuration file template for compiling TypeScript code.

~/symbol-sdk-typescript-sample-1$ npx tsc –init

Change “target”: “es2016” to “target”: “esnext” so you can use newer JavaScript writing style like ES modules and BigInt

BigInt allows developers to have much better integer representation and data processing for further work with this data, and ES adds an official unified module system to JavaScript.

Creating a test account and setting an environment variable

Download the official Symbol blockchain wallet, create a test account in the test network and receive test tokens in the Symbol Faucet ๐Ÿ‘‰

https://testnet.symbol.tools. Then save your private, public key, as well as your wallet address.

So let ‘s add the private key to the file .env as follows.

.env

SIGNER_1_PRIVATE_KEY =”PUT_YOUR_PRIVATE_KEY_HERE”

โš ๏ธ In the blockchain, the private key has the most and only power to do anything with your crypto account. The private key provides access to and control over your crypto account and should be kept secret. If your private key is compromised, you will lose all your assets and confidential information in your account. This time, we will create a one-time account on the Symbol testnet and try to use the private key as a simple environment variable using dotenv.

The dotenv module parses the “.env” file and makes the variables set in it available from environment variables.

Sample Code

Let’s create the following file and run it with npx ts-node send-transfer-transaction.ts

<!-- wp:paragraph -->
<p>send-transfer-tx.ts</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>import { SymbolFacade } from "@nemtus/symbol-sdk-typescript/esm/facade/SymbolFacade";</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>import { PrivateKey } from "@nemtus/symbol-sdk-typescript/esm/CryptoTypes";</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>import { KeyPair } from "@nemtus/symbol-sdk-typescript/esm/symbol/KeyPair";</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>import { Signature } from "@nemtus/symbol-sdk-typescript/esm/symbol/models";</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>import {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;Configuration,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;NetworkRoutesApi,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;TransactionGroupEnum,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;TransactionRoutesApi,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;TransactionStatusDTO,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;TransactionStatusRoutesApi,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>} from "@nemtus/symbol-sdk-openapi-generator-typescript-axios";</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>import WebSocket from "ws";</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>import "dotenv/config";</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>// Specify a node in the test net</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>const NODE_DOMAIN = "symbol-test.next-web-technology.com";</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>// Destination address ... This time we'll send it back to the Faucet address.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>const faucetAddressString = "TDMYLKCTEVPSRPTG4UXW47IQPCYNLW2OVWZMLGY";</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>(async () =&gt; {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;// Call NetworkRoutesApi.getNetworkProperties to get epochAdjustment, networkCurrencyMosaicId</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const configurationParameters = {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;basePath: `http://${NODE_DOMAIN}:3000`,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;};</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const configuration = new Configuration(configurationParameters);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const networkRoutesApi = new NetworkRoutesApi(configuration);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const networkPropertiesDTO = (await networkRoutesApi.getNetworkProperties())</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;.data;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;// The response value of epochAdjustment is a string with a trailing "s", so it is removed and converted to a number.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const epochAdjustmentOriginal = networkPropertiesDTO.network.epochAdjustment!;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const epochAdjustment = parseInt(epochAdjustmentOriginal.replace(/s/g, ""));</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;// The networkCurrencyMosaicId response value is a hex string that contains a ' in the middle, so it is removed and converted to a BigInt.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const networkCurrencyMosaicIdOriginal =</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;networkPropertiesDTO.chain.currencyMosaicId!;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const networkCurrencyMosaicId = BigInt(</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;networkCurrencyMosaicIdOriginal.replace(/'/g, "")</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;// Call NetworkRoutesApi.getNetworkType to obtain the name of the network such as testnet to be specified in the facade</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const networkTypeDTO = (await networkRoutesApi.getNetworkType()).data!;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const networkName = networkTypeDTO.name;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;// Initialize SDK by specifying network name</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const facade = new SymbolFacade(networkName);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;// Create account-related data to send transactions</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const signer1PrivateKeyString = process.env.SIGNER_1_PRIVATE_KEY!;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const signer1PrivateKey = new PrivateKey(signer1PrivateKeyString);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const signer1KeyPair = new KeyPair(signer1PrivateKey);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const signer1PublicKeyString = signer1KeyPair.publicKey.toString();</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const signer1AddressString = facade.network</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;.publicKeyToAddress(signer1KeyPair.publicKey)</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;.toString();</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;// Calculate DEADLINE (set at 2 hours, but can be changed, but if it is too far away, an error will occur)</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const now = Date.now();</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const deadline = BigInt(now - epochAdjustment * 1000 + 2 * 60 * 60 * 1000);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;// Transaction data generation ... (Example) 1XYM = 1000000ฮผXYM from SIGNER_1 to FAUCET</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const transaction = facade.transactionFactory.create({</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;type: "transfer_transaction",</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;signerPublicKey: signer1PublicKeyString,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;deadline,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;recipientAddress: faucetAddressString,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;mosaics: [{ mosaicId: networkCurrencyMosaicId, amount: 1000000n }],</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;});</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;// Fee settings ... Depends on the destination node's settings, but if the node's default setting is 100, I don't think there's basically anything missing.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const feeMultiplier = 100;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;(transaction as any).fee.value = BigInt(</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;(transaction as any).size * feeMultiplier</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;// signature</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const signature = facade.signTransaction(signer1KeyPair, transaction);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;(transaction as any).signature = new Signature(signature.bytes);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;// Set generationHashSeed specific to each network</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;(transaction as any).network.generationHashSeed = facade.network;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;// Calculating transaction hashes ... Necessary, for example, to check the authorization status of a transaction later via WebSocket.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const hash = facade.hashTransaction(transaction);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;console.log(hash.toString());</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;console.log(`https://testnet.symbol.fyi/transactions/${hash.toString()}`); // Display the relevant page in the block explorer for easy review during debugging.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;// Use this data when sending transactions.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const transactionPayload = (</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;facade.transactionFactory.constructor as any</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;).attachSignature(transaction, signature);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;// Setting for cases other than those regarded as definite at 1 confirmation</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const confirmationHeight = 6; // When 6conf is considered as confirmation</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;let transactionHeight = 0;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;let blockHeight = 0;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;let finalizedBlockHeight = 0;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;// Need to predefine processing according to various events when sending transactions via WebSocket</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;const ws = new WebSocket(`wss://${NODE_DOMAIN}:3001/ws`);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;ws.on("open", () =&gt; {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;console.log("connection open");</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;});</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;ws.on("close", () =&gt; {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;console.log("connection closed");</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;});</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;ws.on("message", async (msg: any) =&gt; {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;const res = JSON.parse(msg);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;if ("uid" in res) {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(`uid : ${res.uid}`);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Monitors transactions at the target address that have entered the unauthorized state</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const unconfirmedBody = `{"uid": "${res.uid}", "subscribe": "unconfirmedAdded/${signer1AddressString}"}`;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(unconfirmedBody);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ws.send(unconfirmedBody);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Monitoring of target address transaction being approved</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const confirmedBody = `{"uid": "${res.uid}", "subscribe": "confirmedAdded/${signer1AddressString}"}`;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(confirmedBody);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ws.send(confirmedBody);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Monitor transaction at target address for errors</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const statusBody = `{"uid": "${res.uid}", "subscribe": "status/${signer1AddressString}"}`;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(statusBody);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ws.send(statusBody);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Monitor new blocks</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const blockBody = `{"uid": "${res.uid}", "subscribe": "block"}`;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(blockBody);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ws.send(blockBody);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Monitor finalized blocks</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const finalizedBlockBody = `{"uid": "${res.uid}", "subscribe": "finalizedBlock"}`;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(finalizedBlockBody);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ws.send(finalizedBlockBody);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;// Trigger fires when transaction goes unconfirmed</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;if (</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;res.topic === `unconfirmedAdded/${signer1AddressString}` &amp;&amp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;res.data.meta.hash === hash.toString()</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;) {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("transaction unconfirmed");</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;// Trigger fires when transaction is confirmed</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;if (</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;res.topic === `confirmedAdded/${signer1AddressString}` &amp;&amp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;res.data.meta.hash === hash.toString()</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;) {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("transaction confirmed");</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transactionHeight = parseInt(res.data.meta.height);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;// Trigger fires on block generation</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;if (res.topic === `block`) {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("block");</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;blockHeight = parseInt(res.data.block.height);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;// Trigger fires when finalizing block</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;if (res.topic === `finalizedBlock`) {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("finalizedBlock");</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(res);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;finalizedBlockHeight = parseInt(res.data.height);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;// Trigger fires when transaction fails</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;if (</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;res.topic === `status/${signer1AddressString}` &amp;&amp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;res.data.hash === hash.toString()</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;) {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(res.data.code);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ws.close();</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;} else {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(res);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;// Monitoring ends after confirmation height of blocks</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;if (</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transactionHeight !== 0 &amp;&amp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transactionHeight + confirmationHeight - 1 &lt;= blockHeight</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;) {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`${confirmationHeight} blocks confirmed. transactionHeight is ${transactionHeight} blockHeight is ${blockHeight}.`</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Check transaction status and end monitoring</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const transactionStatusRoutesApi = new TransactionStatusRoutesApi(</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;configuration</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const transactionStatusDTO: TransactionStatusDTO = (</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;await transactionStatusRoutesApi.getTransactionStatus({</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hash: hash.toString(),</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;})</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;).data;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (transactionStatusDTO.group === TransactionGroupEnum.Confirmed) {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Write here the process after confirming the transaction</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ws.close();</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else if (</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transactionStatusDTO.group === TransactionGroupEnum.Unconfirmed</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;) {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// If it was back to unapproved again, continue monitoring as is.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("rollback detected. transaction is unconfirmed.");</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Write here what to do if the transaction disappears unapproved ... Example . Check status and re-announce, etc.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("rollback detected. transaction disappeared.");</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ws.close();</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} catch (err) {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.error(err);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ws.close();</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;} else {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`wait for ${confirmationHeight} blocks. transactionHeight is ${transactionHeight} blockHeight is ${blockHeight}.`</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;// Monitoring ends after finalizedBlockHeight overtakes the target block.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;if (transactionHeight !== 0 &amp;&amp; transactionHeight &lt;= finalizedBlockHeight) {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`${finalizedBlockHeight} block finalized. transactionHeight is ${transactionHeight} blockHeight is ${blockHeight}.`</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Check transaction status and end monitoring</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const transactionStatusRoutesApi = new TransactionStatusRoutesApi(</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;configuration</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const transactionStatusDTO: TransactionStatusDTO = (</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;await transactionStatusRoutesApi.getTransactionStatus({</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hash: hash.toString(),</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;})</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;).data;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (transactionStatusDTO.group === TransactionGroupEnum.Confirmed) {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Write here the process after confirming the transaction</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ws.close();</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else if (</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transactionStatusDTO.group === TransactionGroupEnum.Unconfirmed</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;) {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// If it was back to unconfirmed again, continue monitoring as is.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("rollback detected. transaction is unconfirmed.");</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Write here what to do if the transaction disappears unconfirmed ... Example . Check status and re-announce, etc.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("rollback detected. transaction disappeared.");</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ws.close();</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} catch (err) {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.error(err);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ws.close();</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;} else {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`wait for finalized block. transactionHeight is ${transactionHeight} blockHeight is ${blockHeight}.`</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;});</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;// Announce transaction</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;try {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;const transactionRoutesApi = new TransactionRoutesApi(configuration);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;console.log(transactionPayload);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;const response = await transactionRoutesApi.announceTransaction({</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transactionPayload,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;});</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;console.log(response.data);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;} catch (err) {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;console.error(err);</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>})();</p>
<!-- /wp:paragraph -->

When sending such a transaction, if you open your wallet, the transaction will be sent and you will hear the sound “ching”. There are a lot of comments in the example code so that you can see where and what you are doing. If you have any issues feel free to contact our GitHub or Discord.

Runtime log example

<!-- wp:paragraph -->
<p>~/symbol-sdk-typescript-sample-1$ npx ts-node send-transfer-transaction.tsย </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>40EED5433899E2EB1FB33A864CCEDB9D7F5F42A59561F1B4341DE3751030B85F</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><a href="https://testnet.symbol.fyi/transactions/40EED5433899E2EB1FB33A864CCEDB9D7F5F42A59561F1B4341DE3751030B85F">https://testnet.symbol.fyi/transactions/40EED5433899E2EB1FB33A864CCEDB9D7F5F42A59561F1B4341DE3751030B85F</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>{"payload": "B00000000000000008B788D279A618F169687225327E5721D0D6A2738F10F53A82347310E6CCD4928AA6C8705E6219BCE50E76D1BD5D499567C97E2390C6398689DEFE60EB90A506ECF3FF68E017A83528A0A361F1F1EE91D761B5E34008AD9474870D54F5C4D0680000000001985441C044000000000000F64B73920500000098D985A853255F28BE66E52F6E7D1078B0D5DB4EADB2C59B0000010000000000C8B6532DDB16843A40420F0000000000"}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>{ message: 'packet 9 was pushed to the network via /transactions' }</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>connection open</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>uid : PE56L7DT7UFEV4ZUZM6JEB373PJNCLUL</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>{"uid": "PE56L7DT7UFEV4ZUZM6JEB373PJNCLUL", "subscribe": "unconfirmedAdded/TBFVGBN5XKVFWF3PKWRQRPH6SHSOTXJMXKYSTEQ"}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>{"uid": "PE56L7DT7UFEV4ZUZM6JEB373PJNCLUL", "subscribe": "confirmedAdded/TBFVGBN5XKVFWF3PKWRQRPH6SHSOTXJMXKYSTEQ"}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>{"uid": "PE56L7DT7UFEV4ZUZM6JEB373PJNCLUL", "subscribe": "status/TBFVGBN5XKVFWF3PKWRQRPH6SHSOTXJMXKYSTEQ"}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>{"uid": "PE56L7DT7UFEV4ZUZM6JEB373PJNCLUL", "subscribe": "block"}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>{"uid": "PE56L7DT7UFEV4ZUZM6JEB373PJNCLUL", "subscribe": "finalizedBlock"}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>{ uid: 'PE56L7DT7UFEV4ZUZM6JEB373PJNCLUL' }</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>wait for 6 blocks. transactionHeight is 0 blockHeight is 0.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>wait for finalized block. transactionHeight is 0 blockHeight is 0.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>transaction unconfirmed</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>{</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;topic: 'unconfirmedAdded/TBFVGBN5XKVFWF3PKWRQRPH6SHSOTXJMXKYSTEQ',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;data: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;transaction: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;signature: '08B788D279A618F169687225327E5721D0D6A2738F10F53A82347310E6CCD4928AA6C8705E6219BCE50E76D1BD5D499567C97E2390C6398689DEFE60EB90A506',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;signerPublicKey: 'ECF3FF68E017A83528A0A361F1F1EE91D761B5E34008AD9474870D54F5C4D068',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version: 1,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;network: 152,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type: 16724,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;maxFee: '17600',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deadline: '23931866102',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;recipientAddress: '98D985A853255F28BE66E52F6E7D1078B0D5DB4EADB2C59B',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mosaics: [Array]</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;},</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;meta: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hash: '40EED5433899E2EB1FB33A864CCEDB9D7F5F42A59561F1B4341DE3751030B85F',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;merkleComponentHash: '40EED5433899E2EB1FB33A864CCEDB9D7F5F42A59561F1B4341DE3751030B85F',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height: '0'</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>wait for 6 blocks. transactionHeight is 0 blockHeight is 0.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>wait for finalized block. transactionHeight is 0 blockHeight is 0.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>block</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>{</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;topic: 'block',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;data: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;block: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;signature: '27C609DDBD9E552425B736A1222B32C2E1ABD9431E4B59FD68705460799F4A95E5B39625D7461A7F780DF1108E85B80D37EF966D34567CE1342C8D273DF27D05',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;signerPublicKey: 'CD96C6830906530C4BCD7C45453F5D55A5FA5BAF098CFC4E512B18CC763D9573',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version: 1,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;network: 152,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type: 33091,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height: '653699',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timestamp: '23924697359',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;difficulty: '10000000000000',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proofGamma: '14987781C5471F99EE0A168007E8F1E0AF204FC351057178071B73D9923CD4B3',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proofVerificationHash: '5A494A1E9335148507B7C58162249217',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proofScalar: 'A086226451E081BABC25619348E2FC5026F2688C0742D375B66F73BF580B6E02',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;previousBlockHash: 'C6DF5E1406BF16CB0FBD421AE524016E2FD16DFF1AF56D72F2AF0B871A908E21',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transactionsHash: '40EED5433899E2EB1FB33A864CCEDB9D7F5F42A59561F1B4341DE3751030B85F',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;receiptsHash: '0E12701813430073FDFA2E524C5AA182950DB5C2931FB0A015D260D6A54939C3',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stateHash: '978B0BCAC574548EF5C28F15F6791ACAAE40A16A326C9C236D041335981E5B1D',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;beneficiaryAddress: '980F30859E6AB05706FD93188B39A42B42A44AC8DA115053',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;feeMultiplier: 100</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;},</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;meta: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hash: '5B09B4DC5B58B277FB74745FF5C9483467BE8ECB10FF61384184B5F82EE9C666',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generationHash: 'F8084B2C740931EF6C84430E33B30248E90458AD4EE266111BE797E7AD1C5329'</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>wait for 6 blocks. transactionHeight is 0 blockHeight is 653699.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>wait for finalized block. transactionHeight is 0 blockHeight is 653699.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>transaction confirmed</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>{</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;topic: 'confirmedAdded/TBFVGBN5XKVFWF3PKWRQRPH6SHSOTXJMXKYSTEQ',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;data: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;transaction: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;signature: '08B788D279A618F169687225327E5721D0D6A2738F10F53A82347310E6CCD4928AA6C8705E6219BCE50E76D1BD5D499567C97E2390C6398689DEFE60EB90A506',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;signerPublicKey: 'ECF3FF68E017A83528A0A361F1F1EE91D761B5E34008AD9474870D54F5C4D068',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version: 1,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;network: 152,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type: 16724,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;maxFee: '17600',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deadline: '23931866102',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;recipientAddress: '98D985A853255F28BE66E52F6E7D1078B0D5DB4EADB2C59B',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mosaics: [Array]</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;},</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;meta: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hash: '40EED5433899E2EB1FB33A864CCEDB9D7F5F42A59561F1B4341DE3751030B85F',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;merkleComponentHash: '40EED5433899E2EB1FB33A864CCEDB9D7F5F42A59561F1B4341DE3751030B85F',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height: '653699'</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>wait for 6 blocks. transactionHeight is 653699 blockHeight is 653699.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>wait for finalized block. transactionHeight is 653699 blockHeight is 653699.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>block</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>{</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;topic: 'block',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;data: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;block: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;signature: '300C88C9BDDBF04C4F81A80917FE058CFC9458B84E08D509ADF243693D94D27E0098DDC3FB8BA226435ACA4DE9BE95FDC692B0C683F95EF5883CA69193A44906',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;signerPublicKey: 'BF2EAFD7C2B1E84C814B797332CA10E82CC3E3C1E7BC8ACC4640E7FD33C90A2C',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version: 1,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;network: 152,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type: 33091,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height: '653700',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timestamp: '23924741192',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;difficulty: '10000000000000',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proofGamma: '0953D5657183B9F500871FDF9BB83EDCDBF5D9B931BF32D1783FD9BCDC38F1A2',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proofVerificationHash: 'A5192E49F1E794737D3C831D5585B401',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proofScalar: 'DF1929D97CD80E0F0C085524840F0009FBCAF1683AE86B77E55C03DD2561FA0F',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;previousBlockHash: '5B09B4DC5B58B277FB74745FF5C9483467BE8ECB10FF61384184B5F82EE9C666',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transactionsHash: '0000000000000000000000000000000000000000000000000000000000000000',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;receiptsHash: '55917278DD7CA2D0BAEF12D5DD072CC929A2187AAC78E239E043A1F4198AC5DF',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stateHash: '2FB6BE644C3CC1186CD737C39E14EDB24D90DBEEF87DF779136F88AA2C9003D7',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;beneficiaryAddress: '985F693ED8D58BC10F3E428E600E17F704BE042B03198B2A',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;feeMultiplier: 0</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;},</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;meta: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hash: 'D36D50647F1F41EA75FAB503F8F0795F5762C2198268EC9FB4F4013D577F7815',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generationHash: 'D67B01773A8B6BC9E2FF7BBB0423DB4D8C843478B4556391062512687CC42DCE'</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>wait for 6 blocks. transactionHeight is 653699 blockHeight is 653700.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>wait for finalized block. transactionHeight is 653699 blockHeight is 653700.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>block</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>{</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;topic: 'block',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;data: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;block: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;signature: '64B0A8BAFA35F1D2A7F8D00475D4ACB8BA3AC546CB3445BA190A123A706CCADFC89B102396BABDA49803298B987206F49C97164DACBEDAFE63DA430954923800',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;signerPublicKey: '21CF6E21A73CB4CEBD32BA0AE2C7059D19B1A7827DF6C8D10FF33C3F1A2BF0E8',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version: 1,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;network: 152,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type: 33091,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height: '653701',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timestamp: '23924771171',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;difficulty: '10000000000000',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proofGamma: '414F99CCF2115DC10CF761D3D4E335884ADCA8A74D9479FD67EAF38D61915D12',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proofVerificationHash: '523DF3CEE73CA1F1684EF22599BF8B58',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proofScalar: 'FE12167FE39A1EEA8FFD7B18D35F847B1D42BE696EA16534D9F669A0910A270C',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;previousBlockHash: 'D36D50647F1F41EA75FAB503F8F0795F5762C2198268EC9FB4F4013D577F7815',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transactionsHash: '0000000000000000000000000000000000000000000000000000000000000000',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;receiptsHash: 'BFC94F3C268EA1D531DEE62CCF388CCB85746D368DAC775171A904B5897C0566',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stateHash: 'B199DE8B7A60975EE9549075FF821F83289196564FF0A52C5354BDEC138D5DD2',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;beneficiaryAddress: '98FFA418508A3B022EF3491FC8254DEB7EC3EBA65B52DE1D',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;feeMultiplier: 0</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;},</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;meta: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hash: '0D5F10306D3F7E63158E1581C96EB1D636BD7787FACE35CADCD1D8A8E2AA7D1D',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generationHash: 'F8210DAC0163CB037F3ABC73E59FE86C070DDC827E5922AAB4208FCE7666F824'</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>wait for 6 blocks. transactionHeight is 653699 blockHeight is 653701.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>wait for finalized block. transactionHeight is 653699 blockHeight is 653701.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>block</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>{</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;topic: 'block',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;data: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;block: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;signature: '12118E9565A88F932FE89D3595E01EE991CB4A803F375D9A1CCEF0D667C9C180F4F1DB8A6438C3626BF87E9278FA0601B88EF03DA807DE9C4220BA92A926D002',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;signerPublicKey: 'BF2EAFD7C2B1E84C814B797332CA10E82CC3E3C1E7BC8ACC4640E7FD33C90A2C',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version: 1,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;network: 152,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type: 33091,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height: '653702',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timestamp: '23924792232',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;difficulty: '10000000000000',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proofGamma: 'B6B4EAFCAC77DFBFE42BEC7BC41E9B1D65C0A27EEE97E94F55AB08E9FF9910D9',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proofVerificationHash: 'A8A8244A0EB6AC01E18A228DC44865E7',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proofScalar: '67147B2A8C4B73F8CF31E98CE48DB95A76CF0DD9C24F3AF23094A86D5CCE930D',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;previousBlockHash: '0D5F10306D3F7E63158E1581C96EB1D636BD7787FACE35CADCD1D8A8E2AA7D1D',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transactionsHash: '0000000000000000000000000000000000000000000000000000000000000000',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;receiptsHash: '55917278DD7CA2D0BAEF12D5DD072CC929A2187AAC78E239E043A1F4198AC5DF',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stateHash: 'DCE2463E6D9D10F758F1904718539329890DE030447C37511910C50DF1D34A34',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;beneficiaryAddress: '985F693ED8D58BC10F3E428E600E17F704BE042B03198B2A',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;feeMultiplier: 0</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;},</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;meta: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hash: 'CC4DF75939F1ED540890EA97688055CC686AA9B2D1FA1998A82B05FF094E35FA',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generationHash: 'FDB798D4ACBCC9B60F4A35BCD9F5D80152909D51B5FF9A7236DD7BF0325D1723'</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>wait for 6 blocks. transactionHeight is 653699 blockHeight is 653702.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>wait for finalized block. transactionHeight is 653699 blockHeight is 653702.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>block</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>{</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;topic: 'block',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;data: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;block: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;signature: '48011E2F4DE712B135B59FE782375730882B01D8D66B5A01BAB0B89D05E66673EDEF24E25B609835E54D1D3957E942C1BF620988DF231F44AEA0810557433A08',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;signerPublicKey: 'F9A5A66EBE9AD5EAAAF07AF208BF33FB0B24C2049EFF99B65AD1BB46809852DE',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version: 1,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;network: 152,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type: 33091,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height: '653703',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timestamp: '23924824521',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;difficulty: '10000000000000',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proofGamma: 'D0E1CDB0F05EF355CB4C3150233A6F69063F0F1641DAA48A2710136909857B01',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proofVerificationHash: 'A5755D01A57F5CE9305FFF84DAEAFB5B',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proofScalar: 'F4167D2CAC137C7E8B50F0C3786E012F191CB7CEFF6E85A9999F0F9B2432320C',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;previousBlockHash: 'CC4DF75939F1ED540890EA97688055CC686AA9B2D1FA1998A82B05FF094E35FA',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transactionsHash: '0000000000000000000000000000000000000000000000000000000000000000',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;receiptsHash: 'F426FEC961E15E6F1A76117DA8363DE4064391816B024B5134F6BA19DCAF5DC0',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stateHash: 'DF1C0EEEAACA2E966B3ECA891234482315C7057C1628E5C0CBECBD91D0ABCEF7',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;beneficiaryAddress: '98D3970759CB13CD9E6BD7FBEBD7F909F34ADA4E079B1A4D',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;feeMultiplier: 0</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;},</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;meta: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hash: '661392D9004B85260818CF03AA16AF05F987EB7ED700DB37D574059E258BB3CE',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generationHash: 'F473AEDD8F5183A4C497ADA2C4F7798B73C06BF7DAB6D6E5C19628A267913F9A'</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>wait for 6 blocks. transactionHeight is 653699 blockHeight is 653703.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>wait for finalized block. transactionHeight is 653699 blockHeight is 653703.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>block</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>{</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;topic: 'block',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;data: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;block: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;signature: '43417AF8B7CEDC9D359EF4B17745523968EF0287F835C8D5A758E919B53970B11FC2894E1953185E577FA6B442982FE051719EBAE8B9A2771FC36DACC213940E',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;signerPublicKey: '88A7993C2478345E3B86A98A2D8AC47739F7A95620238018958E3961C153E263',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version: 1,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;network: 152,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type: 33091,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height: '653704',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timestamp: '23924861796',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;difficulty: '10000000000000',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proofGamma: '60F4CA9CD7AFBD3F5BE8ED42A40B5CE3A90F2EAD4969F0F719A12516F24D67D6',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proofVerificationHash: '525BB53255B1A900B29D85E3564E56F3',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proofScalar: '8214A6B61FD2BD2FE53F465DAEC6E3B2540B62EBACF083E92D6A323D78B03A03',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;previousBlockHash: '661392D9004B85260818CF03AA16AF05F987EB7ED700DB37D574059E258BB3CE',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transactionsHash: '0000000000000000000000000000000000000000000000000000000000000000',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;receiptsHash: '987E011A37AC36B4D5524D846515B7580B33B41360083578BD721C85D07AD753',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stateHash: 'A7E06767E5BDD277A82F472000E18038E5BAEDACB87CCE28F186BAED438BA0CE',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;beneficiaryAddress: '98258E9856A612C5346D3C0B318DCB654257BD9DD86E6481',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;feeMultiplier: 0</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;},</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;meta: {</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hash: '2DB314AD386B94F413F627A0370D175E846A572CD3D62DBF92175166437AC3ED',</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generationHash: 'F49E42593C78FCE7FBE9D211F3AAA4DED5E8EBCDE82F1613B54D41D93AD62A1E'</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>&nbsp;&nbsp;}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>}</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>6 blocks confirmed. transactionHeight is 653699 blockHeight is 653704.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>wait for finalized block. transactionHeight is 653699 blockHeight is 653704.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>connection closed</p>
<!-- /wp:paragraph -->

Summary

Now that we have a TypeScript REST API client and a TypeScript npm package (to send transactions), we can start front-end development in the TypeScript environment using tools that match the concept of the new official SDK.

However, if you look at the sample code, there are places where problems can be avoided with some work-around ways. Therefore, there may be some parts of the code that can be improved by writing comments in JSDoc comments(They will help to improve the type definition files automatically generated.), so if I can, I wanna send the pull request to improve them directly to the new official Symbol SDK.

About a year and a half has passed since the launch of Symbol, but there is still a lot unknown about how the Symbol and NEM ecosystem will develop. Also, at the moment it is unknown what place in the Symbol ecosystem will be occupied by the SDK from NEMTUS. (Maybe there will be another SDK, better than this one and that would be great).

About NEMTUS

If you have anything to add to articles from NEMTUS related to NEM or Symbol or SDK, please feel free to collaborate with us. We will be very grateful for this.

https://github.com/nemtus/

The Japanese non-profit organization NEMTUS will be happy to continue to improve the technical information about NEM and Symbol and contribute to the ecosystem.

Article Author

Author Name: Yasunori Matsuoka (ๆพๅฒก้–ๅ…ธ)

Organization: NEMTUS

Biography: 

  • Participated in blockchain web development at CauchyE Co., Ltd.
  • Since August 2022, Yasunori has been working full-time as the Vice Chairman for non-profit organization named NEMTUS to promote NEM/Symbol blockchain technology.

Social networks:

Twitter: https://twitter.com/salaryman_tousi

GitHub: https://github.com/YasunoriMATSUOKA

___

Translation: SymbolTimes

Tags:

No responses yet

Leave a Reply

Your email address will not be published. Required fields are marked *

You can delegate harvesting to our Symbol nodes:

โ€“ NIS2.host (Klim)

โ€“ XYM007.host (Angel)

Symbol wallet address:

KLIM:

SYMBOL (XYM)

NA4VOOQBORIWLTVHQOX43EZY2N3TUNLJ4SORKPA

_______

ANGEL:

SYMBOL (XYM)

NCRVIE26GXZG7JCKPRGGSA2WBHBBDRDC4V2GDHA