@solana/compat 2.0.0-development
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 +20 -0
- package/README.md +61 -0
- package/dist/index.browser.cjs +253 -0
- package/dist/index.browser.cjs.map +1 -0
- package/dist/index.browser.js +248 -0
- package/dist/index.browser.js.map +1 -0
- package/dist/index.development.js +413 -0
- package/dist/index.development.js.map +1 -0
- package/dist/index.native.js +248 -0
- package/dist/index.native.js.map +1 -0
- package/dist/index.node.cjs +253 -0
- package/dist/index.node.cjs.map +1 -0
- package/dist/index.node.js +246 -0
- package/dist/index.node.js.map +1 -0
- package/dist/index.production.min.js +14 -0
- package/dist/types/address.d.ts +9 -0
- package/dist/types/address.d.ts.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/keypair.d.ts +8 -0
- package/dist/types/keypair.d.ts.map +1 -0
- package/dist/types/transaction.d.ts +5 -0
- package/dist/types/transaction.d.ts.map +1 -0
- package/package.json +104 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Address } from '@solana/addresses';
|
|
2
|
+
import { PublicKey } from '@solana/web3.js';
|
|
3
|
+
/**
|
|
4
|
+
* Convert from a Legacy Web3 JS PublicKey to a base58 encoded address
|
|
5
|
+
* @param publicKey The PublicKey to convert
|
|
6
|
+
* @returns An Address
|
|
7
|
+
*/
|
|
8
|
+
export declare function fromLegacyPublicKey<TAddress extends string>(publicKey: PublicKey): Address<TAddress>;
|
|
9
|
+
//# sourceMappingURL=address.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../src/address.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,SAAS,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC,CAEpG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Keypair } from '@solana/web3.js';
|
|
2
|
+
/**
|
|
3
|
+
* Convert from a Legacy Web3 JS Keypair to a CryptoKeyPair
|
|
4
|
+
* @param keypair The Keypair to convert
|
|
5
|
+
* @returns A CryptoKeyPair
|
|
6
|
+
*/
|
|
7
|
+
export declare function fromLegacyKeypair(keypair: Keypair, extractable?: boolean): Promise<CryptoKeyPair>;
|
|
8
|
+
//# sourceMappingURL=keypair.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keypair.d.ts","sourceRoot":"","sources":["../../src/keypair.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAuC1C;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,CAgBvG"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type IDurableNonceTransaction, type ITransactionWithBlockhashLifetime, type ITransactionWithFeePayer, type Transaction } from '@solana/transactions';
|
|
2
|
+
import type { VersionedTransaction } from '@solana/web3.js';
|
|
3
|
+
export declare function fromVersionedTransactionWithBlockhash(transaction: VersionedTransaction, lastValidBlockHeight?: bigint): Transaction & ITransactionWithFeePayer & ITransactionWithBlockhashLifetime;
|
|
4
|
+
export declare function fromVersionedTransactionWithDurableNonce(transaction: VersionedTransaction): Transaction & ITransactionWithFeePayer & IDurableNonceTransaction;
|
|
5
|
+
//# sourceMappingURL=transaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../src/transaction.ts"],"names":[],"mappings":"AAKA,OAAO,EAIH,KAAK,wBAAwB,EAE7B,KAAK,iCAAiC,EACtC,KAAK,wBAAwB,EAM7B,KAAK,WAAW,EACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAKR,oBAAoB,EACvB,MAAM,iBAAiB,CAAC;AAkEzB,wBAAgB,qCAAqC,CACjD,WAAW,EAAE,oBAAoB,EACjC,oBAAoB,CAAC,EAAE,MAAM,GAC9B,WAAW,GAAG,wBAAwB,GAAG,iCAAiC,CAqC5E;AAED,wBAAgB,wCAAwC,CACpD,WAAW,EAAE,oBAAoB,GAClC,WAAW,GAAG,wBAAwB,GAAG,wBAAwB,CAwDnE"}
|
package/package.json
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@solana/compat",
|
|
3
|
+
"version": "2.0.0-development",
|
|
4
|
+
"description": "Helpers for converting from legacy web3js classes",
|
|
5
|
+
"exports": {
|
|
6
|
+
"browser": {
|
|
7
|
+
"import": "./dist/index.browser.js",
|
|
8
|
+
"require": "./dist/index.browser.cjs"
|
|
9
|
+
},
|
|
10
|
+
"node": {
|
|
11
|
+
"import": "./dist/index.node.js",
|
|
12
|
+
"require": "./dist/index.node.cjs"
|
|
13
|
+
},
|
|
14
|
+
"react-native": "./dist/index.native.js",
|
|
15
|
+
"types": "./dist/types/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"browser": {
|
|
18
|
+
"./dist/index.node.cjs": "./dist/index.browser.cjs",
|
|
19
|
+
"./dist/index.node.js": "./dist/index.browser.js"
|
|
20
|
+
},
|
|
21
|
+
"main": "./dist/index.node.cjs",
|
|
22
|
+
"module": "./dist/index.node.js",
|
|
23
|
+
"react-native": "./dist/index.native.js",
|
|
24
|
+
"types": "./dist/types/index.d.ts",
|
|
25
|
+
"type": "module",
|
|
26
|
+
"files": [
|
|
27
|
+
"./dist/"
|
|
28
|
+
],
|
|
29
|
+
"sideEffects": false,
|
|
30
|
+
"keywords": [
|
|
31
|
+
"blockchain",
|
|
32
|
+
"solana",
|
|
33
|
+
"web3"
|
|
34
|
+
],
|
|
35
|
+
"author": "Solana Labs Maintainers <maintainers@solanalabs.com>",
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "https://github.com/solana-labs/solana-web3.js"
|
|
40
|
+
},
|
|
41
|
+
"bugs": {
|
|
42
|
+
"url": "http://github.com/solana-labs/solana-web3.js/issues"
|
|
43
|
+
},
|
|
44
|
+
"browserslist": [
|
|
45
|
+
"supports bigint and not dead",
|
|
46
|
+
"maintained node versions"
|
|
47
|
+
],
|
|
48
|
+
"engine": {
|
|
49
|
+
"node": ">=17.4"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@solana/functional": "2.0.0-experimental.45c014d",
|
|
53
|
+
"@solana/instructions": "2.0.0-experimental.45c014d",
|
|
54
|
+
"@solana/transactions": "2.0.0-experimental.45c014d"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@solana/eslint-config-solana": "^1.0.2",
|
|
58
|
+
"@swc/jest": "^0.2.29",
|
|
59
|
+
"@types/jest": "^29.5.6",
|
|
60
|
+
"@typescript-eslint/eslint-plugin": "^6.7.0",
|
|
61
|
+
"@typescript-eslint/parser": "^6.3.0",
|
|
62
|
+
"agadoo": "^3.0.0",
|
|
63
|
+
"eslint": "^8.45.0",
|
|
64
|
+
"eslint-plugin-jest": "^27.4.2",
|
|
65
|
+
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
66
|
+
"jest": "^29.7.0",
|
|
67
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
68
|
+
"jest-runner-eslint": "^2.1.2",
|
|
69
|
+
"jest-runner-prettier": "^1.0.0",
|
|
70
|
+
"prettier": "^2.8",
|
|
71
|
+
"tsup": "^8.0.1",
|
|
72
|
+
"typescript": "^5.2.2",
|
|
73
|
+
"version-from-git": "^1.1.1",
|
|
74
|
+
"@solana/addresses": "2.0.0-experimental.45c014d",
|
|
75
|
+
"@solana/keys": "2.0.0-experimental.45c014d",
|
|
76
|
+
"@solana/web3.js": "0.0.0-development",
|
|
77
|
+
"build-scripts": "0.0.0",
|
|
78
|
+
"test-config": "0.0.0",
|
|
79
|
+
"tsconfig": "0.0.0"
|
|
80
|
+
},
|
|
81
|
+
"bundlewatch": {
|
|
82
|
+
"defaultCompression": "gzip",
|
|
83
|
+
"files": [
|
|
84
|
+
{
|
|
85
|
+
"path": "./dist/index*.js"
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
"scripts": {
|
|
90
|
+
"compile:js": "tsup --config build-scripts/tsup.config.library.ts",
|
|
91
|
+
"compile:typedefs": "tsc -p ./tsconfig.declarations.json",
|
|
92
|
+
"dev": "jest -c node_modules/test-config/jest-dev.config.ts --rootDir . --watch",
|
|
93
|
+
"publish-packages": "pnpm publish --tag experimental --access public --no-git-checks",
|
|
94
|
+
"style:fix": "pnpm eslint --fix src/* && pnpm prettier -w src/* package.json",
|
|
95
|
+
"test:lint": "jest -c node_modules/test-config/jest-lint.config.ts --rootDir . --silent",
|
|
96
|
+
"test:prettier": "jest -c node_modules/test-config/jest-prettier.config.ts --rootDir . --silent",
|
|
97
|
+
"test:treeshakability:browser": "agadoo dist/index.browser.js",
|
|
98
|
+
"test:treeshakability:native": "agadoo dist/index.node.js",
|
|
99
|
+
"test:treeshakability:node": "agadoo dist/index.native.js",
|
|
100
|
+
"test:typecheck": "tsc --noEmit",
|
|
101
|
+
"test:unit:browser": "jest -c node_modules/test-config/jest-unit.config.browser.ts --rootDir . --silent",
|
|
102
|
+
"test:unit:node": "jest -c node_modules/test-config/jest-unit.config.node.ts --rootDir . --silent"
|
|
103
|
+
}
|
|
104
|
+
}
|