Skip to content

Commit

Permalink
feat: remove getTips() api
Browse files Browse the repository at this point in the history
IRI version 1.8.6 [removes](iotaledger/iri#1788) getTips() endpoint. This commit removes the implementation from this lib.

Related: iotaledger/iri#1851
  • Loading branch information
laumair committed Jun 8, 2020
1 parent 5e2501c commit b280032
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 128 deletions.
20 changes: 9 additions & 11 deletions packages/core/src/composeAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import {
createGetNeighbors,
createGetNewAddress,
createGetNodeInfo,
createGetTips,
createGetTransactionObjects,
createGetTransactionsToApprove,
createGetTrytes,
Expand Down Expand Up @@ -74,7 +73,7 @@ export function returnType<T>(func: Func<T>) {

/**
* @method composeApi
*
*
* @summary Creates an API object that's used to send requests to an IRI node.
*
* @memberof module:core
Expand All @@ -89,12 +88,12 @@ export function returnType<T>(func: Func<T>) {
* @example
* ```js
* const Iota = require('@iota/core`);
*
*
* const iota = Iota.composeAPI({
* provider: 'https://nodes.devnet.thetangle.org:443'
* });
* ```
*
*
* @return {API} iota - API object to use to interact with an IRI node.
*/
export const composeAPI = (settings: Partial<Settings> = {}) => {
Expand All @@ -103,7 +102,7 @@ export const composeAPI = (settings: Partial<Settings> = {}) => {

/**
* @method setSettings
*
*
* @summary Defines network provider configuration and [`attachToTangle`]{@link #module_core.attachToTangle} method.
*
* @memberof API
Expand All @@ -126,13 +125,13 @@ export const composeAPI = (settings: Partial<Settings> = {}) => {
}

/**
*
*
* @method overrideNetwork
*
*
* @summary Overrides the default provider
*
* @memberof API
*
*
* @ignore
*
* @param {Provider} network - Provider instance to use to override the existing network settings
Expand All @@ -145,11 +144,11 @@ export const composeAPI = (settings: Partial<Settings> = {}) => {
/**
*
* @method overrideAttachToTangle
*
*
* @summary Overrides the default [`attachToTangle`]{@link #module_core.attachToTangle} method
*
* @memberof API
*
*
* @ignore
*
* @param {function} attachToTangle - Function that overrides the
Expand All @@ -171,7 +170,6 @@ export const composeAPI = (settings: Partial<Settings> = {}) => {
getInclusionStates: createGetInclusionStates(provider),
getNeighbors: createGetNeighbors(provider),
getNodeInfo: createGetNodeInfo(provider),
getTips: createGetTips(provider),
getTransactionsToApprove: createGetTransactionsToApprove(provider),
getTrytes: createGetTrytes(provider),
interruptAttachingToTangle: createInterruptAttachingToTangle(provider),
Expand Down
56 changes: 0 additions & 56 deletions packages/core/src/createGetTips.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ export {
GetNeighborsResponse,
GetNodeInfoCommand,
GetNodeInfoResponse,
GetTipsCommand,
GetTipsResponse,
GetTransactionsToApproveCommand,
GetTransactionsToApproveResponse,
TransactionsToApprove,
Expand Down Expand Up @@ -68,8 +66,6 @@ export { createGetNeighbors } from './createGetNeighbors'

export { createGetNodeInfo } from './createGetNodeInfo'

export { createGetTips } from './createGetTips'

export { createGetTransactionsToApprove } from './createGetTransactionsToApprove'

export { createGetTrytes } from './createGetTrytes'
Expand Down
28 changes: 0 additions & 28 deletions packages/core/test/integration/getTips.test.ts

This file was deleted.

17 changes: 0 additions & 17 deletions packages/core/test/integration/nocks/getTips.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/http-client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ export {
GetNeighborsResponse,
GetNodeInfoCommand,
GetNodeInfoResponse,
GetTipsCommand,
GetTipsResponse,
GetTransactionsToApproveCommand,
GetTransactionsToApproveResponse,
TransactionsToApprove,
Expand Down
10 changes: 0 additions & 10 deletions packages/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export enum IRICommand {
GET_NEIGHBORS = 'getNeighbors',
ADD_NEIGHBORS = 'addNeighbors',
REMOVE_NEIGHBORS = 'removeNeighbors',
GET_TIPS = 'getTips',
FIND_TRANSACTIONS = 'findTransactions',
GET_TRYTES = 'getTrytes',
GET_INCLUSION_STATES = 'getInclusionStates',
Expand Down Expand Up @@ -226,15 +225,6 @@ export interface GetNodeInfoResponse {
readonly transactionsToRequest: number
}

export interface GetTipsCommand extends BaseCommand {
command: IRICommand.GET_TIPS
}

export interface GetTipsResponse {
readonly hashes: ReadonlyArray<Hash>
readonly duration: number
}

export interface TransactionsToApprove {
readonly trunkTransaction: Hash
readonly branchTransaction: Hash
Expand Down

0 comments on commit b280032

Please sign in to comment.