Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed May 5, 2024
1 parent 6e07c4b commit fed3547
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 56 deletions.
1 change: 1 addition & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Types:
- <code><a href="./src/resources/evm/evm.ts">Erc721Exposure</a></code>
- <code><a href="./src/resources/evm/evm.ts">Erc721TokenDetails</a></code>
- <code><a href="./src/resources/evm/evm.ts">Metadata</a></code>
- <code><a href="./src/resources/evm/evm.ts">NativeAssetDetails</a></code>
- <code><a href="./src/resources/evm/evm.ts">NativeDiff</a></code>
- <code><a href="./src/resources/evm/evm.ts">NonercTokenDetails</a></code>
- <code><a href="./src/resources/evm/evm.ts">TransactionBulkResponse</a></code>
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ export namespace Blockaid {
export import Erc721Exposure = API.Erc721Exposure;
export import Erc721TokenDetails = API.Erc721TokenDetails;
export import Metadata = API.Metadata;
export import NativeAssetDetails = API.NativeAssetDetails;
export import NativeDiff = API.NativeDiff;
export import NonercTokenDetails = API.NonercTokenDetails;
export import TransactionBulkResponse = API.TransactionBulkResponse;
Expand Down
84 changes: 28 additions & 56 deletions src/resources/evm/evm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,31 @@ export interface Metadata {
domain: string;
}

export interface NativeAssetDetails {
chain_id: number;

chain_name: string;

decimals: number;

logo_url: string;

/**
* asset type.
*/
type: 'NATIVE';

/**
* string represents the name of the asset
*/
name?: string;

/**
* asset's symbol name
*/
symbol?: string;
}

export interface NativeDiff {
/**
* value before divided by decimal, that was transferred from this address
Expand Down Expand Up @@ -560,7 +585,7 @@ export namespace TransactionSimulation {
| EvmAPI.Erc1155TokenDetails
| EvmAPI.Erc721TokenDetails
| EvmAPI.NonercTokenDetails
| AssetsDiff.NativeAssetDetails;
| EvmAPI.NativeAssetDetails;

/**
* amount of the asset that was transferred to the address in this transaction
Expand All @@ -572,33 +597,6 @@ export namespace TransactionSimulation {
*/
out: Array<EvmAPI.Erc1155Diff | EvmAPI.Erc721Diff | EvmAPI.Erc20Diff | EvmAPI.NativeDiff>;
}

export namespace AssetsDiff {
export interface NativeAssetDetails {
chain_id: number;

chain_name: string;

decimals: number;

logo_url: string;

/**
* asset type.
*/
type: 'NATIVE';

/**
* string represents the name of the asset
*/
name?: string;

/**
* asset's symbol name
*/
symbol?: string;
}
}
}

export interface AddressDetails {
Expand All @@ -622,7 +620,7 @@ export namespace TransactionSimulation {
| EvmAPI.Erc1155TokenDetails
| EvmAPI.Erc721TokenDetails
| EvmAPI.NonercTokenDetails
| AssetsDiff.NativeAssetDetails;
| EvmAPI.NativeAssetDetails;

/**
* amount of the asset that was transferred to the address in this transaction
Expand All @@ -634,33 +632,6 @@ export namespace TransactionSimulation {
*/
out: Array<EvmAPI.Erc1155Diff | EvmAPI.Erc721Diff | EvmAPI.Erc20Diff | EvmAPI.NativeDiff>;
}

export namespace AssetsDiff {
export interface NativeAssetDetails {
chain_id: number;

chain_name: string;

decimals: number;

logo_url: string;

/**
* asset type.
*/
type: 'NATIVE';

/**
* string represents the name of the asset
*/
name?: string;

/**
* asset's symbol name
*/
symbol?: string;
}
}
}

export interface TransactionValidation {
Expand Down Expand Up @@ -714,6 +685,7 @@ export namespace Evm {
export import Erc721Exposure = EvmAPI.Erc721Exposure;
export import Erc721TokenDetails = EvmAPI.Erc721TokenDetails;
export import Metadata = EvmAPI.Metadata;
export import NativeAssetDetails = EvmAPI.NativeAssetDetails;
export import NativeDiff = EvmAPI.NativeDiff;
export import NonercTokenDetails = EvmAPI.NonercTokenDetails;
export import TransactionBulkResponse = EvmAPI.TransactionBulkResponse;
Expand Down
1 change: 1 addition & 0 deletions src/resources/evm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export {
Erc721Exposure,
Erc721TokenDetails,
Metadata,
NativeAssetDetails,
NativeDiff,
NonercTokenDetails,
TransactionBulkResponse,
Expand Down
1 change: 1 addition & 0 deletions src/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export {
Erc721Exposure,
Erc721TokenDetails,
Metadata,
NativeAssetDetails,
NativeDiff,
NonercTokenDetails,
TransactionBulkResponse,
Expand Down

0 comments on commit fed3547

Please sign in to comment.