@vlayer/sdk 0.1.0-nightly-20241106-80f6e8d → 0.1.0-nightly-20241107-ce9056c
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/api/email/dnsResolver.test.js +1 -1
- package/dist/api/email/parseEmail.test.js +1 -1
- package/dist/api/email/preverify.js +2 -2
- package/dist/api/email/preverify.test.js +2 -2
- package/dist/api/helpers.d.ts +1 -1
- package/dist/api/lib/client.d.ts +2 -2
- package/dist/api/lib/client.js +3 -3
- package/dist/api/lib/client.test.js +2 -2
- package/dist/api/lib/types/ethereum.d.ts +1 -1
- package/dist/api/lib/types/index.d.ts +3 -3
- package/dist/api/lib/types/index.js +3 -3
- package/dist/api/lib/types/webProofProvider.d.ts +2 -2
- package/dist/api/prover.d.ts +1 -1
- package/dist/api/prover.js +1 -1
- package/dist/api/v_call.d.ts +1 -1
- package/dist/api/webProof/createWebProof.d.ts +1 -1
- package/dist/api/webProof/index.d.ts +3 -3
- package/dist/api/webProof/index.js +3 -3
- package/dist/api/webProof/providers/extension.d.ts +1 -1
- package/dist/api/webProof/providers/extension.js +1 -1
- package/dist/api/webProof/providers/index.d.ts +1 -1
- package/dist/api/webProof/providers/index.js +1 -1
- package/dist/api/webProof/steps/expectUrl.d.ts +1 -1
- package/dist/api/webProof/steps/expectUrl.js +1 -1
- package/dist/api/webProof/steps/index.d.ts +6 -6
- package/dist/api/webProof/steps/index.js +3 -3
- package/dist/api/webProof/steps/notarize.d.ts +1 -1
- package/dist/api/webProof/steps/notarize.js +1 -1
- package/dist/api/webProof/steps/startPage.d.ts +1 -1
- package/dist/api/webProof/steps/startPage.js +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +6 -6
- package/dist/web-proof-commons/index.d.ts +3 -3
- package/dist/web-proof-commons/index.js +3 -3
- package/dist/web-proof-commons/types/message.d.ts +3 -2
- package/dist/web-proof-commons/types/message.js +1 -0
- package/package.json +5 -4
@@ -1,5 +1,5 @@
|
|
1
1
|
import { describe, expect, test } from "vitest";
|
2
|
-
import { resolveDkimDns } from "./dnsResolver";
|
2
|
+
import { resolveDkimDns } from "./dnsResolver.js";
|
3
3
|
describe("resolveDkimDns Integration", () => {
|
4
4
|
test("resolves VLayer DNS", async () => {
|
5
5
|
const resolved = await resolveDkimDns("vlayer-xyz.20230601.gappssmtp.com", "20230601");
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { describe, expect, test } from "vitest";
|
2
|
-
import { getDkimSigners, parseEmail, parseParams } from "./parseEmail";
|
2
|
+
import { getDkimSigners, parseEmail, parseParams } from "./parseEmail.js";
|
3
3
|
const emailHeaders = `From: "John Doe" <john@d.oe>
|
4
4
|
To: "Jane Doe" <jane@d.oe>
|
5
5
|
Subject: Hello World
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { parseEmail, getDkimSigners } from "./parseEmail";
|
2
|
-
import { resolveDkimDns } from "./dnsResolver";
|
1
|
+
import { parseEmail, getDkimSigners } from "./parseEmail.js";
|
2
|
+
import { resolveDkimDns } from "./dnsResolver.js";
|
3
3
|
export async function preverifyEmail(mimeEmail) {
|
4
4
|
const parsedEmail = await parseEmail(mimeEmail);
|
5
5
|
const signers = getDkimSigners(parsedEmail);
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { describe, expect, test } from "vitest";
|
2
|
-
import { preverifyEmail } from "./preverify";
|
3
|
-
import { readFile } from "../../testHelpers/readFile";
|
2
|
+
import { preverifyEmail } from "./preverify.js";
|
3
|
+
import { readFile } from "../../testHelpers/readFile.js";
|
4
4
|
describe("Preverify email: integration", () => {
|
5
5
|
test("adds dns record to email mime", async () => {
|
6
6
|
const rawEmail = readFile("./src/api/email/testdata/test_email.txt");
|
package/dist/api/helpers.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { type Abi, type Address, type Chain, type ContractFunctionArgs, type ContractFunctionName, type Hex, PublicClient, walletActions } from "viem";
|
2
|
-
import type { ContractSpec, ContractArg } from "types/ethereum";
|
2
|
+
import type { ContractSpec, ContractArg } from "./lib/types/ethereum.js";
|
3
3
|
export declare const chainIds: 31337[];
|
4
4
|
export declare function createAnvilClient(chainId?: number): ReturnType<typeof walletActions> & PublicClient;
|
5
5
|
export declare function deployContract(contractSpec: ContractSpec, args?: ContractArg[], chainId?: number): Promise<Address>;
|
package/dist/api/lib/client.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { VlayerClient } from "types/vlayer";
|
2
|
-
import { WebProofProvider } from "types/webProofProvider";
|
1
|
+
import { VlayerClient } from "./types/vlayer.js";
|
2
|
+
import { WebProofProvider } from "./types/webProofProvider.js";
|
3
3
|
export declare const createVlayerClient: ({ url, webProofProvider, }?: {
|
4
4
|
url?: string;
|
5
5
|
webProofProvider?: WebProofProvider;
|
package/dist/api/lib/client.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { prove } from "../prover";
|
2
|
-
import { createExtensionWebProofProvider } from "../webProof";
|
1
|
+
import { prove } from "../prover.js";
|
2
|
+
import { createExtensionWebProofProvider } from "../webProof/index.js";
|
3
3
|
import { decodeFunctionResult } from "viem";
|
4
|
-
import { ZkProvingStatus } from "../../web-proof-commons";
|
4
|
+
import { ZkProvingStatus } from "../../web-proof-commons/index.js";
|
5
5
|
function dropEmptyProofFromArgs(args) {
|
6
6
|
if (Array.isArray(args)) {
|
7
7
|
return args.slice(1);
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { describe, expect, it, vi, beforeEach } from "vitest";
|
2
|
-
import { createExtensionWebProofProvider } from "../webProof";
|
3
|
-
import { createVlayerClient } from "./client";
|
2
|
+
import { createExtensionWebProofProvider } from "../webProof/index.js";
|
3
|
+
import { createVlayerClient } from "./client.js";
|
4
4
|
import { ZkProvingStatus } from "src/web-proof-commons";
|
5
5
|
import createFetchMock from "vitest-fetch-mock";
|
6
6
|
const fetchMocker = createFetchMock(vi);
|
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from "./ethereum";
|
2
|
-
export * from "./vlayer";
|
3
|
-
export * from "./webProofProvider";
|
1
|
+
export * from "./ethereum.js";
|
2
|
+
export * from "./vlayer.js";
|
3
|
+
export * from "./webProofProvider.js";
|
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from "./ethereum";
|
2
|
-
export * from "./vlayer";
|
3
|
-
export * from "./webProofProvider";
|
1
|
+
export * from "./ethereum.js";
|
2
|
+
export * from "./vlayer.js";
|
3
|
+
export * from "./webProofProvider.js";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Hex, Abi, ContractFunctionName } from "viem";
|
2
|
-
import type { ContractFunctionArgsWithout } from "./viem";
|
3
|
-
import { Branded, WebProof, WebProofStep, ZkProvingStatus } from "../../../web-proof-commons";
|
2
|
+
import type { ContractFunctionArgsWithout } from "./viem.js";
|
3
|
+
import { Branded, WebProof, WebProofStep, ZkProvingStatus } from "../../../web-proof-commons/index.js";
|
4
4
|
export type WebProofSetupInput = {
|
5
5
|
logoUrl: string;
|
6
6
|
steps: WebProofStep[];
|
package/dist/api/prover.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
import { type Abi, AbiStateMutability, type Address, ContractFunctionArgs, ContractFunctionName } from "viem";
|
2
|
-
export declare function prove<T extends Abi, F extends ContractFunctionName<T>>(prover: Address, abi: T, functionName: F, args: ContractFunctionArgs<T, AbiStateMutability, F>, chainId?: number, url?: string): Promise<import("types/vlayer").VCallResponse>;
|
2
|
+
export declare function prove<T extends Abi, F extends ContractFunctionName<T>>(prover: Address, abi: T, functionName: F, args: ContractFunctionArgs<T, AbiStateMutability, F>, chainId?: number, url?: string): Promise<import("./lib/types/vlayer.js").VCallResponse>;
|
package/dist/api/prover.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { encodeFunctionData, } from "viem";
|
2
|
-
import { v_call } from "./v_call";
|
2
|
+
import { v_call } from "./v_call.js";
|
3
3
|
import { foundry } from "viem/chains";
|
4
4
|
export async function prove(prover, abi, functionName, args, chainId = foundry.id, url = "http://127.0.0.1:3000") {
|
5
5
|
const calldata = encodeFunctionData({
|
package/dist/api/v_call.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import { CallContext, CallParams, VCallResponse } from "types/vlayer";
|
1
|
+
import { CallContext, CallParams, VCallResponse } from "./lib/types/vlayer.js";
|
2
2
|
export declare function v_call(call: CallParams, context: CallContext, url?: string): Promise<VCallResponse>;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { WebProofSetup, WebProofSetupInput } from "types/webProofProvider";
|
1
|
+
import { WebProofSetup, WebProofSetupInput } from "../lib/types/webProofProvider.js";
|
2
2
|
export declare const createWebProof: ({ logoUrl, steps }: WebProofSetupInput) => WebProofSetup;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from "./createWebProof";
|
2
|
-
export * from "./steps";
|
3
|
-
export * from "./providers";
|
1
|
+
export * from "./createWebProof.js";
|
2
|
+
export * from "./steps/index.js";
|
3
|
+
export * from "./providers/index.js";
|
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from "./createWebProof";
|
2
|
-
export * from "./steps";
|
3
|
-
export * from "./providers";
|
1
|
+
export * from "./createWebProof.js";
|
2
|
+
export * from "./steps/index.js";
|
3
|
+
export * from "./providers/index.js";
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { type WebProofProvider, type WebProofProviderSetup } from "../../lib/types/webProofProvider";
|
1
|
+
import { type WebProofProvider, type WebProofProviderSetup } from "../../lib/types/webProofProvider.js";
|
2
2
|
export declare const createExtensionWebProofProvider: ({ notaryUrl, wsProxyUrl, }?: WebProofProviderSetup) => WebProofProvider;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ExtensionMessageType, } from "../../../web-proof-commons";
|
1
|
+
import { ExtensionMessageType, } from "../../../web-proof-commons/index.js";
|
2
2
|
// this id is fixed in the extension by the key in manifest.json
|
3
3
|
const EXTENSION_ID = "jbchhcgphfokabmfacnkafoeeeppjmpl";
|
4
4
|
class ExtensionWebProofProvider {
|
@@ -1 +1 @@
|
|
1
|
-
export * from "./extension";
|
1
|
+
export * from "./extension.js";
|
@@ -1 +1 @@
|
|
1
|
-
export * from "./extension";
|
1
|
+
export * from "./extension.js";
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { WebProofStepExpectUrl } from "../../../web-proof-commons";
|
1
|
+
import { WebProofStepExpectUrl } from "../../../web-proof-commons/index.js";
|
2
2
|
export declare const expectUrl: (url: string, label: string) => WebProofStepExpectUrl;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { expectUrl } from "./expectUrl";
|
2
|
-
import { startPage } from "./startPage";
|
3
|
-
import { notarize } from "./notarize";
|
1
|
+
import { expectUrl } from "./expectUrl.js";
|
2
|
+
import { startPage } from "./startPage.js";
|
3
|
+
import { notarize } from "./notarize.js";
|
4
4
|
declare const steps: {
|
5
|
-
expectUrl: (url: string, label: string) => import("../../../web-proof-commons").WebProofStepExpectUrl;
|
6
|
-
startPage: (url: string, label: string) => import("../../../web-proof-commons").WebProofStepStartPage;
|
7
|
-
notarize: (url: string, method: string | undefined, label: string) => import("../../../web-proof-commons").WebProofStepNotarize;
|
5
|
+
expectUrl: (url: string, label: string) => import("../../../web-proof-commons/index.js").WebProofStepExpectUrl;
|
6
|
+
startPage: (url: string, label: string) => import("../../../web-proof-commons/index.js").WebProofStepStartPage;
|
7
|
+
notarize: (url: string, method: string | undefined, label: string) => import("../../../web-proof-commons/index.js").WebProofStepNotarize;
|
8
8
|
};
|
9
9
|
export { expectUrl, startPage, notarize, steps };
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { expectUrl } from "./expectUrl";
|
2
|
-
import { startPage } from "./startPage";
|
3
|
-
import { notarize } from "./notarize";
|
1
|
+
import { expectUrl } from "./expectUrl.js";
|
2
|
+
import { startPage } from "./startPage.js";
|
3
|
+
import { notarize } from "./notarize.js";
|
4
4
|
const steps = {
|
5
5
|
expectUrl,
|
6
6
|
startPage,
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { WebProofStepNotarize } from "../../../web-proof-commons";
|
1
|
+
import { WebProofStepNotarize } from "../../../web-proof-commons/index.js";
|
2
2
|
export declare const notarize: (url: string, method: string | undefined, label: string) => WebProofStepNotarize;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { WebProofStepStartPage } from "../../../web-proof-commons";
|
1
|
+
import { WebProofStepStartPage } from "../../../web-proof-commons/index.js";
|
2
2
|
export declare const startPage: (url: string, label: string) => WebProofStepStartPage;
|
package/dist/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
export * as testHelpers from "./api/helpers";
|
2
|
-
export { preverifyEmail } from "./api/email/preverify";
|
3
|
-
export { createVlayerClient } from "./api/lib/client";
|
4
|
-
export * from "./api/lib/types";
|
5
|
-
export * from "./web-proof-commons/types/webProof";
|
6
|
-
export * from "./web-proof-commons/utils";
|
1
|
+
export * as testHelpers from "./api/helpers.js";
|
2
|
+
export { preverifyEmail } from "./api/email/preverify.js";
|
3
|
+
export { createVlayerClient } from "./api/lib/client.js";
|
4
|
+
export * from "./api/lib/types/index.js";
|
5
|
+
export * from "./web-proof-commons/types/webProof.js";
|
6
|
+
export * from "./web-proof-commons/utils.js";
|
package/dist/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
export * as testHelpers from "./api/helpers";
|
2
|
-
export { preverifyEmail } from "./api/email/preverify";
|
3
|
-
export { createVlayerClient } from "./api/lib/client";
|
4
|
-
export * from "./api/lib/types";
|
5
|
-
export * from "./web-proof-commons/types/webProof";
|
6
|
-
export * from "./web-proof-commons/utils";
|
1
|
+
export * as testHelpers from "./api/helpers.js";
|
2
|
+
export { preverifyEmail } from "./api/email/preverify.js";
|
3
|
+
export { createVlayerClient } from "./api/lib/client.js";
|
4
|
+
export * from "./api/lib/types/index.js";
|
5
|
+
export * from "./web-proof-commons/types/webProof.js";
|
6
|
+
export * from "./web-proof-commons/utils.js";
|
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from "./types/message";
|
2
|
-
export * from "./types/webProof";
|
3
|
-
export * from "./utils";
|
1
|
+
export * from "./types/message.js";
|
2
|
+
export * from "./types/webProof.js";
|
3
|
+
export * from "./utils.js";
|
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from "./types/message";
|
2
|
-
export * from "./types/webProof";
|
3
|
-
export * from "./utils";
|
1
|
+
export * from "./types/message.js";
|
2
|
+
export * from "./types/webProof.js";
|
3
|
+
export * from "./utils.js";
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import type { Branded } from "../utils";
|
2
|
-
import type { WebProof } from "./webProof";
|
1
|
+
import type { Branded } from "../utils.js";
|
2
|
+
import type { WebProof } from "./webProof.js";
|
3
3
|
export declare const EXTENSION_STEP: {
|
4
4
|
readonly expectUrl: "expectUrl";
|
5
5
|
readonly startPage: "startPage";
|
@@ -11,6 +11,7 @@ export declare const enum ExtensionAction {
|
|
11
11
|
NotifyZkProvingStatus = 1
|
12
12
|
}
|
13
13
|
export declare enum ZkProvingStatus {
|
14
|
+
NotStarted = "notStarted",
|
14
15
|
Proving = "proving",
|
15
16
|
Done = "done",
|
16
17
|
Error = "error"
|
package/package.json
CHANGED
@@ -11,9 +11,9 @@
|
|
11
11
|
"types": "./dist/api/webProof/index.d.ts"
|
12
12
|
}
|
13
13
|
},
|
14
|
-
"version": "0.1.0-nightly-
|
14
|
+
"version": "0.1.0-nightly-20241107-ce9056c",
|
15
15
|
"scripts": {
|
16
|
-
"build": "bun tsc",
|
16
|
+
"build": "bun tsc && bun tsc-alias",
|
17
17
|
"test:unit": "vitest --run",
|
18
18
|
"gen:types": "sh ../../bash/build_ts_types.sh",
|
19
19
|
"replaceCommonsSymlink": "mv ./src/web-proof-commons ./src/web-proof-commons.bak && cp -r $(readlink -f ./src/web-proof-commons.bak) src/web-proof-commons && rm ./src/web-proof-commons.bak"
|
@@ -29,11 +29,12 @@
|
|
29
29
|
"typescript": "^5.6.3"
|
30
30
|
},
|
31
31
|
"dependencies": {
|
32
|
+
"@vitejs/plugin-react": "^4.3.2",
|
32
33
|
"dns-over-http-resolver": "^3.0.3",
|
33
34
|
"postal-mime": "^2.3.2",
|
35
|
+
"tsc-alias": "^1.8.10",
|
34
36
|
"viem": "2.21.0",
|
35
|
-
"vite-tsconfig-paths": "^5.0.1"
|
36
|
-
"@vitejs/plugin-react": "^4.3.2"
|
37
|
+
"vite-tsconfig-paths": "^5.0.1"
|
37
38
|
},
|
38
39
|
"files": [
|
39
40
|
"dist/",
|