Skip to content

Commit

Permalink
Remove sdk faucets (#1051)
Browse files Browse the repository at this point in the history
* ALL-4110: hard remove sdk faucets

* ALL-4110: bump version

* ALL-4110: fix formatting

---------

Co-authored-by: Filip Kaštovský <[email protected]>
  • Loading branch information
filipkastovsky and Filip Kaštovský authored Jan 23, 2024
1 parent 595d726 commit 5a50ff8
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 158 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [4.2.3] - 2024.1.23

### Updated

- Drop support for faucet claims via SDK

## [4.2.2] - 2024.1.12

### Added
Expand Down
31 changes: 0 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,6 @@ Access the latest crypto exchange rates and supported currency information to st
| [Supported Crypto Currencies](https://docs.tatum.io/docs/exchange-rates/supported-crypto-currencies) |
| [Supported Fiats](https://docs.tatum.io/docs/exchange-rates/supported-fiats) |

### ⛽ Faucets

Request testnet token sums of cryptocurrency from our [Faucets](http://faucets.tatum.io).

| Documentation |
| ----- |
| [Get testnet native tokens](https://docs.tatum.io/docs/faucets/fund) |


### 📘 Getting Started with TatumSDK

This guide will lead you step by step, from basic setup and installation to harnessing the immense capabilities of our library. For a detailed walkthrough, check out the [Getting Started page](https://docs.tatum.io/sdk/get-started-with-tatum-sdk).
Expand Down Expand Up @@ -409,28 +400,6 @@ await tatum.destroy()

For more details, check out the [Wallet address operations documentation](https://docs.tatum.io/docs/wallet-address-operations).

### Get testnet faucet funds
Using TatumSDK, you can request testnet native token sums of cryptocurrency from our [Faucets](http://faucets.tatum.io).

```ts
import { TatumSDK, Network, Ethereum } from '@tatumio/tatum'

const tatum = await TatumSDK.init<Ethereum>({ network: Network.ETHEREUM_SEPOLIA })

const res = await tatum.faucet.fund('0x712e3a792c974b3e3dbe41229ad4290791c75a82')

if (res.data) {
console.log(res.data)
} else {
console.error(res.error)
}

// Destroy Tatum SDK - needed for stopping background jobs
await tatum.destroy()
```

For more details, check out the [Faucets documentation](https://docs.tatum.io/docs/faucets).

## RPC calls
All RPC calls are implemented in the `tatum.rpc.*` submodule.

Expand Down
2 changes: 0 additions & 2 deletions docs/structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ TatumSDK is thoughtfully designed and organized into these submodules to provide

* **Rate Exchange submodule - `tatum.rates.*`**: This submodule enables allows you to easily obtain exchange rates for fiat/crypto.

* **Faucet submodule - `tatum.faucet.*`**: This submodule allows you to get testnet faucet funds for all supported chains (http://faucets.tatum.io).

By dividing the library into these submodules, TatumSDK offers an organized, easy-to-use interface that makes interacting with Ethereum and other blockchains a breeze. Both beginners and advanced developers can benefit from the streamlined architecture, enabling them to focus on building powerful blockchain applications.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tatumio/tatum",
"version": "4.2.2",
"version": "4.2.3",
"description": "Tatum JS SDK",
"author": "Tatum",
"repository": "https://github.com/tatumio/tatum-js",
Expand Down
57 changes: 0 additions & 57 deletions src/e2e/tatum.faucet.spec.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/service/faucet/faucet.dto.ts

This file was deleted.

46 changes: 0 additions & 46 deletions src/service/faucet/faucet.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/service/faucet/index.ts

This file was deleted.

14 changes: 1 addition & 13 deletions src/service/tatum/tatum.evm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { EvmBasedBeaconRpcSuite, EvmBasedRpcSuite } from '../../dto'
import { NativeEvmBasedRpcSuite } from '../../dto/rpc/NativeEvmBasedRpcInterface'
import { CONFIG, Utils } from '../../util'
import { Address } from '../address'
import { Faucet } from '../faucet'
import { FeeEvm } from '../fee'
import { Ipfs } from '../ipfs'
import { Nft } from '../nft'
Expand All @@ -27,15 +26,6 @@ export abstract class BaseEvm extends TatumSdkChain {
}
}

export abstract class FaucetEvm extends BaseEvm {
faucet: Faucet

constructor(id: string) {
super(id)
this.faucet = Container.of(id).get(Faucet)
}
}

export class NotificationEvm extends BaseEvm {
notification: Notification

Expand All @@ -48,14 +38,12 @@ export class NotificationEvm extends BaseEvm {
export class FullEvm extends NotificationEvm {
nft: Nft
token: Token
faucet: Faucet
address: Address

constructor(id: string) {
super(id)
this.nft = Container.of(id).get(Nft)
this.token = Container.of(id).get(Token)
this.faucet = Container.of(id).get(Faucet)
this.address = Container.of(id).get(Address)
}
}
Expand All @@ -80,7 +68,7 @@ export class Vechain extends BaseEvm {}
export class XinFin extends BaseEvm {}
export class Chiliz extends NotificationEvm {}

export class HorizenEon extends FaucetEvm {
export class HorizenEon extends BaseEvm {
address: Address

constructor(id: string) {
Expand Down
3 changes: 0 additions & 3 deletions src/service/tatum/tatum.other.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { EosRpcSuite } from '../../dto/rpc/EosRpcSuite'
import { StellarRpcSuite } from '../../dto/rpc/StellarRpcSuite'
import { CONFIG, Utils } from '../../util'
import { Address, AddressTezos, AddressTron } from '../address'
import { Faucet } from '../faucet'
import { Ipfs } from '../ipfs'
import { Nft, NftTezos } from '../nft'
import { Notification } from '../notification'
Expand Down Expand Up @@ -144,7 +143,6 @@ export class FullSdk extends TatumSdkChain {
token: Token
address: Address
rates: Rates
faucet: Faucet
ipfs: Ipfs

constructor(id: string) {
Expand All @@ -154,7 +152,6 @@ export class FullSdk extends TatumSdkChain {
this.token = Container.of(id).get(Token)
this.address = Container.of(id).get(Address)
this.rates = Container.of(id).get(Rates)
this.faucet = Container.of(id).get(Faucet)
this.ipfs = Container.of(id).get(Ipfs)
}
}

0 comments on commit 5a50ff8

Please sign in to comment.