Skip to content

Commit e56ee60

Browse files
authored
Update docs to reflect that testnet faucet is not accessible programmatically (#742)
1 parent 49dae59 commit e56ee60

File tree

25 files changed

+10550
-6174
lines changed

25 files changed

+10550
-6174
lines changed

.github/workflows/link-check.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
uses: lycheeverse/lychee-action@v1
1717
with:
1818
# These args ensure that all relevant links are checked, without flaky failures.
19-
#
20-
# 1. The --remap helps resolve links which don't list their file extension since all relevant files are .mdx.
19+
#
20+
# 1. The --remap helps resolve links which don't list their file extension since all relevant files are .mdx.
2121
# It also accounts for headings in relative links. Ex. [abc](./file#header) -> .../file.mdx#header
2222
# 2. TODO: When the /zh/ sections are all translated, please remove "--exclude '.*/zh/.*".
2323
# This is a temporary measure since not all pages have been translated yet, but the links are still there.
@@ -46,6 +46,7 @@ jobs:
4646
--exclude '^https://app\.spaceandtime\.ai/.*'
4747
--exclude '.*%7BmenuImage%7D.*'
4848
--exclude '.*imageUrl.*'
49+
--exclude '^(file:|[./]).*\/network\/faucet.mdx$'
4950
--accept '403,401,429'
5051
--retry-wait-time 1
5152
--max-retries 2

apps/nextra/pages/en/build/apis.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ _submitting_ transactions to the Aptos Blockchain. It also supports transaction
5555
<Card href="./apis/faucet-api">
5656
<Card.Title>Faucet API</Card.Title>
5757
<Card.Description>
58-
This API provides the ability to receive test tokens on devnet and testnet. Its primary purpose is the development
59-
and testing of applications and Move contracts before deploying them to mainnet.
58+
This API provides the ability to receive test tokens on devnet. Its primary purpose is the development
59+
and testing of applications and Move contracts before deploying them to mainnet. On testnet you can mint at the [mint page](/network/faucet).
6060
</Card.Description>
6161
</Card>
6262
</Cards>

apps/nextra/pages/en/build/apis/faucet-api.mdx

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,21 @@ title: "Faucet API"
44

55
# Faucet API
66

7-
The faucet allows users to get test `APT` on Devnet and Testnet. It is not available on Mainnet.
7+
The faucet allows users to get `APT` on devnet. On testnet you can only mint at the [mint page](/network/faucet). It is not available on Mainnet.
88

99
The endpoints for each faucet are:
1010

1111
- Devnet: https://faucet.devnet.aptoslabs.com
12-
- Testnet: https://faucet.testnet.aptoslabs.com
1312

1413
## Using the faucet
1514

16-
Each SDK has integration for devnet and testnet to use the faucet. Below are a few examples, but you can
15+
Each SDK has integration for devnet to use the faucet. Below are a few examples, but you can
1716
see more information on each individual [SDK's documentation](../sdks.mdx).
1817

1918
### Using the faucet in a wallet
2019

2120
Most wallets, such as [Petra](https://aptosfoundation.org/ecosystem/project/petra) or [Pontem](https://aptosfoundation.org/ecosystem/project/pontem-wallet)
22-
will have a faucet button for devnet and testnet. See full list of [Aptos Wallets](https://aptosfoundation.org/ecosystem/projects/wallets).
21+
will have a faucet button for devnet. See full list of [Aptos Wallets](https://aptosfoundation.org/ecosystem/projects/wallets).
2322

2423
### Using the faucet in the Aptos CLI
2524

apps/nextra/pages/en/build/cli/trying-things-on-chain/create-test-accounts.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Callout } from 'nextra/components'
66
You can install the Aptos CLI by following [these steps](../../cli.mdx) if you have not done so already.
77
</Callout>
88

9-
In general, to make a new account on-chain, you will need to generate keys and then fund the account. On test networks, you can fund a new account by asking a "faucet" account with test Aptos tokens to send them to your account.
9+
In general, to make a new account on-chain, you will need to generate keys and then fund the account. On devnet, you can fund a new account by asking a "faucet" account with test Aptos tokens to send them to your account. On testnet you can mint at the [mint page](/network/faucet).
1010

1111
Using the CLI, you can generate and fund a test account using:
1212

apps/nextra/pages/en/build/cli/working-with-move-contracts/arguments-in-json-tutorial.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Store Ace's address in a shell variable, so you can call it inline later on:
6565
ace_addr=0xacef1b9b7d4ab208b99fed60746d18dcd74865edb7eb3c3f1428233988e4ba46
6666
```
6767

68-
Fund Ace's account with the faucet (either devnet or testnet):
68+
Fund Ace's account with the faucet (only works on devnet):
6969

7070
```bash filename="Terminal"
7171
aptos account fund-with-faucet --account $ace_addr

apps/nextra/pages/en/build/guides/your-first-nft.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ Note that this only generates the local keypair. After generating the keypair an
334334

335335
### Step 4.3: Creating blockchain accounts
336336

337-
In order to actually instantiate the Account on-chain, it must be explicitly created somehow. On the devnet network, you can request free coins with the Faucet API to use for testing purposes. This example leverages the faucet to fund and inadvertently create Alice and Bob's accounts:
337+
In order to actually instantiate the Account on-chain, it must be explicitly created somehow. On devnet, you can request free coins with the Faucet API to use for testing purposes. This example leverages the faucet to fund and inadvertently create Alice and Bob's accounts:
338338

339339
<Tabs items={["TypeScript", "Python"]}>
340340
<Tabs.Tab>

apps/nextra/pages/en/build/sdks/community-sdks/kotlin-sdk/account.mdx

+2
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,5 @@ On test networks, you can fund an account programmatically by asking a
7777
```kotlin
7878
val fundedAccount = aptos.fundAccount(aliceAccount.accountAddress, FUNDING_AMOUNT)
7979
```
80+
81+
This only works on devnet. On testnet you can mint at the [mint page](/network/faucet).

apps/nextra/pages/en/build/sdks/community-sdks/kotlin-sdk/building-transactions.mdx

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The typical flow for sending a transaction is as follows:
1616
<Steps>
1717
### Create an Account
1818
To create a new account, you first generate new credentials then fund the
19-
account. On test networks, you can fund an account programmatically by asking
19+
account. On devnet, you can fund an account programmatically by asking
2020
a "faucet".
2121
```kotlin
2222
val aliceAccount = Account.generate()
@@ -31,6 +31,8 @@ val privateKey = Ed25519PrivateKey("myEd25519privatekeystring")
3131
val account = Account.fromPrivateKey(privateKey)
3232
```
3333

34+
On testnet you can mint at the [mint page](/network/faucet).
35+
3436
### Build the Transaction
3537
Kaptos provides a `buildTransaction.simple` method to build a transaction. You can specify
3638
the sender, entry function data like the function name, type arguments, and function arguments.

apps/nextra/pages/en/build/sdks/community-sdks/kotlin-sdk/quickstart.mdx

+3-1
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,15 @@ val aptos = Aptos(aptosConfig)
9494
### Create an Account
9595

9696
To create a new account, you first generate new credentials then fund the account.
97-
On test networks, you can fund an account programmatically by asking a "faucet"
97+
On devnet networks, you can fund an account programmatically by asking a "faucet"
9898

9999
```kotlin
100100
val aliceAccount = Account.generate()
101101
val bobAccount = Account.generate()
102102
```
103103

104+
On testnet you can mint at the [mint page](/network/faucet).
105+
104106
### Build the Transaction
105107

106108
```kotlin

apps/nextra/pages/en/build/sdks/community-sdks/swift-sdk.mdx

+6-4
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,14 @@ let newAccount = try Account.fromDerivationPath(Wallet.path, mnemonic: Wallet.mn
5151
```
5252

5353
### Funding accounts
54-
You can create and fund an account with a faucet on any network that is not mainnet
54+
You can create and fund an account with a faucet on devnet
5555
```swift
5656
let account = Account.generate()
5757
let txn = try await client.faucet.fundAccount(accountAddress: account.accountAddress, amount: 100_000_000)
5858
```
5959

60+
On testnet you can mint at the [mint page](/network/faucet).
61+
6062
### Sending a transaction
6163
You can send a AptosCoin via a transaction
6264

@@ -73,12 +75,12 @@ let rawTxn = try await aptos.transaction.build.simple(
7375
functionArguments: [bob.accountAddress, 100]
7476
)
7577
)
76-
// Sign
78+
// Sign
7779
let authenticator = try await aptos.transaction.sign.transaction(
7880
signer: senderAccount,
7981
transaction: rawTxn
8082
)
81-
// Submit
83+
// Submit
8284
let response = try await aptos.transaction.submit.simple(
8385
transaction: rawTxn,
8486
senderAuthenticator: authenticator
@@ -97,4 +99,4 @@ To run the SDK tests, simply run from the root of this repository:
9799
98100
```swift
99101
swift test
100-
```
102+
```

apps/nextra/pages/en/build/sdks/dotnet-sdk/transactions/basic-transactions.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class Program
4747
{
4848
static void Main(string[] args)
4949
{
50-
var config = new AptosConfig(Aptos.Networks.Mainnet);
50+
var config = new AptosConfig(Aptos.Networks.Devnet);
5151
var client = new AptosClient(config);
5252

5353
// 1. Create an account and fund it.

apps/nextra/pages/en/build/sdks/dotnet-sdk/transactions/sponsored-transactions.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class Program
6565
{
6666
static void Main(string[] args)
6767
{
68-
var config = new AptosConfig(Aptos.Networks.Mainnet);
68+
var config = new AptosConfig(Aptos.Networks.Devnet);
6969
var client = new AptosClient(config);
7070

7171
// 1. Create accounts and fund it them.

apps/nextra/pages/en/build/sdks/go-sdk/account.mdx

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ account2 := aptos.NewSecp256k1Account()
2525

2626
Once you have generated credentials, you **must** fund it for the network to know it exists.
2727

28-
In test environments this can be done with a faucet by running the following command:
28+
In devnet environments this can be done with a faucet by running the following command:
2929

3030
```go filename="fund.go"
3131
client, err = aptos.NewClient(aptos.DevnetConfig)
@@ -37,6 +37,8 @@ if err != nil {
3737
client.Fund(account1.Address, 100_000_000)
3838
```
3939

40+
On testnet you can mint at the [mint page](/network/faucet).
41+
4042
## Other Ways To Represent Accounts
4143
If you have a private key, or equivalent representation, you can use that to
4244
create an `Account` struct to manage those credentials while using the Go SDK.

apps/nextra/pages/en/build/sdks/ts-sdk/account.mdx

+6-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ There are several ways to generate account credentials using the TypeScript SDK.
1111
- `Account.fromPrivateKey()`
1212
- `Account.fromDerivationPath()`
1313

14-
`Account.generate()` is the most commonly used method to create keys for a new account.
14+
`Account.generate()` is the most commonly used method to create keys for a new account.
1515
It defaults to `ED25519` key encodings, but you can also manually specify which signing scheme you would prefer like so:
1616

1717
```ts
@@ -27,9 +27,9 @@ const account = Account.generate({
2727
Following [AIP-55](https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-55.md) the SDK supports `Legacy` and `Unified` authentications. `Legacy` includes `ED25519` and `MultiED25519` and `Unified` includes `SingleSender` and `MultiSender` authenticators.
2828
</Callout>
2929

30-
Once you have generated credentials, you **must** fund it for the network to know it exists.
30+
Once you have generated credentials, you **must** fund it for the network to know it exists.
3131

32-
In test environments this can be done with a faucet by running the following command:
32+
In localnet / devnet this can be done with a faucet by running the following command:
3333

3434
```ts filename="fund.ts"
3535
const transaction = await aptos.fundAccount({
@@ -38,8 +38,10 @@ const transaction = await aptos.fundAccount({
3838
});
3939
```
4040

41+
For testnet you can use the mint page [here](/network/faucet).
42+
4143
## Other Ways To Represent Accounts
42-
If you have a private key, or equivalent representation, you can use that to create an `Account` object to manage those credentials while using the TypeScript SDK.
44+
If you have a private key, or equivalent representation, you can use that to create an `Account` object to manage those credentials while using the TypeScript SDK.
4345

4446
Here are several examples that show how to do so with specific encoding schemes.
4547

apps/nextra/pages/en/build/sdks/ts-sdk/quickstart.mdx

+9-9
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,17 @@ To test if you have initialized the package correctly run:
4040

4141
<Tabs items={['npm', 'pnpm', 'yarn']}>
4242
<Tabs.Tab>
43-
```bash
43+
```bash
4444
npx ts-node src/quickstart.ts
4545
```
4646
</Tabs.Tab>
4747
<Tabs.Tab>
48-
```bash
48+
```bash
4949
pnpx ts-node src/quickstart.ts
5050
```
5151
</Tabs.Tab>
5252
<Tabs.Tab>
53-
```bash
53+
```bash
5454
yarn ts-node src/quickstart.ts
5555
```
5656
</Tabs.Tab>
@@ -76,7 +76,7 @@ async function example() {
7676
);
7777

7878
// Setup the client
79-
const config = new AptosConfig({ network: Network.TESTNET });
79+
const config = new AptosConfig({ network: Network.DEVNET });
8080
const aptos = new Aptos(config);
8181
}
8282

@@ -107,7 +107,7 @@ To begin with though, here’s how you can send a basic transaction to transfer
107107

108108
#### 1. Create an Account
109109

110-
To create a new account, you first generate new credentials then fund the account. On test networks you can fund an account programmatically by asking a "faucet" which has a lot of test APT to send some to your new account.
110+
To create a new account, you first generate new credentials then fund the account. On localnet / devnet you can fund an account programmatically by asking a "faucet" which has a lot of test APT to send some to your new account.
111111

112112
```ts filename="quickstart.ts"
113113
...
@@ -196,17 +196,17 @@ const executedTransaction = await aptos.waitForTransaction({ transactionHash: pe
196196

197197
<Tabs items={['npm', 'pnpm', 'yarn']}>
198198
<Tabs.Tab>
199-
```bash
199+
```bash
200200
npx ts-node src/quickstart.ts
201201
```
202202
</Tabs.Tab>
203203
<Tabs.Tab>
204-
```bash
204+
```bash
205205
pnpx ts-node src/quickstart.ts
206206
```
207207
</Tabs.Tab>
208208
<Tabs.Tab>
209-
```bash
209+
```bash
210210
yarn ts-node src/quickstart.ts
211211
```
212212
</Tabs.Tab>
@@ -231,7 +231,7 @@ async function example() {
231231
);
232232

233233
// Setup the client
234-
const config = new AptosConfig({ network: Network.TESTNET });
234+
const config = new AptosConfig({ network: Network.DEVNET });
235235
const aptos = new Aptos(config);
236236

237237
// Generate two account credentials

apps/nextra/pages/en/network/glossary.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,8 @@ then there is a guarantee that $T_N$ will never be included in the blockchain.
291291

292292
### Faucet
293293

294-
- **Faucet** is a service that mints APT on devnet and testnet. APT on these
295-
networks has no real world value, it is only for development purposes.
294+
- The **faucet** is a service that mints APT on devnet. For testnet see the [mint page](/network/faucet).
295+
- APT on devnet and testnet has no real world value, it is only for development purposes.
296296
- To use a faucet, see [Faucet API](../build/apis/faucet-api.mdx).
297297

298298
### Fullnodes

apps/nextra/pages/en/network/nodes/networks.mdx

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ toc: false
1717

1818
### Network properties
1919

20-
| Network Name | Chain ID | Genesis & Waypoint | Epoch Duration | Network Provider | Release Cadence | Wipe Cadence |
21-
|--------------|-------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|----------------|-----------------------------------------------------|-----------------|--------------|
22-
| Mainnet | 1 | [Files Here](https://github.com/aptos-labs/aptos-networks/tree/main/mainnet) | 2 hours | Fully Decentralized | Monthly, varies | Never |
23-
| Testnet | 2 | [Files Here](https://github.com/aptos-labs/aptos-networks/tree/main/testnet) | 2 hours | Managed by Aptos Labs on behalf of Aptos Foundation | Monthly, varies | Never |
24-
| Devnet | [On Aptos Explorer **select Devnet from top right**](https://explorer.aptoslabs.com/?network=Devnet). | [Files Here](https://github.com/aptos-labs/aptos-networks/tree/main/devnet) | 2 hours | Managed by Aptos Labs on behalf of Aptos Foundation | Weekly | On update |
20+
| Network Name | Chain ID | Genesis & Waypoint | Faucet | Epoch Duration | Network Provider | Release Cadence | Wipe Cadence |
21+
|--------------|-------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|-----------------------------------------------------------------------|----------------|-----------------------------------------------------|-----------------|--------------|
22+
| Mainnet | 1 | [Files Here](https://github.com/aptos-labs/aptos-networks/tree/main/mainnet) | N/A | 2 hours | Fully Decentralized | Monthly, varies | Never |
23+
| Testnet | 2 | [Files Here](https://github.com/aptos-labs/aptos-networks/tree/main/testnet) | No programmatic access, you must use the [mint page](/network/faucet) | 2 hours | Managed by Aptos Labs on behalf of Aptos Foundation | Monthly, varies | Never |
24+
| Devnet | [On Aptos Explorer **select Devnet from top right**](https://explorer.aptoslabs.com/?network=Devnet). | [Files Here](https://github.com/aptos-labs/aptos-networks/tree/main/devnet) | Accessible programmatically via the API | 2 hours | Managed by Aptos Labs on behalf of Aptos Foundation | Weekly | On update |
2525

2626

2727
### Network URLs
@@ -31,7 +31,7 @@ The below URLs are provided by Aptos Labs.
3131
| Network Name | REST API | REST API Spec | Indexer GraphQL API | Indexer GraphQL API Spec | Indexer GRPC | Faucet | Current Token Supply API |
3232
|--------------|--------------------------------------------------|--------------------------------------------------------------|-------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|--------------------------------------------|-------------------------------------------------|---------------------------------------------------------|
3333
| Mainnet | [REST API](https://api.mainnet.aptoslabs.com/v1) | [REST API Spec](https://api.mainnet.aptoslabs.com/v1/spec#/) | [Indexer API](https://api.mainnet.aptoslabs.com/v1/graphql) | [Indexer API Spec](https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql) | [GRPC](https://grpc.mainnet.aptoslabs.com) | N/A | [API](https://aptos-supply.dev.gcp.aptosdev.com/supply) |
34-
| Testnet | [REST API](https://api.testnet.aptoslabs.com/v1) | [REST API Spec](https://api.testnet.aptoslabs.com/v1/spec#/) | [Indexer API](https://api.testnet.aptoslabs.com/v1/graphql) | [Indexer API Spec](https://cloud.hasura.io/public/graphiql?endpoint=https://api.testnet.aptoslabs.com/v1/graphql) | [GRPC](https://grpc.testnet.aptoslabs.com) | [Faucet](https://faucet.testnet.aptoslabs.com/) | N/A |
34+
| Testnet | [REST API](https://api.testnet.aptoslabs.com/v1) | [REST API Spec](https://api.testnet.aptoslabs.com/v1/spec#/) | [Indexer API](https://api.testnet.aptoslabs.com/v1/graphql) | [Indexer API Spec](https://cloud.hasura.io/public/graphiql?endpoint=https://api.testnet.aptoslabs.com/v1/graphql) | [GRPC](https://grpc.testnet.aptoslabs.com) | [Mint](/network/faucet) | N/A |
3535
| Devnet | [REST API](https://api.devnet.aptoslabs.com/v1) | [REST API Spec](https://api.devnet.aptoslabs.com/v1/spec#/) | [Indexer API](https://api.devnet.aptoslabs.com/v1/graphql) | [Indexer API Spec](https://cloud.hasura.io/public/graphiql?endpoint=https://api.devnet.aptoslabs.com/v1/graphql) | [GRPC](https://grpc.devnet.aptoslabs.com) | [Faucet](https://faucet.devnet.aptoslabs.com/) | N/A |
3636

3737
<details>

0 commit comments

Comments
 (0)