Socket
Socket
Sign inDemoInstall

@turnkey/sdk-server

Package Overview
Dependencies
Maintainers
7
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turnkey/sdk-server

Javascript Server SDK


Version published
Weekly downloads
11K
increased by5.03%
Maintainers
7
Weekly downloads
 
Created
Source

@turnkey/sdk-server

npm

A SDK client with server-specific abstractions for interacting with Turnkey API. Also includes @turnkey/http, a lower-level, fully typed HTTP client.

Turnkey API documentation lives here: https://docs.turnkey.com.

Getting started

$ npm install @turnkey/sdk-server
const { Turnkey } = require("@turnkey/sdk-server");

// This config contains parameters including base URLs, API credentials, and org ID
const turnkeyConfig = JSON.parse(fs.readFileSync("./turnkey.json"), "utf8");

// Use the config to instantiate a Turnkey Client
const turnkeyServerClient = new Turnkey(turnkeyConfig);

// You're all set to create a server!
const turnkeyProxyHandler = turnkeyServerClient.expressProxyHandler({});

app.post("/apiProxy", turnkeyProxyHandler);

app.listen(PORT, () => {
  console.log(`Server running on port ${PORT}`);
});

Helpers

@turnkey/sdk-server provides Turnkey, which offers wrappers around commonly used Turnkey API setups. This enables you to easily stand up a minimal backend to proxy end-users' requests to Turnkey. You can also use this to call on the Turnkey API directly from a server setting.

// TODO: // - typescript-ify example // - include nextjs server example

Keywords

FAQs

Package last updated on 06 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc