Skip to content

Commit b2c4075

Browse files
authored
Update sdk (#20)
* update sdk generation to latest solita and add depositStake function * export depositStake from package
1 parent c25dd81 commit b2c4075

33 files changed

+2415
-1803
lines changed

.solitarc.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const path = require('path');
22
const programDir = path.join(__dirname, 'program');
3-
const idlDir = path.join(__dirname, 'program', 'idl');
4-
const sdkDir = path.join(__dirname, 'js', 'src', 'generated');
3+
const idlDir = path.join(__dirname, 'package', 'idl');
4+
const sdkDir = path.join(__dirname, 'package', 'src', 'generated');
55
const binaryInstallDir = path.join(__dirname, '.crates');
66

77
module.exports = {
@@ -12,5 +12,9 @@ module.exports = {
1212
sdkDir,
1313
binaryInstallDir,
1414
programDir,
15-
removeExistingIdl: false,
15+
removeExistingIdl: true,
16+
typeAliases: {
17+
PodU64: "u64",
18+
PodU32: "u32",
19+
}
1620
};

README.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A Solana program intended to become the `stake_deposit_authority` of a StakePool
44

55
More information in the Jito governance forum [here](https://forum.jito.network/t/jip-9-adopt-interceptor-liquidity-defense/444).
66

7-
## State
7+
## Program State
88

99
```rust
1010
// PDA derived from stake_pool pubkey
@@ -83,3 +83,14 @@ pub struct DepositReceipt {
8383
### UpdateOwner
8484

8585
*Let the owner of the DepositReceipt update who can claim the tokens.*
86+
87+
## IDL and SDK generation
88+
This program uses Shank for IDL generation and Solita for SDK generation.
89+
90+
Install Shank
91+
`cargo install shank-cli`
92+
Install Solita
93+
`yarn global add @metaplex-foundation/solita`
94+
95+
Run Solita
96+
`solita`

generate-sdk.js

-16
This file was deleted.

js/src/generated/instructions/DepositStake.ts

-100
This file was deleted.

js/src/generated/instructions/DepositStakeWithSlippage.ts

-100
This file was deleted.

0 commit comments

Comments
 (0)