예제 #1
0
 /// <summary>
 /// Executes a transaction operation from "sender" to "target"
 /// </summary>
 /// <param name="sender">Sender account</param>
 /// <param name="target">Destination account</param>
 /// <param name="amount">Coins to be transferred</param>
 /// <param name="fee">Fee of the operation</param>
 /// <param name="payload">Payload "item" that will be included in this operation</param>
 /// <param name="payloadMethod">Encode type of the item payload</param>
 /// <param name="pwd">Used to encrypt payload with aes as a payload_method. If none equals to empty password</param>
 /// <returns>If transaction is successfull will return a JSON Object in "Operation Object" format. Otherwise, will return a JSON-RPC error code with description</returns>
 public static Task <Operation> SendToAsync(this IPascalCoinClient client, uint sender, uint target, decimal amount, decimal fee, byte[] payload = null, PayloadEncryptionMethod?payloadMethod = null, string pwd = null)
 {
     return(Task.Run(() => client.SendTo(sender, target, amount, fee, payload, payloadMethod, pwd)));
 }
예제 #2
0
 /// <summary>
 /// Starts the node and the server. Starts connection process
 /// </summary>
 /// <returns>Boolean "true"</returns>
 public static Task <bool> StartNodeAsync(this IPascalCoinClient client)
 {
     return(Task.Run(() => client.StartNode()));
 }
예제 #3
0
 public static Task <SignResult> VerifySignAsync(this IPascalCoinClient client, string digest, string enc_pubkey, string signature)
 {
     return(Task.Run(() => client.VerifySign(digest, enc_pubkey, signature)));
 }
예제 #4
0
 /// <summary>
 /// Returns a JSON Object with account information including pending operations not included in blockchain yet, but affecting this account.
 /// </summary>
 /// <remarks>
 /// To know if there are pending operations, must look at updated_b param.It tells last block that modified this account.If this number is equal to blockchain blocks then this account is affected by pending operations (send/receive or change key)
 /// </remarks>
 /// <param name="account">Cardinal containing account number</param>
 public static Task <Account> GetAccountAsync(this IPascalCoinClient client, uint account)
 {
     return(Task.Run(() => client.GetAccount(account)));
 }
예제 #5
0
 /// <summary>
 /// Unlocks a locked Wallet using "pwd" param
 /// </summary>
 /// <param name="pwd"></param>
 /// <returns>Returns a Boolean indicating if Wallet is unlocked after using pwd password</returns>
 public static Task <bool> UnlockAsync(this IPascalCoinClient client, string pwd)
 {
     return(Task.Run(() => client.Unlock(pwd)));
 }
예제 #6
0
 /// <summary>
 /// Encrypt a text "paylad" using "payload_method"
 /// </summary>
 /// <param name="payload">HEXASTRING - Text to encrypt in hexadecimal format</param>
 /// <param name="payload_method">Payload method</param>
 /// <param name="pwd">Using a Password. Must provide pwd param</param>
 /// <returns>Returns a HEXASTRING with encrypted payload</returns>
 public static Task <string> PayloadEncryptAsync(this IPascalCoinClient client, string payload, PayloadEncryptionMethod payload_method, string pwd)
 {
     return(Task.Run(() => client.PayloadEncrypt(payload, payload_method, pwd)));
 }
예제 #7
0
 /// <summary>
 /// Returns all the current connections
 /// </summary>
 /// <returns>JSON Array with Connection Objects</returns>
 public static Task <Connection[]> GetConnectionsAsync(this IPascalCoinClient client)
 {
     return(Task.Run(() => client.GetConnections()));
 }
예제 #8
0
 public static async Task <IDisposable> EnterUnlockScopeAsync(this IPascalCoinClient client, string pwd)
 {
     return(await Task.Run(() => client.EnterUnlockWalletScope(pwd)));
 }
