diff --git a/.size-limit.json b/.size-limit.json index 3564804..3625cb3 100644 --- a/.size-limit.json +++ b/.size-limit.json @@ -1,19 +1,19 @@ [ { - "name": "module-sdk (esm)", + "name": "orchestrator-sdk (esm)", "path": "./src/_esm/index.js", - "limit": "1.5 kB", + "limit": "90 kB", "import": "*" }, { - "name": "module-sdk (cjs)", + "name": "orchestrator-sdk (cjs)", "path": "./src/_cjs/index.js", - "limit": "1.5 kB" + "limit": "190 kB" }, { - "name": "module-sdk (minimal surface - tree-shaking)", + "name": "orchestrator-sdk (minimal surface - tree-shaking)", "path": "./src/_esm/index.js", - "limit": "1.5 kB", + "limit": "90 kB", "import": "{ getOrchestrator }" } ] diff --git a/package.json b/package.json index 8f90f6e..91da3b3 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,5 @@ { "type": "module", - "name": "orchestrator-sdk", - "version": "0.0.1", - "description": "A TypeScript library for using the Rhinestone Orchestrator", "scripts": { "prepare": "npm run build", "build": "npm run clean && npm run build:cjs && npm run build:esm && npm run build:types", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 223fc55..c37ab5b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -77,6 +77,9 @@ importers: src: dependencies: + '@rhinestone/module-sdk': + specifier: ^0.1.29 + version: 0.1.29(viem@2.18.0(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@6.0.4)) viem: specifier: ^2.17.8 version: 2.18.0(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@6.0.4) @@ -3295,6 +3298,12 @@ snapshots: '@pkgr/core@0.1.1': {} + '@rhinestone/module-sdk@0.1.29(viem@2.18.0(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@6.0.4))': + dependencies: + solady: 0.0.235 + tslib: 2.8.1 + viem: 2.18.0(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@6.0.4) + '@rhinestone/module-sdk@0.1.29(viem@2.21.54(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@6.0.4))': dependencies: solady: 0.0.235 diff --git a/src/README.md b/src/README.md index 7b7bae5..db181e3 100644 --- a/src/README.md +++ b/src/README.md @@ -39,19 +39,19 @@ For API documentation, visit: [Swagger Docs](https://orchestrator-prototype-38oy ### Installation ```bash -npm install viem @rhinestone/orchestrator-sdk +npm install viem @rhinestone/module-sdk @rhinestone/orchestrator-sdk ``` ```bash -pnpm install viem @rhinestone/orchestrator-sdk +pnpm install viem @rhinestone/module-sdk @rhinestone/orchestrator-sdk ``` ```bash -yarn add viem @rhinestone/orchestrator-sdk +yarn add viem @rhinestone/module-sdk @rhinestone/orchestrator-sdk ``` ```bash -bun install viem @rhinestone/orchestrator-sdk +bun install viem @rhinestone/module-sdk @rhinestone/orchestrator-sdk ``` ### Quick Start diff --git a/src/index.ts b/src/index.ts index 7a3f6cc..e0d8bb2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -import { ORCHESTRATOR_PUBLIC_KEY, ORCHESTRATOR_URL } from './constants' +import { ORCHESTRATOR_URL } from './constants' import { Orchestrator } from './orchestrator' export * from './orchestrator' @@ -7,6 +7,7 @@ export * from './constants' export * from './utils' export { Orchestrator } + export function getOrchestrator(apiKey: string): Orchestrator { return new Orchestrator(ORCHESTRATOR_URL, apiKey) } diff --git a/src/orchestrator.ts b/src/orchestrator.ts index 9dd57b2..f9ee46e 100644 --- a/src/orchestrator.ts +++ b/src/orchestrator.ts @@ -1,12 +1,8 @@ -import { Execution } from '@rhinestone/module-sdk' import { Address, Hex } from 'viem' import { signOrderBundleWithOwnableValidator } from './common/signer' -import { MetaIntent, SignedIntent, SignedOrderBundle } from './types' +import { Execution, MetaIntent, SignedIntent, SignedOrderBundle } from './types' import { convertBigIntFields } from './utils' - -const axios = require('axios') - -require('dotenv').config() +import axios from 'axios' export class Orchestrator { private serverUrl: string diff --git a/src/package.json b/src/package.json index bb9e337..894288c 100644 --- a/src/package.json +++ b/src/package.json @@ -20,7 +20,8 @@ "./package.json": "./package.json" }, "peerDependencies": { - "viem": "^2.17.8" + "viem": "^2.17.8", + "@rhinestone/module-sdk": "^0.1.29" }, "homepage": "https://docs.rhinestone.wtf/orchestrator-sdk", "bugs": {