/// <summary> /// Builds a GET_ATTRIB ledger request. /// </summary> /// <remarks> /// <para> /// Builds a request message that is suitable for requesting an attribute from the /// ledger. /// </para> /// </remarks> /// <param name="submitterDid">The DID of the submitter.</param> /// <param name="targetDid">The target DID.</param> /// <param name="data">The name of the attribute to get.</param> /// <returns>An asynchronous <see cref="Task{T}"/> that resolves to a <see cref="string"/> /// containing the request JSON. </returns> public static Task <string> BuildGetAttribRequestAsync(string submitterDid, string targetDid, string data) { var taskCompletionSource = new TaskCompletionSource <string>(); var commandHandle = PendingCommands.Add(taskCompletionSource); var result = IndyNativeMethods.indy_build_get_attrib_request( commandHandle, submitterDid, targetDid, data, _buildRequestCallback ); CallbackHelper.CheckResult(result); return(taskCompletionSource.Task); }