@ocap/mpc-hsm 1.33.6 → 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.
Files changed (56) hide show
  1. package/esm/bip39-english-wordlist.d.mts +11 -0
  2. package/esm/bip39-english-wordlist.mjs +31 -0
  3. package/esm/constants.d.mts +66 -2
  4. package/esm/constants.mjs +65 -1
  5. package/esm/dkg.mjs +2 -2
  6. package/esm/index.d.mts +11 -3
  7. package/esm/index.mjs +11 -3
  8. package/esm/ocap-clear-signing.d.mts +125 -0
  9. package/esm/ocap-clear-signing.mjs +1170 -0
  10. package/esm/offline-ceremony.d.mts +127 -0
  11. package/esm/offline-ceremony.mjs +481 -0
  12. package/esm/ot.d.mts +7 -1
  13. package/esm/ot.mjs +149 -16
  14. package/esm/personal-vault.d.mts +1292 -0
  15. package/esm/personal-vault.mjs +3615 -0
  16. package/esm/personal.d.mts +10 -0
  17. package/esm/personal.mjs +11 -0
  18. package/esm/presign.mjs +1 -1
  19. package/esm/rlp-eip1559.d.mts +75 -0
  20. package/esm/rlp-eip1559.mjs +293 -0
  21. package/esm/secp256k1-scalar.d.mts +1 -1
  22. package/esm/secp256k1-scalar.mjs +14 -5
  23. package/esm/steel-mnemonic.d.mts +55 -0
  24. package/esm/steel-mnemonic.mjs +247 -0
  25. package/esm/ves-backup.d.mts +296 -0
  26. package/esm/ves-backup.mjs +1025 -0
  27. package/esm/x402-agent-guard.d.mts +111 -0
  28. package/esm/x402-agent-guard.mjs +780 -0
  29. package/lib/bip39-english-wordlist.cjs +33 -0
  30. package/lib/bip39-english-wordlist.d.cts +11 -0
  31. package/lib/constants.cjs +128 -0
  32. package/lib/constants.d.cts +66 -2
  33. package/lib/dkg.cjs +2 -2
  34. package/lib/index.cjs +249 -0
  35. package/lib/index.d.cts +11 -3
  36. package/lib/ocap-clear-signing.cjs +1176 -0
  37. package/lib/ocap-clear-signing.d.cts +125 -0
  38. package/lib/offline-ceremony.cjs +487 -0
  39. package/lib/offline-ceremony.d.cts +127 -0
  40. package/lib/ot.cjs +150 -15
  41. package/lib/ot.d.cts +7 -1
  42. package/lib/personal-vault.cjs +3725 -0
  43. package/lib/personal-vault.d.cts +1292 -0
  44. package/lib/personal.cjs +338 -0
  45. package/lib/personal.d.cts +10 -0
  46. package/lib/presign.cjs +1 -1
  47. package/lib/rlp-eip1559.cjs +303 -0
  48. package/lib/rlp-eip1559.d.cts +75 -0
  49. package/lib/secp256k1-scalar.cjs +14 -5
  50. package/lib/steel-mnemonic.cjs +253 -0
  51. package/lib/steel-mnemonic.d.cts +55 -0
  52. package/lib/ves-backup.cjs +1053 -0
  53. package/lib/ves-backup.d.cts +296 -0
  54. package/lib/x402-agent-guard.cjs +788 -0
  55. package/lib/x402-agent-guard.d.cts +111 -0
  56. package/package.json +6 -1
@@ -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 };
@@ -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 };
package/esm/presign.mjs CHANGED
@@ -2,8 +2,8 @@ import { DST_PRESIG_COM_V1, DST_PRESIG_ID_V1, DST_PRESIG_PI_LIN_K_V1, DST_PRESIG
2
2
  import { H_scalar, SECP256K1_G, SECP256K1_ZERO, addModN, assertValidX25519PublicKey, bytes32ToScalarNonZero, bytes32ToScalarStrict, bytesToHex, computeX25519SharedSecret, concatBytes, constantTimeEqual, createLinearPedersenDleqProof, createPedersenPok, createSchnorrPokInBase, decodePointCompressed, defaultRandomBytes, encodePointCompressed, invModN, lagrangeCoefficientAtZero, lengthPrefixedEncode, mulBaseG, mulModN, mulPoint, negModN, normalizeHexBytes, normalizeSortedSubset, pedersenCommit, sampleScalarNonZero, scalarToBytes32, sortedSubsetBytes, subModN, subsetsEqual, u16be, u64be, u8, utf8Bytes, verifyLinearPedersenDleqProof, verifyPedersenPok, verifySchnorrPokInBase, zeroizeBytes } from "./secp256k1-scalar.mjs";
3
3
  import { otExtendReceiverStep1, otExtendReceiverStep3, otExtendSenderStep2, otExtendSenderStep4VerifyBeforePads, wipeVerifiedCotReceiverRows, wipeVerifiedCotSenderRows } from "./ot.mjs";
4
4
  import { decomposeScalarWithLhlGadget, gadgetMtaReceiverVerifyAndFinish, gadgetMtaSenderCreateMessage } from "./mta.mjs";
5
- import { x25519 } from "@noble/curves/ed25519.js";
6
5
  import { sha256 } from "@noble/hashes/sha2.js";
6
+ import { x25519 } from "@noble/curves/ed25519.js";
7
7
 
8
8
  //#region src/presign.ts
9
9
  function encodeRound1RevealForCommit(reveal) {
@@ -0,0 +1,75 @@
1
+ //#region src/rlp-eip1559.d.ts
2
+ /**
3
+ * Minimal, zero-dependency canonical RLP encoder/decoder and EIP-1559 (EIP-2718 Type `0x02`)
4
+ * transaction serializer for air-gapped disaster recovery and clear-signing (`design.md` §5 & §7).
5
+ *
6
+ * Enforces Yellow Paper Appendix B canonical integer encoding (`0n -> 0x80` empty byte string,
7
+ * zero leading `0x00` bytes on positive integers) and EIP-2 low-S (`s <= SECP256K1_HALF_N`).
8
+ */
9
+ type RlpInput = Uint8Array | ReadonlyArray<RlpInput>;
10
+ declare const EIP1559_TX_TYPE_BYTE: 2;
11
+ declare const ERC20_TRANSFER_SELECTOR_HEX: "a9059cbb";
12
+ declare function bigintToMinimalBytesBE(value: bigint, label?: string): Uint8Array;
13
+ declare function rlpEncode(item: RlpInput): Uint8Array;
14
+ declare function rlpDecode(bytes: Uint8Array): RlpInput;
15
+ interface Eip1559AccessListItem {
16
+ readonly address: string;
17
+ readonly storageKeys: ReadonlyArray<Uint8Array | string>;
18
+ }
19
+ interface Eip1559UnsignedTxFields {
20
+ readonly chainId: bigint;
21
+ readonly nonce: bigint;
22
+ readonly maxPriorityFeePerGasWei: bigint;
23
+ readonly maxFeePerGasWei: bigint;
24
+ readonly gasLimit: bigint;
25
+ readonly to: string;
26
+ readonly valueWei: bigint;
27
+ readonly data?: Uint8Array | string;
28
+ readonly accessList?: ReadonlyArray<Eip1559AccessListItem>;
29
+ }
30
+ declare function encodeUnsignedEip1559Tx(tx: Eip1559UnsignedTxFields): {
31
+ readonly unsignedPayloadBytes: Uint8Array;
32
+ readonly signingDigest32: Uint8Array;
33
+ readonly signingDigestHex: string;
34
+ readonly toChecksumAddress: string;
35
+ };
36
+ declare function encodeSignedEip1559Tx(params: {
37
+ readonly tx: Eip1559UnsignedTxFields;
38
+ readonly yParity: 0 | 1;
39
+ readonly r: bigint;
40
+ readonly s: bigint;
41
+ }): {
42
+ readonly rawSignedTxBytes: Uint8Array;
43
+ readonly rawSignedTxHex: string;
44
+ readonly txHash32: Uint8Array;
45
+ readonly txHashHex: string;
46
+ readonly signingDigest32: Uint8Array;
47
+ };
48
+ interface DecodedSignedEip1559Tx {
49
+ readonly chainId: bigint;
50
+ readonly nonce: bigint;
51
+ readonly maxPriorityFeePerGasWei: bigint;
52
+ readonly maxFeePerGasWei: bigint;
53
+ readonly gasLimit: bigint;
54
+ readonly toChecksumAddress: string;
55
+ readonly valueWei: bigint;
56
+ readonly dataBytes: Uint8Array;
57
+ readonly accessList: ReadonlyArray<Eip1559AccessListItem>;
58
+ readonly yParity: 0 | 1;
59
+ readonly r: bigint;
60
+ readonly s: bigint;
61
+ readonly senderChecksumAddress: string;
62
+ readonly signingDigest32: Uint8Array;
63
+ readonly txHashHex: string;
64
+ }
65
+ declare function decodeAndRecoverSignedEip1559Tx(rawTx: Uint8Array | string): DecodedSignedEip1559Tx;
66
+ /**
67
+ * Encodes canonical 68-byte ERC-20 `transfer(address,uint256)` calldata (`0xa9059cbb` + 32B recipient + 32B amount).
68
+ */
69
+ declare function encodeErc20TransferCalldata(recipientAddress: string, tokenAmount: bigint): Uint8Array;
70
+ declare function decodeErc20TransferCalldata(calldata: Uint8Array | string): {
71
+ readonly recipientChecksumAddress: string;
72
+ readonly tokenAmount: bigint;
73
+ };
74
+ //#endregion
75
+ export { DecodedSignedEip1559Tx, EIP1559_TX_TYPE_BYTE, ERC20_TRANSFER_SELECTOR_HEX, Eip1559AccessListItem, Eip1559UnsignedTxFields, RlpInput, bigintToMinimalBytesBE, decodeAndRecoverSignedEip1559Tx, decodeErc20TransferCalldata, encodeErc20TransferCalldata, encodeSignedEip1559Tx, encodeUnsignedEip1559Tx, rlpDecode, rlpEncode };
@@ -0,0 +1,293 @@
1
+ import { MpcProtocolError, SECP256K1_HALF_N, SECP256K1_N } from "./constants.mjs";
2
+ import { bytesToBigIntBE, bytesToHex, concatBytes, constantTimeEqual, normalizeHexBytes, u8 } from "./secp256k1-scalar.mjs";
3
+ import { ecrecoverEthAddress, parseStrictEthAddress, toEip55ChecksumAddress } from "./tweak.mjs";
4
+ import { keccak_256 } from "@noble/hashes/sha3.js";
5
+
6
+ //#region src/rlp-eip1559.ts
7
+ const EIP1559_TX_TYPE_BYTE = 2;
8
+ const ERC20_TRANSFER_SELECTOR_HEX = "a9059cbb";
9
+ const MAX_UINT64 = (1n << 64n) - 1n;
10
+ const MAX_UINT256 = (1n << 256n) - 1n;
11
+ function bigintToMinimalBytesBE(value, label = "uint") {
12
+ if (typeof value !== "bigint" || value < 0n || value > MAX_UINT256) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", `${label} must satisfy 0 <= v <= 2^256 - 1`);
13
+ if (value === 0n) return new Uint8Array(0);
14
+ const bytes = [];
15
+ let rem = value;
16
+ while (rem > 0n) {
17
+ bytes.push(Number(rem & 255n));
18
+ rem >>= 8n;
19
+ }
20
+ bytes.reverse();
21
+ return Uint8Array.from(bytes);
22
+ }
23
+ function encodeLengthPrefix(length, offsetBase) {
24
+ if (length < 56) return Uint8Array.of(offsetBase + length);
25
+ const lenBytes = bigintToMinimalBytesBE(BigInt(length), "rlpLength");
26
+ return concatBytes(Uint8Array.of(offsetBase + 55 + lenBytes.length), lenBytes);
27
+ }
28
+ function rlpEncode(item) {
29
+ if (item instanceof Uint8Array) {
30
+ if (item.length === 1 && item[0] <= 127) return new Uint8Array(item);
31
+ return concatBytes(encodeLengthPrefix(item.length, 128), item);
32
+ }
33
+ if (Array.isArray(item)) {
34
+ const payload = concatBytes(...item.map((child) => rlpEncode(child)));
35
+ return concatBytes(encodeLengthPrefix(payload.length, 192), payload);
36
+ }
37
+ throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Unsupported RLP item type");
38
+ }
39
+ const MAX_RLP_DECODE_DEPTH = 4;
40
+ function rlpDecodeItem(buf, offset, depth = 0) {
41
+ if (depth > MAX_RLP_DECODE_DEPTH) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", `RLP nesting depth exceeds maximum (${MAX_RLP_DECODE_DEPTH})`);
42
+ if (offset >= buf.length) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Unexpected EOF during RLP decode");
43
+ const prefix = buf[offset];
44
+ if (prefix <= 127) return {
45
+ item: buf.subarray(offset, offset + 1),
46
+ nextOffset: offset + 1
47
+ };
48
+ if (prefix <= 183) {
49
+ const strLen = prefix - 128;
50
+ const start = offset + 1;
51
+ const end$1 = start + strLen;
52
+ if (end$1 > buf.length) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Truncated short RLP byte string");
53
+ if (strLen === 1 && buf[start] <= 127) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Non-canonical single-byte RLP string");
54
+ return {
55
+ item: buf.subarray(start, end$1),
56
+ nextOffset: end$1
57
+ };
58
+ }
59
+ if (prefix <= 191) {
60
+ const lenOfLen$1 = prefix - 183;
61
+ const lenStart$1 = offset + 1;
62
+ const lenEnd$1 = lenStart$1 + lenOfLen$1;
63
+ if (lenEnd$1 > buf.length || buf[lenStart$1] === 0) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Malformed long RLP string length");
64
+ const strLen = Number(bytesToBigIntBE(buf.subarray(lenStart$1, lenEnd$1)));
65
+ if (!Number.isSafeInteger(strLen) || strLen < 56 || lenEnd$1 + strLen > buf.length) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Invalid or truncated long RLP string");
66
+ return {
67
+ item: buf.subarray(lenEnd$1, lenEnd$1 + strLen),
68
+ nextOffset: lenEnd$1 + strLen
69
+ };
70
+ }
71
+ if (prefix <= 247) {
72
+ const listLen$1 = prefix - 192;
73
+ let cur$1 = offset + 1;
74
+ const end$1 = cur$1 + listLen$1;
75
+ if (end$1 > buf.length) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Truncated short RLP list");
76
+ const list$1 = [];
77
+ while (cur$1 < end$1) {
78
+ const child = rlpDecodeItem(buf, cur$1, depth + 1);
79
+ list$1.push(child.item);
80
+ cur$1 = child.nextOffset;
81
+ }
82
+ if (cur$1 !== end$1) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Misaligned short RLP list boundary");
83
+ return {
84
+ item: list$1,
85
+ nextOffset: end$1
86
+ };
87
+ }
88
+ const lenOfLen = prefix - 247;
89
+ const lenStart = offset + 1;
90
+ const lenEnd = lenStart + lenOfLen;
91
+ if (lenEnd > buf.length || buf[lenStart] === 0) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Malformed long RLP list length");
92
+ const listLen = Number(bytesToBigIntBE(buf.subarray(lenStart, lenEnd)));
93
+ if (!Number.isSafeInteger(listLen) || listLen < 56 || lenEnd + listLen > buf.length) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Invalid or truncated long RLP list");
94
+ let cur = lenEnd;
95
+ const end = lenEnd + listLen;
96
+ const list = [];
97
+ while (cur < end) {
98
+ const child = rlpDecodeItem(buf, cur, depth + 1);
99
+ list.push(child.item);
100
+ cur = child.nextOffset;
101
+ }
102
+ if (cur !== end) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Misaligned long RLP list boundary");
103
+ return {
104
+ item: list,
105
+ nextOffset: end
106
+ };
107
+ }
108
+ function rlpDecode(bytes) {
109
+ const { item, nextOffset } = rlpDecodeItem(bytes, 0);
110
+ if (nextOffset !== bytes.length) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Trailing bytes after RLP item");
111
+ return item;
112
+ }
113
+ function canonicalRlpBytesToBigInt(bytes, label) {
114
+ if (bytes.length > 32) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", `${label} exceeds 32 bytes`);
115
+ if (bytes.length > 0 && bytes[0] === 0) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", `Non-canonical leading zero in ${label}`);
116
+ return bytesToBigIntBE(bytes);
117
+ }
118
+ function validateAndBuildCoreRlpFields(tx) {
119
+ if (typeof tx.chainId !== "bigint" || tx.chainId < 1n || tx.chainId > MAX_UINT64) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", `Invalid chainId: ${String(tx.chainId)}`);
120
+ if (typeof tx.nonce !== "bigint" || tx.nonce < 0n || tx.nonce >= MAX_UINT64) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", `Invalid nonce: ${String(tx.nonce)}`);
121
+ if (typeof tx.maxPriorityFeePerGasWei !== "bigint" || typeof tx.maxFeePerGasWei !== "bigint" || tx.maxPriorityFeePerGasWei < 0n || tx.maxFeePerGasWei < 0n || tx.maxFeePerGasWei > MAX_UINT256 || tx.maxFeePerGasWei < tx.maxPriorityFeePerGasWei) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Invalid EIP-1559 fee parameters (require 0 <= maxPriorityFeePerGasWei <= maxFeePerGasWei)");
122
+ if (typeof tx.gasLimit !== "bigint" || tx.gasLimit < 21000n || tx.gasLimit > MAX_UINT64) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", `Invalid gasLimit: ${String(tx.gasLimit)}`);
123
+ if (typeof tx.valueWei !== "bigint" || tx.valueWei < 0n || tx.valueWei > MAX_UINT256) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", `Invalid valueWei: ${String(tx.valueWei)}`);
124
+ const parsedTo = parseStrictEthAddress(tx.to);
125
+ const dataBytes = tx.data === void 0 || tx.data === "0x" || tx.data === "" ? new Uint8Array(0) : normalizeHexBytes(tx.data);
126
+ const encodedAccessList = (tx.accessList ?? []).map((entry) => {
127
+ const addr = parseStrictEthAddress(entry.address);
128
+ const keys = entry.storageKeys.map((k) => normalizeHexBytes(k, 32));
129
+ return [addr.addressBytes20, keys];
130
+ });
131
+ return {
132
+ coreFields: [
133
+ bigintToMinimalBytesBE(tx.chainId, "chainId"),
134
+ bigintToMinimalBytesBE(tx.nonce, "nonce"),
135
+ bigintToMinimalBytesBE(tx.maxPriorityFeePerGasWei, "maxPriorityFeePerGasWei"),
136
+ bigintToMinimalBytesBE(tx.maxFeePerGasWei, "maxFeePerGasWei"),
137
+ bigintToMinimalBytesBE(tx.gasLimit, "gasLimit"),
138
+ parsedTo.addressBytes20,
139
+ bigintToMinimalBytesBE(tx.valueWei, "valueWei"),
140
+ dataBytes,
141
+ encodedAccessList
142
+ ],
143
+ normalizedToChecksum: parsedTo.checksumAddress,
144
+ dataBytes
145
+ };
146
+ }
147
+ function encodeUnsignedEip1559Tx(tx) {
148
+ const { coreFields, normalizedToChecksum } = validateAndBuildCoreRlpFields(tx);
149
+ const unsignedPayloadBytes = concatBytes(u8(EIP1559_TX_TYPE_BYTE), rlpEncode(coreFields));
150
+ const signingDigest32 = keccak_256(unsignedPayloadBytes);
151
+ return {
152
+ unsignedPayloadBytes,
153
+ signingDigest32,
154
+ signingDigestHex: `0x${bytesToHex(signingDigest32)}`,
155
+ toChecksumAddress: normalizedToChecksum
156
+ };
157
+ }
158
+ function encodeSignedEip1559Tx(params) {
159
+ const { tx, yParity, r, s } = params;
160
+ if (yParity !== 0 && yParity !== 1) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "yParity must be 0 or 1");
161
+ if (typeof r !== "bigint" || r < 1n || r >= SECP256K1_N) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Invalid ECDSA r scalar");
162
+ if (typeof s !== "bigint" || s < 1n || s > SECP256K1_HALF_N) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Invalid or high-S ECDSA s scalar");
163
+ const { coreFields } = validateAndBuildCoreRlpFields(tx);
164
+ const signingDigest32 = keccak_256(concatBytes(u8(EIP1559_TX_TYPE_BYTE), rlpEncode(coreFields)));
165
+ const signedFields = [
166
+ ...coreFields,
167
+ bigintToMinimalBytesBE(BigInt(yParity), "yParity"),
168
+ bigintToMinimalBytesBE(r, "r"),
169
+ bigintToMinimalBytesBE(s, "s")
170
+ ];
171
+ const rawSignedTxBytes = concatBytes(u8(EIP1559_TX_TYPE_BYTE), rlpEncode(signedFields));
172
+ const txHash32 = keccak_256(rawSignedTxBytes);
173
+ return {
174
+ rawSignedTxBytes,
175
+ rawSignedTxHex: `0x${bytesToHex(rawSignedTxBytes)}`,
176
+ txHash32,
177
+ txHashHex: `0x${bytesToHex(txHash32)}`,
178
+ signingDigest32
179
+ };
180
+ }
181
+ function decodeAndRecoverSignedEip1559Tx(rawTx) {
182
+ const rawBytes = normalizeHexBytes(rawTx);
183
+ if (rawBytes.length < 4 || rawBytes[0] !== EIP1559_TX_TYPE_BYTE) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Expected EIP-1559 Type 0x02 transaction envelope");
184
+ const decoded = rlpDecode(rawBytes.subarray(1));
185
+ if (!Array.isArray(decoded) || decoded.length !== 12) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Signed EIP-1559 RLP list must have 12 elements");
186
+ for (let i = 0; i < 12; i++) if (i === 8) {
187
+ if (!Array.isArray(decoded[8])) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "accessList must be an RLP list");
188
+ } else if (!(decoded[i] instanceof Uint8Array)) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", `Field ${i} must be an RLP byte string`);
189
+ const chainId = canonicalRlpBytesToBigInt(decoded[0], "chainId");
190
+ const nonce = canonicalRlpBytesToBigInt(decoded[1], "nonce");
191
+ const maxPriorityFeePerGasWei = canonicalRlpBytesToBigInt(decoded[2], "maxPriorityFeePerGasWei");
192
+ const maxFeePerGasWei = canonicalRlpBytesToBigInt(decoded[3], "maxFeePerGasWei");
193
+ const gasLimit = canonicalRlpBytesToBigInt(decoded[4], "gasLimit");
194
+ const toBytes = decoded[5];
195
+ if (toBytes.length !== 20) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Destination address must be 20 bytes");
196
+ const toLowerHex = bytesToHex(toBytes);
197
+ if (/^0+$/.test(toLowerHex)) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Zero destination address rejected");
198
+ const toChecksumAddress = toEip55ChecksumAddress(toLowerHex);
199
+ const valueWei = canonicalRlpBytesToBigInt(decoded[6], "valueWei");
200
+ const dataBytes = new Uint8Array(decoded[7]);
201
+ const parsedAccessList = decoded[8].map((entry) => {
202
+ if (!Array.isArray(entry) || entry.length !== 2 || !(entry[0] instanceof Uint8Array) || !Array.isArray(entry[1])) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Malformed EIP-2930 accessList tuple");
203
+ if (entry[0].length !== 20) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "accessList address must be 20 bytes");
204
+ const addrHex = bytesToHex(entry[0]);
205
+ if (/^0+$/.test(addrHex)) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Zero address in accessList rejected");
206
+ const storageKeys = entry[1].map((sk) => {
207
+ if (!(sk instanceof Uint8Array) || sk.length !== 32) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "accessList storageKey must be 32 bytes");
208
+ return sk;
209
+ });
210
+ return {
211
+ address: toEip55ChecksumAddress(addrHex),
212
+ storageKeys
213
+ };
214
+ });
215
+ const yParityBig = canonicalRlpBytesToBigInt(decoded[9], "yParity");
216
+ if (yParityBig !== 0n && yParityBig !== 1n) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "yParity must be 0 or 1");
217
+ const yParity = Number(yParityBig);
218
+ const r = canonicalRlpBytesToBigInt(decoded[10], "r");
219
+ const s = canonicalRlpBytesToBigInt(decoded[11], "s");
220
+ if (r < 1n || r >= SECP256K1_N || s < 1n || s > SECP256K1_HALF_N) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Invalid or high-S signature in signed EIP-1559 tx");
221
+ const reencoded = encodeSignedEip1559Tx({
222
+ tx: {
223
+ chainId,
224
+ nonce,
225
+ maxPriorityFeePerGasWei,
226
+ maxFeePerGasWei,
227
+ gasLimit,
228
+ to: toChecksumAddress,
229
+ valueWei,
230
+ data: dataBytes,
231
+ accessList: parsedAccessList
232
+ },
233
+ yParity,
234
+ r,
235
+ s
236
+ });
237
+ if (!constantTimeEqual(rawBytes, reencoded.rawSignedTxBytes)) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Non-canonical EIP-1559 RLP encoding");
238
+ const signingDigest32 = reencoded.signingDigest32;
239
+ return {
240
+ chainId,
241
+ nonce,
242
+ maxPriorityFeePerGasWei,
243
+ maxFeePerGasWei,
244
+ gasLimit,
245
+ toChecksumAddress,
246
+ valueWei,
247
+ dataBytes,
248
+ accessList: parsedAccessList,
249
+ yParity,
250
+ r,
251
+ s,
252
+ senderChecksumAddress: ecrecoverEthAddress({
253
+ msgDigest32: signingDigest32,
254
+ r,
255
+ s,
256
+ yParity
257
+ }).checksumAddress,
258
+ signingDigest32,
259
+ txHashHex: `0x${bytesToHex(keccak_256(rawBytes))}`
260
+ };
261
+ }
262
+ /**
263
+ * Encodes canonical 68-byte ERC-20 `transfer(address,uint256)` calldata (`0xa9059cbb` + 32B recipient + 32B amount).
264
+ */
265
+ function encodeErc20TransferCalldata(recipientAddress, tokenAmount) {
266
+ const parsedRecipient = parseStrictEthAddress(recipientAddress);
267
+ if (typeof tokenAmount !== "bigint" || tokenAmount <= 0n || tokenAmount > MAX_UINT256) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "ERC-20 transfer amount must satisfy 1 <= amount <= 2^256-1");
268
+ const out = new Uint8Array(68);
269
+ out.set(normalizeHexBytes(ERC20_TRANSFER_SELECTOR_HEX, 4), 0);
270
+ out.set(parsedRecipient.addressBytes20, 16);
271
+ let rem = tokenAmount;
272
+ for (let i = 67; i >= 36; i--) {
273
+ out[i] = Number(rem & 255n);
274
+ rem >>= 8n;
275
+ }
276
+ return out;
277
+ }
278
+ function decodeErc20TransferCalldata(calldata) {
279
+ const bytes = normalizeHexBytes(calldata);
280
+ if (bytes.length !== 68 || bytesToHex(bytes.subarray(0, 4)) !== ERC20_TRANSFER_SELECTOR_HEX) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Expected 68-byte ERC-20 transfer(address,uint256) calldata");
281
+ for (let i = 4; i < 16; i++) if (bytes[i] !== 0) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Non-zero padding in ABI-encoded ERC-20 recipient word");
282
+ const addrLower = bytesToHex(bytes.subarray(16, 36));
283
+ if (/^0+$/.test(addrLower)) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "Zero recipient in ERC-20 transfer calldata");
284
+ const tokenAmount = bytesToBigIntBE(bytes.subarray(36, 68));
285
+ if (tokenAmount <= 0n) throw new MpcProtocolError("RLP_INVALID_TRANSACTION", "ERC-20 transfer amount must be > 0");
286
+ return {
287
+ recipientChecksumAddress: toEip55ChecksumAddress(addrLower),
288
+ tokenAmount
289
+ };
290
+ }
291
+
292
+ //#endregion
293
+ export { EIP1559_TX_TYPE_BYTE, ERC20_TRANSFER_SELECTOR_HEX, bigintToMinimalBytesBE, decodeAndRecoverSignedEip1559Tx, decodeErc20TransferCalldata, encodeErc20TransferCalldata, encodeSignedEip1559Tx, encodeUnsignedEip1559Tx, rlpDecode, rlpEncode };
@@ -1,6 +1,6 @@
1
1
  import { MpcErrorCode } from "./constants.mjs";
2
- import { secp256k1 } from "@noble/curves/secp256k1.js";
3
2
  import { bytesToHex, hexToBytes } from "@noble/hashes/utils.js";
3
+ import { secp256k1 } from "@noble/curves/secp256k1.js";
4
4
  import * as _noble_curves_abstract_modular_js0 from "@noble/curves/abstract/modular.js";
5
5
 
6
6
  //#region src/secp256k1-scalar.d.ts
@@ -1,10 +1,9 @@
1
1
  import { MpcProtocolError, PEDERSEN_H_COMPRESSED_HEX, PEDERSEN_H_DST, PEDERSEN_H_MESSAGE, SECP256K1_N } from "./constants.mjs";
2
- import { randomBytes, timingSafeEqual } from "node:crypto";
3
- import { x25519 } from "@noble/curves/ed25519.js";
4
2
  import { sha256 } from "@noble/hashes/sha2.js";
3
+ import { bytesToHex, hexToBytes } from "@noble/hashes/utils.js";
4
+ import { x25519 } from "@noble/curves/ed25519.js";
5
5
  import { secp256k1, secp256k1_hasher } from "@noble/curves/secp256k1.js";
6
6
  import { shake256 } from "@noble/hashes/sha3.js";
7
- import { bytesToHex, hexToBytes } from "@noble/hashes/utils.js";
8
7
 