예제 #9
0
 /// <summary>
 /// Creates and signs a "Send to" operation without checking information and without transfering to the network. It's usefull for "cold wallets" that are off-line (not synchronized with the network) and only holds private keys
 /// </summary>
 /// <param name="sender">Sender account</param>
 /// <param name="target">Target account</param>
 /// <param name="sender_enc_pubkey">HEXASTRING - Public key of the sender account in encoded format</param>
 /// <param name="sender_b58_pubkey">HEXASTRING - Public key of the sender account in base58 format</param>
 /// <param name="target_enc_pubkey">HEXASTRING - Public key of the target account in encoded format</param>
 /// <param name="target_b58_pubkey">HEXASTRING - Public key of the target account in base58 format</param>
 /// <param name="last_n_operation">Last value of n_operation obtained with an Account object, for example when called to getaccount</param>
 /// <param name="amount">Coins to be transferred</param>
 /// <param name="fee">Fee of the operation</param>
 /// <param name="payload">Payload "item" that will be included in this operation</param>
 /// <param name="payloadMethod">Encode type of the item payload</param>
 /// <param name="pwd">Used to encrypt payload with aes as a payload_method. If none equals to empty password</param>
 /// <param name="rawoperations">HEXASTRING (optional) - If we want to add a sign operation with other previous operations, here we must put previous rawoperations result</param>
 /// <remarks>Wallet must be unlocked and sender private key (searched with provided public key) must be in wallet. No other checks are made (no checks for valid target, valid n_operation, valid amount or fee ...)</remarks>
 /// <remarks>Only one of sender_enc_pubkey, sender_b58_pubkey needs be provided</remarks>
 /// <remarks>Only one of target_enc_pubkey, target_b58_pubkey needs be provided</remarks>
 /// <returns>Returns a Raw Operations Object</returns>
 public static Task <RawOperation> SignSendToAsync(this IPascalCoinClient client, uint sender, uint target, string sender_enc_pubkey, string sender_b58_pubkey, string target_enc_pubkey, string target_b58_pubkey, uint last_n_operation, decimal amount, decimal fee, byte[] payload = null, PayloadEncryptionMethod?payloadMethod = null, string pwd = null, string rawoperations = null)
 {
     return(Task.Run(() => client.SignSendTo(sender, target, sender_enc_pubkey, sender_b58_pubkey, target_enc_pubkey, target_b58_pubkey, last_n_operation, amount, fee, payload, payloadMethod, pwd, rawoperations)));
 }
예제 #10
0
 /// <summary>
 /// Buy an account currently listed for sale (public or private)
 /// </summary>
 /// <param name="buyer_account">Account number of buyer who is purchasing the account</param>
 /// <param name="account_to_purchase">Account number being purchased</param>
 /// <param name="price">Settlement price of account being purchased</param>
 /// <param name="seller_account">Account of seller, receiving payment</param>
 /// <param name="new_b58_pubkey">Post-settlement public key in base58 encoded format.</param>
 /// <param name="new_enc_pubkey">Post-settlement public key in hexadecimal encoded format.</param>
 /// <param name="amount">Amount being transferred from buyer_account to seller_account (the settlement). This is a PASCURRENCY value.</param>
 /// <param name="fee">Fee of the operation. This is a PASCURRENCY value.</param>
 /// <param name="payload">Payload "item" that will be included in this operation</param>
 /// <param name="payloadMethod">Encode type of the item payload</param>
 /// <param name="pwd">Used to encrypt payload with aes as a payload_method. If none equals to empty password</param>
 /// <returns>If operation is successfull will return a JSON Object in "Operation Object" format.</returns>
 public static Task <Operation> BuyAccountAsync(this IPascalCoinClient client, uint buyer_account, uint account_to_purchase, decimal price, uint seller_account, string new_b58_pubkey, string new_enc_pubkey, decimal amount, decimal fee, byte[] payload = null, PayloadEncryptionMethod?payloadMethod = null, string pwd = null)
 {
     return(Task.Run(() => client.BuyAccount(buyer_account, account_to_purchase, price, seller_account, new_b58_pubkey, new_enc_pubkey, amount, fee, payload, payloadMethod, pwd)));
 }
