Пример #1
0
        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));
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }
Пример #4
0
        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);
        }
Пример #5
0
        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);
        }
Пример #6
0
        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));
        }
Пример #7
0
        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));
        }
Пример #8
0
        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);
        }
Пример #9
0
        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);
        }
Пример #10
0
        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);
        }
Пример #11
0
        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);
        }
Пример #12
0
        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);
        }
Пример #13
0
        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);
        }
Пример #14
0
        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);
        }
Пример #15
0
        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);
        }
Пример #16
0
        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);
        }
Пример #17
0
        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);
        }
Пример #18
0
        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);
        }
Пример #19
0
        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);
        }
Пример #20
0
        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);
        }