diff --git a/.stats.yml b/.stats.yml index e508d94..64d4b01 100755 --- 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-ee82f1cd6cc69f1cc2a54c096e0e5ffe1ae521a4c079a3e445bfe5de700a1d76.yml diff --git a/api.md b/api.md index 18eee99..892305a 100755 --- a/api.md +++ b/api.md @@ -167,13 +167,9 @@ Methods: Types: -- StarknetErc1155Details - StarknetErc1155Diff -- StarknetErc20Details - StarknetErc20Diff -- StarknetErc721Details - StarknetErc721Diff -- StarknetNativeDiff ## Transaction diff --git a/src/index.ts b/src/index.ts index 610c0c7..aa06061 100755 --- a/src/index.ts +++ b/src/index.ts @@ -326,13 +326,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/resources/index.ts b/src/resources/index.ts index c6731a1..a0fd644 100755 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -72,16 +72,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/starknet/index.ts b/src/resources/starknet/index.ts index 0aace7f..3a1a707 100755 --- 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 index 086bf9c..3a5d01a 100755 --- 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 index c78ca4d..036b194 100755 --- 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/tests/api-resources/starknet/transaction.test.ts b/tests/api-resources/starknet/transaction.test.ts index 9317722..6742dea 100755 --- a/tests/api-resources/starknet/transaction.test.ts +++ b/tests/api-resources/starknet/transaction.test.ts @@ -37,6 +37,7 @@ describe('resource transaction', () => { version: 1, calldata: ['string', 'string', 'string'], }, + block_number: 'block_number', options: ['validation'], }); });