Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@turnkey/sdk-server

Package Overview
Dependencies
Maintainers
6
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turnkey/sdk-server - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

5

./dist/index.js

@@ -43,4 +43,5 @@ 'use strict';

});
exports.TurnkeySDKServerClient = sdkClient.TurnkeySDKServerClient;
exports.TurnkeyServerSDK = sdkClient.TurnkeyServerSDK;
exports.Turnkey = sdkClient.TurnkeyServerSDK;
exports.TurnkeyApiClient = sdkClient.TurnkeyApiClient;
exports.TurnkeyServerClient = sdkClient.TurnkeyServerClient;
exports.DEFAULT_ETHEREUM_ACCOUNTS = turnkeyHelpers.DEFAULT_ETHEREUM_ACCOUNTS;

@@ -47,0 +48,0 @@ exports.defaultEthereumAccountAtIndex = turnkeyHelpers.defaultEthereumAccountAtIndex;

# @turnkey/sdk-server
## 0.1.0
### Minor Changes
- Ready for 0.1.0
## 0.0.1
Initial (experimental) release! This is an alpha release and subject to change.

2

dist/__generated__/version.d.ts

@@ -1,2 +0,2 @@

export declare const VERSION = "@turnkey/sdk-server@0.0.1";
export declare const VERSION = "@turnkey/sdk-server@0.1.0";
//# sourceMappingURL=version.d.ts.map
'use strict';
const VERSION = "@turnkey/sdk-server@0.0.1";
const VERSION = "@turnkey/sdk-server@0.1.0";
exports.VERSION = VERSION;
//# sourceMappingURL=version.js.map

@@ -76,2 +76,6 @@ export type GrpcStatus = {

export type NextApiHandler = (req: NextApiRequest, res: NextApiResponse) => void | Promise<void>;
export interface ApiCredentials {
apiPublicKey: string;
apiPrivateKey: string;
}
//# sourceMappingURL=base.d.ts.map
import { ApiKeyStamper, signWithApiKey, TApiKeyStamperConfig } from "@turnkey/api-key-stamper";
import { createActivityPoller, getWebAuthnAttestation, sealAndStampRequestBody, TSignedRequest, TurnkeyActivityError, TurnkeyApi, TurnkeyApiTypes, TurnkeyRequestError } from "@turnkey/http";
import { TurnkeyServerSDK, TurnkeySDKServerClient } from "./sdk-client";
import { TurnkeyServerSDK, TurnkeyServerClient, TurnkeyApiClient } from "./sdk-client";
import { defaultEthereumAccountAtIndex, DEFAULT_ETHEREUM_ACCOUNTS } from "./turnkey-helpers";

@@ -8,3 +8,3 @@ import type { TurnkeySDKClientConfig, TurnkeySDKServerConfig, TurnkeyProxyHandlerConfig } from "./__types__/base";

import { fetch } from "./universal";
export { ApiKeyStamper, TurnkeyActivityError, TurnkeyServerSDK, TurnkeySDKServerClient, TurnkeyRequestError, };
export { ApiKeyStamper, TurnkeyActivityError, TurnkeyApiClient, TurnkeyServerSDK as Turnkey, TurnkeyServerClient, TurnkeyRequestError, };
export type { TApiKeyStamperConfig, TSignedRequest, TurnkeyApiTypes, TurnkeySDKApiTypes, TurnkeySDKClientConfig, TurnkeySDKServerConfig, TurnkeyProxyHandlerConfig, };

@@ -11,0 +11,0 @@ export { fetch, createActivityPoller, defaultEthereumAccountAtIndex, getWebAuthnAttestation, sealAndStampRequestBody, signWithApiKey, };

@@ -43,4 +43,5 @@ 'use strict';

});
exports.TurnkeySDKServerClient = sdkClient.TurnkeySDKServerClient;
exports.TurnkeyServerSDK = sdkClient.TurnkeyServerSDK;
exports.Turnkey = sdkClient.TurnkeyServerSDK;
exports.TurnkeyApiClient = sdkClient.TurnkeyApiClient;
exports.TurnkeyServerClient = sdkClient.TurnkeyServerClient;
exports.DEFAULT_ETHEREUM_ACCOUNTS = turnkeyHelpers.DEFAULT_ETHEREUM_ACCOUNTS;

