diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
old mode 100755
new mode 100644
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
old mode 100755
new mode 100644
diff --git a/.eslintrc.js b/.eslintrc.js
old mode 100755
new mode 100644
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
old mode 100755
new mode 100644
diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml
old mode 100755
new mode 100644
diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml
old mode 100755
new mode 100644
diff --git a/.gitignore b/.gitignore
old mode 100755
new mode 100644
diff --git a/.prettierignore b/.prettierignore
old mode 100755
new mode 100644
diff --git a/.prettierrc.json b/.prettierrc.json
old mode 100755
new mode 100644
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
old mode 100755
new mode 100644
index 945fbaf..c84411f
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.25.0"
+ ".": "0.26.0"
}
diff --git a/.stats.yml b/.stats.yml
old mode 100755
new mode 100644
index e508d94..b8229b2
--- a/.stats.yml
+++ b/.stats.yml
@@ -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
diff --git a/Brewfile b/Brewfile
old mode 100755
new mode 100644
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c5cfc4b..11f514e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
old mode 100755
new mode 100644
diff --git a/LICENSE b/LICENSE
old mode 100755
new mode 100644
diff --git a/README.md b/README.md
old mode 100755
new mode 100644
diff --git a/SECURITY.md b/SECURITY.md
old mode 100755
new mode 100644
diff --git a/api.md b/api.md
old mode 100755
new mode 100644
index 13ac820..30382f9
--- a/api.md
+++ b/api.md
@@ -129,6 +129,7 @@ Types:
- TotalUsdDiffSchema
- TransactionErrorDetails
- TxScanRequestSchema
+- ValidationFeature
## Message
@@ -173,13 +174,9 @@ Methods:
Types:
-- StarknetErc1155Details
- StarknetErc1155Diff
-- StarknetErc20Details
- StarknetErc20Diff
-- StarknetErc721Details
- StarknetErc721Diff
-- StarknetNativeDiff
## Transaction
diff --git a/bin/check-release-environment b/bin/check-release-environment
old mode 100755
new mode 100644
diff --git a/bin/publish-npm b/bin/publish-npm
old mode 100755
new mode 100644
diff --git a/examples/.keep b/examples/.keep
old mode 100755
new mode 100644
diff --git a/jest.config.ts b/jest.config.ts
old mode 100755
new mode 100644
diff --git a/package.json b/package.json
old mode 100755
new mode 100644
index 17876f7..18810bd
--- a/package.json
+++ b/package.json
@@ -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 ",
"types": "dist/index.d.ts",
diff --git a/release-please-config.json b/release-please-config.json
old mode 100755
new mode 100644
diff --git a/scripts/utils/check-version.cjs b/scripts/utils/check-version.cjs
old mode 100755
new mode 100644
diff --git a/scripts/utils/fix-index-exports.cjs b/scripts/utils/fix-index-exports.cjs
old mode 100755
new mode 100644
diff --git a/scripts/utils/make-dist-package-json.cjs b/scripts/utils/make-dist-package-json.cjs
old mode 100755
new mode 100644
diff --git a/scripts/utils/postprocess-files.cjs b/scripts/utils/postprocess-files.cjs
old mode 100755
new mode 100644
diff --git a/src/_shims/MultipartBody.ts b/src/_shims/MultipartBody.ts
old mode 100755
new mode 100644
diff --git a/src/_shims/README.md b/src/_shims/README.md
old mode 100755
new mode 100644
diff --git a/src/_shims/auto/runtime-bun.ts b/src/_shims/auto/runtime-bun.ts
old mode 100755
new mode 100644
diff --git a/src/_shims/auto/runtime-deno.ts b/src/_shims/auto/runtime-deno.ts
old mode 100755
new mode 100644
diff --git a/src/_shims/auto/runtime-node.ts b/src/_shims/auto/runtime-node.ts
old mode 100755
new mode 100644
diff --git a/src/_shims/auto/runtime.ts b/src/_shims/auto/runtime.ts
old mode 100755
new mode 100644
diff --git a/src/_shims/auto/types-deno.ts b/src/_shims/auto/types-deno.ts
old mode 100755
new mode 100644
diff --git a/src/_shims/auto/types-node.ts b/src/_shims/auto/types-node.ts
old mode 100755
new mode 100644
diff --git a/src/_shims/auto/types.d.ts b/src/_shims/auto/types.d.ts
old mode 100755
new mode 100644
diff --git a/src/_shims/auto/types.js b/src/_shims/auto/types.js
old mode 100755
new mode 100644
diff --git a/src/_shims/auto/types.mjs b/src/_shims/auto/types.mjs
old mode 100755
new mode 100644
diff --git a/src/_shims/bun-runtime.ts b/src/_shims/bun-runtime.ts
old mode 100755
new mode 100644
diff --git a/src/_shims/index-deno.ts b/src/_shims/index-deno.ts
old mode 100755
new mode 100644
diff --git a/src/_shims/index.d.ts b/src/_shims/index.d.ts
old mode 100755
new mode 100644
diff --git a/src/_shims/index.js b/src/_shims/index.js
old mode 100755
new mode 100644
diff --git a/src/_shims/index.mjs b/src/_shims/index.mjs
old mode 100755
new mode 100644
diff --git a/src/_shims/manual-types.d.ts b/src/_shims/manual-types.d.ts
old mode 100755
new mode 100644
diff --git a/src/_shims/manual-types.js b/src/_shims/manual-types.js
old mode 100755
new mode 100644
diff --git a/src/_shims/manual-types.mjs b/src/_shims/manual-types.mjs
old mode 100755
new mode 100644
diff --git a/src/_shims/node-runtime.ts b/src/_shims/node-runtime.ts
old mode 100755
new mode 100644
diff --git a/src/_shims/node-types.d.ts b/src/_shims/node-types.d.ts
old mode 100755
new mode 100644
diff --git a/src/_shims/node-types.js b/src/_shims/node-types.js
old mode 100755
new mode 100644
diff --git a/src/_shims/node-types.mjs b/src/_shims/node-types.mjs
old mode 100755
new mode 100644
diff --git a/src/_shims/registry.ts b/src/_shims/registry.ts
old mode 100755
new mode 100644
diff --git a/src/_shims/web-runtime.ts b/src/_shims/web-runtime.ts
old mode 100755
new mode 100644
diff --git a/src/_shims/web-types.d.ts b/src/_shims/web-types.d.ts
old mode 100755
new mode 100644
diff --git a/src/_shims/web-types.js b/src/_shims/web-types.js
old mode 100755
new mode 100644
diff --git a/src/_shims/web-types.mjs b/src/_shims/web-types.mjs
old mode 100755
new mode 100644
diff --git a/src/core.ts b/src/core.ts
old mode 100755
new mode 100644
index 6b59935..5d652d0
--- a/src/core.ts
+++ b/src/core.ts
@@ -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);
};
diff --git a/src/error.ts b/src/error.ts
old mode 100755
new mode 100644
index 026e878..354059a
--- a/src/error.ts
+++ b/src/error.ts
@@ -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;
@@ -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
diff --git a/src/index.ts b/src/index.ts
old mode 100755
new mode 100644
index e4d4446..44a82f9
--- a/src/index.ts
+++ b/src/index.ts
@@ -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;
@@ -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;
diff --git a/src/lib/.keep b/src/lib/.keep
old mode 100755
new mode 100644
diff --git a/src/resource.ts b/src/resource.ts
old mode 100755
new mode 100644
diff --git a/src/resources/bitcoin/bitcoin.ts b/src/resources/bitcoin/bitcoin.ts
old mode 100755
new mode 100644
diff --git a/src/resources/bitcoin/index.ts b/src/resources/bitcoin/index.ts
old mode 100755
new mode 100644
diff --git a/src/resources/bitcoin/transaction.ts b/src/resources/bitcoin/transaction.ts
old mode 100755
new mode 100644
diff --git a/src/resources/evm/evm.ts b/src/resources/evm/evm.ts
old mode 100755
new mode 100644
index dfec450..669154b
--- a/src/resources/evm/evm.ts
+++ b/src/resources/evm/evm.ts
@@ -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;
@@ -526,7 +526,8 @@ export type TokenScanSupportedChain =
| 'blast'
| 'zksync'
| 'scroll'
- | 'degen';
+ | 'degen'
+ | 'bitcoin';
export interface TransactionScanFeature {
/**
@@ -634,6 +635,7 @@ export type TransactionScanSupportedChain =
| 'degen'
| 'avalanche-fuji'
| 'immutable-zkevm'
+ | 'immutable-zkevm-testnet'
| 'gnosis'
| 'worldchain';
diff --git a/src/resources/evm/index.ts b/src/resources/evm/index.ts
old mode 100755
new mode 100644
diff --git a/src/resources/evm/json-rpc.ts b/src/resources/evm/json-rpc.ts
old mode 100755
new mode 100644
diff --git a/src/resources/evm/post-transaction-bulk.ts b/src/resources/evm/post-transaction-bulk.ts
old mode 100755
new mode 100644
diff --git a/src/resources/evm/post-transaction.ts b/src/resources/evm/post-transaction.ts
old mode 100755
new mode 100644
diff --git a/src/resources/evm/transaction-bulk.ts b/src/resources/evm/transaction-bulk.ts
old mode 100755
new mode 100644
diff --git a/src/resources/evm/transaction-raw.ts b/src/resources/evm/transaction-raw.ts
old mode 100755
new mode 100644
diff --git a/src/resources/evm/transaction.ts b/src/resources/evm/transaction.ts
old mode 100755
new mode 100644
diff --git a/src/resources/evm/user-operation.ts b/src/resources/evm/user-operation.ts
old mode 100755
new mode 100644
diff --git a/src/resources/index.ts b/src/resources/index.ts
old mode 100755
new mode 100644
index f84bc42..c8b9c23
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -33,6 +33,7 @@ export {
TotalUsdDiffSchema,
TransactionErrorDetails,
TxScanRequestSchema,
+ ValidationFeature,
Solana,
} from './solana/solana';
export {
@@ -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,
diff --git a/src/resources/site.ts b/src/resources/site.ts
old mode 100755
new mode 100644
diff --git a/src/resources/solana/address.ts b/src/resources/solana/address.ts
old mode 100755
new mode 100644
diff --git a/src/resources/solana/index.ts b/src/resources/solana/index.ts
old mode 100755
new mode 100644
index 733ef11..21812c8
--- a/src/resources/solana/index.ts
+++ b/src/resources/solana/index.ts
@@ -33,6 +33,7 @@ export {
TotalUsdDiffSchema,
TransactionErrorDetails,
TxScanRequestSchema,
+ ValidationFeature,
Solana,
} from './solana';
export { AddressScanParams, Address } from './address';
diff --git a/src/resources/solana/message.ts b/src/resources/solana/message.ts
old mode 100755
new mode 100644
diff --git a/src/resources/solana/solana.ts b/src/resources/solana/solana.ts
old mode 100755
new mode 100644
index 45eb452..5be9f30
--- a/src/resources/solana/solana.ts
+++ b/src/resources/solana/solana.ts
@@ -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;
+
/**
* A list of features about this transaction explaining the validation
*/
@@ -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;
@@ -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;
diff --git a/src/resources/starknet/index.ts b/src/resources/starknet/index.ts
old mode 100755
new mode 100644
index 0aace7f..3a1a707
--- a/src/resources/starknet/index.ts
+++ b/src/resources/starknet/index.ts
@@ -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';
diff --git a/src/resources/starknet/starknet.ts b/src/resources/starknet/starknet.ts
old mode 100755
new mode 100644
index 086bf9c..3a5d01a
--- a/src/resources/starknet/starknet.ts
+++ b/src/resources/starknet/starknet.ts
@@ -8,28 +8,6 @@ export class Starknet extends APIResource {
transaction: TransactionAPI.Transaction = new TransactionAPI.Transaction(this._client);
}
-export interface StarknetErc1155Details {
- /**
- * Address of the token's contract
- */
- address: string;
-
- /**
- * token's name
- */
- name: string;
-
- /**
- * token's symbol
- */
- symbol: string;
-
- /**
- * Type of the asset (`ERC1155`)
- */
- type?: 'ERC1155';
-}
-
export interface StarknetErc1155Diff {
/**
* Token ID of the transfer
@@ -39,51 +17,19 @@ export interface StarknetErc1155Diff {
/**
* USD price of the asset
*/
- usd_price: number;
+ usd_price: string;
/**
* Value of the transfer
*/
value: number;
- /**
- * URL of the asset's logo
- */
- logo_url?: string | null;
-
/**
* Summarized description of the transfer
*/
summary?: string | null;
}
-export interface StarknetErc20Details {
- /**
- * Address of the token's contract
- */
- address: string;
-
- /**
- * token's decimals
- */
- decimals: number;
-
- /**
- * token's name
- */
- name: string;
-
- /**
- * token's symbol
- */
- symbol: string;
-
- /**
- * Type of the asset (`ERC20`)
- */
- type?: 'ERC20';
-}
-
export interface StarknetErc20Diff {
/**
* Raw value of the transfer
@@ -93,17 +39,12 @@ export interface StarknetErc20Diff {
/**
* USD price of the asset
*/
- usd_price: number;
+ usd_price: string;
/**
* Value of the transfer
*/
- value: number;
-
- /**
- * URL of the asset's logo
- */
- logo_url?: string | null;
+ value: string;
/**
* Summarized description of the transfer
@@ -111,28 +52,6 @@ export interface StarknetErc20Diff {
summary?: string | null;
}
-export interface StarknetErc721Details {
- /**
- * Address of the token's contract
- */
- address: string;
-
- /**
- * token's name
- */
- name: string;
-
- /**
- * token's symbol
- */
- symbol: string;
-
- /**
- * Type of the asset (`ERC721`)
- */
- type?: 'ERC721';
-}
-
export interface StarknetErc721Diff {
/**
* Token ID of the transfer
@@ -142,39 +61,7 @@ export interface StarknetErc721Diff {
/**
* USD price of the asset
*/
- usd_price: number;
-
- /**
- * URL of the asset's logo
- */
- logo_url?: string | null;
-
- /**
- * Summarized description of the transfer
- */
- summary?: string | null;
-}
-
-export interface StarknetNativeDiff {
- /**
- * Raw value of the transfer
- */
- raw_value: number;
-
- /**
- * USD price of the asset
- */
- usd_price: number;
-
- /**
- * Value of the transfer
- */
- value: number;
-
- /**
- * URL of the asset's logo
- */
- logo_url?: string | null;
+ usd_price: string;
/**
* Summarized description of the transfer
@@ -183,13 +70,9 @@ export interface StarknetNativeDiff {
}
export namespace Starknet {
- export import StarknetErc1155Details = StarknetAPI.StarknetErc1155Details;
export import StarknetErc1155Diff = StarknetAPI.StarknetErc1155Diff;
- export import StarknetErc20Details = StarknetAPI.StarknetErc20Details;
export import StarknetErc20Diff = StarknetAPI.StarknetErc20Diff;
- export import StarknetErc721Details = StarknetAPI.StarknetErc721Details;
export import StarknetErc721Diff = StarknetAPI.StarknetErc721Diff;
- export import StarknetNativeDiff = StarknetAPI.StarknetNativeDiff;
export import Transaction = TransactionAPI.Transaction;
export import TransactionScanResponse = TransactionAPI.TransactionScanResponse;
export import TransactionScanParams = TransactionAPI.TransactionScanParams;
diff --git a/src/resources/starknet/transaction.ts b/src/resources/starknet/transaction.ts
old mode 100755
new mode 100644
index c78ca4d..036b194
--- a/src/resources/starknet/transaction.ts
+++ b/src/resources/starknet/transaction.ts
@@ -19,7 +19,7 @@ export interface TransactionScanResponse {
* Simulation result; Only present if simulation option is included in the request
*/
simulation?:
- | TransactionScanResponse.StarknetSimulationResultSchema
+ | TransactionScanResponse.StarknetStarknetSimulationResultSchema
| TransactionScanResponse.StarknetSimulationErrorSchema
| null;
@@ -27,25 +27,25 @@ export interface TransactionScanResponse {
* Validation result; Only present if validation option is included in the request
*/
validation?:
- | TransactionScanResponse.StarknetValidationResultSchema
+ | TransactionScanResponse.StarknetValidationResultSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchema
| TransactionScanResponse.StarknetValidationErrorSchema
| null;
}
export namespace TransactionScanResponse {
- export interface StarknetSimulationResultSchema {
+ export interface StarknetStarknetSimulationResultSchema {
/**
* Summary of the actions and asset transfers that were made by the requested
* account address
*/
- account_summary: StarknetSimulationResultSchema.AccountSummary;
+ account_summary: StarknetStarknetSimulationResultSchema.AccountSummary;
status: 'Success';
/**
* Details of addresses involved in the transaction
*/
- address_details?: Array;
+ address_details?: Array;
/**
* Mapping between the address of an account to the assets diff during the
@@ -54,13 +54,17 @@ export namespace TransactionScanResponse {
assets_diffs?: Record<
string,
Array<
- | StarknetSimulationResultSchema.StarknetAccountSingleAssetDiffSchemaTypeNativeAssetDetailsSchemaNativeDiffSchema
- | StarknetSimulationResultSchema.StarknetAccountSingleAssetDiffSchemaTypeErc20DetailsSchemaErc20DiffSchema
- | StarknetSimulationResultSchema.StarknetAccountSingleAssetDiffSchemaTypeErc721DetailsSchemaErc721DiffSchema
- | StarknetSimulationResultSchema.StarknetAccountSingleAssetDiffSchemaTypeErc1155DetailsSchemaErc1155DiffSchema
+ | StarknetStarknetSimulationResultSchema.StarknetAccountSingleAssetDiffSchemaTypeErc20DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20DiffSchema
+ | StarknetStarknetSimulationResultSchema.StarknetAccountSingleAssetDiffSchemaTypeErc721DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721DiffSchema
+ | StarknetStarknetSimulationResultSchema.StarknetAccountSingleAssetDiffSchemaTypeErc1155DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155DiffSchema
>
>;
+ /**
+ * Optional block number or tag context for the simulation
+ */
+ block_number?: string | null;
+
/**
* Mapping between the address of an account to the exposure of the assets during
* the transaction
@@ -68,14 +72,14 @@ export namespace TransactionScanResponse {
exposures?: Record<
string,
Array<
- | StarknetSimulationResultSchema.StarknetAddressAssetExposureSchemaErc20DetailsSchemaErc20ExposureSchema
- | StarknetSimulationResultSchema.StarknetAddressAssetExposureSchemaErc721DetailsSchemaErc721ExposureSchema
- | StarknetSimulationResultSchema.StarknetAddressAssetExposureSchemaErc1155DetailsSchemaErc1155ExposureSchema
+ | StarknetStarknetSimulationResultSchema.StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20ExposureSchema
+ | StarknetStarknetSimulationResultSchema.StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721ExposureSchema
+ | StarknetStarknetSimulationResultSchema.StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155ExposureSchema
>
>;
}
- export namespace StarknetSimulationResultSchema {
+ export namespace StarknetStarknetSimulationResultSchema {
/**
* Summary of the actions and asset transfers that were made by the requested
* account address
@@ -84,10 +88,10 @@ export namespace TransactionScanResponse {
/**
* Exposures made by the requested account address
*/
- exposures: Array<
- | AccountSummary.StarknetAddressAssetExposureSchemaErc20DetailsSchemaErc20ExposureSchema
- | AccountSummary.StarknetAddressAssetExposureSchemaErc721DetailsSchemaErc721ExposureSchema
- | AccountSummary.StarknetAddressAssetExposureSchemaErc1155DetailsSchemaErc1155ExposureSchema
+ account_exposures: Array<
+ | AccountSummary.StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20ExposureSchema
+ | AccountSummary.StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721ExposureSchema
+ | AccountSummary.StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155ExposureSchema
>;
/**
@@ -99,10 +103,9 @@ export namespace TransactionScanResponse {
* Assets diffs of the requested account address
*/
assets_diffs?: Array<
- | AccountSummary.StarknetAccountSingleAssetDiffSchemaTypeNativeAssetDetailsSchemaNativeDiffSchema
- | AccountSummary.StarknetAccountSingleAssetDiffSchemaTypeErc20DetailsSchemaErc20DiffSchema
- | AccountSummary.StarknetAccountSingleAssetDiffSchemaTypeErc721DetailsSchemaErc721DiffSchema
- | AccountSummary.StarknetAccountSingleAssetDiffSchemaTypeErc1155DetailsSchemaErc1155DiffSchema
+ | AccountSummary.StarknetAccountSingleAssetDiffSchemaTypeErc20DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20DiffSchema
+ | AccountSummary.StarknetAccountSingleAssetDiffSchemaTypeErc721DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721DiffSchema
+ | AccountSummary.StarknetAccountSingleAssetDiffSchemaTypeErc1155DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155DiffSchema
>;
/**
@@ -112,24 +115,56 @@ export namespace TransactionScanResponse {
}
export namespace AccountSummary {
- export interface StarknetAddressAssetExposureSchemaErc20DetailsSchemaErc20ExposureSchema {
- asset: StarknetAPI.StarknetErc20Details;
+ export interface StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20ExposureSchema {
+ asset: StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20ExposureSchema.Asset;
/**
* Mapping between the spender address and the exposure of the asset
*/
spenders?: Record<
string,
- StarknetAddressAssetExposureSchemaErc20DetailsSchemaErc20ExposureSchema.Spenders
+ StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20ExposureSchema.Spenders
>;
}
- export namespace StarknetAddressAssetExposureSchemaErc20DetailsSchemaErc20ExposureSchema {
+ export namespace StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20ExposureSchema {
+ export interface Asset {
+ /**
+ * Address of the token's contract
+ */
+ address: string;
+
+ /**
+ * token's decimals
+ */
+ decimals: number;
+
+ /**
+ * token's name
+ */
+ name: string;
+
+ /**
+ * token's symbol
+ */
+ symbol: string;
+
+ /**
+ * URL of the asset's logo
+ */
+ logo_url?: string | null;
+
+ /**
+ * Type of the asset (`ERC20`)
+ */
+ type?: 'ERC20';
+ }
+
export interface Spenders {
/**
* Approval value of the ERC20 token
*/
- approval: number;
+ approval: string;
exposure: Array;
@@ -145,19 +180,46 @@ export namespace TransactionScanResponse {
}
}
- export interface StarknetAddressAssetExposureSchemaErc721DetailsSchemaErc721ExposureSchema {
- asset: StarknetAPI.StarknetErc721Details;
+ export interface StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721ExposureSchema {
+ asset: StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721ExposureSchema.Asset;
/**
* Mapping between the spender address and the exposure of the asset
*/
spenders?: Record<
string,
- StarknetAddressAssetExposureSchemaErc721DetailsSchemaErc721ExposureSchema.Spenders
+ StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721ExposureSchema.Spenders
>;
}
- export namespace StarknetAddressAssetExposureSchemaErc721DetailsSchemaErc721ExposureSchema {
+ export namespace StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721ExposureSchema {
+ export interface Asset {
+ /**
+ * Address of the token's contract
+ */
+ address: string;
+
+ /**
+ * token's name
+ */
+ name: string;
+
+ /**
+ * token's symbol
+ */
+ symbol: string;
+
+ /**
+ * URL of the asset's logo
+ */
+ logo_url?: string | null;
+
+ /**
+ * Type of the asset (`ERC721`)
+ */
+ type?: 'ERC721';
+ }
+
export interface Spenders {
exposure: Array;
@@ -173,19 +235,46 @@ export namespace TransactionScanResponse {
}
}
- export interface StarknetAddressAssetExposureSchemaErc1155DetailsSchemaErc1155ExposureSchema {
- asset: StarknetAPI.StarknetErc1155Details;
+ export interface StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155ExposureSchema {
+ asset: StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155ExposureSchema.Asset;
/**
* Mapping between the spender address and the exposure of the asset
*/
spenders?: Record<
string,
- StarknetAddressAssetExposureSchemaErc1155DetailsSchemaErc1155ExposureSchema.Spenders
+ StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155ExposureSchema.Spenders
>;
}
- export namespace StarknetAddressAssetExposureSchemaErc1155DetailsSchemaErc1155ExposureSchema {
+ export namespace StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155ExposureSchema {
+ export interface Asset {
+ /**
+ * Address of the token's contract
+ */
+ address: string;
+
+ /**
+ * token's name
+ */
+ name: string;
+
+ /**
+ * token's symbol
+ */
+ symbol: string;
+
+ /**
+ * URL of the asset's logo
+ */
+ logo_url?: string | null;
+
+ /**
+ * Type of the asset (`ERC1155`)
+ */
+ type?: 'ERC1155';
+ }
+
export interface Spenders {
exposure: Array;
@@ -221,74 +310,99 @@ export namespace TransactionScanResponse {
total?: number;
}
- export interface StarknetAccountSingleAssetDiffSchemaTypeNativeAssetDetailsSchemaNativeDiffSchema {
- asset: StarknetAccountSingleAssetDiffSchemaTypeNativeAssetDetailsSchemaNativeDiffSchema.Asset;
+ export interface StarknetAccountSingleAssetDiffSchemaTypeErc20DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20DiffSchema {
+ asset: StarknetAccountSingleAssetDiffSchemaTypeErc20DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20DiffSchema.Asset;
/**
* Details of the incoming transfer
*/
- in?: StarknetAPI.StarknetNativeDiff | null;
+ in?: StarknetAPI.StarknetErc20Diff | null;
/**
* Details of the outgoing transfer
*/
- out?: StarknetAPI.StarknetNativeDiff | null;
+ out?: StarknetAPI.StarknetErc20Diff | null;
}
- export namespace StarknetAccountSingleAssetDiffSchemaTypeNativeAssetDetailsSchemaNativeDiffSchema {
+ export namespace StarknetAccountSingleAssetDiffSchemaTypeErc20DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20DiffSchema {
export interface Asset {
/**
- * Decimals of the asset
+ * Address of the token's contract
+ */
+ address: string;
+
+ /**
+ * token's decimals
*/
- decimals?: 18;
+ decimals: number;
/**
- * Name of the asset
+ * token's name
*/
- name?: 'STRK';
+ name: string;
/**
- * Symbol of the asset
+ * token's symbol
*/
- symbol?: 'STRK';
+ symbol: string;
/**
- * Type of the asset (`NATIVE`)
+ * URL of the asset's logo
*/
- type?: 'NATIVE';
+ logo_url?: string | null;
+
+ /**
+ * Type of the asset (`ERC20`)
+ */
+ type?: 'ERC20';
}
}
- export interface StarknetAccountSingleAssetDiffSchemaTypeErc20DetailsSchemaErc20DiffSchema {
- asset: StarknetAPI.StarknetErc20Details;
+ export interface StarknetAccountSingleAssetDiffSchemaTypeErc721DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721DiffSchema {
+ asset: StarknetAccountSingleAssetDiffSchemaTypeErc721DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721DiffSchema.Asset;
/**
* Details of the incoming transfer
*/
- in?: StarknetAPI.StarknetErc20Diff | null;
+ in?: StarknetAPI.StarknetErc721Diff | null;
/**
* Details of the outgoing transfer
*/
- out?: StarknetAPI.StarknetErc20Diff | null;
+ out?: StarknetAPI.StarknetErc721Diff | null;
}
- export interface StarknetAccountSingleAssetDiffSchemaTypeErc721DetailsSchemaErc721DiffSchema {
- asset: StarknetAPI.StarknetErc721Details;
+ export namespace StarknetAccountSingleAssetDiffSchemaTypeErc721DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721DiffSchema {
+ export interface Asset {
+ /**
+ * Address of the token's contract
+ */
+ address: string;
- /**
- * Details of the incoming transfer
- */
- in?: StarknetAPI.StarknetErc721Diff | null;
+ /**
+ * token's name
+ */
+ name: string;
- /**
- * Details of the outgoing transfer
- */
- out?: StarknetAPI.StarknetErc721Diff | null;
+ /**
+ * token's symbol
+ */
+ symbol: string;
+
+ /**
+ * URL of the asset's logo
+ */
+ logo_url?: string | null;
+
+ /**
+ * Type of the asset (`ERC721`)
+ */
+ type?: 'ERC721';
+ }
}
- export interface StarknetAccountSingleAssetDiffSchemaTypeErc1155DetailsSchemaErc1155DiffSchema {
- asset: StarknetAPI.StarknetErc1155Details;
+ export interface StarknetAccountSingleAssetDiffSchemaTypeErc1155DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155DiffSchema {
+ asset: StarknetAccountSingleAssetDiffSchemaTypeErc1155DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155DiffSchema.Asset;
/**
* Details of the incoming transfer
@@ -300,6 +414,35 @@ export namespace TransactionScanResponse {
*/
out?: StarknetAPI.StarknetErc1155Diff | null;
}
+
+ export namespace StarknetAccountSingleAssetDiffSchemaTypeErc1155DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155DiffSchema {
+ export interface Asset {
+ /**
+ * Address of the token's contract
+ */
+ address: string;
+
+ /**
+ * token's name
+ */
+ name: string;
+
+ /**
+ * token's symbol
+ */
+ symbol: string;
+
+ /**
+ * URL of the asset's logo
+ */
+ logo_url?: string | null;
+
+ /**
+ * Type of the asset (`ERC1155`)
+ */
+ type?: 'ERC1155';
+ }
+ }
}
export interface AddressDetail {
@@ -314,74 +457,99 @@ export namespace TransactionScanResponse {
description?: string | null;
}
- export interface StarknetAccountSingleAssetDiffSchemaTypeNativeAssetDetailsSchemaNativeDiffSchema {
- asset: StarknetAccountSingleAssetDiffSchemaTypeNativeAssetDetailsSchemaNativeDiffSchema.Asset;
+ export interface StarknetAccountSingleAssetDiffSchemaTypeErc20DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20DiffSchema {
+ asset: StarknetAccountSingleAssetDiffSchemaTypeErc20DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20DiffSchema.Asset;
/**
* Details of the incoming transfer
*/
- in?: StarknetAPI.StarknetNativeDiff | null;
+ in?: StarknetAPI.StarknetErc20Diff | null;
/**
* Details of the outgoing transfer
*/
- out?: StarknetAPI.StarknetNativeDiff | null;
+ out?: StarknetAPI.StarknetErc20Diff | null;
}
- export namespace StarknetAccountSingleAssetDiffSchemaTypeNativeAssetDetailsSchemaNativeDiffSchema {
+ export namespace StarknetAccountSingleAssetDiffSchemaTypeErc20DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20DiffSchema {
export interface Asset {
/**
- * Decimals of the asset
+ * Address of the token's contract
+ */
+ address: string;
+
+ /**
+ * token's decimals
+ */
+ decimals: number;
+
+ /**
+ * token's name
*/
- decimals?: 18;
+ name: string;
/**
- * Name of the asset
+ * token's symbol
*/
- name?: 'STRK';
+ symbol: string;
/**
- * Symbol of the asset
+ * URL of the asset's logo
*/
- symbol?: 'STRK';
+ logo_url?: string | null;
/**
- * Type of the asset (`NATIVE`)
+ * Type of the asset (`ERC20`)
*/
- type?: 'NATIVE';
+ type?: 'ERC20';
}
}
- export interface StarknetAccountSingleAssetDiffSchemaTypeErc20DetailsSchemaErc20DiffSchema {
- asset: StarknetAPI.StarknetErc20Details;
+ export interface StarknetAccountSingleAssetDiffSchemaTypeErc721DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721DiffSchema {
+ asset: StarknetAccountSingleAssetDiffSchemaTypeErc721DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721DiffSchema.Asset;
/**
* Details of the incoming transfer
*/
- in?: StarknetAPI.StarknetErc20Diff | null;
+ in?: StarknetAPI.StarknetErc721Diff | null;
/**
* Details of the outgoing transfer
*/
- out?: StarknetAPI.StarknetErc20Diff | null;
+ out?: StarknetAPI.StarknetErc721Diff | null;
}
- export interface StarknetAccountSingleAssetDiffSchemaTypeErc721DetailsSchemaErc721DiffSchema {
- asset: StarknetAPI.StarknetErc721Details;
+ export namespace StarknetAccountSingleAssetDiffSchemaTypeErc721DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721DiffSchema {
+ export interface Asset {
+ /**
+ * Address of the token's contract
+ */
+ address: string;
+
+ /**
+ * token's name
+ */
+ name: string;
- /**
- * Details of the incoming transfer
- */
- in?: StarknetAPI.StarknetErc721Diff | null;
+ /**
+ * token's symbol
+ */
+ symbol: string;
- /**
- * Details of the outgoing transfer
- */
- out?: StarknetAPI.StarknetErc721Diff | null;
+ /**
+ * URL of the asset's logo
+ */
+ logo_url?: string | null;
+
+ /**
+ * Type of the asset (`ERC721`)
+ */
+ type?: 'ERC721';
+ }
}
- export interface StarknetAccountSingleAssetDiffSchemaTypeErc1155DetailsSchemaErc1155DiffSchema {
- asset: StarknetAPI.StarknetErc1155Details;
+ export interface StarknetAccountSingleAssetDiffSchemaTypeErc1155DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155DiffSchema {
+ asset: StarknetAccountSingleAssetDiffSchemaTypeErc1155DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155DiffSchema.Asset;
/**
* Details of the incoming transfer
@@ -394,24 +562,85 @@ export namespace TransactionScanResponse {
out?: StarknetAPI.StarknetErc1155Diff | null;
}
- export interface StarknetAddressAssetExposureSchemaErc20DetailsSchemaErc20ExposureSchema {
- asset: StarknetAPI.StarknetErc20Details;
+ export namespace StarknetAccountSingleAssetDiffSchemaTypeErc1155DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155DiffSchema {
+ export interface Asset {
+ /**
+ * Address of the token's contract
+ */
+ address: string;
+
+ /**
+ * token's name
+ */
+ name: string;
+
+ /**
+ * token's symbol
+ */
+ symbol: string;
+
+ /**
+ * URL of the asset's logo
+ */
+ logo_url?: string | null;
+
+ /**
+ * Type of the asset (`ERC1155`)
+ */
+ type?: 'ERC1155';
+ }
+ }
+
+ export interface StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20ExposureSchema {
+ asset: StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20ExposureSchema.Asset;
/**
* Mapping between the spender address and the exposure of the asset
*/
spenders?: Record<
string,
- StarknetAddressAssetExposureSchemaErc20DetailsSchemaErc20ExposureSchema.Spenders
+ StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20ExposureSchema.Spenders
>;
}
- export namespace StarknetAddressAssetExposureSchemaErc20DetailsSchemaErc20ExposureSchema {
+ export namespace StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc20ExposureSchema {
+ export interface Asset {
+ /**
+ * Address of the token's contract
+ */
+ address: string;
+
+ /**
+ * token's decimals
+ */
+ decimals: number;
+
+ /**
+ * token's name
+ */
+ name: string;
+
+ /**
+ * token's symbol
+ */
+ symbol: string;
+
+ /**
+ * URL of the asset's logo
+ */
+ logo_url?: string | null;
+
+ /**
+ * Type of the asset (`ERC20`)
+ */
+ type?: 'ERC20';
+ }
+
export interface Spenders {
/**
* Approval value of the ERC20 token
*/
- approval: number;
+ approval: string;
exposure: Array;
@@ -427,19 +656,46 @@ export namespace TransactionScanResponse {
}
}
- export interface StarknetAddressAssetExposureSchemaErc721DetailsSchemaErc721ExposureSchema {
- asset: StarknetAPI.StarknetErc721Details;
+ export interface StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721ExposureSchema {
+ asset: StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721ExposureSchema.Asset;
/**
* Mapping between the spender address and the exposure of the asset
*/
spenders?: Record<
string,
- StarknetAddressAssetExposureSchemaErc721DetailsSchemaErc721ExposureSchema.Spenders
+ StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721ExposureSchema.Spenders
>;
}
- export namespace StarknetAddressAssetExposureSchemaErc721DetailsSchemaErc721ExposureSchema {
+ export namespace StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc721ExposureSchema {
+ export interface Asset {
+ /**
+ * Address of the token's contract
+ */
+ address: string;
+
+ /**
+ * token's name
+ */
+ name: string;
+
+ /**
+ * token's symbol
+ */
+ symbol: string;
+
+ /**
+ * URL of the asset's logo
+ */
+ logo_url?: string | null;
+
+ /**
+ * Type of the asset (`ERC721`)
+ */
+ type?: 'ERC721';
+ }
+
export interface Spenders {
exposure: Array;
@@ -455,19 +711,46 @@ export namespace TransactionScanResponse {
}
}
- export interface StarknetAddressAssetExposureSchemaErc1155DetailsSchemaErc1155ExposureSchema {
- asset: StarknetAPI.StarknetErc1155Details;
+ export interface StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155ExposureSchema {
+ asset: StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155ExposureSchema.Asset;
/**
* Mapping between the spender address and the exposure of the asset
*/
spenders?: Record<
string,
- StarknetAddressAssetExposureSchemaErc1155DetailsSchemaErc1155ExposureSchema.Spenders
+ StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155ExposureSchema.Spenders
>;
}
- export namespace StarknetAddressAssetExposureSchemaErc1155DetailsSchemaErc1155ExposureSchema {
+ export namespace StarknetAddressAssetExposureSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155DetailsSchemaAnnotatedIntSkipValidationPlainSerializerGetPydanticSchemaErc1155ExposureSchema {
+ export interface Asset {
+ /**
+ * Address of the token's contract
+ */
+ address: string;
+
+ /**
+ * token's name
+ */
+ name: string;
+
+ /**
+ * token's symbol
+ */
+ symbol: string;
+
+ /**
+ * URL of the asset's logo
+ */
+ logo_url?: string | null;
+
+ /**
+ * Type of the asset (`ERC1155`)
+ */
+ type?: 'ERC1155';
+ }
+
export interface Spenders {
exposure: Array;
@@ -493,7 +776,7 @@ export namespace TransactionScanResponse {
status: 'Error';
}
- export interface StarknetValidationResultSchema {
+ export interface StarknetValidationResultSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchema {
/**
* A textual classification that can be presented to the user explaining the
* reason.
@@ -508,7 +791,7 @@ export namespace TransactionScanResponse {
/**
* A list of features about this transaction explaining the validation
*/
- features: Array;
+ features: Array;
/**
* A textual description about the reasons the transaction was flagged with
@@ -524,7 +807,7 @@ export namespace TransactionScanResponse {
status: 'Success';
}
- export namespace StarknetValidationResultSchema {
+ export namespace StarknetValidationResultSchemaTypeAnnotatedIntSkipValidationPlainSerializerGetPydanticSchema {
export interface Feature {
/**
* Address the feature refers to
@@ -576,11 +859,17 @@ export interface TransactionScanParams {
| TransactionScanParams.StarknetDeployAccountV1TransactionSchema
| TransactionScanParams.StarknetDeployAccountV3TransactionSchema;
+ /**
+ * Optional block number or tag context for the simulation
+ */
+ block_number?: string | null;
+
/**
* List of options to include in the response
*
- * - `simulation`: Include simulation output in the response
- * - `validation`: Include security validation of the transaction in the response
+ * - `Options.validation`: Include Options.validation output in the response
+ *
+ * - `Options.simulation`: Include Options.simulation output in the response
*/
options?: Array<'validation' | 'simulation'>;
}
diff --git a/src/resources/stellar/index.ts b/src/resources/stellar/index.ts
old mode 100755
new mode 100644
diff --git a/src/resources/stellar/stellar.ts b/src/resources/stellar/stellar.ts
old mode 100755
new mode 100644
diff --git a/src/resources/stellar/transaction.ts b/src/resources/stellar/transaction.ts
old mode 100755
new mode 100644
diff --git a/src/resources/token-bulk.ts b/src/resources/token-bulk.ts
old mode 100755
new mode 100644
index 5499328..90f01be
--- a/src/resources/token-bulk.ts
+++ b/src/resources/token-bulk.ts
@@ -54,7 +54,7 @@ export namespace TokenBulkScanResponse {
/**
* Metadata of the token
*/
- metadata: Results.SolanaMetadata | Results.BasicMetadataToken;
+ metadata: Results.SolanaMetadata | Results.BitcoinMetadataToken | Results.EvmMetadataToken;
/**
* An enumeration.
@@ -134,6 +134,16 @@ export namespace TokenBulkScanResponse {
}
export interface SolanaMetadata {
+ /**
+ * Contract balance
+ */
+ contract_balance?: SolanaMetadata.ContractBalance;
+
+ /**
+ * Contract deploy date
+ */
+ creation_timestamp?: string;
+
/**
* Address of the deployer of the fungible token
*/
@@ -144,6 +154,14 @@ export namespace TokenBulkScanResponse {
*/
description?: string;
+ /**
+ * social links of the token
+ */
+ external_links?: SolanaMetadata.ExternalLinks;
+
+ /**
+ * Solana token freeze authority account
+ */
freeze_authority?: string;
/**
@@ -151,6 +169,9 @@ export namespace TokenBulkScanResponse {
*/
image_url?: string;
+ /**
+ * Solana token mint authority account
+ */
mint_authority?: string;
/**
@@ -158,6 +179,16 @@ export namespace TokenBulkScanResponse {
*/
name?: string;
+ /**
+ * Contract owner address
+ */
+ owner?: string;
+
+ /**
+ * Contract owner balance
+ */
+ owner_balance?: SolanaMetadata.OwnerBalance;
+
/**
* Symbol of the token
*/
@@ -168,10 +199,86 @@ export namespace TokenBulkScanResponse {
*/
type?: string;
+ /**
+ * Solana token update authority account
+ */
update_authority?: string;
}
- export interface BasicMetadataToken {
+ export namespace SolanaMetadata {
+ /**
+ * Contract balance
+ */
+ export interface ContractBalance {
+ amount?: number;
+
+ amount_wei?: string;
+ }
+
+ /**
+ * social links of the token
+ */
+ export interface ExternalLinks {
+ homepage?: string;
+
+ telegram_channel_id?: string;
+
+ twitter_page?: string;
+ }
+
+ /**
+ * Contract owner balance
+ */
+ export interface OwnerBalance {
+ amount?: number;
+
+ amount_wei?: string;
+ }
+ }
+
+ export interface BitcoinMetadataToken {
+ /**
+ * The unique ID for the Rune
+ */
+ id?: string;
+
+ /**
+ * The formatted name of the rune, with spacers
+ */
+ formatted_name?: string;
+
+ /**
+ * Name of the token
+ */
+ name?: string;
+
+ /**
+ * The rune's unique sequential number.
+ */
+ number?: number;
+
+ /**
+ * Symbol of the token
+ */
+ symbol?: string;
+
+ /**
+ * Type of the token
+ */
+ type?: string;
+ }
+
+ export interface EvmMetadataToken {
+ /**
+ * Contract balance
+ */
+ contract_balance?: EvmMetadataToken.ContractBalance;
+
+ /**
+ * Contract deploy date
+ */
+ creation_timestamp?: string;
+
/**
* Address of the deployer of the fungible token
*/
@@ -182,6 +289,11 @@ export namespace TokenBulkScanResponse {
*/
description?: string;
+ /**
+ * social links of the token
+ */
+ external_links?: EvmMetadataToken.ExternalLinks;
+
/**
* URL of the token image
*/
@@ -192,6 +304,16 @@ export namespace TokenBulkScanResponse {
*/
name?: string;
+ /**
+ * Contract owner address
+ */
+ owner?: string;
+
+ /**
+ * Contract owner balance
+ */
+ owner_balance?: EvmMetadataToken.OwnerBalance;
+
/**
* Symbol of the token
*/
@@ -203,6 +325,37 @@ export namespace TokenBulkScanResponse {
type?: string;
}
+ export namespace EvmMetadataToken {
+ /**
+ * Contract balance
+ */
+ export interface ContractBalance {
+ amount?: number;
+
+ amount_wei?: string;
+ }
+
+ /**
+ * social links of the token
+ */
+ export interface ExternalLinks {
+ homepage?: string;
+
+ telegram_channel_id?: string;
+
+ twitter_page?: string;
+ }
+
+ /**
+ * Contract owner balance
+ */
+ export interface OwnerBalance {
+ amount?: number;
+
+ amount_wei?: string;
+ }
+ }
+
/**
* Trading limits of the token
*/
@@ -256,6 +409,7 @@ export namespace TokenBulkScanResponse {
| 'HIGH_TRADE_VOLUME'
| 'MARKET_PLACE_SALES_HISTORY'
| 'HIGH_REPUTATION_TOKEN'
+ | 'ONCHAIN_ACTIVITY_VALIDATOR'
| 'STATIC_CODE_SIGNATURE'
| 'KNOWN_MALICIOUS'
| 'METADATA'
diff --git a/src/resources/token.ts b/src/resources/token.ts
old mode 100755
new mode 100644
index 6fb5fb9..c1711ad
--- a/src/resources/token.ts
+++ b/src/resources/token.ts
@@ -58,7 +58,10 @@ export interface TokenScanResponse {
/**
* Metadata of the token
*/
- metadata: TokenScanResponse.SolanaMetadata | TokenScanResponse.BasicMetadataToken;
+ metadata:
+ | TokenScanResponse.SolanaMetadata
+ | TokenScanResponse.BitcoinMetadataToken
+ | TokenScanResponse.EvmMetadataToken;
/**
* An enumeration.
@@ -138,6 +141,16 @@ export namespace TokenScanResponse {
}
export interface SolanaMetadata {
+ /**
+ * Contract balance
+ */
+ contract_balance?: SolanaMetadata.ContractBalance;
+
+ /**
+ * Contract deploy date
+ */
+ creation_timestamp?: string;
+
/**
* Address of the deployer of the fungible token
*/
@@ -148,6 +161,14 @@ export namespace TokenScanResponse {
*/
description?: string;
+ /**
+ * social links of the token
+ */
+ external_links?: SolanaMetadata.ExternalLinks;
+
+ /**
+ * Solana token freeze authority account
+ */
freeze_authority?: string;
/**
@@ -155,6 +176,9 @@ export namespace TokenScanResponse {
*/
image_url?: string;
+ /**
+ * Solana token mint authority account
+ */
mint_authority?: string;
/**
@@ -162,6 +186,16 @@ export namespace TokenScanResponse {
*/
name?: string;
+ /**
+ * Contract owner address
+ */
+ owner?: string;
+
+ /**
+ * Contract owner balance
+ */
+ owner_balance?: SolanaMetadata.OwnerBalance;
+
/**
* Symbol of the token
*/
@@ -172,10 +206,86 @@ export namespace TokenScanResponse {
*/
type?: string;
+ /**
+ * Solana token update authority account
+ */
update_authority?: string;
}
- export interface BasicMetadataToken {
+ export namespace SolanaMetadata {
+ /**
+ * Contract balance
+ */
+ export interface ContractBalance {
+ amount?: number;
+
+ amount_wei?: string;
+ }
+
+ /**
+ * social links of the token
+ */
+ export interface ExternalLinks {
+ homepage?: string;
+
+ telegram_channel_id?: string;
+
+ twitter_page?: string;
+ }
+
+ /**
+ * Contract owner balance
+ */
+ export interface OwnerBalance {
+ amount?: number;
+
+ amount_wei?: string;
+ }
+ }
+
+ export interface BitcoinMetadataToken {
+ /**
+ * The unique ID for the Rune
+ */
+ id?: string;
+
+ /**
+ * The formatted name of the rune, with spacers
+ */
+ formatted_name?: string;
+
+ /**
+ * Name of the token
+ */
+ name?: string;
+
+ /**
+ * The rune's unique sequential number.
+ */
+ number?: number;
+
+ /**
+ * Symbol of the token
+ */
+ symbol?: string;
+
+ /**
+ * Type of the token
+ */
+ type?: string;
+ }
+
+ export interface EvmMetadataToken {
+ /**
+ * Contract balance
+ */
+ contract_balance?: EvmMetadataToken.ContractBalance;
+
+ /**
+ * Contract deploy date
+ */
+ creation_timestamp?: string;
+
/**
* Address of the deployer of the fungible token
*/
@@ -186,6 +296,11 @@ export namespace TokenScanResponse {
*/
description?: string;
+ /**
+ * social links of the token
+ */
+ external_links?: EvmMetadataToken.ExternalLinks;
+
/**
* URL of the token image
*/
@@ -196,6 +311,16 @@ export namespace TokenScanResponse {
*/
name?: string;
+ /**
+ * Contract owner address
+ */
+ owner?: string;
+
+ /**
+ * Contract owner balance
+ */
+ owner_balance?: EvmMetadataToken.OwnerBalance;
+
/**
* Symbol of the token
*/
@@ -207,6 +332,37 @@ export namespace TokenScanResponse {
type?: string;
}
+ export namespace EvmMetadataToken {
+ /**
+ * Contract balance
+ */
+ export interface ContractBalance {
+ amount?: number;
+
+ amount_wei?: string;
+ }
+
+ /**
+ * social links of the token
+ */
+ export interface ExternalLinks {
+ homepage?: string;
+
+ telegram_channel_id?: string;
+
+ twitter_page?: string;
+ }
+
+ /**
+ * Contract owner balance
+ */
+ export interface OwnerBalance {
+ amount?: number;
+
+ amount_wei?: string;
+ }
+ }
+
/**
* Trading limits of the token
*/
@@ -260,6 +416,7 @@ export namespace TokenScanResponse {
| 'HIGH_TRADE_VOLUME'
| 'MARKET_PLACE_SALES_HISTORY'
| 'HIGH_REPUTATION_TOKEN'
+ | 'ONCHAIN_ACTIVITY_VALIDATOR'
| 'STATIC_CODE_SIGNATURE'
| 'KNOWN_MALICIOUS'
| 'METADATA'
diff --git a/src/shims/node.ts b/src/shims/node.ts
old mode 100755
new mode 100644
diff --git a/src/shims/web.ts b/src/shims/web.ts
old mode 100755
new mode 100644
diff --git a/src/uploads.ts b/src/uploads.ts
old mode 100755
new mode 100644
index 081827c..8fd2154
--- a/src/uploads.ts
+++ b/src/uploads.ts
@@ -107,21 +107,28 @@ export async function toFile(
// If it's a promise, resolve it.
value = await value;
- // Use the file's options if there isn't one provided
- options ??= isFileLike(value) ? { lastModified: value.lastModified, type: value.type } : {};
+ // If we've been given a `File` we don't need to do anything
+ if (isFileLike(value)) {
+ return value;
+ }
if (isResponseLike(value)) {
const blob = await value.blob();
name ||= new URL(value.url).pathname.split(/[\\/]/).pop() ?? 'unknown_file';
- return new File([blob as any], name, options);
+ // we need to convert the `Blob` into an array buffer because the `Blob` class
+ // that `node-fetch` defines is incompatible with the web standard which results
+ // in `new File` interpreting it as a string instead of binary data.
+ const data = isBlobLike(blob) ? [(await blob.arrayBuffer()) as any] : [blob];
+
+ return new File(data, name, options);
}
const bits = await getBytes(value);
name ||= getName(value) ?? 'unknown_file';
- if (!options.type) {
+ if (!options?.type) {
const type = (bits[0] as any)?.type;
if (typeof type === 'string') {
options = { ...options, type };
diff --git a/src/version.ts b/src/version.ts
old mode 100755
new mode 100644
index 4931d4f..aa25151
--- a/src/version.ts
+++ b/src/version.ts
@@ -1 +1 @@
-export const VERSION = '0.25.0'; // x-release-please-version
+export const VERSION = '0.26.0'; // x-release-please-version
diff --git a/tests/api-resources/bitcoin/transaction.test.ts b/tests/api-resources/bitcoin/transaction.test.ts
old mode 100755
new mode 100644
diff --git a/tests/api-resources/evm/json-rpc.test.ts b/tests/api-resources/evm/json-rpc.test.ts
old mode 100755
new mode 100644
diff --git a/tests/api-resources/evm/post-transaction-bulk.test.ts b/tests/api-resources/evm/post-transaction-bulk.test.ts
old mode 100755
new mode 100644
diff --git a/tests/api-resources/evm/post-transaction.test.ts b/tests/api-resources/evm/post-transaction.test.ts
old mode 100755
new mode 100644
diff --git a/tests/api-resources/evm/transaction-bulk.test.ts b/tests/api-resources/evm/transaction-bulk.test.ts
old mode 100755
new mode 100644
diff --git a/tests/api-resources/evm/transaction-raw.test.ts b/tests/api-resources/evm/transaction-raw.test.ts
old mode 100755
new mode 100644
diff --git a/tests/api-resources/evm/transaction.test.ts b/tests/api-resources/evm/transaction.test.ts
old mode 100755
new mode 100644
diff --git a/tests/api-resources/evm/user-operation.test.ts b/tests/api-resources/evm/user-operation.test.ts
old mode 100755
new mode 100644
diff --git a/tests/api-resources/site.test.ts b/tests/api-resources/site.test.ts
old mode 100755
new mode 100644
diff --git a/tests/api-resources/solana/address.test.ts b/tests/api-resources/solana/address.test.ts
old mode 100755
new mode 100644
diff --git a/tests/api-resources/solana/message.test.ts b/tests/api-resources/solana/message.test.ts
old mode 100755
new mode 100644
diff --git a/tests/api-resources/starknet/transaction.test.ts b/tests/api-resources/starknet/transaction.test.ts
old mode 100755
new mode 100644
index 9317722..a851cd6
--- a/tests/api-resources/starknet/transaction.test.ts
+++ b/tests/api-resources/starknet/transaction.test.ts
@@ -11,10 +11,30 @@ const client = new Blockaid({
describe('resource transaction', () => {
test('scan: only required params', async () => {
const responsePromise = client.starknet.transaction.scan({
- account_address: 'account_address',
+ account_address: '0x62a2959fa6502b30cbfb51199fbbe72e72ee4f5a86ec754b4172c7d7beb6ff4',
chain: 'mainnet',
- metadata: { type: 'wallet', url: 'url' },
- transaction: { max_fee: 'max_fee', nonce: 'nonce', sender_address: 'sender_address', version: 1 },
+ metadata: { type: 'wallet', url: 'giftnostra.com' },
+ transaction: {
+ calldata: [
+ '0x1',
+ '0x4b33a775b537a39c8960120806e815764f173e4fa76546e6706c31aa1b0ac4a',
+ '0x994f23fef04108984d50a4f870723cd46f95d592ed3de9a13f97d5c55846fb',
+ '0x9',
+ '0x1',
+ '0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8',
+ '0x1',
+ '0x62a2959fa6502b30cbfb51199fbbe72e72ee4f5a86ec754b4172c7d7beb6ff4',
+ '0x1',
+ '0x5f612ce',
+ '0x0',
+ '0x0',
+ '0x0',
+ ],
+ chain_id: '0x534e5f4d41494e',
+ nonce: '0xc',
+ sender_address: '0x1840b3c89a446c74a3962647a2a7fb449d83905c4511027dfa9e099c6886691',
+ version: 3,
+ },
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
@@ -27,17 +47,35 @@ describe('resource transaction', () => {
test('scan: required and optional params', async () => {
const response = await client.starknet.transaction.scan({
- account_address: 'account_address',
+ account_address: '0x62a2959fa6502b30cbfb51199fbbe72e72ee4f5a86ec754b4172c7d7beb6ff4',
chain: 'mainnet',
- metadata: { type: 'wallet', url: 'url' },
+ metadata: { type: 'wallet', url: 'giftnostra.com' },
transaction: {
- max_fee: 'max_fee',
- nonce: 'nonce',
- sender_address: 'sender_address',
- version: 1,
- calldata: ['string', 'string', 'string'],
+ calldata: [
+ '0x1',
+ '0x4b33a775b537a39c8960120806e815764f173e4fa76546e6706c31aa1b0ac4a',
+ '0x994f23fef04108984d50a4f870723cd46f95d592ed3de9a13f97d5c55846fb',
+ '0x9',
+ '0x1',
+ '0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8',
+ '0x1',
+ '0x62a2959fa6502b30cbfb51199fbbe72e72ee4f5a86ec754b4172c7d7beb6ff4',
+ '0x1',
+ '0x5f612ce',
+ '0x0',
+ '0x0',
+ '0x0',
+ ],
+ chain_id: '0x534e5f4d41494e',
+ nonce: '0xc',
+ sender_address: '0x1840b3c89a446c74a3962647a2a7fb449d83905c4511027dfa9e099c6886691',
+ version: 3,
+ account_deployment_data: ['string', 'string', 'string'],
+ nonce_data_availability_mode: 0,
+ paymaster_data: ['string', 'string', 'string'],
},
- options: ['validation'],
+ block_number: '0xa12e3',
+ options: ['validation', 'simulation'],
});
});
});
diff --git a/tests/api-resources/stellar/transaction.test.ts b/tests/api-resources/stellar/transaction.test.ts
old mode 100755
new mode 100644
diff --git a/tests/api-resources/token-bulk.test.ts b/tests/api-resources/token-bulk.test.ts
old mode 100755
new mode 100644
diff --git a/tests/api-resources/token.test.ts b/tests/api-resources/token.test.ts
old mode 100755
new mode 100644
diff --git a/tests/form.test.ts b/tests/form.test.ts
old mode 100755
new mode 100644
diff --git a/tests/index.test.ts b/tests/index.test.ts
old mode 100755
new mode 100644
diff --git a/tests/responses.test.ts b/tests/responses.test.ts
old mode 100755
new mode 100644
diff --git a/tests/stringifyQuery.test.ts b/tests/stringifyQuery.test.ts
old mode 100755
new mode 100644
diff --git a/tests/uploads.test.ts b/tests/uploads.test.ts
old mode 100755
new mode 100644
index 96a5928..cd25677
--- a/tests/uploads.test.ts
+++ b/tests/uploads.test.ts
@@ -54,4 +54,12 @@ describe('toFile', () => {
const file = await toFile(input);
expect(file.name).toEqual('uploads.test.ts');
});
+
+ it('does not copy File objects', async () => {
+ const input = new File(['foo'], 'input.jsonl', { type: 'jsonl' });
+ const file = await toFile(input);
+ expect(file).toBe(input);
+ expect(file.name).toEqual('input.jsonl');
+ expect(file.type).toBe('jsonl');
+ });
});
diff --git a/tsc-multi.json b/tsc-multi.json
old mode 100755
new mode 100644
diff --git a/tsconfig.build.json b/tsconfig.build.json
old mode 100755
new mode 100644
diff --git a/tsconfig.deno.json b/tsconfig.deno.json
old mode 100755
new mode 100644
diff --git a/tsconfig.dist-src.json b/tsconfig.dist-src.json
old mode 100755
new mode 100644
diff --git a/tsconfig.json b/tsconfig.json
old mode 100755
new mode 100644
diff --git a/yarn.lock b/yarn.lock
old mode 100755
new mode 100644
index 358dbf2..0f17a27
--- a/yarn.lock
+++ b/yarn.lock
@@ -1200,12 +1200,12 @@ brace-expansion@^2.0.1:
dependencies:
balanced-match "^1.0.0"
-braces@^3.0.2:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
- integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
+braces@^3.0.3:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
+ integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==
dependencies:
- fill-range "^7.0.1"
+ fill-range "^7.1.1"
browserslist@^4.22.2:
version "4.22.2"
@@ -1762,10 +1762,10 @@ file-entry-cache@^6.0.1:
dependencies:
flat-cache "^3.0.4"
-fill-range@^7.0.1:
- version "7.0.1"
- resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
- integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
+fill-range@^7.1.1:
+ version "7.1.1"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292"
+ integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==
dependencies:
to-regex-range "^5.0.1"
@@ -2638,11 +2638,11 @@ merge2@^1.3.0, merge2@^1.4.1:
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
micromatch@^4.0.4:
- version "4.0.5"
- resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6"
- integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==
+ version "4.0.8"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202"
+ integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==
dependencies:
- braces "^3.0.2"
+ braces "^3.0.3"
picomatch "^2.3.1"
mime-db@1.51.0: