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

WIP content #13130

Merged
merged 5 commits into from
Jul 25, 2023
Merged

WIP content #13130

merged 5 commits into from
Jul 25, 2023

Conversation

ronny-mysten
Copy link
Contributor

Description

Prelim doc content for Hayes.

Test Plan

NA


If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process.

Type of Change (Check all that apply)

  • protocol change
  • user-visible impact
  • breaking change for a client SDKs
  • breaking change for FNs (FN binary must upgrade)
  • breaking change for validators or node operators (must upgrade binaries)
  • breaking change for on-chain data layout
  • necessitate either a data wipe or data migration

Release notes

@ronny-mysten ronny-mysten requested a review from a team as a code owner July 24, 2023 23:46
@vercel
Copy link

vercel bot commented Jul 24, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mysten-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 25, 2023 9:25pm
sui-typescript-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 25, 2023 9:25pm
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
explorer ⬜️ Ignored (Inspect) Jul 25, 2023 9:25pm
multisig-toolkit ⬜️ Ignored (Inspect) Jul 25, 2023 9:25pm
sui-kiosk ⬜️ Ignored (Inspect) Jul 25, 2023 9:25pm
sui-wallet-kit ⬜️ Ignored (Inspect) Jul 25, 2023 9:25pm

@github-actions
Copy link
Contributor

github-actions bot commented Jul 24, 2023

⚠️ 🦋 Changesets Warning: This PR has changes to public npm packages, but does not contain a changeset. You can create a changeset easily by running pnpm changeset in the root of the Sui repo, and following the prompts. If your change does not need a changeset (e.g. a documentation-only change), you can ignore this message. This warning will be removed when a changeset is added to this pull request.

Learn more about Changesets.

// assign Testnet RPC address
const testnet = 'https://fullnode.testnet.sui.io:443/';
// set endpoint value to Testnet RPC URL
const SuiClient = new SuiClient({ endpoint: testnet });
Copy link
Contributor

Choose a reason for hiding this comment

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

endpoint was renamed to url

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmmm. I ran into this so not sure why I failed to update. Good catch.

@@ -0,0 +1,53 @@
# Connecting to Sui Network

The Sui TypeScript SDK provides a SuiClient class that you can use to connect to a network's JSON-RPC server. Use the `SuiClient` for all JSON-RPC read-only operations.
Copy link
Contributor

Choose a reason for hiding this comment

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

the SuiClient is not strictly read-only, it also supports other RPC methods like sending a transaction

});
```

| Connection object | Full node address | `faucet` location |
Copy link
Contributor

Choose a reason for hiding this comment

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

connect objects are being removed from the sdk, maybe we can just use network for this column

```typescript
import { JsonRpcProvider, localnetConnection } from '@mysten/sui.js';
// connect to local RPC server
const provider = new JsonRpcProvider(localnetConnection);
Copy link
Contributor

Choose a reason for hiding this comment

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

JsonRpcProvider will be deprecated and replaced with SuiClient (which does not support faucet).

The updated way to request sui from a faucet is documented here: https://github.com/MystenLabs/sui/blob/main/sdk/docs/pages/typescript-sdk/faucet.mdx


You need an address on a Sui development network (Devnet, Testnet, Localnet). If you don't already have an address, use the [Sui Client CLI](https://docs.sui.io/build/cli-client) or the [Sui Wallet browser extension](https://docs.mystenlabs.com/wallet) to create one.

## Clone Sui project and build SDK
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure we need this as part of the docs site, at least not as a prominent part.

Generally, I think we want people to use the published version of the client rather than building/linking a local version of the SDK

Projects developing against one of the on-chain Sui networks (Devnet, Testnet, Mainnet) should use the base SDK published in the NPM registry (previous section) because the code aligns with the relevant JSON-RPC. If your developing against a [local network](https://docs.sui.io/testnet/build/sui-local-network) built from the `main` branch of the Sui monorepo, however, you should use the `experimental`-tagged SDK package as it contains the latest features (or a local build detailed in the section that follows).

```sh
<Tabs items={["npm", "yarn", "pnpm"]} group="pkg-mgr">
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I saw that and was super excited about it, as nerdy as that sounds. But, I left this in there for now because we could use similar behavior for other tab groups. Windows/Mac/Linux, for instance. Of course, there might also already be similar plugins for the cases we'd need...something to noodle on anyway.

@hayes-mysten hayes-mysten enabled auto-merge (squash) July 25, 2023 23:29
@hayes-mysten
Copy link
Contributor

just pushed some style fixes to make the linter happy, I'll merge this so anything new is based on the changes you already made here, thanks for adding all this!

@hayes-mysten hayes-mysten merged commit 1688231 into MystenLabs:main Jul 25, 2023
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants