TransactionPack()

Summary

Route
Type
Example

/Transaction/Pack

POST

http://176.113.80.7:62000/api/Transaction/Pack

Description

Packs a transaction to a byte array

This is needed for sending a transaction

Request

Request Structure

{

// parameters common for all requests 
  
"MethodApi" : "string_value", // API method name to form and process a transaction

"PublicKey":"string_value", // Sender public key in Base58

"ReceiverPublicKey":"string_value", // Recipient public key in Base58

"Amount":"decimal", // Transaction amount

"Fee":"decimal", // Maximum fee approved by the user
  
"SmartContractSource":"String_value", //Source code of smart contract
  
"UserData":"string_value" // If needed extra information can be stored inside UserData

}

Request Parameters

MethodApi: string value - it’s vital to specify the API method to pack the transaction: "TransferToken", "TransferCS", "Delegation", "SmartDeploy", "SmartMethodExecute";

PublicKey: string_value - sender public key in base58

ReceiverPublicKey: string_value - recipient public key in base58

Amount: decimal - transaction amount as a decimal or integer number

Fee: decimal - maximum fee approved by the user as a decimal or integer number

UserData: string_value - data the user sent with the transaction including the data about deployment and initiation of a smart contract

Response

Response Structure

Example Code

Python

C++

C#

Last updated