{"_id":"@autolayer/sdk","name":"@autolayer/sdk","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@autolayer/sdk","version":"0.1.0","description":"TypeScript runtime for deterministic financial automation, authorization, and execution on Stellar.","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"engines":{"node":">=18"},"scripts":{"build":"tsc -p tsconfig.json","lint":"tsc -p tsconfig.json --noEmit","test":"vitest run"},"devDependencies":{"@types/node":"^24.0.15","typescript":"^5.8.3","vitest":"^3.2.4"},"_id":"@autolayer/sdk@0.1.0","gitHead":"a16dc7299dbc49f959213a5a205dbe6f29f5f9e1","_nodeVersion":"20.19.4","_npmVersion":"10.9.8","dist":{"integrity":"sha512-y0s1m8zDUuWCvk5j8fYA28hvlltY346/o+2FDLrKxkCBoqxG4TnFZDbG483HKD9rjyS4L32c21aHo8xPCy2KzQ==","shasum":"f9a6fc9997553f36125bb391938d891846e82e45","tarball":"https://registry.npmjs.org/@autolayer/sdk/-/sdk-0.1.0.tgz","fileCount":22,"unpackedSize":47845,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAghoMjDFSsoQ8w7L+rBWvKzAZEULJW3EsjBcMiX4FjaAiBLwL66SoXRbYii2+5I6wezvd50YcKXxGKiYEEQOfSsqA=="}]},"_npmUser":{"name":"autolayer","email":"autolayerfi@gmail.com"},"directories":{},"maintainers":[{"name":"autolayer","email":"autolayerfi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.1.0_1785591306779_0.46922526879835114"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-01T13:35:06.615Z","0.1.0":"2026-08-01T13:35:06.936Z","modified":"2026-08-01T13:35:07.148Z"},"maintainers":[{"name":"autolayer","email":"autolayerfi@gmail.com"}],"description":"TypeScript runtime for deterministic financial automation, authorization, and execution on Stellar.","readme":"# @autolayer/sdk\n\nTyped SDK for proposing, paying for, activating, and managing AutoLayer automations.\n\n## API deployment configuration\n\n```ts\nimport { AutoLayer } from \"@autolayer/sdk\";\n\nAutoLayer.configure({ environment: \"DEVELOPMENT\" });\n```\n\nBuilt-in URLs:\n\n```ts\nconst API_URLS = {\n  PRODUCTION: \"https://api.autolayer.io\",\n  DEVELOPMENT: \"http://localhost:5001\",\n} as const;\n```\n\nThe Stellar `network` remains mandatory in every proposal:\n\n```ts\nconst proposal = await AutoLayer.propose({\n  network: \"TESTNET\",\n  type: \"DCA\",\n  walletAddress: \"C...\",\n  validAfterLedger: 1,\n  expiresAtLedger: 100_000,\n  schedule: { kind: \"INTERVAL\", expression: \"10 hours\" },\n  strategy: {\n    protocol: { name: \"Aqua\", contractId: \"C...\", functionName: \"swap\" },\n    inputAsset: \"C...\",\n    outputAsset: \"C...\",\n    amountPerRun: \"100000000\",\n    maxTotalAmount: \"3000000000\",\n    spendRecipients: [\"C...\"],\n  },\n});\n```\n\n`TESTNET` and `PUBLIC` are Stellar networks. They do not change the API hostname.\n\n## Custom API URL\n\n```ts\nAutoLayer.configure({ apiUrl: \"http://localhost:4999\" });\n```\n\n## Pay during activation\n\n```ts\nawait AutoLayer.activate(\n  proposal,\n  {\n    policyIdHex,\n    transactionHash,\n  },\n  {\n    paymentHandler: async (requirements) => {\n      return createX402PaymentSignature(requirements);\n    },\n  }\n);\n```\n\n### Disbursement\n\n```ts\nawait AutoLayer.propose({\n  type: \"DISBURSEMENT\",\n  network: \"TESTNET\",\n  walletAddress: \"C...\",\n  validAfterLedger: 100,\n  expiresAtLedger: 10000,\n  maxUses: 3,\n  schedule: { kind: \"INTERVAL\", expression: \"1 hour\" },\n  strategy: {\n    asset: \"C...\",\n    repeat: true,\n    recipients: [{ address: \"G...\", amount: \"10000000\" }],\n  },\n});\n```\n","readmeFilename":"README.md","_rev":"1-1b7634a043d316d29ed1ad0aeedc27f8"}