Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Release Doctor
on:
pull_request:
branches:
- main
workflow_dispatch:

jobs:
release_doctor:
name: release doctor
runs-on: ubuntu-latest
if: github.repository == 'manifoldfinance/eigenlayer-sdk' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v4

- name: Check release environment
run: |
bash ./bin/check-release-environment
env:
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.1.0-alpha.1"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 4
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/manifoldfinance%2Fxga-5d56b621645389b915657c985292a05694f92bf326f0036aa99b050902b072ae.yml
openapi_spec_hash: 2e75be3f4f1a12d39a5fc2a310b3a9b6
config_hash: eb2a0324ac42dc1b6d6bdaec995e495a
config_hash: 1f53deea41ae0feae15df90c877ab337
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Changelog

## 0.1.0-alpha.1 (2025-09-20)

Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.1](https://github.com/manifoldfinance/eigenlayer-sdk/compare/v0.0.1-alpha.0...v0.1.0-alpha.1)

### Features

* **api:** update via SDK Studio ([26c3d82](https://github.com/manifoldfinance/eigenlayer-sdk/commit/26c3d8266ef6e645099df28f723d829c4f7940f0))
* **mcp:** add code execution tool ([1b6ba04](https://github.com/manifoldfinance/eigenlayer-sdk/commit/1b6ba043eb673e1d2f1ee665896ca4d1a06dfdf9))


### Bug Fixes

* coerce nullable values to undefined ([e00e94b](https://github.com/manifoldfinance/eigenlayer-sdk/commit/e00e94b0c25a76ce4dbfb6adc051301d40846f3d))


### Chores

* add docs to RequestOptions type ([eafd56e](https://github.com/manifoldfinance/eigenlayer-sdk/commit/eafd56ee41b79b09f916a96a6a582fdb6397fe21))
* add package to package.json ([635cdc8](https://github.com/manifoldfinance/eigenlayer-sdk/commit/635cdc879c03714f09fe94cdaf050fe6833a63aa))
* ci build action ([7c89f7c](https://github.com/manifoldfinance/eigenlayer-sdk/commit/7c89f7cd0d243b706bfd027e5dad799a09f82925))
* **client:** improve path param validation ([24d7cff](https://github.com/manifoldfinance/eigenlayer-sdk/commit/24d7cffe67442bfeb4bdefa7991ae4972ed0af1b))
* **client:** qualify global Blob ([e1df1fa](https://github.com/manifoldfinance/eigenlayer-sdk/commit/e1df1fafad1ea9c549c2ded26f5b02f704628cd7))
* **deps:** update dependency @types/node to v20.17.58 ([95fd02a](https://github.com/manifoldfinance/eigenlayer-sdk/commit/95fd02af4e01c77036383c3033971599cb9e9a31))
* do not install brew dependencies in ./scripts/bootstrap by default ([1527389](https://github.com/manifoldfinance/eigenlayer-sdk/commit/1527389669ebe8a50a0d90ad995b66e1886361bc))
* **internal:** codegen related update ([83a49c6](https://github.com/manifoldfinance/eigenlayer-sdk/commit/83a49c6ada2a9bb3c600a568d463a0ab818f3e74))
* **internal:** formatting change ([ac3880c](https://github.com/manifoldfinance/eigenlayer-sdk/commit/ac3880cc7bedcf44ed596932e2eb840eca43b9cd))
* **internal:** move publish config ([909a153](https://github.com/manifoldfinance/eigenlayer-sdk/commit/909a1533e474bf584730433594ab0d9e2790c126))
* **internal:** remove redundant imports config ([5362aca](https://github.com/manifoldfinance/eigenlayer-sdk/commit/5362aca9a8e3a6556e9c790b5befe6984c7894a0))
* **internal:** update comment in script ([3fca436](https://github.com/manifoldfinance/eigenlayer-sdk/commit/3fca436b0015b0c35c19a00638ade60e063875eb))
* **internal:** update global Error reference ([03c1098](https://github.com/manifoldfinance/eigenlayer-sdk/commit/03c109820d445f42f3fa5e4ea078f881893f277a))
* make some internal functions async ([77342ba](https://github.com/manifoldfinance/eigenlayer-sdk/commit/77342badad4e8cf374952de5f94e740b4b6ec599))
* **ts:** reorder package.json imports ([5352d03](https://github.com/manifoldfinance/eigenlayer-sdk/commit/5352d03bcdee5cb4d184d33b9b3b22e88ce63783))
* update @stainless-api/prism-cli to v5.15.0 ([a247835](https://github.com/manifoldfinance/eigenlayer-sdk/commit/a247835faf20789942f59a39b24342cca1a0b4c9))
* update CI script ([a6a6025](https://github.com/manifoldfinance/eigenlayer-sdk/commit/a6a6025a2913d52a0fe8cea04a9da3ab0e08d281))
* update SDK settings ([bff60dc](https://github.com/manifoldfinance/eigenlayer-sdk/commit/bff60dcae0aaef23b45aede171cdd5f777b203c2))
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ If you’d like to use the repository from source, you can either install from g
To install via git:

```sh
$ npm install git+ssh://git@github.com:stainless-sdks/xga-typescript.git
$ npm install git+ssh://git@github.com:manifoldfinance/eigenlayer-sdk.git
```

Alternatively, to link a local copy of the repo:

```sh
# Clone
$ git clone https://www.github.com/stainless-sdks/xga-typescript
$ cd xga-typescript
$ git clone https://www.github.com/manifoldfinance/eigenlayer-sdk
$ cd eigenlayer-sdk

# With yarn
$ yarn link
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ It is generated with [Stainless](https://www.stainless.com/).
## Installation

```sh
npm install git+ssh://git@github.com:stainless-sdks/xga-typescript.git
npm install git+ssh://git@github.com:manifoldfinance/eigenlayer-sdk.git
```

> [!NOTE]
Expand Down Expand Up @@ -335,7 +335,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/xga-typescript/issues) with questions, bugs, or suggestions.
We are keen for your feedback; please open an [issue](https://www.github.com/manifoldfinance/eigenlayer-sdk/issues) with questions, bugs, or suggestions.

## Requirements

Expand Down
18 changes: 18 additions & 0 deletions bin/check-release-environment
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

errors=()

lenErrors=${#errors[@]}

if [[ lenErrors -gt 0 ]]; then
echo -e "Found the following errors in the release environment:\n"

for error in "${errors[@]}"; do
echo -e "- $error\n"
done

exit 1
fi

echo "The environment is ready to push releases!"

2 changes: 1 addition & 1 deletion bin/publish-npm
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ else
fi

# Publish with the appropriate tag
yarn publish --access public --tag "$TAG"
yarn publish --tag "$TAG"
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
{
"name": "xga",
"version": "0.0.1-alpha.0",
"version": "0.1.0-alpha.1",
"description": "The official TypeScript library for the Xga API",
"author": "Xga <info@eigenlayer.xyz>",
"types": "dist/index.d.ts",
"main": "dist/index.js",
"type": "commonjs",
"repository": "github:stainless-sdks/xga-typescript",
"repository": "github:manifoldfinance/eigenlayer-sdk",
"license": "MIT",
"packageManager": "yarn@1.22.22",
"files": [
"**/*"
],
"private": false,
"publishConfig": {
"access": "public"
},
"scripts": {
"test": "./scripts/test",
"build": "./scripts/build",
Expand Down Expand Up @@ -41,15 +44,12 @@
"publint": "^0.2.12",
"ts-jest": "^29.1.0",
"ts-node": "^10.5.0",
"tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz",
"tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz",
"tsconfig-paths": "^4.0.0",
"tslib": "^2.8.1",
"typescript": "5.8.3",
"typescript-eslint": "8.31.1"
},
"imports": {
"xga": ".",
"xga/*": "./src/*"
},
"exports": {
".": {
"import": "./dist/index.mjs",
Expand Down
64 changes: 64 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"packages": {
".": {}
},
"$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json",
"include-v-in-tag": true,
"include-component-in-tag": false,
"versioning": "prerelease",
"prerelease": true,
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": false,
"pull-request-header": "Automated Release PR",
"pull-request-title-pattern": "release: ${version}",
"changelog-sections": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "perf",
"section": "Performance Improvements"
},
{
"type": "revert",
"section": "Reverts"
},
{
"type": "chore",
"section": "Chores"
},
{
"type": "docs",
"section": "Documentation"
},
{
"type": "style",
"section": "Styles"
},
{
"type": "refactor",
"section": "Refactors"
},
{
"type": "test",
"section": "Tests",
"hidden": true
},
{
"type": "build",
"section": "Build System"
},
{
"type": "ci",
"section": "Continuous Integration",
"hidden": true
}
],
"release-type": "node",
"extra-files": ["src/version.ts", "README.md"]
}
16 changes: 12 additions & 4 deletions scripts/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,23 @@ set -e

cd "$(dirname "$0")/.."

if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ]; then
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then
brew bundle check >/dev/null 2>&1 || {
echo "==> Installing Homebrew dependencies…"
brew bundle
echo -n "==> Install Homebrew dependencies? (y/N): "
read -r response
case "$response" in
[yY][eE][sS]|[yY])
brew bundle
;;
*)
;;
esac
echo
}
fi

echo "==> Installing Node dependencies…"

PACKAGE_MANAGER=$(command -v yarn >/dev/null 2>&1 && echo "yarn" || echo "npm")

$PACKAGE_MANAGER install
$PACKAGE_MANAGER install "$@"
4 changes: 2 additions & 2 deletions scripts/mock
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}"

# Run prism mock on the given spec
if [ "$1" == "--daemon" ]; then
npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" &> .prism.log &
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &

# Wait for server to come online
echo -n "Waiting for server"
Expand All @@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then

echo
else
npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL"
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL"
fi
2 changes: 1 addition & 1 deletion scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ elif ! prism_is_running ; then
echo -e "To run the server, pass in the path or url of your OpenAPI"
echo -e "spec to the prism command:"
echo
echo -e " \$ ${YELLOW}npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock path/to/your.openapi.yml${NC}"
echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}"
echo

exit 1
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils/upload-artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if [[ "$SIGNED_URL" == "null" ]]; then
exit 1
fi

UPLOAD_RESPONSE=$(tar -cz dist | curl -v -X PUT \
UPLOAD_RESPONSE=$(tar "${BASE_PATH:+-C$BASE_PATH}" -cz "${ARTIFACT_PATH:-dist}" | curl -v -X PUT \
-H "Content-Type: application/gzip" \
--data-binary @- "$SIGNED_URL" 2>&1)

Expand Down
6 changes: 4 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ export class Xga {
const response = await this.fetchWithTimeout(url, req, timeout, controller).catch(castToError);
const headersTime = Date.now();

if (response instanceof Error) {
if (response instanceof globalThis.Error) {
const retryMessage = `retrying, ${retriesRemaining} attempts remaining`;
if (options.signal?.aborted) {
throw new Errors.APIUserAbortError();
Expand Down Expand Up @@ -682,7 +682,7 @@ export class Xga {
// Preserve legacy string encoding behavior for now
headers.values.has('content-type')) ||
// `Blob` is superset of `File`
body instanceof Blob ||
((globalThis as any).Blob && body instanceof (globalThis as any).Blob) ||
// `FormData` -> `multipart/form-data`
body instanceof FormData ||
// `URLSearchParams` -> `application/x-www-form-urlencoded`
Expand Down Expand Up @@ -724,8 +724,10 @@ export class Xga {
rewards: API.Rewards = new API.Rewards(this);
health: API.Health = new API.Health(this);
}

Xga.Rewards = Rewards;
Xga.Health = Health;

export declare namespace Xga {
export type RequestOptions = Opts.RequestOptions;

Expand Down
6 changes: 3 additions & 3 deletions src/internal/utils/values.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,21 @@ export const coerceBoolean = (value: unknown): boolean => {
};

export const maybeCoerceInteger = (value: unknown): number | undefined => {
if (value === undefined) {
if (value == null) {
return undefined;
}
return coerceInteger(value);
};

export const maybeCoerceFloat = (value: unknown): number | undefined => {
if (value === undefined) {
if (value == null) {
return undefined;
}
return coerceFloat(value);
};

export const maybeCoerceBoolean = (value: unknown): boolean | undefined => {
if (value === undefined) {
if (value == null) {
return undefined;
}
return coerceBoolean(value);
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.0.1-alpha.0';
export const VERSION = '0.1.0-alpha.1'; // x-release-please-version
2 changes: 1 addition & 1 deletion tests/api-resources/health.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const client = new Xga({
});

describe('resource health', () => {
// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('check', async () => {
const responsePromise = client.health.check();
const rawResponse = await responsePromise.asResponse();
Expand Down
4 changes: 2 additions & 2 deletions tests/api-resources/rewards/v1/earners.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const client = new Xga({
});

describe('resource earners', () => {
// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('getSummarizedRewards', async () => {
const responsePromise = client.rewards.v1.earners.getSummarizedRewards('earner_address');
const rawResponse = await responsePromise.asResponse();
Expand All @@ -20,7 +20,7 @@ describe('resource earners', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('getSummarizedRewards: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
Expand Down
Loading