Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* docs: add docs links for crates published to crates.io

(cherry picked from commit 24d18b3)

# Conflicts:
#	core/Cargo.toml
#	measure/Cargo.toml
#	programs/bpf/rust/finalize/Cargo.toml

* docs: add rust client api entry

(cherry picked from commit 3e6c7c4)

* docs: rename 'deployed programs' section to 'on-chain programs'

(cherry picked from commit 0e452c8)

* docs: 'builtins' -> 'runtime facilities'

(cherry picked from commit 9c8be34)

* docs: stabilize spl token jsonrpc methods

(cherry picked from commit 45190f6)

* docs: deprecate lastvalidslot field of jsonrpc getfees

(cherry picked from commit c4ee1ab)

Co-authored-by: Trent Nelson <[email protected]>
  • Loading branch information
mergify[bot] and t-nelson authored Mar 11, 2021
1 parent a79ba51 commit 6e214bb
Show file tree
Hide file tree
Showing 114 changed files with 149 additions and 51 deletions.
1 change: 1 addition & 0 deletions account-decoder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description = "Solana account decoder"
authors = ["Solana Maintainers <[email protected]>"]
repository = "https://github.com/solana-labs/solana"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-account-decoder"
license = "Apache-2.0"
edition = "2018"

Expand Down
1 change: 1 addition & 0 deletions banks-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ authors = ["Solana Maintainers <[email protected]>"]
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-banks-client"
edition = "2018"

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions banks-interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ authors = ["Solana Maintainers <[email protected]>"]
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-banks-interface"
edition = "2018"

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions banks-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ authors = ["Solana Maintainers <[email protected]>"]
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-banks-server"
edition = "2018"

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions clap-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ authors = ["Solana Maintainers <[email protected]>"]
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-clap-utils"
edition = "2018"

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions cli-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ version = "1.5.15"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-cli-config"

[dependencies]
dirs-next = "2.0.0"
Expand Down
1 change: 1 addition & 0 deletions cli-output/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ version = "1.5.15"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-cli-output"

[dependencies]
chrono = { version = "0.4.11", features = ["serde"] }
Expand Down
1 change: 1 addition & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ version = "1.5.15"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-cli"

[dependencies]
bincode = "1.3.1"
Expand Down
1 change: 1 addition & 0 deletions client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description = "Solana Client"
authors = ["Solana Maintainers <[email protected]>"]
repository = "https://github.com/solana-labs/solana"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-client"
license = "Apache-2.0"
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
name = "solana-core"
description = "Blockchain, Rebuilt for Scale"
version = "1.5.15"
documentation = "https://docs.rs/solana"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-core"
readme = "../README.md"
repository = "https://github.com/solana-labs/solana"
authors = ["Solana Maintainers <[email protected]>"]
Expand Down
1 change: 1 addition & 0 deletions crate-features/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description = "Solana Crate Features"
authors = ["Solana Maintainers <[email protected]>"]
repository = "https://github.com/solana-labs/solana"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-crate-features"
license = "Apache-2.0"
edition = "2018"

