Pascal.RawOperations 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package Pascal.RawOperations --version 1.0.2
NuGet\Install-Package Pascal.RawOperations -Version 1.0.2
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.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Pascal.RawOperations --version 1.0.2
#r "nuget: Pascal.RawOperations, 1.0.2"
#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.2

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

RawOperations can be executed using pascal.wallet.connector - .NET5 library to call Pascal full node Wallet JSON RPC API methods.

using System;
using System.Threading.Tasks;
using Pascal.Wallet.Connector;

namespace Pascal.RawOperations.Demo
{
    class Program
    {
        static async Task Main()
        {
            //Port 4203 is for testnet, MainNet port: 4003.
            var connector = new PascalConnector("127.0.0.1", 4203);

            //Replace sender, receiver and other data as needed. Be careful and do not share your private keys with others! Private key provided for demo purposes, it does not contain real Pascals or Pascal Accounts!
            var sender = 32330U;
            var receiver = 32332U;
            var senderPrivateKey = "CA022000DC3778C0EA88CEF38EBB2E9A9E990FC37A65DCA7B3E547A028B39CE1805FA10D";
            var password = "Password";
            var amount = 0.0036M;
            var fee = 0.0001M;
            var payloadType = Payload.AesEncrypted; //Recommended to use predefined payloadType templates
            var message = "Hello world!";
            uint nOperation = 37; //this should be the sender (or signer if the signer is used) current account nOperations value that is stored on SafeBox. NOperations is mechanism to avoid double spending.

            var rawOperation = PascalHelper.CreateTransaction(sender, senderPrivateKey, nOperation, receiver, amount, fee, payloadType, message, password);
            var response = await connector.ExecuteOperationsAsync(rawOperation);
            if(response.Result != null)
            {
                Console.WriteLine("Operation executed successfully!");
            }
            else
            {
                Console.WriteLine(response.Error.Message);
            }
        }
    }
}

Supported features

  • RawOperation creation for transactions
  • RawOperation creation for data operations
  • Supported payload methods: public and AES encrypted

For technical support contact Rabarbers and be polite

Roadmap

  • Support payload encryption using DestinationPublicKey and SenderPublicKey methods.
  • Ability to create rawOperations for other kinds of Pascal operations.

Feedback & Donations

pascal.wallet.connector account 834853-50 and state your goal in the unencrypted operation payload.

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 371 10/13/2021
1.0.2 322 6/14/2021

Fixed bugs in DataOperation rawOperation creation.