diff --git a/README.md b/README.md index 762fca804..e6748f4ed 100644 --- a/README.md +++ b/README.md @@ -121,8 +121,6 @@ For details on all available API methods, see the [reference page](api_reference * [.getInputs(seed, [options], [callback])](api_reference.md#module_core.getInputs) -* [.getLatestInclusion(transactions, tips, [callback])](api_reference.md#module_core.getLatestInclusion) - * [.getNeighbors([callback])](api_reference.md#module_core.getNeighbors) * [.getNewAddress(seed, [options], [callback])](api_reference.md#module_core.getNewAddress) diff --git a/api_reference.md b/api_reference.md index ffc6f5b46..096052fb0 100644 --- a/api_reference.md +++ b/api_reference.md @@ -320,10 +320,6 @@ Converts an integer value to trits * [.getInputs(seed, [options], [callback])](#module_core.getInputs) - * [.createGetLatestInclusion(provider)](#module_core.createGetLatestInclusion) - - * [.getLatestInclusion(transactions, tips, [callback])](#module_core.getLatestInclusion) - * [.createGetNeighbors(provider)](#module_core.createGetNeighbors) * [.getNeighbors([callback])](#module_core.getNeighbors) @@ -947,42 +943,6 @@ getInputs(seed, { start: 0, threhold }) // ... }) ``` - - -### *core*.createGetLatestInclusion(provider) - -| Param | Type | Description | -| --- | --- | --- | -| provider | Provider | Network provider for accessing IRI | - -**Returns**: function - [`getLatestInclusion`](#module_core.getLatestInclusion) - - -### *core*.getLatestInclusion(transactions, tips, [callback]) -**Fulfil**: boolean[] List of inclusion states -**Reject**: Error -- `INVALID_HASH`: Invalid transaction hash -- Fetch error - -| Param | Type | Description | -| --- | --- | --- | -| transactions | Array.<Hash> | List of transactions hashes | -| tips | number | List of tips to check if transactions are referenced by | -| [callback] | Callback | Optional callback | - -Fetches inclusion states of given transactions and a list of tips, -by calling [`getInclusionStates`](#module_core.getInclusionStates) on `latestSolidSubtangleMilestone`. - -**Example** -```js -getLatestInclusion(hashes) - .then(states => { - // ... - }) - .catch(err => { - // handle error - }) -``` ### *core*.createGetNeighbors(provider) @@ -1241,7 +1201,7 @@ or should be [_reattached_](#module_core.replayBundle) // We need to monitor inclusion states of all tail transactions (original tail & reattachments) const tails = [tail] -getLatestInclusion(tails) +getInclusionStates(tails) .then(states => { // Check if none of transactions confirmed if (states.indexOf(true) === -1) { diff --git a/packages/account/src/account.ts b/packages/account/src/account.ts index 25a3e4ec4..ed35d4671 100644 --- a/packages/account/src/account.ts +++ b/packages/account/src/account.ts @@ -82,7 +82,7 @@ export interface Network { readonly getBalances: API['getBalances'] readonly getBalance: (address: Trytes) => Promise readonly getConsistency: API['checkConsistency'] - readonly getLatestInclusion: API['getLatestInclusion'] + readonly getInclusionStates: API['getInclusionStates'] readonly getTrytes: API['getTrytes'] readonly sendTrytes: API['sendTrytes'] readonly setSettings: API['setSettings'] diff --git a/packages/account/src/preset.ts b/packages/account/src/preset.ts index 3f637c5e7..2da4ad57e 100644 --- a/packages/account/src/preset.ts +++ b/packages/account/src/preset.ts @@ -18,7 +18,7 @@ import { createFindTransactions, createGetBalances, createGetBundlesFromAddresses, - createGetLatestInclusion, + createGetInclusionStates, createGetTransactionsToApprove, createGetTrytes, createIsAddressUsed, @@ -76,14 +76,14 @@ export function networkAdapter({ provider }: NetworkParams): Network { const httpClient = createHttpClient({ provider }) const getBalances = createGetBalances(httpClient) const getTrytes = createGetTrytes(httpClient) - const getLatestInclusion = createGetLatestInclusion(httpClient) + const getInclusionStates = createGetInclusionStates(httpClient) return { getTrytes: hashes => (hashes.length > 0 ? getTrytes(hashes) : Promise.resolve([])), getBalance: (address): Promise => getBalances([address]).then(({ balances }) => balances[0]), getBalances, getConsistency: createCheckConsistency(httpClient), - getLatestInclusion: hashes => (hashes.length > 0 ? getLatestInclusion(hashes) : Promise.resolve([])), + getInclusionStates: hashes => (hashes.length > 0 ? getInclusionStates(hashes) : Promise.resolve([])), getBundlesFromAddresses: createGetBundlesFromAddresses(httpClient, 'lib'), findTransactions: createFindTransactions(httpClient), sendTrytes: createSendTrytes(httpClient), @@ -407,7 +407,7 @@ export function transactionAttachment(this: any, params: TransactionAttachmentPa getTransactionsToApprove, attachToTangle, getTrytes, - getLatestInclusion, + getInclusionStates, getConsistency, } = network @@ -439,7 +439,7 @@ export function transactionAttachment(this: any, params: TransactionAttachmentPa pastAttachments.map(trytes => tritsToTrytes(transactionHash(trytesToTrits(trytes)))) ) .then(pastAttachmentHashes => - getLatestInclusion(pastAttachmentHashes).tap(inclusionStates => { + getInclusionStates(pastAttachmentHashes).tap(inclusionStates => { if (inclusionStates.indexOf(true) > -1) { return persistence.del(['0', tritsToTrytes(bundleHash(bundle))].join(':')) } diff --git a/packages/core/README.md b/packages/core/README.md index e90e822d9..426086cf5 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -49,12 +49,10 @@ yarn add @iota/core * [.getBundle(tailTransactionHash, [callback])](#module_core.getBundle) - * [.getInclusionStates(transactions, tips, [callback])](#module_core.getInclusionStates) + * [.getInclusionStates(transactions, [callback])](#module_core.getInclusionStates) * [.getInputs(seed, [options], [callback])](#module_core.getInputs) - * [.getLatestInclusion(transactions, [callback])](#module_core.getLatestInclusion) - * [.getNeighbors([callback])](#module_core.getNeighbors) * [.getNewAddress(seed, [options], [callback])](#module_core.getNewAddress) @@ -545,7 +543,7 @@ getBundle(tail) ``` -### *core*.getInclusionStates(transactions, tips, [callback]) +### *core*.getInclusionStates(transactions, [callback]) **Summary**: Finds out if one or more given transactions are referenced by one or more other given transactions. **Fulfil**: boolean[] states - Array of inclusion states, where `true` means that the transaction is referenced by the given transacions and `false` means that it's not. **Reject**: Error error - An error that contains one of the following: @@ -555,7 +553,6 @@ getBundle(tail) | Param | Type | Description | | --- | --- | --- | | transactions | Array.<Hash> | Array of transaction hashes to check | -| tips | Array.<Hash> | Array of transaction hashes that should directly or indirectly reference the given transactions | | [callback] | Callback | Optional callback function | This method uses the connected IRI node's [`getInclusionStates`](https://docs.iota.org/docs/node-software/0.1/iri/references/api-reference#getinclusionstates) endpoint. @@ -564,13 +561,9 @@ If the given tip transactions reference a given transaction, the returned state If the given tip transactions do not reference a given transaction, the returned state is `false`. -## Related methods - -To find out if one or more transactions are confirmed, use the [`getLatestInclusion()`](#module_core.getLatestInclusion) method. - **Example** ```js -getInclusionStates(transactions, ) +getInclusionStates(transactions) .then(states => { for(let i = 0; i < states.length; i++){ states? console.log(`Transaction ${i} is referenced by the given transactions`) : @@ -637,43 +630,6 @@ getInputs(seed) } }); ``` - - -### *core*.getLatestInclusion(transactions, [callback]) -**Summary**: Finds out if one or more given transactions are [confirmed or pending](https://docs.iota.org/docs/getting-started/0.1/network/the-tangle#transaction-states). -**Fulfil**: boolean[] states - Array of inclusion states, where `true` means that the transaction is confirmed and `false` means that it's not. -**Reject**: Error error - An error that contains one of the following: -- `INVALID_HASH`: Make sure that the transaction hashes are 81 trytes long -- Fetch error: The connected IOTA node's API returned an error. See the [list of error messages](https://docs.iota.org/docs/node-software/0.1/iri/references/api-errors) - -| Param | Type | Description | -| --- | --- | --- | -| transactions | Array.<Hash> | List of transactions hashes to check | -| [callback] | Callback | Optional callback function | - -This method uses the node's `latestSolidSubtangleMilestone` field as the `tips` argument to make sure that the given transactions are referenced by the node's latest solid milestone. - -An invalid transaction will always remain in a pending state. - -**Note:** If a valid transaction is in a pending state for too long, you can [increase its chances of being confirmed](https://docs.iota.org/docs/client-libraries/0.1/how-to-guides/js/confirm-pending-bundle). - -## Related methods - -To check if transactions are referenced by a non-milestone transaction, use the [`getInclusionStates()`](#module_core.getInclusionStates) method. - -**Example** -```js -iota.getLatestInclusionState(['transactionHash']) -.then(states => { - for(let i = 0; i < states.length; i++){ - states[i]? console.log(`Transaction ${i} is confirmed`) : - console.log(`transaction ${i} is pending`); - } - }) -.catch(error => { - console.log(`Something went wrong: ${error}`); - }); -``` ### *core*.getNeighbors([callback]) diff --git a/packages/core/src/composeAPI.ts b/packages/core/src/composeAPI.ts index afd2f9f4d..9e9223f72 100644 --- a/packages/core/src/composeAPI.ts +++ b/packages/core/src/composeAPI.ts @@ -25,7 +25,6 @@ import { createGetBundle, createGetInclusionStates, createGetInputs, - createGetLatestInclusion, createGetNeighbors, createGetNewAddress, createGetNodeInfo, @@ -183,7 +182,6 @@ export const composeAPI = (settings: Partial = {}) => { getAccountData: createGetAccountData(provider), getBundle: createGetBundle(provider), getBundlesFromAddresses: createGetBundlesFromAddresses(provider), - getLatestInclusion: createGetLatestInclusion(provider), getNewAddress: createGetNewAddress(provider), getTransactionObjects: createGetTransactionObjects(provider), findTransactionObjects: createFindTransactionObjects(provider), diff --git a/packages/core/src/createGetBundlesFromAddresses.ts b/packages/core/src/createGetBundlesFromAddresses.ts index 75b77bec8..51fb7b773 100644 --- a/packages/core/src/createGetBundlesFromAddresses.ts +++ b/packages/core/src/createGetBundlesFromAddresses.ts @@ -1,10 +1,10 @@ import * as Promise from 'bluebird' import { Bundle, Callback, Hash, Provider, Transaction } from '../../types' -import { createFindTransactionObjects, createGetLatestInclusion } from './' +import { createFindTransactionObjects, createGetInclusionStates } from './' export const createGetBundlesFromAddresses = (provider: Provider, caller?: string) => { const findTransactionObjects = createFindTransactionObjects(provider) - const getLatestInclusion = createGetLatestInclusion(provider) + const getInclusionStates = createGetInclusionStates(provider) /* tslint:disable-next-line:only-arrow-functions */ return function( @@ -36,9 +36,8 @@ export const createGetBundlesFromAddresses = (provider: Provider, caller?: strin .then(groupTransactionsIntoBundles) // 4. If requested, add persistence status to each bundle - .then( - (bundles: ReadonlyArray) => - inclusionStates ? addPersistence(getLatestInclusion, bundles) : bundles + .then((bundles: ReadonlyArray) => + inclusionStates ? addPersistence(getInclusionStates, bundles) : bundles ) // 5. Sort bundles by timestamp @@ -96,16 +95,16 @@ export const zipPersistence = (bundles: ReadonlyArray) => ( // Since bundles are atomic, all transactions have the same state zip2(bundles, states).map(([bundle, state]) => bundle.map(tx => ({ ...tx, persistence: state }))) -type GetLatestInclusion = ( +type GetInclusionStates = ( transactions: ReadonlyArray, callback?: Callback> ) => Promise> -export const addPersistence = (getLatestInclusion: GetLatestInclusion, bundles: ReadonlyArray) => { +export const addPersistence = (getInclusionStates: GetInclusionStates, bundles: ReadonlyArray) => { // Get the first hash of each bundle const hashes = bundles.map(bundle => bundle[0].hash) - return getLatestInclusion(hashes).then(zipPersistence(bundles)) + return getInclusionStates(hashes).then(zipPersistence(bundles)) } export const sortByTimestamp = (bundles: ReadonlyArray) => diff --git a/packages/core/src/createGetInclusionStates.ts b/packages/core/src/createGetInclusionStates.ts index ab095aa3e..9d204f65c 100644 --- a/packages/core/src/createGetInclusionStates.ts +++ b/packages/core/src/createGetInclusionStates.ts @@ -12,11 +12,11 @@ import { /** * @method createGetInclusionStates - * + * * @summary Creates a new `getInclusionStates()` method, using a custom Provider instance. * * @memberof module:core - * + * * @ignore * * @param {Provider} provider - The Provider object that the method should use to call the node's API endpoints. @@ -26,28 +26,23 @@ import { export const createGetInclusionStates = ({ send }: Provider) => /** * This method uses the connected IRI node's [`getInclusionStates`](https://docs.iota.org/docs/node-software/0.1/iri/references/api-reference#getinclusionstates) endpoint. - * + * * If the given tip transactions reference a given transaction, the returned state is `true`. - * + * * If the given tip transactions do not reference a given transaction, the returned state is `false`. - * - * ## Related methods - * - * To find out if one or more transactions are confirmed, use the [`getLatestInclusion()`]{@link #module_core.getLatestInclusion} method. - * + * * @method getInclusionStates - * + * * @summary Finds out if one or more given transactions are referenced by one or more other given transactions. - * + * * @memberof module:core * * @param {Hash[]} transactions - Array of transaction hashes to check - * @param {Hash[]} tips - Array of transaction hashes that should directly or indirectly reference the given transactions * @param {Callback} [callback] - Optional callback function - * + * * @example * ```js - * getInclusionStates(transactions, ) + * getInclusionStates(transactions) * .then(states => { * for(let i = 0; i < states.length; i++){ * states? console.log(`Transaction ${i} is referenced by the given transactions`) : @@ -60,29 +55,19 @@ export const createGetInclusionStates = ({ send }: Provider) => * ``` * * @return {Promise} - * + * * @fulfil {boolean[]} states - Array of inclusion states, where `true` means that the transaction is referenced by the given transacions and `false` means that it's not. - * + * * @reject {Error} error - An error that contains one of the following: * - `INVALID_TRANSACTION_HASH`: Make sure that the transaction hashes are 81 trytes long - * - Fetch error: The connected IOTA node's API returned an error. See the [list of error messages](https://docs.iota.org/docs/node-software/0.1/iri/references/api-errors) + * - Fetch error: The connected IOTA node's API returned an error. See the [list of error messages](https://docs.iota.org/docs/node-software/0.1/iri/references/api-errors) */ - ( - transactions: ReadonlyArray, - tips: ReadonlyArray, - callback?: Callback> - ): Promise> => - Promise.resolve( - validate( - arrayValidator(hashValidator)(transactions, errors.INVALID_TRANSACTION_HASH), - arrayValidator(hashValidator)(tips, errors.INVALID_TRANSACTION_HASH) - ) - ) + (transactions: ReadonlyArray, callback?: Callback>): Promise> => + Promise.resolve(validate(arrayValidator(hashValidator)(transactions, errors.INVALID_TRANSACTION_HASH))) .then(() => send({ command: IRICommand.GET_INCLUSION_STATES, transactions, - tips, }) ) .then(({ states }) => states) diff --git a/packages/core/src/createGetLatestInclusion.ts b/packages/core/src/createGetLatestInclusion.ts deleted file mode 100644 index c9d0c58ae..000000000 --- a/packages/core/src/createGetLatestInclusion.ts +++ /dev/null @@ -1,73 +0,0 @@ -import * as Promise from 'bluebird' -import { Callback, Hash, Provider } from '../../types' -import { createGetInclusionStates, createGetNodeInfo } from './' - -/** - * @method createGetLatestInclusion - * - * @summary Creates a new `getLatestInclusion()` method, using a custom Provider instance. - * - * @memberof module:core - * - * @ignore - * - * @param {Provider} provider - The Provider object that the method should use to call the node's API endpoints. - * - * @return {Function} [`getLatestInclusion`]{@link #module_core.getLatestInclusion} - A new `getLatestInclusion()` function that uses your chosen Provider instance. - */ -export const createGetLatestInclusion = (provider: Provider) => { - const getInclusionStates = createGetInclusionStates(provider) - const getNodeInfo = createGetNodeInfo(provider) - - /** - * This method uses the node's `latestSolidSubtangleMilestone` field as the `tips` argument to make sure that the given transactions are referenced by the node's latest solid milestone. - * - * An invalid transaction will always remain in a pending state. - * - * **Note:** If a valid transaction is in a pending state for too long, you can [increase its chances of being confirmed](https://docs.iota.org/docs/client-libraries/0.1/how-to-guides/js/confirm-pending-bundle). - * - * ## Related methods - * - * To check if transactions are referenced by a non-milestone transaction, use the [`getInclusionStates()`]{@link #module_core.getInclusionStates} method. - * - * @method getLatestInclusion - * - * @summary Finds out if one or more given transactions are [confirmed or pending](https://docs.iota.org/docs/getting-started/0.1/network/the-tangle#transaction-states). - * - * @memberof module:core - * - * @param {Array} transactions - List of transactions hashes to check - * @param {Callback} [callback] - Optional callback function - * - * @example - * - * ```js - * iota.getLatestInclusionState(['transactionHash']) - * .then(states => { - * for(let i = 0; i < states.length; i++){ - * states[i]? console.log(`Transaction ${i} is confirmed`) : - * console.log(`transaction ${i} is pending`); - * } - * }) - * .catch(error => { - * console.log(`Something went wrong: ${error}`); - * }); - * ``` - * - * @return {Promise} - * - * @fulfil {boolean[]} states - Array of inclusion states, where `true` means that the transaction is confirmed and `false` means that it's not. - * - * @reject {Error} error - An error that contains one of the following: - * - `INVALID_HASH`: Make sure that the transaction hashes are 81 trytes long - * - Fetch error: The connected IOTA node's API returned an error. See the [list of error messages](https://docs.iota.org/docs/node-software/0.1/iri/references/api-errors) - */ - return function getLatestInclusion( - transactions: ReadonlyArray, - callback?: Callback> - ): Promise> { - return getNodeInfo() - .then(nodeInfo => getInclusionStates(transactions, [nodeInfo.latestSolidSubtangleMilestone])) - .asCallback(callback) - } -} diff --git a/packages/core/src/createIsReattachable.ts b/packages/core/src/createIsReattachable.ts index 854e6bce1..a1eaf5296 100644 --- a/packages/core/src/createIsReattachable.ts +++ b/packages/core/src/createIsReattachable.ts @@ -3,7 +3,7 @@ import * as Promise from 'bluebird' import { INVALID_ADDRESS } from '../../errors' import { arrayValidator, hashValidator, validate } from '../../guards' import { asArray, Callback, Hash, Provider, Transaction, Trytes } from '../../types' -import { createFindTransactionObjects, createGetLatestInclusion } from './' +import { createFindTransactionObjects, createGetInclusionStates } from './' // Filters out all receiving or 0-value transactions // Note: Transaction value < 0 is a tx-out (spending transaction) @@ -11,7 +11,7 @@ const filterSpendingTransactions = (transactions: ReadonlyArray) => // Appends the confirmation status to each transaction const withInclusionState = (provider: Provider, transactions: ReadonlyArray) => - createGetLatestInclusion(provider)(transactions.map(tx => tx.hash)).then(states => + createGetInclusionStates(provider)(transactions.map(tx => tx.hash)).then(states => transactions.map((tx, i) => ({ ...tx, confirmed: states[i], diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 060559c27..0763e2d99 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -104,8 +104,6 @@ export { createGetBundlesFromAddresses } from './createGetBundlesFromAddresses' export { createGetInputs, GetInputsOptions } from './createGetInputs' -export { createGetLatestInclusion } from './createGetLatestInclusion' - export { createGetNewAddress, // createGetUntilFirstUnusedAddress, diff --git a/packages/core/test/integration/getInclusionStates.test.ts b/packages/core/test/integration/getInclusionStates.test.ts index 355a6f428..cbbbfa427 100644 --- a/packages/core/test/integration/getInclusionStates.test.ts +++ b/packages/core/test/integration/getInclusionStates.test.ts @@ -9,7 +9,7 @@ const getInclusionStates = createGetInclusionStates(createHttpClient()) test('getInclusionStates() resolves to correct inclusion states', async t => { t.deepEqual( - await getInclusionStates(getInclusionStatesCommand.transactions, getInclusionStatesCommand.tips), + await getInclusionStates(getInclusionStatesCommand.transactions), getInclusionStatesResponse.states, 'getInclusionStates() should resolve to correct inclusion states' ) @@ -17,24 +17,18 @@ test('getInclusionStates() resolves to correct inclusion states', async t => { const invalidHashes = ['asdasDSFDAFD'] t.is( - t.throws(() => getInclusionStates(invalidHashes, getInclusionStatesCommand.tips), Error).message, + t.throws(() => getInclusionStates(invalidHashes), Error).message, `${INVALID_TRANSACTION_HASH}: ${stringify(invalidHashes)}`, 'getInclusionStates() throws error for invalid hashes' ) - - t.is( - t.throws(() => getInclusionStates(getInclusionStatesCommand.transactions, invalidHashes), Error).message, - `${INVALID_TRANSACTION_HASH}: ${stringify(invalidHashes)}`, - 'getInclusionStates() throws error for invalid tips' - ) }) test.cb('getInclusionStates() invokes callback', t => { - getInclusionStates(getInclusionStatesCommand.transactions, getInclusionStatesCommand.tips, t.end) + getInclusionStates(getInclusionStatesCommand.transactions, t.end) }) test.cb('getInclusionStates() passes correct arguments to callback', t => { - getInclusionStates(getInclusionStatesCommand.transactions, getInclusionStatesCommand.tips, (err, res) => { + getInclusionStates(getInclusionStatesCommand.transactions, (err, res) => { t.is(err, null, 'getInclusionStates() should pass null as first argument in callback for successuful requests') t.deepEqual( diff --git a/packages/core/test/integration/nocks/getInclusionStates.ts b/packages/core/test/integration/nocks/getInclusionStates.ts index e07ad8341..02ff61bb8 100644 --- a/packages/core/test/integration/nocks/getInclusionStates.ts +++ b/packages/core/test/integration/nocks/getInclusionStates.ts @@ -5,7 +5,6 @@ import headers from './headers' export const getInclusionStatesCommand: GetInclusionStatesCommand = { command: IRICommand.GET_INCLUSION_STATES, transactions: ['A'.repeat(81), 'B'.repeat(81)], - tips: ['M'.repeat(81)], } export const getInclusionStatesResponse: GetInclusionStatesResponse = { diff --git a/packages/http-client/test/batchedSend.ts b/packages/http-client/test/batchedSend.ts index ee46831e9..bd5c734de 100644 --- a/packages/http-client/test/batchedSend.ts +++ b/packages/http-client/test/batchedSend.ts @@ -182,19 +182,16 @@ export const getBalancesNockBatchB = nock('http://localhost:24265', headers(apiV export const getInclusionStatesCommand: GetInclusionStatesCommand = { command: IRICommand.GET_INCLUSION_STATES, transactions: ['A'.repeat(81), 'B'.repeat(81), 'C'.repeat(81)], - tips: ['T'.repeat(81)], } export const getInclusionStatesCommandA: GetInclusionStatesCommand = { command: IRICommand.GET_INCLUSION_STATES, transactions: ['A'.repeat(81), 'B'.repeat(81)], - tips: ['T'.repeat(81)], } export const getInclusionStatesCommandB: GetInclusionStatesCommand = { command: IRICommand.GET_INCLUSION_STATES, transactions: ['C'.repeat(81)], - tips: ['T'.repeat(81)], } export const expectedGetInclusionStatesResponse: GetInclusionStatesResponse = { diff --git a/packages/http-client/test/isBatchableCommand.test.ts b/packages/http-client/test/isBatchableCommand.test.ts index 3375f049f..76a30f17f 100644 --- a/packages/http-client/test/isBatchableCommand.test.ts +++ b/packages/http-client/test/isBatchableCommand.test.ts @@ -27,7 +27,6 @@ const getBalancesCommand: GetBalancesCommand = { const getInclusionStatesCommand: GetInclusionStatesCommand = { command: IRICommand.GET_INCLUSION_STATES, transactions: ['A'.repeat(81), 'B'.repeat(81)], - tips: ['T'.repeat(81)], } interface CustomCommand extends BaseCommand { diff --git a/packages/types.ts b/packages/types.ts index 7d894892c..59d057b61 100644 --- a/packages/types.ts +++ b/packages/types.ts @@ -184,7 +184,6 @@ export interface Balances { export interface GetInclusionStatesCommand extends BaseCommand { readonly command: IRICommand.GET_INCLUSION_STATES readonly transactions: ReadonlyArray - readonly tips: ReadonlyArray } export interface GetInclusionStatesResponse {