예제 #11
0
 /// <summary>
 /// Signs a "Change Account Info" operation, suitable for cold wallet usage.
 /// </summary>
 /// <param name="account_target">Account being changed</param>
 /// <param name="account_signer">Account paying the fee (must have same public key as account_target)</param>
 /// <param name="new_enc_pubkey">New account public key encoded in hexadecimal format</param>
 /// <param name="new_b58_pubkey">New account public key encoded in base58 format</param>
 /// <param name="new_name">New account name encoded in PascalCoin64 format (null means keep current name)</param>
 /// <param name="new_type">New account type (null means keep current type)</param>
 /// <param name="last_n_operation">Last value of n_operation obtained with an Account object, for example when called to getaccount</param>
 /// <param name="fee">PASCURRENCY - Fee of the operation</param>
 /// <param name="payload">Payload "item" that will be included in this operation</param>
 /// <param name="payloadMethod">Encode type of the item payload</param>
 /// <param name="pwd">Used to encrypt payload with aes as a payload_method. If none equals to empty password</param>
 /// <param name="signer_b58_pubkey">The current public key of "account_signer" in base58 encoding</param>
 /// <param name="signer_enc_pubkey">The current public key of "account_signer" in hexadecimal encoding</param>
 /// <param name="rawoperations">HEXASTRING (optional) - If we want to add a sign operation with other previous operations, here we must put previous rawoperations result</param>
 /// <remarks>Only one or none of new_b58_pubkey, new_enc_pubkey should be used. Populating both will result in an error.</remarks>
 /// <returns>Returns a Raw Operations Object</returns>
 public static Task <Operation> SignChangeAccountInfo(this IPascalCoinClient client, uint account_target, uint account_signer, string new_enc_pubkey, string new_b58_pubkey, string new_name, ushort?new_type, uint last_n_operation, decimal fee, byte[] payload = null, PayloadEncryptionMethod?payloadMethod = null, string pwd = null, string signer_b58_pubkey = null, string signer_enc_pubkey = null, string rawoperations = null)
 {
     return(Task.Run(() => client.ChangeAccountInfo(account_target, account_signer, new_enc_pubkey, new_b58_pubkey, new_name, new_type, fee, payload, payloadMethod, pwd)));
 }
예제 #12
0
 /// <summary>
 ///  Delist an account from sale.
 /// </summary>
 /// <param name="account_target">Account to be delisted</param>
 /// <param name="account_signer">Account that signs and pays the fee (must have same public key that delisted account, or be the same)</param>
 /// <param name="fee">PASCURRENCY - Fee of the operation</param>
 /// <param name="payload">Payload "item" that will be included in this operation</param>
 /// <param name="payloadMethod">Encode type of the item payload</param>
 /// <param name="pwd">Used to encrypt payload with aes as a payload_method. If none equals to empty password</param>
 /// <returns>If operation is successfull will return a JSON Object in "Operation Object" format.</returns>
 public static Task <Operation> DelistAccountForSaleAsync(this IPascalCoinClient client, uint account_target, uint account_signer, decimal fee, byte[] payload = null, PayloadEncryptionMethod?payloadMethod = null, string pwd = null)
 {
     return(Task.Run(() => client.DelistAccountForSale(account_target, account_signer, fee, payload, payloadMethod, pwd)));
 }
