Skip to content

Commit 7a35aef

Browse files
Remove LdProofs.VerifyProof (#425)
1 parent 2abe3bc commit 7a35aef

13 files changed

Lines changed: 5 additions & 78 deletions

File tree

dart/lib/okapi.dart

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,10 @@ class LdProofs {
4747
static final _ldproofsCreateProof = OkapiNative.library
4848
.lookupFunction<OkapiFunctionNative, OkapiFunction>(
4949
'ldproofs_create_proof');
50-
static final _ldproofsVerifyProof = OkapiNative.library
51-
.lookupFunction<OkapiFunctionNative, OkapiFunction>(
52-
'ldproofs_verify_proof');
5350

5451
static CreateProofResponse createProof(CreateProofRequest request) =>
5552
OkapiNative.nativeCall(
5653
_ldproofsCreateProof, request, CreateProofResponse());
57-
58-
static VerifyProofResponse verifyProof(VerifyProofRequest request) =>
59-
OkapiNative.nativeCall(
60-
_ldproofsVerifyProof, request, VerifyProofResponse());
6154
}
6255

6356
class Oberon {
@@ -76,7 +69,7 @@ class Oberon {
7669
'oberon_unblind_token');
7770
static final _oberonVerifyToken = OkapiNative.library
7871
.lookupFunction<OkapiFunctionNative, OkapiFunction>(
79-
'oberon_verify_token');
72+
'oberon_verify_token');
8073
static final _oberonVerifyProof = OkapiNative.library
8174
.lookupFunction<OkapiFunctionNative, OkapiFunction>(
8275
'oberon_verify_proof');
@@ -101,7 +94,7 @@ class Oberon {
10194
OkapiNative.nativeCall(
10295
_oberonUnBlindToken, request, UnBlindOberonTokenResponse());
10396
static VerifyOberonTokenResponse VerifyToken(
104-
VerifyOberonTokenRequest request) =>
97+
VerifyOberonTokenRequest request) =>
10598
OkapiNative.nativeCall(
10699
_oberonVerifyToken, request, VerifyOberonTokenResponse());
107100
static VerifyOberonProofResponse VerifyProof(

dotnet/Library/Okapi/LDProofs.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,4 @@ public static CreateProofResponse CreateProof(CreateProofRequest request)
1313
{
1414
return Native.Call<CreateProofRequest, CreateProofResponse>(request, Native.ldproofs_create_proof);
1515
}
16-
17-
public static VerifyProofResponse VerifyProof(VerifyProofRequest request)
18-
{
19-
return Native.Call<VerifyProofRequest, VerifyProofResponse>(request, Native.ldproofs_verify_proof);
20-
}
2116
}

dotnet/Library/Okapi/Native.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,7 @@ internal static TResponse Call<TRequest, TResponse>(TRequest request, NativeMeth
9090
[DllImport(LibraryName, CharSet = CharSet.Auto, BestFitMapping = false, ThrowOnUnmappableChar = true)]
9191
internal static extern int
9292
ldproofs_create_proof(ByteBuffer request, out ByteBuffer response, out ExternError error);
93-
94-
[DllImport(LibraryName, CharSet = CharSet.Auto, BestFitMapping = false, ThrowOnUnmappableChar = true)]
95-
internal static extern int
96-
ldproofs_verify_proof(ByteBuffer request, out ByteBuffer response, out ExternError error);
97-
93+
9894
#endregion
9995

10096
#region Oberon

go/okapi/ldproofs.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import "github.com/trinsic-id/okapi/go/okapiproto"
55
// LdProofer implements Linked-Data Proofs
66
type LdProofer interface {
77
CreateProof(request *okapiproto.CreateProofRequest) (*okapiproto.CreateProofResponse, error)
8-
VerifyProof(request *okapiproto.VerifyProofRequest) (*okapiproto.VerifyProofResponse, error)
98
}
109

1110
// LdProofs implements Linked-Data Proofs
@@ -20,9 +19,3 @@ func (l *ldProofs) CreateProof(request *okapiproto.CreateProofRequest) (*okapipr
2019
err := callOkapiNative(request, &response, "ldproofs_create_proof")
2120
return &response, err
2221
}
23-
24-
func (l *ldProofs) VerifyProof(request *okapiproto.VerifyProofRequest) (*okapiproto.VerifyProofResponse, error) {
25-
response := okapiproto.VerifyProofResponse{}
26-
err := callOkapiNative(request, &response, "ldproofs_verify_proof")
27-
return &response, err
28-
}

java/src/main/java/trinsic/okapi/LdProofs.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,4 @@ public static Proofs.CreateProofResponse createProof(Proofs.CreateProofRequest r
1212
errBuffer.raiseError(result);
1313
return Proofs.CreateProofResponse.parseFrom(bufferToByteArray(responseBuffer));
1414
}
15-
16-
public static Proofs.VerifyProofResponse verifyProof(Proofs.VerifyProofRequest request) throws DidException, InvalidProtocolBufferException {
17-
OkapiByteBuffer.ByValue requestBuffer = messageToBuffer(request);
18-
OkapiByteBuffer responseBuffer = new OkapiByteBuffer();
19-
ExternError errBuffer = new ExternError();
20-
var result = getNativeLibrary().ldproofs_verify_proof(requestBuffer, responseBuffer, errBuffer);
21-
errBuffer.raiseError(result);
22-
return Proofs.VerifyProofResponse.parseFrom(bufferToByteArray(responseBuffer));
23-
}
2415
}

java/src/main/java/trinsic/okapi/OkapiNative.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ public interface IOkapiC extends com.sun.jna.Library {
104104

105105
int blake3_derive_key(OkapiByteBuffer.ByValue request, OkapiByteBuffer response, ExternError err);
106106

107-
int ldproofs_verify_proof(OkapiByteBuffer.ByValue request, OkapiByteBuffer response, ExternError err);
108-
109107
int oberon_create_key(OkapiByteBuffer.ByValue request, OkapiByteBuffer response, ExternError err);
110108

111109
int oberon_create_token(OkapiByteBuffer.ByValue request, OkapiByteBuffer response, ExternError err);

native/src/ffi/ldproofs.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,4 @@ use ffi_support::{ByteBuffer, ExternError};
44
#[no_mangle]
55
pub extern "C" fn ldproofs_create_proof(request: ByteBuffer, response: &mut ByteBuffer, err: &mut ExternError) -> i32 {
66
c_impl!(CreateProofRequest, LdProofs, create_proof, request, response, err)
7-
}
8-
9-
#[no_mangle]
10-
pub extern "C" fn ldproofs_verify_proof(request: ByteBuffer, response: &mut ByteBuffer, err: &mut ExternError) -> i32 {
11-
c_impl!(VerifyProofRequest, LdProofs, verify_proof, request, response, err)
12-
}
7+
}

native/src/ldproofs/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ impl crate::LdProofs {
5757
signed_document: Some(unsigned_document.into()),
5858
})
5959
}
60-
61-
pub fn verify_proof<'a>(_request: &VerifyProofRequest) -> Result<VerifyProofResponse, Error<'a>> {
62-
todo!()
63-
}
6460
}
6561

