2.5.0 • Published 3 months ago

@turnkey/sdk-server v2.5.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 months ago

@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

2.5.0

3 months ago

2.4.0

3 months ago

2.3.0

3 months ago

2.2.0

4 months ago

2.1.0

4 months ago

1.7.3

5 months ago

2.0.1

4 months ago

2.0.0

4 months ago

1.7.2

5 months ago

1.7.1

6 months ago

1.7.0

7 months ago

1.6.0

7 months ago

1.4.2

9 months ago

1.5.0

8 months ago

1.2.4

10 months ago

1.4.1

9 months ago

1.4.0

9 months ago

1.3.0

10 months ago

1.2.3

10 months ago

1.2.2

10 months ago

1.2.1

11 months ago

1.2.0

11 months ago

1.1.0

11 months ago

1.0.0

12 months ago

0.2.0

1 year ago

0.1.0

1 year ago

0.0.1

1 year ago