예제 #13
0
 /// <summary>
 /// Lists an account for sale (public or private)
 /// </summary>
 /// <param name="account_target">Account to be listed</param>
 /// <param name="account_signer">Account that signs and pays the fee (must have same public key that listed account, or be the same)</param>
 /// <param name="price">price account can be purchased for</param>
 /// <param name="seller_account">Account that will receive "price" amount on sell</param>
 /// <param name="new_b58_pubkey">Base58 encoded public key (for private sale only)</param>
 /// <param name="new_enc_pubkey">Hex-encoded public key (for private sale only)</param>
 /// <param name="locked_until_block">Block number until this account will be locked (a locked account cannot execute operations while locked)</param>
 /// <param name="fee">PASCURRENCY - Fee of the operation</param>
 /// <param name="payload">Payload "item" that will be included in this operation</param>
 /// <param name="payloadMethod">Encode type of the item payload</param>
 /// <param name="pwd">Used to encrypt payload with aes as a payload_method. If none equals to empty password</param>
 /// <remarks>Only one or none of new_b58_pubkey, new_enc_pubkey should be used. Populating both will result in an error.</remarks>
 /// <returns>If operation is successfull will return a JSON Object in "Operation Object" format.</returns>
 public static Task <Operation> ListAccountForSaleAsync(this IPascalCoinClient client, uint account_target, uint account_signer, decimal price, uint seller_account, string new_b58_pubkey, string new_enc_pubkey, uint locked_until_block, decimal fee, byte[] payload = null, PayloadEncryptionMethod?payloadMethod = null, string pwd = null)
 {
     return(Task.Run(() => client.ListAccountForSale(account_target, account_signer, price, seller_account, new_b58_pubkey, new_enc_pubkey, locked_until_block, fee, payload, payloadMethod, pwd)));
 }
예제 #14
0
 /// <summary>
 /// Executes a change key operation, changing "account" public key for a new one, in multiple accounts Works like changekey
 /// </summary>
 /// <param name="accounts">List of accounts separated by a comma</param>
 /// <param name="new_enc_pubkey">HEXASTRING - New public key in encoded format</param>
 /// <param name="new_b58_pubkey">New public key in Base 58 format (the same that Application Wallet exports)</param>
 /// <param name="fee">PASCURRENCY - Fee of the operation</param>
 /// <param name="payload">Payload "item" that will be included in this operation</param>
 /// <param name="payloadMethod">Encode type of the item payload</param>
 /// <param name="pwd">Used to encrypt payload with aes as a payload_method. If none equals to empty password</param>
 /// <returns>If operation is successfull will return a JSON Array with Operation object items for each key If operation cannot be made, a JSON-RPC error message is returned</returns>
 public static Task <Operation[]> ChangeKeysAsync(this IPascalCoinClient client, string accounts, string new_enc_pubkey, string new_b58_pubkey, decimal fee, byte[] payload = null, PayloadEncryptionMethod?payloadMethod = null, string pwd = null)
 {
     return(Task.Run(() => client.ChangeKeys(accounts, new_enc_pubkey, new_b58_pubkey, fee, payload, payloadMethod, pwd)));
 }
예제 #15
0
 /// <summary>
 /// Encodes a public key based on params information
 /// </summary>
 /// <param name="ec_nid">key type</param>
 /// <param name="x">HEXASTRING with x value of public key</param>
 /// <param name="y">HEXASTRING with y value of public key</param>
 /// <returns>Returns a HEXASTRING with encoded public key</returns>
 public static Task <string> EncodePubKeyAsync(this IPascalCoinClient client, KeyType ec_nid, string x, string y)
 {
     return(Task.Run(() => client.EncodePubKey(ec_nid, x, y)));
 }
예제 #16
0
 /// <summary>
 /// Creates and signs a "Change key" operation without checking information and without transfering to the network. It's useful for "cold wallets" that are off-line (not synchronized with the network) and only holds private keys
 /// </summary>
 /// <param name="account">Account number to change key</param>
 /// <param name="account_signer">Account that signs and pays the fee (must have same public key that delisted account, or be the same)</param>
 /// <param name="old_enc_pubkey">HEXASTRING - Public key of the account in encoded format</param>
 /// <param name="old_b58_pubkey">HEXASTRING - Public key of the account in base58 format</param>
 /// <param name="new_enc_pubkey">HEXASTRING - Public key of the new key for the account in encoded format</param>
 /// <param name="new_b58_pubkey">HEXASTRING - Public key of the new key for the account in base58 format</param>
 /// <param name="last_n_operation">Last value of n_operation obtained with an Account object, for example when called to getaccount</param>
 /// <param name="fee">Fee of the operation</param>
 /// <param name="payload">Payload "item" that will be included in this operation</param>
 /// <param name="payloadMethod">Encode type of the item payload</param>
 /// <param name="pwd">Used to encrypt payload with aes as a payload_method. If none equals to empty password</param>
 /// <param name="rawoperations">HEXASTRING (optional) - If we want to add a sign operation with other previous operations, here we must put previous rawoperations result</param>
 /// <remarks>Wallet must be unlocked and private key (searched with provided public key) must be in wallet. No other checks are made (no checks for valid n_operation, valid fee ...) </remarks>
 /// <remarks>Only one of old_enc_pubkey, old_b58_pubkey needs be provided</remarks>
 /// <remarks>Only one of new_enc_pubkey, new_b58_pubkey needs be provided</remarks>
 /// <returns>Returns a Raw Operations Object</returns>
 public static Task <RawOperation> SignChangeKeyAsync(this IPascalCoinClient client, uint account, uint account_signer, string old_enc_pubkey, string old_b58_pubkey, string new_enc_pubkey, string new_b58_pubkey, uint last_n_operation, decimal fee, byte[] payload = null, PayloadEncryptionMethod?payloadMethod = null, string pwd = null, string rawoperations = null)
 {
     return(Task.Run(() => client.SignChangeKey(account, account_signer, old_enc_pubkey, old_b58_pubkey, new_enc_pubkey, new_b58_pubkey, last_n_operation, fee, payload, payloadMethod, pwd, rawoperations)));
 }
예제 #17
0
 /// <summary>
 /// Decodes an encoded public key
 /// </summary>
 /// <param name="enc_pubkey">HEXASTRING with encoded public key</param>
 /// <param name="b58_pubkey">String. b58_pubkey is the same value that Application Wallet exports as a public key</param>
 /// <remarks>Note: If use enc_pubkey and b58_pubkey together and is not the same public key, will return an error</remarks>
 /// <returns>Returns a JSON Object with a "Public Key Object"</returns>
 public static Task <PublicKey> DecodePubKeyAsync(this IPascalCoinClient client, string enc_pubkey, string b58_pubkey)
 {
     return(Task.Run(() => client.DecodePubKey(enc_pubkey, b58_pubkey)));
 }
예제 #18
0
 /// <summary>
 /// Signs a "Delist Account For Sale" operation, suitable for cold wallet usage.
 /// </summary>
 /// <param name="account_target">Account to be delisted</param>
 /// <param name="account_signer">Account that signs and pays the fee (must have same public key that delisted account, or be the same)</param>
 /// <param name="last_n_operation">Last value of n_operation obtained with an Account object, for example when called to getaccount</param>
 /// <param name="fee">PASCURRENCY - Fee of the operation</param>
 /// <param name="payload">Payload "item" that will be included in this operation</param>
 /// <param name="payloadMethod">Encode type of the item payload</param>
 /// <param name="pwd">Used to encrypt payload with aes as a payload_method. If none equals to empty password</param>
 /// <param name="signer_b58_pubkey">The current public key of "account_signer" in base58 encoding</param>
 /// <param name="signer_enc_pubkey">The current public key of "account_signer" in hexadecimal encoding</param>
 /// <param name="rawoperations">HEXASTRING (optional) - If we want to add a sign operation with other previous operations, here we must put previous rawoperations result</param>
 /// <remarks>Only one or none of signer_b58_pubkey, signer_b58_pubkey should be used. Populating both will result in an error.</remarks>
 /// <returns>Returns a Raw Operations Object</returns>
 public static Task <RawOperation> SignDelistAccountForSaleAsync(this IPascalCoinClient client, uint account_target, uint account_signer, uint last_n_operation, decimal fee, byte[] payload = null, PayloadEncryptionMethod?payloadMethod = null, string pwd = null, string signer_b58_pubkey = null, string signer_enc_pubkey = null, string rawoperations = null)
 {
     return(Task.Run(() => client.SignDelistAccountForSale(account_target, account_signer, last_n_operation, fee, payload, payloadMethod, pwd, signer_b58_pubkey, signer_enc_pubkey, rawoperations)));
 }
