Skip to content

Commit

Permalink
feat(api): manual updates (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Nov 12, 2024
1 parent 85b6f49 commit 9579ef1
Show file tree
Hide file tree
Showing 14 changed files with 9 additions and 481 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: 22
configured_endpoints: 19
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/new%2Fblockaid-a8d116e345ec36054b1a8cc6fa98564ede39989a9b9ce1383f9e37738dcf33ff.yml
9 changes: 0 additions & 9 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,8 @@ Types:

## Transaction

Types:

- <code><a href="./src/resources/stellar/transaction.ts">TransactionReportResponse</a></code>

Methods:

- <code title="post /v0/stellar/transaction/report">client.stellar.transaction.<a href="./src/resources/stellar/transaction.ts">report</a>({ ...params }) -> TransactionReportResponse</code>
- <code title="post /v0/stellar/transaction/scan">client.stellar.transaction.<a href="./src/resources/stellar/transaction.ts">scan</a>({ ...params }) -> StellarTransactionScanResponse</code>

# Bitcoin
Expand All @@ -164,12 +159,10 @@ Methods:

Types:

- <code><a href="./src/resources/bitcoin/transaction.ts">TransactionReportResponse</a></code>
- <code><a href="./src/resources/bitcoin/transaction.ts">TransactionScanResponse</a></code>

Methods:

- <code title="post /v0/bitcoin/transaction/report">client.bitcoin.transaction.<a href="./src/resources/bitcoin/transaction.ts">report</a>({ ...params }) -> TransactionReportResponse</code>
- <code title="post /v0/bitcoin/transaction/scan">client.bitcoin.transaction.<a href="./src/resources/bitcoin/transaction.ts">scan</a>({ ...params }) -> TransactionScanResponse</code>

# Starknet
Expand All @@ -187,12 +180,10 @@ Types:

Types:

- <code><a href="./src/resources/starknet/transaction.ts">TransactionReportResponse</a></code>
- <code><a href="./src/resources/starknet/transaction.ts">TransactionScanResponse</a></code>

Methods:

- <code title="post /v0/starknet/transaction/report">client.starknet.transaction.<a href="./src/resources/starknet/transaction.ts">report</a>({ ...params }) -> TransactionReportResponse</code>
- <code title="post /v0/starknet/transaction/scan">client.starknet.transaction.<a href="./src/resources/starknet/transaction.ts">scan</a>({ ...params }) -> TransactionScanResponse</code>

# Site
Expand Down
10 changes: 1 addition & 9 deletions src/resources/bitcoin/bitcoin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@

import { APIResource } from '../../resource';
import * as TransactionAPI from './transaction';
import {
Transaction,
TransactionReportParams,
TransactionReportResponse,
TransactionScanParams,
TransactionScanResponse,
} from './transaction';
import { Transaction, TransactionScanParams, TransactionScanResponse } from './transaction';

export class Bitcoin extends APIResource {
transaction: TransactionAPI.Transaction = new TransactionAPI.Transaction(this._client);
Expand All @@ -19,9 +13,7 @@ Bitcoin.Transaction = Transaction;
export declare namespace Bitcoin {
export {
Transaction as Transaction,
type TransactionReportResponse as TransactionReportResponse,
type TransactionScanResponse as TransactionScanResponse,
type TransactionReportParams as TransactionReportParams,
type TransactionScanParams as TransactionScanParams,
};
}
8 changes: 1 addition & 7 deletions src/resources/bitcoin/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export { Bitcoin } from './bitcoin';
export {
Transaction,
type TransactionReportResponse,
type TransactionScanResponse,
type TransactionReportParams,
type TransactionScanParams,
} from './transaction';
export { Transaction, type TransactionScanResponse, type TransactionScanParams } from './transaction';
83 changes: 0 additions & 83 deletions src/resources/bitcoin/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@ import { APIResource } from '../../resource';
import * as Core from '../../core';

export class Transaction extends APIResource {
/**
* Report Transaction
*/
report(
body: TransactionReportParams,
options?: Core.RequestOptions,
): Core.APIPromise<TransactionReportResponse> {
return this._client.post('/v0/bitcoin/transaction/report', { body, ...options });
}

/**
* Scan Transaction
*/
Expand All @@ -22,8 +12,6 @@ export class Transaction extends APIResource {
}
}

export type TransactionReportResponse = number;

export interface TransactionScanResponse {
/**
* Simulation result; Only present if simulation option is included in the request
Expand Down Expand Up @@ -453,75 +441,6 @@ export namespace TransactionScanResponse {
}
}

export interface TransactionReportParams {
details: string;

event: 'should_be_malicious' | 'should_be_benign';

report:
| TransactionReportParams.BitcoinAppealRequestID
| TransactionReportParams.BitcoinAppealTransactionDataReport;
}

export namespace TransactionReportParams {
export interface BitcoinAppealRequestID {
id: string;

type?: 'request_id';
}

export interface BitcoinAppealTransactionDataReport {
params: BitcoinAppealTransactionDataReport.Params;

type?: 'params';
}

export namespace BitcoinAppealTransactionDataReport {
export interface Params {
account_address: string;

chain: 'bitcoin';

/**
* Metadata
*/
metadata: Params.BitcoinWalletRequestMetadata | Params.BitcoinInAppRequestMetadata;

transaction: string;

/**
* List of options to include 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'>;
}

export namespace Params {
export interface BitcoinWalletRequestMetadata {
/**
* Metadata for wallet requests
*/
type: 'wallet';

/**
* URL of the dApp originating the transaction
*/
url: string;
}

export interface BitcoinInAppRequestMetadata {
/**
* Metadata for in-app requests
*/
type?: 'in_app';
}
}
}
}

export interface TransactionScanParams {
account_address: string;

Expand Down Expand Up @@ -569,9 +488,7 @@ export namespace TransactionScanParams {

export declare namespace Transaction {
export {
type TransactionReportResponse as TransactionReportResponse,
type TransactionScanResponse as TransactionScanResponse,
type TransactionReportParams as TransactionReportParams,
type TransactionScanParams as TransactionScanParams,
};
}
8 changes: 1 addition & 7 deletions src/resources/starknet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,4 @@ export {
type StarknetErc721Details,
type StarknetErc721Diff,
} from './starknet';
export {
Transaction,
type TransactionReportResponse,
type TransactionScanResponse,
type TransactionReportParams,
type TransactionScanParams,
} from './transaction';
export { Transaction, type TransactionScanResponse, type TransactionScanParams } from './transaction';
10 changes: 1 addition & 9 deletions src/resources/starknet/starknet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@

import { APIResource } from '../../resource';
import * as TransactionAPI from './transaction';
import {
Transaction,
TransactionReportParams,
TransactionReportResponse,
TransactionScanParams,
TransactionScanResponse,
} from './transaction';
import { Transaction, TransactionScanParams, TransactionScanResponse } from './transaction';

export class Starknet extends APIResource {
transaction: TransactionAPI.Transaction = new TransactionAPI.Transaction(this._client);
Expand Down Expand Up @@ -175,9 +169,7 @@ export declare namespace Starknet {

export {
Transaction as Transaction,
type TransactionReportResponse as TransactionReportResponse,
type TransactionScanResponse as TransactionScanResponse,
type TransactionReportParams as TransactionReportParams,
type TransactionScanParams as TransactionScanParams,
};
}
Loading

0 comments on commit 9579ef1

Please sign in to comment.