@send-fun/sdk 1.1.0 → 1.2.0

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.
Files changed (50) hide show
  1. package/README.md +8 -9
  2. package/dist/index.cjs +526 -98
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +595 -93
  5. package/dist/index.d.cts.map +1 -1
  6. package/dist/index.d.mts +595 -93
  7. package/dist/index.d.mts.map +1 -1
  8. package/dist/index.mjs +526 -98
  9. package/dist/index.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/src/dex/generated/accounts/globalConfig.ts +39 -2
  12. package/src/dex/generated/accounts/pool.ts +41 -2
  13. package/src/dex/generated/accounts/rewardAccrual.ts +39 -2
  14. package/src/dex/generated/index.ts +1 -0
  15. package/src/dex/generated/shared/index.ts +52 -0
  16. package/src/dex/trade.ts +12 -13
  17. package/src/launchpad/create.ts +8 -8
  18. package/src/launchpad/generated/accounts/bondingCurve.ts +39 -2
  19. package/src/launchpad/generated/accounts/globalConfig.ts +39 -2
  20. package/src/launchpad/generated/accounts/rewardAccrual.ts +39 -2
  21. package/src/launchpad/generated/index.ts +1 -0
  22. package/src/launchpad/generated/shared/index.ts +52 -0
  23. package/src/launchpad/migrate.ts +1 -1
  24. package/src/launchpad/trade.ts +15 -15
  25. package/src/math/amm.ts +40 -33
  26. package/src/math/fee-decay.ts +3 -2
  27. package/src/math/fees.ts +4 -2
  28. package/src/math/internal.ts +1 -1
  29. package/src/nexus/fee-helpers.ts +5 -3
  30. package/src/nexus/generated/accounts/altRegistry.ts +41 -2
  31. package/src/nexus/generated/accounts/creatorFeeConfig.ts +39 -2
  32. package/src/nexus/generated/accounts/feePreset.ts +41 -2
  33. package/src/nexus/generated/accounts/globalConfig.ts +39 -2
  34. package/src/nexus/generated/accounts/partnerConfig.ts +39 -2
  35. package/src/nexus/generated/accounts/partnerMetadata.ts +39 -2
  36. package/src/nexus/generated/accounts/rewardState.ts +41 -2
  37. package/src/nexus/generated/accounts/stakingConfig.ts +39 -2
  38. package/src/nexus/generated/accounts/userRewardDebt.ts +39 -2
  39. package/src/nexus/generated/accounts/userStakePosition.ts +39 -2
  40. package/src/nexus/generated/index.ts +1 -0
  41. package/src/nexus/generated/shared/index.ts +52 -0
  42. package/src/nexus/staking.ts +45 -41
  43. package/src/platform.ts +2 -2
  44. package/src/transfer-fee.ts +19 -17
  45. package/src/utils/chunk.ts +1 -1
  46. package/src/utils/creator-hash.ts +6 -3
  47. package/src/utils/index.ts +2 -0
  48. package/src/utils/mint-info.ts +8 -7
  49. package/src/utils/partner.ts +1 -1
  50. package/src/utils/pda.ts +1 -1
package/README.md CHANGED
@@ -16,21 +16,20 @@ pnpm add @send-fun/sdk @solana/kit
16
16
  ```
17
17
 
18
18
  `@solana/kit` is the only peer dependency: 6.x from 6.10.0, 7.x or 8.x. The SDK
19
- uses the `@solana/program-client-core` that your kit release ships, through
20
- `@solana/kit/program-client-core`, so do not install that package separately
21
- for it.
19
+ imports `@solana/program-client-core` through `@solana/kit/program-client-core`.
20
+ Do not install `@solana/program-client-core` for the SDK.
22
21
 
23
22
  That subpath needs `package.json` `exports` support: TypeScript
24
- `moduleResolution` set to `node16`, `nodenext` or `bundler` (not `node10`), and
25
- Metro 0.82 or later on React Native.
23
+ `moduleResolution` set to `node16`, `nodenext` or `bundler`, and Metro 0.82 or
24
+ later on React Native.
26
25
 
27
26
  ## Rules
28
27
 
29
- - Read `platformConfig` from the bonding curve or the pool. Do not use your own
30
- platform key.
28
+ - To trade, read `platformConfig` from the bonding curve or the pool.
29
+ - To create a token, get your platform key with
30
+ `platform.findPlatformAddress(slug)`.
31
31
  - A partner other than `constants.DEFAULT_PARTNER` must sign.
32
- - Get a platform key with `platform.findPlatformAddress(slug)`.
33
- - Do not edit the `generated` modules. They come from the program IDLs.
32
+ - The `generated` modules come from the program IDLs. Do not edit them.
34
33
 
35
34
  ## Documentation
36
35