@thru/passkey-manager is the root package for building transactions against the on-chain passkey_manager program.
Use it when you are constructing passkey-backed wallet flows, validating passkey signatures, or deriving the addresses and account context needed for a passkey-managed transaction.
Choose @thru/passkey-manager when you need the instruction builders, seeds, and account-context helpers around a passkey-managed wallet. Use @thru/passkey when you only need the browser WebAuthn registration and signing layer.
Install
Entry point
Import from the package root:What it gives you
Instruction builders
encodeCreateInstructionencodeValidateInstructionencodeTransferInstructionencodeInvokeInstructionencodeAddAuthorityInstructionencodeRemoveAuthorityInstructionencodeRegisterCredentialInstructionconcatenateInstructions
Transaction setup helpers
createWalletSeedderiveWalletAddresscreateCredentialLookupSeedderiveCredentialLookupAddressbuildAccountContextbuildPasskeyReadWriteAccountsparseWalletNoncefetchWalletNoncecreateValidateChallenge
Signature and encoding utilities
parseDerSignaturenormalizeLowSnormalizeSignatureComponentbytesToBigIntBEbigIntToBytesBEarrayBufferToBase64Urlbase64UrlToArrayBufferbytesToBase64Urlbase64UrlToBytesbytesToHexhexToBytesbytesEqualcompareBytesuniqueAccounts
Constants and types
PASSKEY_MANAGER_PROGRAM_ADDRESSINSTRUCTION_CREATEINSTRUCTION_VALIDATEINSTRUCTION_TRANSFERINSTRUCTION_INVOKEINSTRUCTION_ADD_AUTHORITYINSTRUCTION_REMOVE_AUTHORITYINSTRUCTION_REGISTER_CREDENTIALAUTHORITY_TAG_PASSKEYAUTHORITY_TAG_PUBKEYAuthorityAccountContextCreateInstructionParamsValidateInstructionParamsTransferInstructionParamsRegisterCredentialInstructionParamsWalletSignerPasskeyMetadataPasskeyRegistrationResultPasskeySigningResultPasskeyDiscoverableSigningResultTransactionExecutionSummary
Typical flow
- Derive a wallet seed and wallet address.
- Build an account context so every account has a stable index in the transaction.
- Encode the transaction instructions you need.
- Create the validate challenge, sign it with WebAuthn, and package the signature into
encodeValidateInstruction.
Good fit for
Use@thru/passkey-manager when you need to:
- Build a passkey-managed wallet from scratch.
- Submit a passkey signature to authorize a transaction.
- Add or remove authorities on a wallet.
- Register a credential or derive a credential lookup address.
- Compose instruction payloads for server-side helpers or wallet backends.