/// <inheritdoc />
        public virtual async Task <IndyAml> LookupAmlAsync(
            IAgentContext context,
            DateTimeOffset timestamp = default(DateTimeOffset),
            string version           = null)
        {
            IndyAml ParseAml(string response)
            {
                var jresponse = JObject.Parse(response);

                if (jresponse["result"]["data"].HasValues)
                {
                    return(jresponse["result"]["data"].ToObject <IndyAml>());
                }
                return(null);
            };

            var req = await Ledger.BuildGetAcceptanceMechanismsRequestAsync(
                null,
                timestamp == DateTimeOffset.MinValue? -1 : timestamp.ToUnixTimeSeconds(),
                version);

            var res = await Ledger.SubmitRequestAsync(await context.Pool, req);

            EnsureSuccessResponse(res);

            return(ParseAml(res));
        }