@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.
- package/README.md +8 -9
- package/dist/index.cjs +526 -98
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +595 -93
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +595 -93
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +526 -98
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dex/generated/accounts/globalConfig.ts +39 -2
- package/src/dex/generated/accounts/pool.ts +41 -2
- package/src/dex/generated/accounts/rewardAccrual.ts +39 -2
- package/src/dex/generated/index.ts +1 -0
- package/src/dex/generated/shared/index.ts +52 -0
- package/src/dex/trade.ts +12 -13
- package/src/launchpad/create.ts +8 -8
- package/src/launchpad/generated/accounts/bondingCurve.ts +39 -2
- package/src/launchpad/generated/accounts/globalConfig.ts +39 -2
- package/src/launchpad/generated/accounts/rewardAccrual.ts +39 -2
- package/src/launchpad/generated/index.ts +1 -0
- package/src/launchpad/generated/shared/index.ts +52 -0
- package/src/launchpad/migrate.ts +1 -1
- package/src/launchpad/trade.ts +15 -15
- package/src/math/amm.ts +40 -33
- package/src/math/fee-decay.ts +3 -2
- package/src/math/fees.ts +4 -2
- package/src/math/internal.ts +1 -1
- package/src/nexus/fee-helpers.ts +5 -3
- package/src/nexus/generated/accounts/altRegistry.ts +41 -2
- package/src/nexus/generated/accounts/creatorFeeConfig.ts +39 -2
- package/src/nexus/generated/accounts/feePreset.ts +41 -2
- package/src/nexus/generated/accounts/globalConfig.ts +39 -2
- package/src/nexus/generated/accounts/partnerConfig.ts +39 -2
- package/src/nexus/generated/accounts/partnerMetadata.ts +39 -2
- package/src/nexus/generated/accounts/rewardState.ts +41 -2
- package/src/nexus/generated/accounts/stakingConfig.ts +39 -2
- package/src/nexus/generated/accounts/userRewardDebt.ts +39 -2
- package/src/nexus/generated/accounts/userStakePosition.ts +39 -2
- package/src/nexus/generated/index.ts +1 -0
- package/src/nexus/generated/shared/index.ts +52 -0
- package/src/nexus/staking.ts +45 -41
- package/src/platform.ts +2 -2
- package/src/transfer-fee.ts +19 -17
- package/src/utils/chunk.ts +1 -1
- package/src/utils/creator-hash.ts +6 -3
- package/src/utils/index.ts +2 -0
- package/src/utils/mint-info.ts +8 -7
- package/src/utils/partner.ts +1 -1
- 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
|
-
|
|
20
|
-
`@solana/
|
|
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
|
|
25
|
-
|
|
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
|
-
-
|
|
30
|
-
|
|
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
|
-
-
|
|
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
|
|