예제 #19
0
 /// <summary>
 /// Returns a HEXASTRING with decrypted text (a payload) using private keys in the wallet or a list of Passwords (used in "aes" encryption)
 /// </summary>
 /// <param name="payload">HEXASTRING - Encrypted data</param>
 /// <param name="pwds">List of passwords to use</param>
 /// <remarks>If using one of private keys is able to decrypt payload then returns value "key" in payload_method and enc_pubkey contains encoded public key in HEXASTRING</remarks>
 /// <remarks>If using one of passwords to decrypt payload then returns value "pwd" in payload_method and pwd contains password used</remarks>
 /// <returns>Decryped payload</returns>
 public static Task <DecryptedPayload> PayloadDecryptAsync(this IPascalCoinClient client, string payload, string[] pwds = null)
 {
     return(Task.Run(() => client.PayloadDecrypt(payload, pwds)));
 }
예제 #20
0
 /// <summary>
 /// Adds a node to connect
 /// </summary>
 /// <param name="nodes">String containing 1 or multiple IP:port separated by "{ }"</param>
 /// <returns>Returns an integer with nodes added</returns>
 public static Task <int> AddNodeAsync(this IPascalCoinClient client, string nodes)
 {
     return(Task.Run(() => client.AddNode(nodes)));
 }
예제 #21
0
 /// <summary>
 /// Creates a new Private key and sotres it on the wallet, returning an enc_pubkey value
 /// </summary>
 /// <param name="ec_nid">Type of key encryption</param>
 /// <param name="name">Name to alias this new private key</param>
 /// <returns></returns>
 public static Task <PublicKey> AddNewKeyAsync(this IPascalCoinClient client, KeyType ec_nid, string name)
 {
     return(Task.Run(() => client.AddNewKey(ec_nid, name)));
 }
예제 #22
0
 /// <summary>
 /// Signs a "Buy Account" operation, suitable for cold wallet usage.
 /// </summary>
 /// <param name="buyer_account">Account number of buyer who is purchasing the account</param>
 /// <param name="account_to_purchase">Account number being purchased</param>
 /// <param name="price">Settlement price of account being purchased</param>
 /// <param name="seller_account">Account of seller, receiving payment</param>
 /// <param name="new_b58_pubkey">Post-settlement public key in base58 encoded format.</param>
 /// <param name="new_enc_pubkey">Post-settlement public key in hexadecimal encoded format.</param>
 /// <param name="amount">Amount being transferred from buyer_account to seller_account (the settlement). This is a PASCURRENCY value.</param>
 /// <param name="last_n_operation">Last value of n_operation obtained with an Account object, for example when called to getaccount</param>
 /// <param name="fee">Fee of the operation. This is a PASCURRENCY value.</param>
 /// <param name="payload">Payload "item" that will be included in this operation</param>
 /// <param name="payloadMethod">Encode type of the item payload</param>
 /// <param name="pwd">Used to encrypt payload with aes as a payload_method. If none equals to empty password</param>
 /// <param name="signer_b58_pubkey">The current public key of "account_signer" in base58 encoding</param>
 /// <param name="signer_enc_pubkey">The current public key of "account_signer" in hexadecimal encoding</param>
 /// <param name="rawoperations">HEXASTRING (optional) - If we want to add a sign operation with other previous operations, here we must put previous rawoperations result</param>
 /// <remarks>Only one or none of new_b58_pubkey, new_enc_pubkey should be used. Populating both will result in an error.</remarks>
 /// <remarks>Only one or none of signer_b58_pubkey, signer_b58_pubkey should be used. Populating both will result in an error.</remarks>
 /// <returns>Returns a Raw Operations Object</returns>
 public static Task <RawOperation> SignBuyAccountAsync(this IPascalCoinClient client, uint buyer_account, uint account_to_purchase, decimal price, uint seller_account, string new_b58_pubkey, string new_enc_pubkey, decimal amount, uint last_n_operation, decimal fee, byte[] payload = null, PayloadEncryptionMethod?payloadMethod = null, string pwd = null, string signer_b58_pubkey = null, string signer_enc_pubkey = null, string rawoperations = null)
 {
     return(Task.Run(() => client.SignBuyAccount(buyer_account, account_to_purchase, price, seller_account, new_b58_pubkey, new_enc_pubkey, amount, last_n_operation, fee, payload, payloadMethod, pwd, signer_b58_pubkey, signer_enc_pubkey, rawoperations)));
 }