@@ -47,0 +48,0 @@ exports.defaultEthereumAccountAtIndex = turnkeyHelpers.defaultEthereumAccountAtIndex;

@@ -1,2 +0,2 @@

import type { TurnkeySDKClientConfig, TurnkeySDKServerConfig, TurnkeyProxyHandlerConfig } from "./__types__/base";
import type { ApiCredentials, TurnkeySDKClientConfig, TurnkeySDKServerConfig, TurnkeyProxyHandlerConfig } from "./__types__/base";
import { TurnkeySDKClientBase } from "./__generated__/sdk-client-base";

@@ -8,3 +8,3 @@ import type { RequestHandler } from "express";

constructor(config: TurnkeySDKServerConfig);
api: () => TurnkeySDKServerClient;
api: (apiCredentials?: ApiCredentials) => TurnkeyApiClient;
apiProxy: (methodName: string, params: any[]) => Promise<any>;

@@ -14,6 +14,9 @@ expressProxyHandler: (config: TurnkeyProxyHandlerConfig) => RequestHandler;

}
export declare class TurnkeySDKServerClient extends TurnkeySDKClientBase {
export declare class TurnkeyServerClient extends TurnkeySDKClientBase {
constructor(config: TurnkeySDKClientConfig);
[methodName: string]: any;
}
export declare class TurnkeyApiClient extends TurnkeyServerClient {
constructor(config: TurnkeySDKClientConfig);
}
//# sourceMappingURL=sdk-client.d.ts.map

@@ -13,8 +13,8 @@ 'use strict';

constructor(config) {
this.api = () => {
this.api = (apiCredentials) => {
const apiKeyStamper$1 = new apiKeyStamper.ApiKeyStamper({
apiPublicKey: this.config.apiPublicKey,
apiPrivateKey: this.config.apiPrivateKey,
apiPublicKey: apiCredentials?.apiPublicKey ?? this.config.apiPublicKey,
apiPrivateKey: apiCredentials?.apiPrivateKey ?? this.config.apiPrivateKey,
});
return new TurnkeySDKServerClient({
return new TurnkeyApiClient({
stamper: apiKeyStamper$1,

@@ -94,3 +94,3 @@ apiBaseUrl: this.config.apiBaseUrl,

}
class TurnkeySDKServerClient extends sdkClientBase.TurnkeySDKClientBase {
class TurnkeyServerClient extends sdkClientBase.TurnkeySDKClientBase {
constructor(config) {

@@ -100,5 +100,11 @@ super(config);

}
class TurnkeyApiClient extends TurnkeyServerClient {
constructor(config) {
super(config);
}
}
exports.TurnkeySDKServerClient = TurnkeySDKServerClient;
exports.TurnkeyApiClient = TurnkeyApiClient;
exports.TurnkeyServerClient = TurnkeyServerClient;
exports.TurnkeyServerSDK = TurnkeyServerSDK;
//# sourceMappingURL=sdk-client.js.map
{
"name": "@turnkey/sdk-server",
"version": "0.0.1",
"version": "0.1.0",
"main": "./dist/index.js",

@@ -44,4 +44,4 @@ "module": "./dist/index.mjs",

"elliptic": "^6.5.5",
"@turnkey/api-key-stamper": "0.4.0",
"@turnkey/http": "2.10.0"
"@turnkey/http": "2.10.0",
"@turnkey/api-key-stamper": "0.4.0"
},

@@ -48,0 +48,0 @@ "devDependencies": {

@@ -16,3 +16,3 @@ # @turnkey/sdk-server

```js
const { TurnkeyServerSDK } = require("@turnkey/sdk-server");
const { Turnkey } = require("@turnkey/sdk-server");

@@ -23,3 +23,3 @@ // This config contains parameters including base URLs, API credentials, and org ID

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

@@ -38,3 +38,3 @@ // You're all set to create a server!

`@turnkey/sdk-server` provides `TurnkeyServerSDK`, 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.
`@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.

@@ -41,0 +41,0 @@ // TODO:

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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