Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 0.26.0 #243

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
922248c
feat(api): OpenAPI spec update via Stainless API (#242)
stainless-app[bot] Sep 4, 2024
1785ebf
fix(client): correct File construction from node-fetch Responses (#244)
stainless-app[bot] Sep 4, 2024
667c725
codegen metadata
stainless-bot Sep 4, 2024
e5bae2f
feat(api): OpenAPI spec update via Stainless API (#245)
stainless-app[bot] Sep 4, 2024
98816a0
feat(api): OpenAPI spec update via Stainless API (#246)
stainless-app[bot] Sep 5, 2024
7778143
chore(internal): dependency updates (#247)
stainless-app[bot] Sep 5, 2024
ef4bc31
fix file permissions
Sep 6, 2024
2aab321
feat(api): OpenAPI spec update via Stainless API (#248)
stainless-app[bot] Sep 10, 2024
8d73c25
fix(uploads): avoid making redundant memory copies (#251)
stainless-app[bot] Sep 10, 2024
bc00dce
chore(internal): codegen related update (#252)
stainless-app[bot] Sep 10, 2024
b56587a
chore(internal): codegen related update (#253)
stainless-app[bot] Sep 10, 2024
f785f53
fix(errors): pass message through to APIConnectionError (#254)
stainless-app[bot] Sep 10, 2024
f1e5a10
chore: better object fallback behaviour for casting errors (#255)
stainless-app[bot] Sep 10, 2024
2fa0c63
feat(api): OpenAPI spec update via Stainless API (#256)
stainless-app[bot] Sep 12, 2024
5f37e23
chore(internal): codegen related update (#257)
stainless-app[bot] Sep 12, 2024
d7c64c3
chore(internal): codegen related update (#258)
stainless-app[bot] Sep 12, 2024
e5904f0
fix(errors): pass message through to APIConnectionError (#259)
stainless-app[bot] Sep 12, 2024
0b79ea3
chore: better object fallback behaviour for casting errors (#260)
stainless-app[bot] Sep 12, 2024
b5ed130
feat(api): OpenAPI spec update via Stainless API (#261)
stainless-app[bot] Sep 12, 2024
b237a7a
release: 0.26.0
stainless-app[bot] Sep 12, 2024
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
Empty file modified .devcontainer/Dockerfile
100755 → 100644
Empty file.
Empty file modified .devcontainer/devcontainer.json
100755 → 100644
Empty file.
Empty file modified .eslintrc.js
100755 → 100644
Empty file.
Empty file modified .github/workflows/ci.yml
100755 → 100644
Empty file.
Empty file modified .github/workflows/publish-npm.yml
100755 → 100644
Empty file.
Empty file modified .github/workflows/release-doctor.yml
100755 → 100644
Empty file.
Empty file modified .gitignore
100755 → 100644
Empty file.
Empty file modified .prettierignore
100755 → 100644
Empty file.
Empty file modified .prettierrc.json
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.25.0"
".": "0.26.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 19
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/new%2Fblockaid-589a4d2cf4a075a6f8798c67792c098d3aaa7d5b95164464d0e69a1be50414c2.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/new%2Fblockaid-71b132e4cfaa16a7800dcf1c024f0de69e48469d725dddda07a900b505c7e32a.yml
Empty file modified Brewfile
100755 → 100644
Empty file.
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Changelog

## 0.26.0 (2024-09-12)

Full Changelog: [v0.25.0...v0.26.0](https://github.com/blockaid-official/blockaid-client-node/compare/v0.25.0...v0.26.0)

### Features

* **api:** OpenAPI spec update via Stainless API ([#242](https://github.com/blockaid-official/blockaid-client-node/issues/242)) ([922248c](https://github.com/blockaid-official/blockaid-client-node/commit/922248c64c1b31fb4bf837190593c721cf05721a))
* **api:** OpenAPI spec update via Stainless API ([#245](https://github.com/blockaid-official/blockaid-client-node/issues/245)) ([e5bae2f](https://github.com/blockaid-official/blockaid-client-node/commit/e5bae2fae7305769e6cec349b915d6576bf84f1e))
* **api:** OpenAPI spec update via Stainless API ([#246](https://github.com/blockaid-official/blockaid-client-node/issues/246)) ([98816a0](https://github.com/blockaid-official/blockaid-client-node/commit/98816a042c0fb8ccc8ff0bbfc74a73a82b62818e))
* **api:** OpenAPI spec update via Stainless API ([#248](https://github.com/blockaid-official/blockaid-client-node/issues/248)) ([2aab321](https://github.com/blockaid-official/blockaid-client-node/commit/2aab321c9275131140fd83846b8c1bf8c3dc660a))
* **api:** OpenAPI spec update via Stainless API ([#256](https://github.com/blockaid-official/blockaid-client-node/issues/256)) ([2fa0c63](https://github.com/blockaid-official/blockaid-client-node/commit/2fa0c63ab516fa73316c552d10424ee70db942aa))
* **api:** OpenAPI spec update via Stainless API ([#261](https://github.com/blockaid-official/blockaid-client-node/issues/261)) ([b5ed130](https://github.com/blockaid-official/blockaid-client-node/commit/b5ed130827b2a08e37d233185a19529fa4375042))


### Bug Fixes

* **client:** correct File construction from node-fetch Responses ([#244](https://github.com/blockaid-official/blockaid-client-node/issues/244)) ([1785ebf](https://github.com/blockaid-official/blockaid-client-node/commit/1785ebf0c192172db1f77ae61c7746c4d68376f5))
* **errors:** pass message through to APIConnectionError ([#254](https://github.com/blockaid-official/blockaid-client-node/issues/254)) ([f785f53](https://github.com/blockaid-official/blockaid-client-node/commit/f785f5394a5917db0822bbcd43454eb2eefe3ec2))
* **errors:** pass message through to APIConnectionError ([#259](https://github.com/blockaid-official/blockaid-client-node/issues/259)) ([e5904f0](https://github.com/blockaid-official/blockaid-client-node/commit/e5904f098f9a5c82348d3db680e6136dac31e4c7))
* **uploads:** avoid making redundant memory copies ([#251](https://github.com/blockaid-official/blockaid-client-node/issues/251)) ([8d73c25](https://github.com/blockaid-official/blockaid-client-node/commit/8d73c25281042ecc087f3f845ff29f9296ab2eec))


### Chores

* better object fallback behaviour for casting errors ([#255](https://github.com/blockaid-official/blockaid-client-node/issues/255)) ([f1e5a10](https://github.com/blockaid-official/blockaid-client-node/commit/f1e5a10672acf16bd2f4580c1a945e07655895b2))
* better object fallback behaviour for casting errors ([#260](https://github.com/blockaid-official/blockaid-client-node/issues/260)) ([0b79ea3](https://github.com/blockaid-official/blockaid-client-node/commit/0b79ea32a1ff0fb6587131b817bc1ee137ecd34f))
* **internal:** codegen related update ([#252](https://github.com/blockaid-official/blockaid-client-node/issues/252)) ([bc00dce](https://github.com/blockaid-official/blockaid-client-node/commit/bc00dced8522b301e37523812f7783de262ee931))
* **internal:** codegen related update ([#253](https://github.com/blockaid-official/blockaid-client-node/issues/253)) ([b56587a](https://github.com/blockaid-official/blockaid-client-node/commit/b56587a1ab78278e37ea00070e81a734f53b97a6))
* **internal:** codegen related update ([#257](https://github.com/blockaid-official/blockaid-client-node/issues/257)) ([5f37e23](https://github.com/blockaid-official/blockaid-client-node/commit/5f37e2307816bb164e5cea7f224ff26e011d4450))
* **internal:** codegen related update ([#258](https://github.com/blockaid-official/blockaid-client-node/issues/258)) ([d7c64c3](https://github.com/blockaid-official/blockaid-client-node/commit/d7c64c33362d42a352fd4cc4b7b64be0ab8c7e11))
* **internal:** dependency updates ([#247](https://github.com/blockaid-official/blockaid-client-node/issues/247)) ([7778143](https://github.com/blockaid-official/blockaid-client-node/commit/7778143ec32ad729237c022271b0b43993f8e94e))

## 0.25.0 (2024-09-01)

Full Changelog: [v0.24.0...v0.25.0](https://github.com/blockaid-official/blockaid-client-node/compare/v0.24.0...v0.25.0)
Expand Down
Empty file modified CONTRIBUTING.md
100755 → 100644
Empty file.
Empty file modified LICENSE
100755 → 100644
Empty file.
Empty file modified README.md
100755 → 100644
Empty file.
Empty file modified SECURITY.md
100755 → 100644
Empty file.
5 changes: 1 addition & 4 deletions api.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ Types:
- <code><a href="./src/resources/solana/solana.ts">TotalUsdDiffSchema</a></code>
- <code><a href="./src/resources/solana/solana.ts">TransactionErrorDetails</a></code>
- <code><a href="./src/resources/solana/solana.ts">TxScanRequestSchema</a></code>
- <code><a href="./src/resources/solana/solana.ts">ValidationFeature</a></code>

## Message

Expand Down Expand Up @@ -173,13 +174,9 @@ Methods:

Types:

- <code><a href="./src/resources/starknet/starknet.ts">StarknetErc1155Details</a></code>
- <code><a href="./src/resources/starknet/starknet.ts">StarknetErc1155Diff</a></code>
- <code><a href="./src/resources/starknet/starknet.ts">StarknetErc20Details</a></code>
- <code><a href="./src/resources/starknet/starknet.ts">StarknetErc20Diff</a></code>
- <code><a href="./src/resources/starknet/starknet.ts">StarknetErc721Details</a></code>
- <code><a href="./src/resources/starknet/starknet.ts">StarknetErc721Diff</a></code>
- <code><a href="./src/resources/starknet/starknet.ts">StarknetNativeDiff</a></code>

## Transaction

Expand Down
Empty file modified bin/check-release-environment
100755 → 100644
Empty file.
Empty file modified bin/publish-npm
100755 → 100644
Empty file.
Empty file modified examples/.keep
100755 → 100644
Empty file.
Empty file modified jest.config.ts
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion package.json
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@blockaid/client",
"version": "0.25.0",
"version": "0.26.0",
"description": "The official TypeScript library for the Blockaid API",
"author": "Blockaid <feedback@blockaid.io>",
"types": "dist/index.d.ts",
Expand Down
Empty file modified release-please-config.json
100755 → 100644
Empty file.
Empty file modified scripts/utils/check-version.cjs
100755 → 100644
Empty file.
Empty file modified scripts/utils/fix-index-exports.cjs
100755 → 100644
Empty file.
Empty file modified scripts/utils/make-dist-package-json.cjs
100755 → 100644
Empty file.
Empty file modified scripts/utils/postprocess-files.cjs
100755 → 100644
Empty file.
Empty file modified src/_shims/MultipartBody.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/README.md
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/runtime-bun.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/runtime-deno.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/runtime-node.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/runtime.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/types-deno.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/types-node.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/types.d.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/types.js
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/types.mjs
100755 → 100644
Empty file.
Empty file modified src/_shims/bun-runtime.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/index-deno.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/index.d.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/index.js
100755 → 100644
Empty file.
Empty file modified src/_shims/index.mjs
100755 → 100644
Empty file.
Empty file modified src/_shims/manual-types.d.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/manual-types.js
100755 → 100644
Empty file.
Empty file modified src/_shims/manual-types.mjs
100755 → 100644
Empty file.
Empty file modified src/_shims/node-runtime.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/node-types.d.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/node-types.js
100755 → 100644
Empty file.
Empty file modified src/_shims/node-types.mjs
100755 → 100644
Empty file.
Empty file modified src/_shims/registry.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/web-runtime.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/web-types.d.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/web-types.js
100755 → 100644
Empty file.
Empty file modified src/_shims/web-types.mjs
100755 → 100644
Empty file.
5 changes: 5 additions & 0 deletions src/core.ts
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,11 @@ const validatePositiveInteger = (name: string, n: unknown): number => {

export const castToError = (err: any): Error => {
if (err instanceof Error) return err;
if (typeof err === 'object' && err !== null) {
try {
return new Error(JSON.stringify(err));
} catch {}
}
return new Error(err);
};

Expand Down
4 changes: 2 additions & 2 deletions src/error.ts
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class APIError extends BlockaidError {
headers: Headers | undefined,
) {
if (!status) {
return new APIConnectionError({ cause: castToError(errorResponse) });
return new APIConnectionError({ message, cause: castToError(errorResponse) });
}

const error = errorResponse as Record<string, any>;
Expand Down Expand Up @@ -101,7 +101,7 @@ export class APIUserAbortError extends APIError {
export class APIConnectionError extends APIError {
override readonly status: undefined = undefined;

constructor({ message, cause }: { message?: string; cause?: Error | undefined }) {
constructor({ message, cause }: { message?: string | undefined; cause?: Error | undefined }) {
super(undefined, undefined, message || 'Connection error.', undefined);
// in some environments the 'cause' property is already declared
// @ts-ignore
Expand Down
5 changes: 1 addition & 4 deletions src/index.ts
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ export namespace Blockaid {
export import TotalUsdDiffSchema = API.TotalUsdDiffSchema;
export import TransactionErrorDetails = API.TransactionErrorDetails;
export import TxScanRequestSchema = API.TxScanRequestSchema;
export import ValidationFeature = API.ValidationFeature;

export import Stellar = API.Stellar;
export import StellarAssetContractDetailsSchema = API.StellarAssetContractDetailsSchema;
Expand All @@ -334,13 +335,9 @@ export namespace Blockaid {
export import Bitcoin = API.Bitcoin;

export import Starknet = API.Starknet;
export import StarknetErc1155Details = API.StarknetErc1155Details;
export import StarknetErc1155Diff = API.StarknetErc1155Diff;
export import StarknetErc20Details = API.StarknetErc20Details;
export import StarknetErc20Diff = API.StarknetErc20Diff;
export import StarknetErc721Details = API.StarknetErc721Details;
export import StarknetErc721Diff = API.StarknetErc721Diff;
export import StarknetNativeDiff = API.StarknetNativeDiff;

export import Site = API.Site;
export import SiteScanHitResponse = API.SiteScanHitResponse;
Expand Down
Empty file modified src/lib/.keep
100755 → 100644
Empty file.
Empty file modified src/resource.ts
100755 → 100644
Empty file.
Empty file modified src/resources/bitcoin/bitcoin.ts
100755 → 100644
Empty file.
Empty file modified src/resources/bitcoin/index.ts
100755 → 100644
Empty file.
Empty file modified src/resources/bitcoin/transaction.ts
100755 → 100644
Empty file.
6 changes: 4 additions & 2 deletions src/resources/evm/evm.ts
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export interface Erc20Exposure {
* the amount that was asked in the approval request for this spender from the
* current address and asset
*/
approval: number;
approval: string;

exposure: Array<Erc20Diff>;

Expand Down Expand Up @@ -526,7 +526,8 @@ export type TokenScanSupportedChain =
| 'blast'
| 'zksync'
| 'scroll'
| 'degen';
| 'degen'
| 'bitcoin';

export interface TransactionScanFeature {
/**
Expand Down Expand Up @@ -634,6 +635,7 @@ export type TransactionScanSupportedChain =
| 'degen'
| 'avalanche-fuji'
| 'immutable-zkevm'
| 'immutable-zkevm-testnet'
| 'gnosis'
| 'worldchain';

Expand Down
Empty file modified src/resources/evm/index.ts
100755 → 100644
Empty file.
Empty file modified src/resources/evm/json-rpc.ts
100755 → 100644
Empty file.
Empty file modified src/resources/evm/post-transaction-bulk.ts
100755 → 100644
Empty file.
Empty file modified src/resources/evm/post-transaction.ts
100755 → 100644
Empty file.
Empty file modified src/resources/evm/transaction-bulk.ts
100755 → 100644
Empty file.
Empty file modified src/resources/evm/transaction-raw.ts
100755 → 100644
Empty file.
Empty file modified src/resources/evm/transaction.ts
100755 → 100644
Empty file.
Empty file modified src/resources/evm/user-operation.ts
100755 → 100644
Empty file.
12 changes: 2 additions & 10 deletions src/resources/index.ts
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export {
TotalUsdDiffSchema,
TransactionErrorDetails,
TxScanRequestSchema,
ValidationFeature,
Solana,
} from './solana/solana';
export {
Expand Down Expand Up @@ -80,16 +81,7 @@ export {
SiteScanParams,
Site,
} from './site';
export {
StarknetErc1155Details,
StarknetErc1155Diff,
StarknetErc20Details,
StarknetErc20Diff,
StarknetErc721Details,
StarknetErc721Diff,
StarknetNativeDiff,
Starknet,
} from './starknet/starknet';
export { StarknetErc1155Diff, StarknetErc20Diff, StarknetErc721Diff, Starknet } from './starknet/starknet';
export {
StellarAssetContractDetailsSchema,
StellarAssetTransferDetailsSchema,
Expand Down
Empty file modified src/resources/site.ts
100755 → 100644
Empty file.
Empty file modified src/resources/solana/address.ts
100755 → 100644
Empty file.
1 change: 1 addition & 0 deletions src/resources/solana/index.ts
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export {
TotalUsdDiffSchema,
TransactionErrorDetails,
TxScanRequestSchema,
ValidationFeature,
Solana,
} from './solana';
export { AddressScanParams, Address } from './address';
Expand Down
Empty file modified src/resources/solana/message.ts
100755 → 100644
Empty file.
29 changes: 29 additions & 0 deletions src/resources/solana/solana.ts
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ export namespace CombinedValidationResult {
* Transaction validation result
*/
export interface Validation {
/**
* A list of features explaining what is happening in the transaction in different
* levels of severity
*/
extended_features: Array<SolanaAPI.ValidationFeature>;

/**
* A list of features about this transaction explaining the validation
*/
Expand Down Expand Up @@ -742,6 +748,28 @@ export namespace TxScanRequestSchema {
}
}

export interface ValidationFeature {
/**
* Textual description
*/
description: string;

/**
* Feature name
*/
feature_id: string;

/**
* An enumeration.
*/
type: 'Info' | 'Benign' | 'Warning' | 'Malicious';

/**
* Address the feature refers to
*/
address?: string | null;
}

export namespace Solana {
export import AccountSummarySchema = SolanaAPI.AccountSummarySchema;
export import AddressScanRequestSchema = SolanaAPI.AddressScanRequestSchema;
Expand Down Expand Up @@ -775,6 +803,7 @@ export namespace Solana {
export import TotalUsdDiffSchema = SolanaAPI.TotalUsdDiffSchema;
export import TransactionErrorDetails = SolanaAPI.TransactionErrorDetails;
export import TxScanRequestSchema = SolanaAPI.TxScanRequestSchema;
export import ValidationFeature = SolanaAPI.ValidationFeature;
export import Message = MessageAPI.Message;
export import MessageScanParams = MessageAPI.MessageScanParams;
export import Address = AddressAPI.Address;
Expand Down
11 changes: 1 addition & 10 deletions src/resources/starknet/index.ts
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export {
StarknetErc1155Details,
StarknetErc1155Diff,
StarknetErc20Details,
StarknetErc20Diff,
StarknetErc721Details,
StarknetErc721Diff,
StarknetNativeDiff,
Starknet,
} from './starknet';
export { StarknetErc1155Diff, StarknetErc20Diff, StarknetErc721Diff, Starknet } from './starknet';
export { TransactionScanResponse, TransactionScanParams, Transaction } from './transaction';
Loading
Loading