Expand Down
10 changes: 5 additions & 5 deletions docs/publish-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ cat > "$CONFIG_FILE" <<EOF
"redirects": [
{ "source": "/apps", "destination": "/developing/programming-model/overview" },
{ "source": "/apps/bakcwards-compatibility", "destination": "/developing/backwards-compatibility" },
{ "source": "/apps/break", "destination": "/developing/deployed-programs/examples" },
{ "source": "/apps/break", "destination": "/developing/on-chain-programs/examples" },
{ "source": "/apps/builtins", "destination": "/developing/builtin-programs" },
{ "source": "/apps/drones", "destination": "/developing/deployed-programs/examples" },
{ "source": "/apps/hello-world", "destination": "/developing/deployed-programs/examples" },
{ "source": "/apps/drones", "destination": "/developing/on-chain-programs/examples" },
{ "source": "/apps/hello-world", "destination": "/developing/on-chain-programs/examples" },
{ "source": "/apps/javascript-api", "destination": "/developing/clients/javascript-api" },
{ "source": "/apps/jsonrpc-api", "destination": "/developing/clients/jsonrpc-api" },
{ "source": "/apps/programming-faq", "destination": "/developing/deployed-programs/faq" },
{ "source": "/apps/programming-faq", "destination": "/developing/on-chain-programs/faq" },
{ "source": "/apps/rent", "destination": "/developing/programming-model/accounts" },
{ "source": "/apps/sysvars", "destination": "/developing/programming-model/sysvars" },
{ "source": "/apps/webwallet", "destination": "/developing/deployed-programs/examples" },
{ "source": "/apps/webwallet", "destination": "/developing/on-chain-programs/examples" },
{ "source": "/implemented-proposals/cross-program-invocation", "destination": "/developing/programming-model/cpi" },
{ "source": "/implemented-proposals/program-derived-addresses", "destination": "/developing/programming-model/program-derived-addresses" },
{ "source": "/implemented-proposals/secp256k1_instruction", "destination": "/developing/programming-model/secpk1-instructions" }
Expand Down
23 changes: 12 additions & 11 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,27 +77,28 @@ module.exports = {
items: [
"developing/clients/jsonrpc-api",
"developing/clients/javascript-api",
"developing/clients/rust-api",
],
},
{
type: "category",
label: "Builtins",
label: "Runtime Facilities",
items: [
"developing/builtins/programs",
"developing/builtins/sysvars",
"developing/runtime-facilities/programs",
"developing/runtime-facilities/sysvars",
],
},
{
type: "category",
label: "Deployed Programs",
label: "On-chain Programs",
items: [
"developing/deployed-programs/overview",
"developing/deployed-programs/developing-rust",
"developing/deployed-programs/developing-c",
"developing/deployed-programs/deploying",
"developing/deployed-programs/debugging",
"developing/deployed-programs/examples",
"developing/deployed-programs/faq",
"developing/on-chain-programs/overview",
"developing/on-chain-programs/developing-rust",
"developing/on-chain-programs/developing-c",
"developing/on-chain-programs/deploying",
"developing/on-chain-programs/debugging",
"developing/on-chain-programs/examples",
"developing/on-chain-programs/faq",
],
},
"developing/backwards-compatibility",
Expand Down
2 changes: 1 addition & 1 deletion docs/src/cli/deploy-a-program.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ smart contracts elsewhere) with the Solana tools.

To learn about developing and executing programs on Solana, start with the
[overview](developing/programming-model/overview.md) and then dig into the
details of [deployed programs](developing/deployed-programs/overview.md).
details of [on-chain programs](developing/on-chain-programs/overview.md).

To deploy a program, use the Solana tools to interact with the on-chain loader
to:
Expand Down
27 changes: 11 additions & 16 deletions docs/src/developing/clients/jsonrpc-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ gives a convenient interface for the RPC methods.
- [getSlotLeader](jsonrpc-api.md#getslotleader)
- [getStakeActivation](jsonrpc-api.md#getstakeactivation)
- [getSupply](jsonrpc-api.md#getsupply)
- [getTokenAccountBalance](jsonrpc-api.md#gettokenaccountbalance)
- [getTokenAccountsByDelegate](jsonrpc-api.md#gettokenaccountsbydelegate)
- [getTokenAccountsByOwner](jsonrpc-api.md#gettokenaccountsbyowner)
- [getTokenLargestAccounts](jsonrpc-api.md#gettokenlargestaccounts)
- [getTokenSupply](jsonrpc-api.md#gettokensupply)
- [getTransactionCount](jsonrpc-api.md#gettransactioncount)
- [getVersion](jsonrpc-api.md#getversion)
- [getVoteAccounts](jsonrpc-api.md#getvoteaccounts)
Expand All @@ -75,16 +80,6 @@ gives a convenient interface for the RPC methods.
- [slotSubscribe](jsonrpc-api.md#slotsubscribe)
- [slotUnsubscribe](jsonrpc-api.md#slotunsubscribe)

## Unstable Methods

Unstable methods may see breaking changes in patch releases and may not be supported in perpetuity.

- [getTokenAccountBalance](jsonrpc-api.md#gettokenaccountbalance)
- [getTokenAccountsByDelegate](jsonrpc-api.md#gettokenaccountsbydelegate)
- [getTokenAccountsByOwner](jsonrpc-api.md#gettokenaccountsbyowner)
- [getTokenLargestAccounts](jsonrpc-api.md#gettokenlargestaccounts)
- [getTokenSupply](jsonrpc-api.md#gettokensupply)

## Request Formatting

To make a JSON-RPC request, send an HTTP POST request with a `Content-Type:
Expand Down Expand Up @@ -1218,7 +1213,7 @@ The result will be an RpcResponse JSON object with `value` set to a JSON object

- `blockhash: <string>` - a Hash as base-58 encoded string
- `feeCalculator: <object>` - FeeCalculator object, the fee schedule for this block hash
- `lastValidSlot: <u64>` - last slot in which a blockhash will be valid (NOTE: this can be inaccurate when there are [skipped slots](../../terminology.md#skipped-slot))
- `lastValidSlot: <u64>` - DEPRECATED - this value is inaccurate and should not be relied upon

#### Example:

Expand Down Expand Up @@ -2370,7 +2365,7 @@ Result:

### getTokenAccountBalance

Returns the token balance of an SPL Token account. **UNSTABLE**
Returns the token balance of an SPL Token account.

#### Parameters:

Expand Down Expand Up @@ -2416,7 +2411,7 @@ Result:

### getTokenAccountsByDelegate

Returns all SPL Token accounts by approved Delegate. **UNSTABLE**
Returns all SPL Token accounts by approved Delegate.

#### Parameters:

Expand Down Expand Up @@ -2506,7 +2501,7 @@ Result:

### getTokenAccountsByOwner

Returns all SPL Token accounts by token owner. **UNSTABLE**
Returns all SPL Token accounts by token owner.

#### Parameters:

Expand Down Expand Up @@ -2596,7 +2591,7 @@ Result:

### getTokenLargestAccounts

Returns the 20 largest accounts of a particular SPL Token type. **UNSTABLE**
Returns the 20 largest accounts of a particular SPL Token type.

#### Parameters:

Expand Down Expand Up @@ -2652,7 +2647,7 @@ Result:

### getTokenSupply

Returns the total supply of an SPL Token type. **UNSTABLE**
Returns the total supply of an SPL Token type.

#### Parameters:

Expand Down
8 changes: 8 additions & 0 deletions docs/src/developing/clients/rust-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Rust API
---

See [doc.rs](https://docs.rs/releases/search?query=solana-) for documentation of
all crates published by Solana. In particular [solana-sdk](https://docs.rs/solana-sdk)
for working with common data structures and [solana-client](https://docs.rs/solana-client)
for querying the [JSON RPC API](jsonrpc-api).
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ result against the addresses supplied in the instruction.
## Examples

Refer to [Developing with
Rust](developing/deployed-programs/../../../deployed-programs/developing-rust.md#examples)
Rust](developing/on-chain-programs/../../../on-chain-programs/developing-rust.md#examples)
and [Developing with
C](developing/deployed-programs/../../../deployed-programs/developing-c.md#examples)
C](developing/on-chain-programs/../../../on-chain-programs/developing-c.md#examples)
for examples of how to use cross-program invocation.
2 changes: 1 addition & 1 deletion docs/src/developing/programming-model/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ transaction. If any instruction is invalid, all account changes in the
transaction are discarded.

To start developing immediately you can build, deploy, and run one of the
[examples](developing/deployed-programs/examples.md).
[examples](developing/on-chain-programs/examples.md).
2 changes: 1 addition & 1 deletion docs/src/developing/programming-model/runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ total budget consumption will be a combination of the various costs of the
operations it performs.

At runtime a program may log how much of the compute budget remains. See
[debugging](developing/deployed-programs/debugging.md#monitoring-compute-budget-consumption)
[debugging](developing/on-chain-programs/debugging.md#monitoring-compute-budget-consumption)
for more information.

The budget values are conditional on feature enablement, take a look the compute
Expand Down
14 changes: 7 additions & 7 deletions docs/src/developing/programming-model/transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,15 @@ program will process this instruction. The program's account's owner specifies
which loader should be used to load and execute the program and the data
contains information about how the runtime should execute the program.

In the case of [deployed BPF
programs](developing/deployed-programs/overview.md), the owner is the BPF Loader
and the account data holds the BPF bytecode. Program accounts are permanently
marked as executable by the loader once they are successfully deployed. The
runtime will reject transactions that specify programs that are not executable.
In the case of [on-chain BPF programs](developing/on-chain-programs/overview.md),
the owner is the BPF Loader and the account data holds the BPF bytecode. Program
accounts are permanently marked as executable by the loader once they are
successfully deployed. The runtime will reject transactions that specify programs
that are not executable.


Unlike deployed programs, [builtins](developing/builtins/programs.md) are handled
differently in that they are built directly into the Solana runtime.
Unlike on-chain programs, [Native Programs](/developing/runtime-facilities/programs)
are handled differently in that they are built directly into the Solana runtime.

### Accounts

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
title: "Builtin Programs"
title: "Native Programs"
---

Solana contains a small handful of builtin programs, which are required to run
validator nodes. Unlike third-party programs, the builtin programs are part of
Solana contains a small handful of native programs, which are required to run
validator nodes. Unlike third-party programs, the native programs are part of
the validator implementation and can be upgraded as part of cluster upgrades.
Upgrades may occur to add features, fix bugs, or improve performance. Interface
changes to individual instructions should rarely, if ever, occur. Instead, when
change is needed, new instructions are added and previous ones are marked
deprecated. Apps can upgrade on their own timeline without concern of breakages
across upgrades.

For each builtin program the program id and description each supported
For each native program the program id and description each supported
instruction is provided. A transaction can mix and match instructions from different
programs, as well include instructions from deployed programs.
programs, as well include instructions from on-chain programs.

## System Program

Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions download-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ authors = ["Solana Maintainers <[email protected]>"]
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-download-utils"
edition = "2018"

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions faucet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ authors = ["Solana Maintainers <[email protected]>"]
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-faucet"
edition = "2018"

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions frozen-abi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description = "Solana Frozen ABI"
authors = ["Solana Maintainers <[email protected]>"]
repository = "https://github.com/solana-labs/solana"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-frozen-abi"
license = "Apache-2.0"
edition = "2018"

Expand Down
1 change: 1 addition & 0 deletions frozen-abi/macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description = "Solana Frozen ABI Macro"
authors = ["Solana Maintainers <[email protected]>"]
repository = "https://github.com/solana-labs/solana"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-frozen-abi-macro"
license = "Apache-2.0"
edition = "2018"

Expand Down
1 change: 1 addition & 0 deletions genesis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ version = "1.5.15"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-genesis"

[dependencies]
base64 = "0.12.3"
Expand Down
1 change: 1 addition & 0 deletions gossip/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ version = "1.5.15"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-gossip"

[dependencies]
clap = "2.33.1"
Expand Down
1 change: 1 addition & 0 deletions install/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ version = "1.5.15"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-install"

[dependencies]
atty = "0.2.11"
Expand Down
1 change: 1 addition & 0 deletions keygen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ authors = ["Solana Maintainers <[email protected]>"]
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-keygen"
edition = "2018"

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions ledger-tool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ version = "1.5.15"
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-ledger-tool"

[dependencies]
bs58 = "0.3.1"
Expand Down
Loading

0 comments on commit 6e214bb

Please sign in to comment.