@tesser-payments/sdk-ts 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesser-payments/sdk-ts",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Signer-only TypeScript SDK for Tesser API: locally stamp signCreateWallet and signStep activities. No HTTP, no OAuth — bring your own client.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -10,13 +10,21 @@
10
10
  }
11
11
  },
12
12
  "files": ["dist", "README.md", "LICENSE"],
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/tesser-payments/sdk-ts.git"
16
+ },
17
+ "homepage": "https://github.com/tesser-payments/sdk-ts#readme",
18
+ "bugs": {
19
+ "url": "https://github.com/tesser-payments/sdk-ts/issues"
20
+ },
13
21
  "engines": {
14
22
  "node": ">=20",
15
23
  "bun": ">=1.3"
16
24
  },
17
25
  "scripts": {
18
26
  "build": "bun run build:js && bun run build:types",
19
- "build:js": "bun build ./src/index.ts --target=node --format=esm --outdir=./dist --external @turnkey/api-key-stamper --external @tesser-payments/types",
27
+ "build:js": "bun build ./src/index.ts --target=node --format=esm --outdir=./dist --external @tesser-payments/types",
20
28
  "build:types": "tsc -p tsconfig.build.json",
21
29
  "prepack": "bun run build",
22
30
  "test": "vitest run",
@@ -26,13 +34,14 @@
26
34
  "typecheck": "tsc --noEmit"
27
35
  },
28
36
  "peerDependencies": {
29
- "@tesser-payments/types": "*",
30
- "@turnkey/api-key-stamper": "*"
37
+ "@tesser-payments/types": "*"
38
+ },
39
+ "dependencies": {
40
+ "@turnkey/api-key-stamper": "^0.6.5"
31
41
  },
32
42
  "devDependencies": {
33
43
  "@biomejs/biome": "^1.9",
34
44
  "@tesser-payments/types": "*",
35
- "@turnkey/api-key-stamper": "*",
36
45
  "@types/node": "^20",
37
46
  "typescript": "^5.4",
38
47
  "vitest": "^2"
package/dist/client.d.ts DELETED
@@ -1,32 +0,0 @@
1
- import type { LogLevel, Logger, RequestOptions, RpcUrls, SigningConfig } from './internal/types.js';
2
- export interface TesserClientConfig {
3
- token: string;
4
- baseUrl?: string;
5
- rpcUrls?: RpcUrls;
6
- signing: SigningConfig;
7
- timeout?: number;
8
- maxRetries?: number;
9
- fetch?: typeof fetch;
10
- logger?: Logger;
11
- logLevel?: LogLevel;
12
- }
13
- export declare class TesserClient {
14
- #private;
15
- readonly baseUrl: string;
16
- readonly rpcUrls: ReadonlyMap<string, string>;
17
- readonly signing: Readonly<SigningConfig>;
18
- readonly timeout: number;
19
- readonly maxRetries: number;
20
- readonly fetch: typeof fetch;
21
- readonly logger: Logger;
22
- readonly logLevel: LogLevel;
23
- constructor(config: TesserClientConfig);
24
- setToken(token: string): void;
25
- /**
26
- * Fetches the on-chain address bound to a Tesser account ID. Used by
27
- * `signStep` to resolve `from_account_id` / `to_account_id` to addresses
28
- * before building the unsigned transaction; also useful as a standalone
29
- * lookup for callers that need the address directly.
30
- */
31
- getAccountAddress(accountId: string, opts?: RequestOptions): Promise<string>;
32
- }
@@ -1,23 +0,0 @@
1
- import type { Logger } from './types.js';
2
- export interface HttpContext {
3
- fetch: typeof fetch;
4
- logger: Logger;
5
- timeout: number;
6
- maxRetries: number;
7
- bearer: string;
8
- }
9
- export interface HttpResponse<T> {
10
- data: T;
11
- status: number;
12
- headers: Headers;
13
- requestId?: string;
14
- }
15
- export interface FetchWithRetryOptions {
16
- signal?: AbortSignal;
17
- timeout?: number;
18
- maxRetries?: number;
19
- method?: string;
20
- body?: BodyInit;
21
- headers?: Record<string, string>;
22
- }
23
- export declare function fetchWithRetry<T>(ctx: HttpContext, url: string, options?: FetchWithRetryOptions): Promise<HttpResponse<T>>;