Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove sdk faucets #1051

Merged
merged 3 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
14 changes: 6 additions & 8 deletions docs/structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@

TatumSDK is thoughtfully designed and organized into these submodules to provide a clean and efficient way of interacting with blockchains:

* **[RPC submodule](https://github.com/tatumio/tatum-js/blob/master/docs/rpc.md) - `tatum.rpc.*`**: This submodule enables you to make direct Remote Procedure Call (RPC) calls to multiple blockchains, providing seamless access to various on-chain data and functionalities. With the RPC submodule, you can fetch account balances, send transactions, interact with smart contracts, and more. RPC submodule is using load balancer to select the most responsive node from the list of nodes.
- **[RPC submodule](https://github.com/tatumio/tatum-js/blob/master/docs/rpc.md) - `tatum.rpc.*`**: This submodule enables you to make direct Remote Procedure Call (RPC) calls to multiple blockchains, providing seamless access to various on-chain data and functionalities. With the RPC submodule, you can fetch account balances, send transactions, interact with smart contracts, and more. RPC submodule is using load balancer to select the most responsive node from the list of nodes.

* **Notification submodule - `tatum.notification.*`**: This submodule allows you to subscribe to real-time notifications for a wide range of events related to specified blockchain addresses. By leveraging the notification submodule, you can effortlessly track incoming and outgoing transactions, NFT transfers, and other events without constantly polling the blockchain.
- **Notification submodule - `tatum.notification.*`**: This submodule allows you to subscribe to real-time notifications for a wide range of events related to specified blockchain addresses. By leveraging the notification submodule, you can effortlessly track incoming and outgoing transactions, NFT transfers, and other events without constantly polling the blockchain.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


* **NFT submodule - `tatum.nft.*`**: This submodule offers a comprehensive suite of tools for working with Non-Fungible Tokens (NFTs). With the NFT submodule, you can query the balance of NFTs on an address, retrieve NFT transactions associated with a specific address, explore NFTs within a collection or identify the owners of a particular NFT.
- **NFT submodule - `tatum.nft.*`**: This submodule offers a comprehensive suite of tools for working with Non-Fungible Tokens (NFTs). With the NFT submodule, you can query the balance of NFTs on an address, retrieve NFT transactions associated with a specific address, explore NFTs within a collection or identify the owners of a particular NFT.

* **Address submodule - `tatum.address.*`**: This submodule simplifies wallet management across multiple blockchains by allowing you to fetch wallet balances and retrieve transactions for a given address. With the Address submodule, you can easily manage your wallets and monitor transactions, making your blockchain application development more efficient and user-friendly.
- **Address submodule - `tatum.address.*`**: This submodule simplifies wallet management across multiple blockchains by allowing you to fetch wallet balances and retrieve transactions for a given address. With the Address submodule, you can easily manage your wallets and monitor transactions, making your blockchain application development more efficient and user-friendly.

* **Wallet Provider submodule - `tatum.walletProvider.*`**: This submodule enables seamless interaction with external wallets like Metamask or Phantom within the browser. The Wallet Provider submodule allows the SDK to communicate with various wallet providers, streamlining the process of signing transactions, querying account balances, and interacting with smart contracts directly through popular browser wallets.
- **Wallet Provider submodule - `tatum.walletProvider.*`**: This submodule enables seamless interaction with external wallets like Metamask or Phantom within the browser. The Wallet Provider submodule allows the SDK to communicate with various wallet providers, streamlining the process of signing transactions, querying account balances, and interacting with smart contracts directly through popular browser wallets.

* **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).
- **Rate Exchange submodule - `tatum.rates.*`**: This submodule enables allows you to easily obtain exchange rates for fiat/crypto.

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)
}
}