diff --git a/.changeset/config.json b/.changeset/config.json index fc766e912..4dc8334b5 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,12 +1,12 @@ { "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", "access": "public", - "baseBranch": "master", + "baseBranch": "main", "bumpVersionsWithWorkspaceProtocolOnly": true, "changelog": [ "@changesets/changelog-github", { - "repo": "solana-labs/solana-web3.js" + "repo": "anza-xyz/solana-web3.js" } ], "fixed": [["@solana/!({*-impl,build-scripts,test-*,tsconfig})"]], diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 2268c9c3d..4d32122f8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,17 +5,6 @@ version: 2 updates: - - target-branch: 'maintenance/v1.x' - package-ecosystem: 'npm' - directory: '/' - schedule: - interval: daily - time: '01:00' - timezone: America/Los_Angeles - labels: - - 'automerge' - commit-message: - prefix: 'chore:' - package-ecosystem: 'npm' directory: '/' schedule: diff --git a/.github/label-actions.yml b/.github/label-actions.yml index c89e5aee4..abf7527d7 100644 --- a/.github/label-actions.yml +++ b/.github/label-actions.yml @@ -21,7 +21,7 @@ question: --- _This - [automated message](https://github.com/solana-labs/solana-web3.js/blob/master/.github/label-actions.yml) + [automated message](https://github.com/anza-xyz/solana-web3.js/blob/main/.github/label-actions.yml) is a result of having added the ‘question’ tag_. # Close the issue diff --git a/.github/workflows/bundlesize.yml b/.github/workflows/bundlesize.yml index 93e3ad886..2ac0b2227 100644 --- a/.github/workflows/bundlesize.yml +++ b/.github/workflows/bundlesize.yml @@ -2,7 +2,8 @@ name: Compare bundle size on: push: - branches: [master] + branches: + - main pull_request: types: [synchronize, opened, reopened] diff --git a/.github/workflows/preview-gh-pages.yml b/.github/workflows/preview-gh-pages.yml deleted file mode 100644 index 1751ed661..000000000 --- a/.github/workflows/preview-gh-pages.yml +++ /dev/null @@ -1,100 +0,0 @@ -name: Preview GitHub Pages - -on: - pull_request: - types: [synchronize, opened, reopened] - -env: - # Among other things, opts out of Turborepo telemetry - # See https://consoledonottrack.com/ - DO_NOT_TRACK: '1' - # Some tasks slow down considerably on GitHub Actions runners when concurrency is high - TURBO_CONCURRENCY: 1 - # Enables Turborepo Remote Caching. - TURBO_REMOTE_CACHE_SIGNATURE_KEY: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }} - TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} - TURBO_TEAM: ${{ secrets.TURBO_TEAM }} - -jobs: - compile-gh-pages-legacy: - runs-on: ubuntu-latest - if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: maintenance/v1.x - - - name: Install Dependencies - uses: ./.github/workflows/actions/install-dependencies - - - name: Compile and Upload Artifacts - uses: ./.github/workflows/actions/compile-gh-pages - - compile-gh-pages: - runs-on: ubuntu-latest - if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Dependencies - uses: ./.github/workflows/actions/install-dependencies - - - name: Compile and Upload Artifacts - uses: ./.github/workflows/actions/compile-gh-pages - with: - pr-number: ${{ github.event.pull_request.number }} - repository: solana-web3.js-pr-preview - - preview: - runs-on: ubuntu-latest - if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' - needs: [compile-gh-pages, compile-gh-pages-legacy] - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Dependencies - uses: ./.github/workflows/actions/install-dependencies - - - name: Download Deploy Directory from Artifact Cache - uses: actions/download-artifact@v4 - with: - path: .ghpages-deploy - pattern: ghpages-deploy-artifacts* - merge-multiple: true - - - name: Deploy to Preview Github Pages - uses: peaceiris/actions-gh-pages@v4 - with: - destination_dir: ${{ format('{0}/', github.event.pull_request.number) }} - external_repository: solana-labs/solana-web3.js-pr-preview - personal_token: ${{ secrets.PR_PREVIEW_REPO_CONTENTS_TOKEN }} - publish_dir: .ghpages-deploy - - - name: Find Existing Preview Link Comment - uses: peter-evans/find-comment@v3 - id: find-comment - with: - issue-number: ${{ github.event.pull_request.number }} - comment-author: 'github-actions[bot]' - body-includes: - - - name: Create Preview Link Comment - uses: actions/github-script@v7 - if: steps.find-comment.outputs.comment-id == '' - with: - script: > - const prNumber = context.issue.number; - github.rest.issues.createComment({ - issue_number: prNumber, - owner: context.repo.owner, - repo: context.repo.repo, - body: [ - '', - 'A preview of the GitHub Pages site based on this PR is now available here:', - '', - `solana-labs.github.io/solana-web3.js-pr-preview/${prNumber}/`, - ].join('\n'), - }); diff --git a/.github/workflows/publish-canary-releases.yml b/.github/workflows/publish-canary-releases.yml index 215b06bf3..7dcb7d115 100644 --- a/.github/workflows/publish-canary-releases.yml +++ b/.github/workflows/publish-canary-releases.yml @@ -3,10 +3,10 @@ name: Publish Canary Releases on: workflow_dispatch: branches: - - master + - main push: branches: - - master + - main env: # Among other things, opts out of Turborepo telemetry diff --git a/.github/workflows/publish-gh-pages.yml b/.github/workflows/publish-gh-pages.yml deleted file mode 100644 index 1993584ce..000000000 --- a/.github/workflows/publish-gh-pages.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: Publish GitHub Pages - -on: - workflow_dispatch: - branches: - - master - - maintenance/* - push: - branches: - - master - - maintenance/* - -env: - # Among other things, opts out of Turborepo telemetry - # See https://consoledonottrack.com/ - DO_NOT_TRACK: '1' - # Some tasks slow down considerably on GitHub Actions runners when concurrency is high - TURBO_CONCURRENCY: 1 - # Enables Turborepo Remote Caching. - TURBO_REMOTE_CACHE_SIGNATURE_KEY: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }} - TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} - TURBO_TEAM: ${{ secrets.TURBO_TEAM }} - -jobs: - compile-gh-pages-legacy: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: maintenance/v1.x - - - name: Install Dependencies - uses: ./.github/workflows/actions/install-dependencies - - - name: Compile and Upload Artifacts - # Be aware that this is the version that lives on the `maintenance/v1.x` branch. - uses: ./.github/workflows/actions/compile-gh-pages - - compile-gh-pages: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Dependencies - uses: ./.github/workflows/actions/install-dependencies - - - name: Compile and Upload Artifacts - uses: ./.github/workflows/actions/compile-gh-pages - - publish: - runs-on: ubuntu-latest - needs: [compile-gh-pages, compile-gh-pages-legacy] - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Dependencies - uses: ./.github/workflows/actions/install-dependencies - - - name: Download Deploy Directory from Artifact Cache - uses: actions/download-artifact@v4 - with: - path: .ghpages-deploy - pattern: ghpages-deploy-artifacts* - merge-multiple: true - - - name: Deploy to Github Pages - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: .ghpages-deploy diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml index 7ae3ccfa0..0d3ea6c8f 100644 --- a/.github/workflows/publish-packages.yml +++ b/.github/workflows/publish-packages.yml @@ -3,10 +3,10 @@ name: Publish Packages on: workflow_dispatch: branches: - - master + - main push: branches: - - master + - main env: # Among other things, opts out of Turborepo telemetry diff --git a/README.md b/README.md index aca8df190..a6a8f497e 100644 --- a/README.md +++ b/README.md @@ -1056,7 +1056,7 @@ export const getMyTokenCodec = (): Codec => combineCodec(getMyTokenEncoder(), getMyTokenDecoder()); ``` -You can read more about codecs in [the official Codec documentation](https://github.com/solana-labs/solana-web3.js/blob/master/packages/codecs/README.md). +You can read more about codecs in [the official Codec documentation](https://github.com/anza-xyz/solana-web3.js/blob/main/packages/codecs/README.md). ## Type-Safety @@ -1224,7 +1224,7 @@ Here’s how to convert legacy transaction objects to the new library’s transa const modernTransaction = fromVersionedTransaction(classicTransaction); ``` -To see more conversions supported by `@solana/compat`, you can check out the package’s [README on GitHub](https://github.com/solana-labs/solana-web3.js/blob/master/packages/compat/README.md). +To see more conversions supported by `@solana/compat`, you can check out the package’s [README on GitHub](https://github.com/anza-xyz/solana-web3.js/blob/main/packages/compat/README.md). ## Program Clients @@ -1448,13 +1448,13 @@ expect(result).toMatchObject({ }); ``` -See more in the package’s [README on GitHub](https://github.com/solana-labs/solana-web3.js/tree/master/packages/rpc-graphql). +See more in the package’s [README on GitHub](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/rpc-graphql). ## Development You can see all development of this library and associated GraphQL tooling in the web3.js repository on GitHub. -- https://github.com/solana-labs/solana-web3.js +- https://github.com/anza-xyz/solana-web3.js You can follow along with program client generator development in the `@solana-program` org and the `@codama-idl/codama` repository. diff --git a/SECURITY.md b/SECURITY.md index d4c2b73b6..2a6b67e19 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -9,7 +9,7 @@ **DO NOT CREATE A GITHUB ISSUE** to report a security problem. -Instead please use this [Report a Vulnerability](https://github.com/solana-labs/solana-web3.js/security/advisories/new) link. Provide a helpful title, detailed description of the vulnerability and an exploit proof-of-concept. Speculative submissions without proof-of-concept will be closed with no further consideration. +Instead please use this [Report a Vulnerability](https://github.com/anza-xyz/solana-web3.js/security/advisories/new) link. Provide a helpful title, detailed description of the vulnerability and an exploit proof-of-concept. Speculative submissions without proof-of-concept will be closed with no further consideration. If you haven't done so already, please **enable two-factor auth** in your GitHub account. @@ -27,23 +27,23 @@ In case an incident is discovered or reported, the following process will be fol ### 1. Accept the new report -In response to a newly reported security problem, a member of the `solana-labs/admins` group will accept the report to turn it into a draft advisory. The `solana-labs/security-incident-response` group should be added to the draft security advisory, and create a private fork of the repository (grey button towards the bottom of the page) if necessary. +In response to a newly reported security problem, a member of the `anza-xyz/core-contributors` group will accept the report to turn it into a draft advisory. The `anza-xyz/security-incident-response` group should be added to the draft security advisory, and create a private fork of the repository (grey button towards the bottom of the page) if necessary. If the advisory is the result of an audit finding, follow the same process as above but add the auditor's github user(s) and begin the title with "[Audit]". -If the report is out of scope, a member of the `solana-labs/admins` group will comment as such and then close the report. +If the report is out of scope, a member of the `anza-xyz/core-contributors` group will comment as such and then close the report. ### 2. Triage -Within the draft security advisory, discuss and determine the severity of the issue. If necessary, members of the `solana-labs/security-incident-response` group may add other github users to the advisory to assist. If it is determined that this is not a critical issue then the advisory should be closed and if more follow-up is required a normal Solana public github issue should be created. +Within the draft security advisory, discuss and determine the severity of the issue. If necessary, members of the `anza-xyz/security-incident-response` group may add other github users to the advisory to assist. If it is determined that this is not a critical issue then the advisory should be closed and if more follow-up is required a normal Solana public github issue should be created. ### 3. Prepare Fixes -Prepare a fix for the issue and push them to master in the private repository associated with the draft security advisory. There is no CI available in the private repository so you must build from source and manually verify fixes. Code review from the reporter is ideal, as well as from multiple members of the core development team. +Prepare a fix for the issue and push them to `main` in the private repository associated with the draft security advisory. There is no CI available in the private repository so you must build from source and manually verify fixes. Code review from the reporter is ideal, as well as from multiple members of the core development team. ### 4. Ship the patch -Once the fix is accepted, a member of the solana-labs/security-incident-response group should prepare a patch using [`pnpm patch`](https://pnpm.io/cli/patch), [`yarn patch`](https://yarnpkg.com/cli/patch), and [`patch-package`](https://www.npmjs.com/package/patch-package) for developers still using `npm`. Post the patch to an unlisted [GitHub Gist](https://gist.github.com) and disseminate patch instructions privately to as many vulnerable applications as possible. +Once the fix is accepted, a member of the anza-xyz/security-incident-response group should prepare a patch using [`pnpm patch`](https://pnpm.io/cli/patch), [`yarn patch`](https://yarnpkg.com/cli/patch), and [`patch-package`](https://www.npmjs.com/package/patch-package) for developers still using `npm`. Post the patch to an unlisted [GitHub Gist](https://gist.github.com) and disseminate patch instructions privately to as many vulnerable applications as possible. ### 5. Public Disclosure and Release diff --git a/examples/react-app/README.md b/examples/react-app/README.md index 003e0a70a..4b4041b4c 100644 --- a/examples/react-app/README.md +++ b/examples/react-app/README.md @@ -2,8 +2,6 @@ This is an example of how to use `@solana/web3.js` and `@solana/react` to build a React web application. -The latest version of this code is automatically deployed to https://solana-labs.github.io/solana-web3.js/example/ - ## Features - Connects to browser wallets that support the Wallet Standard; one or more at a time diff --git a/packages/accounts/README.md b/packages/accounts/README.md index 11a9e9d7f..f84280a0e 100644 --- a/packages/accounts/README.md +++ b/packages/accounts/README.md @@ -11,7 +11,7 @@ # @solana/accounts -This package contains types and helper methods for representing, fetching and decoding Solana accounts. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library). +This package contains types and helper methods for representing, fetching and decoding Solana accounts. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/library). It provides a unified definition of a Solana account regardless of how it was retrieved and can represent both encoded and decoded accounts. It also introduces the concept of a `MaybeAccount` which represents a fetched account that may or may not exist on-chain whilst keeping track of its address in both cases. diff --git a/packages/accounts/package.json b/packages/accounts/package.json index ed7410247..f988850da 100644 --- a/packages/accounts/package.json +++ b/packages/accounts/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/addresses/README.md b/packages/addresses/README.md index ed1424637..13abe4056 100644 --- a/packages/addresses/README.md +++ b/packages/addresses/README.md @@ -11,7 +11,7 @@ # @solana/addresses -This package contains utilities for generating account addresses. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library). +This package contains utilities for generating account addresses. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/library). ## Types diff --git a/packages/addresses/package.json b/packages/addresses/package.json index 05a76ebc3..38f6b1c99 100644 --- a/packages/addresses/package.json +++ b/packages/addresses/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/assertions/package.json b/packages/assertions/package.json index fd67b7d92..b9d2e84f1 100644 --- a/packages/assertions/package.json +++ b/packages/assertions/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/codecs-core/README.md b/packages/codecs-core/README.md index cc1b74119..a0d869b11 100644 --- a/packages/codecs-core/README.md +++ b/packages/codecs-core/README.md @@ -11,13 +11,13 @@ # @solana/codecs-core -This package contains the core types and functions for encoding and decoding data structures on Solana. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library). +This package contains the core types and functions for encoding and decoding data structures on Solana. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/library). -This package is also part of the [`@solana/codecs` package](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs) which acts as an entry point for all codec packages as well as for their documentation. +This package is also part of the [`@solana/codecs` package](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs) which acts as an entry point for all codec packages as well as for their documentation. ## Composing codecs -The easiest way to create your own codecs is to compose the [various codecs](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs) offered by this library. For instance, here’s how you would define a codec for a `Person` object that contains a `name` string attribute and an `age` number stored in 4 bytes. +The easiest way to create your own codecs is to compose the [various codecs](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs) offered by this library. For instance, here’s how you would define a codec for a `Person` object that contains a `name` string attribute and an `age` number stored in 4 bytes. ```ts type Person = { name: string; age: number }; @@ -38,14 +38,14 @@ const person = personCodec.decode(bytes); There is a significant library of composable codecs at your disposal, enabling you to compose complex types. You may be interested in the documentation of these other packages to learn more about them: -- [`@solana/codecs-numbers`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-numbers) for number codecs. -- [`@solana/codecs-strings`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-strings) for string codecs. -- [`@solana/codecs-data-structures`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-data-structures) for many data structure codecs such as objects, arrays, tuples, sets, maps, enums, discriminated unions, booleans, etc. -- [`@solana/options`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/options) for a Rust-like `Option` type and associated codec. +- [`@solana/codecs-numbers`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-numbers) for number codecs. +- [`@solana/codecs-strings`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-strings) for string codecs. +- [`@solana/codecs-data-structures`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-data-structures) for many data structure codecs such as objects, arrays, tuples, sets, maps, enums, discriminated unions, booleans, etc. +- [`@solana/options`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/options) for a Rust-like `Option` type and associated codec. You may also be interested in some of the helpers of this `@solana/codecs-core` library such as `transformCodec`, `fixCodecSize` or `reverseCodec` that create new codecs from existing ones. -Note that all of these libraries are included in the [`@solana/codecs` package](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs) as well as the main `@solana/web3.js` package for your convenience. +Note that all of these libraries are included in the [`@solana/codecs` package](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs) as well as the main `@solana/web3.js` package for your convenience. ## Composing encoders and decoders @@ -659,4 +659,4 @@ containsBytes(new Uint8Array([1, 2, 3, 4]), new Uint8Array([2, 3]), 2); // false --- -To read more about the available codecs and how to use them, check out the documentation of the main [`@solana/codecs` package](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs). +To read more about the available codecs and how to use them, check out the documentation of the main [`@solana/codecs` package](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs). diff --git a/packages/codecs-core/package.json b/packages/codecs-core/package.json index b37212cb8..f1fb573ec 100644 --- a/packages/codecs-core/package.json +++ b/packages/codecs-core/package.json @@ -62,10 +62,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/codecs-data-structures/README.md b/packages/codecs-data-structures/README.md index 71f8aebc5..2dfb12542 100644 --- a/packages/codecs-data-structures/README.md +++ b/packages/codecs-data-structures/README.md @@ -11,9 +11,9 @@ # @solana/codecs-data-structures -This package contains codecs for various data structures such as arrays, maps, structs, tuples, enums, etc. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library). +This package contains codecs for various data structures such as arrays, maps, structs, tuples, enums, etc. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/library). -This package is also part of the [`@solana/codecs` package](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs) which acts as an entry point for all codec packages as well as for their documentation. +This package is also part of the [`@solana/codecs` package](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs) which acts as an entry point for all codec packages as well as for their documentation. ## Array codec @@ -589,7 +589,7 @@ To recap, here are all the possible configurations of the `getNullableCodec` fun | Custom `prefix` (`u16`) | `0x01002a00` / `0x0000` | `0x01002a00` / `0x00000000` | `0x01002a00` / `0x0000ff` | | No `prefix` | `0x2a00` / `0x` | `0x2a00` / `0x0000` | `0x2a00` / `0xff` | -Note that you might be interested in the Rust-like alternative version of nullable codecs, available in [the `@solana/options` package](https://github.com/solana-labs/solana-web3.js/tree/master/packages/options). +Note that you might be interested in the Rust-like alternative version of nullable codecs, available in [the `@solana/options` package](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/options). Separate `getNullableEncoder` and `getNullableDecoder` functions are also available. @@ -607,7 +607,7 @@ const bytes = getBytesCodec().encode(new Uint8Array([42])); // 0x2a const value = getBytesCodec().decode(bytes); // 0x2a ``` -The `getBytesCodec` function will encode and decode `Uint8Arrays` using as much bytes as necessary. If you'd like to restrict the number of bytes used by this codec, you may combine it with the [`fixCodecSize`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-core#fixing-the-size-of-codecs) or [`addCodecSizePrefix`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-core#prefixing-the-size-of-codecs) primitives. +The `getBytesCodec` function will encode and decode `Uint8Arrays` using as much bytes as necessary. If you'd like to restrict the number of bytes used by this codec, you may combine it with the [`fixCodecSize`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-core#fixing-the-size-of-codecs) or [`addCodecSizePrefix`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-core#prefixing-the-size-of-codecs) primitives. Here are some examples of how you might use the `getBytesCodec` function. @@ -694,7 +694,7 @@ getUnitDecoder().decode(anyBytes); --- -To read more about the available codecs and how to use them, check out the documentation of the main [`@solana/codecs` package](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs). +To read more about the available codecs and how to use them, check out the documentation of the main [`@solana/codecs` package](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs). ## Hidden prefix and suffix codec diff --git a/packages/codecs-data-structures/package.json b/packages/codecs-data-structures/package.json index a185f7081..2806cf4f6 100644 --- a/packages/codecs-data-structures/package.json +++ b/packages/codecs-data-structures/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/codecs-numbers/README.md b/packages/codecs-numbers/README.md index aa4f4d8b6..946afce0e 100644 --- a/packages/codecs-numbers/README.md +++ b/packages/codecs-numbers/README.md @@ -11,9 +11,9 @@ # @solana/codecs-numbers -This package contains codecs for numbers of different sizes and endianness. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library). +This package contains codecs for numbers of different sizes and endianness. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/library). -This package is also part of the [`@solana/codecs` package](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs) which acts as an entry point for all codec packages as well as for their documentation. +This package is also part of the [`@solana/codecs` package](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs) which acts as an entry point for all codec packages as well as for their documentation. ## Integer codecs @@ -127,4 +127,4 @@ Separate encoder and decoder functions are also available via `getShortU16Encode --- -To read more about the available codecs and how to use them, check out the documentation of the main [`@solana/codecs` package](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs). +To read more about the available codecs and how to use them, check out the documentation of the main [`@solana/codecs` package](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs). diff --git a/packages/codecs-numbers/package.json b/packages/codecs-numbers/package.json index 3b2a73f15..e7251940d 100644 --- a/packages/codecs-numbers/package.json +++ b/packages/codecs-numbers/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/codecs-strings/README.md b/packages/codecs-strings/README.md index 44129913d..e31b06fcb 100644 --- a/packages/codecs-strings/README.md +++ b/packages/codecs-strings/README.md @@ -11,9 +11,9 @@ # @solana/codecs-strings -This package contains codecs for strings of different sizes and encodings. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library). +This package contains codecs for strings of different sizes and encodings. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/library). -This package is also part of the [`@solana/codecs` package](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs) which acts as an entry point for all codec packages as well as for their documentation. +This package is also part of the [`@solana/codecs` package](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs) which acts as an entry point for all codec packages as well as for their documentation. ## Sizing string codecs @@ -37,7 +37,7 @@ codec.decode(new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0x6f])); // 'hello' ``` -This might be what you want — e.g. when having a string at the end of a data structure — but in many cases, you might want to have a size boundary for your string. You may achieve this by composing your string codec with the [`fixCodecSize`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-core#fixing-the-size-of-codecs) or [`addCodecSizePrefix`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-core#prefixing-the-size-of-codecs) functions. +This might be what you want — e.g. when having a string at the end of a data structure — but in many cases, you might want to have a size boundary for your string. You may achieve this by composing your string codec with the [`fixCodecSize`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-core#fixing-the-size-of-codecs) or [`addCodecSizePrefix`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-core#prefixing-the-size-of-codecs) functions. The `fixCodecSize` function accepts a fixed byte length and returns a `FixedSizeCodec` that will always use that amount of bytes to encode and decode a string. Any string longer or smaller than that size will be truncated or padded respectively. Here's how you can use it with a `utf8` codec: @@ -195,4 +195,4 @@ const value = getBaseXResliceDecoder('elho', 2).decode(bytes); // "hellolol" --- -To read more about the available codecs and how to use them, check out the documentation of the main [`@solana/codecs` package](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs). +To read more about the available codecs and how to use them, check out the documentation of the main [`@solana/codecs` package](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs). diff --git a/packages/codecs-strings/package.json b/packages/codecs-strings/package.json index f51164ee2..fcae6ccd9 100644 --- a/packages/codecs-strings/package.json +++ b/packages/codecs-strings/package.json @@ -62,10 +62,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/codecs/README.md b/packages/codecs/README.md index e702ea254..d7c365bbb 100644 --- a/packages/codecs/README.md +++ b/packages/codecs/README.md @@ -11,7 +11,7 @@ # @solana/codecs -This package contains all types and helpers for encoding and decoding anything to and from a `Uint8Array`. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library). +This package contains all types and helpers for encoding and decoding anything to and from a `Uint8Array`. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/library). No matter which serialization strategy we use, Codecs abstract away its implementation and offers a simple `encode` and `decode` interface. Codecs are also highly composable, allowing us to build complex data structures from simple building blocks. @@ -45,54 +45,54 @@ const getPersonDecoder = (): Decoder => The `@solana/codecs` package is composed of several smaller packages, each with its own set of responsibilities. You can learn more about codecs and how to create your own by reading their respective documentation. -- [`@solana/codecs-core`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-core) This package lays the foundation of codecs by providing core type and helper functions to create and compose them. - - [Composing codecs](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-core#composing-codecs). - - [Composing encoders and decoders](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-core#composing-encoders-and-decoders). - - [Combining encoders and decoders](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-core#combining-encoders-and-decoders). - - [Different From and To types](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-core#different-from-and-to-types). - - [Fixed-size and variable-size codecs](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-core#fixed-size-and-variable-size-codecs). - - [Creating custom codecs](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-core#creating-custom-codecs). - - [Transforming codecs](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-core#transforming-codecs). - - [Fixing the size of codecs](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-core#fixing-the-size-of-codecs). - - [Prefixing codecs with their size](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-core#prefixing-codecs-with-their-size). - - [Adding sentinels to codecs](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-core#adding-sentinels-to-codecs). - - [Adjusting the size of codecs](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-core#adjusting-the-size-of-codecs). - - [Offsetting codecs](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-core#offsetting-codecs). - - [Padding codecs](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-core#padding-codecs). - - [Reversing codecs](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-core#reversing-codecs). - - [Byte helpers](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-core#byte-helpers). -- [`@solana/codecs-numbers`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-numbers) This package offers codecs for numbers of various sizes and characteristics. - - [Integer codecs](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-numbers#integer-codecs). - - [Decimal number codecs](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-numbers#decimal-number-codecs). - - [Short u16 codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-numbers#short-u16-codec). -- [`@solana/codecs-strings`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-strings) This package provides codecs for strings of various encodings and size strategies. - - [Sizing string codecs](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-strings#sizing-string-codecs). - - [Utf8 codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-strings#utf8-codec). - - [Base 64 codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-strings#base-64-codec). - - [Base 58 codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-strings#base-58-codec). - - [Base 16 codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-strings#base-16-codec). - - [Base 10 codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-strings#base-10-codec). - - [Base X codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-strings#base-x-codec). - - [Re-slicing base X codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-strings#re-slicing-base-x-codec). -- [`@solana/codecs-data-structures`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-data-structures) This package offers a set of helpers for a variety of data structures such as objects, enums, arrays, maps, etc. - - [Array codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-data-structures#array-codec). - - [Set codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-data-structures#set-codec). - - [Map codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-data-structures#map-codec). - - [Tuple codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-data-structures#tuple-codec). - - [Struct codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-data-structures#struct-codec). - - [Enum codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-data-structures#enum-codec). - - [Literal union codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-data-structures#literal-union-codec). - - [Discriminated union codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-data-structures#discriminated-union-codec). - - [Union codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-data-structures#union-codec). - - [Boolean codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-data-structures#boolean-codec). - - [Nullable codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-data-structures#nullable-codec). - - [Bytes codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-data-structures#bytes-codec). - - [Bit array codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-data-structures#bit-array-codec). - - [Constant codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-data-structures#constant-codec). - - [Unit codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-data-structures#unit-codec). - - [Hidden prefix and suffix codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs-data-structures#hidden-prefix-and-suffix-codec). -- [`@solana/options`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/options) This package adds Rust-like `Options` to JavaScript and offers codecs and helpers to manage them. - - [Creating options](https://github.com/solana-labs/solana-web3.js/tree/master/packages/options#creating-options). - - [Option helpers](https://github.com/solana-labs/solana-web3.js/tree/master/packages/options#option-helpers). - - [Unwrapping options](https://github.com/solana-labs/solana-web3.js/tree/master/packages/options#unwrapping-options). - - [Option codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/options#option-codec). +- [`@solana/codecs-core`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-core) This package lays the foundation of codecs by providing core type and helper functions to create and compose them. + - [Composing codecs](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-core#composing-codecs). + - [Composing encoders and decoders](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-core#composing-encoders-and-decoders). + - [Combining encoders and decoders](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-core#combining-encoders-and-decoders). + - [Different From and To types](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-core#different-from-and-to-types). + - [Fixed-size and variable-size codecs](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-core#fixed-size-and-variable-size-codecs). + - [Creating custom codecs](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-core#creating-custom-codecs). + - [Transforming codecs](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-core#transforming-codecs). + - [Fixing the size of codecs](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-core#fixing-the-size-of-codecs). + - [Prefixing codecs with their size](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-core#prefixing-codecs-with-their-size). + - [Adding sentinels to codecs](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-core#adding-sentinels-to-codecs). + - [Adjusting the size of codecs](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-core#adjusting-the-size-of-codecs). + - [Offsetting codecs](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-core#offsetting-codecs). + - [Padding codecs](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-core#padding-codecs). + - [Reversing codecs](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-core#reversing-codecs). + - [Byte helpers](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-core#byte-helpers). +- [`@solana/codecs-numbers`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-numbers) This package offers codecs for numbers of various sizes and characteristics. + - [Integer codecs](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-numbers#integer-codecs). + - [Decimal number codecs](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-numbers#decimal-number-codecs). + - [Short u16 codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-numbers#short-u16-codec). +- [`@solana/codecs-strings`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-strings) This package provides codecs for strings of various encodings and size strategies. + - [Sizing string codecs](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-strings#sizing-string-codecs). + - [Utf8 codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-strings#utf8-codec). + - [Base 64 codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-strings#base-64-codec). + - [Base 58 codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-strings#base-58-codec). + - [Base 16 codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-strings#base-16-codec). + - [Base 10 codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-strings#base-10-codec). + - [Base X codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-strings#base-x-codec). + - [Re-slicing base X codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-strings#re-slicing-base-x-codec). +- [`@solana/codecs-data-structures`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-data-structures) This package offers a set of helpers for a variety of data structures such as objects, enums, arrays, maps, etc. + - [Array codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-data-structures#array-codec). + - [Set codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-data-structures#set-codec). + - [Map codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-data-structures#map-codec). + - [Tuple codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-data-structures#tuple-codec). + - [Struct codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-data-structures#struct-codec). + - [Enum codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-data-structures#enum-codec). + - [Literal union codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-data-structures#literal-union-codec). + - [Discriminated union codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-data-structures#discriminated-union-codec). + - [Union codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-data-structures#union-codec). + - [Boolean codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-data-structures#boolean-codec). + - [Nullable codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-data-structures#nullable-codec). + - [Bytes codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-data-structures#bytes-codec). + - [Bit array codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-data-structures#bit-array-codec). + - [Constant codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-data-structures#constant-codec). + - [Unit codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-data-structures#unit-codec). + - [Hidden prefix and suffix codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-data-structures#hidden-prefix-and-suffix-codec). +- [`@solana/options`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/options) This package adds Rust-like `Options` to JavaScript and offers codecs and helpers to manage them. + - [Creating options](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/options#creating-options). + - [Option helpers](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/options#option-helpers). + - [Unwrapping options](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/options#unwrapping-options). + - [Option codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/options#option-codec). diff --git a/packages/codecs/package.json b/packages/codecs/package.json index e93378b05..9f491ae21 100644 --- a/packages/codecs/package.json +++ b/packages/codecs/package.json @@ -59,10 +59,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/compat/README.md b/packages/compat/README.md index 3bdfa1d0b..ef4012e9a 100644 --- a/packages/compat/README.md +++ b/packages/compat/README.md @@ -11,7 +11,7 @@ # @solana/compat -This package contains utilities for converting from legacy web3js classes to the new data structures. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library). +This package contains utilities for converting from legacy web3js classes to the new data structures. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/library). ## Functions diff --git a/packages/compat/package.json b/packages/compat/package.json index b452efb1f..45effb38a 100644 --- a/packages/compat/package.json +++ b/packages/compat/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/errors/package.json b/packages/errors/package.json index 5a78103dd..51ea92680 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -62,10 +62,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/errors/src/codes.ts b/packages/errors/src/codes.ts index dc7491402..3a6c104cd 100644 --- a/packages/errors/src/codes.ts +++ b/packages/errors/src/codes.ts @@ -1,6 +1,6 @@ /** * To add a new error, follow the instructions at - * https://github.com/solana-labs/solana-web3.js/tree/master/packages/errors/#adding-a-new-error + * https://github.com/anza-xyz/solana-web3.js/tree/main/packages/errors/#adding-a-new-error * * WARNING: * - Don't remove error codes diff --git a/packages/errors/src/context.ts b/packages/errors/src/context.ts index 8f2eb08c7..e134fa49d 100644 --- a/packages/errors/src/context.ts +++ b/packages/errors/src/context.ts @@ -168,7 +168,7 @@ interface ReadonlyUint8Array extends Omit` types instead of `T | null` types. +The `getOptionCodec` function behaves exactly the same as the [`getNullableCodec`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs-data-structures#nullable-codec) except that it encodes `Option` types instead of `T | null` types. Namely, it accepts a codec of type `T` and returns a codec of type `Option`. Note that, when encoding, `T` or `null` may also be provided directly as input and will be interpreted as `Some(T)` or `None` respectively. However, when decoding, the output will always be an `Option` type. @@ -228,4 +228,4 @@ const bytes = getOptionEncoder(getU32Encoder()).encode(some(42)); const value = getOptionDecoder(getU32Decoder()).decode(bytes); ``` -To read more about the available codecs and how to use them, check out the documentation of the main [`@solana/codecs` package](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs). +To read more about the available codecs and how to use them, check out the documentation of the main [`@solana/codecs` package](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs). diff --git a/packages/options/package.json b/packages/options/package.json index 4de2ca699..b7d52e671 100644 --- a/packages/options/package.json +++ b/packages/options/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/programs/README.md b/packages/programs/README.md index e71d02e5d..044cb6d5c 100644 --- a/packages/programs/README.md +++ b/packages/programs/README.md @@ -11,7 +11,7 @@ # @solana/programs -This package contains helpers for identifying custom program errors. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library). +This package contains helpers for identifying custom program errors. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/library). ## Functions diff --git a/packages/programs/package.json b/packages/programs/package.json index 8130b7f4c..34157ebae 100644 --- a/packages/programs/package.json +++ b/packages/programs/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/promises/package.json b/packages/promises/package.json index d43df7427..acd8eb9ae 100644 --- a/packages/promises/package.json +++ b/packages/promises/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/react/package.json b/packages/react/package.json index 5e143ec68..20129a146 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/rpc-api/README.md b/packages/rpc-api/README.md index 6950ee82f..cbe2bcf6d 100644 --- a/packages/rpc-api/README.md +++ b/packages/rpc-api/README.md @@ -11,7 +11,7 @@ # @solana/rpc-api -This package contains types that describe the [methods](https://solana.com/docs/rpc/http) of the Solana JSON RPC API, and utilities for creating a `RpcApi` implementation with sensible defaults. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library). +This package contains types that describe the [methods](https://solana.com/docs/rpc/http) of the Solana JSON RPC API, and utilities for creating a `RpcApi` implementation with sensible defaults. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/library). Each RPC method is described in terms of a TypeScript type of the following form: diff --git a/packages/rpc-api/package.json b/packages/rpc-api/package.json index 6287d62f2..0e91e44c0 100644 --- a/packages/rpc-api/package.json +++ b/packages/rpc-api/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/rpc-api/src/__tests__/get-token-accounts-by-delegate-test.ts b/packages/rpc-api/src/__tests__/get-token-accounts-by-delegate-test.ts index 202fded5f..5e16155e6 100644 --- a/packages/rpc-api/src/__tests__/get-token-accounts-by-delegate-test.ts +++ b/packages/rpc-api/src/__tests__/get-token-accounts-by-delegate-test.ts @@ -240,7 +240,7 @@ describe('getTokenAccountsByDelegate', () => { describe('when called with base58 encoding', () => { // Currently we can't test this because every token account is >128 bytes - // The solana source only allows base58 encoding up to 128 bytes: https://github.com/solana-labs/solana/blob/master/account-decoder/src/lib.rs#L37 + // The solana source only allows base58 encoding up to 128 bytes: https://github.com/anza-xyz/agave/blob/d11072e4e00cb3a8009f62b3bddcec79069f970a/account-decoder/src/lib.rs#L39-L43 it.todo('returns RPC Response with account info with annotated base58 encoding'); }); @@ -394,7 +394,7 @@ describe('getTokenAccountsByDelegate', () => { describe('when called with no encoding', () => { // Currently we can't test this because every token account is >128 bytes - // The solana source only allows base58 encoding up to 128 bytes: https://github.com/solana-labs/solana/blob/master/account-decoder/src/lib.rs#L37 + // The solana source only allows base58 encoding up to 128 bytes: https://github.com/anza-xyz/agave/blob/d11072e4e00cb3a8009f62b3bddcec79069f970a/account-decoder/src/lib.rs#L39-L43 it.todo('returns base58 data without an annotation'); }); diff --git a/packages/rpc-api/src/__tests__/get-token-accounts-by-owner-test.ts b/packages/rpc-api/src/__tests__/get-token-accounts-by-owner-test.ts index 8080bb58f..05d56f6c7 100644 --- a/packages/rpc-api/src/__tests__/get-token-accounts-by-owner-test.ts +++ b/packages/rpc-api/src/__tests__/get-token-accounts-by-owner-test.ts @@ -240,7 +240,7 @@ describe('getTokenAccountsByOwner', () => { describe('when called with base58 encoding', () => { // Currently we can't test this because every token account is >128 bytes - // The solana source only allows base58 encoding up to 128 bytes: https://github.com/solana-labs/solana/blob/master/account-decoder/src/lib.rs#L37 + // The solana source only allows base58 encoding up to 128 bytes: https://github.com/anza-xyz/agave/blob/d11072e4e00cb3a8009f62b3bddcec79069f970a/account-decoder/src/lib.rs#L39-L43 it.todo('returns RPC Response with account info with annotated base58 encoding'); }); @@ -387,7 +387,7 @@ describe('getTokenAccountsByOwner', () => { describe('when called with no encoding', () => { // Currently we can't test this because every token account is >128 bytes - // The solana source only allows base58 encoding up to 128 bytes: https://github.com/solana-labs/solana/blob/master/account-decoder/src/lib.rs#L37 + // The solana source only allows base58 encoding up to 128 bytes: https://github.com/anza-xyz/agave/blob/d11072e4e00cb3a8009f62b3bddcec79069f970a/account-decoder/src/lib.rs#L39-L43 it.todo('returns base58 data without an annotation'); }); diff --git a/packages/rpc-graphql/package.json b/packages/rpc-graphql/package.json index c8f2d9dee..7302c91d6 100644 --- a/packages/rpc-graphql/package.json +++ b/packages/rpc-graphql/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/rpc-parsed-types/README.md b/packages/rpc-parsed-types/README.md index da951068d..74691632a 100644 --- a/packages/rpc-parsed-types/README.md +++ b/packages/rpc-parsed-types/README.md @@ -13,4 +13,4 @@ This package defines types for Parsed objects used in the [Solana JSON-RPC](https://docs.solana.com/api/http). It can be used standalone, but it is also exported as part of the Solana JavaScript SDK -[`@solana/web3.js@next`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library). +[`@solana/web3.js@next`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/library). diff --git a/packages/rpc-parsed-types/package.json b/packages/rpc-parsed-types/package.json index 13c3ca88c..ee7751add 100644 --- a/packages/rpc-parsed-types/package.json +++ b/packages/rpc-parsed-types/package.json @@ -59,10 +59,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/rpc-spec-types/README.md b/packages/rpc-spec-types/README.md index cb8e9ba09..30b111415 100644 --- a/packages/rpc-spec-types/README.md +++ b/packages/rpc-spec-types/README.md @@ -11,7 +11,7 @@ # @solana/rpc-spec-types -This package contains core types that can be used on both RPC and RPC Subscriptions specifications. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library). +This package contains core types that can be used on both RPC and RPC Subscriptions specifications. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/library). ## Types diff --git a/packages/rpc-spec-types/package.json b/packages/rpc-spec-types/package.json index 0c620c1cf..fe40a20ff 100644 --- a/packages/rpc-spec-types/package.json +++ b/packages/rpc-spec-types/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/rpc-spec/README.md b/packages/rpc-spec/README.md index 22ad438d6..f78253897 100644 --- a/packages/rpc-spec/README.md +++ b/packages/rpc-spec/README.md @@ -11,7 +11,7 @@ # @solana/rpc-spec -This package contains types that describe the implementation of the JSON RPC API, as well as methods to create one. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library). +This package contains types that describe the implementation of the JSON RPC API, as well as methods to create one. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/library). This API is designed to be used as follows: diff --git a/packages/rpc-spec/package.json b/packages/rpc-spec/package.json index 63b383c40..49b1bc804 100644 --- a/packages/rpc-spec/package.json +++ b/packages/rpc-spec/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/rpc-subscriptions-api/README.md b/packages/rpc-subscriptions-api/README.md index 1208e6c9f..cd326209a 100644 --- a/packages/rpc-subscriptions-api/README.md +++ b/packages/rpc-subscriptions-api/README.md @@ -11,7 +11,7 @@ # @solana/rpc-subscriptions-api -This package contains types that describe the [methods](https://solana.com/docs/rpc/websocket) of the Solana JSON RPC Subscriptions API, and utilities for creating a `RpcSubscriptionsApi` implementation with sensible defaults. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library). +This package contains types that describe the [methods](https://solana.com/docs/rpc/websocket) of the Solana JSON RPC Subscriptions API, and utilities for creating a `RpcSubscriptionsApi` implementation with sensible defaults. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/library). Each RPC subscriptions method is described in terms of a TypeScript type of the following form: diff --git a/packages/rpc-subscriptions-api/package.json b/packages/rpc-subscriptions-api/package.json index 0661a0506..07e573498 100644 --- a/packages/rpc-subscriptions-api/package.json +++ b/packages/rpc-subscriptions-api/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/rpc-subscriptions-api/src/block-notifications.ts b/packages/rpc-subscriptions-api/src/block-notifications.ts index 39d598b4a..c3316d904 100644 --- a/packages/rpc-subscriptions-api/src/block-notifications.ts +++ b/packages/rpc-subscriptions-api/src/block-notifications.ts @@ -20,8 +20,8 @@ type BlockNotificationsNotificationBase = Readonly<{ /** * Errors can arise in generating a block notification. * If an error is encountered, this field will contain the error, and the `block` field will return null. - * @see https://github.com/solana-labs/solana/blob/6ea51280ddc235ed93e16906c3427efd20cd7ce4/rpc/src/rpc_subscriptions.rs#L1059-L1074 - * @see https://github.com/solana-labs/solana/blob/6ea51280ddc235ed93e16906c3427efd20cd7ce4/rpc-client-api/src/response.rs#L507-L514 + * @see https://github.com/anza-xyz/agave/blob/6ea51280ddc235ed93e16906c3427efd20cd7ce4/rpc/src/rpc_subscriptions.rs#L1059-L1074 + * @see https://github.com/anza-xyz/agave/blob/6ea51280ddc235ed93e16906c3427efd20cd7ce4/rpc-client-api/src/response.rs#L507-L514 */ err: string | null; slot: Slot; diff --git a/packages/rpc-subscriptions-channel-websocket/package.json b/packages/rpc-subscriptions-channel-websocket/package.json index 317043618..4ac30b427 100644 --- a/packages/rpc-subscriptions-channel-websocket/package.json +++ b/packages/rpc-subscriptions-channel-websocket/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/rpc-subscriptions-spec/README.md b/packages/rpc-subscriptions-spec/README.md index 0c3c4debe..792877966 100644 --- a/packages/rpc-subscriptions-spec/README.md +++ b/packages/rpc-subscriptions-spec/README.md @@ -11,7 +11,7 @@ # @solana/rpc-subscriptions-spec -This package contains types that describe the implementation of the JSON RPC Subscriptions API, as well as methods to create one. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library). +This package contains types that describe the implementation of the JSON RPC Subscriptions API, as well as methods to create one. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/library). This API is designed to be used as follows: diff --git a/packages/rpc-subscriptions-spec/package.json b/packages/rpc-subscriptions-spec/package.json index 2cb40f65a..93a154b3f 100644 --- a/packages/rpc-subscriptions-spec/package.json +++ b/packages/rpc-subscriptions-spec/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/rpc-subscriptions/README.md b/packages/rpc-subscriptions/README.md index e46564690..ce211f6e7 100644 --- a/packages/rpc-subscriptions/README.md +++ b/packages/rpc-subscriptions/README.md @@ -11,7 +11,7 @@ # @solana/rpc-subscriptions -This package contains types that implement RPC subscriptions as required by the Solana RPC. Additionally, it incorporates some useful defaults that make working with subscriptions easier, more performant, and more reliable. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library). +This package contains types that implement RPC subscriptions as required by the Solana RPC. Additionally, it incorporates some useful defaults that make working with subscriptions easier, more performant, and more reliable. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/library). ## Functions diff --git a/packages/rpc-subscriptions/package.json b/packages/rpc-subscriptions/package.json index 85b4a31a7..83db9a9ee 100644 --- a/packages/rpc-subscriptions/package.json +++ b/packages/rpc-subscriptions/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/rpc-transformers/package.json b/packages/rpc-transformers/package.json index 5a0ed82a8..cef7e03f3 100644 --- a/packages/rpc-transformers/package.json +++ b/packages/rpc-transformers/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/rpc-transport-http/package.json b/packages/rpc-transport-http/package.json index 1b0c66444..d5985a97f 100644 --- a/packages/rpc-transport-http/package.json +++ b/packages/rpc-transport-http/package.json @@ -62,10 +62,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/rpc-types/README.md b/packages/rpc-types/README.md index ab8317662..043e2de2a 100644 --- a/packages/rpc-types/README.md +++ b/packages/rpc-types/README.md @@ -11,7 +11,7 @@ # @solana/rpc-types -This package defines types for values used in the [Solana JSON-RPC](https://docs.solana.com/api/http) and a series of helpers for working with them. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library). +This package defines types for values used in the [Solana JSON-RPC](https://docs.solana.com/api/http) and a series of helpers for working with them. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/library). ## Types diff --git a/packages/rpc-types/package.json b/packages/rpc-types/package.json index e4c3215ab..92d525aad 100644 --- a/packages/rpc-types/package.json +++ b/packages/rpc-types/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/rpc/README.md b/packages/rpc/README.md index 538f363e8..f6149cbed 100644 --- a/packages/rpc/README.md +++ b/packages/rpc/README.md @@ -11,7 +11,7 @@ # @solana/rpc -This package contains utilities for creating objects that you can use to communicate with a Solana JSON RPC server. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library). +This package contains utilities for creating objects that you can use to communicate with a Solana JSON RPC server. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/library). Unless you plan to create a custom RPC interface, you can use the [`createSolanaRpc(clusterUrl)`](#createsolanarpcclusterurl-config) function to obtain a default implementation of the [Solana JSON RPC API](https://solana.com/docs/rpc/http). diff --git a/packages/rpc/package.json b/packages/rpc/package.json index 2b311c0fe..4ed8c7ae2 100644 --- a/packages/rpc/package.json +++ b/packages/rpc/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/signers/README.md b/packages/signers/README.md index cf239f5f3..0726792d2 100644 --- a/packages/signers/README.md +++ b/packages/signers/README.md @@ -11,7 +11,7 @@ # @solana/signers -This package provides an abstraction layer over signing messages and transactions in Solana. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library). +This package provides an abstraction layer over signing messages and transactions in Solana. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/library). You can think of signers as an abstract way to sign messages and transactions. This could be using a Crypto KeyPair, a wallet adapter in the browser, a Noop signer for testing purposes, or anything you want. Here's an example using a `CryptoKeyPair` signer: diff --git a/packages/signers/package.json b/packages/signers/package.json index f5f3798ed..5401de4d8 100644 --- a/packages/signers/package.json +++ b/packages/signers/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/subscribable/package.json b/packages/subscribable/package.json index 446a6fcd1..f05d8d240 100644 --- a/packages/subscribable/package.json +++ b/packages/subscribable/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/sysvars/README.md b/packages/sysvars/README.md index 9e860d84f..755370e08 100644 --- a/packages/sysvars/README.md +++ b/packages/sysvars/README.md @@ -14,7 +14,7 @@ This package contains types and helpers for fetching and decoding Solana sysvars. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK -[`@solana/web3.js@next`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library). +[`@solana/web3.js@next`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/library). More information about the available sysvars on Solana can be found in the docs at . @@ -43,11 +43,11 @@ maybeJsonParsedClock satisfies ``` Each sysvar within the library ships with its own -[codec](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs) +[codec](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/codecs) for deserializing the account data. You can pair this codec with the helpers from -[`@solana/accounts`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/accounts) +[`@solana/accounts`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/accounts) to assert and decode sysvar account data. ```ts @@ -75,16 +75,16 @@ const clock: SysvarClock = await fetchSysvarClock(rpc); This package supports the following Solana sysvars: -- [`Clock`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/sysvars/src/clock.ts) -- [`EpochRewards`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/sysvars/src/epoch-rewards.ts) -- [`EpochSchedule`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/sysvars/src/epoch-schedule.ts) -- [`Fees`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/sysvars/src/fees.ts) -- [`LastRestartSlot`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/sysvars/src/last-restart-slot.ts) -- [`RecentBlockhashes`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/sysvars/src/recent-blockhashes.ts) -- [`Rent`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/sysvars/src/rent.ts) -- [`SlotHashes`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/sysvars/src/slot-hashes.ts) -- [`SlotHistory`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/sysvars/src/slot-history.ts) -- [`StakeHistory`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/sysvars/src/stake-history.ts) +- [`Clock`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/sysvars/src/clock.ts) +- [`EpochRewards`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/sysvars/src/epoch-rewards.ts) +- [`EpochSchedule`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/sysvars/src/epoch-schedule.ts) +- [`Fees`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/sysvars/src/fees.ts) +- [`LastRestartSlot`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/sysvars/src/last-restart-slot.ts) +- [`RecentBlockhashes`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/sysvars/src/recent-blockhashes.ts) +- [`Rent`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/sysvars/src/rent.ts) +- [`SlotHashes`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/sysvars/src/slot-hashes.ts) +- [`SlotHistory`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/sysvars/src/slot-history.ts) +- [`StakeHistory`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/sysvars/src/stake-history.ts) The `Instructions` sysvar is also supported but does not exist on-chain, therefore has no corresponding module or codec. diff --git a/packages/sysvars/package.json b/packages/sysvars/package.json index af00d57ef..0745e1df6 100644 --- a/packages/sysvars/package.json +++ b/packages/sysvars/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/sysvars/src/__tests__/sysvar-test.ts b/packages/sysvars/src/__tests__/sysvar-test.ts index ce832b0cb..f5a8f3276 100644 --- a/packages/sysvars/src/__tests__/sysvar-test.ts +++ b/packages/sysvars/src/__tests__/sysvar-test.ts @@ -57,7 +57,7 @@ describe('sysvar account', () => { }); }); // `EpochRewards` will only appear at the start of an epoch, after epoch 0 concludes. - // See https://github.com/solana-labs/solana/blob/e0203f22dc83cb792fa97f91dbe6e924cbd08af1/docs/src/runtime/sysvars.md?plain=1#L155-L168 + // See https://github.com/anza-xyz/agave/blob/e0203f22dc83cb792fa97f91dbe6e924cbd08af1/docs/src/runtime/sysvars.md?plain=1#L155-L168 describe('epoch schedule', () => { it('fetch encoded', async () => { expect.assertions(3); diff --git a/packages/sysvars/src/epoch-rewards.ts b/packages/sysvars/src/epoch-rewards.ts index 5c6ae607d..c43d5324a 100644 --- a/packages/sysvars/src/epoch-rewards.ts +++ b/packages/sysvars/src/epoch-rewards.ts @@ -27,7 +27,7 @@ type SysvarEpochRewardsSize = 24; * * Note that `EpochRewards` only lasts for a handful of blocks at the start of * an epoch. When all rewards have been distributed, the sysvar is deleted. - * See https://github.com/solana-labs/solana/blob/e0203f22dc83cb792fa97f91dbe6e924cbd08af1/docs/src/runtime/sysvars.md?plain=1#L155-L168 + * See https://github.com/anza-xyz/agave/blob/e0203f22dc83cb792fa97f91dbe6e924cbd08af1/docs/src/runtime/sysvars.md?plain=1#L155-L168 */ export type SysvarEpochRewards = Readonly<{ distributedRewards: bigint; @@ -70,7 +70,7 @@ export function getSysvarEpochRewardsCodec(): FixedSizeCodec< * * Note that `EpochRewards` only lasts for a handful of blocks at the start of * an epoch. When all rewards have been distributed, the sysvar is deleted. - * See https://github.com/solana-labs/solana/blob/e0203f22dc83cb792fa97f91dbe6e924cbd08af1/docs/src/runtime/sysvars.md?plain=1#L155-L168 + * See https://github.com/anza-xyz/agave/blob/e0203f22dc83cb792fa97f91dbe6e924cbd08af1/docs/src/runtime/sysvars.md?plain=1#L155-L168 */ export async function fetchSysvarEpochRewards( rpc: Rpc, diff --git a/packages/sysvars/src/slot-history.ts b/packages/sysvars/src/slot-history.ts index 5835b0d15..51b7b45d2 100644 --- a/packages/sysvars/src/slot-history.ts +++ b/packages/sysvars/src/slot-history.ts @@ -29,7 +29,7 @@ const BITVEC_DISCRIMINATOR = 1; // The Solana SDK defines a constant `MAX_ENTRIES` representing the maximum // number of bits that can be represented by the bitvector in the `SlotHistory` // sysvar. This value is 1024 * 1024 = 1_048_576. -// See https://github.com/solana-labs/solana/blob/e0203f22dc83cb792fa97f91dbe6e924cbd08af1/sdk/program/src/slot_history.rs#L43 +// See https://github.com/anza-xyz/agave/blob/e0203f22dc83cb792fa97f91dbe6e924cbd08af1/sdk/program/src/slot_history.rs#L43 const BITVEC_NUM_BITS = 1024 * 1024; // The length of the bitvector in blocks. // At 64 bits per block, this is 1024 * 1024 / 64 = 16_384. diff --git a/packages/transaction-confirmation/package.json b/packages/transaction-confirmation/package.json index 1c2611aef..a58cbee42 100644 --- a/packages/transaction-confirmation/package.json +++ b/packages/transaction-confirmation/package.json @@ -60,10 +60,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/transaction-messages/README.md b/packages/transaction-messages/README.md index 066894b0e..0fc193858 100644 --- a/packages/transaction-messages/README.md +++ b/packages/transaction-messages/README.md @@ -11,7 +11,7 @@ # @solana/transaction-messages -This package contains types and functions for creating transaction messages. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library). +This package contains types and functions for creating transaction messages. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/library). Transaction messages are built one step at a time using the transform functions offered by this package. To make it more ergonomic to apply consecutive transforms to your transaction messages, consider using a pipelining helper like the one in `@solana/functional`. diff --git a/packages/transaction-messages/package.json b/packages/transaction-messages/package.json index 19752567f..313246e22 100644 --- a/packages/transaction-messages/package.json +++ b/packages/transaction-messages/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/transactions/README.md b/packages/transactions/README.md index da2d6524c..9b5ae49cf 100644 --- a/packages/transactions/README.md +++ b/packages/transactions/README.md @@ -11,7 +11,7 @@ # @solana/transactions -This package contains types and functions for compiling, signing and sending transactions. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library). +This package contains types and functions for compiling, signing and sending transactions. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@next`](https://github.com/anza-xyz/solana-web3.js/tree/main/packages/library). Transactions are created by compiling a transaction message. They must then be signed before being submitted to the network. diff --git a/packages/transactions/package.json b/packages/transactions/package.json index e6e431912..97e4e9fca 100644 --- a/packages/transactions/package.json +++ b/packages/transactions/package.json @@ -61,10 +61,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead", diff --git a/packages/webcrypto-ed25519-polyfill/package.json b/packages/webcrypto-ed25519-polyfill/package.json index 6598d6ddd..044ee498a 100644 --- a/packages/webcrypto-ed25519-polyfill/package.json +++ b/packages/webcrypto-ed25519-polyfill/package.json @@ -58,10 +58,10 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/solana-labs/solana-web3.js" + "url": "https://github.com/anza-xyz/solana-web3.js" }, "bugs": { - "url": "http://github.com/solana-labs/solana-web3.js/issues" + "url": "http://github.com/anza-xyz/solana-web3.js/issues" }, "browserslist": [ "supports bigint and not dead",