@meteora-ag/dynamic-bonding-curve-sdk 1.1.1 → 1.1.2

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/CHANGELOG.md ADDED
@@ -0,0 +1,47 @@
1
+ # Changelog
2
+
3
+ ## [1.1.1-rc.9] - 2025-04-29
4
+
5
+ ### Release Notes
6
+
7
+ #### Feature Changes
8
+
9
+ - feat: added 4% and 6% graduation fee options
10
+ - feat: creatorWithdrawSurplus and claimCreatorTradingFee functions
11
+ - feat: added new getter functions
12
+ - fix: updated the way the services are called
13
+ - fix: updated the way the getters are called
14
+
15
+ #### Breaking Changes
16
+
17
+ - `createConfig`, `buildCurveAndCreateConfig` and `buildCurveAndCreateConfigByMarketCap` functions now require a `creatorTradingFeePercentage` parameter.
18
+ - IDL includes `creatorWithdrawSurplus` and `claimCreatorTradingFee` instructions.
19
+ - Partner, Migration, Creator and Pool functions are now called in this manner:
20
+ - `client.partners.createConfig` -> `client.partner.createConfig`
21
+ - `client.migrations.migrateToDammV1` -> `client.migration.migrateToDammV1`
22
+ - `client.creators.createPoolMetadata` -> `client.creator.createPoolMetadata`
23
+ - `client.pools.swap` -> `client.pool.swap`
24
+ - Getter functions are now called in this manner:
25
+ - `client.getProgram().getPoolConfig` -> `client.getPoolConfig`
26
+
27
+ ## [1.1.2] - 2025-04-30
28
+
29
+ ### Release Notes
30
+
31
+ #### Feature Changes
32
+
33
+ - feat: refactor SDK to be more modular and optimise RPC calls
34
+ - feat: added `createPoolAndBuy` function
35
+
36
+ #### Breaking Changes
37
+
38
+ - Partner, Migration, Creator, Pool and State functions are now called in this manner:
39
+ - `client.partners.createConfig` -> `client.partner.createConfig`
40
+ - `client.migrations.migrateToDammV1` -> `client.migration.migrateToDammV1`
41
+ - `client.creators.createPoolMetadata` -> `client.creator.createPoolMetadata`
42
+ - `client.pools.swap` -> `client.pool.swap`
43
+ - `client.getPoolConfig` -> `client.state.getPoolConfig`
44
+ - In order to get the DBC Pool Address, or DAMM V1 Pool Address, or DAMM V2 Pool Address, use the following functions (the order matters):
45
+ - `deriveDbcPoolAddress`
46
+ - `deriveDammV1PoolAddress`
47
+ - `deriveDammV2PoolAddress`
package/README.md CHANGED
@@ -9,6 +9,8 @@ This SDK provides a set of tools and methods to interact with the [Meteora Dynam
9
9
  ## Installation
10
10
 
11
11
  ```bash
12
+ npm install @meteora-ag/dynamic-bonding-curve-sdk
13
+ # or
12
14
  pnpm install @meteora-ag/dynamic-bonding-curve-sdk
13
15
  # or
14
16
  yarn add @meteora-ag/dynamic-bonding-curve-sdk
@@ -16,17 +18,27 @@ yarn add @meteora-ag/dynamic-bonding-curve-sdk
16
18
 
17
19
  ## Initialization
18
20
 
19
- ```bash
20
- import { Connection } from "@solana/web3.js";
21
- import { DynamicBondingCurveClient } from "@meteora-ag/dynamic-bonding-curve-sdk";
21
+ ```typescript
22
+ import { Connection } from '@solana/web3.js'
23
+ import { DynamicBondingCurveClient } from '@meteora-ag/dynamic-bonding-curve-sdk'
22
24
 
23
25
  const connection = new Connection('https://api.mainnet-beta.solana.com')
24
- const client = new DynamicBondingCurveClient(connection)
26
+ const client = new DynamicBondingCurveClient(connection, 'confirmed')
25
27
  ```
26
28
 
27
29
  ## Usage
28
30
 
29
- Refer to the [docs](./docs.md) for more information.
31
+ Refer to the [docs](./docs.md) for how to use the functions.
32
+
33
+ ## Flow
34
+
35
+ The generic flow of how Dynamic Bonding Curve works is as follows:
36
+
37
+ 1. The partner creates a config key for the pool.
38
+ 2. The creator creates a pool.
39
+ 3. The pool is tradeable on the Dynamic Bonding Curve.
40
+ 4. Meteora's migrator service migrates the pool to either DAMM V1 or DAMM V2 based on the config key once the migration quote threshold is met.
41
+ 5. The graduated pool is tradeable on either DAMM V1 or DAMM V2.
30
42
 
31
43
  ### Test
32
44
 
@@ -40,18 +52,22 @@ bun test
40
52
  - Mainnet-beta: dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN
41
53
  - Devnet: dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN
42
54
 
43
- ### Config key for migration
55
+ ### Graduated DAMM Pool Config Keys
44
56
 
45
57
  #### DAMM V1:
46
58
 
47
- - migration_fee_option == 0: 8f848CEy8eY6PhJ3VcemtBDzPPSD4Vq7aJczLZ3o8MmX
48
- - migration_fee_option == 1: HBxB8Lf14Yj8pqeJ8C4qDb5ryHL7xwpuykz31BLNYr7S
49
- - migration_fee_option == 2: 7v5vBdUQHTNeqk1HnduiXcgbvCyVEZ612HLmYkQoAkik
50
- - migration_fee_option == 3: EkvP7d5yKxovj884d2DwmBQbrHUWRLGK6bympzrkXGja
59
+ - MigrationFeeOption.FixedBps25 == 0: 8f848CEy8eY6PhJ3VcemtBDzPPSD4Vq7aJczLZ3o8MmX
60
+ - MigrationFeeOption.FixedBps30 == 1: HBxB8Lf14Yj8pqeJ8C4qDb5ryHL7xwpuykz31BLNYr7S
61
+ - MigrationFeeOption.FixedBps100 == 2: 7v5vBdUQHTNeqk1HnduiXcgbvCyVEZ612HLmYkQoAkik
62
+ - MigrationFeeOption.FixedBps200 == 3: EkvP7d5yKxovj884d2DwmBQbrHUWRLGK6bympzrkXGja
63
+ - MigrationFeeOption.FixedBps400 == 4: 9EZYAJrcqNWNQzP2trzZesP7XKMHA1jEomHzbRsdX8R2
64
+ - MigrationFeeOption.FixedBps600 == 5: 8cdKo87jZU2R12KY1BUjjRPwyjgdNjLGqSGQyrDshhud
51
65
 
52
66
  #### DAMM V2:
53
67
 
54
- - migration_fee_option == 0: 7F6dnUcRuyM2TwR8myT1dYypFXpPSxqwKNSFNkxyNESd
55
- - migration_fee_option == 1: 2nHK1kju6XjphBLbNxpM5XRGFj7p9U8vvNzyZiha1z6k
56
- - migration_fee_option == 2: Hv8Lmzmnju6m7kcokVKvwqz7QPmdX9XfKjJsXz8RXcjp
57
- - migration_fee_option == 3: 2c4cYd4reUYVRAB9kUUkrq55VPyy2FNQ3FDL4o12JXmq
68
+ - MigrationFeeOption.FixedBps25 == 0: 7F6dnUcRuyM2TwR8myT1dYypFXpPSxqwKNSFNkxyNESd
69
+ - MigrationFeeOption.FixedBps30 == 1: 2nHK1kju6XjphBLbNxpM5XRGFj7p9U8vvNzyZiha1z6k
70
+ - MigrationFeeOption.FixedBps100 == 2: Hv8Lmzmnju6m7kcokVKvwqz7QPmdX9XfKjJsXz8RXcjp
71
+ - MigrationFeeOption.FixedBps200 == 3: 2c4cYd4reUYVRAB9kUUkrq55VPyy2FNQ3FDL4o12JXmq
72
+ - MigrationFeeOption.FixedBps400 == 4: AkmQWebAwFvWk55wBoCr5D62C6VVDTzi84NJuD9H7cFD
73
+ - MigrationFeeOption.FixedBps600 == 5: DbCRBj8McvPYHJG1ukj8RE15h2dCNUdTAESG49XpQ44u