6662
impl From<&Struct> for JcsEd25519Signature2020 {

python/trinsicokapi/ldproofs.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,3 @@ def create(request: CreateProofRequest) -> CreateProofResponse:
1212
"ldproofs_create_proof", request, CreateProofResponse
1313
)
1414
return response
15-
16-
17-
def verify(request: VerifyProofRequest) -> VerifyProofResponse:
18-
response = _typed_wrap_and_call(
19-
"ldproofs_verify_proof", request, VerifyProofResponse
20-
)
21-
return response

ruby/lib/okapi.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ def self.load_native_library
6969
attach_function :didcomm_verify, [ByteBuffer.by_value, ByteBuffer.by_ref, ExternError.by_ref], :int
7070

7171
attach_function :ldproofs_create_proof, [ByteBuffer.by_value, ByteBuffer.by_ref, ExternError.by_ref], :int
72-
attach_function :ldproofs_verify_proof, [ByteBuffer.by_value, ByteBuffer.by_ref, ExternError.by_ref], :int
7372

7473
attach_function :oberon_create_key, [ByteBuffer.by_value, ByteBuffer.by_ref, ExternError.by_ref], :int
7574
attach_function :oberon_create_token, [ByteBuffer.by_value, ByteBuffer.by_ref, ExternError.by_ref], :int

0 commit comments

Comments
 (0)