From 75523f663eab32d3c5fe8d8cd3e8e18afaccb3a7 Mon Sep 17 00:00:00 2001 From: Dmytro Sukhyi Date: Fri, 4 Oct 2024 13:41:58 +0100 Subject: [PATCH] shell.Shell replaced with schemaloaders.IPFSClient interface --- auth.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/auth.go b/auth.go index 46a0cba..8999e8b 100644 --- a/auth.go +++ b/auth.go @@ -28,7 +28,6 @@ import ( "github.com/iden3/iden3comm/v2" "github.com/iden3/iden3comm/v2/packers" "github.com/iden3/iden3comm/v2/protocol" - shell "github.com/ipfs/go-ipfs-api" "github.com/piprate/json-gold/ld" "github.com/pkg/errors" ) @@ -117,7 +116,7 @@ func WithDocumentLoader(docLoader ld.DocumentLoader) VerifierOption { // WithIPFSClient sets the IPFS client for document loader of Verifier instance. // If document loader is set with WithDocumentLoader function, this option is // ignored. -func WithIPFSClient(ipfsCli *shell.Shell) VerifierOption { +func WithIPFSClient(ipfsCli schemaloaders.IPFSClient) VerifierOption { return func(opts *verifierOpts) { opts.ipfsCli = ipfsCli } @@ -142,7 +141,7 @@ func WithDIDResolver(resolver packers.DIDResolverHandlerFunc) VerifierOption { type verifierOpts struct { docLoader ld.DocumentLoader - ipfsCli *shell.Shell + ipfsCli schemaloaders.IPFSClient ipfsGW string didResolver packers.DIDResolverHandlerFunc } @@ -639,7 +638,7 @@ func findProofByRequestID(arr []protocol.ZeroKnowledgeProofResponse, id uint32) return nil } -func getDocumentLoader(docLoader ld.DocumentLoader, ipfsCli *shell.Shell, +func getDocumentLoader(docLoader ld.DocumentLoader, ipfsCli schemaloaders.IPFSClient, ipfsGW string) ld.DocumentLoader { if docLoader != nil {