diff --git a/dart/lib/okapi.dart b/dart/lib/okapi.dart index 988349df..7df7e36b 100644 --- a/dart/lib/okapi.dart +++ b/dart/lib/okapi.dart @@ -47,17 +47,10 @@ class LdProofs { static final _ldproofsCreateProof = OkapiNative.library .lookupFunction( 'ldproofs_create_proof'); - static final _ldproofsVerifyProof = OkapiNative.library - .lookupFunction( - 'ldproofs_verify_proof'); static CreateProofResponse createProof(CreateProofRequest request) => OkapiNative.nativeCall( _ldproofsCreateProof, request, CreateProofResponse()); - - static VerifyProofResponse verifyProof(VerifyProofRequest request) => - OkapiNative.nativeCall( - _ldproofsVerifyProof, request, VerifyProofResponse()); } class Oberon { @@ -76,7 +69,7 @@ class Oberon { 'oberon_unblind_token'); static final _oberonVerifyToken = OkapiNative.library .lookupFunction( - 'oberon_verify_token'); + 'oberon_verify_token'); static final _oberonVerifyProof = OkapiNative.library .lookupFunction( 'oberon_verify_proof'); @@ -101,7 +94,7 @@ class Oberon { OkapiNative.nativeCall( _oberonUnBlindToken, request, UnBlindOberonTokenResponse()); static VerifyOberonTokenResponse VerifyToken( - VerifyOberonTokenRequest request) => + VerifyOberonTokenRequest request) => OkapiNative.nativeCall( _oberonVerifyToken, request, VerifyOberonTokenResponse()); static VerifyOberonProofResponse VerifyProof( diff --git a/dotnet/Library/Okapi/LDProofs.cs b/dotnet/Library/Okapi/LDProofs.cs index e530f5cf..86d1d0a3 100644 --- a/dotnet/Library/Okapi/LDProofs.cs +++ b/dotnet/Library/Okapi/LDProofs.cs @@ -13,9 +13,4 @@ public static CreateProofResponse CreateProof(CreateProofRequest request) { return Native.Call(request, Native.ldproofs_create_proof); } - - public static VerifyProofResponse VerifyProof(VerifyProofRequest request) - { - return Native.Call(request, Native.ldproofs_verify_proof); - } } \ No newline at end of file diff --git a/dotnet/Library/Okapi/Native.cs b/dotnet/Library/Okapi/Native.cs index 0b15b31e..43a20233 100644 --- a/dotnet/Library/Okapi/Native.cs +++ b/dotnet/Library/Okapi/Native.cs @@ -90,11 +90,7 @@ internal static TResponse Call(TRequest request, NativeMeth [DllImport(LibraryName, CharSet = CharSet.Auto, BestFitMapping = false, ThrowOnUnmappableChar = true)] internal static extern int ldproofs_create_proof(ByteBuffer request, out ByteBuffer response, out ExternError error); - - [DllImport(LibraryName, CharSet = CharSet.Auto, BestFitMapping = false, ThrowOnUnmappableChar = true)] - internal static extern int - ldproofs_verify_proof(ByteBuffer request, out ByteBuffer response, out ExternError error); - + #endregion #region Oberon diff --git a/go/okapi/ldproofs.go b/go/okapi/ldproofs.go index 0b922b6a..49d4de33 100644 --- a/go/okapi/ldproofs.go +++ b/go/okapi/ldproofs.go @@ -5,7 +5,6 @@ import "github.com/trinsic-id/okapi/go/okapiproto" // LdProofer implements Linked-Data Proofs type LdProofer interface { CreateProof(request *okapiproto.CreateProofRequest) (*okapiproto.CreateProofResponse, error) - VerifyProof(request *okapiproto.VerifyProofRequest) (*okapiproto.VerifyProofResponse, error) } // LdProofs implements Linked-Data Proofs @@ -20,9 +19,3 @@ func (l *ldProofs) CreateProof(request *okapiproto.CreateProofRequest) (*okapipr err := callOkapiNative(request, &response, "ldproofs_create_proof") return &response, err } - -func (l *ldProofs) VerifyProof(request *okapiproto.VerifyProofRequest) (*okapiproto.VerifyProofResponse, error) { - response := okapiproto.VerifyProofResponse{} - err := callOkapiNative(request, &response, "ldproofs_verify_proof") - return &response, err -} diff --git a/java/src/main/java/trinsic/okapi/LdProofs.java b/java/src/main/java/trinsic/okapi/LdProofs.java index 8e225731..89f4ee54 100644 --- a/java/src/main/java/trinsic/okapi/LdProofs.java +++ b/java/src/main/java/trinsic/okapi/LdProofs.java @@ -12,13 +12,4 @@ public static Proofs.CreateProofResponse createProof(Proofs.CreateProofRequest r errBuffer.raiseError(result); return Proofs.CreateProofResponse.parseFrom(bufferToByteArray(responseBuffer)); } - - public static Proofs.VerifyProofResponse verifyProof(Proofs.VerifyProofRequest request) throws DidException, InvalidProtocolBufferException { - OkapiByteBuffer.ByValue requestBuffer = messageToBuffer(request); - OkapiByteBuffer responseBuffer = new OkapiByteBuffer(); - ExternError errBuffer = new ExternError(); - var result = getNativeLibrary().ldproofs_verify_proof(requestBuffer, responseBuffer, errBuffer); - errBuffer.raiseError(result); - return Proofs.VerifyProofResponse.parseFrom(bufferToByteArray(responseBuffer)); - } } diff --git a/java/src/main/java/trinsic/okapi/OkapiNative.java b/java/src/main/java/trinsic/okapi/OkapiNative.java index 3d54ff1c..bcd82669 100644 --- a/java/src/main/java/trinsic/okapi/OkapiNative.java +++ b/java/src/main/java/trinsic/okapi/OkapiNative.java @@ -104,8 +104,6 @@ public interface IOkapiC extends com.sun.jna.Library { int blake3_derive_key(OkapiByteBuffer.ByValue request, OkapiByteBuffer response, ExternError err); - int ldproofs_verify_proof(OkapiByteBuffer.ByValue request, OkapiByteBuffer response, ExternError err); - int oberon_create_key(OkapiByteBuffer.ByValue request, OkapiByteBuffer response, ExternError err); int oberon_create_token(OkapiByteBuffer.ByValue request, OkapiByteBuffer response, ExternError err); diff --git a/native/src/ffi/ldproofs.rs b/native/src/ffi/ldproofs.rs index 421402e4..28daa67d 100644 --- a/native/src/ffi/ldproofs.rs +++ b/native/src/ffi/ldproofs.rs @@ -4,9 +4,4 @@ use ffi_support::{ByteBuffer, ExternError}; #[no_mangle] pub extern "C" fn ldproofs_create_proof(request: ByteBuffer, response: &mut ByteBuffer, err: &mut ExternError) -> i32 { c_impl!(CreateProofRequest, LdProofs, create_proof, request, response, err) -} - -#[no_mangle] -pub extern "C" fn ldproofs_verify_proof(request: ByteBuffer, response: &mut ByteBuffer, err: &mut ExternError) -> i32 { - c_impl!(VerifyProofRequest, LdProofs, verify_proof, request, response, err) -} +} \ No newline at end of file diff --git a/native/src/ldproofs/mod.rs b/native/src/ldproofs/mod.rs index e52dbe80..92310e16 100644 --- a/native/src/ldproofs/mod.rs +++ b/native/src/ldproofs/mod.rs @@ -57,10 +57,6 @@ impl crate::LdProofs { signed_document: Some(unsigned_document.into()), }) } - - pub fn verify_proof<'a>(_request: &VerifyProofRequest) -> Result> { - todo!() - } } impl From<&Struct> for JcsEd25519Signature2020 { diff --git a/python/trinsicokapi/ldproofs.py b/python/trinsicokapi/ldproofs.py index 103c742b..a78d1c05 100644 --- a/python/trinsicokapi/ldproofs.py +++ b/python/trinsicokapi/ldproofs.py @@ -12,10 +12,3 @@ def create(request: CreateProofRequest) -> CreateProofResponse: "ldproofs_create_proof", request, CreateProofResponse ) return response - - -def verify(request: VerifyProofRequest) -> VerifyProofResponse: - response = _typed_wrap_and_call( - "ldproofs_verify_proof", request, VerifyProofResponse - ) - return response diff --git a/ruby/lib/okapi.rb b/ruby/lib/okapi.rb index 7b87f6fd..0311f700 100644 --- a/ruby/lib/okapi.rb +++ b/ruby/lib/okapi.rb @@ -69,7 +69,6 @@ def self.load_native_library attach_function :didcomm_verify, [ByteBuffer.by_value, ByteBuffer.by_ref, ExternError.by_ref], :int attach_function :ldproofs_create_proof, [ByteBuffer.by_value, ByteBuffer.by_ref, ExternError.by_ref], :int - attach_function :ldproofs_verify_proof, [ByteBuffer.by_value, ByteBuffer.by_ref, ExternError.by_ref], :int attach_function :oberon_create_key, [ByteBuffer.by_value, ByteBuffer.by_ref, ExternError.by_ref], :int attach_function :oberon_create_token, [ByteBuffer.by_value, ByteBuffer.by_ref, ExternError.by_ref], :int diff --git a/ruby/lib/okapi/ld_proofs.rb b/ruby/lib/okapi/ld_proofs.rb index 87ec1ec7..aac48ce2 100644 --- a/ruby/lib/okapi/ld_proofs.rb +++ b/ruby/lib/okapi/ld_proofs.rb @@ -7,10 +7,5 @@ def self.create(request) Okapi.verify_type(request, Okapi::Proofs::V1::CreateProofRequest) Okapi.ffi_call('ldproofs_create_proof', request, Okapi::Proofs::V1::CreateProofResponse) end - - def self.verify(request) - Okapi.verify_type(request, Okapi::Proofs::V1::VerifyProofRequest) - Okapi.ffi_call('ldproofs_verify_proof', request, Okapi::Proofs::V1::VerifyProofResponse) - end end end \ No newline at end of file diff --git a/wasm/packages/okapi/src/index.ts b/wasm/packages/okapi/src/index.ts index 69edb09c..b51a5869 100644 --- a/wasm/packages/okapi/src/index.ts +++ b/wasm/packages/okapi/src/index.ts @@ -76,7 +76,7 @@ export class DIDComm { } export class LdProofs { - static async generate( + static async createProof( request: proto.CreateProofRequest ): Promise { await initialize(); @@ -87,18 +87,6 @@ export class LdProofs { ) ); } - - static async convert( - request: proto.VerifyProofRequest - ): Promise { - await initialize(); - - return proto.VerifyProofResponse.decode( - native.ldproofs_verify_proof( - proto.VerifyProofRequest.encode(request).finish() - ) - ); - } } export class Oberon { diff --git a/wasm/src/ldproofs.rs b/wasm/src/ldproofs.rs index d322285d..56bca1ec 100644 --- a/wasm/src/ldproofs.rs +++ b/wasm/src/ldproofs.rs @@ -6,8 +6,3 @@ use wasm_bindgen::prelude::*; pub fn ldproofs_create_proof(request: Uint8Array) -> Result { impl_invoke!(CreateProofRequest, LdProofs, create_proof, request) } - -#[wasm_bindgen] -pub fn ldproofs_verify_proof(request: Uint8Array) -> Result { - impl_invoke!(VerifyProofRequest, LdProofs, create_proof, request) -}