Switch to using @coral-xyz/anchor packages (#2318)

This commit is contained in:
Henry-E 2022-12-16 13:21:50 +00:00 committed by GitHub
parent ba5b55d7f0
commit 4bef8c40ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
218 changed files with 410 additions and 409 deletions

View File

@ -28,7 +28,7 @@ runs:
shell: bash
- run: cd ts/packages/spl-token && yarn --frozen-lockfile && yarn build:node && yarn link && cd ../../../
shell: bash
- run: cd examples/tutorial && yarn link @project-serum/anchor && yarn --frozen-lockfile && cd ../../
- run: cd examples/tutorial && yarn link @coral-xyz/anchor && yarn --frozen-lockfile && cd ../../
shell: bash
- run: cd tests && yarn link @project-serum/anchor && yarn link @project-serum/spl-associated-token-account && yarn link @project-serum/spl-token && yarn --frozen-lockfile && cd ..
- run: cd tests && yarn link @coral-xyz/anchor && yarn link @coral-xyz/spl-associated-token-account && yarn link @coral-xyz/spl-token && yarn --frozen-lockfile && cd ..
shell: bash

View File

@ -229,7 +229,7 @@ jobs:
path: ~/.cargo/bin/
- run: chmod +x ~/.cargo/bin/anchor
- run: cd "$(mktemp -d)" && anchor init hello-anchor && cd hello-anchor && yarn link @project-serum/anchor && yarn && anchor test && yarn lint:fix
- run: cd "$(mktemp -d)" && anchor init hello-anchor && cd hello-anchor && yarn link @coral-xyz/anchor && yarn && anchor test && yarn lint:fix
- uses: ./.github/actions/git-diff/
test-programs:

View File

@ -339,7 +339,7 @@ jobs:
path: ~/.cargo/bin/
- run: chmod +x ~/.cargo/bin/anchor
- run: cd "$(mktemp -d)" && anchor init hello-anchor && cd hello-anchor && yarn link @project-serum/anchor && yarn && anchor test && yarn lint:fix
- run: cd "$(mktemp -d)" && anchor init hello-anchor && cd hello-anchor && yarn link @coral-xyz/anchor && yarn && anchor test && yarn lint:fix
- uses: ./.github/actions/git-diff/
test-programs:

View File

@ -14,7 +14,7 @@ The minor version will be incremented upon a breaking change and the patch versi
### Features
- cli: Add `--run` to `anchor test` for running a subset of test suites ([#1828](https://github.com/project-serum/anchor/issues/1828)).
- cli: Add `--run` to `anchor test` for running a subset of test suites ([#1828](https://github.com/coral-xyz/anchor/issues/1828)).
- client: Add `transaction` functions to RequestBuilder ([#1958](https://github.com/coral-xyz/anchor/pull/1958)).
- spl: Add `create_metadata_accounts_v3` and `set_collection_size` wrappers ([#2119](https://github.com/coral-xyz/anchor/pull/2119)).
- spl: Add `MetadataAccount` account deserialization. ([#2014](https://github.com/coral-xyz/anchor/pull/2014)).
@ -38,7 +38,7 @@ The minor version will be incremented upon a breaking change and the patch versi
- cli: Allow custom cluster config ([#2271](https://github.com/coral-xyz/anchor/pull/2271)).
- ts: Add optional flag to parseLogs to throw an error on decoding failure ([#2043](https://github.com/coral-xyz/anchor/pull/2043)).
- cli: Add `test.validator.geyser_plugin_config` support ([#2016](https://github.com/coral-xyz/anchor/pull/2016)).
- cli: Add `account` subcommand to cli ([#1923](https://github.com/project-serum/anchor/pull/1923))
- cli: Add `account` subcommand to cli ([#1923](https://github.com/coral-xyz/anchor/pull/1923))
- cli: Add `ticks_per_slot` option to Validator args ([#1875](https://github.com/coral-xyz/anchor/pull/1875)).
### Fixes
@ -61,6 +61,7 @@ The minor version will be incremented upon a breaking change and the patch versi
- lang: Add `Discriminator` and `Owner` trait implementation for structures representing instructions ([#1997](https://github.com/coral-xyz/anchor/pull/1997)).
- ts: '@coral-xyz/borsh' package is now part of the yarn monorepo ([#2290](https://github.com/coral-xyz/anchor/pull/2290)). The borsh package needs to be built before the anchor package can be built but this should happen automatically when running `yarn build` in packages/anchor, see [#2299](https://github.com/coral-xyz/anchor/pull/2299) and [#2306](https://github.com/coral-xyz/anchor/pull/2306).
- lang: Add support for optionally passing in accounts using the syntax `Optional<Account<'info, T>>`. Shouldn't affect existing programs but may be a breaking change to tools that use the anchor generated IDL. [#2101](https://github.com/coral-xyz/anchor/pull/2101).
- ts: Switch from `@project-serum/anchor` to the `@coral-xyz/anchor` package [#2318](https://github.com/coral-xyz/anchor/pull/2318).
## [0.25.0] - 2022-07-05

View File

@ -31,18 +31,18 @@ To jump straight to examples, go [here](https://github.com/coral-xyz/anchor/tree
## Packages
| Package | Description | Version | Docs |
| :-------------------------- | :------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------- |
| `anchor-lang` | Rust primitives for writing programs on Solana | [![Crates.io](https://img.shields.io/crates/v/anchor-lang?color=blue)](https://crates.io/crates/anchor-lang) | [![Docs.rs](https://docs.rs/anchor-lang/badge.svg)](https://docs.rs/anchor-lang) |
| `anchor-spl` | CPI clients for SPL programs on Solana | ![crates](https://img.shields.io/crates/v/anchor-spl?color=blue) | [![Docs.rs](https://docs.rs/anchor-spl/badge.svg)](https://docs.rs/anchor-spl) |
| `anchor-client` | Rust client for Anchor programs | ![crates](https://img.shields.io/crates/v/anchor-client?color=blue) | [![Docs.rs](https://docs.rs/anchor-client/badge.svg)](https://docs.rs/anchor-client) |
| `@project-serum/anchor` | TypeScript client for Anchor programs | [![npm](https://img.shields.io/npm/v/@project-serum/anchor.svg?color=blue)](https://www.npmjs.com/package/@project-serum/anchor) | [![Docs](https://img.shields.io/badge/docs-typedoc-blue)](https://coral-xyz.github.io/anchor/ts/index.html) |
| `@project-serum/anchor-cli` | CLI to support building and managing an Anchor workspace | [![npm](https://img.shields.io/npm/v/@project-serum/anchor-cli.svg?color=blue)](https://www.npmjs.com/package/@project-serum/anchor-cli) | [![Docs](https://img.shields.io/badge/docs-typedoc-blue)](https://coral-xyz.github.io/anchor/cli/commands.html) |
| Package | Description | Version | Docs |
| :---------------------- | :------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------- |
| `anchor-lang` | Rust primitives for writing programs on Solana | [![Crates.io](https://img.shields.io/crates/v/anchor-lang?color=blue)](https://crates.io/crates/anchor-lang) | [![Docs.rs](https://docs.rs/anchor-lang/badge.svg)](https://docs.rs/anchor-lang) |
| `anchor-spl` | CPI clients for SPL programs on Solana | ![crates](https://img.shields.io/crates/v/anchor-spl?color=blue) | [![Docs.rs](https://docs.rs/anchor-spl/badge.svg)](https://docs.rs/anchor-spl) |
| `anchor-client` | Rust client for Anchor programs | ![crates](https://img.shields.io/crates/v/anchor-client?color=blue) | [![Docs.rs](https://docs.rs/anchor-client/badge.svg)](https://docs.rs/anchor-client) |
| `@coral-xyz/anchor` | TypeScript client for Anchor programs | [![npm](https://img.shields.io/npm/v/@coral-xyz/anchor.svg?color=blue)](https://www.npmjs.com/package/@coral-xyz/anchor) | [![Docs](https://img.shields.io/badge/docs-typedoc-blue)](https://coral-xyz.github.io/anchor/ts/index.html) |
| `@coral-xyz/anchor-cli` | CLI to support building and managing an Anchor workspace | [![npm](https://img.shields.io/npm/v/@coral-xyz/anchor-cli.svg?color=blue)](https://www.npmjs.com/package/@coral-xyz/anchor-cli) | [![Docs](https://img.shields.io/badge/docs-typedoc-blue)](https://coral-xyz.github.io/anchor/cli/commands.html) |
## Note
* **Anchor is in active development, so all APIs are subject to change.**
* **This code is unaudited. Use at your own risk.**
- **Anchor is in active development, so all APIs are subject to change.**
- **This code is unaudited. Use at your own risk.**
## Examples

View File

@ -1,5 +1,5 @@
{
"name": "@project-serum/anchor-cli",
"name": "@coral-xyz/anchor-cli",
"version": "0.26.0",
"description": "Anchor CLI tool",
"homepage": "https://github.com/coral-xyz/anchor#readme",

View File

@ -87,7 +87,7 @@ anchor-lang = "{2}"
pub fn deploy_js_script_host(cluster_url: &str, script_path: &str) -> String {
format!(
r#"
const anchor = require('@project-serum/anchor');
const anchor = require('@coral-xyz/anchor');
// Deploy script defined by the user.
const userScript = require("{0}");
@ -114,7 +114,7 @@ main();
pub fn deploy_ts_script_host(cluster_url: &str, script_path: &str) -> String {
format!(
r#"import * as anchor from '@project-serum/anchor';
r#"import * as anchor from '@coral-xyz/anchor';
// Deploy script defined by the user.
const userScript = require("{0}");
@ -144,7 +144,7 @@ pub fn deploy_script() -> &'static str {
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.
@ -160,7 +160,7 @@ pub fn ts_deploy_script() -> &'static str {
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.
@ -202,7 +202,7 @@ pub struct Initialize {{}}
pub fn mocha(name: &str) -> String {
format!(
r#"const anchor = require("@project-serum/anchor");
r#"const anchor = require("@coral-xyz/anchor");
describe("{}", () => {{
// Configure the client to use the local cluster.
@ -223,7 +223,7 @@ describe("{}", () => {{
pub fn jest(name: &str) -> String {
format!(
r#"const anchor = require("@project-serum/anchor");
r#"const anchor = require("@coral-xyz/anchor");
describe("{}", () => {{
// Configure the client to use the local cluster.
@ -251,7 +251,7 @@ pub fn package_json(jest: bool) -> String {
"lint": "prettier */*.js \"*/**/*{{.js,.ts}}\" --check"
}},
"dependencies": {{
"@project-serum/anchor": "^{0}"
"@coral-xyz/anchor": "^{0}"
}},
"devDependencies": {{
"jest": "^29.0.3",
@ -269,7 +269,7 @@ pub fn package_json(jest: bool) -> String {
"lint": "prettier */*.js \"*/**/*{{.js,.ts}}\" --check"
}},
"dependencies": {{
"@project-serum/anchor": "^{0}"
"@coral-xyz/anchor": "^{0}"
}},
"devDependencies": {{
"chai": "^4.3.4",
@ -292,7 +292,7 @@ pub fn ts_package_json(jest: bool) -> String {
"lint": "prettier */*.js \"*/**/*{{.js,.ts}}\" --check"
}},
"dependencies": {{
"@project-serum/anchor": "^{0}"
"@coral-xyz/anchor": "^{0}"
}},
"devDependencies": {{
"@types/bn.js": "^5.1.0",
@ -314,7 +314,7 @@ pub fn ts_package_json(jest: bool) -> String {
"lint": "prettier */*.js \"*/**/*{{.js,.ts}}\" --check"
}},
"dependencies": {{
"@project-serum/anchor": "^{0}"
"@coral-xyz/anchor": "^{0}"
}},
"devDependencies": {{
"chai": "^4.3.4",
@ -335,8 +335,8 @@ pub fn ts_package_json(jest: bool) -> String {
pub fn ts_mocha(name: &str) -> String {
format!(
r#"import * as anchor from "@project-serum/anchor";
import {{ Program }} from "@project-serum/anchor";
r#"import * as anchor from "@coral-xyz/anchor";
import {{ Program }} from "@coral-xyz/anchor";
import {{ {} }} from "../target/types/{}";
describe("{}", () => {{
@ -362,8 +362,8 @@ describe("{}", () => {{
pub fn ts_jest(name: &str) -> String {
format!(
r#"import * as anchor from "@project-serum/anchor";
import {{ Program }} from "@project-serum/anchor";
r#"import * as anchor from "@coral-xyz/anchor";
import {{ Program }} from "@coral-xyz/anchor";
import {{ {} }} from "../target/types/{}";
describe("{}", () => {{
@ -445,7 +445,7 @@ pub fn node_shell(
) -> Result<String> {
let mut eval_string = format!(
r#"
const anchor = require('@project-serum/anchor');
const anchor = require('@coral-xyz/anchor');
const web3 = anchor.web3;
const PublicKey = anchor.web3.PublicKey;
const Keypair = anchor.web3.Keypair;

View File

@ -209,7 +209,7 @@ from the workspace's `Anchor.toml`. For example,
```javascript
// File: migrations/deploys.js
const anchor = require('@project-serum/anchor')
const anchor = require('@coral-xyz/anchor')
module.exports = async function (provider) {
anchor.setProvider(provider)

View File

@ -147,8 +147,8 @@ impl<'info> PullStrings<'info> {
We can verify that everything works as expected by replacing the contents of the `puppet.ts` file with:
```ts
import * as anchor from '@project-serum/anchor'
import { Program } from '@project-serum/anchor'
import * as anchor from '@coral-xyz/anchor'
import { Program } from '@coral-xyz/anchor'
import { Keypair } from '@solana/web3.js'
import { expect } from 'chai'
import { Puppet } from '../target/types/puppet'
@ -286,8 +286,8 @@ impl<'info> PullStrings<'info> {
Finally, change the test:
```ts
import * as anchor from '@project-serum/anchor'
import { Program } from '@project-serum/anchor'
import * as anchor from '@coral-xyz/anchor'
import { Program } from '@coral-xyz/anchor'
import { Keypair } from '@solana/web3.js'
import { Puppet } from '../target/types/puppet'
import { PuppetMaster } from '../target/types/puppet_master'

View File

@ -56,7 +56,7 @@ anchor --version
### Install using pre-build binary on x86_64 Linux
Anchor binaries are available via an NPM package [`@project-serum/anchor-cli`](https://www.npmjs.com/package/@project-serum/anchor-cli). Only `x86_64` Linux is supported currently, you must build from source for other OS'.
Anchor binaries are available via an NPM package [`@coral-xyz/anchor-cli`](https://www.npmjs.com/package/@coral-xyz/anchor-cli). Only `x86_64` Linux is supported currently, you must build from source for other OS'.
### Build from source for other operating systems without avm

View File

@ -190,8 +190,8 @@ pub fn change_user_name(ctx: Context<ChangeUserName>, new_name: String) -> Resul
Finally, let's add a test. Copy this into `game.ts`
```ts
import * as anchor from '@project-serum/anchor'
import { Program } from '@project-serum/anchor'
import * as anchor from '@coral-xyz/anchor'
import { Program } from '@coral-xyz/anchor'
import { PublicKey } from '@solana/web3.js'
import { Game } from '../target/types/game'
import { expect } from 'chai'
@ -306,8 +306,8 @@ The `authority` account is now an `UncheckedAccount` instead of a `Signer`. When
Finally, this is the new `puppet.ts`:
```ts
import * as anchor from '@project-serum/anchor'
import { Program } from '@project-serum/anchor'
import * as anchor from '@coral-xyz/anchor'
import { Program } from '@coral-xyz/anchor'
import { Keypair, PublicKey } from '@solana/web3.js'
import { Puppet } from '../target/types/puppet'
import { PuppetMaster } from '../target/types/puppet_master'

View File

@ -2,7 +2,7 @@
// It is not expected users directly test with this example. For a more
// ergonomic example, see `tests/basic-0.js` in this workspace.
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
// Configure the local cluster.
anchor.setProvider(anchor.AnchorProvider.local());

View File

@ -1,4 +1,4 @@
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
describe("basic-0", () => {
// Configure the client to use the local cluster.

View File

@ -1,5 +1,5 @@
const assert = require("assert");
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const { SystemProgram } = anchor.web3;
describe("basic-1", () => {

View File

@ -1,5 +1,5 @@
const assert = require("assert");
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const { SystemProgram } = anchor.web3;
describe("basic-2", () => {

View File

@ -1,5 +1,5 @@
const assert = require("assert");
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const { SystemProgram } = anchor.web3;
describe("basic-3", () => {

View File

@ -1,5 +1,5 @@
const assert = require("assert");
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
describe("basic-4", () => {
const provider = anchor.AnchorProvider.local();

View File

@ -13,7 +13,7 @@
"basic-4"
],
"dependencies": {
"@project-serum/anchor": "file:../../ts/packages/anchor"
"@coral-xyz/anchor": "file:../../ts/packages/anchor"
},
"devDependencies": {
"mocha": "^9.1.3",

View File

@ -16,10 +16,29 @@
dependencies:
regenerator-runtime "^0.13.11"
"@coral-xyz/borsh@^0.2.6":
version "0.2.6"
resolved "https://registry.yarnpkg.com/@coral-xyz/borsh/-/borsh-0.2.6.tgz#0f11b223bf2967574310705afd3c53ce26688ada"
integrity sha512-y6nmHw1bFcJib7sMHsQPpC8r47xhqDZVvhUdna7NUPzpSbOZG6f46N21+aXsQ2w/tG8Ggls488J/ZmwbgVmyjg==
"@coral-xyz/anchor@file:../../ts/packages/anchor":
version "0.26.0"
dependencies:
"@coral-xyz/borsh" "^0.26.0"
"@solana/web3.js" "^1.68.0"
base64-js "^1.5.1"
bn.js "^5.1.2"
bs58 "^4.0.1"
buffer-layout "^1.2.2"
camelcase "^6.3.0"
cross-fetch "^3.1.5"
crypto-hash "^1.3.0"
eventemitter3 "^4.0.7"
js-sha256 "^0.9.0"
pako "^2.0.3"
snake-case "^3.0.4"
superstruct "^0.15.4"
toml "^3.0.0"
"@coral-xyz/borsh@^0.26.0":
version "0.26.0"
resolved "https://registry.yarnpkg.com/@coral-xyz/borsh/-/borsh-0.26.0.tgz#d054f64536d824634969e74138f9f7c52bbbc0d5"
integrity sha512-uCZ0xus0CszQPHYfWAqKS5swS1UxvePu83oOF+TWpUkedsNlg6p2p4azxZNSSqwXb9uXMFgxhuMBX9r3Xoi0vQ==
dependencies:
bn.js "^5.1.2"
buffer-layout "^1.2.0"
@ -39,25 +58,6 @@
resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.0.tgz#d15357f7c227e751d90aa06b05a0e5cf993ba8c1"
integrity sha512-kbacwGSsH/CTout0ZnZWxnW1B+jH/7r/WAAKLBtrRJ/+CUH7lgmQzl3GTrQua3SGKWNSDsS6lmjnDpIJ5Dxyaw==
"@project-serum/anchor@file:../../ts/packages/anchor":
version "0.26.0"
dependencies:
"@coral-xyz/borsh" "^0.2.6"
"@solana/web3.js" "^1.68.0"
base64-js "^1.5.1"
bn.js "^5.1.2"
bs58 "^4.0.1"
buffer-layout "^1.2.2"
camelcase "^6.3.0"
cross-fetch "^3.1.5"
crypto-hash "^1.3.0"
eventemitter3 "^4.0.7"
js-sha256 "^0.9.0"
pako "^2.0.3"
snake-case "^3.0.4"
superstruct "^0.15.4"
toml "^3.0.0"
"@solana/buffer-layout@^4.0.0":
version "4.0.1"
resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz#b996235eaec15b1e0b5092a8ed6028df77fa6c15"

View File

@ -1,5 +1,5 @@
import * as anchor from "@project-serum/anchor";
import { Program } from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import { Program } from "@coral-xyz/anchor";
import { AccountCommand } from "../target/types/account_command";
import { assert } from "chai";
import { execSync } from "child_process";

View File

@ -2,7 +2,7 @@
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.

View File

@ -1,5 +1,5 @@
import * as anchor from "@project-serum/anchor";
import { Program } from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import { Program } from "@coral-xyz/anchor";
import { IdlCommandsOne } from "../target/types/idl_commands_one";
import { IdlCommandsTwo } from "../target/types/idl_commands_two";
import { assert } from "chai";

View File

@ -2,7 +2,7 @@
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.

View File

@ -1,6 +1,6 @@
import * as anchor from "@project-serum/anchor";
import { AnchorError, Program } from "@project-serum/anchor";
import { findProgramAddressSync } from "@project-serum/anchor/dist/cjs/utils/pubkey";
import * as anchor from "@coral-xyz/anchor";
import { AnchorError, Program } from "@coral-xyz/anchor";
import { findProgramAddressSync } from "@coral-xyz/anchor/dist/cjs/utils/pubkey";
import { PublicKey } from "@solana/web3.js";
import { assert } from "chai";
import { BpfUpgradeableState } from "../target/types/bpf_upgradeable_state";

View File

@ -2,7 +2,7 @@
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.

View File

@ -1,4 +1,4 @@
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const serumCmn = require("@project-serum/common");
const { assert } = require("chai");
const { TOKEN_PROGRAM_ID } = require("@solana/spl-token");

View File

@ -2,7 +2,7 @@
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.

View File

@ -2,7 +2,7 @@
const process = require("process");
const fs = require("fs");
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const { Market, OpenOrders } = require("@project-serum/serum");
const Account = anchor.web3.Account;
const Program = anchor.Program;

View File

@ -4,7 +4,7 @@
const utils = require("../tests/utils");
const fs = require("fs");
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const provider = anchor.AnchorProvider.local();
// hack so we don't have to update serum-common library
// to the new AnchorProvider class and Provider interface

View File

@ -3,7 +3,7 @@
// Script to infinitely post orders that are immediately filled.
const process = require("process");
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const PublicKey = anchor.web3.PublicKey;
const { runTradeBot } = require("../tests/utils");

View File

@ -1,6 +1,6 @@
const { assert } = require("chai");
const { Token } = require("@solana/spl-token");
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const serumCmn = require("@project-serum/common");
const { Market } = require("@project-serum/serum");
const utf8 = anchor.utils.bytes.utf8;

View File

@ -9,9 +9,9 @@ const TOKEN_PROGRAM_ID = require("@solana/spl-token").TOKEN_PROGRAM_ID;
const TokenInstructions = require("@project-serum/serum").TokenInstructions;
const { Market, OpenOrders } = require("@project-serum/serum");
const DexInstructions = require("@project-serum/serum").DexInstructions;
const web3 = require("@project-serum/anchor").web3;
const web3 = require("@coral-xyz/anchor").web3;
const Connection = web3.Connection;
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const BN = anchor.BN;
const serumCmn = require("@project-serum/common");
const Account = web3.Account;

View File

@ -1,4 +1,4 @@
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const serumCmn = require("@project-serum/common");
const TokenInstructions = require("@project-serum/serum").TokenInstructions;
const utils = require("../../deps/stake/tests/utils");

View File

@ -2,7 +2,7 @@
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.

View File

@ -1,4 +1,4 @@
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const { assert } = require("chai");
const { PublicKey } = anchor.web3;

View File

@ -1,5 +1,5 @@
const { assert } = require("chai");
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
describe("composite", () => {
const provider = anchor.AnchorProvider.local();

View File

@ -2,7 +2,7 @@
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.

View File

@ -1,7 +1,7 @@
import assert from "assert";
import * as anchor from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import * as borsh from "borsh";
import { Program } from "@project-serum/anchor";
import { Program } from "@coral-xyz/anchor";
import { Callee } from "../target/types/callee";
import { Caller } from "../target/types/caller";
import { ConfirmOptions } from "@solana/web3.js";

View File

@ -2,7 +2,7 @@
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.

View File

@ -1,6 +1,6 @@
import { Native, AnchorProvider, setProvider } from "@project-serum/anchor";
import { splAssociatedTokenAccountProgram } from "@project-serum/spl-associated-token-account";
import { splTokenProgram } from "@project-serum/spl-token";
import { Native, AnchorProvider, setProvider } from "@coral-xyz/anchor";
import { splAssociatedTokenAccountProgram } from "@coral-xyz/spl-associated-token-account";
import { splTokenProgram } from "@coral-xyz/spl-token";
import { Keypair, PublicKey, SYSVAR_RENT_PUBKEY } from "@solana/web3.js";
import * as assert from "assert";

View File

@ -1,5 +1,5 @@
import { AnchorProvider, setProvider } from "@project-serum/anchor";
import { splTokenProgram } from "@project-serum/spl-token";
import { AnchorProvider, setProvider } from "@coral-xyz/anchor";
import { splTokenProgram } from "@coral-xyz/spl-token";
import { Keypair, SYSVAR_RENT_PUBKEY, PublicKey } from "@solana/web3.js";
import BN from "bn.js";
import { assert } from "chai";

View File

@ -1,5 +1,5 @@
import * as anchor from "@project-serum/anchor";
import { Native } from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import { Native } from "@coral-xyz/anchor";
import { TOKEN_PROGRAM_ID } from "@solana/spl-token";
import {
Keypair,

View File

@ -1,5 +1,5 @@
import * as anchor from "@project-serum/anchor";
import { AnchorError, Program } from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import { AnchorError, Program } from "@coral-xyz/anchor";
import splToken from "@solana/spl-token";
import { DeclareId } from "../target/types/declare_id";
import { assert } from "chai";

View File

@ -1,5 +1,5 @@
import * as anchor from "@project-serum/anchor";
import { Program, AnchorError } from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import { Program, AnchorError } from "@coral-xyz/anchor";
import { Keypair, Transaction, TransactionInstruction } from "@solana/web3.js";
import { TOKEN_PROGRAM_ID, Token } from "@solana/spl-token";
import { assert, expect } from "chai";

View File

@ -1,5 +1,5 @@
import * as anchor from "@project-serum/anchor";
import { Program, BN, IdlAccounts } from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import { Program, BN, IdlAccounts } from "@coral-xyz/anchor";
import { PublicKey, Keypair, SystemProgram } from "@solana/web3.js";
import { TOKEN_PROGRAM_ID, Token } from "@solana/spl-token";
import { assert } from "chai";

View File

@ -2,7 +2,7 @@
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.

View File

@ -1,4 +1,4 @@
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const { assert } = require("chai");
describe("events", () => {

View File

@ -2,7 +2,7 @@
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.

View File

@ -1,5 +1,5 @@
import * as anchor from "@project-serum/anchor";
import { Program, getProvider } from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import { Program, getProvider } from "@coral-xyz/anchor";
import { Keypair, SystemProgram } from "@solana/web3.js";
import { Floats } from "../target/types/floats";
import { assert } from "chai";

View File

@ -2,7 +2,7 @@
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.

View File

@ -1,4 +1,4 @@
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const { assert } = require("chai");
const {
ASSOCIATED_TOKEN_PROGRAM_ID,
@ -11,7 +11,7 @@ const {
createMint,
createTokenAccount,
} = require("./utils");
const { token } = require("@project-serum/anchor/dist/cjs/utils");
const { token } = require("@coral-xyz/anchor/dist/cjs/utils");
describe("ido-pool", () => {
const provider = anchor.AnchorProvider.local();

View File

@ -1,5 +1,5 @@
const spl = require("@solana/spl-token");
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const serumCmn = require("@project-serum/common");
const TokenInstructions = require("@project-serum/serum").TokenInstructions;

View File

@ -1,4 +1,4 @@
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const { assert } = require("chai");
const nativeAssert = require("assert");

View File

@ -2,7 +2,7 @@
// immediately after a deploy.
const serumCmn = require("@project-serum/common");
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const PublicKey = anchor.web3.PublicKey;
module.exports = async function (provider) {

View File

@ -1,4 +1,4 @@
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const serumCmn = require("@project-serum/common");
const { TOKEN_PROGRAM_ID } = require("@solana/spl-token");
const utils = require("./utils");

View File

@ -1,4 +1,4 @@
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const serumCmn = require("@project-serum/common");
async function createBalanceSandbox(provider, r, registrySigner) {

View File

@ -2,7 +2,7 @@
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.

View File

@ -1,5 +1,5 @@
import * as anchor from "@project-serum/anchor";
import { Program, AnchorError } from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import { Program, AnchorError } from "@coral-xyz/anchor";
import {
PublicKey,
Keypair,

View File

@ -1,5 +1,5 @@
import * as anchor from "@project-serum/anchor";
import { Program, Wallet } from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import { Program, Wallet } from "@coral-xyz/anchor";
import { IdlDoc } from "../../target/types/idl_doc";
const { expect } = require("chai");
const idl_doc_idl = require("../../target/idl/idl_doc.json");

View File

@ -1,5 +1,5 @@
import * as anchor from "@project-serum/anchor";
import { AnchorError, Program } from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import { AnchorError, Program } from "@coral-xyz/anchor";
import { InitIfNeeded } from "../../target/types/init_if_needed";
import { SystemProgram, LAMPORTS_PER_SOL } from "@solana/web3.js";
import { expect } from "chai";

View File

@ -1,4 +1,4 @@
import * as anchor from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import {
Program,
BN,
@ -7,7 +7,7 @@ import {
Wallet,
IdlTypes,
IdlEvents,
} from "@project-serum/anchor";
} from "@coral-xyz/anchor";
import {
PublicKey,
Keypair,

View File

@ -2,13 +2,13 @@
"name": "multiple-suites-run-single",
"version": "0.24.2",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/project-serum/anchor#readme",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {
"url": "https://github.com/project-serum/anchor/issues"
"url": "https://github.com/coral-xyz/anchor/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/project-serum/anchor.git"
"url": "https://github.com/coral-xyz/anchor.git"
},
"engines": {
"node": ">=11"

View File

@ -1,5 +1,5 @@
import * as anchor from "@project-serum/anchor";
import { Program } from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import { Program } from "@coral-xyz/anchor";
import { assert } from "chai";
import { MultipleSuitesRunSingle } from "../../target/types/multiple_suites_run_single";

View File

@ -2,7 +2,7 @@
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.

View File

@ -1,5 +1,5 @@
import * as anchor from "@project-serum/anchor";
import { Program } from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import { Program } from "@coral-xyz/anchor";
import { PublicKey } from "@solana/web3.js";
import { assert } from "chai";
import { MultipleSuites } from "../../target/types/multiple_suites";

View File

@ -1,5 +1,5 @@
import * as anchor from "@project-serum/anchor";
import { Program } from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import { Program } from "@coral-xyz/anchor";
import { PublicKey } from "@solana/web3.js";
import { assert } from "chai";
import { MultipleSuites } from "../../../target/types/multiple_suites";

View File

@ -1,5 +1,5 @@
import * as anchor from "@project-serum/anchor";
import { Program } from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import { Program } from "@coral-xyz/anchor";
import { PublicKey } from "@solana/web3.js";
import { assert } from "chai";
import { MultipleSuites } from "../../../target/types/multiple_suites";

View File

@ -1,5 +1,5 @@
import * as anchor from "@project-serum/anchor";
import { Program } from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import { Program } from "@coral-xyz/anchor";
import { PublicKey } from "@solana/web3.js";
import { assert } from "chai";
import { MultipleSuites } from "../../target/types/multiple_suites";

View File

@ -1,5 +1,5 @@
import * as anchor from "@project-serum/anchor";
import { Program } from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import { Program } from "@coral-xyz/anchor";
import { PublicKey } from "@solana/web3.js";
import { MultipleSuites } from "../../../target/types/multiple_suites";
import { assert } from "chai";

View File

@ -1,5 +1,5 @@
import * as anchor from "@project-serum/anchor";
import { Program } from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import { Program } from "@coral-xyz/anchor";
import { PublicKey } from "@solana/web3.js";
import { assert } from "chai";
import { MultipleSuites } from "../../../target/types/multiple_suites";

View File

@ -2,7 +2,7 @@
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.

View File

@ -1,4 +1,4 @@
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const { assert } = require("chai");
describe("multisig", () => {

View File

@ -1,4 +1,4 @@
import * as anchor from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import {
Program,
web3,
@ -8,7 +8,7 @@ import {
LangErrorMessage,
translateError,
parseIdlErrors,
} from "@project-serum/anchor";
} from "@coral-xyz/anchor";
import { Optional } from "../target/types/optional";
import { AllowMissingOptionals } from "../target/types/allow_missing_optionals";
import { assert, expect } from "chai";

View File

@ -43,16 +43,16 @@
"bpf-upgradeable-state"
],
"dependencies": {
"@project-serum/anchor": "file:../ts/packages/anchor",
"@coral-xyz/anchor": "file:../ts/packages/anchor",
"@project-serum/common": "^0.0.1-beta.3",
"@project-serum/serum": "^0.13.60",
"@project-serum/spl-associated-token-account": "file:../ts/packages/spl-associated-token-account",
"@project-serum/spl-token": "file:../ts/packages/spl-token",
"@coral-xyz/spl-associated-token-account": "file:../ts/packages/spl-associated-token-account",
"@coral-xyz/spl-token": "file:../ts/packages/spl-token",
"@solana/spl-token": "^0.1.8",
"@solana/web3.js": "^1.68.0"
},
"resolutions": {
"@project-serum/anchor/@solana/web3.js": "^1.68.0"
"@coral-xyz/anchor/@solana/web3.js": "^1.68.0"
},
"devDependencies": {
"@types/chai": "^4.3.0",

View File

@ -2,7 +2,7 @@
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.

View File

@ -1,8 +1,8 @@
import * as anchor from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import BN from "bn.js";
import { Keypair } from "@solana/web3.js";
import { findProgramAddressSync } from "@project-serum/anchor/dist/cjs/utils/pubkey";
import { Program } from "@project-serum/anchor";
import { findProgramAddressSync } from "@coral-xyz/anchor/dist/cjs/utils/pubkey";
import { Program } from "@coral-xyz/anchor";
import { PdaDerivation } from "../target/types/pda_derivation";
import { expect } from "chai";
const encode = anchor.utils.bytes.utf8.encode;

View File

@ -1,5 +1,5 @@
import { Buffer } from "buffer";
import { AnchorProvider, BN, Program, web3 } from "@project-serum/anchor";
import { AnchorProvider, BN, Program, web3 } from "@coral-xyz/anchor";
export const Magic = 0xa1b2c3d4;
export const Version1 = 1;

View File

@ -1,5 +1,5 @@
import * as anchor from "@project-serum/anchor";
import { BN, Program, web3 } from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import { BN, Program, web3 } from "@coral-xyz/anchor";
import { assert } from "chai";
import { createPriceFeed, setFeedPrice, getFeedData } from "./oracleUtils";

View File

@ -2,13 +2,13 @@
"name": "realloc",
"version": "0.26.0",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/project-serum/anchor#readme",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {
"url": "https://github.com/project-serum/anchor/issues"
"url": "https://github.com/coral-xyz/anchor/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/project-serum/anchor.git"
"url": "https://github.com/coral-xyz/anchor.git"
},
"engines": {
"node": ">=11"

View File

@ -1,5 +1,5 @@
import * as anchor from "@project-serum/anchor";
import { AnchorError, Program } from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import { AnchorError, Program } from "@coral-xyz/anchor";
import { assert } from "chai";
import { Realloc } from "../target/types/realloc";

View File

@ -2,7 +2,7 @@
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.

View File

@ -1,5 +1,5 @@
import * as anchor from "@project-serum/anchor";
import { AnchorProvider, Program } from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import { AnchorProvider, Program } from "@coral-xyz/anchor";
import { PublicKey } from "@solana/web3.js";
import { expect } from "chai";
import { RelationsDerivation } from "../target/types/relations_derivation";

View File

@ -1,4 +1,4 @@
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const { assert } = require("chai");
describe("token", () => {

View File

@ -2,7 +2,7 @@
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.

View File

@ -1,5 +1,5 @@
const { assert } = require("chai");
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const BN = anchor.BN;
const OpenOrders = require("@project-serum/serum").OpenOrders;
const TOKEN_PROGRAM_ID = require("@solana/spl-token").TOKEN_PROGRAM_ID;

View File

@ -9,9 +9,9 @@ const TOKEN_PROGRAM_ID = require("@solana/spl-token").TOKEN_PROGRAM_ID;
const TokenInstructions = require("@project-serum/serum").TokenInstructions;
const Market = require("@project-serum/serum").Market;
const DexInstructions = require("@project-serum/serum").DexInstructions;
const web3 = require("@project-serum/anchor").web3;
const web3 = require("@coral-xyz/anchor").web3;
const Connection = web3.Connection;
const BN = require("@project-serum/anchor").BN;
const BN = require("@coral-xyz/anchor").BN;
const serumCmn = require("@project-serum/common");
const Account = web3.Account;
const Transaction = web3.Transaction;

View File

@ -1,4 +1,4 @@
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const splToken = require("@solana/spl-token");
const { assert } = require("chai");

View File

@ -1,4 +1,4 @@
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const { assert } = require("chai");
describe("sysvars", () => {

View File

@ -2,7 +2,7 @@
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.

View File

@ -1,4 +1,4 @@
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
describe("tictactoe", () => {
anchor.setProvider(anchor.AnchorProvider.env());

View File

@ -2,7 +2,7 @@
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.

View File

@ -1,4 +1,4 @@
import * as anchor from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
describe("typescript", () => {
// Configure the client to use the local cluster.

View File

@ -1,5 +1,5 @@
import * as anchor from "@project-serum/anchor";
import { Program } from "@project-serum/anchor";
import * as anchor from "@coral-xyz/anchor";
import { Program } from "@coral-xyz/anchor";
import { assert } from "chai";
import { ValidatorClone } from "../target/types/validator_clone";

View File

@ -16,14 +16,45 @@
dependencies:
regenerator-runtime "^0.13.4"
"@coral-xyz/borsh@^0.2.6":
version "0.2.6"
resolved "https://registry.yarnpkg.com/@coral-xyz/borsh/-/borsh-0.2.6.tgz#0f11b223bf2967574310705afd3c53ce26688ada"
integrity sha512-y6nmHw1bFcJib7sMHsQPpC8r47xhqDZVvhUdna7NUPzpSbOZG6f46N21+aXsQ2w/tG8Ggls488J/ZmwbgVmyjg==
"@coral-xyz/anchor@=0.26.0", "@coral-xyz/anchor@file:../ts/packages/anchor":
version "0.26.0"
dependencies:
"@coral-xyz/borsh" "^0.26.0"
"@solana/web3.js" "^1.68.0"
base64-js "^1.5.1"
bn.js "^5.1.2"
bs58 "^4.0.1"
buffer-layout "^1.2.2"
camelcase "^6.3.0"
cross-fetch "^3.1.5"
crypto-hash "^1.3.0"
eventemitter3 "^4.0.7"
js-sha256 "^0.9.0"
pako "^2.0.3"
snake-case "^3.0.4"
superstruct "^0.15.4"
toml "^3.0.0"
"@coral-xyz/borsh@^0.26.0":
version "0.26.0"
resolved "https://registry.yarnpkg.com/@coral-xyz/borsh/-/borsh-0.26.0.tgz#d054f64536d824634969e74138f9f7c52bbbc0d5"
integrity sha512-uCZ0xus0CszQPHYfWAqKS5swS1UxvePu83oOF+TWpUkedsNlg6p2p4azxZNSSqwXb9uXMFgxhuMBX9r3Xoi0vQ==
dependencies:
bn.js "^5.1.2"
buffer-layout "^1.2.0"
"@coral-xyz/spl-associated-token-account@file:../ts/packages/spl-associated-token-account":
version "1.1.1"
dependencies:
"@coral-xyz/anchor" "=0.26.0"
"@native-to-anchor/buffer-layout" "=0.1.0"
"@coral-xyz/spl-token@file:../ts/packages/spl-token":
version "0.26.0"
dependencies:
"@coral-xyz/anchor" "=0.26.0"
"@native-to-anchor/buffer-layout" "=0.1.0"
"@native-to-anchor/buffer-layout@=0.1.0":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@native-to-anchor/buffer-layout/-/buffer-layout-0.1.0.tgz#ff0cb66341bc820b8ee73bb1d1d43bae7e3554b0"
@ -47,25 +78,6 @@
resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.6.3.tgz#7eed12d9f4404b416999d0c87686836c4c5c9b94"
integrity sha512-T04e4iTurVy7I8Sw4+c5OSN9/RkPlo1uKxAomtxQNLq8j1uPAqnsqG1bqvY3Jv7c13gyr6dui0zmh/I3+f/JaQ==
"@project-serum/anchor@=0.25.0", "@project-serum/anchor@file:../ts/packages/anchor":
version "0.25.0"
dependencies:
"@coral-xyz/borsh" "^0.2.6"
"@solana/web3.js" "^1.68.0"
base64-js "^1.5.1"
bn.js "^5.1.2"
bs58 "^4.0.1"
buffer-layout "^1.2.2"
camelcase "^6.3.0"
cross-fetch "^3.1.5"
crypto-hash "^1.3.0"
eventemitter3 "^4.0.7"
js-sha256 "^0.9.0"
pako "^2.0.3"
snake-case "^3.0.4"
superstruct "^0.15.4"
toml "^3.0.0"
"@project-serum/anchor@^0.11.1":
version "0.11.1"
resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.11.1.tgz#155bff2c70652eafdcfd5559c81a83bb19cec9ff"
@ -114,18 +126,6 @@
bn.js "^5.1.2"
buffer-layout "^1.2.0"
"@project-serum/spl-associated-token-account@file:../ts/packages/spl-associated-token-account":
version "1.1.1"
dependencies:
"@native-to-anchor/buffer-layout" "=0.1.0"
"@project-serum/anchor" "=0.25.0"
"@project-serum/spl-token@file:../ts/packages/spl-token":
version "3.3.0"
dependencies:
"@native-to-anchor/buffer-layout" "=0.1.0"
"@project-serum/anchor" "=0.25.0"
"@solana/buffer-layout-utils@=0.2.0":
version "0.2.0"
resolved "https://registry.yarnpkg.com/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz#b45a6cab3293a2eb7597cceb474f229889d875ca"
@ -1428,4 +1428,4 @@ yn@^2.0.0:
yocto-queue@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==

View File

@ -2,7 +2,7 @@
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.

View File

@ -1,4 +1,4 @@
const anchor = require("@project-serum/anchor");
const anchor = require("@coral-xyz/anchor");
const { assert } = require("chai");
const nativeAssert = require("assert");
const PublicKey = anchor.web3.PublicKey;

View File

@ -1,5 +1,5 @@
{
"name": "@project-serum/monorepo",
"name": "@coral-xyz/monorepo",
"private": true,
"workspaces": [
"packages/*",

View File

@ -1,10 +1,10 @@
# @project-serum/anchor
# @coral-xyz/anchor
[![npm](https://img.shields.io/npm/v/@project-serum/anchor.svg?color=blue)](https://www.npmjs.com/package/@project-serum/anchor)
[![npm](https://img.shields.io/npm/v/@coral-xyz/anchor.svg?color=blue)](https://www.npmjs.com/package/@coral-xyz/anchor)
[![Docs](https://img.shields.io/badge/docs-typedoc-blue)](https://coral-xyz.github.io/anchor/ts/index.html)
TypeScript client for Anchor programs.
## Note
* `@project-serum/anchor` depends on node.js native modules. Therefore, webpack 5 will not work with current version. You will either need to rollback to webpack 4, or use a polyfill for each missing dependency.
- `@coral-xyz/anchor` depends on node.js native modules. Therefore, webpack 5 will not work with current version. You will either need to rollback to webpack 4, or use a polyfill for each missing dependency.

View File

@ -1,5 +1,5 @@
{
"name": "@project-serum/anchor",
"name": "@coral-xyz/anchor",
"version": "0.26.0",
"description": "Anchor client",
"module": "./dist/esm/index.js",

View File

@ -1,5 +1,5 @@
{
"name": "@project-serum/spl-associated-token-account",
"name": "@coral-xyz/spl-associated-token-account",
"description": "Anchor client for Solana Program Library Associated Token Account",
"version": "1.1.1",
"author": "acheron <acheroncrypto@gmail.com>",
@ -27,7 +27,7 @@
"watch": "tsc -p tsconfig.cjs.json --watch"
},
"dependencies": {
"@project-serum/anchor": "=0.26.0",
"@coral-xyz/anchor": "=0.26.0",
"@native-to-anchor/buffer-layout": "=0.1.0"
},
"devDependencies": {

Some files were not shown because too many files have changed in this diff Show More