Pascal.RawOperations 1.0.3

dotnet add package Pascal.RawOperations --version 1.0.3                
NuGet\Install-Package Pascal.RawOperations -Version 1.0.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Pascal.RawOperations" Version="1.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Pascal.RawOperations --version 1.0.3                
#r "nuget: Pascal.RawOperations, 1.0.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Pascal.RawOperations as a Cake Addin
#addin nuget:?package=Pascal.RawOperations&version=1.0.3

// Install Pascal.RawOperations as a Cake Tool
#tool nuget:?package=Pascal.RawOperations&version=1.0.3                

Supported features

  • RawOperation creation for transactions
  • RawOperation creation for data operations
  • RawOperation for changing PASA public key
  • Reading account info from the Pascal network
  • Sending the raw operation to the Pascal network for the execution (no feedback if the operation is successful).
using System;
using System.Threading.Tasks;

namespace Pascal.RawOperations.Demo
{
    class Program
    {
        static async Task Main()
        {
            //Replace sender, receiver and other data as needed. 
            var nodeAddress = "192.168.88.240"; //change to the address of your Pascal wallet
            var nodePort = 4004;
            var sender = 1141769U; //this account pays transaction fee
            var receiver = 796500U;
            var signerPrivateKey = "..."; //Be careful and do not share your private keys with others!
            var amount = 0.0001M;
            var fee = 0.0001M;

            try
            {
                var accountInfo = await PascalNetwork.RequestAccountInfoAsync(nodeAddress, nodePort, sender);
                Console.WriteLine(accountInfo);
                
                var rawOperation = PascalHelper.CreateTransaction(sender, signerPrivateKey, accountInfo.NOperations, receiver, amount, fee);
                await PascalNetwork.SendOperationsAsync(nodeAddress, nodePort, rawOperation);
                Console.WriteLine($"\nSent operation: {rawOperation}\n");

                accountInfo = await PascalNetwork.RequestAccountInfoAsync(nodeAddress, nodePort, sender);
                Console.WriteLine(accountInfo);

            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }
    }
}
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.3 408 10/13/2021
1.0.2 351 6/14/2021

Fixed bugs in DataOperation rawOperation creation.