@ocap/mpc-hsm 0.0.0-stage → 1.33.7
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/esm/bip39-english-wordlist.d.mts +11 -0
- package/esm/bip39-english-wordlist.mjs +31 -0
- package/esm/constants.d.mts +140 -0
- package/esm/constants.mjs +142 -0
- package/esm/dkg.d.mts +279 -0
- package/esm/dkg.mjs +903 -0
- package/esm/index.d.mts +17 -0
- package/esm/index.mjs +18 -0
- package/esm/mta.d.mts +63 -0
- package/esm/mta.mjs +275 -0
- package/esm/ocap-clear-signing.d.mts +125 -0
- package/esm/ocap-clear-signing.mjs +1170 -0
- package/esm/offline-ceremony.d.mts +127 -0
- package/esm/offline-ceremony.mjs +481 -0
- package/esm/ot.d.mts +193 -0
- package/esm/ot.mjs +726 -0
- package/esm/personal-vault.d.mts +1292 -0
- package/esm/personal-vault.mjs +3615 -0
- package/esm/personal.d.mts +10 -0
- package/esm/personal.mjs +11 -0
- package/esm/presign.d.mts +242 -0
- package/esm/presign.mjs +951 -0
- package/esm/rlp-eip1559.d.mts +75 -0
- package/esm/rlp-eip1559.mjs +293 -0
- package/esm/secp256k1-scalar.d.mts +141 -0
- package/esm/secp256k1-scalar.mjs +474 -0
- package/esm/sign.d.mts +113 -0
- package/esm/sign.mjs +225 -0
- package/esm/steel-mnemonic.d.mts +55 -0
- package/esm/steel-mnemonic.mjs +247 -0
- package/esm/tweak.d.mts +100 -0
- package/esm/tweak.mjs +168 -0
- package/esm/ves-backup.d.mts +296 -0
- package/esm/ves-backup.mjs +1025 -0
- package/esm/x402-agent-guard.d.mts +111 -0
- package/esm/x402-agent-guard.mjs +780 -0
- package/lib/bip39-english-wordlist.cjs +33 -0
- package/lib/bip39-english-wordlist.d.cts +11 -0
- package/lib/constants.cjs +264 -0
- package/lib/constants.d.cts +140 -0
- package/lib/dkg.cjs +910 -0
- package/lib/dkg.d.cts +279 -0
- package/lib/index.cjs +420 -0
- package/lib/index.d.cts +17 -0
- package/lib/mta.cjs +280 -0
- package/lib/mta.d.cts +63 -0
- package/lib/ocap-clear-signing.cjs +1176 -0
- package/lib/ocap-clear-signing.d.cts +125 -0
- package/lib/offline-ceremony.cjs +487 -0
- package/lib/offline-ceremony.d.cts +127 -0
- package/lib/ot.cjs +744 -0
- package/lib/ot.d.cts +193 -0
- package/lib/personal-vault.cjs +3725 -0
- package/lib/personal-vault.d.cts +1292 -0
- package/lib/personal.cjs +338 -0
- package/lib/personal.d.cts +10 -0
- package/lib/presign.cjs +954 -0
- package/lib/presign.d.cts +242 -0
- package/lib/rlp-eip1559.cjs +303 -0
- package/lib/rlp-eip1559.d.cts +75 -0
- package/lib/secp256k1-scalar.cjs +527 -0
- package/lib/secp256k1-scalar.d.cts +141 -0
- package/lib/sign.cjs +233 -0
- package/lib/sign.d.cts +113 -0
- package/lib/steel-mnemonic.cjs +253 -0
- package/lib/steel-mnemonic.d.cts +55 -0
- package/lib/tweak.cjs +178 -0
- package/lib/tweak.d.cts +100 -0
- package/lib/ves-backup.cjs +1053 -0
- package/lib/ves-backup.d.cts +296 -0
- package/lib/x402-agent-guard.cjs +788 -0
- package/lib/x402-agent-guard.d.cts +111 -0
- package/package.json +80 -4
- package/README.md +0 -3
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BLIND_SLOT_RECORD_BYTES, BSGS_M, CLOUD_SYNC_SEALED_BLOB_BYTES, DEFAULT_COLD_GUARDIANS, DEFAULT_COLD_THRESHOLD, DEFAULT_ONLINE_PARTIES, DEFAULT_ONLINE_THRESHOLD, DST_BASEOT_KEY_V1, DST_BASEOT_S_POK_V1, DST_CANARY_CHALLENGE_V1, DST_CANARY_SHARD_POK_V1, DST_CHILD_TWEAK_V1, DST_COT_ROW_V1, DST_DKG_COM_V2, DST_DKG_CTX_V2, DST_DKG_ECHO_V2, DST_DKG_POK_V2, DST_DKG_SELFTEST_V2, DST_DKG_SHARE_AAD_V2, DST_DKG_STEP1_AUTH_V1, DST_DKG_TRANSCRIPT_V2, DST_DKG_X25519_HKDF_V2, DST_EMERGENCY_SWEEP_NONCE_V1, DST_KOS15_CHI_V1, DST_LHL_GADGET_V1, DST_MTA_ETA_V1, DST_OT_CTR_IV_V1, DST_PERSONAL_ANNOUNCE_TICKET_V1, DST_PERSONAL_BASEOT_CTX_V1, DST_PERSONAL_BLIND_OCAP_VELOCITY_TAG_V1, DST_PERSONAL_BLIND_SLOT_TAG_V1, DST_PERSONAL_BLIND_VAULT_TAG_V1, DST_PERSONAL_BLIND_VELOCITY_TAG_V1, DST_PERSONAL_BLOB_AAD_V1, DST_PERSONAL_BLOB_MAGIC, DST_PERSONAL_CHALLENGE_ANNOUNCE_V1, DST_PERSONAL_CHALLENGE_ENTITLEMENT_APPLY_V1, DST_PERSONAL_CHALLENGE_PAIR_RESPLIT_V1, DST_PERSONAL_CHALLENGE_PRESIGN_INIT_V1, DST_PERSONAL_CHALLENGE_RESEAL_KID_V1, DST_PERSONAL_CHALLENGE_REVOKE_SLOT_V1, DST_PERSONAL_CHALLENGE_SEAL_ENROLL_V1, DST_PERSONAL_CHALLENGE_SESSION_LOCK_V1, DST_PERSONAL_CHALLENGE_SESSION_OPEN_V1, DST_PERSONAL_CHALLENGE_SIGN_V1, DST_PERSONAL_CHALLENGE_VETO_V1, DST_PERSONAL_CLEAR_PREVIEW_V1, DST_PERSONAL_CLOUD_BLOB_V1, DST_PERSONAL_CLOUD_SYNC_V1, DST_PERSONAL_CLUSTER_HDKG_V1, DST_PERSONAL_COLD_MANIFEST_V1, DST_PERSONAL_DEVICE_AAD_V1, DST_PERSONAL_DEVICE_ENV_V1, DST_PERSONAL_ENTITLEMENT_TICKET_V1, DST_PERSONAL_FIREWALL_ATTESTATION_V1, DST_PERSONAL_GUARDIAN_QUORUM_V1, DST_PERSONAL_PAIR_POP_V1, DST_PERSONAL_PAIR_SHARE_AAD_V1, DST_PERSONAL_PAIR_SHARE_BOX_V1, DST_PERSONAL_POLICY_V1, DST_PERSONAL_PWD_CLIENT_HKDF_V1, DST_PERSONAL_PWD_HSM_HKDF_V1, DST_PERSONAL_ROLE_QUORUM_V1, DST_PERSONAL_SEAL_ENROLL_ACTOR_POK_V1, DST_PERSONAL_SEAL_KEY_V1, DST_PERSONAL_SEAL_SALT_V1, DST_PERSONAL_SIMULATED_DELTA_V1, DST_PERSONAL_TRANSPORT_AAD_V1, DST_PERSONAL_TRANSPORT_BOX_V1, DST_PRESIG_COM_V1, DST_PRESIG_ID_V1, DST_PRESIG_PI_LIN_K_V1, DST_PRESIG_PI_POK_Z_V1, DST_PRESIG_POK_B_V1, DST_PRESIG_POK_CK_V1, DST_PRESIG_POK_GAMMA_V1, DST_PRESIG_RERAND_V1, DST_PRESIG_ZETA_HKDF_V1, DST_PRESIG_ZETA_V1, DST_RULE_TWEAK_V1, DST_VES_BIT_OR_V1, DST_VES_CHUNK_LIN_V1, ESCAPE_DRILL_MAX_AGE_SECONDS, FORBIDDEN_ONLINE_ROLE_ESCAPE_CANARY, HSM_SEALED_BLOB_BYTES, MAX_ACTIVE_PRESIGN_SESSIONS, MAX_BLIND_RECORDS, MAX_MPC_CLUSTER_NODES, MAX_MPC_PEER_MESSAGE_BYTES, MAX_MPC_SIGN_REQUEST_BYTES, MAX_ON_DEMAND_SILENCE_SECONDS, MAX_PERSONAL_CALL_DEPTH, MAX_PERSONAL_FIREWALL_ATTESTATION_TTL_SECONDS, MAX_PERSONAL_HTTP_BODY_BYTES, MAX_PERSONAL_JSON_DEPTH, MAX_PERSONAL_JWT_TTL_SECONDS, MAX_PERSONAL_JWT_UNSIGNED_BYTES, MAX_PERSONAL_OCAP_CBOR_DEPTH, MAX_PERSONAL_OCAP_DELEGATE_TTL_SECONDS, MAX_PERSONAL_OCAP_TX_BYTES, MAX_PERSONAL_TX_DATA_BYTES, MAX_RECOVERY_PACKAGE_BYTES, MAX_RULE_DAG_NODES, MAX_RULE_YAML_BYTES, MAX_TRAVEL_SESSION_TTL_SECONDS, MPC_PROTOCOL_VERSION, MpcErrorCode, MpcProtocolError, MpcRootLifecycleState, OT_BASE_PARTIAL_BITS, OT_COLUMN_BYTES, OT_EXTENSION_ROWS, OT_GADGET_BITS, OT_KAPPA_BITS, OT_KAPPA_BYTES, OT_LHL_EXTRA_BITS, OT_SACRIFICE_BITS, PEDERSEN_H_COMPRESSED_HEX, PEDERSEN_H_DST, PEDERSEN_H_MESSAGE, PERSONAL_PRESIG_TTL_SECONDS, SECP256K1_HALF_N, SECP256K1_N, SECP256K1_P } from "./constants.mjs";
|
|
2
|
+
import { Fn, H_scalar, LinearPedersenDleqProof, PEDERSEN_H, PEDERSEN_H_COMP33, PedersenPokProof, RandomBytesFn, SECP256K1_G, SECP256K1_ZERO, SchnorrPokProof, Secp256k1Point, addModN, assertScalarInField, assertScalarNonZero, assertValidX25519PublicKey, bytes32ToScalarNonZero, bytes32ToScalarStrict, bytesToBigIntBE, bytesToHex, computeX25519SharedSecret, concatBytes, constantTimeEqual, createLinearPedersenDleqProof, createPedersenPok, createSchnorrPokInBase, decodePointCompressed, defaultRandomBytes, encodePointCompressed, enumerateCombinations, evaluateFeldmanCommitments, evaluatePolynomialModN, hashTranscriptSha256, hexToBytes, invModN, lagrangeCoefficientAtZero, lengthPrefixedEncode, modN, mulBaseG, mulModN, mulPoint, negModN, normalizeHexBytes, normalizeSortedSubset, pedersenCommit, sampleScalarNonZero, scalarToBytes32, secp256k1, sortedSubsetBytes, subModN, subsetsEqual, u16be, u32be, u64be, u8, utf8Bytes, verifyLinearPedersenDleqProof, verifyPedersenPok, verifySchnorrPokInBase, zeroizeBytes } from "./secp256k1-scalar.mjs";
|
|
3
|
+
import { DerivedChildKey, MpcChildDerivationSpec, MpcTweakMode, applyAdditiveTweak, assertAllowedOnlineRole, deriveRoleBoundChild, deriveRuleBoundChild, deriveUntweakedChild, ecrecoverEthAddress, parseStrictEthAddress, pointToEthAddress, toEip55ChecksumAddress } from "./tweak.mjs";
|
|
4
|
+
import { MpcPartyBaseOtChannels, MpcPublicClusterInfo, MtaInstanceKind, PresignMtaOtStep1Bundle, PresignMtaOtStep2Bundle, PresignMtaOtStep3Bundle, PresignMtaStep4PayloadBundle, PresignPartySession, PresignRound1CommitmentMsg, PresignRound1RevealMsg, PresignRound3BroadcastMsg, PresignRound4BroadcastMsg, PresignaturePublicVerification, PresignatureShareRecord, VolatilePresignaturePool, computeSubsetBoundPresigId } from "./presign.mjs";
|
|
5
|
+
import { MpcAggregatedSignature, MpcOnlineSignRequest, MpcOnlineSignShare, RerandomizedNonceResult, aggregateOnlineSignature, computeRerandomizedNoncePoint, createOnlineSignShare, deriveGrothShoupRerandScalar, evaluateConsumedPresigShareWithRerand, verifyAndDeriveRequestChildKey, verifyOnlineSignShare } from "./sign.mjs";
|
|
6
|
+
import { DecodedSignedEip1559Tx, EIP1559_TX_TYPE_BYTE, ERC20_TRANSFER_SELECTOR_HEX, Eip1559AccessListItem, Eip1559UnsignedTxFields, RlpInput, bigintToMinimalBytesBE, decodeAndRecoverSignedEip1559Tx, decodeErc20TransferCalldata, encodeErc20TransferCalldata, encodeSignedEip1559Tx, encodeUnsignedEip1559Tx, rlpDecode, rlpEncode } from "./rlp-eip1559.mjs";
|
|
7
|
+
import { ACTOR_KIND_AND_ALG_BYTE, ActorKindAndAlg, ActorSlotPairingBootstrapPackage, CanonicalPersonalOcapChainGasConfig, CanonicalPersonalVaultPolicy, DeviceShareEnvelope, ENTITLEMENT_TIER_CODE, ERC20_APPROVE_SELECTOR_HEX, EncryptedTargetActorShareBox, FirewallCommercialTier, FirewallRiskVerdict, GuardianQuorumProof, HARD_BANNED_PERSONAL_EVM_SELECTORS, HSM_SEALED_BLOB_CIPHERTEXT_BYTES, HSM_SEALED_BLOB_CIPHERTEXT_OFFSET, HSM_SEALED_BLOB_HEADER_BYTES, HSM_SEALED_BLOB_HEADER_MAC_OFFSET, HSM_SEALED_BLOB_HEADER_WITH_MAC_BYTES, HSM_SEALED_BLOB_IV_OFFSET, HSM_SEALED_BLOB_MAX_POLICY_UTF8_BYTES, HSM_SEALED_BLOB_TAG_OFFSET, HSM_SEALED_BLOB_VERSION, HsmSealedBlobHeaderFields, MAX_ANNOUNCE_VALIDITY_WINDOW_SEC, MIN_ANNOUNCE_VALIDITY_WINDOW_SEC, OfflineSweepItemSpec, PERSONAL_MAX_VELOCITY_UINT128, ParsedHsmSealedBlob, PersonalActorChallengeAction, PersonalActorSignature, PersonalAllowedContractRule, PersonalAssetTierLimits, PersonalBlobAadInput, PersonalChildDerivationInput, PersonalClearSigningPreview, PersonalColdRecoveryKitManifest, PersonalColdRecoveryPlatePublicInfo, PersonalCosignerResponderSession, PersonalCosignerTransport, PersonalEvmCallKind, PersonalMpcEoaSigner, PersonalOcapAssetTierLimits, PersonalOcapChainGasConfig, PersonalOnlineSignCosignerRequest, PersonalPolicyProofBundle, PersonalPolicyTier, PersonalPostConditions, PersonalPresignInitRequest, PersonalPresignInitResponse, PersonalPresignStepRequest, PersonalPresignStepResponse, PersonalPreviewCallKind, PersonalRoleRoster, PersonalSealEnrollActorPok, PersonalSignPayloadKind, PersonalSignTxOptions, PersonalSignedEip1559Result, PersonalVaultPolicy, PersonalWakePasswordKdfOptions, QuorumApproverAlg, QuorumApproverMember, QuorumMemberSignatureEntry, RoleQuorumProof, SignedAnnounceTicket, SignedFirewallAttestation, SignedOfflineSweepTx, SimulatedBalanceDelta, UNLIMITED_APPROVE_THRESHOLD, VaultEntitlementTicket, VaultEntitlementTier, VerifiedPersonalEip1559Tx, WebAuthnVerifyExpectedPolicy, actorKindAndAlgToByte, additiveToShamirSlot1Share, additiveToShamirSlot2Share, aes256GcmDecryptDetached, aes256GcmEncryptDetached, applyHsmSlotResplitDelta, assertNoEip7702Bytes, assertPersonalSlotNotExpired, base64UrlDecodeBytes, base64UrlEncodeBytes, bootstrapPersonalVaultClient, buildPersonalAnnounceChallengeDigest32, buildPersonalClearSigningPreview, buildPersonalEntitlementApplyChallengeDigest32, buildPersonalPairResplitChallengeDigest32, buildPersonalPresignInitChallengeDigest32, buildPersonalResealKidChallengeDigest32, buildPersonalRevokeSlotChallengeDigest32, buildPersonalSealEnrollChallengeDigest32, buildPersonalSessionLockChallengeDigest32, buildPersonalSessionOpenChallengeDigest32, buildPersonalSignChallengeDigest32, buildPersonalVaultClusterInfo, buildPersonalVetoChallengeDigest32, byteToActorKindAndAlg, canonicalizePersonalBlobAadBytes, canonicalizePersonalVaultPolicy, completeActorSlotPairingOnTarget, computeHsmSealedBlobHeaderMac32, computeNonDegenerateActorResplitShare, computePersonalActorChallengeDigest32, computePersonalClearSigningPreviewHash32, computePersonalPolicyHash32, computeSimulatedDeltaCommitment32, computeVaultEntitlementTicketDigest32, createActorSlotPairingBootstrap, createPersonalMpcEoaSigner, createPersonalSealEnrollActorPok, decodeAndVerifyPersonalEip1559Tx, decodeErc20ApproveCalldata, decodeHsmSealedBlobHeader319, decodeHsmSealedBlobInnerPlaintext3717, deriveBlindOcapVelocityTag32, deriveBlindSlotTag32, deriveBlindVaultTag32, deriveBlindVelocityTag32, deriveHsmPersonalSealKey32, derivePersonalVaultChildKey, derivePersonalWakePasswordKeys, encodeErc20ApproveCalldata, encodeHsmSealedBlobHeader319, encodeHsmSealedBlobInnerPlaintext3717, initiateActorSlotResplit, isAgentActorKind, normalizeActorPublicKeyToPadded65, normalizeCanonicalOcapTokenKey, normalizeMaxTokenOutflowsCaps, normalizeOcapAddressOrEth, openHsmInboundTransportBox, parseHsmSealedBlobHeader, recoverPersonalVaultRootOffline, resolveRequiredPolicyTier, runPersonalClientPresignWithTransport, sealDeviceShareEnvelope, sealHsmInboundTransportBox, signAnnounceTicket, signGuardianQuorumApproval, signPersonalActorChallenge, signPersonalFirewallAttestation, signPersonalVaultRecoverySweepOffline, signRoleQuorumApproval, signVaultEntitlementTicket, unsealDeviceShareEnvelope, unwrapSealedBlobFromCloudSync, validateActorPublicKeyPadded65, verifyActorSlotPairingBootstrap, verifyGuardianQuorumProof, verifyPersonalActorSignature, verifyPersonalAdditiveSplitMatchesRoot, verifyPersonalColdRecoveryKitManifest, verifyPersonalFirewallAttestation, verifyPersonalPolicyProofBundle, verifyPersonalSealEnrollActorPok, verifyPersonalSimulationBalanceDelta, verifyRoleQuorumProof, verifySignedAnnounceTicket, verifyVaultEntitlementTicket, wrapSealedBlobForCloudSync } from "./personal-vault.mjs";
|
|
8
|
+
import { CborTagValue, VerifiedPersonalArcblockJwt, VerifiedPersonalOcapTx, decodeAndVerifyPersonalArcblockJwt, decodeAndVerifyPersonalOcapTx, deriveOcapIdentitiesFromChildPoint, estimateOcapExecutionCostUpperBound, resolveRequiredOcapPolicyTier } from "./ocap-clear-signing.mjs";
|
|
9
|
+
import { MAX_X402_ACCEPTS_ENTRIES, MAX_X402_CHALLENGE_BYTES, MAX_X402_RETRIES, ParsedX402PaymentChallenge, PolicyProofBundle, X402AgentPaymentFetchOptions, X402EscalationContext, X402EscalationKind, X402HeaderMap, X402PaymentProofPayload, X402PaymentRequirement, X402SyncResponseSnapshot, X402TxExecutionParams, X402_EXACT_EVM_TX_SCHEME, X402_PROTOCOL_VERSION, createX402AgentPaymentFetch, decodeX402PaymentHeader, encodeX402PaymentHeader, parseX402PaymentChallenge } from "./x402-agent-guard.mjs";
|
|
10
|
+
export { ACTOR_KIND_AND_ALG_BYTE, ActorKindAndAlg, ActorSlotPairingBootstrapPackage, BLIND_SLOT_RECORD_BYTES, BSGS_M, CLOUD_SYNC_SEALED_BLOB_BYTES, CanonicalPersonalOcapChainGasConfig, CanonicalPersonalVaultPolicy, CborTagValue, DEFAULT_COLD_GUARDIANS, DEFAULT_COLD_THRESHOLD, DEFAULT_ONLINE_PARTIES, DEFAULT_ONLINE_THRESHOLD, DST_BASEOT_KEY_V1, DST_BASEOT_S_POK_V1, DST_CANARY_CHALLENGE_V1, DST_CANARY_SHARD_POK_V1, DST_CHILD_TWEAK_V1, DST_COT_ROW_V1, DST_DKG_COM_V2, DST_DKG_CTX_V2, DST_DKG_ECHO_V2, DST_DKG_POK_V2, DST_DKG_SELFTEST_V2, DST_DKG_SHARE_AAD_V2, DST_DKG_STEP1_AUTH_V1, DST_DKG_TRANSCRIPT_V2, DST_DKG_X25519_HKDF_V2, DST_EMERGENCY_SWEEP_NONCE_V1, DST_KOS15_CHI_V1, DST_LHL_GADGET_V1, DST_MTA_ETA_V1, DST_OT_CTR_IV_V1, DST_PERSONAL_ANNOUNCE_TICKET_V1, DST_PERSONAL_BASEOT_CTX_V1, DST_PERSONAL_BLIND_OCAP_VELOCITY_TAG_V1, DST_PERSONAL_BLIND_SLOT_TAG_V1, DST_PERSONAL_BLIND_VAULT_TAG_V1, DST_PERSONAL_BLIND_VELOCITY_TAG_V1, DST_PERSONAL_BLOB_AAD_V1, DST_PERSONAL_BLOB_MAGIC, DST_PERSONAL_CHALLENGE_ANNOUNCE_V1, DST_PERSONAL_CHALLENGE_ENTITLEMENT_APPLY_V1, DST_PERSONAL_CHALLENGE_PAIR_RESPLIT_V1, DST_PERSONAL_CHALLENGE_PRESIGN_INIT_V1, DST_PERSONAL_CHALLENGE_RESEAL_KID_V1, DST_PERSONAL_CHALLENGE_REVOKE_SLOT_V1, DST_PERSONAL_CHALLENGE_SEAL_ENROLL_V1, DST_PERSONAL_CHALLENGE_SESSION_LOCK_V1, DST_PERSONAL_CHALLENGE_SESSION_OPEN_V1, DST_PERSONAL_CHALLENGE_SIGN_V1, DST_PERSONAL_CHALLENGE_VETO_V1, DST_PERSONAL_CLEAR_PREVIEW_V1, DST_PERSONAL_CLOUD_BLOB_V1, DST_PERSONAL_CLOUD_SYNC_V1, DST_PERSONAL_CLUSTER_HDKG_V1, DST_PERSONAL_COLD_MANIFEST_V1, DST_PERSONAL_DEVICE_AAD_V1, DST_PERSONAL_DEVICE_ENV_V1, DST_PERSONAL_ENTITLEMENT_TICKET_V1, DST_PERSONAL_FIREWALL_ATTESTATION_V1, DST_PERSONAL_GUARDIAN_QUORUM_V1, DST_PERSONAL_PAIR_POP_V1, DST_PERSONAL_PAIR_SHARE_AAD_V1, DST_PERSONAL_PAIR_SHARE_BOX_V1, DST_PERSONAL_POLICY_V1, DST_PERSONAL_PWD_CLIENT_HKDF_V1, DST_PERSONAL_PWD_HSM_HKDF_V1, DST_PERSONAL_ROLE_QUORUM_V1, DST_PERSONAL_SEAL_ENROLL_ACTOR_POK_V1, DST_PERSONAL_SEAL_KEY_V1, DST_PERSONAL_SEAL_SALT_V1, DST_PERSONAL_SIMULATED_DELTA_V1, DST_PERSONAL_TRANSPORT_AAD_V1, DST_PERSONAL_TRANSPORT_BOX_V1, DST_PRESIG_COM_V1, DST_PRESIG_ID_V1, DST_PRESIG_PI_LIN_K_V1, DST_PRESIG_PI_POK_Z_V1, DST_PRESIG_POK_B_V1, DST_PRESIG_POK_CK_V1, DST_PRESIG_POK_GAMMA_V1, DST_PRESIG_RERAND_V1, DST_PRESIG_ZETA_HKDF_V1, DST_PRESIG_ZETA_V1, DST_RULE_TWEAK_V1, DST_VES_BIT_OR_V1, DST_VES_CHUNK_LIN_V1, DecodedSignedEip1559Tx, DerivedChildKey, DeviceShareEnvelope, EIP1559_TX_TYPE_BYTE, ENTITLEMENT_TIER_CODE, ERC20_APPROVE_SELECTOR_HEX, ERC20_TRANSFER_SELECTOR_HEX, ESCAPE_DRILL_MAX_AGE_SECONDS, Eip1559AccessListItem, Eip1559UnsignedTxFields, EncryptedTargetActorShareBox, FORBIDDEN_ONLINE_ROLE_ESCAPE_CANARY, FirewallCommercialTier, FirewallRiskVerdict, Fn, GuardianQuorumProof, HARD_BANNED_PERSONAL_EVM_SELECTORS, HSM_SEALED_BLOB_BYTES, HSM_SEALED_BLOB_CIPHERTEXT_BYTES, HSM_SEALED_BLOB_CIPHERTEXT_OFFSET, HSM_SEALED_BLOB_HEADER_BYTES, HSM_SEALED_BLOB_HEADER_MAC_OFFSET, HSM_SEALED_BLOB_HEADER_WITH_MAC_BYTES, HSM_SEALED_BLOB_IV_OFFSET, HSM_SEALED_BLOB_MAX_POLICY_UTF8_BYTES, HSM_SEALED_BLOB_TAG_OFFSET, HSM_SEALED_BLOB_VERSION, H_scalar, HsmSealedBlobHeaderFields, LinearPedersenDleqProof, MAX_ACTIVE_PRESIGN_SESSIONS, MAX_ANNOUNCE_VALIDITY_WINDOW_SEC, MAX_BLIND_RECORDS, MAX_MPC_CLUSTER_NODES, MAX_MPC_PEER_MESSAGE_BYTES, MAX_MPC_SIGN_REQUEST_BYTES, MAX_ON_DEMAND_SILENCE_SECONDS, MAX_PERSONAL_CALL_DEPTH, MAX_PERSONAL_FIREWALL_ATTESTATION_TTL_SECONDS, MAX_PERSONAL_HTTP_BODY_BYTES, MAX_PERSONAL_JSON_DEPTH, MAX_PERSONAL_JWT_TTL_SECONDS, MAX_PERSONAL_JWT_UNSIGNED_BYTES, MAX_PERSONAL_OCAP_CBOR_DEPTH, MAX_PERSONAL_OCAP_DELEGATE_TTL_SECONDS, MAX_PERSONAL_OCAP_TX_BYTES, MAX_PERSONAL_TX_DATA_BYTES, MAX_RECOVERY_PACKAGE_BYTES, MAX_RULE_DAG_NODES, MAX_RULE_YAML_BYTES, MAX_TRAVEL_SESSION_TTL_SECONDS, MAX_X402_ACCEPTS_ENTRIES, MAX_X402_CHALLENGE_BYTES, MAX_X402_RETRIES, MIN_ANNOUNCE_VALIDITY_WINDOW_SEC, MPC_PROTOCOL_VERSION, type MpcAggregatedSignature, MpcChildDerivationSpec, MpcErrorCode, type MpcOnlineSignRequest, type MpcOnlineSignShare, MpcPartyBaseOtChannels, MpcProtocolError, MpcPublicClusterInfo, MpcRootLifecycleState, MpcTweakMode, MtaInstanceKind, OT_BASE_PARTIAL_BITS, OT_COLUMN_BYTES, OT_EXTENSION_ROWS, OT_GADGET_BITS, OT_KAPPA_BITS, OT_KAPPA_BYTES, OT_LHL_EXTRA_BITS, OT_SACRIFICE_BITS, OfflineSweepItemSpec, PEDERSEN_H, PEDERSEN_H_COMP33, PEDERSEN_H_COMPRESSED_HEX, PEDERSEN_H_DST, PEDERSEN_H_MESSAGE, PERSONAL_MAX_VELOCITY_UINT128, PERSONAL_PRESIG_TTL_SECONDS, ParsedHsmSealedBlob, ParsedX402PaymentChallenge, PedersenPokProof, PersonalActorChallengeAction, PersonalActorSignature, PersonalAllowedContractRule, PersonalAssetTierLimits, PersonalBlobAadInput, PersonalChildDerivationInput, PersonalClearSigningPreview, PersonalColdRecoveryKitManifest, PersonalColdRecoveryPlatePublicInfo, PersonalCosignerResponderSession, PersonalCosignerTransport, PersonalEvmCallKind, PersonalMpcEoaSigner, PersonalOcapAssetTierLimits, PersonalOcapChainGasConfig, PersonalOnlineSignCosignerRequest, PersonalPolicyProofBundle, PersonalPolicyTier, PersonalPostConditions, PersonalPresignInitRequest, PersonalPresignInitResponse, PersonalPresignStepRequest, PersonalPresignStepResponse, PersonalPreviewCallKind, PersonalRoleRoster, PersonalSealEnrollActorPok, PersonalSignPayloadKind, PersonalSignTxOptions, PersonalSignedEip1559Result, PersonalVaultPolicy, PersonalWakePasswordKdfOptions, PolicyProofBundle, PresignMtaOtStep1Bundle, PresignMtaOtStep2Bundle, PresignMtaOtStep3Bundle, PresignMtaStep4PayloadBundle, PresignPartySession, PresignRound1CommitmentMsg, PresignRound1RevealMsg, PresignRound3BroadcastMsg, PresignRound4BroadcastMsg, PresignaturePublicVerification, PresignatureShareRecord, QuorumApproverAlg, QuorumApproverMember, QuorumMemberSignatureEntry, RandomBytesFn, type RerandomizedNonceResult, RlpInput, RoleQuorumProof, SECP256K1_G, SECP256K1_HALF_N, SECP256K1_N, SECP256K1_P, SECP256K1_ZERO, SchnorrPokProof, Secp256k1Point, SignedAnnounceTicket, SignedFirewallAttestation, SignedOfflineSweepTx, SimulatedBalanceDelta, UNLIMITED_APPROVE_THRESHOLD, VaultEntitlementTicket, VaultEntitlementTier, VerifiedPersonalArcblockJwt, VerifiedPersonalEip1559Tx, VerifiedPersonalOcapTx, VolatilePresignaturePool, WebAuthnVerifyExpectedPolicy, X402AgentPaymentFetchOptions, X402EscalationContext, X402EscalationKind, X402HeaderMap, X402PaymentProofPayload, X402PaymentRequirement, X402SyncResponseSnapshot, X402TxExecutionParams, X402_EXACT_EVM_TX_SCHEME, X402_PROTOCOL_VERSION, actorKindAndAlgToByte, addModN, additiveToShamirSlot1Share, additiveToShamirSlot2Share, aes256GcmDecryptDetached, aes256GcmEncryptDetached, aggregateOnlineSignature, applyAdditiveTweak, applyHsmSlotResplitDelta, assertAllowedOnlineRole, assertNoEip7702Bytes, assertPersonalSlotNotExpired, assertScalarInField, assertScalarNonZero, assertValidX25519PublicKey, base64UrlDecodeBytes, base64UrlEncodeBytes, bigintToMinimalBytesBE, bootstrapPersonalVaultClient, buildPersonalAnnounceChallengeDigest32, buildPersonalClearSigningPreview, buildPersonalEntitlementApplyChallengeDigest32, buildPersonalPairResplitChallengeDigest32, buildPersonalPresignInitChallengeDigest32, buildPersonalResealKidChallengeDigest32, buildPersonalRevokeSlotChallengeDigest32, buildPersonalSealEnrollChallengeDigest32, buildPersonalSessionLockChallengeDigest32, buildPersonalSessionOpenChallengeDigest32, buildPersonalSignChallengeDigest32, buildPersonalVaultClusterInfo, buildPersonalVetoChallengeDigest32, byteToActorKindAndAlg, bytes32ToScalarNonZero, bytes32ToScalarStrict, bytesToBigIntBE, bytesToHex, canonicalizePersonalBlobAadBytes, canonicalizePersonalVaultPolicy, completeActorSlotPairingOnTarget, computeHsmSealedBlobHeaderMac32, computeNonDegenerateActorResplitShare, computePersonalActorChallengeDigest32, computePersonalClearSigningPreviewHash32, computePersonalPolicyHash32, computeRerandomizedNoncePoint, computeSimulatedDeltaCommitment32, computeSubsetBoundPresigId, computeVaultEntitlementTicketDigest32, computeX25519SharedSecret, concatBytes, constantTimeEqual, createActorSlotPairingBootstrap, createLinearPedersenDleqProof, createOnlineSignShare, createPedersenPok, createPersonalMpcEoaSigner, createPersonalSealEnrollActorPok, createSchnorrPokInBase, createX402AgentPaymentFetch, decodeAndRecoverSignedEip1559Tx, decodeAndVerifyPersonalArcblockJwt, decodeAndVerifyPersonalEip1559Tx, decodeAndVerifyPersonalOcapTx, decodeErc20ApproveCalldata, decodeErc20TransferCalldata, decodeHsmSealedBlobHeader319, decodeHsmSealedBlobInnerPlaintext3717, decodePointCompressed, decodeX402PaymentHeader, defaultRandomBytes, deriveBlindOcapVelocityTag32, deriveBlindSlotTag32, deriveBlindVaultTag32, deriveBlindVelocityTag32, deriveGrothShoupRerandScalar, deriveHsmPersonalSealKey32, deriveOcapIdentitiesFromChildPoint, derivePersonalVaultChildKey, derivePersonalWakePasswordKeys, deriveRoleBoundChild, deriveRuleBoundChild, deriveUntweakedChild, ecrecoverEthAddress, encodeErc20ApproveCalldata, encodeErc20TransferCalldata, encodeHsmSealedBlobHeader319, encodeHsmSealedBlobInnerPlaintext3717, encodePointCompressed, encodeSignedEip1559Tx, encodeUnsignedEip1559Tx, encodeX402PaymentHeader, enumerateCombinations, estimateOcapExecutionCostUpperBound, evaluateConsumedPresigShareWithRerand, evaluateFeldmanCommitments, evaluatePolynomialModN, hashTranscriptSha256, hexToBytes, initiateActorSlotResplit, invModN, isAgentActorKind, lagrangeCoefficientAtZero, lengthPrefixedEncode, modN, mulBaseG, mulModN, mulPoint, negModN, normalizeActorPublicKeyToPadded65, normalizeCanonicalOcapTokenKey, normalizeHexBytes, normalizeMaxTokenOutflowsCaps, normalizeOcapAddressOrEth, normalizeSortedSubset, openHsmInboundTransportBox, parseHsmSealedBlobHeader, parseStrictEthAddress, parseX402PaymentChallenge, pedersenCommit, pointToEthAddress, recoverPersonalVaultRootOffline, resolveRequiredOcapPolicyTier, resolveRequiredPolicyTier, rlpDecode, rlpEncode, runPersonalClientPresignWithTransport, sampleScalarNonZero, scalarToBytes32, sealDeviceShareEnvelope, sealHsmInboundTransportBox, secp256k1, signAnnounceTicket, signGuardianQuorumApproval, signPersonalActorChallenge, signPersonalFirewallAttestation, signPersonalVaultRecoverySweepOffline, signRoleQuorumApproval, signVaultEntitlementTicket, sortedSubsetBytes, subModN, subsetsEqual, toEip55ChecksumAddress, u16be, u32be, u64be, u8, unsealDeviceShareEnvelope, unwrapSealedBlobFromCloudSync, utf8Bytes, validateActorPublicKeyPadded65, verifyActorSlotPairingBootstrap, verifyAndDeriveRequestChildKey, verifyGuardianQuorumProof, verifyLinearPedersenDleqProof, verifyOnlineSignShare, verifyPedersenPok, verifyPersonalActorSignature, verifyPersonalAdditiveSplitMatchesRoot, verifyPersonalColdRecoveryKitManifest, verifyPersonalFirewallAttestation, verifyPersonalPolicyProofBundle, verifyPersonalSealEnrollActorPok, verifyPersonalSimulationBalanceDelta, verifyRoleQuorumProof, verifySchnorrPokInBase, verifySignedAnnounceTicket, verifyVaultEntitlementTicket, wrapSealedBlobForCloudSync, zeroizeBytes };
|
package/esm/personal.mjs
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BLIND_SLOT_RECORD_BYTES, BSGS_M, CLOUD_SYNC_SEALED_BLOB_BYTES, DEFAULT_COLD_GUARDIANS, DEFAULT_COLD_THRESHOLD, DEFAULT_ONLINE_PARTIES, DEFAULT_ONLINE_THRESHOLD, DST_BASEOT_KEY_V1, DST_BASEOT_S_POK_V1, DST_CANARY_CHALLENGE_V1, DST_CANARY_SHARD_POK_V1, DST_CHILD_TWEAK_V1, DST_COT_ROW_V1, DST_DKG_COM_V2, DST_DKG_CTX_V2, DST_DKG_ECHO_V2, DST_DKG_POK_V2, DST_DKG_SELFTEST_V2, DST_DKG_SHARE_AAD_V2, DST_DKG_STEP1_AUTH_V1, DST_DKG_TRANSCRIPT_V2, DST_DKG_X25519_HKDF_V2, DST_EMERGENCY_SWEEP_NONCE_V1, DST_KOS15_CHI_V1, DST_LHL_GADGET_V1, DST_MTA_ETA_V1, DST_OT_CTR_IV_V1, DST_PERSONAL_ANNOUNCE_TICKET_V1, DST_PERSONAL_BASEOT_CTX_V1, DST_PERSONAL_BLIND_OCAP_VELOCITY_TAG_V1, DST_PERSONAL_BLIND_SLOT_TAG_V1, DST_PERSONAL_BLIND_VAULT_TAG_V1, DST_PERSONAL_BLIND_VELOCITY_TAG_V1, DST_PERSONAL_BLOB_AAD_V1, DST_PERSONAL_BLOB_MAGIC, DST_PERSONAL_CHALLENGE_ANNOUNCE_V1, DST_PERSONAL_CHALLENGE_ENTITLEMENT_APPLY_V1, DST_PERSONAL_CHALLENGE_PAIR_RESPLIT_V1, DST_PERSONAL_CHALLENGE_PRESIGN_INIT_V1, DST_PERSONAL_CHALLENGE_RESEAL_KID_V1, DST_PERSONAL_CHALLENGE_REVOKE_SLOT_V1, DST_PERSONAL_CHALLENGE_SEAL_ENROLL_V1, DST_PERSONAL_CHALLENGE_SESSION_LOCK_V1, DST_PERSONAL_CHALLENGE_SESSION_OPEN_V1, DST_PERSONAL_CHALLENGE_SIGN_V1, DST_PERSONAL_CHALLENGE_VETO_V1, DST_PERSONAL_CLEAR_PREVIEW_V1, DST_PERSONAL_CLOUD_BLOB_V1, DST_PERSONAL_CLOUD_SYNC_V1, DST_PERSONAL_CLUSTER_HDKG_V1, DST_PERSONAL_COLD_MANIFEST_V1, DST_PERSONAL_DEVICE_AAD_V1, DST_PERSONAL_DEVICE_ENV_V1, DST_PERSONAL_ENTITLEMENT_TICKET_V1, DST_PERSONAL_FIREWALL_ATTESTATION_V1, DST_PERSONAL_GUARDIAN_QUORUM_V1, DST_PERSONAL_PAIR_POP_V1, DST_PERSONAL_PAIR_SHARE_AAD_V1, DST_PERSONAL_PAIR_SHARE_BOX_V1, DST_PERSONAL_POLICY_V1, DST_PERSONAL_PWD_CLIENT_HKDF_V1, DST_PERSONAL_PWD_HSM_HKDF_V1, DST_PERSONAL_ROLE_QUORUM_V1, DST_PERSONAL_SEAL_ENROLL_ACTOR_POK_V1, DST_PERSONAL_SEAL_KEY_V1, DST_PERSONAL_SEAL_SALT_V1, DST_PERSONAL_SIMULATED_DELTA_V1, DST_PERSONAL_TRANSPORT_AAD_V1, DST_PERSONAL_TRANSPORT_BOX_V1, DST_PRESIG_COM_V1, DST_PRESIG_ID_V1, DST_PRESIG_PI_LIN_K_V1, DST_PRESIG_PI_POK_Z_V1, DST_PRESIG_POK_B_V1, DST_PRESIG_POK_CK_V1, DST_PRESIG_POK_GAMMA_V1, DST_PRESIG_RERAND_V1, DST_PRESIG_ZETA_HKDF_V1, DST_PRESIG_ZETA_V1, DST_RULE_TWEAK_V1, DST_VES_BIT_OR_V1, DST_VES_CHUNK_LIN_V1, ESCAPE_DRILL_MAX_AGE_SECONDS, FORBIDDEN_ONLINE_ROLE_ESCAPE_CANARY, HSM_SEALED_BLOB_BYTES, MAX_ACTIVE_PRESIGN_SESSIONS, MAX_BLIND_RECORDS, MAX_MPC_CLUSTER_NODES, MAX_MPC_PEER_MESSAGE_BYTES, MAX_MPC_SIGN_REQUEST_BYTES, MAX_ON_DEMAND_SILENCE_SECONDS, MAX_PERSONAL_CALL_DEPTH, MAX_PERSONAL_FIREWALL_ATTESTATION_TTL_SECONDS, MAX_PERSONAL_HTTP_BODY_BYTES, MAX_PERSONAL_JSON_DEPTH, MAX_PERSONAL_JWT_TTL_SECONDS, MAX_PERSONAL_JWT_UNSIGNED_BYTES, MAX_PERSONAL_OCAP_CBOR_DEPTH, MAX_PERSONAL_OCAP_DELEGATE_TTL_SECONDS, MAX_PERSONAL_OCAP_TX_BYTES, MAX_PERSONAL_TX_DATA_BYTES, MAX_RECOVERY_PACKAGE_BYTES, MAX_RULE_DAG_NODES, MAX_RULE_YAML_BYTES, MAX_TRAVEL_SESSION_TTL_SECONDS, MPC_PROTOCOL_VERSION, MpcProtocolError, OT_BASE_PARTIAL_BITS, OT_COLUMN_BYTES, OT_EXTENSION_ROWS, OT_GADGET_BITS, OT_KAPPA_BITS, OT_KAPPA_BYTES, OT_LHL_EXTRA_BITS, OT_SACRIFICE_BITS, PEDERSEN_H_COMPRESSED_HEX, PEDERSEN_H_DST, PEDERSEN_H_MESSAGE, PERSONAL_PRESIG_TTL_SECONDS, SECP256K1_HALF_N, SECP256K1_N, SECP256K1_P } from "./constants.mjs";
|
|
2
|
+
import { Fn, H_scalar, PEDERSEN_H, PEDERSEN_H_COMP33, SECP256K1_G, SECP256K1_ZERO, addModN, assertScalarInField, assertScalarNonZero, assertValidX25519PublicKey, bytes32ToScalarNonZero, bytes32ToScalarStrict, bytesToBigIntBE, bytesToHex, computeX25519SharedSecret, concatBytes, constantTimeEqual, createLinearPedersenDleqProof, createPedersenPok, createSchnorrPokInBase, decodePointCompressed, defaultRandomBytes, encodePointCompressed, enumerateCombinations, evaluateFeldmanCommitments, evaluatePolynomialModN, hashTranscriptSha256, hexToBytes, invModN, lagrangeCoefficientAtZero, lengthPrefixedEncode, modN, mulBaseG, mulModN, mulPoint, negModN, normalizeHexBytes, normalizeSortedSubset, pedersenCommit, sampleScalarNonZero, scalarToBytes32, secp256k1, sortedSubsetBytes, subModN, subsetsEqual, u16be, u32be, u64be, u8, utf8Bytes, verifyLinearPedersenDleqProof, verifyPedersenPok, verifySchnorrPokInBase, zeroizeBytes } from "./secp256k1-scalar.mjs";
|
|
3
|
+
import { applyAdditiveTweak, assertAllowedOnlineRole, deriveRoleBoundChild, deriveRuleBoundChild, deriveUntweakedChild, ecrecoverEthAddress, parseStrictEthAddress, pointToEthAddress, toEip55ChecksumAddress } from "./tweak.mjs";
|
|
4
|
+
import { PresignPartySession, VolatilePresignaturePool, computeSubsetBoundPresigId } from "./presign.mjs";
|
|
5
|
+
import { aggregateOnlineSignature, computeRerandomizedNoncePoint, createOnlineSignShare, deriveGrothShoupRerandScalar, evaluateConsumedPresigShareWithRerand, verifyAndDeriveRequestChildKey, verifyOnlineSignShare } from "./sign.mjs";
|
|
6
|
+
import { EIP1559_TX_TYPE_BYTE, ERC20_TRANSFER_SELECTOR_HEX, bigintToMinimalBytesBE, decodeAndRecoverSignedEip1559Tx, decodeErc20TransferCalldata, encodeErc20TransferCalldata, encodeSignedEip1559Tx, encodeUnsignedEip1559Tx, rlpDecode, rlpEncode } from "./rlp-eip1559.mjs";
|
|
7
|
+
import { ACTOR_KIND_AND_ALG_BYTE, ENTITLEMENT_TIER_CODE, ERC20_APPROVE_SELECTOR_HEX, HARD_BANNED_PERSONAL_EVM_SELECTORS, HSM_SEALED_BLOB_CIPHERTEXT_BYTES, HSM_SEALED_BLOB_CIPHERTEXT_OFFSET, HSM_SEALED_BLOB_HEADER_BYTES, HSM_SEALED_BLOB_HEADER_MAC_OFFSET, HSM_SEALED_BLOB_HEADER_WITH_MAC_BYTES, HSM_SEALED_BLOB_IV_OFFSET, HSM_SEALED_BLOB_MAX_POLICY_UTF8_BYTES, HSM_SEALED_BLOB_TAG_OFFSET, HSM_SEALED_BLOB_VERSION, MAX_ANNOUNCE_VALIDITY_WINDOW_SEC, MIN_ANNOUNCE_VALIDITY_WINDOW_SEC, PERSONAL_MAX_VELOCITY_UINT128, PersonalCosignerResponderSession, UNLIMITED_APPROVE_THRESHOLD, actorKindAndAlgToByte, additiveToShamirSlot1Share, additiveToShamirSlot2Share, aes256GcmDecryptDetached, aes256GcmEncryptDetached, applyHsmSlotResplitDelta, assertNoEip7702Bytes, assertPersonalSlotNotExpired, base64UrlDecodeBytes, base64UrlEncodeBytes, bootstrapPersonalVaultClient, buildPersonalAnnounceChallengeDigest32, buildPersonalClearSigningPreview, buildPersonalEntitlementApplyChallengeDigest32, buildPersonalPairResplitChallengeDigest32, buildPersonalPresignInitChallengeDigest32, buildPersonalResealKidChallengeDigest32, buildPersonalRevokeSlotChallengeDigest32, buildPersonalSealEnrollChallengeDigest32, buildPersonalSessionLockChallengeDigest32, buildPersonalSessionOpenChallengeDigest32, buildPersonalSignChallengeDigest32, buildPersonalVaultClusterInfo, buildPersonalVetoChallengeDigest32, byteToActorKindAndAlg, canonicalizePersonalBlobAadBytes, canonicalizePersonalVaultPolicy, completeActorSlotPairingOnTarget, computeHsmSealedBlobHeaderMac32, computeNonDegenerateActorResplitShare, computePersonalActorChallengeDigest32, computePersonalClearSigningPreviewHash32, computePersonalPolicyHash32, computeSimulatedDeltaCommitment32, computeVaultEntitlementTicketDigest32, createActorSlotPairingBootstrap, createPersonalMpcEoaSigner, createPersonalSealEnrollActorPok, decodeAndVerifyPersonalEip1559Tx, decodeErc20ApproveCalldata, decodeHsmSealedBlobHeader319, decodeHsmSealedBlobInnerPlaintext3717, deriveBlindOcapVelocityTag32, deriveBlindSlotTag32, deriveBlindVaultTag32, deriveBlindVelocityTag32, deriveHsmPersonalSealKey32, derivePersonalVaultChildKey, derivePersonalWakePasswordKeys, encodeErc20ApproveCalldata, encodeHsmSealedBlobHeader319, encodeHsmSealedBlobInnerPlaintext3717, initiateActorSlotResplit, isAgentActorKind, normalizeActorPublicKeyToPadded65, normalizeCanonicalOcapTokenKey, normalizeMaxTokenOutflowsCaps, normalizeOcapAddressOrEth, openHsmInboundTransportBox, parseHsmSealedBlobHeader, recoverPersonalVaultRootOffline, resolveRequiredPolicyTier, runPersonalClientPresignWithTransport, sealDeviceShareEnvelope, sealHsmInboundTransportBox, signAnnounceTicket, signGuardianQuorumApproval, signPersonalActorChallenge, signPersonalFirewallAttestation, signPersonalVaultRecoverySweepOffline, signRoleQuorumApproval, signVaultEntitlementTicket, unsealDeviceShareEnvelope, unwrapSealedBlobFromCloudSync, validateActorPublicKeyPadded65, verifyActorSlotPairingBootstrap, verifyGuardianQuorumProof, verifyPersonalActorSignature, verifyPersonalAdditiveSplitMatchesRoot, verifyPersonalColdRecoveryKitManifest, verifyPersonalFirewallAttestation, verifyPersonalPolicyProofBundle, verifyPersonalSealEnrollActorPok, verifyPersonalSimulationBalanceDelta, verifyRoleQuorumProof, verifySignedAnnounceTicket, verifyVaultEntitlementTicket, wrapSealedBlobForCloudSync } from "./personal-vault.mjs";
|
|
8
|
+
import { CborTagValue, decodeAndVerifyPersonalArcblockJwt, decodeAndVerifyPersonalOcapTx, deriveOcapIdentitiesFromChildPoint, estimateOcapExecutionCostUpperBound, resolveRequiredOcapPolicyTier } from "./ocap-clear-signing.mjs";
|
|
9
|
+
import { MAX_X402_ACCEPTS_ENTRIES, MAX_X402_CHALLENGE_BYTES, MAX_X402_RETRIES, X402_EXACT_EVM_TX_SCHEME, X402_PROTOCOL_VERSION, createX402AgentPaymentFetch, decodeX402PaymentHeader, encodeX402PaymentHeader, parseX402PaymentChallenge } from "./x402-agent-guard.mjs";
|
|
10
|
+
|
|
11
|
+
export { ACTOR_KIND_AND_ALG_BYTE, BLIND_SLOT_RECORD_BYTES, BSGS_M, CLOUD_SYNC_SEALED_BLOB_BYTES, CborTagValue, DEFAULT_COLD_GUARDIANS, DEFAULT_COLD_THRESHOLD, DEFAULT_ONLINE_PARTIES, DEFAULT_ONLINE_THRESHOLD, DST_BASEOT_KEY_V1, DST_BASEOT_S_POK_V1, DST_CANARY_CHALLENGE_V1, DST_CANARY_SHARD_POK_V1, DST_CHILD_TWEAK_V1, DST_COT_ROW_V1, DST_DKG_COM_V2, DST_DKG_CTX_V2, DST_DKG_ECHO_V2, DST_DKG_POK_V2, DST_DKG_SELFTEST_V2, DST_DKG_SHARE_AAD_V2, DST_DKG_STEP1_AUTH_V1, DST_DKG_TRANSCRIPT_V2, DST_DKG_X25519_HKDF_V2, DST_EMERGENCY_SWEEP_NONCE_V1, DST_KOS15_CHI_V1, DST_LHL_GADGET_V1, DST_MTA_ETA_V1, DST_OT_CTR_IV_V1, DST_PERSONAL_ANNOUNCE_TICKET_V1, DST_PERSONAL_BASEOT_CTX_V1, DST_PERSONAL_BLIND_OCAP_VELOCITY_TAG_V1, DST_PERSONAL_BLIND_SLOT_TAG_V1, DST_PERSONAL_BLIND_VAULT_TAG_V1, DST_PERSONAL_BLIND_VELOCITY_TAG_V1, DST_PERSONAL_BLOB_AAD_V1, DST_PERSONAL_BLOB_MAGIC, DST_PERSONAL_CHALLENGE_ANNOUNCE_V1, DST_PERSONAL_CHALLENGE_ENTITLEMENT_APPLY_V1, DST_PERSONAL_CHALLENGE_PAIR_RESPLIT_V1, DST_PERSONAL_CHALLENGE_PRESIGN_INIT_V1, DST_PERSONAL_CHALLENGE_RESEAL_KID_V1, DST_PERSONAL_CHALLENGE_REVOKE_SLOT_V1, DST_PERSONAL_CHALLENGE_SEAL_ENROLL_V1, DST_PERSONAL_CHALLENGE_SESSION_LOCK_V1, DST_PERSONAL_CHALLENGE_SESSION_OPEN_V1, DST_PERSONAL_CHALLENGE_SIGN_V1, DST_PERSONAL_CHALLENGE_VETO_V1, DST_PERSONAL_CLEAR_PREVIEW_V1, DST_PERSONAL_CLOUD_BLOB_V1, DST_PERSONAL_CLOUD_SYNC_V1, DST_PERSONAL_CLUSTER_HDKG_V1, DST_PERSONAL_COLD_MANIFEST_V1, DST_PERSONAL_DEVICE_AAD_V1, DST_PERSONAL_DEVICE_ENV_V1, DST_PERSONAL_ENTITLEMENT_TICKET_V1, DST_PERSONAL_FIREWALL_ATTESTATION_V1, DST_PERSONAL_GUARDIAN_QUORUM_V1, DST_PERSONAL_PAIR_POP_V1, DST_PERSONAL_PAIR_SHARE_AAD_V1, DST_PERSONAL_PAIR_SHARE_BOX_V1, DST_PERSONAL_POLICY_V1, DST_PERSONAL_PWD_CLIENT_HKDF_V1, DST_PERSONAL_PWD_HSM_HKDF_V1, DST_PERSONAL_ROLE_QUORUM_V1, DST_PERSONAL_SEAL_ENROLL_ACTOR_POK_V1, DST_PERSONAL_SEAL_KEY_V1, DST_PERSONAL_SEAL_SALT_V1, DST_PERSONAL_SIMULATED_DELTA_V1, DST_PERSONAL_TRANSPORT_AAD_V1, DST_PERSONAL_TRANSPORT_BOX_V1, DST_PRESIG_COM_V1, DST_PRESIG_ID_V1, DST_PRESIG_PI_LIN_K_V1, DST_PRESIG_PI_POK_Z_V1, DST_PRESIG_POK_B_V1, DST_PRESIG_POK_CK_V1, DST_PRESIG_POK_GAMMA_V1, DST_PRESIG_RERAND_V1, DST_PRESIG_ZETA_HKDF_V1, DST_PRESIG_ZETA_V1, DST_RULE_TWEAK_V1, DST_VES_BIT_OR_V1, DST_VES_CHUNK_LIN_V1, EIP1559_TX_TYPE_BYTE, ENTITLEMENT_TIER_CODE, ERC20_APPROVE_SELECTOR_HEX, ERC20_TRANSFER_SELECTOR_HEX, ESCAPE_DRILL_MAX_AGE_SECONDS, FORBIDDEN_ONLINE_ROLE_ESCAPE_CANARY, Fn, HARD_BANNED_PERSONAL_EVM_SELECTORS, HSM_SEALED_BLOB_BYTES, HSM_SEALED_BLOB_CIPHERTEXT_BYTES, HSM_SEALED_BLOB_CIPHERTEXT_OFFSET, HSM_SEALED_BLOB_HEADER_BYTES, HSM_SEALED_BLOB_HEADER_MAC_OFFSET, HSM_SEALED_BLOB_HEADER_WITH_MAC_BYTES, HSM_SEALED_BLOB_IV_OFFSET, HSM_SEALED_BLOB_MAX_POLICY_UTF8_BYTES, HSM_SEALED_BLOB_TAG_OFFSET, HSM_SEALED_BLOB_VERSION, H_scalar, MAX_ACTIVE_PRESIGN_SESSIONS, MAX_ANNOUNCE_VALIDITY_WINDOW_SEC, MAX_BLIND_RECORDS, MAX_MPC_CLUSTER_NODES, MAX_MPC_PEER_MESSAGE_BYTES, MAX_MPC_SIGN_REQUEST_BYTES, MAX_ON_DEMAND_SILENCE_SECONDS, MAX_PERSONAL_CALL_DEPTH, MAX_PERSONAL_FIREWALL_ATTESTATION_TTL_SECONDS, MAX_PERSONAL_HTTP_BODY_BYTES, MAX_PERSONAL_JSON_DEPTH, MAX_PERSONAL_JWT_TTL_SECONDS, MAX_PERSONAL_JWT_UNSIGNED_BYTES, MAX_PERSONAL_OCAP_CBOR_DEPTH, MAX_PERSONAL_OCAP_DELEGATE_TTL_SECONDS, MAX_PERSONAL_OCAP_TX_BYTES, MAX_PERSONAL_TX_DATA_BYTES, MAX_RECOVERY_PACKAGE_BYTES, MAX_RULE_DAG_NODES, MAX_RULE_YAML_BYTES, MAX_TRAVEL_SESSION_TTL_SECONDS, MAX_X402_ACCEPTS_ENTRIES, MAX_X402_CHALLENGE_BYTES, MAX_X402_RETRIES, MIN_ANNOUNCE_VALIDITY_WINDOW_SEC, MPC_PROTOCOL_VERSION, MpcProtocolError, OT_BASE_PARTIAL_BITS, OT_COLUMN_BYTES, OT_EXTENSION_ROWS, OT_GADGET_BITS, OT_KAPPA_BITS, OT_KAPPA_BYTES, OT_LHL_EXTRA_BITS, OT_SACRIFICE_BITS, PEDERSEN_H, PEDERSEN_H_COMP33, PEDERSEN_H_COMPRESSED_HEX, PEDERSEN_H_DST, PEDERSEN_H_MESSAGE, PERSONAL_MAX_VELOCITY_UINT128, PERSONAL_PRESIG_TTL_SECONDS, PersonalCosignerResponderSession, PresignPartySession, SECP256K1_G, SECP256K1_HALF_N, SECP256K1_N, SECP256K1_P, SECP256K1_ZERO, UNLIMITED_APPROVE_THRESHOLD, VolatilePresignaturePool, X402_EXACT_EVM_TX_SCHEME, X402_PROTOCOL_VERSION, actorKindAndAlgToByte, addModN, additiveToShamirSlot1Share, additiveToShamirSlot2Share, aes256GcmDecryptDetached, aes256GcmEncryptDetached, aggregateOnlineSignature, applyAdditiveTweak, applyHsmSlotResplitDelta, assertAllowedOnlineRole, assertNoEip7702Bytes, assertPersonalSlotNotExpired, assertScalarInField, assertScalarNonZero, assertValidX25519PublicKey, base64UrlDecodeBytes, base64UrlEncodeBytes, bigintToMinimalBytesBE, bootstrapPersonalVaultClient, buildPersonalAnnounceChallengeDigest32, buildPersonalClearSigningPreview, buildPersonalEntitlementApplyChallengeDigest32, buildPersonalPairResplitChallengeDigest32, buildPersonalPresignInitChallengeDigest32, buildPersonalResealKidChallengeDigest32, buildPersonalRevokeSlotChallengeDigest32, buildPersonalSealEnrollChallengeDigest32, buildPersonalSessionLockChallengeDigest32, buildPersonalSessionOpenChallengeDigest32, buildPersonalSignChallengeDigest32, buildPersonalVaultClusterInfo, buildPersonalVetoChallengeDigest32, byteToActorKindAndAlg, bytes32ToScalarNonZero, bytes32ToScalarStrict, bytesToBigIntBE, bytesToHex, canonicalizePersonalBlobAadBytes, canonicalizePersonalVaultPolicy, completeActorSlotPairingOnTarget, computeHsmSealedBlobHeaderMac32, computeNonDegenerateActorResplitShare, computePersonalActorChallengeDigest32, computePersonalClearSigningPreviewHash32, computePersonalPolicyHash32, computeRerandomizedNoncePoint, computeSimulatedDeltaCommitment32, computeSubsetBoundPresigId, computeVaultEntitlementTicketDigest32, computeX25519SharedSecret, concatBytes, constantTimeEqual, createActorSlotPairingBootstrap, createLinearPedersenDleqProof, createOnlineSignShare, createPedersenPok, createPersonalMpcEoaSigner, createPersonalSealEnrollActorPok, createSchnorrPokInBase, createX402AgentPaymentFetch, decodeAndRecoverSignedEip1559Tx, decodeAndVerifyPersonalArcblockJwt, decodeAndVerifyPersonalEip1559Tx, decodeAndVerifyPersonalOcapTx, decodeErc20ApproveCalldata, decodeErc20TransferCalldata, decodeHsmSealedBlobHeader319, decodeHsmSealedBlobInnerPlaintext3717, decodePointCompressed, decodeX402PaymentHeader, defaultRandomBytes, deriveBlindOcapVelocityTag32, deriveBlindSlotTag32, deriveBlindVaultTag32, deriveBlindVelocityTag32, deriveGrothShoupRerandScalar, deriveHsmPersonalSealKey32, deriveOcapIdentitiesFromChildPoint, derivePersonalVaultChildKey, derivePersonalWakePasswordKeys, deriveRoleBoundChild, deriveRuleBoundChild, deriveUntweakedChild, ecrecoverEthAddress, encodeErc20ApproveCalldata, encodeErc20TransferCalldata, encodeHsmSealedBlobHeader319, encodeHsmSealedBlobInnerPlaintext3717, encodePointCompressed, encodeSignedEip1559Tx, encodeUnsignedEip1559Tx, encodeX402PaymentHeader, enumerateCombinations, estimateOcapExecutionCostUpperBound, evaluateConsumedPresigShareWithRerand, evaluateFeldmanCommitments, evaluatePolynomialModN, hashTranscriptSha256, hexToBytes, initiateActorSlotResplit, invModN, isAgentActorKind, lagrangeCoefficientAtZero, lengthPrefixedEncode, modN, mulBaseG, mulModN, mulPoint, negModN, normalizeActorPublicKeyToPadded65, normalizeCanonicalOcapTokenKey, normalizeHexBytes, normalizeMaxTokenOutflowsCaps, normalizeOcapAddressOrEth, normalizeSortedSubset, openHsmInboundTransportBox, parseHsmSealedBlobHeader, parseStrictEthAddress, parseX402PaymentChallenge, pedersenCommit, pointToEthAddress, recoverPersonalVaultRootOffline, resolveRequiredOcapPolicyTier, resolveRequiredPolicyTier, rlpDecode, rlpEncode, runPersonalClientPresignWithTransport, sampleScalarNonZero, scalarToBytes32, sealDeviceShareEnvelope, sealHsmInboundTransportBox, secp256k1, signAnnounceTicket, signGuardianQuorumApproval, signPersonalActorChallenge, signPersonalFirewallAttestation, signPersonalVaultRecoverySweepOffline, signRoleQuorumApproval, signVaultEntitlementTicket, sortedSubsetBytes, subModN, subsetsEqual, toEip55ChecksumAddress, u16be, u32be, u64be, u8, unsealDeviceShareEnvelope, unwrapSealedBlobFromCloudSync, utf8Bytes, validateActorPublicKeyPadded65, verifyActorSlotPairingBootstrap, verifyAndDeriveRequestChildKey, verifyGuardianQuorumProof, verifyLinearPedersenDleqProof, verifyOnlineSignShare, verifyPedersenPok, verifyPersonalActorSignature, verifyPersonalAdditiveSplitMatchesRoot, verifyPersonalColdRecoveryKitManifest, verifyPersonalFirewallAttestation, verifyPersonalPolicyProofBundle, verifyPersonalSealEnrollActorPok, verifyPersonalSimulationBalanceDelta, verifyRoleQuorumProof, verifySchnorrPokInBase, verifySignedAnnounceTicket, verifyVaultEntitlementTicket, wrapSealedBlobForCloudSync, zeroizeBytes };
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { LinearPedersenDleqProof, PedersenPokProof, RandomBytesFn, SchnorrPokProof } from "./secp256k1-scalar.mjs";
|
|
2
|
+
import { BaseOtReceiverState, BaseOtSenderState, OtExtStep1Message, OtExtStep2Message, OtExtStep3Message } from "./ot.mjs";
|
|
3
|
+
import { GadgetMtaPayload } from "./mta.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/presign.d.ts
|
|
6
|
+
interface MpcPublicClusterInfo {
|
|
7
|
+
readonly rootId: string;
|
|
8
|
+
readonly keyEpoch: bigint;
|
|
9
|
+
readonly t: number;
|
|
10
|
+
readonly nParties: number;
|
|
11
|
+
readonly hDkg32: Uint8Array;
|
|
12
|
+
readonly rootPublicKeyComp33: Uint8Array;
|
|
13
|
+
/** Map from 1-based party `slot` (`1..nParties`) to compressed 33-byte public share `X_slot`. */
|
|
14
|
+
readonly publicSharesComp33BySlot: ReadonlyMap<number, Uint8Array>;
|
|
15
|
+
}
|
|
16
|
+
interface MpcPartyBaseOtChannels {
|
|
17
|
+
readonly ownerSlot: number;
|
|
18
|
+
/** Used when `ownerSlot` acts as Extended Sender `A` against peer `receiverSlotB`. */
|
|
19
|
+
readonly asExtendedSenderA: Map<number, BaseOtReceiverState>;
|
|
20
|
+
/** Used when `ownerSlot` acts as Extended Receiver `B` against peer `senderSlotA`. */
|
|
21
|
+
readonly asExtendedReceiverB: Map<number, BaseOtSenderState>;
|
|
22
|
+
}
|
|
23
|
+
interface PresignRound1CommitmentMsg {
|
|
24
|
+
readonly slot: number;
|
|
25
|
+
readonly commitment32: Uint8Array;
|
|
26
|
+
}
|
|
27
|
+
interface PresignRound1RevealMsg {
|
|
28
|
+
readonly slot: number;
|
|
29
|
+
readonly comSalt32: Uint8Array;
|
|
30
|
+
readonly gammaPointComp33: Uint8Array;
|
|
31
|
+
readonly bPointComp33: Uint8Array;
|
|
32
|
+
readonly ckPointComp33: Uint8Array;
|
|
33
|
+
readonly zetaEpk32: Uint8Array;
|
|
34
|
+
readonly pokGamma: SchnorrPokProof;
|
|
35
|
+
readonly pokB: SchnorrPokProof;
|
|
36
|
+
readonly pokCk: PedersenPokProof;
|
|
37
|
+
}
|
|
38
|
+
type MtaInstanceKind = 'k_gamma' | 'k_b';
|
|
39
|
+
interface PresignMtaOtStep1Bundle {
|
|
40
|
+
readonly fromReceiverSlotB: number;
|
|
41
|
+
readonly toSenderSlotA: number;
|
|
42
|
+
readonly kGammaOt1: OtExtStep1Message;
|
|
43
|
+
readonly kBOt1: OtExtStep1Message;
|
|
44
|
+
}
|
|
45
|
+
interface PresignMtaOtStep2Bundle {
|
|
46
|
+
readonly fromSenderSlotA: number;
|
|
47
|
+
readonly toReceiverSlotB: number;
|
|
48
|
+
readonly kGammaOt2: OtExtStep2Message;
|
|
49
|
+
readonly kBOt2: OtExtStep2Message;
|
|
50
|
+
}
|
|
51
|
+
interface PresignMtaOtStep3Bundle {
|
|
52
|
+
readonly fromReceiverSlotB: number;
|
|
53
|
+
readonly toSenderSlotA: number;
|
|
54
|
+
readonly kGammaOt3: OtExtStep3Message;
|
|
55
|
+
readonly kBOt3: OtExtStep3Message;
|
|
56
|
+
}
|
|
57
|
+
interface PresignMtaStep4PayloadBundle {
|
|
58
|
+
readonly fromSenderSlotA: number;
|
|
59
|
+
readonly toReceiverSlotB: number;
|
|
60
|
+
readonly kGammaMta: GadgetMtaPayload;
|
|
61
|
+
readonly kBMta: GadgetMtaPayload;
|
|
62
|
+
}
|
|
63
|
+
interface PresignRound3BroadcastMsg {
|
|
64
|
+
readonly slot: number;
|
|
65
|
+
readonly deltaShareBytes32: Uint8Array;
|
|
66
|
+
readonly eShareBytes32: Uint8Array;
|
|
67
|
+
}
|
|
68
|
+
interface PresignRound4BroadcastMsg {
|
|
69
|
+
readonly slot: number;
|
|
70
|
+
readonly kSharePointComp33: Uint8Array;
|
|
71
|
+
readonly zSharePointComp33: Uint8Array;
|
|
72
|
+
readonly piLinK: LinearPedersenDleqProof;
|
|
73
|
+
readonly piPokZ: SchnorrPokProof;
|
|
74
|
+
}
|
|
75
|
+
interface PresignaturePublicVerification {
|
|
76
|
+
readonly presigId32: Uint8Array;
|
|
77
|
+
readonly presigIdHex: string;
|
|
78
|
+
readonly rootId: string;
|
|
79
|
+
readonly keyEpoch: bigint;
|
|
80
|
+
readonly subset: ReadonlyArray<number>;
|
|
81
|
+
readonly hDkg32: Uint8Array;
|
|
82
|
+
readonly rootPublicKeyComp33: Uint8Array;
|
|
83
|
+
readonly rPointComp33: Uint8Array;
|
|
84
|
+
readonly kPointsComp33BySlot: ReadonlyMap<number, Uint8Array>;
|
|
85
|
+
readonly zPointsComp33BySlot: ReadonlyMap<number, Uint8Array>;
|
|
86
|
+
}
|
|
87
|
+
interface PresignatureShareRecord {
|
|
88
|
+
readonly slot: number;
|
|
89
|
+
readonly publicVerification: PresignaturePublicVerification;
|
|
90
|
+
/** Zeroized immediately upon consumption or abort/panic wipe. */
|
|
91
|
+
readonly kShareBytes32: Uint8Array;
|
|
92
|
+
/** Zeroized immediately upon consumption or abort/panic wipe. */
|
|
93
|
+
readonly chiShareBytes32: Uint8Array;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Computes the canonical subset-bound `presigId` (`design.md` §4.5(1)):
|
|
97
|
+
* `SHA256("ARC-MPC-PRESIG-ID-V1" || LP(rootId) || u64be(keyEpoch) || sortedSubsetBytes(S) || H_dkg || Com^{pre}_{i_1..i_t})`.
|
|
98
|
+
*/
|
|
99
|
+
declare function computeSubsetBoundPresigId(params: {
|
|
100
|
+
rootId: string;
|
|
101
|
+
keyEpoch: bigint;
|
|
102
|
+
subset: ReadonlyArray<number>;
|
|
103
|
+
hDkg32: Uint8Array;
|
|
104
|
+
orderedCommitments32: ReadonlyArray<Uint8Array>;
|
|
105
|
+
}): Uint8Array;
|
|
106
|
+
/**
|
|
107
|
+
* Stateful single-party 4-round Beaver-masked Presignature participant (`design.md` §4.5(1)).
|
|
108
|
+
* Enforces strict phase ordering, non-reuse of `b_i`, and immediate zeroization of all single-use
|
|
109
|
+
* ephemeral scalars upon completion or any abort!
|
|
110
|
+
*/
|
|
111
|
+
declare class PresignPartySession {
|
|
112
|
+
readonly slot: number;
|
|
113
|
+
readonly cluster: MpcPublicClusterInfo;
|
|
114
|
+
readonly subset: ReadonlyArray<number>;
|
|
115
|
+
readonly sessionNonce32: Uint8Array;
|
|
116
|
+
private readonly baseOtChannels;
|
|
117
|
+
private readonly rng;
|
|
118
|
+
private phase;
|
|
119
|
+
private readonly xTildeBytes32;
|
|
120
|
+
private readonly kBytes32;
|
|
121
|
+
private readonly gammaBytes32;
|
|
122
|
+
private readonly bBytes32;
|
|
123
|
+
private readonly rhoKBytes32;
|
|
124
|
+
private readonly zetaEsk32;
|
|
125
|
+
private readonly cShareBytes32;
|
|
126
|
+
private readonly deltaShareBytes32;
|
|
127
|
+
private readonly chiShareBytes32;
|
|
128
|
+
private ownRevealMsg;
|
|
129
|
+
private round1CommitmentsBySlot;
|
|
130
|
+
private round1RevealsBySlot;
|
|
131
|
+
private linearizedPublicSharesBySlot;
|
|
132
|
+
private presigId32;
|
|
133
|
+
private aggGammaPoint;
|
|
134
|
+
private rPoint;
|
|
135
|
+
private pendingOtReceiverByPeer;
|
|
136
|
+
private pendingOtSenderByPeer;
|
|
137
|
+
private verifiedOtReceiverByPeer;
|
|
138
|
+
private senderMtaGammaAcc;
|
|
139
|
+
private senderMtaBAcc;
|
|
140
|
+
constructor(params: {
|
|
141
|
+
slot: number;
|
|
142
|
+
nodeSecretShareBytes32: Uint8Array;
|
|
143
|
+
cluster: MpcPublicClusterInfo;
|
|
144
|
+
subset: ReadonlyArray<number>;
|
|
145
|
+
sessionNonce32: Uint8Array;
|
|
146
|
+
baseOtChannels: MpcPartyBaseOtChannels;
|
|
147
|
+
rng?: RandomBytesFn;
|
|
148
|
+
});
|
|
149
|
+
get isAborted(): boolean;
|
|
150
|
+
abort(): void;
|
|
151
|
+
private wipeAllEphemeralSecrets;
|
|
152
|
+
private assertPhase;
|
|
153
|
+
private pokContextParts;
|
|
154
|
+
/**
|
|
155
|
+
* Round 1a: Generates hash commitment `Com^{pre}_i` over `(\Gamma_i, B_i, C_{k,i}, \pi_\Gamma, \pi_B, \pi_{C_k})`.
|
|
156
|
+
*/
|
|
157
|
+
round1CreateCommitment(): PresignRound1CommitmentMsg;
|
|
158
|
+
/**
|
|
159
|
+
* Round 1b: Locks all `t` commitments, derives subset-bound `presigId`, and reveals `Reveal^{pre}_i`.
|
|
160
|
+
*/
|
|
161
|
+
round1ReceiveCommitmentsAndReveal(commitments: ReadonlyArray<PresignRound1CommitmentMsg>): {
|
|
162
|
+
presigId32: Uint8Array;
|
|
163
|
+
reveal: PresignRound1RevealMsg;
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* Verifies all `t` Round-1 reveals & PoKs, attributing `culpritSlot` on any invalid commitment or PoK.
|
|
167
|
+
*/
|
|
168
|
+
round1VerifyAllReveals(reveals: ReadonlyArray<PresignRound1RevealMsg>): void;
|
|
169
|
+
/**
|
|
170
|
+
* Round 2 Step 1 (acting as Extended Receiver `B` for `(\gamma_i, b_i)` against each peer `j != i`):
|
|
171
|
+
* Encodes `\gamma_i` and `b_i` via LHL NUMS gadget (`768` bits + `256` sacrifice bits) and emits
|
|
172
|
+
* `OT-Ext Step 1` columns (`\tilde{x}_i` NEVER enters OT!).
|
|
173
|
+
*/
|
|
174
|
+
round2CreateOtStep1Messages(): PresignMtaOtStep1Bundle[];
|
|
175
|
+
/**
|
|
176
|
+
* Round 2 Step 2 (acting as Extended Sender `A` against each peer `j != i`):
|
|
177
|
+
* Transposes `Q` and issues coin-toss `xiSeed32` challenges BEFORE touching `k_i`.
|
|
178
|
+
*/
|
|
179
|
+
round2ProcessOtStep1AndCreateStep2(incomingStep1: ReadonlyArray<PresignMtaOtStep1Bundle>): PresignMtaOtStep2Bundle[];
|
|
180
|
+
/**
|
|
181
|
+
* Round 2 Step 3 (acting as Extended Receiver `B`):
|
|
182
|
+
* Emits `KOS15` correlation proofs `(x, T_chk)`.
|
|
183
|
+
*/
|
|
184
|
+
round2ProcessOtStep2AndCreateStep3(incomingStep2: ReadonlyArray<PresignMtaOtStep2Bundle>): PresignMtaOtStep3Bundle[];
|
|
185
|
+
/**
|
|
186
|
+
* Round 2 Step 4a (acting as Extended Sender `A`):
|
|
187
|
+
* Runs `KOS15` check strictly BEFORE computing single-row dual-pad `GadgetMtA` messages
|
|
188
|
+
* anchored to Round-1 `C_{k,i}`.
|
|
189
|
+
*/
|
|
190
|
+
round2VerifyKos15AndCreateMtaPayloads(incomingStep3: ReadonlyArray<PresignMtaOtStep3Bundle>): PresignMtaStep4PayloadBundle[];
|
|
191
|
+
/**
|
|
192
|
+
* Round 2 Step 4b (acting as Extended Receiver `B`):
|
|
193
|
+
* Verifies `C_alpha === C_{k,j}`, Pedersen openings, and all 768 single-row dual-pad checks,
|
|
194
|
+
* then accumulates `\delta_i` and `c_i`.
|
|
195
|
+
*/
|
|
196
|
+
round2VerifyMtaPayloads(incomingMta: ReadonlyArray<PresignMtaStep4PayloadBundle>): void;
|
|
197
|
+
/**
|
|
198
|
+
* Round 3a: Reveals `(\delta_i, e_i = \tilde{x}_i - b_i mod n)` and IMMEDIATELY zeroizes
|
|
199
|
+
* `b_i` and `\tilde{x}_i` so `b_i` can never be reused across any abort or retry!
|
|
200
|
+
*/
|
|
201
|
+
round3CreateBroadcast(): PresignRound3BroadcastMsg;
|
|
202
|
+
/**
|
|
203
|
+
* Round 3b: Verifies `e_j * G == \tilde{X}_j - B_j` (attributing exact `culpritSlot = j` on
|
|
204
|
+
* corruption), computes `R = \delta^{-1} \Gamma` (`R != O && R_x < n`), and derives `\chi_i`
|
|
205
|
+
* with pairwise cancelling `\zeta_{i,j} = -\zeta_{j,i} mod n`.
|
|
206
|
+
*/
|
|
207
|
+
round3VerifyAndCreateRound4Broadcast(round3Messages: ReadonlyArray<PresignRound3BroadcastMsg>): PresignRound4BroadcastMsg;
|
|
208
|
+
/**
|
|
209
|
+
* Round 4b: Verifies `\pi^{lin}_{K,j}` and `\pi^{pok}_{Z,j}` in base `R` for every `j \in S`
|
|
210
|
+
* (attributing exact `culpritSlot = j` on invalid proof), checks `\sum K_j == G` and
|
|
211
|
+
* `\sum Z_j == P_root`, and outputs the single-use `PresignatureShareRecord`.
|
|
212
|
+
*/
|
|
213
|
+
round4VerifyAndFinalize(round4Messages: ReadonlyArray<PresignRound4BroadcastMsg>): PresignatureShareRecord;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Volatile in-RAM single-use presignature pool (`design.md` §4.5(1), §7):
|
|
217
|
+
* - Synchronous `consume-before-use` atomic lock: under concurrent `Promise.all` contention,
|
|
218
|
+
* exact 1 caller acquires the `PresignatureShareRecord` and all others synchronously fail.
|
|
219
|
+
* - Strict `requestedSubset === presig.S` enforcement.
|
|
220
|
+
* - `wipeRoot(rootId)` / `wipeAll()` zeroize all RAM presignature scalars on Panic or shutdown.
|
|
221
|
+
*/
|
|
222
|
+
declare class VolatilePresignaturePool {
|
|
223
|
+
private readonly activeByPresigIdHex;
|
|
224
|
+
private readonly tombstonedPresigIdHexes;
|
|
225
|
+
get size(): number;
|
|
226
|
+
isTombstoned(presigId: Uint8Array | string): boolean;
|
|
227
|
+
store(record: PresignatureShareRecord): void;
|
|
228
|
+
/**
|
|
229
|
+
* Synchronously validates `(rootId, requestedSubset)` and atomically removes + tombstones
|
|
230
|
+
* `presigId` in a single JS turn with zero `await` points.
|
|
231
|
+
*/
|
|
232
|
+
consume(params: {
|
|
233
|
+
rootId: string;
|
|
234
|
+
presigId: Uint8Array | string;
|
|
235
|
+
requestedSubset: ReadonlyArray<number>;
|
|
236
|
+
preValidateRecord?: (record: PresignatureShareRecord) => void;
|
|
237
|
+
}): PresignatureShareRecord;
|
|
238
|
+
wipeRoot(rootId: string): number;
|
|
239
|
+
wipeAll(): number;
|
|
240
|
+
}
|
|
241
|
+
//#endregion
|
|
242
|
+
export { MpcPartyBaseOtChannels, MpcPublicClusterInfo, MtaInstanceKind, PresignMtaOtStep1Bundle, PresignMtaOtStep2Bundle, PresignMtaOtStep3Bundle, PresignMtaStep4PayloadBundle, PresignPartySession, PresignRound1CommitmentMsg, PresignRound1RevealMsg, PresignRound3BroadcastMsg, PresignRound4BroadcastMsg, PresignaturePublicVerification, PresignatureShareRecord, VolatilePresignaturePool, computeSubsetBoundPresigId };
|