{"_id":"@aembit/edge-sdk","_rev":"9-25c09769e90541d6eb88f90a96f11c23","name":"@aembit/edge-sdk","dist-tags":{"latest":"1.34.1"},"versions":{"1.34.0":{"name":"@aembit/edge-sdk","version":"1.34.0","license":"Apache-2.0","_id":"@aembit/edge-sdk@1.34.0","maintainers":[{"name":"quantifex","email":"david.walker@quantifex.com"}],"homepage":"https://github.com/Aembit/edge-sdks/tree/main/ts#readme","bugs":{"url":"https://github.com/Aembit/edge-sdks/issues"},"dist":{"shasum":"dd3dca56b7f45875afb1f26fbd8e3d53bb02c1e2","tarball":"https://registry.npmjs.org/@aembit/edge-sdk/-/edge-sdk-1.34.0.tgz","fileCount":159,"integrity":"sha512-OT5HPkLHQtxnaXWmIoJUxBvDwuvB8onD5yYmsW/oxpM17USYPrm1Kmrz4TVv0mcgwZ85hPyWD95RoWBKoOmumg==","signatures":[{"sig":"MEUCIQDsIin5KldlNyBzsWXy5ux0wFziIYQeWKvYM+I8+v6BngIgc5SQGjUg1rl49jy0wbhWCXFiBMxbk+Key5FKjd/hF50=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aembit%2fedge-sdk@1.34.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":228610},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./trust-providers/aws-role":{"types":"./dist/trust-providers/aws-role.d.ts","import":"./dist/trust-providers/aws-role.js"},"./trust-providers/oidc-id-token":{"types":"./dist/trust-providers/oidc-id-token.d.ts","import":"./dist/trust-providers/oidc-id-token.js"},"./trust-providers/gcp-identity-token":{"types":"./dist/trust-providers/gcp-identity-token.d.ts","import":"./dist/trust-providers/gcp-identity-token.js"},"./trust-providers/aws-metadata-service":{"types":"./dist/trust-providers/aws-metadata-service.d.ts","import":"./dist/trust-providers/aws-metadata-service.js"},"./trust-providers/github-identity-token":{"types":"./dist/trust-providers/github-identity-token.d.ts","import":"./dist/trust-providers/github-identity-token.js"},"./trust-providers/azure-metadata-service":{"types":"./dist/trust-providers/azure-metadata-service.d.ts","import":"./dist/trust-providers/azure-metadata-service.js"}},"gitHead":"d609edca4efdf735527067555d90e372f1ac2215","scripts":{"lint":"eslint \"src/**/*.ts\"","test":"vitest run","audit":"npm audit","build":"tsc -p tsconfig.build.json","prelint":"npm run check:node","pretest":"npm run check:node","lint:fix":"eslint \"src/**/*.ts\" --fix","prebuild":"npm run check:node","typecheck":"tsc -p tsconfig.json --noEmit","check:node":"node -e \"const major = Number.parseInt(process.versions.node.split('.')[0], 10); if (Number.isNaN(major) || major < 20) { console.error('Node.js >=20 is required. Current:', process.versions.node); process.exit(1); }\"","test:watch":"vitest","pretypecheck":"npm run check:node","test:coverage":"vitest run --coverage","test:mutation":"stryker run","prepublishOnly":"npm run build && npm test","example:aws-imds":"npm run example:aws-imds-ec2","example:aws-imds-ec2":"npm run build:example:aws-imds-ec2 && node ./examples/aws-imds-ec2/dist/index.mjs","example:azure-imds-vm":"npm run build:example:azure-imds-vm && node ./examples/azure-imds-vm/dist/index.mjs","test:mutation:changed":"node ./scripts/run-mutation-tests.mjs","build:example:aws-imds-ec2":"npm run build && esbuild ./examples/aws-imds-ec2/index.ts --bundle --platform=node --target=node20 --format=esm --main-fields=module,main --outfile=./examples/aws-imds-ec2/dist/index.mjs","build:example:azure-imds-vm":"npm run build && esbuild ./examples/azure-imds-vm/index.ts --bundle --platform=node --target=node20 --format=esm --main-fields=module,main --outfile=./examples/azure-imds-vm/dist/index.mjs","example:aws-role-lambda:zip":"npm run build:example:aws-role-lambda && cd ./examples/aws-role-lambda/dist && zip aws-role-lambda.zip index.mjs","build:example:aws-role-lambda":"npm run build && esbuild ./examples/aws-role-lambda/index.ts --bundle --platform=node --target=node20 --format=esm --main-fields=module,main --outfile=./examples/aws-role-lambda/dist/index.mjs","example:azure-function-entra-oidc:zip":"npm run build:example:azure-function-entra-oidc && cd ./examples/azure-function-entra-oidc/dist/deploy && zip -r ../azure-function-entra-oidc.zip .","build:example:azure-function-entra-oidc":"npm run build && rm -rf ./examples/azure-function-entra-oidc/dist/deploy && mkdir -p ./examples/azure-function-entra-oidc/dist/deploy/src/functions && esbuild ./examples/azure-function-entra-oidc/src/functions/aembitAzureEntraOidc.ts --bundle --platform=node --target=node20 --format=esm --main-fields=module,main --external:@azure/functions --outfile=./examples/azure-function-entra-oidc/dist/deploy/src/functions/aembitAzureEntraOidc.js && cp ./examples/azure-function-entra-oidc/host.json ./examples/azure-function-entra-oidc/dist/deploy/host.json && cp ./examples/azure-function-entra-oidc/package.deploy.json ./examples/azure-function-entra-oidc/dist/deploy/package.json && npm install --prefix ./examples/azure-function-entra-oidc/dist/deploy --omit=dev","build:example:gcp-identity-token-function":"npm run build && esbuild ./examples/gcp-identity-token-function/index.ts --bundle --platform=node --target=node20 --format=esm --main-fields=module,main --outfile=./examples/gcp-identity-token-function/dist/index.js && mkdir -p ./examples/gcp-identity-token-function/dist && cp ./examples/gcp-identity-token-function/package.deploy.json ./examples/gcp-identity-token-function/dist/package.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d4cbe194-f6cd-4144-9916-3e1f559d80d5"}},"overrides":{"qs":"^6.15.2"},"repository":{"url":"git+https://github.com/Aembit/edge-sdks.git","type":"git","directory":"ts"},"_npmVersion":"11.17.0","description":"TypeScript SDK for the Aembit Edge API","directories":{},"_nodeVersion":"24.19.0","dependencies":{"@smithy/hash-node":"^4.4.13","@smithy/signature-v4":"^5.6.9","@smithy/protocol-http":"^5.5.13","@aws-sdk/credential-provider-node":"^3.972.71"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.0.0","vitest":"^4.0.18","esbuild":"0.28.1","globals":"^17.4.0","@eslint/js":"^10.0.0","typescript":"^5.9.3","@types/node":"^24.0.0","typescript-eslint":"^8.57.0","@vitest/coverage-v8":"^4.0.18","@stryker-mutator/core":"^10.0.0","@stryker-mutator/vitest-runner":"^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/edge-sdk_1.34.0_1787865740011_0.7315429177823962","host":"s3://npm-registry-packages-npm-production"}},"1.34.1":{"name":"@aembit/edge-sdk","version":"1.34.1","description":"TypeScript SDK for the Aembit Edge API","license":"Apache-2.0","type":"module","repository":{"type":"git","url":"git+https://github.com/Aembit/edge-sdks.git","directory":"ts"},"homepage":"https://github.com/Aembit/edge-sdks/tree/main/ts#readme","bugs":{"url":"https://github.com/Aembit/edge-sdks/issues"},"publishConfig":{"access":"public","provenance":true},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./trust-providers/aws-metadata-service":{"types":"./dist/trust-providers/aws-metadata-service.d.ts","import":"./dist/trust-providers/aws-metadata-service.js"},"./trust-providers/aws-role":{"types":"./dist/trust-providers/aws-role.d.ts","import":"./dist/trust-providers/aws-role.js"},"./trust-providers/azure-metadata-service":{"types":"./dist/trust-providers/azure-metadata-service.d.ts","import":"./dist/trust-providers/azure-metadata-service.js"},"./trust-providers/gcp-identity-token":{"types":"./dist/trust-providers/gcp-identity-token.d.ts","import":"./dist/trust-providers/gcp-identity-token.js"},"./trust-providers/github-identity-token":{"types":"./dist/trust-providers/github-identity-token.d.ts","import":"./dist/trust-providers/github-identity-token.js"},"./trust-providers/gitlab-identity-token":{"types":"./dist/trust-providers/gitlab-identity-token.d.ts","import":"./dist/trust-providers/gitlab-identity-token.js"},"./trust-providers/k8s-service-account":{"types":"./dist/trust-providers/k8s-service-account.d.ts","import":"./dist/trust-providers/k8s-service-account.js"},"./trust-providers/oidc-id-token":{"types":"./dist/trust-providers/oidc-id-token.d.ts","import":"./dist/trust-providers/oidc-id-token.js"},"./trust-providers/terraform-cloud-identity-token":{"types":"./dist/trust-providers/terraform-cloud-identity-token.d.ts","import":"./dist/trust-providers/terraform-cloud-identity-token.js"}},"engines":{"node":">=20"},"scripts":{"check:node":"node -e \"const major = Number.parseInt(process.versions.node.split('.')[0], 10); if (Number.isNaN(major) || major < 20) { console.error('Node.js >=20 is required. Current:', process.versions.node); process.exit(1); }\"","prebuild":"npm run check:node","prelint":"npm run check:node","pretypecheck":"npm run check:node","pretest":"npm run check:node","prepublishOnly":"npm run build && npm test","build":"tsc -p tsconfig.build.json","audit":"npm audit","lint":"eslint \"src/**/*.ts\"","lint:fix":"eslint \"src/**/*.ts\" --fix","typecheck":"tsc -p tsconfig.json --noEmit","test":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest","test:mutation":"stryker run","test:mutation:changed":"node ./scripts/run-mutation-tests.mjs","build:example:aws-imds-ec2":"npm run build && esbuild ./examples/aws-imds-ec2/index.ts --bundle --platform=node --target=node20 --format=esm --main-fields=module,main --outfile=./examples/aws-imds-ec2/dist/index.mjs","example:aws-imds":"npm run example:aws-imds-ec2","example:aws-imds-ec2":"npm run build:example:aws-imds-ec2 && node ./examples/aws-imds-ec2/dist/index.mjs","build:example:aws-role-lambda":"npm run build && esbuild ./examples/aws-role-lambda/index.ts --bundle --platform=node --target=node20 --format=esm --main-fields=module,main --outfile=./examples/aws-role-lambda/dist/index.mjs","example:aws-role-lambda:zip":"npm run build:example:aws-role-lambda && cd ./examples/aws-role-lambda/dist && zip aws-role-lambda.zip index.mjs","build:example:azure-function-entra-oidc":"npm run build && rm -rf ./examples/azure-function-entra-oidc/dist/deploy && mkdir -p ./examples/azure-function-entra-oidc/dist/deploy/src/functions && esbuild ./examples/azure-function-entra-oidc/src/functions/aembitAzureEntraOidc.ts --bundle --platform=node --target=node20 --format=esm --main-fields=module,main --external:@azure/functions --outfile=./examples/azure-function-entra-oidc/dist/deploy/src/functions/aembitAzureEntraOidc.js && cp ./examples/azure-function-entra-oidc/host.json ./examples/azure-function-entra-oidc/dist/deploy/host.json && cp ./examples/azure-function-entra-oidc/package.deploy.json ./examples/azure-function-entra-oidc/dist/deploy/package.json && npm install --prefix ./examples/azure-function-entra-oidc/dist/deploy --omit=dev","example:azure-function-entra-oidc:zip":"npm run build:example:azure-function-entra-oidc && cd ./examples/azure-function-entra-oidc/dist/deploy && zip -r ../azure-function-entra-oidc.zip .","build:example:azure-imds-vm":"npm run build && esbuild ./examples/azure-imds-vm/index.ts --bundle --platform=node --target=node20 --format=esm --main-fields=module,main --outfile=./examples/azure-imds-vm/dist/index.mjs","example:azure-imds-vm":"npm run build:example:azure-imds-vm && node ./examples/azure-imds-vm/dist/index.mjs","build:example:gcp-identity-token-function":"npm run build && esbuild ./examples/gcp-identity-token-function/index.ts --bundle --platform=node --target=node20 --format=esm --main-fields=module,main --outfile=./examples/gcp-identity-token-function/dist/index.js && mkdir -p ./examples/gcp-identity-token-function/dist && cp ./examples/gcp-identity-token-function/package.deploy.json ./examples/gcp-identity-token-function/dist/package.json","build:example:gitlab-ci-oidc":"npm run build && esbuild ./examples/gitlab-ci-oidc/index.ts --bundle --platform=node --target=node20 --format=esm --main-fields=module,main --outfile=./examples/gitlab-ci-oidc/dist/index.mjs","example:gitlab-ci-oidc":"npm run build:example:gitlab-ci-oidc && node ./examples/gitlab-ci-oidc/dist/index.mjs","build:example:k8s-service-account":"npm run build && esbuild ./examples/k8s-service-account/index.ts --bundle --platform=node --target=node20 --format=esm --main-fields=module,main --outfile=./examples/k8s-service-account/dist/index.mjs","example:k8s-service-account":"npm run build:example:k8s-service-account && node ./examples/k8s-service-account/dist/index.mjs","build:example:terraform-cloud-oidc":"npm run build && esbuild ./examples/terraform-cloud-oidc/index.ts --bundle --platform=node --target=node20 --format=esm --main-fields=module,main --outfile=./examples/terraform-cloud-oidc/dist/index.mjs","example:terraform-cloud-oidc":"npm run build:example:terraform-cloud-oidc && node ./examples/terraform-cloud-oidc/dist/index.mjs"},"dependencies":{"@aws-sdk/credential-provider-node":"^3.972.71","@smithy/hash-node":"^4.4.13","@smithy/protocol-http":"^5.5.13","@smithy/signature-v4":"^5.6.9"},"devDependencies":{"@eslint/js":"^10.0.0","@stryker-mutator/core":"^10.0.0","@stryker-mutator/vitest-runner":"^10.0.0","@types/node":"^24.0.0","@vitest/coverage-v8":"^4.0.18","esbuild":"0.28.2","eslint":"^10.0.0","globals":"^17.4.0","typescript":"^5.9.3","typescript-eslint":"^8.57.0","vitest":"^4.0.18"},"overrides":{"qs":"^6.16.0"},"gitHead":"e88fe882565fda349d2e0176d2329197ddb05d1f","_id":"@aembit/edge-sdk@1.34.1","_nodeVersion":"24.20.0","_npmVersion":"11.19.0","dist":{"integrity":"sha512-Acf0Wa3p9NgB7g+/JauJuewhfojz6sk35bktUvLHkrZTsg4Ufie2sRz2L54eYWiMlwVt2j/X+Lg06eiTRGMDGw==","shasum":"004e81f427d2f50d4fec0df26593888741fb3d87","tarball":"https://registry.npmjs.org/@aembit/edge-sdk/-/edge-sdk-1.34.1.tgz","fileCount":183,"unpackedSize":248917,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aembit%2fedge-sdk@1.34.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICLb89kIDgSlwSZJap7vW1k/n9NnIpVviujEUF5XYaIrAiEAhARY815gphfH6LR5IXYUtxGsA0hyUDhNgeiBR6WQ2QQ="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d4cbe194-f6cd-4144-9916-3e1f559d80d5"}},"directories":{},"maintainers":[{"name":"quantifex","email":"david.walker@quantifex.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/edge-sdk_1.34.1_1788787919382_0.18335131045994757"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-24T21:10:27.922Z","modified":"2026-09-07T13:31:59.857Z","1.34.0-bootstrap.1":"2026-08-24T21:10:28.273Z","1.34.0-rc.4":"2026-08-24T23:23:16.284Z","1.34.0-rc.5":"2026-08-27T17:40:06.254Z","1.34.0":"2026-08-27T21:22:20.154Z","1.34.1":"2026-09-07T13:31:59.515Z"},"bugs":{"url":"https://github.com/Aembit/edge-sdks/issues"},"license":"Apache-2.0","homepage":"https://github.com/Aembit/edge-sdks/tree/main/ts#readme","repository":{"type":"git","url":"git+https://github.com/Aembit/edge-sdks.git","directory":"ts"},"description":"TypeScript SDK for the Aembit Edge API","maintainers":[{"name":"quantifex","email":"david.walker@quantifex.com"}],"readme":"# Aembit Edge TypeScript SDK\n\n[![npm version](https://img.shields.io/npm/v/@aembit/edge-sdk.svg)](https://www.npmjs.com/package/@aembit/edge-sdk)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/Aembit/edge-sdks/blob/main/LICENSE)\n[![Node.js Version](https://img.shields.io/badge/node-%3E%3D20-brightgreen.svg)](https://nodejs.org)\n\nOfficial TypeScript / JavaScript SDK for interacting with the [Aembit Edge API](https://docs.aembit.io/api-guide/edge/).\n\nThe Aembit Edge SDK enables workloads, serverless functions, AI agents, and MCP servers to authenticate and retrieve credentials dynamically without managing static secrets.\n\n## Features\n\n- 🔐 **Zero Hardcoded Secrets**: Authenticate via workload identity (AWS IMDSv2, AWS STS Role, GCP Identity Token, GitHub Actions OIDC, Generic OIDC).\n- 🔄 **Automatic Token Lifecycle**: Built-in in-memory bearer token caching and proactive background refresh.\n- ⚡ **Tree-Shakeable Subpath Imports**: Optimize bundle sizes by importing only the trust providers you need.\n- 🪵 **Structured Logging**: Pluggable `AembitLogger` interface compatible with Winston, Pino, or standard console.\n- 📦 **Modern ESM & TypeScript**: Strict type safety targeting Node.js `>=20`.\n\n## Installation\n\n```bash\nnpm install @aembit/edge-sdk\n```\n\n## Quickstart\n\n```typescript\nimport { EdgeClient, trustProviders } from \"@aembit/edge-sdk\"\n\n// 1. Initialize the client with your Aembit tenant and Trust Provider\nconst client = new EdgeClient({\n  baseUrl: \"https://tenant.aembit.io\",\n  clientId: \"your-edge-sdk-client-id\",\n  trustProvider: trustProviders.awsMetadataService(),\n})\n\n// 2. Retrieve credentials for your target server\nconst credential = await client.getCredential({\n  server: {\n    host: \"db.internal\",\n    port: 5432,\n  },\n})\n\nconsole.log(\"Retrieved credential data:\", credential.data)\n```\n\n## Supported Trust Providers\n\n| Trust Provider | Factory Method | Subpath Import |\n| :--- | :--- | :--- |\n| **AWS IMDSv2 (EC2)** | `trustProviders.awsMetadataService()` | `@aembit/edge-sdk/trust-providers/aws-metadata-service` |\n| **AWS IAM Role (Lambda/ECS)** | `trustProviders.awsRole({ region: \"us-east-1\" })` | `@aembit/edge-sdk/trust-providers/aws-role` |\n| **GCP Identity Token** | `trustProviders.gcpIdentityToken({ identityToken })` | `@aembit/edge-sdk/trust-providers/gcp-identity-token` |\n| **GitHub Actions OIDC** | `trustProviders.githubIdentityToken({ identityToken })` | `@aembit/edge-sdk/trust-providers/github-identity-token` |\n| **GitLab CI/CD OIDC** | `trustProviders.gitlabIdentityToken({ identityToken })` | `@aembit/edge-sdk/trust-providers/gitlab-identity-token` |\n| **Kubernetes Service Account** | `trustProviders.k8sServiceAccount({ serviceAccountToken })` | `@aembit/edge-sdk/trust-providers/k8s-service-account` |\n| **Terraform Cloud OIDC** | `trustProviders.terraformCloudIdentityToken({ identityToken })` | `@aembit/edge-sdk/trust-providers/terraform-cloud-identity-token` |\n| **Generic OIDC Token** | `trustProviders.oidcIdToken({ identityToken })` | `@aembit/edge-sdk/trust-providers/oidc-id-token` |\n\n### Provider Usage Examples\n\n#### AWS IAM Role (STS)\n\n```typescript\nimport { EdgeClient, trustProviders } from \"@aembit/edge-sdk\"\n\nconst client = new EdgeClient({\n  baseUrl: \"https://tenant.aembit.io\",\n  clientId: \"your-edge-sdk-client-id\",\n  trustProvider: trustProviders.awsRole({ region: \"us-east-1\" }),\n})\n```\n\n#### GitHub Actions / OIDC Identity Tokens\n\n```typescript\nimport { EdgeClient, trustProviders } from \"@aembit/edge-sdk\"\n\nconst client = new EdgeClient({\n  baseUrl: \"https://tenant.aembit.io\",\n  clientId: \"your-edge-sdk-client-id\",\n  trustProvider: trustProviders.githubIdentityToken({\n    identityToken: \"YOUR_GITHUB_OIDC_TOKEN\", // Or a dynamic resolver function: () => fetchOidcToken()\n  }),\n})\n```\n\n#### Google Cloud (GCP Identity Token)\n\n```typescript\nimport { EdgeClient, trustProviders } from \"@aembit/edge-sdk\"\n\nconst client = new EdgeClient({\n  baseUrl: \"https://tenant.aembit.io\",\n  clientId: \"your-edge-sdk-client-id\",\n  trustProvider: trustProviders.gcpIdentityToken({\n    identityToken: \"YOUR_GCP_ID_TOKEN\",\n  }),\n})\n```\n\n### Customizing Provider IDs (Multi-Identity & Observability)\n\nAll Trust Provider options accept an optional `id` parameter. This identifier is attached to structured logs (`trustProviderId`) and returned in `AuthSession` metadata when calling `client.authenticate()`.\n\nBy default, providers use standard identifiers (e.g., `\"gitlab-identity-token\"`, `\"terraform-cloud-identity-token\"`). You can customize `id` when:\n\n- Running multiple client workloads or pipeline stages in the same application.\n- Correlating authentication events with internal APM, Datadog, or OpenTelemetry service registries.\n\n```typescript\nconst trustProvider = trustProviders.terraformCloudIdentityToken({\n  id: \"tfc-prod-workspace\",\n  identityToken: process.env.TFC_WORKLOAD_IDENTITY_TOKEN!,\n})\n```\n\n### Optimizing Bundle Size (Subpath Imports)\n\nWhen bundling for serverless functions (AWS Lambda, Cloudflare Workers, Vercel) where bundle size is critical, import individual provider factories via subpaths:\n\n```typescript\nimport { EdgeClient } from \"@aembit/edge-sdk\"\nimport { createAwsRoleTrustProvider } from \"@aembit/edge-sdk/trust-providers/aws-role\"\n\nconst client = new EdgeClient({\n  baseUrl: \"https://tenant.aembit.io\",\n  clientId: \"your-edge-sdk-client-id\",\n  trustProvider: createAwsRoleTrustProvider({ region: \"us-east-1\" }),\n})\n```\n\n## Logging & Observability\n\nBy default, the SDK remains completely silent and outputs nothing to the console. To capture internal operational events (token caching, request lifecycles, and errors), supply an optional `logger` implementing `AembitLogger`:\n\n```typescript\nimport { EdgeClient, trustProviders, type AembitLogger } from \"@aembit/edge-sdk\"\n\n// Adapt any logger (e.g. Winston, Pino, or standard console)\nconst logger: AembitLogger = {\n  debug: (message, context) => console.debug(`[DEBUG] ${message}`, context ?? \"\"),\n  info: (message, context) => console.info(`[INFO] ${message}`, context ?? \"\"),\n  warn: (message, context) => console.warn(`[WARN] ${message}`, context ?? \"\"),\n  error: (message, context) => console.error(`[ERROR] ${message}`, context ?? \"\"),\n}\n\nconst client = new EdgeClient({\n  baseUrl: \"https://tenant.aembit.io\",\n  clientId: \"your-edge-sdk-client-id\",\n  trustProvider: trustProviders.awsMetadataService(),\n  logger,\n})\n```\n\n## Examples\n\nRunnable end-to-end examples are available in the GitHub repository:\n\n- [AWS EC2 + IMDSv2](https://github.com/Aembit/edge-sdks/tree/main/ts/examples/aws-imds-ec2)\n- [AWS Lambda + IAM Role](https://github.com/Aembit/edge-sdks/tree/main/ts/examples/aws-role-lambda)\n- [Azure Functions + Entra ID OIDC](https://github.com/Aembit/edge-sdks/tree/main/ts/examples/azure-function-entra-oidc)\n- [GitLab CI + OIDC](https://github.com/Aembit/edge-sdks/tree/main/ts/examples/gitlab-ci-oidc)\n- [Google Cloud Functions + GCP Identity Token](https://github.com/Aembit/edge-sdks/tree/main/ts/examples/gcp-identity-token-function)\n- [Kubernetes Service Account](https://github.com/Aembit/edge-sdks/tree/main/ts/examples/k8s-service-account)\n- [Terraform Cloud + OIDC](https://github.com/Aembit/edge-sdks/tree/main/ts/examples/terraform-cloud-oidc)\n- [Vercel Functions + OIDC](https://github.com/Aembit/edge-sdks/tree/main/ts/examples/oidc-vercel-function)\n- [Winston & Pino Logging Integration](https://github.com/Aembit/edge-sdks/tree/main/ts/examples/logging_integration)\n\n## Documentation & Resources\n\n- [Official Aembit Edge API Guide](https://docs.aembit.io/api-guide/edge/)\n- [Aembit Documentation](https://docs.aembit.io/)\n- [GitHub Issue Tracker](https://github.com/Aembit/edge-sdks/issues)\n- [Contributing Guide](https://github.com/Aembit/edge-sdks/blob/main/CONTRIBUTING.md)\n\n## License\n\nThis project is licensed under the [Apache-2.0 License](https://github.com/Aembit/edge-sdks/blob/main/LICENSE).\n","readmeFilename":"README.md"}