/// <inheritdoc />
        public virtual async Task <ParseResponseResult> LookupDefinitionAsync(Pool pool,
                                                                              string definitionId)
        {
            var req = await IndyLedger.BuildGetCredDefRequestAsync(null, definitionId);

            var res = await IndyLedger.SubmitRequestAsync(pool, req);

            return(await IndyLedger.ParseGetCredDefResponseAsync(res));
        }
Exemple #2
0
        /// <inheritdoc />
        public virtual async Task <ParseResponseResult> LookupDefinitionAsync(IAgentContext agentContext,
                                                                              string definitionId)
        {
            async Task <ParseResponseResult> LookupDefinition()
            {
                var req = await IndyLedger.BuildGetCredDefRequestAsync(null, definitionId);

                var res = await IndyLedger.SubmitRequestAsync(await agentContext.Pool, req);

                return(await IndyLedger.ParseGetCredDefResponseAsync(res));
            }

            return(await ResilienceUtils.RetryPolicyAsync(
                       action : LookupDefinition,
                       exceptionPredicate : (IndyException e) => e.SdkErrorCode == 309));
        }