9
8
  //#region src/secp256k1-scalar.ts
10
9
  const Fn = secp256k1.Point.Fn;
@@ -18,13 +17,23 @@ function utf8Bytes(text) {
18
17
  function zeroizeBytes(...buffers) {
19
18
  for (const buf of buffers) if (buf) buf.fill(0);
20
19
  }
20
+ const MAX_GET_RANDOM_VALUES_CHUNK = 65536;
21
21
  function constantTimeEqual(a, b) {
22
22
  if (a.length !== b.length) return false;
23
- return timingSafeEqual(a, b);
23
+ let diff = 0;
24
+ for (let i = 0; i < a.length; i++) diff |= a[i] ^ b[i];
25
+ return diff === 0;
24
26
  }
25
27
  function defaultRandomBytes(length) {
26
28
  if (!Number.isInteger(length) || length < 0) throw new MpcProtocolError("INVALID_PARAMETER", `Invalid random byte length: ${length}`);
27
- return new Uint8Array(randomBytes(length));
29
+ const cryptoObj = globalThis.crypto;
30
+ if (!cryptoObj || typeof cryptoObj.getRandomValues !== "function") throw new MpcProtocolError("INVALID_PARAMETER", "WebCrypto getRandomValues is unavailable");
31
+ const out = new Uint8Array(length);
32
+ for (let offset = 0; offset < length; offset += MAX_GET_RANDOM_VALUES_CHUNK) {
33
+ const end = Math.min(offset + MAX_GET_RANDOM_VALUES_CHUNK, length);
34
+ cryptoObj.getRandomValues(out.subarray(offset, end));
35
+ }
36
+ return out;
28
37
  }
29
38
  /**
30
39
  * RFC 9380 `secp256k1_XMD:SHA-256_SSWU_RO_` NUMS generator `H` for Pedersen commitments.
@@ -0,0 +1,55 @@
1
+ //#region src/steel-mnemonic.d.ts
2
+ /**
3
+ * Pure 3-Plate 24-Word Standard `BIP-39` Stainless-Steel Cold Backup (`design.md` §5.2):
4
+ * - ZERO human-memorized passphrases (`25th word`) anywhere in cold-backup encoding, decoding, or derivation.
5
+ * - Standard 256-bit entropy (`coldShareBytes32` in `[1, secp256k1.n - 1]`) + 8-bit `SHA-256` BIP-39 checksum
6
+ * -> 24 lowercase English BIP-39 words (`Plate A`, `Plate B`, `Plate C`).
7
+ * - Feldman index identification (`g(k) * G == Y_k`) and 24th-word 8-sibling `m/44'/60'/0'/0/0` decoy address
8
+ * enumeration for outgoing-nonce physical-burglar tripwires.
9
+ */
10
+ declare const BIP44_ETH_STANDARD_PATH: "m/44'/60'/0'/0/0";
11
+ declare function guardianIndexToPlateLabel(guardianIndex: number): string;
12
+ /**
13
+ * Encodes a 32-byte cold Shamir share (`1 <= scalar < secp256k1.n`) into 24 standard English BIP-39 words
14
+ * (`256` entropy bits + `8` SHA-256 checksum bits = `264` bits = `24 x 11` bits).
15
+ */
16
+ declare function encodeColdShareToBip39Words24(coldShareBytes32: Uint8Array): string[];
17
+ /**
18
+ * Decodes 24 standard English BIP-39 words into a validated 32-byte `secp256k1` scalar (`1 <= scalar < n`),
19
+ * verifying exact 24-word count (zero passphrases) and the 8-bit SHA-256 BIP-39 checksum.
20
+ */
21
+ declare function decodeBip39Words24ToColdShare(wordsInput: ReadonlyArray<string> | string): Uint8Array;
22
+ interface IdentifiedColdShare {
23
+ readonly guardianIndex: number;
24
+ readonly plateLabel: string;
25
+ readonly coldPublicShareComp33: Uint8Array;
26
+ }
27
+ /**
28
+ * Identifies which guardian index `k in 1..nCold` a physical 24-word cold share belongs to by
29
+ * evaluating the aggregated cold Feldman commitments `Y_k = \sum_{l=0}^{t_c-1} k^l C^{cold}_l`
30
+ * and checking `scalar * G == Y_k`. Fails closed if zero indices match (e.g. wrong 24th sibling word).
31
+ */
32
+ declare function identifyColdShareIndexViaFeldman(coldShareBytes32: Uint8Array, coldFeldmanCommitmentsComp33: ReadonlyArray<Uint8Array | string>, nCold: number): IdentifiedColdShare;
33
+ /**
34
+ * Derives the standard `m/44'/60'/0'/0/0` Ethereum EOA address (zero passphrase: salt = `"mnemonic"`)
35
+ * for a 24-word BIP-39 mnemonic so honeypot monitoring matches standard hardware/software wallets
36
+ * (`design.md` §5.2(2)).
37
+ */
38
+ declare function deriveBip44EthAddressFromWords24(wordsInput: ReadonlyArray<string> | string): string;
39
+ interface Bip39TwentyFourthSiblingEntry {
40
+ readonly tail3Bits: number;
41
+ readonly wordIndex: number;
42
+ readonly word24: string;
43
+ readonly words24: ReadonlyArray<string>;
44
+ readonly derivationPath: typeof BIP44_ETH_STANDARD_PATH;
45
+ readonly ethAddress: string;
46
+ readonly isValidColdScalar: boolean;
47
+ }
48
+ /**
49
+ * Given the first 23 standard BIP-39 words (`253` bits), enumerates all `2^3 = 8` checksum-valid
50
+ * 24th words (`3` entropy bits + `8` SHA-256 checksum bits) and derives each candidate's standard
51
+ * `m/44'/60'/0'/0/0` `0x...` Ethereum canary/honeypot address (`design.md` §5.2(2)).
52
+ */
53
+ declare function enumerateValid24thBip39Siblings(first23WordsInput: ReadonlyArray<string> | string): ReadonlyArray<Bip39TwentyFourthSiblingEntry>;
54
+ //#endregion
55
+ export { BIP44_ETH_STANDARD_PATH, Bip39TwentyFourthSiblingEntry, IdentifiedColdShare, decodeBip39Words24ToColdShare, deriveBip44EthAddressFromWords24, encodeColdShareToBip39Words24, enumerateValid24thBip39Siblings, guardianIndexToPlateLabel, identifyColdShareIndexViaFeldman };