@opendatalabs/vana-sdk 3.22.0 → 3.23.0-pr.211.341f55d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/crypto/envelope/job.cjs +355 -0
- package/dist/crypto/envelope/job.cjs.map +1 -0
- package/dist/crypto/envelope/job.d.ts +123 -0
- package/dist/crypto/envelope/job.js +333 -0
- package/dist/crypto/envelope/job.js.map +1 -0
- package/dist/direct/access-request-client.cjs +4 -0
- package/dist/direct/access-request-client.cjs.map +1 -1
- package/dist/direct/access-request-client.js +4 -0
- package/dist/direct/access-request-client.js.map +1 -1
- package/dist/direct/connect-flow.cjs +43 -1
- package/dist/direct/connect-flow.cjs.map +1 -1
- package/dist/direct/connect-flow.d.ts +12 -0
- package/dist/direct/connect-flow.js +43 -1
- package/dist/direct/connect-flow.js.map +1 -1
- package/dist/direct/types.cjs.map +1 -1
- package/dist/direct/types.d.ts +7 -0
- package/dist/direct/types.js.map +1 -1
- package/dist/direct/use-direct-vana-connect.cjs +2 -1
- package/dist/direct/use-direct-vana-connect.cjs.map +1 -1
- package/dist/direct/use-direct-vana-connect.d.ts +3 -1
- package/dist/direct/use-direct-vana-connect.js +2 -1
- package/dist/direct/use-direct-vana-connect.js.map +1 -1
- package/dist/errors.cjs +84 -0
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +133 -0
- package/dist/errors.js +73 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.browser.d.ts +3 -0
- package/dist/index.browser.js +631 -24
- package/dist/index.browser.js.map +4 -4
- package/dist/index.node.cjs +1259 -111
- package/dist/index.node.cjs.map +4 -4
- package/dist/index.node.d.ts +4 -0
- package/dist/index.node.js +1223 -101
- package/dist/index.node.js.map +4 -4
- package/dist/protocol/identity.cjs +219 -0
- package/dist/protocol/identity.cjs.map +1 -0
- package/dist/protocol/identity.d.ts +193 -0
- package/dist/protocol/identity.js +183 -0
- package/dist/protocol/identity.js.map +1 -0
- package/dist/protocol/identity.test.d.ts +1 -0
- package/dist/protocol/identity.vector.test.d.ts +1 -0
- package/dist/protocol/jobs-client.cjs +540 -0
- package/dist/protocol/jobs-client.cjs.map +1 -0
- package/dist/protocol/jobs-client.d.ts +169 -0
- package/dist/protocol/jobs-client.js +547 -0
- package/dist/protocol/jobs-client.js.map +1 -0
- package/dist/protocol/jobs-client.test.d.ts +1 -0
- package/dist/protocol/jobs.cjs +64 -0
- package/dist/protocol/jobs.cjs.map +1 -0
- package/dist/protocol/jobs.d.ts +193 -0
- package/dist/protocol/jobs.js +31 -0
- package/dist/protocol/jobs.js.map +1 -0
- package/dist/protocol/jobs.test.d.ts +1 -0
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js.map +1 -1
- package/package.json +7 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var jobs_exports = {};
|
|
20
|
+
__export(jobs_exports, {
|
|
21
|
+
CLAIM_POLL_FLOOR_MS: () => CLAIM_POLL_FLOOR_MS,
|
|
22
|
+
DEFAULT_JOB_DEADLINE_SECONDS: () => DEFAULT_JOB_DEADLINE_SECONDS,
|
|
23
|
+
DEFAULT_LEASE_SECONDS: () => DEFAULT_LEASE_SECONDS,
|
|
24
|
+
JOB_OPERATIONS: () => JOB_OPERATIONS,
|
|
25
|
+
JOB_PROTOCOL_VERSION: () => JOB_PROTOCOL_VERSION,
|
|
26
|
+
JOB_STATES: () => JOB_STATES,
|
|
27
|
+
MAX_ATTEMPTS: () => MAX_ATTEMPTS,
|
|
28
|
+
MAX_JOB_DEADLINE_SECONDS: () => MAX_JOB_DEADLINE_SECONDS,
|
|
29
|
+
MAX_LEASE_SECONDS: () => MAX_LEASE_SECONDS,
|
|
30
|
+
MAX_WAIT_SECONDS: () => MAX_WAIT_SECONDS
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(jobs_exports);
|
|
33
|
+
const JOB_PROTOCOL_VERSION = 1;
|
|
34
|
+
const JOB_OPERATIONS = ["raw_read", "inference"];
|
|
35
|
+
const JOB_STATES = [
|
|
36
|
+
"queued",
|
|
37
|
+
"claimed",
|
|
38
|
+
"running",
|
|
39
|
+
"completed",
|
|
40
|
+
"failed",
|
|
41
|
+
"expired",
|
|
42
|
+
"cancelled"
|
|
43
|
+
];
|
|
44
|
+
const DEFAULT_LEASE_SECONDS = 30;
|
|
45
|
+
const MAX_LEASE_SECONDS = 300;
|
|
46
|
+
const MAX_ATTEMPTS = 3;
|
|
47
|
+
const MAX_WAIT_SECONDS = 25;
|
|
48
|
+
const CLAIM_POLL_FLOOR_MS = 1e3;
|
|
49
|
+
const DEFAULT_JOB_DEADLINE_SECONDS = 600;
|
|
50
|
+
const MAX_JOB_DEADLINE_SECONDS = 3600;
|
|
51
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
+
0 && (module.exports = {
|
|
53
|
+
CLAIM_POLL_FLOOR_MS,
|
|
54
|
+
DEFAULT_JOB_DEADLINE_SECONDS,
|
|
55
|
+
DEFAULT_LEASE_SECONDS,
|
|
56
|
+
JOB_OPERATIONS,
|
|
57
|
+
JOB_PROTOCOL_VERSION,
|
|
58
|
+
JOB_STATES,
|
|
59
|
+
MAX_ATTEMPTS,
|
|
60
|
+
MAX_JOB_DEADLINE_SECONDS,
|
|
61
|
+
MAX_LEASE_SECONDS,
|
|
62
|
+
MAX_WAIT_SECONDS
|
|
63
|
+
});
|
|
64
|
+
//# sourceMappingURL=jobs.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/protocol/jobs.ts"],"sourcesContent":["/**\n * Job queue protocol types for encrypted Personal Server execution.\n *\n * Builder -> GW -> Agent -> Sandbox\n * Builder -> GW: submit an enclave-encrypted request.\n * GW -> Agent: claim work with a fenced lease and sealed owner identity.\n * Agent -> Sandbox: decrypt, wake the owner sandbox, and execute privately.\n * Sandbox -> Agent: encrypt the result to the builder's public key.\n * Agent -> GW: store the sealed result and complete with its object key, hash, and size.\n * GW -> Builder: return inline or polled status with an object-storage handle.\n * Builder: decrypt and verify the result's job, scope, and version bindings.\n * Full flow: personal-server-ts `docs/260903-jobs-contract.md`, section 1.\n *\n * @category Protocol\n */\n\nimport type { Address, Hex } from \"viem\";\nimport type { SealedEnvelope } from \"./identity\";\n\nexport const JOB_PROTOCOL_VERSION = 1;\nexport const JOB_OPERATIONS = [\"raw_read\", \"inference\"] as const;\nexport type JobOperation = (typeof JOB_OPERATIONS)[number];\nexport const JOB_STATES = [\n \"queued\",\n \"claimed\",\n \"running\",\n \"completed\",\n \"failed\",\n \"expired\",\n \"cancelled\",\n] as const;\nexport type JobState = (typeof JOB_STATES)[number];\n/** Payment lifecycle recorded for a queued job. */\nexport type PaymentState = \"none\" | \"reserved\" | \"settled\";\nexport const DEFAULT_LEASE_SECONDS = 30;\nexport const MAX_LEASE_SECONDS = 300;\nexport const MAX_ATTEMPTS = 3;\nexport const MAX_WAIT_SECONDS = 25;\nexport const CLAIM_POLL_FLOOR_MS = 1000;\nexport const DEFAULT_JOB_DEADLINE_SECONDS = 600;\nexport const MAX_JOB_DEADLINE_SECONDS = 3600;\n\n/** Inner plaintext of the request box (ECIES to the enclave publicKey). */\nexport interface JobRequest {\n v: 1;\n jobId: string;\n owner: Address;\n builder: Address;\n builderPublicKey: Hex;\n grantId: Hex;\n scope: string;\n operation: JobOperation;\n pinnedVersion: string | null;\n deadline: string; /* ISO */\n}\n/** Plaintext of the request box; the Gateway never sees it. */\nexport interface JobRequestEnvelope {\n request: JobRequest;\n /**\n * `Web3Signed <b64>.<sig>` by the builder: `aud` = Gateway origin,\n * `uri` = `/v1/jobs/execute`,\n * `bodyHash` = `sha256(canonicalJobRequestBytes(request))`.\n */\n auth: string;\n}\n/** Outer body of POST /v1/jobs (signed Web3Signed by the builder). */\nexport interface JobSubmission {\n owner: Address;\n grantId: Hex;\n scope: string;\n operation: JobOperation;\n idempotencyKey: string;\n /** Client UUID, echoed in `JobRequest.jobId`. */\n jobId: string;\n deadline?: string;\n /** Base64 ECIES from `sealJobRequest`. */\n requestCiphertext: string;\n}\n/** Where a completed job's sealed result lives. Bytes never transit the Gateway. */\nexport interface ResultHandle {\n /** Object key in vana-storage, `jobresults/{chainId}/{jobId}`. */\n objectKey: string;\n /** Absolute URL the builder GETs. The Gateway builds it from its storage origin. */\n url: string;\n /** Byte length of the sealed object. */\n size: number;\n /** sha256 of the sealed bytes, 0x-prefixed. */\n hash: Hex;\n /** Logical expiry. After this the Gateway stops serving the handle. */\n expiresAt: string;\n}\n/** Response from `GET /v1/jobs/:id`. */\nexport interface JobStatus {\n jobId: string;\n state: JobState;\n operation: JobOperation;\n owner: Address;\n grantId: Hex;\n scope: string;\n pinnedVersion: string | null;\n attempt: number;\n price: string;\n payer: \"builder\";\n paymentState: PaymentState;\n createdAt: string;\n claimedAt: string | null;\n completedAt: string | null;\n failureReason: string | null;\n /** Present only when `state === \"completed\"`. */\n result?: ResultHandle;\n}\n/** Request body for `POST /v1/jobs/claim`. */\nexport interface ClaimRequest {\n leaseSeconds?: number;\n capacity?: number;\n}\n/** Claimed job and owner identity returned by `POST /v1/jobs/claim`. */\nexport interface ClaimResponse {\n job: {\n jobId: string;\n owner: Address;\n builder: Address;\n grantId: Hex;\n scope: string;\n operation: JobOperation;\n pinnedVersion: string | null;\n requestCiphertext: string;\n attempt: number;\n deadlineAt: string | null;\n claimExpiresAt: string;\n fencingToken: number; /* = attempt; every node write echoes it */\n };\n identity: {\n userPsId: Hex;\n epoch: number;\n enclaveAddress: Address;\n enclavePublicKey: Hex;\n sealedEnvelope: SealedEnvelope;\n };\n}\n/** Request body for `POST /v1/jobs/:id/heartbeat`. */\nexport interface HeartbeatRequest {\n leaseSeconds?: number;\n fencingToken: number;\n}\n/** Request body for `POST /v1/jobs/:id/complete`. */\nexport interface CompleteRequest {\n fencingToken: number;\n resultHash: Hex;\n resultSize: number;\n /** `jobresults/{chainId}/{jobId}`. */\n resultObjectKey: string;\n}\n/** Request body for `POST /v1/jobs/:id/fail`. */\nexport interface FailRequest {\n fencingToken: number;\n reason: string; /* <= 1024, fail.ts:16 */\n}\n/** Successful response from a fenced job write endpoint. */\nexport interface FencedResponse {\n success: true;\n jobId: string;\n state: JobState;\n claimExpiresAt: string | null;\n}\n/** Inner plaintext of the result box (ECIES to builderPublicKey). */\nexport interface JobResult {\n v: 1;\n jobId: string;\n scope: string;\n version: string | null;\n contentType: string;\n /** Raw result bytes; callers decode text explicitly when appropriate. */\n body: Uint8Array;\n}\n/** Admission lifecycle of a registered TEE node. */\nexport type TeeNodeState = \"pending\" | \"admitted\" | \"draining\" | \"removed\";\n/** Request body for `POST /v1/tee-nodes`. */\nexport interface TeeNodeRegistration {\n nodeId: string;\n appId: Hex;\n composeHash: Hex;\n publicUrl: string;\n capacity: number;\n secret: string;\n}\n/** Request body for `POST /v1/tee-nodes/:id/heartbeat`. */\nexport interface TeeNodeHeartbeat {\n composeHash: Hex;\n instanceId: string;\n activeSandboxes: number;\n capacity: number;\n}\n/** Public registration and capacity state for a TEE node. */\nexport interface TeeNode {\n nodeId: string;\n appId: Hex;\n composeHash: Hex;\n publicUrl: string;\n state: TeeNodeState;\n capacity: number;\n activeSandboxes: number;\n lastHeartbeatAt: string | null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBO,MAAM,uBAAuB;AAC7B,MAAM,iBAAiB,CAAC,YAAY,WAAW;AAE/C,MAAM,aAAa;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAIO,MAAM,wBAAwB;AAC9B,MAAM,oBAAoB;AAC1B,MAAM,eAAe;AACrB,MAAM,mBAAmB;AACzB,MAAM,sBAAsB;AAC5B,MAAM,+BAA+B;AACrC,MAAM,2BAA2B;","names":[]}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Job queue protocol types for encrypted Personal Server execution.
|
|
3
|
+
*
|
|
4
|
+
* Builder -> GW -> Agent -> Sandbox
|
|
5
|
+
* Builder -> GW: submit an enclave-encrypted request.
|
|
6
|
+
* GW -> Agent: claim work with a fenced lease and sealed owner identity.
|
|
7
|
+
* Agent -> Sandbox: decrypt, wake the owner sandbox, and execute privately.
|
|
8
|
+
* Sandbox -> Agent: encrypt the result to the builder's public key.
|
|
9
|
+
* Agent -> GW: store the sealed result and complete with its object key, hash, and size.
|
|
10
|
+
* GW -> Builder: return inline or polled status with an object-storage handle.
|
|
11
|
+
* Builder: decrypt and verify the result's job, scope, and version bindings.
|
|
12
|
+
* Full flow: personal-server-ts `docs/260903-jobs-contract.md`, section 1.
|
|
13
|
+
*
|
|
14
|
+
* @category Protocol
|
|
15
|
+
*/
|
|
16
|
+
import type { Address, Hex } from "viem";
|
|
17
|
+
import type { SealedEnvelope } from "./identity.js";
|
|
18
|
+
export declare const JOB_PROTOCOL_VERSION = 1;
|
|
19
|
+
export declare const JOB_OPERATIONS: readonly ["raw_read", "inference"];
|
|
20
|
+
export type JobOperation = (typeof JOB_OPERATIONS)[number];
|
|
21
|
+
export declare const JOB_STATES: readonly ["queued", "claimed", "running", "completed", "failed", "expired", "cancelled"];
|
|
22
|
+
export type JobState = (typeof JOB_STATES)[number];
|
|
23
|
+
/** Payment lifecycle recorded for a queued job. */
|
|
24
|
+
export type PaymentState = "none" | "reserved" | "settled";
|
|
25
|
+
export declare const DEFAULT_LEASE_SECONDS = 30;
|
|
26
|
+
export declare const MAX_LEASE_SECONDS = 300;
|
|
27
|
+
export declare const MAX_ATTEMPTS = 3;
|
|
28
|
+
export declare const MAX_WAIT_SECONDS = 25;
|
|
29
|
+
export declare const CLAIM_POLL_FLOOR_MS = 1000;
|
|
30
|
+
export declare const DEFAULT_JOB_DEADLINE_SECONDS = 600;
|
|
31
|
+
export declare const MAX_JOB_DEADLINE_SECONDS = 3600;
|
|
32
|
+
/** Inner plaintext of the request box (ECIES to the enclave publicKey). */
|
|
33
|
+
export interface JobRequest {
|
|
34
|
+
v: 1;
|
|
35
|
+
jobId: string;
|
|
36
|
+
owner: Address;
|
|
37
|
+
builder: Address;
|
|
38
|
+
builderPublicKey: Hex;
|
|
39
|
+
grantId: Hex;
|
|
40
|
+
scope: string;
|
|
41
|
+
operation: JobOperation;
|
|
42
|
+
pinnedVersion: string | null;
|
|
43
|
+
deadline: string;
|
|
44
|
+
}
|
|
45
|
+
/** Plaintext of the request box; the Gateway never sees it. */
|
|
46
|
+
export interface JobRequestEnvelope {
|
|
47
|
+
request: JobRequest;
|
|
48
|
+
/**
|
|
49
|
+
* `Web3Signed <b64>.<sig>` by the builder: `aud` = Gateway origin,
|
|
50
|
+
* `uri` = `/v1/jobs/execute`,
|
|
51
|
+
* `bodyHash` = `sha256(canonicalJobRequestBytes(request))`.
|
|
52
|
+
*/
|
|
53
|
+
auth: string;
|
|
54
|
+
}
|
|
55
|
+
/** Outer body of POST /v1/jobs (signed Web3Signed by the builder). */
|
|
56
|
+
export interface JobSubmission {
|
|
57
|
+
owner: Address;
|
|
58
|
+
grantId: Hex;
|
|
59
|
+
scope: string;
|
|
60
|
+
operation: JobOperation;
|
|
61
|
+
idempotencyKey: string;
|
|
62
|
+
/** Client UUID, echoed in `JobRequest.jobId`. */
|
|
63
|
+
jobId: string;
|
|
64
|
+
deadline?: string;
|
|
65
|
+
/** Base64 ECIES from `sealJobRequest`. */
|
|
66
|
+
requestCiphertext: string;
|
|
67
|
+
}
|
|
68
|
+
/** Where a completed job's sealed result lives. Bytes never transit the Gateway. */
|
|
69
|
+
export interface ResultHandle {
|
|
70
|
+
/** Object key in vana-storage, `jobresults/{chainId}/{jobId}`. */
|
|
71
|
+
objectKey: string;
|
|
72
|
+
/** Absolute URL the builder GETs. The Gateway builds it from its storage origin. */
|
|
73
|
+
url: string;
|
|
74
|
+
/** Byte length of the sealed object. */
|
|
75
|
+
size: number;
|
|
76
|
+
/** sha256 of the sealed bytes, 0x-prefixed. */
|
|
77
|
+
hash: Hex;
|
|
78
|
+
/** Logical expiry. After this the Gateway stops serving the handle. */
|
|
79
|
+
expiresAt: string;
|
|
80
|
+
}
|
|
81
|
+
/** Response from `GET /v1/jobs/:id`. */
|
|
82
|
+
export interface JobStatus {
|
|
83
|
+
jobId: string;
|
|
84
|
+
state: JobState;
|
|
85
|
+
operation: JobOperation;
|
|
86
|
+
owner: Address;
|
|
87
|
+
grantId: Hex;
|
|
88
|
+
scope: string;
|
|
89
|
+
pinnedVersion: string | null;
|
|
90
|
+
attempt: number;
|
|
91
|
+
price: string;
|
|
92
|
+
payer: "builder";
|
|
93
|
+
paymentState: PaymentState;
|
|
94
|
+
createdAt: string;
|
|
95
|
+
claimedAt: string | null;
|
|
96
|
+
completedAt: string | null;
|
|
97
|
+
failureReason: string | null;
|
|
98
|
+
/** Present only when `state === "completed"`. */
|
|
99
|
+
result?: ResultHandle;
|
|
100
|
+
}
|
|
101
|
+
/** Request body for `POST /v1/jobs/claim`. */
|
|
102
|
+
export interface ClaimRequest {
|
|
103
|
+
leaseSeconds?: number;
|
|
104
|
+
capacity?: number;
|
|
105
|
+
}
|
|
106
|
+
/** Claimed job and owner identity returned by `POST /v1/jobs/claim`. */
|
|
107
|
+
export interface ClaimResponse {
|
|
108
|
+
job: {
|
|
109
|
+
jobId: string;
|
|
110
|
+
owner: Address;
|
|
111
|
+
builder: Address;
|
|
112
|
+
grantId: Hex;
|
|
113
|
+
scope: string;
|
|
114
|
+
operation: JobOperation;
|
|
115
|
+
pinnedVersion: string | null;
|
|
116
|
+
requestCiphertext: string;
|
|
117
|
+
attempt: number;
|
|
118
|
+
deadlineAt: string | null;
|
|
119
|
+
claimExpiresAt: string;
|
|
120
|
+
fencingToken: number;
|
|
121
|
+
};
|
|
122
|
+
identity: {
|
|
123
|
+
userPsId: Hex;
|
|
124
|
+
epoch: number;
|
|
125
|
+
enclaveAddress: Address;
|
|
126
|
+
enclavePublicKey: Hex;
|
|
127
|
+
sealedEnvelope: SealedEnvelope;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/** Request body for `POST /v1/jobs/:id/heartbeat`. */
|
|
131
|
+
export interface HeartbeatRequest {
|
|
132
|
+
leaseSeconds?: number;
|
|
133
|
+
fencingToken: number;
|
|
134
|
+
}
|
|
135
|
+
/** Request body for `POST /v1/jobs/:id/complete`. */
|
|
136
|
+
export interface CompleteRequest {
|
|
137
|
+
fencingToken: number;
|
|
138
|
+
resultHash: Hex;
|
|
139
|
+
resultSize: number;
|
|
140
|
+
/** `jobresults/{chainId}/{jobId}`. */
|
|
141
|
+
resultObjectKey: string;
|
|
142
|
+
}
|
|
143
|
+
/** Request body for `POST /v1/jobs/:id/fail`. */
|
|
144
|
+
export interface FailRequest {
|
|
145
|
+
fencingToken: number;
|
|
146
|
+
reason: string;
|
|
147
|
+
}
|
|
148
|
+
/** Successful response from a fenced job write endpoint. */
|
|
149
|
+
export interface FencedResponse {
|
|
150
|
+
success: true;
|
|
151
|
+
jobId: string;
|
|
152
|
+
state: JobState;
|
|
153
|
+
claimExpiresAt: string | null;
|
|
154
|
+
}
|
|
155
|
+
/** Inner plaintext of the result box (ECIES to builderPublicKey). */
|
|
156
|
+
export interface JobResult {
|
|
157
|
+
v: 1;
|
|
158
|
+
jobId: string;
|
|
159
|
+
scope: string;
|
|
160
|
+
version: string | null;
|
|
161
|
+
contentType: string;
|
|
162
|
+
/** Raw result bytes; callers decode text explicitly when appropriate. */
|
|
163
|
+
body: Uint8Array;
|
|
164
|
+
}
|
|
165
|
+
/** Admission lifecycle of a registered TEE node. */
|
|
166
|
+
export type TeeNodeState = "pending" | "admitted" | "draining" | "removed";
|
|
167
|
+
/** Request body for `POST /v1/tee-nodes`. */
|
|
168
|
+
export interface TeeNodeRegistration {
|
|
169
|
+
nodeId: string;
|
|
170
|
+
appId: Hex;
|
|
171
|
+
composeHash: Hex;
|
|
172
|
+
publicUrl: string;
|
|
173
|
+
capacity: number;
|
|
174
|
+
secret: string;
|
|
175
|
+
}
|
|
176
|
+
/** Request body for `POST /v1/tee-nodes/:id/heartbeat`. */
|
|
177
|
+
export interface TeeNodeHeartbeat {
|
|
178
|
+
composeHash: Hex;
|
|
179
|
+
instanceId: string;
|
|
180
|
+
activeSandboxes: number;
|
|
181
|
+
capacity: number;
|
|
182
|
+
}
|
|
183
|
+
/** Public registration and capacity state for a TEE node. */
|
|
184
|
+
export interface TeeNode {
|
|
185
|
+
nodeId: string;
|
|
186
|
+
appId: Hex;
|
|
187
|
+
composeHash: Hex;
|
|
188
|
+
publicUrl: string;
|
|
189
|
+
state: TeeNodeState;
|
|
190
|
+
capacity: number;
|
|
191
|
+
activeSandboxes: number;
|
|
192
|
+
lastHeartbeatAt: string | null;
|
|
193
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const JOB_PROTOCOL_VERSION = 1;
|
|
2
|
+
const JOB_OPERATIONS = ["raw_read", "inference"];
|
|
3
|
+
const JOB_STATES = [
|
|
4
|
+
"queued",
|
|
5
|
+
"claimed",
|
|
6
|
+
"running",
|
|
7
|
+
"completed",
|
|
8
|
+
"failed",
|
|
9
|
+
"expired",
|
|
10
|
+
"cancelled"
|
|
11
|
+
];
|
|
12
|
+
const DEFAULT_LEASE_SECONDS = 30;
|
|
13
|
+
const MAX_LEASE_SECONDS = 300;
|
|
14
|
+
const MAX_ATTEMPTS = 3;
|
|
15
|
+
const MAX_WAIT_SECONDS = 25;
|
|
16
|
+
const CLAIM_POLL_FLOOR_MS = 1e3;
|
|
17
|
+
const DEFAULT_JOB_DEADLINE_SECONDS = 600;
|
|
18
|
+
const MAX_JOB_DEADLINE_SECONDS = 3600;
|
|
19
|
+
export {
|
|
20
|
+
CLAIM_POLL_FLOOR_MS,
|
|
21
|
+
DEFAULT_JOB_DEADLINE_SECONDS,
|
|
22
|
+
DEFAULT_LEASE_SECONDS,
|
|
23
|
+
JOB_OPERATIONS,
|
|
24
|
+
JOB_PROTOCOL_VERSION,
|
|
25
|
+
JOB_STATES,
|
|
26
|
+
MAX_ATTEMPTS,
|
|
27
|
+
MAX_JOB_DEADLINE_SECONDS,
|
|
28
|
+
MAX_LEASE_SECONDS,
|
|
29
|
+
MAX_WAIT_SECONDS
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=jobs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/protocol/jobs.ts"],"sourcesContent":["/**\n * Job queue protocol types for encrypted Personal Server execution.\n *\n * Builder -> GW -> Agent -> Sandbox\n * Builder -> GW: submit an enclave-encrypted request.\n * GW -> Agent: claim work with a fenced lease and sealed owner identity.\n * Agent -> Sandbox: decrypt, wake the owner sandbox, and execute privately.\n * Sandbox -> Agent: encrypt the result to the builder's public key.\n * Agent -> GW: store the sealed result and complete with its object key, hash, and size.\n * GW -> Builder: return inline or polled status with an object-storage handle.\n * Builder: decrypt and verify the result's job, scope, and version bindings.\n * Full flow: personal-server-ts `docs/260903-jobs-contract.md`, section 1.\n *\n * @category Protocol\n */\n\nimport type { Address, Hex } from \"viem\";\nimport type { SealedEnvelope } from \"./identity\";\n\nexport const JOB_PROTOCOL_VERSION = 1;\nexport const JOB_OPERATIONS = [\"raw_read\", \"inference\"] as const;\nexport type JobOperation = (typeof JOB_OPERATIONS)[number];\nexport const JOB_STATES = [\n \"queued\",\n \"claimed\",\n \"running\",\n \"completed\",\n \"failed\",\n \"expired\",\n \"cancelled\",\n] as const;\nexport type JobState = (typeof JOB_STATES)[number];\n/** Payment lifecycle recorded for a queued job. */\nexport type PaymentState = \"none\" | \"reserved\" | \"settled\";\nexport const DEFAULT_LEASE_SECONDS = 30;\nexport const MAX_LEASE_SECONDS = 300;\nexport const MAX_ATTEMPTS = 3;\nexport const MAX_WAIT_SECONDS = 25;\nexport const CLAIM_POLL_FLOOR_MS = 1000;\nexport const DEFAULT_JOB_DEADLINE_SECONDS = 600;\nexport const MAX_JOB_DEADLINE_SECONDS = 3600;\n\n/** Inner plaintext of the request box (ECIES to the enclave publicKey). */\nexport interface JobRequest {\n v: 1;\n jobId: string;\n owner: Address;\n builder: Address;\n builderPublicKey: Hex;\n grantId: Hex;\n scope: string;\n operation: JobOperation;\n pinnedVersion: string | null;\n deadline: string; /* ISO */\n}\n/** Plaintext of the request box; the Gateway never sees it. */\nexport interface JobRequestEnvelope {\n request: JobRequest;\n /**\n * `Web3Signed <b64>.<sig>` by the builder: `aud` = Gateway origin,\n * `uri` = `/v1/jobs/execute`,\n * `bodyHash` = `sha256(canonicalJobRequestBytes(request))`.\n */\n auth: string;\n}\n/** Outer body of POST /v1/jobs (signed Web3Signed by the builder). */\nexport interface JobSubmission {\n owner: Address;\n grantId: Hex;\n scope: string;\n operation: JobOperation;\n idempotencyKey: string;\n /** Client UUID, echoed in `JobRequest.jobId`. */\n jobId: string;\n deadline?: string;\n /** Base64 ECIES from `sealJobRequest`. */\n requestCiphertext: string;\n}\n/** Where a completed job's sealed result lives. Bytes never transit the Gateway. */\nexport interface ResultHandle {\n /** Object key in vana-storage, `jobresults/{chainId}/{jobId}`. */\n objectKey: string;\n /** Absolute URL the builder GETs. The Gateway builds it from its storage origin. */\n url: string;\n /** Byte length of the sealed object. */\n size: number;\n /** sha256 of the sealed bytes, 0x-prefixed. */\n hash: Hex;\n /** Logical expiry. After this the Gateway stops serving the handle. */\n expiresAt: string;\n}\n/** Response from `GET /v1/jobs/:id`. */\nexport interface JobStatus {\n jobId: string;\n state: JobState;\n operation: JobOperation;\n owner: Address;\n grantId: Hex;\n scope: string;\n pinnedVersion: string | null;\n attempt: number;\n price: string;\n payer: \"builder\";\n paymentState: PaymentState;\n createdAt: string;\n claimedAt: string | null;\n completedAt: string | null;\n failureReason: string | null;\n /** Present only when `state === \"completed\"`. */\n result?: ResultHandle;\n}\n/** Request body for `POST /v1/jobs/claim`. */\nexport interface ClaimRequest {\n leaseSeconds?: number;\n capacity?: number;\n}\n/** Claimed job and owner identity returned by `POST /v1/jobs/claim`. */\nexport interface ClaimResponse {\n job: {\n jobId: string;\n owner: Address;\n builder: Address;\n grantId: Hex;\n scope: string;\n operation: JobOperation;\n pinnedVersion: string | null;\n requestCiphertext: string;\n attempt: number;\n deadlineAt: string | null;\n claimExpiresAt: string;\n fencingToken: number; /* = attempt; every node write echoes it */\n };\n identity: {\n userPsId: Hex;\n epoch: number;\n enclaveAddress: Address;\n enclavePublicKey: Hex;\n sealedEnvelope: SealedEnvelope;\n };\n}\n/** Request body for `POST /v1/jobs/:id/heartbeat`. */\nexport interface HeartbeatRequest {\n leaseSeconds?: number;\n fencingToken: number;\n}\n/** Request body for `POST /v1/jobs/:id/complete`. */\nexport interface CompleteRequest {\n fencingToken: number;\n resultHash: Hex;\n resultSize: number;\n /** `jobresults/{chainId}/{jobId}`. */\n resultObjectKey: string;\n}\n/** Request body for `POST /v1/jobs/:id/fail`. */\nexport interface FailRequest {\n fencingToken: number;\n reason: string; /* <= 1024, fail.ts:16 */\n}\n/** Successful response from a fenced job write endpoint. */\nexport interface FencedResponse {\n success: true;\n jobId: string;\n state: JobState;\n claimExpiresAt: string | null;\n}\n/** Inner plaintext of the result box (ECIES to builderPublicKey). */\nexport interface JobResult {\n v: 1;\n jobId: string;\n scope: string;\n version: string | null;\n contentType: string;\n /** Raw result bytes; callers decode text explicitly when appropriate. */\n body: Uint8Array;\n}\n/** Admission lifecycle of a registered TEE node. */\nexport type TeeNodeState = \"pending\" | \"admitted\" | \"draining\" | \"removed\";\n/** Request body for `POST /v1/tee-nodes`. */\nexport interface TeeNodeRegistration {\n nodeId: string;\n appId: Hex;\n composeHash: Hex;\n publicUrl: string;\n capacity: number;\n secret: string;\n}\n/** Request body for `POST /v1/tee-nodes/:id/heartbeat`. */\nexport interface TeeNodeHeartbeat {\n composeHash: Hex;\n instanceId: string;\n activeSandboxes: number;\n capacity: number;\n}\n/** Public registration and capacity state for a TEE node. */\nexport interface TeeNode {\n nodeId: string;\n appId: Hex;\n composeHash: Hex;\n publicUrl: string;\n state: TeeNodeState;\n capacity: number;\n activeSandboxes: number;\n lastHeartbeatAt: string | null;\n}\n"],"mappings":"AAmBO,MAAM,uBAAuB;AAC7B,MAAM,iBAAiB,CAAC,YAAY,WAAW;AAE/C,MAAM,aAAa;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAIO,MAAM,wBAAwB;AAC9B,MAAM,oBAAoB;AAC1B,MAAM,eAAe;AACrB,MAAM,mBAAmB;AACzB,MAAM,sBAAsB;AAC5B,MAAM,+BAA+B;AACrC,MAAM,2BAA2B;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/react.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/react.ts"],"sourcesContent":["/**\n * React entry point for the Vana SDK direct Data Portability flow.\n *\n * @remarks\n * Exposes {@link useDirectVanaConnect} (and the underlying framework-agnostic\n * connect-flow store) for browser apps. This entry point is browser-safe and\n * imports nothing Node-only. `react` is a peer dependency.\n *\n * @example\n * ```tsx\n * \"use client\";\n * import { useDirectVanaConnect } from \"@opendatalabs/vana-sdk/react\";\n *\n * export function ConnectNotesButton() {\n * const connect = useDirectVanaConnect({\n * createRequest: () => fetch(\"/api/vana/request\", { method: \"POST\" }).then((r) => r.json()),\n * getStatus: (id) => fetch(`/api/vana/status?requestId=${id}`).then((r) => r.json()),\n * readResult: (id) => fetch(`/api/vana/data?requestId=${id}`).then((r) => r.json()),\n * });\n * const { state, start } = connect;\n * return (\n * <div>\n * <button disabled={state.type !== \"idle\"} onClick={start} type=\"button\">\n * {state.type === \"idle\" ? \"Connect Apple Notes\" : \"Connecting...\"}\n * </button>\n * {state.type === \"awaiting_approval\" && (\n * // Fallback link: if the browser blocked the approval popup, the user\n * // can still open it manually instead of the flow silently hanging.\n * <a href={state.request.approvalUrl} target=\"_blank\" rel=\"noreferrer\">\n * {state.popupBlocked ? \"Popup blocked — open approval\" : \"Open approval\"}\n * </a>\n * )}\n * {state.type === \"ready_to_open\" && (\n * // Mobile deep Direct: render the HTTPS continuation as a primary tap.\n * // The SDK keeps polling in this tab; if the tab is lost, restart.\n * <a href={state.mobileContinuationUrl} target=\"_blank\" rel=\"noreferrer\">\n * Open Vana\n * </a>\n * )}\n * </div>\n * );\n * }\n * ```\n *\n * @category Direct\n * @module react\n */\n\nexport {\n useDirectVanaConnect,\n type UseDirectVanaConnectOptions,\n type UseDirectVanaConnectResult,\n} from \"./direct/use-direct-vana-connect\";\n\n// Framework-agnostic store (usable without React).\nexport {\n createDirectConnectFlow,\n type ConnectWindow,\n type DirectBrowserPlatform,\n type DirectBrowserPlatformPolicy,\n type DirectConnectFlow,\n type DirectConnectState,\n type DirectConnectOptions,\n type DirectConnectTransports,\n} from \"./direct/connect-flow\";\n\n// Shared types useful when typing the transports.\nexport type {\n ForegroundDelivery,\n AccessRequest,\n AccessRequestStatus,\n AccessRequestStatusValue,\n ApprovedDataResult,\n} from \"./direct/types\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgDA,qCAIO;AAGP,
|
|
1
|
+
{"version":3,"sources":["../src/react.ts"],"sourcesContent":["/**\n * React entry point for the Vana SDK direct Data Portability flow.\n *\n * @remarks\n * Exposes {@link useDirectVanaConnect} (and the underlying framework-agnostic\n * connect-flow store) for browser apps. This entry point is browser-safe and\n * imports nothing Node-only. `react` is a peer dependency.\n *\n * @example\n * ```tsx\n * \"use client\";\n * import { useDirectVanaConnect } from \"@opendatalabs/vana-sdk/react\";\n *\n * export function ConnectNotesButton() {\n * const connect = useDirectVanaConnect({\n * createRequest: () => fetch(\"/api/vana/request\", { method: \"POST\" }).then((r) => r.json()),\n * getStatus: (id) => fetch(`/api/vana/status?requestId=${id}`).then((r) => r.json()),\n * readResult: (id) => fetch(`/api/vana/data?requestId=${id}`).then((r) => r.json()),\n * });\n * const { state, start } = connect;\n * return (\n * <div>\n * <button disabled={state.type !== \"idle\"} onClick={start} type=\"button\">\n * {state.type === \"idle\" ? \"Connect Apple Notes\" : \"Connecting...\"}\n * </button>\n * {state.type === \"awaiting_approval\" && (\n * // Fallback link: if the browser blocked the approval popup, the user\n * // can still open it manually instead of the flow silently hanging.\n * <a href={state.request.approvalUrl} target=\"_blank\" rel=\"noreferrer\">\n * {state.popupBlocked ? \"Popup blocked — open approval\" : \"Open approval\"}\n * </a>\n * )}\n * {state.type === \"ready_to_open\" && (\n * // Mobile deep Direct: render the HTTPS continuation as a primary tap.\n * // The SDK keeps polling in this tab; if the tab is lost, restart.\n * <a href={state.mobileContinuationUrl} target=\"_blank\" rel=\"noreferrer\">\n * Open Vana\n * </a>\n * )}\n * </div>\n * );\n * }\n * ```\n *\n * @category Direct\n * @module react\n */\n\nexport {\n useDirectVanaConnect,\n type UseDirectVanaConnectOptions,\n type UseDirectVanaConnectResult,\n} from \"./direct/use-direct-vana-connect\";\n\n// Framework-agnostic store (usable without React).\nexport {\n createDirectConnectFlow,\n type ConnectWindow,\n type DirectBrowserPlatform,\n type DirectBrowserPlatformPolicy,\n type DirectConnectFlow,\n type DirectConnectRetryOutcome,\n type DirectConnectState,\n type DirectConnectOptions,\n type DirectConnectTransports,\n} from \"./direct/connect-flow\";\n\n// Shared types useful when typing the transports.\nexport type {\n ForegroundDelivery,\n AccessRequest,\n AccessRequestStatus,\n AccessRequestStatusValue,\n ApprovedDataResult,\n} from \"./direct/types\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgDA,qCAIO;AAGP,0BAUO;","names":[]}
|
package/dist/react.d.ts
CHANGED
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
* @module react
|
|
47
47
|
*/
|
|
48
48
|
export { useDirectVanaConnect, type UseDirectVanaConnectOptions, type UseDirectVanaConnectResult, } from "./direct/use-direct-vana-connect.js";
|
|
49
|
-
export { createDirectConnectFlow, type ConnectWindow, type DirectBrowserPlatform, type DirectBrowserPlatformPolicy, type DirectConnectFlow, type DirectConnectState, type DirectConnectOptions, type DirectConnectTransports, } from "./direct/connect-flow.js";
|
|
49
|
+
export { createDirectConnectFlow, type ConnectWindow, type DirectBrowserPlatform, type DirectBrowserPlatformPolicy, type DirectConnectFlow, type DirectConnectRetryOutcome, type DirectConnectState, type DirectConnectOptions, type DirectConnectTransports, } from "./direct/connect-flow.js";
|
|
50
50
|
export type { ForegroundDelivery, AccessRequest, AccessRequestStatus, AccessRequestStatusValue, ApprovedDataResult, } from "./direct/types.js";
|
package/dist/react.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/react.ts"],"sourcesContent":["/**\n * React entry point for the Vana SDK direct Data Portability flow.\n *\n * @remarks\n * Exposes {@link useDirectVanaConnect} (and the underlying framework-agnostic\n * connect-flow store) for browser apps. This entry point is browser-safe and\n * imports nothing Node-only. `react` is a peer dependency.\n *\n * @example\n * ```tsx\n * \"use client\";\n * import { useDirectVanaConnect } from \"@opendatalabs/vana-sdk/react\";\n *\n * export function ConnectNotesButton() {\n * const connect = useDirectVanaConnect({\n * createRequest: () => fetch(\"/api/vana/request\", { method: \"POST\" }).then((r) => r.json()),\n * getStatus: (id) => fetch(`/api/vana/status?requestId=${id}`).then((r) => r.json()),\n * readResult: (id) => fetch(`/api/vana/data?requestId=${id}`).then((r) => r.json()),\n * });\n * const { state, start } = connect;\n * return (\n * <div>\n * <button disabled={state.type !== \"idle\"} onClick={start} type=\"button\">\n * {state.type === \"idle\" ? \"Connect Apple Notes\" : \"Connecting...\"}\n * </button>\n * {state.type === \"awaiting_approval\" && (\n * // Fallback link: if the browser blocked the approval popup, the user\n * // can still open it manually instead of the flow silently hanging.\n * <a href={state.request.approvalUrl} target=\"_blank\" rel=\"noreferrer\">\n * {state.popupBlocked ? \"Popup blocked — open approval\" : \"Open approval\"}\n * </a>\n * )}\n * {state.type === \"ready_to_open\" && (\n * // Mobile deep Direct: render the HTTPS continuation as a primary tap.\n * // The SDK keeps polling in this tab; if the tab is lost, restart.\n * <a href={state.mobileContinuationUrl} target=\"_blank\" rel=\"noreferrer\">\n * Open Vana\n * </a>\n * )}\n * </div>\n * );\n * }\n * ```\n *\n * @category Direct\n * @module react\n */\n\nexport {\n useDirectVanaConnect,\n type UseDirectVanaConnectOptions,\n type UseDirectVanaConnectResult,\n} from \"./direct/use-direct-vana-connect\";\n\n// Framework-agnostic store (usable without React).\nexport {\n createDirectConnectFlow,\n type ConnectWindow,\n type DirectBrowserPlatform,\n type DirectBrowserPlatformPolicy,\n type DirectConnectFlow,\n type DirectConnectState,\n type DirectConnectOptions,\n type DirectConnectTransports,\n} from \"./direct/connect-flow\";\n\n// Shared types useful when typing the transports.\nexport type {\n ForegroundDelivery,\n AccessRequest,\n AccessRequestStatus,\n AccessRequestStatusValue,\n ApprovedDataResult,\n} from \"./direct/types\";\n"],"mappings":"AAgDA;AAAA,EACE;AAAA,OAGK;AAGP;AAAA,EACE;AAAA,
|
|
1
|
+
{"version":3,"sources":["../src/react.ts"],"sourcesContent":["/**\n * React entry point for the Vana SDK direct Data Portability flow.\n *\n * @remarks\n * Exposes {@link useDirectVanaConnect} (and the underlying framework-agnostic\n * connect-flow store) for browser apps. This entry point is browser-safe and\n * imports nothing Node-only. `react` is a peer dependency.\n *\n * @example\n * ```tsx\n * \"use client\";\n * import { useDirectVanaConnect } from \"@opendatalabs/vana-sdk/react\";\n *\n * export function ConnectNotesButton() {\n * const connect = useDirectVanaConnect({\n * createRequest: () => fetch(\"/api/vana/request\", { method: \"POST\" }).then((r) => r.json()),\n * getStatus: (id) => fetch(`/api/vana/status?requestId=${id}`).then((r) => r.json()),\n * readResult: (id) => fetch(`/api/vana/data?requestId=${id}`).then((r) => r.json()),\n * });\n * const { state, start } = connect;\n * return (\n * <div>\n * <button disabled={state.type !== \"idle\"} onClick={start} type=\"button\">\n * {state.type === \"idle\" ? \"Connect Apple Notes\" : \"Connecting...\"}\n * </button>\n * {state.type === \"awaiting_approval\" && (\n * // Fallback link: if the browser blocked the approval popup, the user\n * // can still open it manually instead of the flow silently hanging.\n * <a href={state.request.approvalUrl} target=\"_blank\" rel=\"noreferrer\">\n * {state.popupBlocked ? \"Popup blocked — open approval\" : \"Open approval\"}\n * </a>\n * )}\n * {state.type === \"ready_to_open\" && (\n * // Mobile deep Direct: render the HTTPS continuation as a primary tap.\n * // The SDK keeps polling in this tab; if the tab is lost, restart.\n * <a href={state.mobileContinuationUrl} target=\"_blank\" rel=\"noreferrer\">\n * Open Vana\n * </a>\n * )}\n * </div>\n * );\n * }\n * ```\n *\n * @category Direct\n * @module react\n */\n\nexport {\n useDirectVanaConnect,\n type UseDirectVanaConnectOptions,\n type UseDirectVanaConnectResult,\n} from \"./direct/use-direct-vana-connect\";\n\n// Framework-agnostic store (usable without React).\nexport {\n createDirectConnectFlow,\n type ConnectWindow,\n type DirectBrowserPlatform,\n type DirectBrowserPlatformPolicy,\n type DirectConnectFlow,\n type DirectConnectRetryOutcome,\n type DirectConnectState,\n type DirectConnectOptions,\n type DirectConnectTransports,\n} from \"./direct/connect-flow\";\n\n// Shared types useful when typing the transports.\nexport type {\n ForegroundDelivery,\n AccessRequest,\n AccessRequestStatus,\n AccessRequestStatusValue,\n ApprovedDataResult,\n} from \"./direct/types\";\n"],"mappings":"AAgDA;AAAA,EACE;AAAA,OAGK;AAGP;AAAA,EACE;AAAA,OASK;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opendatalabs/vana-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.23.0-pr.211.341f55d",
|
|
4
4
|
"description": "A TypeScript library for interacting with Vana Network smart contracts.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -33,6 +33,12 @@
|
|
|
33
33
|
"import": "./dist/server.js",
|
|
34
34
|
"require": "./dist/server.cjs"
|
|
35
35
|
},
|
|
36
|
+
"./protocol/jobs-client": {
|
|
37
|
+
"browser": null,
|
|
38
|
+
"types": "./dist/protocol/jobs-client.d.ts",
|
|
39
|
+
"import": "./dist/protocol/jobs-client.js",
|
|
40
|
+
"require": "./dist/protocol/jobs-client.cjs"
|
|
41
|
+
},
|
|
36
42
|
"./direct/escrow-payment": {
|
|
37
43
|
"browser": null,
|
|
38
44
|
"types": "./dist/direct/escrow-payment.d.ts",
|