static void BuildMintRequestCallbackMethod(int xcommand_handle, int err, string mint_req_json, string payment_method) { var taskCompletionSource = PendingCommands.Remove <PaymentResult>(xcommand_handle); if (!CallbackHelper.CheckCallback(taskCompletionSource, err)) { return; } taskCompletionSource.SetResult(new PaymentResult(mint_req_json, payment_method)); }
static void BuildGetTxnFeesReqCallbackMethod(int xcommand_handle, int err, string get_txn_fees_json) { var taskCompletionSource = PendingCommands.Remove <string>(xcommand_handle); if (!CallbackHelper.CheckCallback(taskCompletionSource, err)) { return; } taskCompletionSource.SetResult(get_txn_fees_json); }
private static void GenerateWalletKeyCallbackMethod(int xcommand_handle, int err, string key) { var taskCompletionSource = PendingCommands.Remove <string>(xcommand_handle); if (!CallbackHelper.CheckCallback(taskCompletionSource, err)) { return; } taskCompletionSource.SetResult(key); }
private static void ListMyDidsWithMetaCompletedCallback(int xcommand_handle, int err, string dids) { var taskCompletionSource = PendingCommands.Remove <string>(xcommand_handle); if (!CallbackHelper.CheckCallback(taskCompletionSource, err)) { return; } taskCompletionSource.SetResult(dids); }
private static void GetPairwiseCallback(int xcommand_handle, int err, string get_pairwise_json) { var taskCompletionSource = PendingCommands.Remove <string>(xcommand_handle); if (!CallbackHelper.CheckCallback(taskCompletionSource, err)) { return; } taskCompletionSource.SetResult(get_pairwise_json); }
private static void OpenWalletCallbackMethod(int xcommand_handle, int err, int wallet_handle) { var taskCompletionSource = PendingCommands.Remove <Wallet>(xcommand_handle); if (!CallbackHelper.CheckCallback(taskCompletionSource, err)) { return; } taskCompletionSource.SetResult(new Wallet(wallet_handle)); }
private static void ParseResponseCallbackMethod(int xcommand_handle, int err, string id, string object_json) { var taskCompletionSource = PendingCommands.Remove <ParseResponseResult>(xcommand_handle); if (!CallbackHelper.CheckCallback(taskCompletionSource, err)) { return; } taskCompletionSource.SetResult(new ParseResponseResult(id, object_json)); }
private static void IsPairwiseExistsCallback(int xcommand_handle, int err, bool exists) { var taskCompletionSource = PendingCommands.Remove <bool>(xcommand_handle); if (!CallbackHelper.CheckCallback(taskCompletionSource, err)) { return; } taskCompletionSource.SetResult(exists); }
private static void BuildRequestCallbackMethod(int xcommand_handle, int err, string request_json) { var taskCompletionSource = PendingCommands.Remove <string>(xcommand_handle); if (!CallbackHelper.CheckCallback(taskCompletionSource, err)) { return; } taskCompletionSource.SetResult(request_json); }
private static void KeyForLocalDidCompletedCallback(int xcommand_handle, int err, string key) { var taskCompletionSource = PendingCommands.Remove <string>(xcommand_handle); if (!CallbackHelper.CheckCallback(taskCompletionSource, err)) { return; } taskCompletionSource.SetResult(key); }
private static void ReplaceKeysCallback(int xcommand_handle, int err, string verkey) { var taskCompletionSource = PendingCommands.Remove <string>(xcommand_handle); if (!CallbackHelper.CheckCallback(taskCompletionSource, err)) { return; } taskCompletionSource.SetResult(verkey); }
static void CreatePaymentAddressCallbackMethod(int xcommand_handle, int err, string payment_address) { var taskCompletionSource = PendingCommands.Remove <string>(xcommand_handle); if (!CallbackHelper.CheckCallback(taskCompletionSource, err)) { return; } taskCompletionSource.SetResult(payment_address); }
static void ParsePaymentResponseCallbackMethod(int xcommand_handle, int err, string utxo_json) { var taskCompletionSource = PendingCommands.Remove <string>(xcommand_handle); if (!CallbackHelper.CheckCallback(taskCompletionSource, err)) { return; } taskCompletionSource.SetResult(utxo_json); }
private static void GetDidMetadataCompletedCallback(int xcommand_handle, int err, string metadata) { var taskCompletionSource = PendingCommands.Remove <string>(xcommand_handle); if (!CallbackHelper.CheckCallback(taskCompletionSource, err)) { return; } taskCompletionSource.SetResult(metadata); }
private static void CreateAndStoreMyDidCallbackMethod(int xcommand_handle, int err, string did, string verkey) { var taskCompletionSource = PendingCommands.Remove <CreateAndStoreMyDidResult>(xcommand_handle); if (!CallbackHelper.CheckCallback(taskCompletionSource, err)) { return; } var callbackResult = new CreateAndStoreMyDidResult(did, verkey); taskCompletionSource.SetResult(callbackResult); }
private static void GetEndpointForDidCompletedCallbackMethod(int xcommand_handle, int err, string endpoint, string transport_vk) { var taskCompletionSource = PendingCommands.Remove <EndpointForDidResult>(xcommand_handle); if (!CallbackHelper.CheckCallback(taskCompletionSource, err)) { return; } var result = new EndpointForDidResult(endpoint, transport_vk); taskCompletionSource.SetResult(result); }
private static void CryptoSignCompletedCallbackMethod(int xcommand_handle, int err, IntPtr signature_raw, int signature_len) { var taskCompletionSource = PendingCommands.Remove <byte[]>(xcommand_handle); if (!CallbackHelper.CheckCallback(taskCompletionSource, err)) { return; } var signatureBytes = new byte[signature_len]; Marshal.Copy(signature_raw, signatureBytes, 0, signature_len); taskCompletionSource.SetResult(signatureBytes); }
private static void UnpackMessageCompletedCallbackMethod(int command_handle, int err, IntPtr msg_data, int msg_len) { var taskCompletionSource = PendingCommands.Remove <byte[]>(command_handle); if (!CallbackHelper.CheckCallback(taskCompletionSource, err)) { return; } var decryptedMsgBytes = new byte[msg_len]; Marshal.Copy(msg_data, decryptedMsgBytes, 0, msg_len); taskCompletionSource.SetResult(decryptedMsgBytes); }
private static void CryptoEncryptCompletedCallbackMethod(int xcommand_handle, int err, IntPtr encrypted_msg, int encrypted_len) { var taskCompletionSource = PendingCommands.Remove <byte[]>(xcommand_handle); if (!CallbackHelper.CheckCallback(taskCompletionSource, err)) { return; } var messageBytes = new byte[encrypted_len]; Marshal.Copy(encrypted_msg, messageBytes, 0, encrypted_len); taskCompletionSource.SetResult(messageBytes); }
private static void CryptoAuthDecryptCompletedCallbackMethod(int command_handle, int err, string their_vk, IntPtr msg_data, int msg_len) { var taskCompletionSource = PendingCommands.Remove <AuthDecryptResult>(command_handle); if (!CallbackHelper.CheckCallback(taskCompletionSource, err)) { return; } var messageBytes = new byte[msg_len]; Marshal.Copy(msg_data, messageBytes, 0, msg_len); var result = new AuthDecryptResult(their_vk, messageBytes); taskCompletionSource.SetResult(result); }