-
Notifications
You must be signed in to change notification settings - Fork 41
/
package.json
208 lines (208 loc) · 8.36 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
{
"name": "@switchboard-xyz/solana.js",
"version": "3.1.2",
"description": "A Typescript client to interact with Switchboard on Solana.",
"license": "MIT",
"author": "",
"type": "module",
"exports": {
".": {
"types": "./index.d.ts",
"import": "./index.js",
"require": "./index.cjs"
},
"./SwitchboardProgram": {
"types": "./SwitchboardProgram.d.ts",
"import": "./SwitchboardProgram.js",
"require": "./SwitchboardProgram.cjs"
},
"./TransactionObject": {
"types": "./TransactionObject.d.ts",
"import": "./TransactionObject.js",
"require": "./TransactionObject.cjs"
},
"./AggregatorAccount": {
"types": "./AggregatorAccount.d.ts",
"import": "./AggregatorAccount.js",
"require": "./AggregatorAccount.cjs"
},
"./generated": {
"types": "./generated.d.ts",
"import": "./generated.js",
"require": "./generated.cjs"
},
"./runner": {
"types": "./runner.d.ts",
"import": "./runner.js",
"require": "./runner.cjs"
},
"./generated/accounts": {
"types": "./generated/accounts.d.ts",
"import": "./generated/accounts.js",
"require": "./generated/accounts.cjs"
},
"./generated/instructions": {
"types": "./generated/instructions.d.ts",
"import": "./generated/instructions.js",
"require": "./generated/instructions.cjs"
},
"./generated/types": {
"types": "./generated/types.d.ts",
"import": "./generated/types.js",
"require": "./generated/types.cjs"
},
"./generated/oracle": {
"types": "./generated/oracle.d.ts",
"import": "./generated/oracle.js",
"require": "./generated/oracle.cjs"
},
"./generated/oracle/accounts": {
"types": "./generated/oracle/accounts.d.ts",
"import": "./generated/oracle/accounts.js",
"require": "./generated/oracle/accounts.cjs"
},
"./generated/oracle/instructions": {
"types": "./generated/oracle/instructions.d.ts",
"import": "./generated/oracle/instructions.js",
"require": "./generated/oracle/instructions.cjs"
},
"./generated/oracle/types": {
"types": "./generated/oracle/types.d.ts",
"import": "./generated/oracle/types.js",
"require": "./generated/oracle/types.cjs"
},
"./generated/attestation": {
"types": "./generated/attestation.d.ts",
"import": "./generated/attestation.js",
"require": "./generated/attestation.cjs"
},
"./generated/attestation/accounts": {
"types": "./generated/attestation/accounts.d.ts",
"import": "./generated/attestation/accounts.js",
"require": "./generated/attestation/accounts.cjs"
},
"./generated/attestation/instructions": {
"types": "./generated/attestation/instructions.d.ts",
"import": "./generated/attestation/instructions.js",
"require": "./generated/attestation/instructions.cjs"
},
"./generated/attestation/types": {
"types": "./generated/attestation/types.d.ts",
"import": "./generated/attestation/types.js",
"require": "./generated/attestation/types.cjs"
},
"./package.json": "./package.json"
},
"main": "./index.js",
"types": "./index.d.ts",
"files": [
"lib/",
"package.json",
"index.cjs",
"index.js",
"index.d.ts",
"SwitchboardProgram.cjs",
"SwitchboardProgram.js",
"SwitchboardProgram.d.ts",
"TransactionObject.cjs",
"TransactionObject.js",
"TransactionObject.d.ts",
"AggregatorAccount.cjs",
"AggregatorAccount.js",
"AggregatorAccount.d.ts",
"generated.cjs",
"generated.js",
"generated.d.ts",
"runner.cjs",
"runner.js",
"runner.d.ts",
"generated/accounts.cjs",
"generated/accounts.js",
"generated/accounts.d.ts",
"generated/instructions.cjs",
"generated/instructions.js",
"generated/instructions.d.ts",
"generated/types.cjs",
"generated/types.js",
"generated/types.d.ts",
"generated/oracle.cjs",
"generated/oracle.js",
"generated/oracle.d.ts",
"generated/oracle/accounts.cjs",
"generated/oracle/accounts.js",
"generated/oracle/accounts.d.ts",
"generated/oracle/instructions.cjs",
"generated/oracle/instructions.js",
"generated/oracle/instructions.d.ts",
"generated/oracle/types.cjs",
"generated/oracle/types.js",
"generated/oracle/types.d.ts",
"generated/attestation.cjs",
"generated/attestation.js",
"generated/attestation.d.ts",
"generated/attestation/accounts.cjs",
"generated/attestation/accounts.js",
"generated/attestation/accounts.d.ts",
"generated/attestation/instructions.cjs",
"generated/attestation/instructions.js",
"generated/attestation/instructions.d.ts",
"generated/attestation/types.cjs",
"generated/attestation/types.js",
"generated/attestation/types.d.ts"
],
"scripts": {
"build": "node esbuild.js",
"clean": "pnpm exec rimraf node_modules lib .turbo",
"close-functions": "tsx ./scripts/close-functions.ts",
"fix": "pnpm exec eslint --fix src",
"generate": "tsx ./scripts/generate-client.ts",
"keypair:create": "pnpm exec shx find ~/.config/solana/id.json || solana-keygen new -s --no-bip39-passphrase --outfile ~/.config/solana/id.json",
"lint": "pnpm exec eslint src",
"local:validator": "shx mkdir -p .anchor/test-ledger || true; solana-test-validator -q -r --ledger .anchor/test-ledger --mint $(solana-keygen pubkey ~/.config/solana/id.json) --bind-address 0.0.0.0 --url https://api.devnet.solana.com --rpc-port 8899 --clone SW1TCH7qEPTdLsDHRgPuMQjbQxKdH2aBStViMFnt64f `# programId` --clone 7nYabs9dUhvxYwdTnrWVBL9MYviKSfrEbdWCUbcnwkpF `# programDataAddress` --clone Fi8vncGpNKbq62gPo56G4toCehWNy77GgqGkTaAF5Lkk `# idlAddress` --clone sbattyXrzedoNATfc4L31wC9Mhxsi1BmFhTiN8gDshx `# sgxProgramId` --clone BzqtGXZPiDSinP4xMFgPf6FLgSa6iPufK4m4JJFgMnTK `# sgxProgramDataAddress` --clone 5MFs7RGTjLi1wtKNBFRtuLipCkkjs4YQwRRU9sjnbQbS `# sgxProgramState` --clone 5ExuoQR69trmKQfB95fDsUGsUrrChbGq9PFgt8qouncz `# sgxIdlAddress` --clone CyZuD7RPDcrqCGbNvLCyqk6Py9cEZTKmNKujfPi3ynDd `# programState` --clone 7hkp1xfPBcD2t1vZMoWWQPzipHVcXeLAAaiGXdPSfDie `# switchboardVault`",
"local:validator:mainnet": "solana-test-validator -q -r --ledger .anchor/test-ledger --mint $(solana-keygen pubkey ~/.config/solana/id.json) --bind-address 0.0.0.0 --rpc-port 8899 --url https://api.mainnet-beta.solana.com --clone SW1TCH7qEPTdLsDHRgPuMQjbQxKdH2aBStViMFnt64f --clone 7nYabs9dUhvxYwdTnrWVBL9MYviKSfrEbdWCUbcnwkpF --clone Fi8vncGpNKbq62gPo56G4toCehWNy77GgqGkTaAF5Lkk --clone sbattyXrzedoNATfc4L31wC9Mhxsi1BmFhTiN8gDshx --clone BzqtGXZPiDSinP4xMFgPf6FLgSa6iPufK4m4JJFgMnTK --clone 5MFs7RGTjLi1wtKNBFRtuLipCkkjs4YQwRRU9sjnbQbS --clone 5ExuoQR69trmKQfB95fDsUGsUrrChbGq9PFgt8qouncz --clone CyZuD7RPDcrqCGbNvLCyqk6Py9cEZTKmNKujfPi3ynDd --clone J7nSEX8ADf3pVVicd6yKy2Skvg8iLePEmkLUisAAaioD",
"localnet": "tsx ./scripts/localnet.ts",
"localnet:down": "kill -9 $(pgrep command solana-test-validator) || exit 0",
"test": "node ./node_modules/mocha/bin/mocha --loader=ts-node/esm --extension ts --timeout 60000 --exit",
"test:localnet": "SOLANA_LOCALNET=1 node ./node_modules/mocha/bin/mocha --exit",
"test:localnet:mainnet": "SWITCHBOARD_PROGRAM_ID=SW1TCH7qEPTdLsDHRgPuMQjbQxKdH2aBStViMFnt64f SOLANA_LOCALNET=1 SOLANA_CLUSTER=mainnet-beta node ./node_modules/mocha/bin/mocha --loader=ts-node/esm --extension ts --timeout 60000 --exit",
"watch": "pnpm exec tsc -p tsconfig.cjs.json --watch"
},
"pre-commit": [
"build"
],
"dependencies": {
"@coral-xyz/anchor": "^0.28.0",
"@coral-xyz/borsh": "^0.28.0",
"@solana/spl-token": "^0.3.8",
"@solana/web3.js": "^1.78.3",
"@switchboard-xyz/common": "^2.3.9",
"cron-validator": "^1.3.1",
"cross-fetch": "^4.0.0",
"dotenv": "^16.3.1",
"lodash": "^4.17.21",
"zod": "^3.22.2",
"zod-error": "^1.5.0"
},
"devDependencies": {
"@switchboard-xyz/eslint-config": "latest",
"@switchboard-xyz/oracle": "latest",
"@types/chai": "^4.3.5",
"@types/lodash": "^4.14.195",
"@types/mocha": "^10.0.1",
"@types/shelljs": "^0.8.12",
"anchor-client-gen": "^0.28.1",
"chai": "^4.3.7",
"chalk": "^4.1.2",
"esbuild": "^0.17.19",
"mocha": "^10.2.0",
"shelljs": "^0.8.5",
"ts-mocha": "^10.0.0",
"ts-node": "^10.9.1",
"tsx": "^3.12.7",
"typedoc": "^0.23.28"
},
"engines": {
"node": ">=16.0.0",
"npm": ">=7.0.0"
}
}