Skip to content

Commit cfd87d0

Browse files
committed
add initial solana methods
1 parent 85bde21 commit cfd87d0

File tree

6 files changed

+1896
-852
lines changed

6 files changed

+1896
-852
lines changed

packages/vault-sdk/package.json

Lines changed: 67 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,69 @@
11
{
2-
"author": "thirdweb eng <[email protected]>",
3-
"bugs": {
4-
"url": "https://github.com/thirdweb-dev/js/issues"
5-
},
6-
"dependencies": {
7-
"@noble/ciphers": "^1.2.1",
8-
"@noble/curves": "1.8.2",
9-
"@noble/hashes": "1.7.2",
10-
"abitype": "1.0.8",
11-
"jose": "6.0.11"
12-
},
13-
"devDependencies": {
14-
"@biomejs/biome": "2.0.6",
15-
"rimraf": "6.0.1"
16-
},
17-
"engines": {
18-
"node": ">=18"
19-
},
20-
"exports": {
21-
".": {
22-
"types": "./dist/types/exports/thirdweb.d.ts",
23-
"import": "./dist/esm/exports/thirdweb.js",
24-
"default": "./dist/cjs/exports/thirdweb.js"
25-
},
26-
"./package.json": "./package.json"
27-
},
28-
"files": [
29-
"dist/*",
30-
"src/*"
31-
],
32-
"license": "Apache-2.0",
33-
"main": "./dist/cjs/exports/thirdweb.js",
34-
"module": "./dist/esm/exports/thirdweb.js",
35-
"name": "@thirdweb-dev/vault-sdk",
36-
"peerDependencies": {
37-
"typescript": ">=5.0.4"
38-
},
39-
"peerDependenciesMeta": {
40-
"typescript": {
41-
"optional": true
42-
}
43-
},
44-
"repository": {
45-
"type": "git",
46-
"url": "git+https://github.com/thirdweb-dev/js.git#main"
47-
},
48-
"scripts": {
49-
"build": "pnpm clean && pnpm build:cjs && pnpm build:esm && pnpm build:types",
50-
"build:cjs": "tsc --project ./tsconfig.build.json --module commonjs --outDir ./dist/cjs --verbatimModuleSyntax false && printf '{\"type\":\"commonjs\"}' > ./dist/cjs/package.json",
51-
"build:esm": "tsc --project ./tsconfig.build.json --module es2020 --outDir ./dist/esm && printf '{\"type\": \"module\",\"sideEffects\":false}' > ./dist/esm/package.json",
52-
"build:types": "tsc --project ./tsconfig.build.json --module esnext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap",
53-
"clean": "rimraf dist",
54-
"dev": "tsc --project ./tsconfig.build.json --module es2020 --outDir ./dist/esm --watch",
55-
"fix": "biome check ./src --fix",
56-
"format": "biome format ./src --write",
57-
"lint": "biome check ./src"
58-
},
59-
"type": "module",
60-
"types": "./dist/types/exports/thirdweb.d.ts",
61-
"typings": "./dist/types/exports/thirdweb.d.ts",
62-
"version": "0.0.3"
2+
"author": "thirdweb eng <[email protected]>",
3+
"bugs": {
4+
"url": "https://github.com/thirdweb-dev/js/issues"
5+
},
6+
"dependencies": {
7+
"@noble/ciphers": "^1.2.1",
8+
"@noble/curves": "1.8.2",
9+
"@noble/hashes": "1.7.2",
10+
"@solana/addresses": "^3.0.0",
11+
"@solana/keys": "^3.0.0",
12+
"@solana/transactions": "^3.0.0",
13+
"@solana/rpc": "^3.0.0",
14+
"abitype": "1.0.8",
15+
"jose": "6.0.11"
16+
},
17+
"devDependencies": {
18+
"@biomejs/biome": "2.0.6",
19+
"tsx": "^4.0.0",
20+
"rimraf": "6.0.1"
21+
},
22+
"engines": {
23+
"node": ">=18"
24+
},
25+
"exports": {
26+
".": {
27+
"types": "./dist/types/exports/thirdweb.d.ts",
28+
"import": "./dist/esm/exports/thirdweb.js",
29+
"default": "./dist/cjs/exports/thirdweb.js"
30+
},
31+
"./package.json": "./package.json"
32+
},
33+
"files": [
34+
"dist/*",
35+
"src/*"
36+
],
37+
"license": "Apache-2.0",
38+
"main": "./dist/cjs/exports/thirdweb.js",
39+
"module": "./dist/esm/exports/thirdweb.js",
40+
"name": "@thirdweb-dev/vault-sdk",
41+
"peerDependencies": {
42+
"typescript": ">=5.0.4"
43+
},
44+
"peerDependenciesMeta": {
45+
"typescript": {
46+
"optional": true
47+
}
48+
},
49+
"repository": {
50+
"type": "git",
51+
"url": "git+https://github.com/thirdweb-dev/js.git#main"
52+
},
53+
"scripts": {
54+
"build": "pnpm clean && pnpm build:cjs && pnpm build:esm && pnpm build:types",
55+
"build:cjs": "tsc --project ./tsconfig.build.json --module commonjs --outDir ./dist/cjs --verbatimModuleSyntax false && printf '{\"type\":\"commonjs\"}' > ./dist/cjs/package.json",
56+
"build:esm": "tsc --project ./tsconfig.build.json --module es2020 --outDir ./dist/esm && printf '{\"type\": \"module\",\"sideEffects\":false}' > ./dist/esm/package.json",
57+
"build:types": "tsc --project ./tsconfig.build.json --module esnext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap",
58+
"clean": "rimraf dist",
59+
"test:solana": "tsx test-solana.ts",
60+
"dev": "tsc --project ./tsconfig.build.json --module es2020 --outDir ./dist/esm --watch",
61+
"fix": "biome check ./src --fix",
62+
"format": "biome format ./src --write",
63+
"lint": "biome check ./src"
64+
},
65+
"type": "module",
66+
"types": "./dist/types/exports/thirdweb.d.ts",
67+
"typings": "./dist/types/exports/thirdweb.d.ts",
68+
"version": "0.0.3"
6369
}

