1.3.2 • Published 2 years ago

pyth-staking-api v1.3.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

The staking package includes a script for running the staking program on a Solana validator running inside docker. This validator is useful for testing programs that interact with the staking program via the Solana API. The script will additionally initialize these programs with some default data.

The general structure of this testing framework is a .app/scripts/setup_local.ts script that launches a localnet validator running on port 8899 and sets up some example accounts.

How to setup:

yarn setup

After these commands, a validator is running with the staking program deployed in the genesis block at the address : Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS

The validator gets deployed to localhost:8899 (websocket : localhost:8890). It runs in the foreground until the process gets killed. Example use :

const connection: Connection = new Connection("http://localhost:8899");

yarn setup also does the following things :

  • Initialize the configuration of the staking program
  • Airdrop sol to two hypothetical users Alice and Bob (two random private keys compatible with Phantom stored in app/keypairs)
  • Create the pyth token and airdrop it to Alice and Bob in their respective ATA (the pyth token mint pubkey is random and is also available in app/keypairs)
  • Alice and Bob deposit some tokens and lock them in a position
  • Update .env in the frontend directory
1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.1.32

2 years ago

1.2.12

2 years ago

1.2.13

2 years ago

1.2.10

2 years ago

1.2.11

2 years ago

1.2.16

2 years ago

1.2.17

2 years ago

1.2.14

2 years ago

1.2.15

2 years ago

1.2.9

2 years ago

1.1.29

2 years ago

1.1.28

2 years ago

1.1.30

2 years ago

1.1.31

2 years ago

1.1.16

2 years ago

1.1.15

2 years ago

1.1.14

2 years ago

1.1.19

2 years ago

1.1.18

2 years ago

1.1.17

2 years ago

1.1.23

2 years ago

1.1.22

2 years ago

1.1.21

2 years ago

1.1.20

2 years ago

1.1.27

2 years ago

1.1.26

2 years ago

1.1.25

2 years ago

1.1.24

2 years ago

1.1.13

2 years ago

1.1.12

2 years ago

1.1.11

2 years ago

1.1.10

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.0.9

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago