@opendatalabs/vana-sdk 3.21.0 → 3.22.0-pr.207.247f7c0
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/README.md +64 -0
- package/dist/index.browser.d.ts +3 -1
- package/dist/index.browser.js +371 -4
- package/dist/index.browser.js.map +4 -4
- package/dist/index.node.cjs +414 -34
- package/dist/index.node.cjs.map +4 -4
- package/dist/index.node.d.ts +3 -1
- package/dist/index.node.js +374 -7
- package/dist/index.node.js.map +4 -4
- package/dist/protocol/derivative-questions.cjs +22 -0
- package/dist/protocol/derivative-questions.cjs.map +1 -1
- package/dist/protocol/derivative-questions.d.ts +53 -0
- package/dist/protocol/derivative-questions.js +19 -0
- package/dist/protocol/derivative-questions.js.map +1 -1
- package/dist/protocol/derivative-status.cjs +209 -0
- package/dist/protocol/derivative-status.cjs.map +1 -0
- package/dist/protocol/derivative-status.d.ts +196 -0
- package/dist/protocol/derivative-status.js +190 -0
- package/dist/protocol/derivative-status.js.map +1 -0
- package/dist/protocol/derivative-status.test.d.ts +1 -0
- 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/tests/mock-personal-server.d.ts +9 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -621,6 +621,70 @@ These helpers require `personal-server-ts` main `d91124d` or later, which is
|
|
|
621
621
|
where the query-in-the-signed-uri rule, the `nonce` claim, the 404 for an
|
|
622
622
|
unknown id and the full-view `recompute` answer landed.
|
|
623
623
|
|
|
624
|
+
### Watching a derived scope as the reader
|
|
625
|
+
|
|
626
|
+
The helpers above are the builder's: every one of them needs a write session,
|
|
627
|
+
which an app holding only a bare read entry on the derived scope cannot open.
|
|
628
|
+
That reader sees `GET /v1/data/<derivedScope>` answer 404 whether the compute
|
|
629
|
+
is running, retrying, or finished failing.
|
|
630
|
+
|
|
631
|
+
`getDerivativeStatus` is the reader's view of the same question. It
|
|
632
|
+
authenticates like a data read — a live grant covering the derived scope, or
|
|
633
|
+
the owner — and nothing is charged, so a priced grant raises no 402 here.
|
|
634
|
+
|
|
635
|
+
```typescript
|
|
636
|
+
import {
|
|
637
|
+
getDerivativeStatus,
|
|
638
|
+
waitForDerivativeStatus,
|
|
639
|
+
} from "@opendatalabs/vana-sdk";
|
|
640
|
+
|
|
641
|
+
const status = await getDerivativeStatus({
|
|
642
|
+
personalServerUrl: "https://ps.example.com",
|
|
643
|
+
derivedScope: "coach.weekly",
|
|
644
|
+
grantId,
|
|
645
|
+
signer,
|
|
646
|
+
});
|
|
647
|
+
// { derivedScope, status, lastComputedAt, derivedVersion,
|
|
648
|
+
// derivedCollectedAt, errorCode, retryAfterSeconds }
|
|
649
|
+
|
|
650
|
+
const settled = await waitForDerivativeStatus({
|
|
651
|
+
personalServerUrl: "https://ps.example.com",
|
|
652
|
+
derivedScope: "coach.weekly",
|
|
653
|
+
grantId,
|
|
654
|
+
signer,
|
|
655
|
+
timeoutMs: 60_000,
|
|
656
|
+
});
|
|
657
|
+
```
|
|
658
|
+
|
|
659
|
+
The view is lifecycle only: the question text, the source scopes, the question
|
|
660
|
+
id, the registrar and the server's raw `error` string stay owner-only.
|
|
661
|
+
`errorCode` is a closed vocabulary — `inference_unavailable`,
|
|
662
|
+
`source_missing`, `grant_invalid`, `internal` — and is `null` unless `status`
|
|
663
|
+
is `failed`.
|
|
664
|
+
|
|
665
|
+
`retryAfterSeconds` is what separates a failure that is still being worked on
|
|
666
|
+
from one that is over: `inference_unavailable` is the one transient class, and
|
|
667
|
+
the Personal Server retries it on its own schedule. `waitForDerivativeStatus`
|
|
668
|
+
returns as soon as the scope is `ready` or has failed with no retry pending,
|
|
669
|
+
keeps waiting through a retrying failure, and takes the server's
|
|
670
|
+
`retryAfterSeconds` as the cadence in place of `pollIntervalMs`, longer or
|
|
671
|
+
shorter — it is when the next compute actually happens, so asking sooner sees
|
|
672
|
+
nothing new and asking later sits on an answer that already exists. Once the
|
|
673
|
+
remaining budget cannot cover the next cadence it raises the timeout rather
|
|
674
|
+
than spending one more request that cannot carry new data. `signal` aborts
|
|
675
|
+
the wait and the request in flight with it. A failed status is returned, not thrown; branch
|
|
676
|
+
on `errorCode`. `isDerivativeStatusSettled` is the same predicate, exported
|
|
677
|
+
for callers that poll on their own.
|
|
678
|
+
|
|
679
|
+
When several questions write the same derived scope, the most optimistic true
|
|
680
|
+
state answers (`ready`, then `stale`, then `pending`, then `failed`), because
|
|
681
|
+
serving data is registration-agnostic: a duplicate that never wrote anything
|
|
682
|
+
must not report away an answer the scope has.
|
|
683
|
+
|
|
684
|
+
The status route needs a Personal Server that ships it; an older one answers
|
|
685
|
+
404 for the route itself, which arrives as `DerivativeQuestionNotFoundError`
|
|
686
|
+
— the same error as a covered scope with no question behind it.
|
|
687
|
+
|
|
624
688
|
## Networks
|
|
625
689
|
|
|
626
690
|
| Network | Chain ID | RPC URL |
|
package/dist/index.browser.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export { parseWeb3SignedHeader, verifyWeb3Signed, type Web3SignedPayload, type V
|
|
|
37
37
|
export { buildWeb3SignedHeader, computeBodyHash, type Web3SignedSignFn, } from "./auth/web3-signed-builder.js";
|
|
38
38
|
export { MissingAuthError, InvalidSignatureError, ExpiredTokenError, } from "./auth/errors.js";
|
|
39
39
|
export { NATIVE_VANA_ASSET, dataRegistryDomain, grantRegistrationDomain, grantRevocationDomain, serverRegistrationDomain, builderRegistrationDomain, escrowPaymentDomain, GRANT_REGISTRATION_TYPES, GRANT_REVOCATION_TYPES, SERVER_REGISTRATION_TYPES, BUILDER_REGISTRATION_TYPES, ADD_DATA_TYPES, RECORD_DATA_ACCESS_TYPES, type DataPortabilityContracts, type DataPortabilityGatewayConfig, type GrantRegistrationMessage, type GrantRevocationMessage, type ServerRegistrationMessage, type BuilderRegistrationMessage, type AddDataMessage, type RecordDataAccessMessage, } from "./protocol/eip712.js";
|
|
40
|
+
export { ENCLAVE_IDENTITY_EVIDENCE_VERSION, USER_PS_ID_DOMAIN, ENCLAVE_WALLET_PURPOSE, MASTER_SIGNATURE_DELIVERY_VERSION, MASTER_SIGNATURE_DELIVERY_MAX_AGE_SECONDS, SEALED_ENVELOPE_VERSION, ENCLAVE_TRUST_ANCHORS, userPsId, appRootPreimage, kmsIssuedPreimage, verifyEnclaveIdentityEvidence, buildMasterSignatureDelivery, encryptMasterSignatureDelivery, type UserPsId, type EnclaveIdentityEvidence, type ExpectedIdentity, type IdentityRequest, type IdentityState, type IdentityResponse, type IdentityRegistrationRequest, type IdentityRegistrationResponse, type MasterSignatureDelivery, type SealedSecretSubmission, type SealedSecretResponse, type AesGcmBox, type SealedEnvelope, type EnclaveTrustAnchors, } from "./protocol/identity.js";
|
|
40
41
|
export { PERSONAL_SERVER_REGISTRATION_DEFAULT_CHAIN_ID, PERSONAL_SERVER_REGISTRATION_DEFAULT_VERIFYING_CONTRACT, personalServerRegistrationDomain, createViemPersonalServerRegistrationSigner, buildPersonalServerRegistrationTypedData, buildPersonalServerRegistrationSignature, registerPersonalServerSignature, type PersonalServerRegistrationTypedData, type PersonalServerRegistrationSigner, type PersonalServerRegistrationDomainInput, type ViemPersonalServerRegistrationWalletClient, type ViemPersonalServerRegistrationSignerSource, type BuildPersonalServerRegistrationTypedDataInput, type BuildPersonalServerRegistrationSignatureInput, type PersonalServerRegistrationSignature, } from "./protocol/personal-server-registration.js";
|
|
41
42
|
export { PERSONAL_SERVER_LITE_OWNER_BINDING_VERSION, PERSONAL_SERVER_LITE_OWNER_BINDING_PURPOSE, PERSONAL_SERVER_LITE_OWNER_BINDING_PREFIX, buildPersonalServerLiteOwnerBindingMessage, createViemPersonalServerLiteOwnerBindingSigner, buildPersonalServerLiteOwnerBindingSignature, signPersonalServerLiteOwnerBinding, type PersonalServerLiteOwnerBindingPurpose, type PersonalServerLiteOwnerBindingMessage, type PersonalServerLiteOwnerBindingSigner, type ViemPersonalServerLiteOwnerBindingWalletClient, type ViemPersonalServerLiteOwnerBindingSignerSource, type BuildPersonalServerLiteOwnerBindingSignatureInput, type PersonalServerLiteOwnerBindingSignature, } from "./personal-server-lite/owner-binding.js";
|
|
42
43
|
export { ACCOUNT_PERSONAL_SERVER_REGISTRATION_INTENT, AccountPersonalServerRegistrationError, signPersonalServerRegistrationWithAccount, type AccountPersonalServerRegistrationIntent, type AccountPersonalServerRegistrationSignature, type AccountPersonalServerRegistrationStatus, type AccountPersonalServerRegistrationRequest, type AccountPersonalServerRegistrationConfig, type AccountSignedPersonalServerRegistration, type AccountConfirmationRequiredPersonalServerRegistration, type AccountFallbackSignedPersonalServerRegistration, type AccountPersonalServerRegistrationResult, } from "./account/personal-server-registration.js";
|
|
@@ -51,7 +52,8 @@ export { ScopeSchema, parseScope, scopeToPathSegments, scopeMatchesPattern, scop
|
|
|
51
52
|
export { SCOPE_ACTIONS, InvalidScopeEntryError, parseScopeEntry, formatScopeEntry, grantPermissions, permissionsToScopes, tryGrantPermissions, hasAction, type ScopeAction, type ParsedScopeEntry, type GrantPermission, } from "./protocol/scope-actions.js";
|
|
52
53
|
export { WRITE_SESSION_PATH, WRITE_SIGNATURE_HEADER, WRITE_METADATA_HEADER, WRITE_FILENAME_HEADER, WRITE_CONTENT_DISPOSITION_HEADER, WRITER_ATTRIBUTION_KEY, LINEAGE_KEY, LINEAGE_FIELD, MAX_LINEAGE_SOURCES, RESERVED_WRITE_KEYS, openWriteSession, writeData, writePersonalServerData, sessionCoversScope, binaryWriteSignedBytes, normalizeBinaryMimeType, parseWriteMetadataHeader, encodeWriteMetadataHeader, type WriteTransportRetryOptions, type WriteSession, type OpenWriteSessionParams, type WriteBinaryPayload, type LineageSource, type WriteJsonDataParams, type WriteBinaryDataParams, type WriteDataParams, type WriteDataResult, type WritePersonalServerDataParams, type WritePersonalServerDataResult, type BinaryWriteSignedBytesInput, } from "./protocol/personal-server-write.js";
|
|
53
54
|
export { resolveWriteSigner, type WriteSigner, type WriteSignerSource, type ViemWriteAccount, type ViemWriteWalletClient, type ResolveWriteSignerOptions, } from "./protocol/write-signer.js";
|
|
54
|
-
export { DERIVATIVE_QUESTIONS_PATH, MAX_QUESTION_SOURCE_SCOPES, MAX_QUESTION_CHARS, MAX_QUESTION_MODEL_CHARS, DEFAULT_QUESTION_TIMEOUT_MS, DEFAULT_QUESTION_POLL_INTERVAL_MS, QUESTION_STATUSES, registerQuestion, getQuestion, listQuestions, recomputeQuestion, deleteQuestion, waitForQuestion, askPersonalServer, QuestionStatusSchema, QuestionRegisteredBySchema, DerivativeQuestionSchema, QuestionRecomputeResultSchema, QuestionDeleteResultSchema, type QuestionStatus, type QuestionRegisteredBy, type DerivativeQuestion, type QuestionRecomputeResult, type QuestionDeleteResult, type DerivativeQuestionAuthParams, type RegisterQuestionParams, type GetQuestionParams, type ListQuestionsParams, type RecomputeQuestionParams, type DeleteQuestionParams, type WaitForQuestionParams, type AskPersonalServerParams, type AskPersonalServerResult, } from "./protocol/derivative-questions.js";
|
|
55
|
+
export { DERIVATIVE_QUESTIONS_PATH, MAX_QUESTION_SOURCE_SCOPES, MAX_QUESTION_CHARS, MAX_QUESTION_MODEL_CHARS, DEFAULT_QUESTION_TIMEOUT_MS, DEFAULT_QUESTION_POLL_INTERVAL_MS, QUESTION_STATUSES, DERIVATIVE_ERROR_CODES, DerivativeErrorCodeSchema, type DerivativeErrorCode, registerQuestion, getQuestion, listQuestions, recomputeQuestion, deleteQuestion, waitForQuestion, askPersonalServer, QuestionStatusSchema, QuestionRegisteredBySchema, DerivativeQuestionSchema, QuestionRecomputeResultSchema, QuestionDeleteResultSchema, type QuestionStatus, type QuestionRegisteredBy, type DerivativeQuestion, type QuestionRecomputeResult, type QuestionDeleteResult, type DerivativeQuestionAuthParams, type RegisterQuestionParams, type GetQuestionParams, type ListQuestionsParams, type RecomputeQuestionParams, type DeleteQuestionParams, type WaitForQuestionParams, type AskPersonalServerParams, type AskPersonalServerResult, } from "./protocol/derivative-questions.js";
|
|
56
|
+
export { DERIVATIVE_STATUS_PATH, DEFAULT_DERIVATIVE_STATUS_TIMEOUT_MS, DEFAULT_DERIVATIVE_STATUS_POLL_INTERVAL_MS, derivativeStatusTarget, getDerivativeStatus, waitForDerivativeStatus, isDerivativeStatusSettled, DerivativeStatusSchema, type DerivativeStatus, type GetDerivativeStatusParams, type WaitForDerivativeStatusParams, } from "./protocol/derivative-status.js";
|
|
55
57
|
export { deriveDataPointId, isDataPointId, scopeNamespace, derivedScopeViolatesNaming, assertDerivedScopeNaming, isRedactedLineageNode, personalServerLineagePath, gatewayLineagePath, getLineage, getPersonalServerLineage, getGatewayLineage, LineageNodeSchema, RedactedLineageNodeSchema, LineageEntrySchema, LineageGraphSchema, type LineageNode, type RedactedLineageNode, type LineageEntry, type LineageGraph, type LineageReadResult, type PersonalServerLineageParams, type GatewayLineageParams, type GetLineageParams, } from "./protocol/lineage.js";
|
|
56
58
|
export { DataFileEnvelopeSchema, createDataFileEnvelope, IngestResponseSchema, type DataFileEnvelope, type IngestResponse, } from "./protocol/data-file.js";
|
|
57
59
|
export { createGatewayClient, type GatewayEnvelope, type GatewayProof, type Builder, type Schema, type ServerInfo, type OwnerServerRecord, type OwnerServersResult, type GatewayGrantFee, type GatewayGrantStatus, type GatewayGrantResponse, type GrantListItem, type DataPointRecord, type DataPointListResult, type ListDataPointsOptions, type RegisterServerParams, type RegisterServerResult, type RegisterBuilderParams, type RegisterBuilderResult, type RegisterDataPointParams, type RegisterDataPointResult, type GetDataPointOptions, type DeleteDataPointParams, type DeleteDataPointResult, type CreateGrantParams, type RevokeGrantParams, type AccessRecord, type PayForOperationParams, type PayForOperationResult, type SettleOpType, type SettleItem, type SettlePromoteResult, type SettleReconcileItem, type SettleParams, type SettleResult, type GatewayClient, } from "./protocol/gateway.js";
|
package/dist/index.browser.js
CHANGED
|
@@ -31736,6 +31736,174 @@ var RECORD_DATA_ACCESS_TYPES = {
|
|
|
31736
31736
|
]
|
|
31737
31737
|
};
|
|
31738
31738
|
|
|
31739
|
+
// src/protocol/identity.ts
|
|
31740
|
+
init_interface();
|
|
31741
|
+
import * as secp256k13 from "@noble/secp256k1";
|
|
31742
|
+
import {
|
|
31743
|
+
concat as concat4,
|
|
31744
|
+
encodePacked,
|
|
31745
|
+
fromHex as fromHex5,
|
|
31746
|
+
getAddress,
|
|
31747
|
+
isAddressEqual,
|
|
31748
|
+
keccak256,
|
|
31749
|
+
recoverPublicKey,
|
|
31750
|
+
toBytes,
|
|
31751
|
+
toHex as toHex6
|
|
31752
|
+
} from "viem";
|
|
31753
|
+
import { publicKeyToAddress } from "viem/accounts";
|
|
31754
|
+
var ENCLAVE_IDENTITY_EVIDENCE_VERSION = 1;
|
|
31755
|
+
var USER_PS_ID_DOMAIN = "vana.ps-enclave.v1";
|
|
31756
|
+
var ENCLAVE_WALLET_PURPOSE = "vana.ps-enclave.wallet.v1";
|
|
31757
|
+
var MASTER_SIGNATURE_DELIVERY_VERSION = "vana.ps-enclave.delivery.v1";
|
|
31758
|
+
var MASTER_SIGNATURE_DELIVERY_MAX_AGE_SECONDS = 600;
|
|
31759
|
+
var SEALED_ENVELOPE_VERSION = 1;
|
|
31760
|
+
var VANA_MAINNET_CHAIN_ID = 1480;
|
|
31761
|
+
var MOKSHA_CHAIN_ID = 14800;
|
|
31762
|
+
var KMS_ISSUED_PREFIX = "dstack-kms-issued";
|
|
31763
|
+
var PREIMAGE_SEPARATOR = ":";
|
|
31764
|
+
var UNCOMPRESSED_PUBLIC_KEY_BYTES = 65;
|
|
31765
|
+
var UNCOMPRESSED_PUBLIC_KEY_PREFIX = "04";
|
|
31766
|
+
var EMPTY_HEX = "0x";
|
|
31767
|
+
function emptyAnchor() {
|
|
31768
|
+
return Object.freeze({
|
|
31769
|
+
kmsRootPubkey: EMPTY_HEX,
|
|
31770
|
+
appIds: Object.freeze([])
|
|
31771
|
+
});
|
|
31772
|
+
}
|
|
31773
|
+
var ENCLAVE_TRUST_ANCHORS = Object.freeze({
|
|
31774
|
+
// filled at fleet provisioning; verify fails closed while empty
|
|
31775
|
+
[VANA_MAINNET_CHAIN_ID]: emptyAnchor(),
|
|
31776
|
+
// filled at fleet provisioning; verify fails closed while empty
|
|
31777
|
+
[MOKSHA_CHAIN_ID]: emptyAnchor()
|
|
31778
|
+
});
|
|
31779
|
+
function userPsId(chainId, ownerAddress) {
|
|
31780
|
+
const packed = encodePacked(
|
|
31781
|
+
["string", "uint256", "address"],
|
|
31782
|
+
[USER_PS_ID_DOMAIN, BigInt(chainId), getAddress(ownerAddress)]
|
|
31783
|
+
);
|
|
31784
|
+
return keccak256(packed);
|
|
31785
|
+
}
|
|
31786
|
+
function compressPublicKey(publicKey) {
|
|
31787
|
+
return secp256k13.ProjectivePoint.fromHex(
|
|
31788
|
+
fromHex5(publicKey, "bytes")
|
|
31789
|
+
).toRawBytes(true);
|
|
31790
|
+
}
|
|
31791
|
+
function sameKey(a, b) {
|
|
31792
|
+
return toHex6(compressPublicKey(a)) === toHex6(compressPublicKey(b));
|
|
31793
|
+
}
|
|
31794
|
+
function assertUncompressedKey(publicKey) {
|
|
31795
|
+
const hex = publicKey.slice(2);
|
|
31796
|
+
if (hex.length !== UNCOMPRESSED_PUBLIC_KEY_BYTES * 2 || !hex.startsWith(UNCOMPRESSED_PUBLIC_KEY_PREFIX) || !/^[0-9a-fA-F]+$/.test(hex)) {
|
|
31797
|
+
throw new Error("Public key must be a 65-byte uncompressed secp256k1 key");
|
|
31798
|
+
}
|
|
31799
|
+
}
|
|
31800
|
+
function appRootPreimage(purpose, publicKey) {
|
|
31801
|
+
const keyHex = toHex6(compressPublicKey(publicKey)).slice(2);
|
|
31802
|
+
return keccak256(toBytes(`${purpose}${PREIMAGE_SEPARATOR}${keyHex}`));
|
|
31803
|
+
}
|
|
31804
|
+
function kmsIssuedPreimage(appId, appRootPublicKey) {
|
|
31805
|
+
const prefix = concat4([
|
|
31806
|
+
toBytes(`${KMS_ISSUED_PREFIX}${PREIMAGE_SEPARATOR}`),
|
|
31807
|
+
fromHex5(appId, "bytes")
|
|
31808
|
+
]);
|
|
31809
|
+
const compressed = compressPublicKey(appRootPublicKey);
|
|
31810
|
+
return keccak256(concat4([prefix, compressed]));
|
|
31811
|
+
}
|
|
31812
|
+
async function recoverChainKey(hash, signature, link) {
|
|
31813
|
+
try {
|
|
31814
|
+
return (await recoverPublicKey({ hash, signature })).toLowerCase();
|
|
31815
|
+
} catch {
|
|
31816
|
+
throw new Error(`Invalid enclave signature chain link ${link}`);
|
|
31817
|
+
}
|
|
31818
|
+
}
|
|
31819
|
+
async function verifyEnclaveIdentityEvidence(evidence, anchors, expected) {
|
|
31820
|
+
if (evidence.v !== ENCLAVE_IDENTITY_EVIDENCE_VERSION) {
|
|
31821
|
+
throw new Error("Unsupported enclave identity evidence version");
|
|
31822
|
+
}
|
|
31823
|
+
if (!Number.isInteger(evidence.epoch) || evidence.epoch < 1) {
|
|
31824
|
+
throw new Error("Invalid enclave identity epoch");
|
|
31825
|
+
}
|
|
31826
|
+
if (evidence.chainId !== expected.chainId) {
|
|
31827
|
+
throw new Error(
|
|
31828
|
+
"Enclave identity chain ID does not match expected chain ID"
|
|
31829
|
+
);
|
|
31830
|
+
}
|
|
31831
|
+
if (!isAddressEqual(evidence.ownerAddress, expected.ownerAddress)) {
|
|
31832
|
+
throw new Error("Enclave identity owner does not match expected owner");
|
|
31833
|
+
}
|
|
31834
|
+
if (evidence.epoch !== expected.epoch) {
|
|
31835
|
+
throw new Error("Enclave identity epoch does not match expected epoch");
|
|
31836
|
+
}
|
|
31837
|
+
const expectedUserPsId = userPsId(expected.chainId, expected.ownerAddress);
|
|
31838
|
+
if (evidence.userPsId.toLowerCase() !== expectedUserPsId.toLowerCase()) {
|
|
31839
|
+
throw new Error("Enclave userPsId does not match expected identity");
|
|
31840
|
+
}
|
|
31841
|
+
if (evidence.purpose !== ENCLAVE_WALLET_PURPOSE) {
|
|
31842
|
+
throw new Error("Unexpected enclave wallet purpose");
|
|
31843
|
+
}
|
|
31844
|
+
if (anchors.kmsRootPubkey === EMPTY_HEX) {
|
|
31845
|
+
throw new Error("KMS root trust anchor is not provisioned");
|
|
31846
|
+
}
|
|
31847
|
+
assertUncompressedKey(evidence.publicKey);
|
|
31848
|
+
const derivedAddress = publicKeyToAddress(evidence.publicKey);
|
|
31849
|
+
if (getAddress(derivedAddress) !== getAddress(evidence.address)) {
|
|
31850
|
+
throw new Error("Enclave public key does not match its address");
|
|
31851
|
+
}
|
|
31852
|
+
const appRootPublicKey = await recoverChainKey(
|
|
31853
|
+
appRootPreimage(evidence.purpose, evidence.publicKey),
|
|
31854
|
+
evidence.signatureChain[0],
|
|
31855
|
+
0
|
|
31856
|
+
);
|
|
31857
|
+
const kmsRootPublicKey = await recoverChainKey(
|
|
31858
|
+
kmsIssuedPreimage(evidence.appId, appRootPublicKey),
|
|
31859
|
+
evidence.signatureChain[1],
|
|
31860
|
+
1
|
|
31861
|
+
);
|
|
31862
|
+
let matchesAnchor;
|
|
31863
|
+
try {
|
|
31864
|
+
matchesAnchor = sameKey(kmsRootPublicKey, anchors.kmsRootPubkey);
|
|
31865
|
+
} catch {
|
|
31866
|
+
throw new Error("KMS root trust anchor is malformed");
|
|
31867
|
+
}
|
|
31868
|
+
if (!matchesAnchor) {
|
|
31869
|
+
throw new Error("KMS root public key does not match the trust anchor");
|
|
31870
|
+
}
|
|
31871
|
+
if (keccak256(kmsRootPublicKey) !== evidence.kmsRootFingerprint.toLowerCase()) {
|
|
31872
|
+
throw new Error("KMS root fingerprint does not match the evidence");
|
|
31873
|
+
}
|
|
31874
|
+
const appId = evidence.appId.toLowerCase();
|
|
31875
|
+
if (!anchors.appIds.some((allowedAppId) => allowedAppId.toLowerCase() === appId)) {
|
|
31876
|
+
throw new Error("Enclave app ID is not trusted");
|
|
31877
|
+
}
|
|
31878
|
+
}
|
|
31879
|
+
async function buildMasterSignatureDelivery(evidence, masterSignature, now = Math.floor(Date.now() / 1e3)) {
|
|
31880
|
+
deriveMasterKey(masterSignature);
|
|
31881
|
+
const signerAddress = await recoverServerOwner(masterSignature);
|
|
31882
|
+
if (!isAddressEqual(signerAddress, evidence.ownerAddress)) {
|
|
31883
|
+
throw new Error("Master signature signer does not match evidence owner");
|
|
31884
|
+
}
|
|
31885
|
+
return {
|
|
31886
|
+
v: MASTER_SIGNATURE_DELIVERY_VERSION,
|
|
31887
|
+
userPsId: evidence.userPsId,
|
|
31888
|
+
epoch: evidence.epoch,
|
|
31889
|
+
enclaveAddress: evidence.address,
|
|
31890
|
+
ownerAddress: evidence.ownerAddress,
|
|
31891
|
+
masterSignature,
|
|
31892
|
+
issuedAt: now
|
|
31893
|
+
};
|
|
31894
|
+
}
|
|
31895
|
+
async function encryptMasterSignatureDelivery(delivery, publicKey, ecies) {
|
|
31896
|
+
assertUncompressedKey(publicKey);
|
|
31897
|
+
if (!isAddressEqual(publicKeyToAddress(publicKey), delivery.enclaveAddress)) {
|
|
31898
|
+
throw new Error(
|
|
31899
|
+
"Public key does not belong to the delivery's enclave address"
|
|
31900
|
+
);
|
|
31901
|
+
}
|
|
31902
|
+
const plaintext = toBytes(JSON.stringify(delivery));
|
|
31903
|
+
const encrypted = await ecies.encrypt(fromHex5(publicKey, "bytes"), plaintext);
|
|
31904
|
+
return `0x${serializeECIES(encrypted)}`;
|
|
31905
|
+
}
|
|
31906
|
+
|
|
31739
31907
|
// src/protocol/personal-server-registration.ts
|
|
31740
31908
|
import {
|
|
31741
31909
|
isAddress
|
|
@@ -32435,7 +32603,7 @@ function buildMarkDataPointUnavailableRequest(config, input) {
|
|
|
32435
32603
|
// src/protocol/data-point-deletion.ts
|
|
32436
32604
|
import {
|
|
32437
32605
|
isAddress as isAddress5,
|
|
32438
|
-
keccak256 as
|
|
32606
|
+
keccak256 as keccak2563,
|
|
32439
32607
|
maxUint256,
|
|
32440
32608
|
stringToBytes as stringToBytes3
|
|
32441
32609
|
} from "viem";
|
|
@@ -32444,7 +32612,7 @@ import {
|
|
|
32444
32612
|
import {
|
|
32445
32613
|
encodeAbiParameters,
|
|
32446
32614
|
isAddress as isAddress4,
|
|
32447
|
-
keccak256
|
|
32615
|
+
keccak256 as keccak2562
|
|
32448
32616
|
} from "viem";
|
|
32449
32617
|
import { z } from "zod";
|
|
32450
32618
|
|
|
@@ -32528,7 +32696,7 @@ function deriveDataPointId(ownerAddress, scope) {
|
|
|
32528
32696
|
`ownerAddress is not an EVM address: ${String(ownerAddress)}`
|
|
32529
32697
|
);
|
|
32530
32698
|
}
|
|
32531
|
-
return
|
|
32699
|
+
return keccak2562(
|
|
32532
32700
|
encodeAbiParameters(
|
|
32533
32701
|
[
|
|
32534
32702
|
{ name: "ownerAddress", type: "address" },
|
|
@@ -32755,7 +32923,7 @@ var TOMBSTONE_METADATA_HASH_PREIMAGE = "vana.data-point.tombstone.metadata.v1";
|
|
|
32755
32923
|
var TOMBSTONE_DATA_HASH = "0x30c45ee72fe56d1927701316925ab7ceacd3b6f9267061735d59396f075c6222";
|
|
32756
32924
|
var TOMBSTONE_METADATA_HASH = "0xc5255a141acd6a2ae55971b62c0a85977c2511989dc114ad2abc2b7644f57d90";
|
|
32757
32925
|
function computeTombstoneHash(preimage) {
|
|
32758
|
-
return
|
|
32926
|
+
return keccak2563(stringToBytes3(preimage));
|
|
32759
32927
|
}
|
|
32760
32928
|
function isTombstoneHashes(dataHash, metadataHash) {
|
|
32761
32929
|
return typeof dataHash === "string" && typeof metadataHash === "string" && dataHash.toLowerCase() === TOMBSTONE_DATA_HASH && metadataHash.toLowerCase() === TOMBSTONE_METADATA_HASH;
|
|
@@ -33777,6 +33945,13 @@ var QUESTION_STATUSES = [
|
|
|
33777
33945
|
"failed",
|
|
33778
33946
|
"stale"
|
|
33779
33947
|
];
|
|
33948
|
+
var DERIVATIVE_ERROR_CODES = [
|
|
33949
|
+
"inference_unavailable",
|
|
33950
|
+
"source_missing",
|
|
33951
|
+
"grant_invalid",
|
|
33952
|
+
"internal"
|
|
33953
|
+
];
|
|
33954
|
+
var DerivativeErrorCodeSchema = z5.enum(DERIVATIVE_ERROR_CODES);
|
|
33780
33955
|
var QuestionStatusSchema = z5.enum(QUESTION_STATUSES);
|
|
33781
33956
|
var QuestionRegisteredBySchema = z5.union([
|
|
33782
33957
|
z5.object({ kind: z5.literal("owner") }),
|
|
@@ -33798,6 +33973,14 @@ var DerivativeQuestionSchema = z5.object({
|
|
|
33798
33973
|
status: QuestionStatusSchema,
|
|
33799
33974
|
/** A short reason, set only while `status` is `failed`. */
|
|
33800
33975
|
error: nullableString,
|
|
33976
|
+
/**
|
|
33977
|
+
* The coarse failure class behind `error`, set only while `status` is
|
|
33978
|
+
* `failed`. `null` from a Personal Server that predates the class
|
|
33979
|
+
* (`personal-server-ts` before the status route).
|
|
33980
|
+
*/
|
|
33981
|
+
errorCode: DerivativeErrorCodeSchema.nullish().transform(
|
|
33982
|
+
(value) => value ?? null
|
|
33983
|
+
),
|
|
33801
33984
|
createdAt: z5.string(),
|
|
33802
33985
|
updatedAt: nullableString,
|
|
33803
33986
|
/** When the last compute finished, or `null` while `pending`. */
|
|
@@ -33930,6 +34113,7 @@ async function questionErrorFromResponse(response, body) {
|
|
|
33930
34113
|
);
|
|
33931
34114
|
}
|
|
33932
34115
|
}
|
|
34116
|
+
var personalServerErrorFromQuestionResponse = questionErrorFromResponse;
|
|
33933
34117
|
async function sendOnce(params, resolved, session, spec, bodyBytes) {
|
|
33934
34118
|
return sendWithFreshProof(
|
|
33935
34119
|
spec.label,
|
|
@@ -34209,6 +34393,166 @@ async function askPersonalServer(params) {
|
|
|
34209
34393
|
return { registration, record };
|
|
34210
34394
|
}
|
|
34211
34395
|
|
|
34396
|
+
// src/protocol/derivative-status.ts
|
|
34397
|
+
import { z as z6 } from "zod";
|
|
34398
|
+
var DERIVATIVE_STATUS_PATH = "/v1/derivatives/status";
|
|
34399
|
+
var DEFAULT_DERIVATIVE_STATUS_TIMEOUT_MS = 12e4;
|
|
34400
|
+
var DEFAULT_DERIVATIVE_STATUS_POLL_INTERVAL_MS = 2e3;
|
|
34401
|
+
var nullable = (schema) => schema.nullish().transform((value) => value ?? null);
|
|
34402
|
+
var DerivativeStatusSchema = z6.object({
|
|
34403
|
+
derivedScope: z6.string().min(1),
|
|
34404
|
+
status: QuestionStatusSchema,
|
|
34405
|
+
/** When the last compute finished, or `null` if none ever has. */
|
|
34406
|
+
lastComputedAt: nullable(z6.string()),
|
|
34407
|
+
/** Local version of the derived record the last compute wrote. */
|
|
34408
|
+
derivedVersion: nullable(z6.number()),
|
|
34409
|
+
derivedCollectedAt: nullable(z6.string()),
|
|
34410
|
+
/** The failure class; `null` unless `status` is `failed`. */
|
|
34411
|
+
errorCode: nullable(DerivativeErrorCodeSchema),
|
|
34412
|
+
/**
|
|
34413
|
+
* Seconds until the Personal Server's next automatic retry, or `null` when
|
|
34414
|
+
* none is pending or running — the terminal signature. Poll on this cadence
|
|
34415
|
+
* rather than guessing one.
|
|
34416
|
+
*/
|
|
34417
|
+
retryAfterSeconds: nullable(z6.number())
|
|
34418
|
+
});
|
|
34419
|
+
function derivativeStatusTarget(derivedScope) {
|
|
34420
|
+
return `${DERIVATIVE_STATUS_PATH}?derivedScope=${encodeURIComponent(derivedScope)}`;
|
|
34421
|
+
}
|
|
34422
|
+
function normalizeBaseUrl3(url) {
|
|
34423
|
+
return url.replace(/\/+$/, "");
|
|
34424
|
+
}
|
|
34425
|
+
function resolveFetch3(fetchFn) {
|
|
34426
|
+
const resolved = fetchFn ?? globalThis.fetch;
|
|
34427
|
+
if (resolved === void 0) {
|
|
34428
|
+
throw new WriteRequestError("No fetch implementation available");
|
|
34429
|
+
}
|
|
34430
|
+
return resolved;
|
|
34431
|
+
}
|
|
34432
|
+
function requireDerivedScope(derivedScope) {
|
|
34433
|
+
if (typeof derivedScope !== "string" || derivedScope.length === 0) {
|
|
34434
|
+
throw new WriteRequestError("derivedScope is required");
|
|
34435
|
+
}
|
|
34436
|
+
return derivedScope;
|
|
34437
|
+
}
|
|
34438
|
+
function sleep3(ms, signal) {
|
|
34439
|
+
if (ms <= 0) return Promise.resolve();
|
|
34440
|
+
return new Promise((resolve, reject) => {
|
|
34441
|
+
const timer = setTimeout(() => {
|
|
34442
|
+
signal?.removeEventListener("abort", onAbort);
|
|
34443
|
+
resolve();
|
|
34444
|
+
}, ms);
|
|
34445
|
+
const onAbort = () => {
|
|
34446
|
+
clearTimeout(timer);
|
|
34447
|
+
reject(abortError2(signal));
|
|
34448
|
+
};
|
|
34449
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
34450
|
+
});
|
|
34451
|
+
}
|
|
34452
|
+
function timeoutError(latest, timeoutMs) {
|
|
34453
|
+
return new DerivativeQuestionTimeoutError(
|
|
34454
|
+
`Derived scope ${latest.derivedScope} was still ${latest.status} after ${timeoutMs}ms`,
|
|
34455
|
+
{
|
|
34456
|
+
derivedScope: latest.derivedScope,
|
|
34457
|
+
status: latest.status,
|
|
34458
|
+
errorCode: latest.errorCode,
|
|
34459
|
+
retryAfterSeconds: latest.retryAfterSeconds,
|
|
34460
|
+
timeoutMs
|
|
34461
|
+
}
|
|
34462
|
+
);
|
|
34463
|
+
}
|
|
34464
|
+
function abortError2(signal) {
|
|
34465
|
+
const reason = signal?.reason;
|
|
34466
|
+
return reason instanceof Error ? reason : new WriteRequestError("Derivative status wait was aborted");
|
|
34467
|
+
}
|
|
34468
|
+
function isDerivativeStatusSettled(status) {
|
|
34469
|
+
if (status.status === "ready") return true;
|
|
34470
|
+
return status.status === "failed" && status.retryAfterSeconds === null;
|
|
34471
|
+
}
|
|
34472
|
+
async function getDerivativeStatus(params) {
|
|
34473
|
+
const derivedScope = requireDerivedScope(params.derivedScope);
|
|
34474
|
+
const fetchFn = resolveFetch3(params.fetch);
|
|
34475
|
+
const baseUrl = normalizeBaseUrl3(params.personalServerUrl);
|
|
34476
|
+
const signer = resolveWriteSigner(params.signer, { account: params.account });
|
|
34477
|
+
const headers = new Headers(params.headers);
|
|
34478
|
+
headers.set(
|
|
34479
|
+
"Authorization",
|
|
34480
|
+
await buildWeb3SignedHeader({
|
|
34481
|
+
signMessage: signer.signMessage,
|
|
34482
|
+
aud: params.audience ?? baseUrl,
|
|
34483
|
+
method: "GET",
|
|
34484
|
+
uri: DERIVATIVE_STATUS_PATH,
|
|
34485
|
+
grantId: params.grantId
|
|
34486
|
+
})
|
|
34487
|
+
);
|
|
34488
|
+
let response;
|
|
34489
|
+
try {
|
|
34490
|
+
response = await fetchFn(
|
|
34491
|
+
`${baseUrl}${derivativeStatusTarget(derivedScope)}`,
|
|
34492
|
+
{
|
|
34493
|
+
method: "GET",
|
|
34494
|
+
headers,
|
|
34495
|
+
...params.signal ? { signal: params.signal } : {}
|
|
34496
|
+
}
|
|
34497
|
+
);
|
|
34498
|
+
} catch (err) {
|
|
34499
|
+
throw new WriteTransportError(
|
|
34500
|
+
`Derivative status read failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
34501
|
+
1,
|
|
34502
|
+
err
|
|
34503
|
+
);
|
|
34504
|
+
}
|
|
34505
|
+
if (!response.ok) {
|
|
34506
|
+
throw await personalServerErrorFromQuestionResponse(
|
|
34507
|
+
response
|
|
34508
|
+
);
|
|
34509
|
+
}
|
|
34510
|
+
let body;
|
|
34511
|
+
try {
|
|
34512
|
+
body = await response.json();
|
|
34513
|
+
} catch (err) {
|
|
34514
|
+
throw new DerivativeQuestionRejectedError(
|
|
34515
|
+
"Derivative status response is not JSON",
|
|
34516
|
+
response.status,
|
|
34517
|
+
null,
|
|
34518
|
+
{ cause: err instanceof Error ? err.message : String(err) }
|
|
34519
|
+
);
|
|
34520
|
+
}
|
|
34521
|
+
const parsed = DerivativeStatusSchema.safeParse(body);
|
|
34522
|
+
if (!parsed.success) {
|
|
34523
|
+
throw new DerivativeQuestionRejectedError(
|
|
34524
|
+
"Derivative status response is not a status view",
|
|
34525
|
+
response.status,
|
|
34526
|
+
null,
|
|
34527
|
+
{ issues: parsed.error.issues }
|
|
34528
|
+
);
|
|
34529
|
+
}
|
|
34530
|
+
return parsed.data;
|
|
34531
|
+
}
|
|
34532
|
+
async function waitForDerivativeStatus(params) {
|
|
34533
|
+
const timeoutMs = Math.max(
|
|
34534
|
+
0,
|
|
34535
|
+
params.timeoutMs ?? DEFAULT_DERIVATIVE_STATUS_TIMEOUT_MS
|
|
34536
|
+
);
|
|
34537
|
+
const pollIntervalMs = Math.max(
|
|
34538
|
+
0,
|
|
34539
|
+
params.pollIntervalMs ?? DEFAULT_DERIVATIVE_STATUS_POLL_INTERVAL_MS
|
|
34540
|
+
);
|
|
34541
|
+
const deadline = Date.now() + timeoutMs;
|
|
34542
|
+
for (; ; ) {
|
|
34543
|
+
if (params.signal?.aborted) throw abortError2(params.signal);
|
|
34544
|
+
const latest = await getDerivativeStatus(params);
|
|
34545
|
+
if (isDerivativeStatusSettled(latest)) return latest;
|
|
34546
|
+
const remaining = deadline - Date.now();
|
|
34547
|
+
if (remaining <= 0) throw timeoutError(latest, timeoutMs);
|
|
34548
|
+
const waitMs = latest.retryAfterSeconds === null ? pollIntervalMs : latest.retryAfterSeconds * 1e3;
|
|
34549
|
+
if (waitMs > remaining) {
|
|
34550
|
+
throw timeoutError(latest, timeoutMs);
|
|
34551
|
+
}
|
|
34552
|
+
await sleep3(waitMs, params.signal);
|
|
34553
|
+
}
|
|
34554
|
+
}
|
|
34555
|
+
|
|
34212
34556
|
// src/protocol/gateway.ts
|
|
34213
34557
|
function withGrantPermissions(grant) {
|
|
34214
34558
|
const stripped = { ...grant };
|
|
@@ -34821,9 +35165,13 @@ export {
|
|
|
34821
35165
|
ContractFactory,
|
|
34822
35166
|
ContractNotFoundError,
|
|
34823
35167
|
DATA_REGISTRY_STATUS_ABI,
|
|
35168
|
+
DEFAULT_DERIVATIVE_STATUS_POLL_INTERVAL_MS,
|
|
35169
|
+
DEFAULT_DERIVATIVE_STATUS_TIMEOUT_MS,
|
|
34824
35170
|
DEFAULT_QUESTION_POLL_INTERVAL_MS,
|
|
34825
35171
|
DEFAULT_QUESTION_TIMEOUT_MS,
|
|
35172
|
+
DERIVATIVE_ERROR_CODES,
|
|
34826
35173
|
DERIVATIVE_QUESTIONS_PATH,
|
|
35174
|
+
DERIVATIVE_STATUS_PATH,
|
|
34827
35175
|
DataFileEnvelopeSchema,
|
|
34828
35176
|
DataPointDeletedError,
|
|
34829
35177
|
DataPointNotFoundError,
|
|
@@ -34832,6 +35180,7 @@ export {
|
|
|
34832
35180
|
DerivativeComputeUnavailableError,
|
|
34833
35181
|
DerivativeCycleError,
|
|
34834
35182
|
DerivativeDerivedScopeRequiredError,
|
|
35183
|
+
DerivativeErrorCodeSchema,
|
|
34835
35184
|
DerivativeQuestionFailedError,
|
|
34836
35185
|
DerivativeQuestionInvalidError,
|
|
34837
35186
|
DerivativeQuestionNotFoundError,
|
|
@@ -34839,8 +35188,12 @@ export {
|
|
|
34839
35188
|
DerivativeQuestionSchema,
|
|
34840
35189
|
DerivativeQuestionTimeoutError,
|
|
34841
35190
|
DerivativeSourceNotGrantedError,
|
|
35191
|
+
DerivativeStatusSchema,
|
|
34842
35192
|
DropboxStorage,
|
|
34843
35193
|
ECIESError,
|
|
35194
|
+
ENCLAVE_IDENTITY_EVIDENCE_VERSION,
|
|
35195
|
+
ENCLAVE_TRUST_ANCHORS,
|
|
35196
|
+
ENCLAVE_WALLET_PURPOSE,
|
|
34844
35197
|
ESCROW_DEPOSIT_ABI2 as ESCROW_DEPOSIT_ABI,
|
|
34845
35198
|
ExpiredTokenError,
|
|
34846
35199
|
FEE_REGISTRY_ABI,
|
|
@@ -34861,6 +35214,8 @@ export {
|
|
|
34861
35214
|
LineageNodeSchema,
|
|
34862
35215
|
LineageReadError,
|
|
34863
35216
|
MASTER_KEY_MESSAGE,
|
|
35217
|
+
MASTER_SIGNATURE_DELIVERY_MAX_AGE_SECONDS,
|
|
35218
|
+
MASTER_SIGNATURE_DELIVERY_VERSION,
|
|
34864
35219
|
MAX_LINEAGE_SOURCES,
|
|
34865
35220
|
MAX_QUESTION_CHARS,
|
|
34866
35221
|
MAX_QUESTION_MODEL_CHARS,
|
|
@@ -34896,6 +35251,7 @@ export {
|
|
|
34896
35251
|
RedactedLineageNodeSchema,
|
|
34897
35252
|
RelayerError,
|
|
34898
35253
|
SCOPE_ACTIONS,
|
|
35254
|
+
SEALED_ENVELOPE_VERSION,
|
|
34899
35255
|
SERVER_REGISTRATION_TYPES,
|
|
34900
35256
|
ScopeSchema,
|
|
34901
35257
|
SerializationError,
|
|
@@ -34908,6 +35264,7 @@ export {
|
|
|
34908
35264
|
TOMBSTONE_METADATA_HASH,
|
|
34909
35265
|
TOMBSTONE_METADATA_HASH_PREIMAGE,
|
|
34910
35266
|
TransactionPendingError,
|
|
35267
|
+
USER_PS_ID_DOMAIN,
|
|
34911
35268
|
UserRejectedRequestError,
|
|
34912
35269
|
VanaError,
|
|
34913
35270
|
VanaStorage,
|
|
@@ -34926,6 +35283,7 @@ export {
|
|
|
34926
35283
|
WriteSessionExpiredError,
|
|
34927
35284
|
WriteTransportError,
|
|
34928
35285
|
WriteUnauthorizedError,
|
|
35286
|
+
appRootPreimage,
|
|
34929
35287
|
askPersonalServer,
|
|
34930
35288
|
assertDerivedScopeNaming,
|
|
34931
35289
|
assertValidPkceVerifier,
|
|
@@ -34935,6 +35293,7 @@ export {
|
|
|
34935
35293
|
buildDepositNativeRequest,
|
|
34936
35294
|
buildDepositTokenRequest,
|
|
34937
35295
|
buildMarkDataPointUnavailableRequest,
|
|
35296
|
+
buildMasterSignatureDelivery,
|
|
34938
35297
|
buildPersonalServerDataReadRequest,
|
|
34939
35298
|
buildPersonalServerLiteOwnerBindingMessage,
|
|
34940
35299
|
buildPersonalServerLiteOwnerBindingSignature,
|
|
@@ -34963,6 +35322,7 @@ export {
|
|
|
34963
35322
|
decryptWithPassword,
|
|
34964
35323
|
deleteDataPoint,
|
|
34965
35324
|
deleteQuestion,
|
|
35325
|
+
derivativeStatusTarget,
|
|
34966
35326
|
deriveDataPointId,
|
|
34967
35327
|
deriveMasterKey,
|
|
34968
35328
|
deriveScopeKey,
|
|
@@ -34973,6 +35333,7 @@ export {
|
|
|
34973
35333
|
encodeDepositTokenData,
|
|
34974
35334
|
encodeSetDataPointStatusData,
|
|
34975
35335
|
encodeWriteMetadataHeader,
|
|
35336
|
+
encryptMasterSignatureDelivery,
|
|
34976
35337
|
encryptWithPassword,
|
|
34977
35338
|
escrowContractAddress,
|
|
34978
35339
|
escrowPaymentDomain,
|
|
@@ -34986,6 +35347,7 @@ export {
|
|
|
34986
35347
|
getContractAddress,
|
|
34987
35348
|
getContractController,
|
|
34988
35349
|
getContractInfo,
|
|
35350
|
+
getDerivativeStatus,
|
|
34989
35351
|
getFee,
|
|
34990
35352
|
getGatewayLineage,
|
|
34991
35353
|
getLineage,
|
|
@@ -35001,10 +35363,12 @@ export {
|
|
|
35001
35363
|
isDataPointId,
|
|
35002
35364
|
isDataPointTombstone,
|
|
35003
35365
|
isDataPortabilityGatewayConfig,
|
|
35366
|
+
isDerivativeStatusSettled,
|
|
35004
35367
|
isECIESEncrypted,
|
|
35005
35368
|
isPlatformSupported,
|
|
35006
35369
|
isRedactedLineageNode,
|
|
35007
35370
|
isTombstoneHashes,
|
|
35371
|
+
kmsIssuedPreimage,
|
|
35008
35372
|
listQuestions,
|
|
35009
35373
|
mainnetServices,
|
|
35010
35374
|
moksha,
|
|
@@ -35039,10 +35403,13 @@ export {
|
|
|
35039
35403
|
signPersonalServerRegistrationWithAccount,
|
|
35040
35404
|
tombstoneDeletedAt,
|
|
35041
35405
|
tryGrantPermissions,
|
|
35406
|
+
userPsId,
|
|
35042
35407
|
vanaMainnet2 as vanaMainnet,
|
|
35408
|
+
verifyEnclaveIdentityEvidence,
|
|
35043
35409
|
verifyGrantRegistration,
|
|
35044
35410
|
verifyPkceChallenge,
|
|
35045
35411
|
verifyWeb3Signed,
|
|
35412
|
+
waitForDerivativeStatus,
|
|
35046
35413
|
waitForQuestion,
|
|
35047
35414
|
writeData,
|
|
35048
35415
|
writePersonalServerData
|