alchemy-sdk
Advanced tools
Comparing version 2.3.1 to 2.4.0
@@ -9,2 +9,11 @@ # Changelog for Alchemy SDK for JavaScript | ||
## 2.4.0 | ||
### Major Changes | ||
- Added `TransactNamespace.simulateAssetChanges()` to simulate a transaction and return a list of asset changes. | ||
- Added `TransactNamespace.simulateExecution()` to simulate a transaction and return a list of decoded logs and traces. | ||
### Minor Changes | ||
## 2.3.1 | ||
@@ -11,0 +20,0 @@ |
import { TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; | ||
import type { BigNumber } from '@ethersproject/bignumber'; | ||
import { Deferrable } from '@ethersproject/properties'; | ||
import { SendPrivateTransactionOptions } from '../types/types'; | ||
import { BlockIdentifier, DebugTransaction, SendPrivateTransactionOptions, SimulateAssetChangesResponse, SimulateExecutionResponse } from '../types/types'; | ||
/** | ||
@@ -41,2 +41,25 @@ * The Transact namespace contains methods used for sending transactions and | ||
/** | ||
* Simulates the asset changes resulting from a single transaction. | ||
* | ||
* Returns list of asset changes that occurred during the transaction | ||
* simulation. Note that this method does not run the transaction on the | ||
* blockchain. | ||
* | ||
* @param transaction The transaction to simulate. | ||
* @param blockIdentifier Optional block identifier to simulate the | ||
* transaction in. | ||
*/ | ||
simulateAssetChanges(transaction: DebugTransaction, blockIdentifier?: BlockIdentifier): Promise<SimulateAssetChangesResponse>; | ||
/** | ||
* Simulates a single transaction and the resulting and returns list of | ||
* decoded traces and logs that occurred during the transaction simulation. | ||
* | ||
* Note that this method does not run the transaction on the blockchain. | ||
* | ||
* @param transaction The transaction to simulate. | ||
* @param blockIdentifier Optional block identifier to simulate the | ||
* transaction in. | ||
*/ | ||
simulateExecution(transaction: DebugTransaction, blockIdentifier?: BlockIdentifier): Promise<SimulateExecutionResponse>; | ||
/** | ||
* Returns the transaction with hash or null if the transaction is unknown. | ||
@@ -43,0 +66,0 @@ * |
@@ -14,1 +14,3 @@ import { BaseNft, Nft, NftContract } from '../api/nft'; | ||
export declare const IS_BROWSER: boolean; | ||
/** Recursively converts all `null` fields to `undefined. */ | ||
export declare function nullsToUndefined<T>(obj: T): any; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "2.3.1"; | ||
export declare const VERSION = "2.4.0"; |
@@ -6,3 +6,3 @@ 'use strict'; | ||
var utils = require('./api/utils'); | ||
var index = require('./index-2b1b81af.js'); | ||
var index = require('./index-6b68ece6.js'); | ||
require('@ethersproject/bignumber'); | ||
@@ -56,2 +56,6 @@ require('axios'); | ||
exports.ContractFactory = index.ContractFactory; | ||
Object.defineProperty(exports, 'DebugCallType', { | ||
enumerable: true, | ||
get: function () { return index.DebugCallType; } | ||
}); | ||
Object.defineProperty(exports, 'DebugTracerType', { | ||
@@ -61,2 +65,6 @@ enumerable: true, | ||
}); | ||
Object.defineProperty(exports, 'DecodingAuthority', { | ||
enumerable: true, | ||
get: function () { return index.DecodingAuthority; } | ||
}); | ||
Object.defineProperty(exports, 'GasOptimizedTransactionStatus', { | ||
@@ -106,2 +114,10 @@ enumerable: true, | ||
}); | ||
Object.defineProperty(exports, 'SimulateAssetType', { | ||
enumerable: true, | ||
get: function () { return index.SimulateAssetType; } | ||
}); | ||
Object.defineProperty(exports, 'SimulateChangeType', { | ||
enumerable: true, | ||
get: function () { return index.SimulateChangeType; } | ||
}); | ||
Object.defineProperty(exports, 'SortingOrder', { | ||
@@ -108,0 +124,0 @@ enumerable: true, |
import { TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; | ||
import type { BigNumber } from '@ethersproject/bignumber'; | ||
import { Deferrable } from '@ethersproject/properties'; | ||
import { SendPrivateTransactionOptions } from '../types/types'; | ||
import { BlockIdentifier, DebugTransaction, SendPrivateTransactionOptions, SimulateAssetChangesResponse, SimulateExecutionResponse } from '../types/types'; | ||
/** | ||
@@ -41,2 +41,25 @@ * The Transact namespace contains methods used for sending transactions and | ||
/** | ||
* Simulates the asset changes resulting from a single transaction. | ||
* | ||
* Returns list of asset changes that occurred during the transaction | ||
* simulation. Note that this method does not run the transaction on the | ||
* blockchain. | ||
* | ||
* @param transaction The transaction to simulate. | ||
* @param blockIdentifier Optional block identifier to simulate the | ||
* transaction in. | ||
*/ | ||
simulateAssetChanges(transaction: DebugTransaction, blockIdentifier?: BlockIdentifier): Promise<SimulateAssetChangesResponse>; | ||
/** | ||
* Simulates a single transaction and the resulting and returns list of | ||
* decoded traces and logs that occurred during the transaction simulation. | ||
* | ||
* Note that this method does not run the transaction on the blockchain. | ||
* | ||
* @param transaction The transaction to simulate. | ||
* @param blockIdentifier Optional block identifier to simulate the | ||
* transaction in. | ||
*/ | ||
simulateExecution(transaction: DebugTransaction, blockIdentifier?: BlockIdentifier): Promise<SimulateExecutionResponse>; | ||
/** | ||
* Returns the transaction with hash or null if the transaction is unknown. | ||
@@ -43,0 +66,0 @@ * |
@@ -14,1 +14,3 @@ import { BaseNft, Nft, NftContract } from '../api/nft'; | ||
export declare const IS_BROWSER: boolean; | ||
/** Recursively converts all `null` fields to `undefined. */ | ||
export declare function nullsToUndefined<T>(obj: T): any; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "2.3.1"; | ||
export declare const VERSION = "2.4.0"; |
import { TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; | ||
import type { BigNumber } from '@ethersproject/bignumber'; | ||
import { Deferrable } from '@ethersproject/properties'; | ||
import { SendPrivateTransactionOptions } from '../types/types'; | ||
import { BlockIdentifier, DebugTransaction, SendPrivateTransactionOptions, SimulateAssetChangesResponse, SimulateExecutionResponse } from '../types/types'; | ||
/** | ||
@@ -41,2 +41,25 @@ * The Transact namespace contains methods used for sending transactions and | ||
/** | ||
* Simulates the asset changes resulting from a single transaction. | ||
* | ||
* Returns list of asset changes that occurred during the transaction | ||
* simulation. Note that this method does not run the transaction on the | ||
* blockchain. | ||
* | ||
* @param transaction The transaction to simulate. | ||
* @param blockIdentifier Optional block identifier to simulate the | ||
* transaction in. | ||
*/ | ||
simulateAssetChanges(transaction: DebugTransaction, blockIdentifier?: BlockIdentifier): Promise<SimulateAssetChangesResponse>; | ||
/** | ||
* Simulates a single transaction and the resulting and returns list of | ||
* decoded traces and logs that occurred during the transaction simulation. | ||
* | ||
* Note that this method does not run the transaction on the blockchain. | ||
* | ||
* @param transaction The transaction to simulate. | ||
* @param blockIdentifier Optional block identifier to simulate the | ||
* transaction in. | ||
*/ | ||
simulateExecution(transaction: DebugTransaction, blockIdentifier?: BlockIdentifier): Promise<SimulateExecutionResponse>; | ||
/** | ||
* Returns the transaction with hash or null if the transaction is unknown. | ||
@@ -43,0 +66,0 @@ * |
@@ -14,1 +14,3 @@ import { BaseNft, Nft, NftContract } from '../api/nft'; | ||
export declare const IS_BROWSER: boolean; | ||
/** Recursively converts all `null` fields to `undefined. */ | ||
export declare function nullsToUndefined<T>(obj: T): any; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "2.3.1"; | ||
export declare const VERSION = "2.4.0"; |
import * as utils from './api/utils'; | ||
export { utils as Utils }; | ||
export { m as Alchemy, j as AlchemySubscription, r as AssetTransfersCategory, u as AssetTransfersOrder, L as CommitmentLevel, o as Contract, p as ContractFactory, M as DebugTracerType, H as GasOptimizedTransactionStatus, N as Network, y as NftExcludeFilters, z as NftFilters, B as NftOrdering, F as NftSaleMarketplace, G as NftSaleTakerType, x as NftSpamClassification, w as NftTokenType, O as OpenSeaSafelistRequestStatus, R as RefreshState, S as SortingOrder, T as TokenBalanceType, W as Wallet, K as WebhookType, J as WebhookVersion, f as fromHex, q as isHex, s as setLogLevel, t as toHex } from './index-da5d050b.js'; | ||
export { m as Alchemy, j as AlchemySubscription, r as AssetTransfersCategory, u as AssetTransfersOrder, U as CommitmentLevel, o as Contract, p as ContractFactory, L as DebugCallType, X as DebugTracerType, K as DecodingAuthority, M as GasOptimizedTransactionStatus, N as Network, y as NftExcludeFilters, z as NftFilters, B as NftOrdering, F as NftSaleMarketplace, G as NftSaleTakerType, x as NftSpamClassification, w as NftTokenType, O as OpenSeaSafelistRequestStatus, R as RefreshState, H as SimulateAssetType, J as SimulateChangeType, S as SortingOrder, T as TokenBalanceType, W as Wallet, Q as WebhookType, P as WebhookVersion, f as fromHex, q as isHex, s as setLogLevel, t as toHex } from './index-21328762.js'; | ||
import '@ethersproject/bignumber'; | ||
@@ -5,0 +5,0 @@ import 'axios'; |
import { TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; | ||
import type { BigNumber } from '@ethersproject/bignumber'; | ||
import { Deferrable } from '@ethersproject/properties'; | ||
import { SendPrivateTransactionOptions } from '../types/types'; | ||
import { BlockIdentifier, DebugTransaction, SendPrivateTransactionOptions, SimulateAssetChangesResponse, SimulateExecutionResponse } from '../types/types'; | ||
/** | ||
@@ -41,2 +41,25 @@ * The Transact namespace contains methods used for sending transactions and | ||
/** | ||
* Simulates the asset changes resulting from a single transaction. | ||
* | ||
* Returns list of asset changes that occurred during the transaction | ||
* simulation. Note that this method does not run the transaction on the | ||
* blockchain. | ||
* | ||
* @param transaction The transaction to simulate. | ||
* @param blockIdentifier Optional block identifier to simulate the | ||
* transaction in. | ||
*/ | ||
simulateAssetChanges(transaction: DebugTransaction, blockIdentifier?: BlockIdentifier): Promise<SimulateAssetChangesResponse>; | ||
/** | ||
* Simulates a single transaction and the resulting and returns list of | ||
* decoded traces and logs that occurred during the transaction simulation. | ||
* | ||
* Note that this method does not run the transaction on the blockchain. | ||
* | ||
* @param transaction The transaction to simulate. | ||
* @param blockIdentifier Optional block identifier to simulate the | ||
* transaction in. | ||
*/ | ||
simulateExecution(transaction: DebugTransaction, blockIdentifier?: BlockIdentifier): Promise<SimulateExecutionResponse>; | ||
/** | ||
* Returns the transaction with hash or null if the transaction is unknown. | ||
@@ -43,0 +66,0 @@ * |
@@ -14,1 +14,3 @@ import { BaseNft, Nft, NftContract } from '../api/nft'; | ||
export declare const IS_BROWSER: boolean; | ||
/** Recursively converts all `null` fields to `undefined. */ | ||
export declare function nullsToUndefined<T>(obj: T): any; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "2.3.1"; | ||
export declare const VERSION = "2.4.0"; |
import { TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; | ||
import type { BigNumber } from '@ethersproject/bignumber'; | ||
import { Deferrable } from '@ethersproject/properties'; | ||
import { SendPrivateTransactionOptions } from '../types/types'; | ||
import { BlockIdentifier, DebugTransaction, SendPrivateTransactionOptions, SimulateAssetChangesResponse, SimulateExecutionResponse } from '../types/types'; | ||
/** | ||
@@ -41,2 +41,25 @@ * The Transact namespace contains methods used for sending transactions and | ||
/** | ||
* Simulates the asset changes resulting from a single transaction. | ||
* | ||
* Returns list of asset changes that occurred during the transaction | ||
* simulation. Note that this method does not run the transaction on the | ||
* blockchain. | ||
* | ||
* @param transaction The transaction to simulate. | ||
* @param blockIdentifier Optional block identifier to simulate the | ||
* transaction in. | ||
*/ | ||
simulateAssetChanges(transaction: DebugTransaction, blockIdentifier?: BlockIdentifier): Promise<SimulateAssetChangesResponse>; | ||
/** | ||
* Simulates a single transaction and the resulting and returns list of | ||
* decoded traces and logs that occurred during the transaction simulation. | ||
* | ||
* Note that this method does not run the transaction on the blockchain. | ||
* | ||
* @param transaction The transaction to simulate. | ||
* @param blockIdentifier Optional block identifier to simulate the | ||
* transaction in. | ||
*/ | ||
simulateExecution(transaction: DebugTransaction, blockIdentifier?: BlockIdentifier): Promise<SimulateExecutionResponse>; | ||
/** | ||
* Returns the transaction with hash or null if the transaction is unknown. | ||
@@ -43,0 +66,0 @@ * |
@@ -14,1 +14,3 @@ import { BaseNft, Nft, NftContract } from '../api/nft'; | ||
export declare const IS_BROWSER: boolean; | ||
/** Recursively converts all `null` fields to `undefined. */ | ||
export declare function nullsToUndefined<T>(obj: T): any; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "2.3.1"; | ||
export declare const VERSION = "2.4.0"; |
import * as utils from './api/utils'; | ||
export { utils as Utils }; | ||
export { m as Alchemy, j as AlchemySubscription, r as AssetTransfersCategory, u as AssetTransfersOrder, L as CommitmentLevel, o as Contract, p as ContractFactory, M as DebugTracerType, H as GasOptimizedTransactionStatus, N as Network, y as NftExcludeFilters, z as NftFilters, B as NftOrdering, F as NftSaleMarketplace, G as NftSaleTakerType, x as NftSpamClassification, w as NftTokenType, O as OpenSeaSafelistRequestStatus, R as RefreshState, S as SortingOrder, T as TokenBalanceType, W as Wallet, K as WebhookType, J as WebhookVersion, f as fromHex, q as isHex, s as setLogLevel, t as toHex } from './index-da5d050b.js'; | ||
export { m as Alchemy, j as AlchemySubscription, r as AssetTransfersCategory, u as AssetTransfersOrder, U as CommitmentLevel, o as Contract, p as ContractFactory, L as DebugCallType, X as DebugTracerType, K as DecodingAuthority, M as GasOptimizedTransactionStatus, N as Network, y as NftExcludeFilters, z as NftFilters, B as NftOrdering, F as NftSaleMarketplace, G as NftSaleTakerType, x as NftSpamClassification, w as NftTokenType, O as OpenSeaSafelistRequestStatus, R as RefreshState, H as SimulateAssetType, J as SimulateChangeType, S as SortingOrder, T as TokenBalanceType, W as Wallet, Q as WebhookType, P as WebhookVersion, f as fromHex, q as isHex, s as setLogLevel, t as toHex } from './index-21328762.js'; | ||
import '@ethersproject/bignumber'; | ||
@@ -5,0 +5,0 @@ import 'axios'; |
import { TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; | ||
import type { BigNumber } from '@ethersproject/bignumber'; | ||
import { Deferrable } from '@ethersproject/properties'; | ||
import { SendPrivateTransactionOptions } from '../types/types'; | ||
import { BlockIdentifier, DebugTransaction, SendPrivateTransactionOptions, SimulateAssetChangesResponse, SimulateExecutionResponse } from '../types/types'; | ||
/** | ||
@@ -41,2 +41,25 @@ * The Transact namespace contains methods used for sending transactions and | ||
/** | ||
* Simulates the asset changes resulting from a single transaction. | ||
* | ||
* Returns list of asset changes that occurred during the transaction | ||
* simulation. Note that this method does not run the transaction on the | ||
* blockchain. | ||
* | ||
* @param transaction The transaction to simulate. | ||
* @param blockIdentifier Optional block identifier to simulate the | ||
* transaction in. | ||
*/ | ||
simulateAssetChanges(transaction: DebugTransaction, blockIdentifier?: BlockIdentifier): Promise<SimulateAssetChangesResponse>; | ||
/** | ||
* Simulates a single transaction and the resulting and returns list of | ||
* decoded traces and logs that occurred during the transaction simulation. | ||
* | ||
* Note that this method does not run the transaction on the blockchain. | ||
* | ||
* @param transaction The transaction to simulate. | ||
* @param blockIdentifier Optional block identifier to simulate the | ||
* transaction in. | ||
*/ | ||
simulateExecution(transaction: DebugTransaction, blockIdentifier?: BlockIdentifier): Promise<SimulateExecutionResponse>; | ||
/** | ||
* Returns the transaction with hash or null if the transaction is unknown. | ||
@@ -43,0 +66,0 @@ * |
@@ -14,1 +14,3 @@ import { BaseNft, Nft, NftContract } from '../api/nft'; | ||
export declare const IS_BROWSER: boolean; | ||
/** Recursively converts all `null` fields to `undefined. */ | ||
export declare function nullsToUndefined<T>(obj: T): any; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "2.3.1"; | ||
export declare const VERSION = "2.4.0"; |
import { TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; | ||
import type { BigNumber } from '@ethersproject/bignumber'; | ||
import { Deferrable } from '@ethersproject/properties'; | ||
import { SendPrivateTransactionOptions } from '../types/types'; | ||
import { BlockIdentifier, DebugTransaction, SendPrivateTransactionOptions, SimulateAssetChangesResponse, SimulateExecutionResponse } from '../types/types'; | ||
/** | ||
@@ -41,2 +41,25 @@ * The Transact namespace contains methods used for sending transactions and | ||
/** | ||
* Simulates the asset changes resulting from a single transaction. | ||
* | ||
* Returns list of asset changes that occurred during the transaction | ||
* simulation. Note that this method does not run the transaction on the | ||
* blockchain. | ||
* | ||
* @param transaction The transaction to simulate. | ||
* @param blockIdentifier Optional block identifier to simulate the | ||
* transaction in. | ||
*/ | ||
simulateAssetChanges(transaction: DebugTransaction, blockIdentifier?: BlockIdentifier): Promise<SimulateAssetChangesResponse>; | ||
/** | ||
* Simulates a single transaction and the resulting and returns list of | ||
* decoded traces and logs that occurred during the transaction simulation. | ||
* | ||
* Note that this method does not run the transaction on the blockchain. | ||
* | ||
* @param transaction The transaction to simulate. | ||
* @param blockIdentifier Optional block identifier to simulate the | ||
* transaction in. | ||
*/ | ||
simulateExecution(transaction: DebugTransaction, blockIdentifier?: BlockIdentifier): Promise<SimulateExecutionResponse>; | ||
/** | ||
* Returns the transaction with hash or null if the transaction is unknown. | ||
@@ -43,0 +66,0 @@ * |
@@ -14,1 +14,3 @@ import { BaseNft, Nft, NftContract } from '../api/nft'; | ||
export declare const IS_BROWSER: boolean; | ||
/** Recursively converts all `null` fields to `undefined. */ | ||
export declare function nullsToUndefined<T>(obj: T): any; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "2.3.1"; | ||
export declare const VERSION = "2.4.0"; |
{ | ||
"name": "alchemy-sdk", | ||
"version": "2.3.1", | ||
"version": "2.4.0", | ||
"description": "Extended Ethers.js SDK for Alchemy APIs", | ||
@@ -5,0 +5,0 @@ "author": "Alchemy", |
@@ -187,6 +187,8 @@ # Alchemy SDK for Javascript | ||
The `transact` namespace contains methods used for sending transactions. The unique methods to the `transact` namespace are: | ||
The `transact` namespace contains methods used for simulating and sending transactions. The unique methods to the `transact` namespace are: | ||
- `sendPrivateTransaction()`: Send a private transaction through Flashbots. | ||
- `cancelPrivateTransaction()`: Cancel a private transaction sent with Flashbots. | ||
- `simulateAssetChanges()`: Simulate a transaction and get a list of asset changes. | ||
- `simulateExecution()`: Simulate a transaction and get a full list of internal transactions, logs, ABI decoded results and more. | ||
@@ -193,0 +195,0 @@ The `transact` namespace also aliases over several commonly used methods from the `core` namespace for convenience: |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3459682
47116
378