Pascal.Wallet.Connector
1.0.1
See the version list below for details.
dotnet add package Pascal.Wallet.Connector --version 1.0.1
NuGet\Install-Package Pascal.Wallet.Connector -Version 1.0.1
<PackageReference Include="Pascal.Wallet.Connector" Version="1.0.1" />
paket add Pascal.Wallet.Connector --version 1.0.1
#r "nuget: Pascal.Wallet.Connector, 1.0.1"
// Install Pascal.Wallet.Connector as a Cake Addin #addin nuget:?package=Pascal.Wallet.Connector&version=1.0.1 // Install Pascal.Wallet.Connector as a Cake Tool #tool nuget:?package=Pascal.Wallet.Connector&version=1.0.1
Send Pascals from one account to another account
In Pascal network, every account can send 1 free transaction per block. Other transactions in the same block costs minimum 0.0001 Pascals or 1 Molina. Pascals can be send only from the accounts you own (you need to have private keys in the Pascal Wallet and the Pascal Wallet should be kept open).
using var connector = new PascalConnector(address: "127.0.0.1", port: 4003);
var sendingPascResponse = await connector.SendToAsync(senderAccount: 1141769, receiverAccount: 834853,
amount: 1.2345M, fee: 0, payload: "Thanks for good work!", payloadMethod: PayloadMethod.None);
if (sendingPascResponse.Result != null)
{
var amount = sendingPascResponse.Result.Receivers[0].Amount;
var description = sendingPascResponse.Result.Description;
Console.WriteLine($"Successfully sent {amount} Pascals to a friend. Operation details: {description}");
}
else
{
Console.WriteLine($"Transaction failed. Error details: {sendingPascResponse.Error.Message}");
}
Send data from one account to another account
Pascal network supports feature called 'Data Operations' which allows you to exchange data between accounts. Data is transmitted using payload field of the operation. Payload field can also be used in Pascal sending transactions (RPC API method SendToAsync). SendToAsync and SendDataAsync can be used for free (no operation fee for 1 operation per account per block). SendToAsync has minimum Pascals sending restriction set to 0.0001 Pasc or 1 Molina, but SendDataAsync does not have such restriction, therefore SendDataAsync can be used completely for free. SendDataAsync contains additional functionality useful to transmit data, more details in PIP-0033.
var identifier = new Guid("AAA19787-F847-4323-8987-2E652F593BCE");
var data = "This is a free chat message on Pascal blockchain! Find out more at https://www.pascalcoin.org";
var sendingDataResponse = await connector.SendDataAsync(senderAccount: 796500, receiverAccount: 834853, fee: 0,
guid: identifier.ToString(), dataType: DataType.ChatMessage, payload: data);
if (sendingDataResponse.Result != null)
{
var description = sendingDataResponse.Result.Description;
Console.WriteLine($"Successfully sent important information to a friend. Operation details: {description}");
}
else
{
Console.WriteLine($"Failed to chat with a friend, error details: {sendingDataResponse.Error.Message}");
}
Check the project repository for more use cases.
Product | Versions 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. |
-
net5.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Added AccountState Coin_Swap and Account_Swap.