@turnkey/http
3.0.0
Major Changes
- f94d36e: Remove deprecated TurnkeyApiService. TurnkeyApi should be used instead.
Minor Changes
-
d1083bd: New activity
INIT_OTP_AUTH_V2which allows alphanumeric boolean and otpLength (6-9) to be passed -
This release introduces the
INIT_OTP_AUTH_V2activity. The difference between it andINIT_OTP_AUTHis that it can now acceptalphanumericandotpLengthfor selecting crockford bech32 alphanumeric codes and the length of those codes. By default alphanumeric = true, otpLength = 9 -
This release introduces
sendFromEmailSenderNametoINIT_OTP_AUTH,INIT_OTP_AUTH_V2,EMAIL_AUTHandEMAIL_AUTH_V2. This is an optional custom sender name for use with sendFromEmailAddress; if left empty, will default to ‘Notifications’.
2.22.0
Minor Changes
-
ecdb29a: Update API as per mono v2025.3.2
- This release introduces the
CREATE_USERS_V3activity. The difference between it andCREATE_USERS_V2is that it can now acceptuserPhoneNumberandoauthProviders. In total, it accepts the following parameters:
See source code to view details on the nested types. - This release introduces the
2.21.0
Minor Changes
- 56a307e: Update API to mono v2025.3.0
- This release introduces an
invalidateExistingflag to theCreateReadWriteSessionandOauthactivities. If enabled, this will invalidate existing read-write and oauth API keys. This is useful in scenarios where a user attempts to create numerousReadWriteorOauthsessions. Because our API caps the number of session keys associated with a user, this flag can clear all other existing session keys of that specific type (e.g. settinginvalidateExisting: trueforCreateReadWriteSessionwill invalidate all previously created read-write session keys)
- This release introduces an
2.20.0
Minor Changes
- 3c44c4a: Updates per mono release v2025.2.2
2.19.0
Minor Changes
- 57f9cb0: Update endpoints - surface
GetWalletAccount. This endpoint takes in the following args:
2.18.0
Minor Changes
- 6695af2: Update per mono release v2025.1.11
2.17.3
Patch Changes
- 053fbfb: Update mono dependencies
2.17.2
Patch Changes
- Updated dependencies [2d5977b]
- @turnkey/api-key-stamper@0.4.4
2.17.1
Patch Changes
- 538d4fc: Update api endpoints - NEW: User verification, SMS customization params
2.17.0
Minor Changes
- 78bc39c: Add default accounts for various address types
- Add wallet account ID to list wallets endpoint
2.16.0
Minor Changes
- 4df8914: Version bump corresponding to mono release v2024.10.10.
- Improved error message for duplicate activity submission
- Address derivation support for DOGE, TON, SEI, XLM
- Fix server side error if sub_org doesn’t have email and/or phone number
2.15.0
Minor Changes
- 9ebd062: Release OTP functionality
2.14.2
Patch Changes
- 96d7f99: Update dependencies
- Updated dependencies [e5c4fe9]
- @turnkey/encoding@0.4.0
- @turnkey/api-key-stamper@0.4.3
2.14.1
Patch Changes
- ff059d5: Update dependencies
- Updated dependencies [93666ff]
- @turnkey/encoding@0.3.0
- @turnkey/api-key-stamper@0.4.2
2.14.0
Minor Changes
-
848f8d3: Add new helpers and update types and errors
getSignatureFromActivityreturns the signature corresponding to a completed activitygetSignedTransactionFromActivityreturns the signed transaction corresponding to a completed activityassertActivityCompletedchecks the state of an activity and throws an error if the activity either requires consensus or is otherwise not yet completedTERMINAL_ACTIVITY_STATUSESis a const containing all terminal activity statuses. Useful for checking on an activityTurnkeyActivityErrornow usesundefinedinstead ofnull- Export some additional types:
TActivity,TActivityId,TActivityStatus,TActivityType
2.13.0
Minor Changes
- 93dee46: Add create read write session v2 which allows for user targeting directly from stamp or optional userId in intent
2.12.3
Patch Changes
- e2f2e0b: Added two new endpoints for deleting private keys and deleting wallets
2.12.2
Patch Changes
- 2d7e5a9: fix a (currently unused) return value
-
Updated dependencies
- @turnkey/api-key-stamper@0.4.1
- @turnkey/encoding@0.2.1
2.12.1
Patch Changes
- f17a229: Update to oauth related endpoints to drop jwks uri from oauth providers
2.12.0
Minor Changes
- Add Email Auth V2 - Optional invalidate exisiting Email Authentication API keys
2.11.0
Minor Changes
- Update to use new endpoints. Including CREATE_READ_WRITE_SESSION which allows one shot passkey sessions (returns org information and a credential bundle) and CREATE_API_KEYS_V2 which allows a curve type to be passed (SECP256K1 or P256)
2.10.0
Minor Changes
- 7a9ce7a: Sync 2024.3.16
2.9.1
Patch Changes
- Update generated files to latest release: optional pagination options were added to list sub-organization and list wallet account endpoints.
2.9.0
Minor Changes
- 83b62b5: Sync types for latest release
2.8.0
Minor Changes
- 46a7d90: Update to v2024.2.1 API: add activities to initialize wallet import, import wallet, delete users, delete private key tags, delete user tags, and list sub-organizations
2.7.1
Patch Changes
- Update to v2024.2.0 API types:
mnemonicLengthis now a number instead of a string
2.7.0
Minor Changes
- Introduce and reference
@turnkey/encodingto consolidate utility functions - Updated dependencies ([c3b423b], [d73725b])
- @turnkey/webauthn-stamper@0.5.0
- @turnkey/api-key-stamper@0.4.0
- @turnkey/encoding@0.1.0
2.6.2
Patch Changes
- b45a9ac: Include package version in request headers
- f9d636c: Export VERSION from turnkey/http
2.6.1
Patch Changes
- 52e2389: Revert version export (#186 and #187)
2.6.0
Minor Changes
- 0794f41: Add VERSION constant
- 7a3c890: Add key export support
Patch Changes
- 4517e3b: Update version string to include package name
2.5.1
Patch Changes
- Upgrade to Node v18 (#184)
- Updated dependencies
- @turnkey/webauthn-stamper@0.4.3
- @turnkey/api-key-stamper@0.3.1
2.5.0
Minor Changes
-
464ac0e: Update protos for latest release, which includes:
- Support optional expirations for API keys, configurable via the
expirationSecondsparameter. - Support Email Auth. Details to follow ⚡️
- Support optional expirations for API keys, configurable via the
2.4.2
Patch Changes
- Updated dependencies [a03e385]
- @turnkey/webauthn-stamper@0.4.2
2.4.1
Patch Changes
- Fix universal files to stop using
require. Use ES6 imports instead (#178) - Updated dependencies [f87ced8]
- @turnkey/webauthn-stamper@0.4.1
2.4.0
Minor Changes
- Use rollup to build ESM and CommonJS, fix ESM support (#174)
Patch Changes
- Updated dependencies [fc5b291]
- @turnkey/api-key-stamper@0.3.0
- @turnkey/webauthn-stamper@0.4.0
2.3.1
Patch Changes
- Updated dependencies
- @turnkey/api-key-stamper@0.2.0
2.3.0
Minor Changes
- Sync protos from latest public endpoints
2.2.0
Minor Changes
- Add ESM to package dist (#154)
Patch Changes
- ed50a0f: simplify types
2.1.0
Minor Changes
- bb6ea0b: Update generated files
- new query endpoints to retrieve wallets (
/public/v1/query/list_wallets) - new query endpoint to retrieve wallet accounts (
/public/v1/query/list_wallet_accounts)
- new query endpoints to retrieve wallets (
2.0.0
Major Changes
- Synced protos from mono
Upgrade notes
signRawPayloadandsignTransactionnow expect asignWithparam instead ofprivateKeyIdpreviouslysignRawPayloadandsignTransactionhave been updated to expect a new type:ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2andACTIVITY_TYPE_SIGN_TRANSACTION_V2, respectively- If you have policies authorizing
ACTIVITY_TYPE_SIGN_RAW_PAYLOADorACTIVITY_TYPE_SIGN_TRANSACTIONspecifically, they will need to be updated to authorizeACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2andACTIVITY_TYPE_SIGN_TRANSACTION_V2(or better yet, update your policies to allow all signing actions categorically using policy resources and actions. See https://docs.turnkey.com/managing-policies/examples) createSubOrganizationnow usesACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4under the hood, which utilizes wallets. The shape of the request has been updated to include the following parameter,wallet. Here’s an example:
1.3.0
Minor Changes
- Synced protos from mono
- Adds base URL check during initialization (closes https://github.com/tkhq/sdk/issues/124)
- The following are new features additions, fresh out the oven. Still getting them ready for primetime! Refreshed examples to come soon™️. Stay tuned and reach out to the Turnkey team if you have any questions.
- Wallets:
- 🟢
ACTIVITY_TYPE_CREATE_WALLET(via/api/v1/submit/create_wallet): create a HD wallet - 🟢
ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS(via/api/v1/submit/create_wallet_accounts): create a wallet account (address) - 🟢
ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2(via/api/v1/submit/sign_raw_payload_v2): sign a payload with a specified private key or address - 🟢
ACTIVITY_TYPE_SIGN_TRANSACTION_V2(via/api/v1/submit/sign_transaction_v2): sign a transaction with a specified private key or address
- 🟢
- Organization features:
- 🟢
ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE(via/api/v1/submit/set_organization_feature): set an organization feature - 🟢
ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE(via/api/v1/submit/remove_organization_feature): remove an organization feature - Only one feature supported as of this time; additional documentation to follow.
- 🟢
- Export private key:
- 🟡
ACTIVITY_TYPE_EXPORT_PRIVATE_KEY(via/api/v1/submit/export_private_key): export a private key, encrypted to a target public key. We do not yet have CLI or front-end tooling to use this safely; stay tuned!
- 🟡
- Email recovery:
- 🟡
ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY(via/api/v1/submit/init_user_email_recovery): initialize a new email recovery flow
- 🟡
- Wallets:
- 🟢: good to go!
- 🟡: these endpoints are safe to use, but still experimental/unstable. Check back for updates and guidance.
Patch Changes
- Updated dependencies
- @turnkey/webauthn-stamper@0.2.0
1.2.0
Minor Changes
-
The
createSubOrganizationrequest has been updated under the hood:- Calling
.createSubOrganizationon our HTTP client will trigger an activity of typeCREATE_SUB_ORGANIZATION_V3instead ofCREATE_SUB_ORGANIZATION_V2previously. - If there are any policies referencing
CREATE_SUB_ORGANIZATION_V2specifically, they will no longer work out of the box if creating sub-orgs via SDK. These policies will need to be updated to allowCREATE_SUB_ORGANIZATION_V3. See policy examples related to access control here for additional methods of constructing policies. CREATE_SUB_ORGANIZATION_V3supports everythingCREATE_SUB_ORGANIZATION_V2supports, with the addition of aprivateKeysfield to atomically create a sub-org with private keys. If no private keys are desired, simply provide an empty array.- NOTE: when reading
createSubOrganizationresults, SDK users will now need to look atactivity.result.createSubOrganizationResultV3instead of the previously validactivity.result.createSubOrganizationResult.
- Calling
1.1.1
Patch Changes
- Updated dependencies
- @turnkey/api-key-stamper@0.1.1
1.1.0
Minor Changes
New exports:- new
TurnkeyClient. This is now the preferred interface to make Turnkey requests, because it supports both API keys and webauthn-signed requests. It also doesn’t rely on global initialization - new method to poll requests:
createActivityPoller
- deprecate
TurnkeyApi(useTurnkeyClientinstead),init,browserInit(no need for them anymore if you’re usingTurnkeyClient), andwithAsyncPolling(usecreateActivityPollerinstead) - deprecate
SignedRequestin favor ofTSignedRequest. Besides the more correct name,TSignedRequestdiffers in itsstampproperty. It now stores the stamper header name as well as value, so users do not have to hardcode Turnkey stamp header names (e.g. “X-Stamp-Webauthn”).
- new endpoint to update users:
/public/v1/submit/update_user - pagination
limitoption has been updated tostringinstead of number for consistency with other pagination options
- @turnkey/webauthn-stamper@0.1.0
- @turnkey/api-key-stamper@0.1.0
1.0.1
Patch Changes
- 8d1d0e8: Synced protos from mono
1.0.0
Major Changes
-
46473ec: This breaking change updates generated code to be shorter and more intuitive to read:
- generated fetchers do not include the HTTP method in their name. For example
useGetGetActivityis nowuseGetActivity, andusePostSignTransactionisuseSignTransaction. - input types follow the same convention (no HTTP method in the name):
TPostCreatePrivateKeysInputis nowTCreatePrivateKeysInput. - the “federated” request helpers introduced in
0.18.0are now named “signed” requests to better reflect what they are.FederatedRequestis nowSignedRequest, and generated types follow. For example:federatedPostCreatePrivateKeysis nowsignCreatePrivateKeys,federatedGetGetActivityis nowsignGetActivity, and so on.
- generated fetchers do not include the HTTP method in their name. For example
Patch Changes
- 38b424f: Sync public api types
0.18.1
Patch Changes
- Synced protos from mono
0.18.0
Minor Changes
- Add support for federated requests (an example is included under
sdk/examples/with-federated-passkeys) - Routine re-sync protos from mono
0.17.1
Patch Changes
- Re-sync protos from mono. No public-facing changes.
0.17.0
Minor Changes
- Added support for ed25519
- New endpoint to programmatically approve or reject activities (
/submit/approve_activity,/submit/reject_activity) - New endpoint to programmatically create authenticators (
/submit/create_authenticators) - New endpoints to update Private Key tags (
/submit/update_private_key_tag) - New endpoints to update User tags (
/submit/update_user_tag) - Simplified shape for
AuthenticatorParamswith a newAuthenticatorParamsV2. To take advantage of this new shape, useACTIVITY_TYPE_CREATE_USERS_V2and the newACTIVITY_TYPE_CREATE_AUTHENTICATORS.
0.16.0
Minor Changes
- Fix
.postGetPrivateKey(...)’s underlying path, while adding@deprecated.postGetPrivateKeyBackwardsCompat(...)for backward compatibility
0.15.0
Minor Changes
- Export a new helper for offline request signing:
sealAndStampRequestBody(...).
0.14.0
Minor Changes
- Updated the
addressFormatsenum field in/submit/create_private_keys
0.13.2
Patch Changes
- New
TurnkeyRequestErrorerror class that contains rich error details
0.13.1
Patch Changes
- Error messages now contain Turnkey-specific error details
0.13.0
Minor Changes
- New
/submit/create_api_only_usersendpoint:TurnkeyApi.postCreateApiOnlyUsers(...) - Marked
TurnkeyApi.postCreateUsers(...)as deprecated - Improved documentation on methods (via TSDoc)
0.12.0
Minor Changes
- Error messages now contain Turnkey-specific error code and message
0.11.0
Minor Changes
- New
/submit/create_usersendpoint:TurnkeyApi.postCreateUsers(...)
0.10.0
Minor Changes
- No public-facing changes
0.9.0
Minor Changes
- Improved support for React Native runtime (https://github.com/tkhq/sdk/pull/37)
0.8.1
Patch Changes
- Switched from
undicitocross-fetchto improve bundler compatibility
0.8.0
Minor Changes
- Added browser runtime support —
@turnkey/httpis now a universal (isomorphic) package - The API fetchers are now exported as namespace
TurnkeyApi.PublicApiServicehas been marked as deprecated, but will remain functional until we hit v1.0. - Dropped support for Node.js v14; we recommend using Node v18+
0.7.0
Minor Changes
- Improved documentation
- Added
withAsyncPolling(...)helper to provide built-in async polling support. Read more:
0.6.0
Minor Changes
- Improved OpenAPI documentation
0.5.0
Minor Changes
- Arbitrary message signing
0.4.0
Minor Changes
timestamp->timestampMs
0.3.1
Patch Changes
- Fix outdated artifact
0.3.0
Minor Changes
keyId->privateKeyIdeverywhere
0.2.0
Minor Changes
- Change parameter from
keyIdtoprivateKeyId - Bump API version to latest Beta
0.1.3
Patch Changes
- Support runtime config for credentials
0.1.2
Patch Changes
- Drop internal dev dependency
0.1.1
Patch Changes
- Initial release
- Updated dependencies
- @turnkey/jest-config@0.1.1