Skip to content

Commit

Permalink
Merge pull request #5 from stateless-solutions/stateless-get-proof
Browse files Browse the repository at this point in the history
feat: stateless proofs
  • Loading branch information
crisog authored Jul 1, 2024
2 parents 817d2bb + 9d1a059 commit 8d4ec5b
Show file tree
Hide file tree
Showing 17 changed files with 16,687 additions and 1,892 deletions.
8,576 changes: 7,799 additions & 777 deletions dist/ethers.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ethers.js.map

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion dist/ethers.min.js

Large diffs are not rendered by default.

8,587 changes: 7,803 additions & 784 deletions dist/ethers.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ethers.umd.js.map

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion dist/ethers.umd.min.js

Large diffs are not rendered by default.

16 changes: 14 additions & 2 deletions lib.commonjs/providers/provider-stateless.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Networkish } from "./network.js";
import { JsonRpcApiProviderOptions, JsonRpcPayload, JsonRpcProvider, JsonRpcResult } from "./provider-jsonrpc.js";
import { JsonRpcApiProviderOptions, JsonRpcError, JsonRpcPayload, JsonRpcProvider, JsonRpcResult } from "./provider-jsonrpc.js";
/**
* An attestation consists of the signature of the attester and cryptographic proof
*/
Expand Down Expand Up @@ -30,6 +30,9 @@ export type Attestation = {
export type AttestedJsonRpcResult = JsonRpcResult & {
attestations: Array<Attestation>;
};
export type AttestedJsonRpcError = JsonRpcError & {
attestations: Array<Attestation>;
};
export declare class StatelessProvider extends JsonRpcProvider {
/**
* Minimum number of matching attestations required to consider a response valid
Expand All @@ -39,7 +42,16 @@ export declare class StatelessProvider extends JsonRpcProvider {
* The expected identities for the attestations
*/
identities: string[];
constructor(url: string, identities: string[], minimumRequiredAttestations?: number, network?: Networkish, options?: JsonRpcApiProviderOptions);
private prover;
constructor(url: string, identities: string[], minimumRequiredAttestations?: number, proverUrl?: string, network?: Networkish, options?: JsonRpcApiProviderOptions);
_send(payload: JsonRpcPayload | Array<JsonRpcPayload>): Promise<Array<JsonRpcResult>>;
private verifyAttestations;
private extractDefinedProperties;
private verifyStatelessProof;
private verifyAttestedJsonRpcResponse;
private verifyAttestation;
private verifySignature;
private publicKeyFromIdentity;
private fromHexString;
}
//# sourceMappingURL=provider-stateless.d.ts.map
2 changes: 1 addition & 1 deletion lib.commonjs/providers/provider-stateless.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

274 changes: 181 additions & 93 deletions lib.commonjs/providers/provider-stateless.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8d4ec5b

Please sign in to comment.