예제 #23
0
 /// <summary>
 /// Locks the Wallet if it has a password, otherwise wallet cannot be locked
 /// </summary>
 /// <returns>Returns a Boolean indicating if Wallet is locked. If false that means that Wallet has an empty password and cannot be locked</returns>
 public static Task <bool> LockAsync(this IPascalCoinClient client)
 {
     return(Task.Run(() => client.Lock()));
 }
예제 #24
0
 /// <summary>
 /// Returns information stored in a rawoperations param (obtained calling signchangekey or signsendto)
 /// </summary>
 /// <param name="rawoperations">HEXASTRING (obtained calling signchangekey or signsendto)</param>
 /// <returns>Returns a JSON Array with Operation Object items, one for each operation in rawoperations param. NOTE: Remember that rawoperations are operations that maybe are not correct</returns>
 public static Task <Operation[]> OperationsInfoAsync(this IPascalCoinClient client, string rawoperations)
 {
     return(Task.Run(() => client.OperationsInfo(rawoperations)));
 }
예제 #25
0
 /// <summary>
 /// Changes the password of the Wallet. (Must be previously unlocked) Note: If pwd param is empty string, then wallet will be not protected by password
 /// </summary>
 /// <param name="pwd">New password</param>
 /// <returns>Returns a Boolean if Wallet password changed with new pwd password</returns>
 public static Task <bool> SetWalletPasswordAsync(this IPascalCoinClient client, string pwd)
 {
     return(Task.Run(() => client.SetWalletPassword(pwd)));
 }
예제 #26
0
 /// <summary>
 /// Executes operations included in rawopertions param and transfers to the network. Raw operations can include "Send to" oprations or "Change key" operations.
 /// </summary>
 /// <param name="rawoperations">Executes operations included in rawopertions param and transfers to the network. Raw operations can include "Send to" oprations or "Change key" operations.</param>
 /// <remarks>For each Operation Object item, if there is an error, param valid will be false and param errors will show error description.Otherwise, operation is correct and will contain ophash param</remarks>
 /// <returns>Returns a JSON Array with Operation Object items, one for each operation in rawoperations param.</returns>
 public static Task <Operation[]> ExecuteOperationsAsync(this IPascalCoinClient client, string rawoperations)
 {
     return(Task.Run(() => client.ExecuteOperations(rawoperations)));
 }
예제 #27
0
 public static Task <SignResult> SignMessageAsync(this IPascalCoinClient client, string digest, string b58_pubkey, string enc_pubkey)
 {
     return(Task.Run(() => client.SignMessage(digest, b58_pubkey, enc_pubkey)));
 }
예제 #28
0
 /// <summary>
 /// Returns information of the Node in a JSON Object
 /// </summary>
 /// <returns>JSON Object with information</returns>
 public static Task <NodeStatus> NodeStatusAsync(this IPascalCoinClient client)
 {
     return(Task.Run(() => client.NodeStatus()));
 }
예제 #29
0
 public static Task <RawMultiOperation> MultiOperationAddAsync(this IPascalCoinClient client, string rawoperations, bool auto_n_operation, Sender[] senders, Receiver[] receivers, Changer[] changesinfo)
 {
     return(Task.Run(() => client.MultiOperationAdd(rawoperations, auto_n_operation, senders, receivers, changesinfo)));
 }
예제 #30
0
 /// <summary>
 /// Return a JSON Object in "Operation Object" format.
 /// </summary>
 /// <param name="ophash">HEXASTRING - Value ophash received on an operation</param>
 /// <returns>Returns "Operation Object" format JSON object</returns>
 public static Task <Operation> FindOperationAsync(this IPascalCoinClient client, string ophash)
 {
     return(Task.Run(() => client.FindOperation(ophash)));
 }