コード例 #1
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)));
 }