Skip to content

Commit

Permalink
feat(api): api update (#313)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Nov 11, 2024
1 parent c16b46f commit 1a19626
Show file tree
Hide file tree
Showing 5 changed files with 157 additions and 204 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 19
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/new%2Fblockaid-8f7d9864c68d27433277000fd14bacc24ffbe9c8dfde41466764a18aee4f958d.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/new%2Fblockaid-9074805d4822d26da6e3f769edeb3bb4294de7586358fa0a4901990a405ab1e9.yml
38 changes: 17 additions & 21 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ const environments = {
client: 'https://client.blockaid.io',
};
type Environment = keyof typeof environments;

export interface ClientOptions {
/**
* Authentication method to api.blockaid.io
Expand Down Expand Up @@ -322,25 +321,6 @@ export class Blockaid extends Core.APIClient {
static fileFromPath = Uploads.fileFromPath;
}

export {
BlockaidError,
APIError,
APIConnectionError,
APIConnectionTimeoutError,
APIUserAbortError,
NotFoundError,
ConflictError,
RateLimitError,
BadRequestError,
AuthenticationError,
InternalServerError,
PermissionDeniedError,
UnprocessableEntityError,
} from './error';

export import toFile = Uploads.toFile;
export import fileFromPath = Uploads.fileFromPath;

Blockaid.Evm = Evm;
Blockaid.Solana = Solana;
Blockaid.Stellar = Stellar;
Expand All @@ -349,7 +329,6 @@ Blockaid.Starknet = Starknet;
Blockaid.Site = Site;
Blockaid.Token = Token;
Blockaid.TokenBulk = TokenBulk;

export declare namespace Blockaid {
export type RequestOptions = Core.RequestOptions;

Expand Down Expand Up @@ -453,4 +432,21 @@ export declare namespace Blockaid {
};
}

export { toFile, fileFromPath } from '@blockaid/client/uploads';
export {
BlockaidError,
APIError,
APIConnectionError,
APIConnectionTimeoutError,
APIUserAbortError,
NotFoundError,
ConflictError,
RateLimitError,
BadRequestError,
AuthenticationError,
InternalServerError,
PermissionDeniedError,
UnprocessableEntityError,
} from '@blockaid/client/error';

export default Blockaid;
65 changes: 31 additions & 34 deletions src/resources/bitcoin/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,29 @@ export interface TransactionScanResponse {
* Simulation result; Only present if simulation option is included in the request
*/
simulation?:
| TransactionScanResponse.BitcoinBitcoinSimulationSchemaTypeAnnotatedStrSkipValidationPlainSerializerGetPydanticSchemaUnionAnnotatedAccountSingleAssetDiffSchemaTypeNativeAssetDetailsSchemaNativeDiffSchemaFieldInfoAnnotationNoneTypeRequiredTrueTitleNativeAssetDiffAnnotatedAccountSingleAssetDiffSchemaTypeOrdinalDetailsSchemaOrdinalDiffSchemaFieldInfoAnnotationNoneTypeRequiredTrueTitleOrdinalAssetDiffAnnotatedAccountSingleAssetDiffSchemaTypeRuneDetailsSchemaRuneDiffSchemaFieldInfoAnnotationNoneTypeRequiredTrueTitleRunesAssetDiffEmptyModelEmptyModelAddressDetailsBaseSchemaAnnotatedStrSkipValidationPlainSerializerGetPydanticSchemaAnnotatedEmptyModelSimulationSchemaConfiguration
| TransactionScanResponse.BitcoinSimulationResponse
| TransactionScanResponse.BitcoinSimulationErrorSchema
| null;

/**
* Validation result; Only present if validation option is included in the request
*/
validation?:
| TransactionScanResponse.BitcoinValidationResultSchemaTypeAnnotatedStrSkipValidationPlainSerializerGetPydanticSchema
| TransactionScanResponse.BitcoinValidationResult
| TransactionScanResponse.BitcoinValidationErrorSchema
| null;
}

export namespace TransactionScanResponse {
export interface BitcoinBitcoinSimulationSchemaTypeAnnotatedStrSkipValidationPlainSerializerGetPydanticSchemaUnionAnnotatedAccountSingleAssetDiffSchemaTypeNativeAssetDetailsSchemaNativeDiffSchemaFieldInfoAnnotationNoneTypeRequiredTrueTitleNativeAssetDiffAnnotatedAccountSingleAssetDiffSchemaTypeOrdinalDetailsSchemaOrdinalDiffSchemaFieldInfoAnnotationNoneTypeRequiredTrueTitleOrdinalAssetDiffAnnotatedAccountSingleAssetDiffSchemaTypeRuneDetailsSchemaRuneDiffSchemaFieldInfoAnnotationNoneTypeRequiredTrueTitleRunesAssetDiffEmptyModelEmptyModelAddressDetailsBaseSchemaAnnotatedStrSkipValidationPlainSerializerGetPydanticSchemaAnnotatedEmptyModelSimulationSchemaConfiguration {
export interface BitcoinSimulationResponse {
status: 'Success';

account_summary?: null;

/**
* Details of addresses involved in the transaction
*/
address_details?: Array<BitcoinBitcoinSimulationSchemaTypeAnnotatedStrSkipValidationPlainSerializerGetPydanticSchemaUnionAnnotatedAccountSingleAssetDiffSchemaTypeNativeAssetDetailsSchemaNativeDiffSchemaFieldInfoAnnotationNoneTypeRequiredTrueTitleNativeAssetDiffAnnotatedAccountSingleAssetDiffSchemaTypeOrdinalDetailsSchemaOrdinalDiffSchemaFieldInfoAnnotationNoneTypeRequiredTrueTitleOrdinalAssetDiffAnnotatedAccountSingleAssetDiffSchemaTypeRuneDetailsSchemaRuneDiffSchemaFieldInfoAnnotationNoneTypeRequiredTrueTitleRunesAssetDiffEmptyModelEmptyModelAddressDetailsBaseSchemaAnnotatedStrSkipValidationPlainSerializerGetPydanticSchemaAnnotatedEmptyModelSimulationSchemaConfiguration.AddressDetail>;
address_details?: Array<BitcoinSimulationResponse.AddressDetail>;

/**
* Mapping between the address of an account to the assets diff during the
Expand All @@ -48,28 +48,28 @@ export namespace TransactionScanResponse {
assets_diffs?: Record<
string,
Array<
| BitcoinBitcoinSimulationSchemaTypeAnnotatedStrSkipValidationPlainSerializerGetPydanticSchemaUnionAnnotatedAccountSingleAssetDiffSchemaTypeNativeAssetDetailsSchemaNativeDiffSchemaFieldInfoAnnotationNoneTypeRequiredTrueTitleNativeAssetDiffAnnotatedAccountSingleAssetDiffSchemaTypeOrdinalDetailsSchemaOrdinalDiffSchemaFieldInfoAnnotationNoneTypeRequiredTrueTitleOrdinalAssetDiffAnnotatedAccountSingleAssetDiffSchemaTypeRuneDetailsSchemaRuneDiffSchemaFieldInfoAnnotationNoneTypeRequiredTrueTitleRunesAssetDiffEmptyModelEmptyModelAddressDetailsBaseSchemaAnnotatedStrSkipValidationPlainSerializerGetPydanticSchemaAnnotatedEmptyModelSimulationSchemaConfiguration.BitcoinAccountSingleAssetDiffSchemaTypeNativeAssetDetailsSchemaNativeDiffSchema
| BitcoinBitcoinSimulationSchemaTypeAnnotatedStrSkipValidationPlainSerializerGetPydanticSchemaUnionAnnotatedAccountSingleAssetDiffSchemaTypeNativeAssetDetailsSchemaNativeDiffSchemaFieldInfoAnnotationNoneTypeRequiredTrueTitleNativeAssetDiffAnnotatedAccountSingleAssetDiffSchemaTypeOrdinalDetailsSchemaOrdinalDiffSchemaFieldInfoAnnotationNoneTypeRequiredTrueTitleOrdinalAssetDiffAnnotatedAccountSingleAssetDiffSchemaTypeRuneDetailsSchemaRuneDiffSchemaFieldInfoAnnotationNoneTypeRequiredTrueTitleRunesAssetDiffEmptyModelEmptyModelAddressDetailsBaseSchemaAnnotatedStrSkipValidationPlainSerializerGetPydanticSchemaAnnotatedEmptyModelSimulationSchemaConfiguration.BitcoinAccountSingleAssetDiffSchemaTypeOrdinalDetailsSchemaOrdinalDiffSchema
| BitcoinBitcoinSimulationSchemaTypeAnnotatedStrSkipValidationPlainSerializerGetPydanticSchemaUnionAnnotatedAccountSingleAssetDiffSchemaTypeNativeAssetDetailsSchemaNativeDiffSchemaFieldInfoAnnotationNoneTypeRequiredTrueTitleNativeAssetDiffAnnotatedAccountSingleAssetDiffSchemaTypeOrdinalDetailsSchemaOrdinalDiffSchemaFieldInfoAnnotationNoneTypeRequiredTrueTitleOrdinalAssetDiffAnnotatedAccountSingleAssetDiffSchemaTypeRuneDetailsSchemaRuneDiffSchemaFieldInfoAnnotationNoneTypeRequiredTrueTitleRunesAssetDiffEmptyModelEmptyModelAddressDetailsBaseSchemaAnnotatedStrSkipValidationPlainSerializerGetPydanticSchemaAnnotatedEmptyModelSimulationSchemaConfiguration.BitcoinAccountSingleAssetDiffSchemaTypeRuneDetailsSchemaRuneDiffSchema
| BitcoinSimulationResponse.BitcoinNativeAssetDiff
| BitcoinSimulationResponse.BitcoinOrdinalAssetDiff
| BitcoinSimulationResponse.BitcoinRunesAssetDiff
>
>;
}

export namespace BitcoinBitcoinSimulationSchemaTypeAnnotatedStrSkipValidationPlainSerializerGetPydanticSchemaUnionAnnotatedAccountSingleAssetDiffSchemaTypeNativeAssetDetailsSchemaNativeDiffSchemaFieldInfoAnnotationNoneTypeRequiredTrueTitleNativeAssetDiffAnnotatedAccountSingleAssetDiffSchemaTypeOrdinalDetailsSchemaOrdinalDiffSchemaFieldInfoAnnotationNoneTypeRequiredTrueTitleOrdinalAssetDiffAnnotatedAccountSingleAssetDiffSchemaTypeRuneDetailsSchemaRuneDiffSchemaFieldInfoAnnotationNoneTypeRequiredTrueTitleRunesAssetDiffEmptyModelEmptyModelAddressDetailsBaseSchemaAnnotatedStrSkipValidationPlainSerializerGetPydanticSchemaAnnotatedEmptyModelSimulationSchemaConfiguration {
export namespace BitcoinSimulationResponse {
export interface AddressDetail {
/**
* Encoded public key of the account
*/
account_address: string;
account_address: unknown;

/**
* Description of the account
*/
description?: string | null;
}

export interface BitcoinAccountSingleAssetDiffSchemaTypeNativeAssetDetailsSchemaNativeDiffSchema {
asset: BitcoinAccountSingleAssetDiffSchemaTypeNativeAssetDetailsSchemaNativeDiffSchema.Asset;
export interface BitcoinNativeAssetDiff {
asset: BitcoinNativeAssetDiff.Asset;

/**
* The type of the assets in this diff
Expand All @@ -79,15 +79,15 @@ export namespace TransactionScanResponse {
/**
* Details of the incoming transfer
*/
in?: BitcoinAccountSingleAssetDiffSchemaTypeNativeAssetDetailsSchemaNativeDiffSchema.In | null;
in?: BitcoinNativeAssetDiff.In | null;

/**
* Details of the outgoing transfer
*/
out?: BitcoinAccountSingleAssetDiffSchemaTypeNativeAssetDetailsSchemaNativeDiffSchema.Out | null;
out?: BitcoinNativeAssetDiff.Out | null;
}

export namespace BitcoinAccountSingleAssetDiffSchemaTypeNativeAssetDetailsSchemaNativeDiffSchema {
export namespace BitcoinNativeAssetDiff {
export interface Asset {
/**
* URL of the asset's logo
Expand Down Expand Up @@ -166,8 +166,8 @@ export namespace TransactionScanResponse {
}
}

export interface BitcoinAccountSingleAssetDiffSchemaTypeOrdinalDetailsSchemaOrdinalDiffSchema {
asset: BitcoinAccountSingleAssetDiffSchemaTypeOrdinalDetailsSchemaOrdinalDiffSchema.Asset;
export interface BitcoinOrdinalAssetDiff {
asset: BitcoinOrdinalAssetDiff.Asset;

/**
* The type of the assets in this diff
Expand All @@ -177,15 +177,15 @@ export namespace TransactionScanResponse {
/**
* Details of the incoming transfer
*/
in?: BitcoinAccountSingleAssetDiffSchemaTypeOrdinalDetailsSchemaOrdinalDiffSchema.In | null;
in?: BitcoinOrdinalAssetDiff.In | null;

/**
* Details of the outgoing transfer
*/
out?: BitcoinAccountSingleAssetDiffSchemaTypeOrdinalDetailsSchemaOrdinalDiffSchema.Out | null;
out?: BitcoinOrdinalAssetDiff.Out | null;
}

export namespace BitcoinAccountSingleAssetDiffSchemaTypeOrdinalDetailsSchemaOrdinalDiffSchema {
export namespace BitcoinOrdinalAssetDiff {
export interface Asset {
/**
* token's name
Expand Down Expand Up @@ -264,8 +264,8 @@ export namespace TransactionScanResponse {
}
}

export interface BitcoinAccountSingleAssetDiffSchemaTypeRuneDetailsSchemaRuneDiffSchema {
asset: BitcoinAccountSingleAssetDiffSchemaTypeRuneDetailsSchemaRuneDiffSchema.Asset;
export interface BitcoinRunesAssetDiff {
asset: BitcoinRunesAssetDiff.Asset;

/**
* The type of the assets in this diff
Expand All @@ -275,15 +275,15 @@ export namespace TransactionScanResponse {
/**
* Details of the incoming transfer
*/
in?: BitcoinAccountSingleAssetDiffSchemaTypeRuneDetailsSchemaRuneDiffSchema.In | null;
in?: BitcoinRunesAssetDiff.In | null;

/**
* Details of the outgoing transfer
*/
out?: BitcoinAccountSingleAssetDiffSchemaTypeRuneDetailsSchemaRuneDiffSchema.Out | null;
out?: BitcoinRunesAssetDiff.Out | null;
}

export namespace BitcoinAccountSingleAssetDiffSchemaTypeRuneDetailsSchemaRuneDiffSchema {
export namespace BitcoinRunesAssetDiff {
export interface Asset {
/**
* The Rune ID
Expand Down Expand Up @@ -382,7 +382,7 @@ export namespace TransactionScanResponse {
status: 'Error';
}

export interface BitcoinValidationResultSchemaTypeAnnotatedStrSkipValidationPlainSerializerGetPydanticSchema {
export interface BitcoinValidationResult {
/**
* A textual classification that can be presented to the user explaining the
* reason.
Expand All @@ -394,10 +394,7 @@ export namespace TransactionScanResponse {
*/
description: string;

/**
* A list of features about this transaction explaining the validation
*/
features: Array<BitcoinValidationResultSchemaTypeAnnotatedStrSkipValidationPlainSerializerGetPydanticSchema.Feature>;
features: Array<BitcoinValidationResult.Feature>;

/**
* A textual description about the reasons the transaction was flagged with
Expand All @@ -413,7 +410,7 @@ export namespace TransactionScanResponse {
status: 'Success';
}

export namespace BitcoinValidationResultSchemaTypeAnnotatedStrSkipValidationPlainSerializerGetPydanticSchema {
export namespace BitcoinValidationResult {
export interface Feature {
/**
* Address the feature refers to
Expand Down Expand Up @@ -453,8 +450,8 @@ export interface TransactionScanParams {
* Metadata
*/
metadata:
| TransactionScanParams.BitcoinblockaidApplicationRunnerAppSchemasTransactionScanningAPIWalletRequestMetadata
| TransactionScanParams.BitcoinblockaidApplicationRunnerAppSchemasTransactionScanningAPIInAppRequestMetadata;
| TransactionScanParams.BitcoinWalletRequestMetadata
| TransactionScanParams.BitcoinInAppRequestMetadata;

transaction: string;

Expand All @@ -469,7 +466,7 @@ export interface TransactionScanParams {
}

export namespace TransactionScanParams {
export interface BitcoinblockaidApplicationRunnerAppSchemasTransactionScanningAPIWalletRequestMetadata {
export interface BitcoinWalletRequestMetadata {
/**
* Metadata for wallet requests
*/
Expand All @@ -481,7 +478,7 @@ export namespace TransactionScanParams {
url: string;
}

export interface BitcoinblockaidApplicationRunnerAppSchemasTransactionScanningAPIInAppRequestMetadata {
export interface BitcoinInAppRequestMetadata {
/**
* Metadata for in-app requests
*/
Expand Down
Loading

0 comments on commit 1a19626

Please sign in to comment.