@solana/programs 2.0.0-20241006045741

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2023 Solana Labs, Inc
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,42 @@
1
+ [![npm][npm-image]][npm-url]
2
+ [![npm-downloads][npm-downloads-image]][npm-url]
3
+ [![semantic-release][semantic-release-image]][semantic-release-url]
4
+ <br />
5
+ [![code-style-prettier][code-style-prettier-image]][code-style-prettier-url]
6
+
7
+ [code-style-prettier-image]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square
8
+ [code-style-prettier-url]: https://github.com/prettier/prettier
9
+ [npm-downloads-image]: https://img.shields.io/npm/dm/@solana/programs/rc.svg?style=flat
10
+ [npm-image]: https://img.shields.io/npm/v/@solana/programs/rc.svg?style=flat
11
+ [npm-url]: https://www.npmjs.com/package/@solana/programs/v/rc
12
+ [semantic-release-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
13
+ [semantic-release-url]: https://github.com/semantic-release/semantic-release
14
+
15
+ # @solana/programs
16
+
17
+ 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@rc`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library).
18
+
19
+ ## Functions
20
+
21
+ ### `isProgramError()`
22
+
23
+ This function takes any error — typically caused by a transaction failure — and identifies whether it is a custom program error from the provided program address. It takes the following parameters:
24
+
25
+ - The `error` to identify.
26
+ - The `transactionMessage` object that failed to execute. Since the RPC response only provide the index of the failed instruction, we need the transaction message to access its program address.
27
+ - The `programAddress` of the program from which the error is expected.
28
+ - Optionally, the expected error `code` of the custom program error. When provided, the function will also check that the custom program error code matches the given value.
29
+
30
+ ```ts
31
+ try {
32
+ // Send and confirm your transaction.
33
+ } catch (error) {
34
+ if (isProgramError(error, transactionMessage, myProgramAddress, 42)) {
35
+ // Handle custom program error 42 from this program.
36
+ } else if (isProgramError(error, transactionMessage, myProgramAddress)) {
37
+ // Handle all other custom program errors from this program.
38
+ } else {
39
+ throw error;
40
+ }
41
+ }
42
+ ```
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ var errors = require('@solana/errors');
4
+
5
+ // src/program-error.ts
6
+ function isProgramError(error, transactionMessage, programAddress, code) {
7
+ if (!errors.isSolanaError(error, errors.SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM)) {
8
+ return false;
9
+ }
10
+ const instructionProgramAddress = transactionMessage.instructions[error.context.index]?.programAddress;
11
+ if (!instructionProgramAddress || instructionProgramAddress !== programAddress) {
12
+ return false;
13
+ }
14
+ return typeof code === "undefined" || error.context.code === code;
15
+ }
16
+
17
+ exports.isProgramError = isProgramError;
18
+ //# sourceMappingURL=index.browser.cjs.map
19
+ //# sourceMappingURL=index.browser.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/program-error.ts"],"names":["isSolanaError","SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM"],"mappings":";;;;;AAGO,SAAS,cACZ,CAAA,KAAA,EACA,kBACA,EAAA,cAAA,EACA,IAE4D,EAAA;AAC5D,EAAA,IAAI,CAACA,oBAAA,CAAc,KAAO,EAAAC,8CAAuC,CAAG,EAAA;AAChE,IAAO,OAAA,KAAA,CAAA;AAAA,GACX;AACA,EAAA,MAAM,4BAA4B,kBAAmB,CAAA,YAAA,CAAa,KAAM,CAAA,OAAA,CAAQ,KAAK,CAAG,EAAA,cAAA,CAAA;AACxF,EAAI,IAAA,CAAC,yBAA6B,IAAA,yBAAA,KAA8B,cAAgB,EAAA;AAC5E,IAAO,OAAA,KAAA,CAAA;AAAA,GACX;AACA,EAAA,OAAO,OAAO,IAAA,KAAS,WAAe,IAAA,KAAA,CAAM,QAAQ,IAAS,KAAA,IAAA,CAAA;AACjE","file":"index.browser.cjs","sourcesContent":["import type { Address } from '@solana/addresses';\nimport { isSolanaError, SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, SolanaError } from '@solana/errors';\n\nexport function isProgramError<TProgramErrorCode extends number>(\n error: unknown,\n transactionMessage: { instructions: Record<number, { programAddress: Address }> },\n programAddress: Address,\n code?: TProgramErrorCode,\n): error is Readonly<{ context: Readonly<{ code: TProgramErrorCode }> }> &\n SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> {\n if (!isSolanaError(error, SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM)) {\n return false;\n }\n const instructionProgramAddress = transactionMessage.instructions[error.context.index]?.programAddress;\n if (!instructionProgramAddress || instructionProgramAddress !== programAddress) {\n return false;\n }\n return typeof code === 'undefined' || error.context.code === code;\n}\n"]}
@@ -0,0 +1,17 @@
1
+ import { isSolanaError, SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM } from '@solana/errors';
2
+
3
+ // src/program-error.ts
4
+ function isProgramError(error, transactionMessage, programAddress, code) {
5
+ if (!isSolanaError(error, SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM)) {
6
+ return false;
7
+ }
8
+ const instructionProgramAddress = transactionMessage.instructions[error.context.index]?.programAddress;
9
+ if (!instructionProgramAddress || instructionProgramAddress !== programAddress) {
10
+ return false;
11
+ }
12
+ return typeof code === "undefined" || error.context.code === code;
13
+ }
14
+
15
+ export { isProgramError };
16
+ //# sourceMappingURL=index.browser.mjs.map
17
+ //# sourceMappingURL=index.browser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/program-error.ts"],"names":[],"mappings":";;;AAGO,SAAS,cACZ,CAAA,KAAA,EACA,kBACA,EAAA,cAAA,EACA,IAE4D,EAAA;AAC5D,EAAA,IAAI,CAAC,aAAA,CAAc,KAAO,EAAA,uCAAuC,CAAG,EAAA;AAChE,IAAO,OAAA,KAAA,CAAA;AAAA,GACX;AACA,EAAA,MAAM,4BAA4B,kBAAmB,CAAA,YAAA,CAAa,KAAM,CAAA,OAAA,CAAQ,KAAK,CAAG,EAAA,cAAA,CAAA;AACxF,EAAI,IAAA,CAAC,yBAA6B,IAAA,yBAAA,KAA8B,cAAgB,EAAA;AAC5E,IAAO,OAAA,KAAA,CAAA;AAAA,GACX;AACA,EAAA,OAAO,OAAO,IAAA,KAAS,WAAe,IAAA,KAAA,CAAM,QAAQ,IAAS,KAAA,IAAA,CAAA;AACjE","file":"index.browser.mjs","sourcesContent":["import type { Address } from '@solana/addresses';\nimport { isSolanaError, SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, SolanaError } from '@solana/errors';\n\nexport function isProgramError<TProgramErrorCode extends number>(\n error: unknown,\n transactionMessage: { instructions: Record<number, { programAddress: Address }> },\n programAddress: Address,\n code?: TProgramErrorCode,\n): error is Readonly<{ context: Readonly<{ code: TProgramErrorCode }> }> &\n SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> {\n if (!isSolanaError(error, SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM)) {\n return false;\n }\n const instructionProgramAddress = transactionMessage.instructions[error.context.index]?.programAddress;\n if (!instructionProgramAddress || instructionProgramAddress !== programAddress) {\n return false;\n }\n return typeof code === 'undefined' || error.context.code === code;\n}\n"]}
@@ -0,0 +1,17 @@
1
+ import { isSolanaError, SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM } from '@solana/errors';
2
+
3
+ // src/program-error.ts
4
+ function isProgramError(error, transactionMessage, programAddress, code) {
5
+ if (!isSolanaError(error, SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM)) {
6
+ return false;
7
+ }
8
+ const instructionProgramAddress = transactionMessage.instructions[error.context.index]?.programAddress;
9
+ if (!instructionProgramAddress || instructionProgramAddress !== programAddress) {
10
+ return false;
11
+ }
12
+ return typeof code === "undefined" || error.context.code === code;
13
+ }
14
+
15
+ export { isProgramError };
16
+ //# sourceMappingURL=index.native.mjs.map
17
+ //# sourceMappingURL=index.native.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/program-error.ts"],"names":[],"mappings":";;;AAGO,SAAS,cACZ,CAAA,KAAA,EACA,kBACA,EAAA,cAAA,EACA,IAE4D,EAAA;AAC5D,EAAA,IAAI,CAAC,aAAA,CAAc,KAAO,EAAA,uCAAuC,CAAG,EAAA;AAChE,IAAO,OAAA,KAAA,CAAA;AAAA,GACX;AACA,EAAA,MAAM,4BAA4B,kBAAmB,CAAA,YAAA,CAAa,KAAM,CAAA,OAAA,CAAQ,KAAK,CAAG,EAAA,cAAA,CAAA;AACxF,EAAI,IAAA,CAAC,yBAA6B,IAAA,yBAAA,KAA8B,cAAgB,EAAA;AAC5E,IAAO,OAAA,KAAA,CAAA;AAAA,GACX;AACA,EAAA,OAAO,OAAO,IAAA,KAAS,WAAe,IAAA,KAAA,CAAM,QAAQ,IAAS,KAAA,IAAA,CAAA;AACjE","file":"index.native.mjs","sourcesContent":["import type { Address } from '@solana/addresses';\nimport { isSolanaError, SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, SolanaError } from '@solana/errors';\n\nexport function isProgramError<TProgramErrorCode extends number>(\n error: unknown,\n transactionMessage: { instructions: Record<number, { programAddress: Address }> },\n programAddress: Address,\n code?: TProgramErrorCode,\n): error is Readonly<{ context: Readonly<{ code: TProgramErrorCode }> }> &\n SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> {\n if (!isSolanaError(error, SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM)) {\n return false;\n }\n const instructionProgramAddress = transactionMessage.instructions[error.context.index]?.programAddress;\n if (!instructionProgramAddress || instructionProgramAddress !== programAddress) {\n return false;\n }\n return typeof code === 'undefined' || error.context.code === code;\n}\n"]}
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ var errors = require('@solana/errors');
4
+
5
+ // src/program-error.ts
6
+ function isProgramError(error, transactionMessage, programAddress, code) {
7
+ if (!errors.isSolanaError(error, errors.SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM)) {
8
+ return false;
9
+ }
10
+ const instructionProgramAddress = transactionMessage.instructions[error.context.index]?.programAddress;
11
+ if (!instructionProgramAddress || instructionProgramAddress !== programAddress) {
12
+ return false;
13
+ }
14
+ return typeof code === "undefined" || error.context.code === code;
15
+ }
16
+
17
+ exports.isProgramError = isProgramError;
18
+ //# sourceMappingURL=index.node.cjs.map
19
+ //# sourceMappingURL=index.node.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/program-error.ts"],"names":["isSolanaError","SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM"],"mappings":";;;;;AAGO,SAAS,cACZ,CAAA,KAAA,EACA,kBACA,EAAA,cAAA,EACA,IAE4D,EAAA;AAC5D,EAAA,IAAI,CAACA,oBAAA,CAAc,KAAO,EAAAC,8CAAuC,CAAG,EAAA;AAChE,IAAO,OAAA,KAAA,CAAA;AAAA,GACX;AACA,EAAA,MAAM,4BAA4B,kBAAmB,CAAA,YAAA,CAAa,KAAM,CAAA,OAAA,CAAQ,KAAK,CAAG,EAAA,cAAA,CAAA;AACxF,EAAI,IAAA,CAAC,yBAA6B,IAAA,yBAAA,KAA8B,cAAgB,EAAA;AAC5E,IAAO,OAAA,KAAA,CAAA;AAAA,GACX;AACA,EAAA,OAAO,OAAO,IAAA,KAAS,WAAe,IAAA,KAAA,CAAM,QAAQ,IAAS,KAAA,IAAA,CAAA;AACjE","file":"index.node.cjs","sourcesContent":["import type { Address } from '@solana/addresses';\nimport { isSolanaError, SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, SolanaError } from '@solana/errors';\n\nexport function isProgramError<TProgramErrorCode extends number>(\n error: unknown,\n transactionMessage: { instructions: Record<number, { programAddress: Address }> },\n programAddress: Address,\n code?: TProgramErrorCode,\n): error is Readonly<{ context: Readonly<{ code: TProgramErrorCode }> }> &\n SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> {\n if (!isSolanaError(error, SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM)) {\n return false;\n }\n const instructionProgramAddress = transactionMessage.instructions[error.context.index]?.programAddress;\n if (!instructionProgramAddress || instructionProgramAddress !== programAddress) {\n return false;\n }\n return typeof code === 'undefined' || error.context.code === code;\n}\n"]}
@@ -0,0 +1,17 @@
1
+ import { isSolanaError, SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM } from '@solana/errors';
2
+
3
+ // src/program-error.ts
4
+ function isProgramError(error, transactionMessage, programAddress, code) {
5
+ if (!isSolanaError(error, SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM)) {
6
+ return false;
7
+ }
8
+ const instructionProgramAddress = transactionMessage.instructions[error.context.index]?.programAddress;
9
+ if (!instructionProgramAddress || instructionProgramAddress !== programAddress) {
10
+ return false;
11
+ }
12
+ return typeof code === "undefined" || error.context.code === code;
13
+ }
14
+
15
+ export { isProgramError };
16
+ //# sourceMappingURL=index.node.mjs.map
17
+ //# sourceMappingURL=index.node.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/program-error.ts"],"names":[],"mappings":";;;AAGO,SAAS,cACZ,CAAA,KAAA,EACA,kBACA,EAAA,cAAA,EACA,IAE4D,EAAA;AAC5D,EAAA,IAAI,CAAC,aAAA,CAAc,KAAO,EAAA,uCAAuC,CAAG,EAAA;AAChE,IAAO,OAAA,KAAA,CAAA;AAAA,GACX;AACA,EAAA,MAAM,4BAA4B,kBAAmB,CAAA,YAAA,CAAa,KAAM,CAAA,OAAA,CAAQ,KAAK,CAAG,EAAA,cAAA,CAAA;AACxF,EAAI,IAAA,CAAC,yBAA6B,IAAA,yBAAA,KAA8B,cAAgB,EAAA;AAC5E,IAAO,OAAA,KAAA,CAAA;AAAA,GACX;AACA,EAAA,OAAO,OAAO,IAAA,KAAS,WAAe,IAAA,KAAA,CAAM,QAAQ,IAAS,KAAA,IAAA,CAAA;AACjE","file":"index.node.mjs","sourcesContent":["import type { Address } from '@solana/addresses';\nimport { isSolanaError, SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, SolanaError } from '@solana/errors';\n\nexport function isProgramError<TProgramErrorCode extends number>(\n error: unknown,\n transactionMessage: { instructions: Record<number, { programAddress: Address }> },\n programAddress: Address,\n code?: TProgramErrorCode,\n): error is Readonly<{ context: Readonly<{ code: TProgramErrorCode }> }> &\n SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> {\n if (!isSolanaError(error, SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM)) {\n return false;\n }\n const instructionProgramAddress = transactionMessage.instructions[error.context.index]?.programAddress;\n if (!instructionProgramAddress || instructionProgramAddress !== programAddress) {\n return false;\n }\n return typeof code === 'undefined' || error.context.code === code;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './program-error';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { Address } from '@solana/addresses';
2
+ import { SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, SolanaError } from '@solana/errors';
3
+ export declare function isProgramError<TProgramErrorCode extends number>(error: unknown, transactionMessage: {
4
+ instructions: Record<number, {
5
+ programAddress: Address;
6
+ }>;
7
+ }, programAddress: Address, code?: TProgramErrorCode): error is Readonly<{
8
+ context: Readonly<{
9
+ code: TProgramErrorCode;
10
+ }>;
11
+ }> & SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM>;
12
+ //# sourceMappingURL=program-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"program-error.d.ts","sourceRoot":"","sources":["../../src/program-error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAiB,uCAAuC,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAErG,wBAAgB,cAAc,CAAC,iBAAiB,SAAS,MAAM,EAC3D,KAAK,EAAE,OAAO,EACd,kBAAkB,EAAE;IAAE,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,cAAc,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;CAAE,EACjF,cAAc,EAAE,OAAO,EACvB,IAAI,CAAC,EAAE,iBAAiB,GACzB,KAAK,IAAI,QAAQ,CAAC;IAAE,OAAO,EAAE,QAAQ,CAAC;QAAE,IAAI,EAAE,iBAAiB,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,GACpE,WAAW,CAAC,OAAO,uCAAuC,CAAC,CAS9D"}
package/package.json ADDED
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "@solana/programs",
3
+ "version": "2.0.0-20241006045741",
4
+ "description": "Helpers for defining programs and resolving program errors",
5
+ "exports": {
6
+ "edge-light": {
7
+ "import": "./dist/index.node.mjs",
8
+ "require": "./dist/index.node.cjs"
9
+ },
10
+ "workerd": {
11
+ "import": "./dist/index.node.mjs",
12
+ "require": "./dist/index.node.cjs"
13
+ },
14
+ "browser": {
15
+ "import": "./dist/index.browser.mjs",
16
+ "require": "./dist/index.browser.cjs"
17
+ },
18
+ "node": {
19
+ "import": "./dist/index.node.mjs",
20
+ "require": "./dist/index.node.cjs"
21
+ },
22
+ "react-native": "./dist/index.native.mjs",
23
+ "types": "./dist/types/index.d.ts"
24
+ },
25
+ "browser": {
26
+ "./dist/index.node.cjs": "./dist/index.browser.cjs",
27
+ "./dist/index.node.mjs": "./dist/index.browser.mjs"
28
+ },
29
+ "main": "./dist/index.node.cjs",
30
+ "module": "./dist/index.node.mjs",
31
+ "react-native": "./dist/index.native.mjs",
32
+ "types": "./dist/types/index.d.ts",
33
+ "type": "commonjs",
34
+ "files": [
35
+ "./dist/"
36
+ ],
37
+ "sideEffects": false,
38
+ "keywords": [
39
+ "blockchain",
40
+ "solana",
41
+ "web3"
42
+ ],
43
+ "author": "Solana Labs Maintainers <maintainers@solanalabs.com>",
44
+ "license": "MIT",
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "https://github.com/solana-labs/solana-web3.js"
48
+ },
49
+ "bugs": {
50
+ "url": "http://github.com/solana-labs/solana-web3.js/issues"
51
+ },
52
+ "browserslist": [
53
+ "supports bigint and not dead",
54
+ "maintained node versions"
55
+ ],
56
+ "dependencies": {
57
+ "@solana/addresses": "2.0.0-20241006045741",
58
+ "@solana/errors": "2.0.0-20241006045741"
59
+ },
60
+ "peerDependencies": {
61
+ "typescript": ">=5"
62
+ },
63
+ "bundlewatch": {
64
+ "defaultCompression": "gzip",
65
+ "files": [
66
+ {
67
+ "path": "./dist/index*.js"
68
+ }
69
+ ]
70
+ },
71
+ "scripts": {
72
+ "compile:js": "tsup --config build-scripts/tsup.config.package.ts",
73
+ "compile:typedefs": "tsc -p ./tsconfig.declarations.json",
74
+ "dev": "jest -c ../../node_modules/@solana/test-config/jest-dev.config.ts --rootDir . --watch",
75
+ "publish-impl": "npm view $npm_package_name@$npm_package_version > /dev/null 2>&1 || pnpm publish --tag ${PUBLISH_TAG:-canary} --access public --no-git-checks",
76
+ "publish-packages": "pnpm prepublishOnly && pnpm publish-impl",
77
+ "style:fix": "pnpm eslint --fix src && pnpm prettier --log-level warn --ignore-unknown --write ./*",
78
+ "test:lint": "TERM_OVERRIDE=\"${TURBO_HASH:+dumb}\" TERM=${TERM_OVERRIDE:-$TERM} jest -c ../../node_modules/@solana/test-config/jest-lint.config.ts --rootDir . --silent",
79
+ "test:prettier": "TERM_OVERRIDE=\"${TURBO_HASH:+dumb}\" TERM=${TERM_OVERRIDE:-$TERM} jest -c ../../node_modules/@solana/test-config/jest-prettier.config.ts --rootDir . --silent",
80
+ "test:treeshakability:browser": "agadoo dist/index.browser.mjs",
81
+ "test:treeshakability:native": "agadoo dist/index.native.mjs",
82
+ "test:treeshakability:node": "agadoo dist/index.node.mjs",
83
+ "test:typecheck": "tsc --noEmit",
84
+ "test:unit:browser": "TERM_OVERRIDE=\"${TURBO_HASH:+dumb}\" TERM=${TERM_OVERRIDE:-$TERM} jest -c ../../node_modules/@solana/test-config/jest-unit.config.browser.ts --rootDir . --silent",
85
+ "test:unit:node": "TERM_OVERRIDE=\"${TURBO_HASH:+dumb}\" TERM=${TERM_OVERRIDE:-$TERM} jest -c ../../node_modules/@solana/test-config/jest-unit.config.node.ts --rootDir . --silent"
86
+ }
87
+ }