packages/vault-sdk/src/exports/thirdweb.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@ export {
33
createEoa,
44
createServiceAccount,
55
createSignedAccessToken,
6+
createSolanaAccount,
67
createVaultClient,
78
getServiceAccount,
89
listAccessTokens,
910
listEoas,
11+
listSolanaAccounts,
1012
ping,
1113
revokeAccessToken,
1214
rotateServiceAccount,
1315
signAuthorization,
1416
signMessage,
17+
signSolanaMessage,
18+
signSolanaTransaction,
1519
signStructuredMessage,
1620
signTransaction,
1721
signTypedData,
@@ -31,13 +35,15 @@ export type {
3135
CreateAccessTokenPayload,
3236
CreateEoaPayload,
3337
CreateServiceAccountPayload,
38+
CreateSolanaAccountPayload,
3439
EncryptedPayload,
3540
GenericPayload,
3641
GetAccessTokensData,
3742
GetAccessTokensOptions,
3843
GetServiceAccountPayload,
3944
ListAccessTokensPayload,
4045
ListEoaPayload,
46+
ListSolanaAccountsPayload,
4147
Payload,
4248
PingPayload,
4349
PolicyComponent,
@@ -49,6 +55,8 @@ export type {
4955
SignAuthorizationRules,
5056
SignedAuthorization,
5157
SignMessagePayload,
58+
SignSolanaMessagePayload,
59+
SignSolanaTransactionPayload,
5260
SignStructuredMessageData,
5361
SignStructuredMessageOptions,
5462
SignStructuredMessagePayload,

0 commit comments

Comments
 (0)