@liquid-af/sdk 1.0.3 → 1.0.5

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.
@@ -2098,8 +2098,7 @@
2098
2098
  "",
2099
2099
  "# Arguments",
2100
2100
  "* `init_amount_base` - Initial base token amount to deposit into the pool.",
2101
- "* `init_amount_quote` - Initial quote token amount to deposit into the pool.",
2102
- "* `creator` - Optional creator pubkey (for program-initiated migration pools)."
2101
+ "* `init_amount_quote` - Initial quote token amount to deposit into the pool."
2103
2102
  ],
2104
2103
  "discriminator": [
2105
2104
  24,
@@ -2115,9 +2114,7 @@
2115
2114
  {
2116
2115
  "name": "signer",
2117
2116
  "docs": [
2118
- "Token authority for the pool creator.",
2119
- "Must be Global Admin OR Allowed CPI Authority.",
2120
- "Signs for token transfers (base, quote) and LP burn."
2117
+ "Token authority for the pool creator. Signs for token transfers."
2121
2118
  ],
2122
2119
  "writable": true,
2123
2120
  "signer": true
@@ -2814,12 +2811,641 @@
2814
2811
  {
2815
2812
  "name": "init_amount_quote",
2816
2813
  "type": "u64"
2814
+ }
2815
+ ]
2816
+ },
2817
+ {
2818
+ "name": "create_migration_pool",
2819
+ "docs": [
2820
+ "Creates an AMM pool via bonding curve migration, locking all LP tokens.",
2821
+ "",
2822
+ "# Arguments",
2823
+ "* `init_amount_base` - Initial base token amount to deposit into the pool.",
2824
+ "* `init_amount_quote` - Initial quote token amount to deposit into the pool.",
2825
+ "* `creator` - The bonding curve creator's pubkey."
2826
+ ],
2827
+ "discriminator": [
2828
+ 61,
2829
+ 51,
2830
+ 187,
2831
+ 171,
2832
+ 82,
2833
+ 151,
2834
+ 52,
2835
+ 163
2836
+ ],
2837
+ "accounts": [
2838
+ {
2839
+ "name": "signer",
2840
+ "docs": [
2841
+ "Token authority — the bonding curve PDA that signs for token transfers.",
2842
+ "Must be the liquid program's PDA (validated via owner check)."
2843
+ ],
2844
+ "writable": true,
2845
+ "signer": true
2817
2846
  },
2818
2847
  {
2819
- "name": "creator",
2820
- "type": {
2821
- "option": "pubkey"
2848
+ "name": "payer",
2849
+ "docs": [
2850
+ "Rent payer for account initialization.",
2851
+ "Separate from signer because the bonding curve PDA cannot pay rent."
2852
+ ],
2853
+ "writable": true,
2854
+ "signer": true
2855
+ },
2856
+ {
2857
+ "name": "pool_state",
2858
+ "docs": [
2859
+ "Account to store the pool state."
2860
+ ],
2861
+ "writable": true,
2862
+ "pda": {
2863
+ "seeds": [
2864
+ {
2865
+ "kind": "const",
2866
+ "value": [
2867
+ 112,
2868
+ 111,
2869
+ 111,
2870
+ 108
2871
+ ]
2872
+ },
2873
+ {
2874
+ "kind": "account",
2875
+ "path": "base_mint"
2876
+ },
2877
+ {
2878
+ "kind": "account",
2879
+ "path": "quote_mint"
2880
+ }
2881
+ ]
2882
+ }
2883
+ },
2884
+ {
2885
+ "name": "lp_mint",
2886
+ "docs": [
2887
+ "Pool LP mint."
2888
+ ],
2889
+ "writable": true,
2890
+ "pda": {
2891
+ "seeds": [
2892
+ {
2893
+ "kind": "const",
2894
+ "value": [
2895
+ 112,
2896
+ 111,
2897
+ 111,
2898
+ 108,
2899
+ 95,
2900
+ 108,
2901
+ 112,
2902
+ 95,
2903
+ 109,
2904
+ 105,
2905
+ 110,
2906
+ 116
2907
+ ]
2908
+ },
2909
+ {
2910
+ "kind": "account",
2911
+ "path": "pool_state"
2912
+ }
2913
+ ]
2914
+ }
2915
+ },
2916
+ {
2917
+ "name": "creator_base",
2918
+ "docs": [
2919
+ "Creator base account (bonding curve's token ATA)."
2920
+ ],
2921
+ "writable": true
2922
+ },
2923
+ {
2924
+ "name": "creator_quote",
2925
+ "docs": [
2926
+ "Creator quote account (bonding curve's WSOL/quote ATA)."
2927
+ ],
2928
+ "writable": true
2929
+ },
2930
+ {
2931
+ "name": "base_vault",
2932
+ "docs": [
2933
+ "Base vault for the pool."
2934
+ ],
2935
+ "writable": true,
2936
+ "pda": {
2937
+ "seeds": [
2938
+ {
2939
+ "kind": "const",
2940
+ "value": [
2941
+ 112,
2942
+ 111,
2943
+ 111,
2944
+ 108,
2945
+ 95,
2946
+ 118,
2947
+ 97,
2948
+ 117,
2949
+ 108,
2950
+ 116
2951
+ ]
2952
+ },
2953
+ {
2954
+ "kind": "account",
2955
+ "path": "pool_state"
2956
+ },
2957
+ {
2958
+ "kind": "account",
2959
+ "path": "base_mint"
2960
+ }
2961
+ ]
2962
+ }
2963
+ },
2964
+ {
2965
+ "name": "quote_vault",
2966
+ "docs": [
2967
+ "Quote vault for the pool."
2968
+ ],
2969
+ "writable": true,
2970
+ "pda": {
2971
+ "seeds": [
2972
+ {
2973
+ "kind": "const",
2974
+ "value": [
2975
+ 112,
2976
+ 111,
2977
+ 111,
2978
+ 108,
2979
+ 95,
2980
+ 118,
2981
+ 97,
2982
+ 117,
2983
+ 108,
2984
+ 116
2985
+ ]
2986
+ },
2987
+ {
2988
+ "kind": "account",
2989
+ "path": "pool_state"
2990
+ },
2991
+ {
2992
+ "kind": "account",
2993
+ "path": "quote_mint"
2994
+ }
2995
+ ]
2996
+ }
2997
+ },
2998
+ {
2999
+ "name": "observation_state",
3000
+ "docs": [
3001
+ "Account to store oracle observations."
3002
+ ],
3003
+ "writable": true,
3004
+ "pda": {
3005
+ "seeds": [
3006
+ {
3007
+ "kind": "const",
3008
+ "value": [
3009
+ 111,
3010
+ 98,
3011
+ 115,
3012
+ 101,
3013
+ 114,
3014
+ 118,
3015
+ 97,
3016
+ 116,
3017
+ 105,
3018
+ 111,
3019
+ 110
3020
+ ]
3021
+ },
3022
+ {
3023
+ "kind": "account",
3024
+ "path": "pool_state"
3025
+ }
3026
+ ]
3027
+ }
3028
+ },
3029
+ {
3030
+ "name": "buyback_vault",
3031
+ "docs": [
3032
+ "Buyback vault for Revoked-mode creator fee accumulation (buy-and-burn)."
3033
+ ],
3034
+ "writable": true,
3035
+ "pda": {
3036
+ "seeds": [
3037
+ {
3038
+ "kind": "const",
3039
+ "value": [
3040
+ 98,
3041
+ 117,
3042
+ 121,
3043
+ 98,
3044
+ 97,
3045
+ 99,
3046
+ 107,
3047
+ 95,
3048
+ 118,
3049
+ 97,
3050
+ 117,
3051
+ 108,
3052
+ 116
3053
+ ]
3054
+ },
3055
+ {
3056
+ "kind": "account",
3057
+ "path": "pool_state"
3058
+ },
3059
+ {
3060
+ "kind": "account",
3061
+ "path": "quote_mint"
3062
+ }
3063
+ ]
2822
3064
  }
3065
+ },
3066
+ {
3067
+ "name": "token_volume",
3068
+ "docs": [
3069
+ "Token volume accumulator from liquid-state."
3070
+ ],
3071
+ "writable": true,
3072
+ "pda": {
3073
+ "seeds": [
3074
+ {
3075
+ "kind": "const",
3076
+ "value": [
3077
+ 116,
3078
+ 111,
3079
+ 107,
3080
+ 101,
3081
+ 110,
3082
+ 95,
3083
+ 118,
3084
+ 111,
3085
+ 108,
3086
+ 117,
3087
+ 109,
3088
+ 101
3089
+ ]
3090
+ },
3091
+ {
3092
+ "kind": "account",
3093
+ "path": "base_mint"
3094
+ }
3095
+ ],
3096
+ "program": {
3097
+ "kind": "const",
3098
+ "value": [
3099
+ 6,
3100
+ 161,
3101
+ 216,
3102
+ 199,
3103
+ 206,
3104
+ 40,
3105
+ 40,
3106
+ 163,
3107
+ 177,
3108
+ 19,
3109
+ 1,
3110
+ 21,
3111
+ 164,
3112
+ 67,
3113
+ 81,
3114
+ 132,
3115
+ 164,
3116
+ 22,
3117
+ 81,
3118
+ 177,
3119
+ 201,
3120
+ 45,
3121
+ 170,
3122
+ 138,
3123
+ 70,
3124
+ 214,
3125
+ 218,
3126
+ 76,
3127
+ 85,
3128
+ 222,
3129
+ 216,
3130
+ 214
3131
+ ]
3132
+ }
3133
+ }
3134
+ },
3135
+ {
3136
+ "name": "fee_config",
3137
+ "docs": [
3138
+ "Fee config PDA (from liquid-fees). Already initialized during bonding curve creation."
3139
+ ],
3140
+ "writable": true,
3141
+ "pda": {
3142
+ "seeds": [
3143
+ {
3144
+ "kind": "const",
3145
+ "value": [
3146
+ 102,
3147
+ 101,
3148
+ 101,
3149
+ 95,
3150
+ 99,
3151
+ 111,
3152
+ 110,
3153
+ 102,
3154
+ 105,
3155
+ 103
3156
+ ]
3157
+ },
3158
+ {
3159
+ "kind": "account",
3160
+ "path": "base_mint"
3161
+ },
3162
+ {
3163
+ "kind": "account",
3164
+ "path": "quote_mint"
3165
+ }
3166
+ ],
3167
+ "program": {
3168
+ "kind": "const",
3169
+ "value": [
3170
+ 217,
3171
+ 168,
3172
+ 237,
3173
+ 183,
3174
+ 0,
3175
+ 44,
3176
+ 187,
3177
+ 171,
3178
+ 53,
3179
+ 87,
3180
+ 202,
3181
+ 162,
3182
+ 64,
3183
+ 131,
3184
+ 189,
3185
+ 106,
3186
+ 187,
3187
+ 249,
3188
+ 130,
3189
+ 171,
3190
+ 56,
3191
+ 202,
3192
+ 127,
3193
+ 190,
3194
+ 143,
3195
+ 121,
3196
+ 30,
3197
+ 195,
3198
+ 25,
3199
+ 86,
3200
+ 241,
3201
+ 242
3202
+ ]
3203
+ }
3204
+ }
3205
+ },
3206
+ {
3207
+ "name": "fee_vault",
3208
+ "docs": [
3209
+ "Fee vault PDA (from liquid-fees)."
3210
+ ],
3211
+ "writable": true,
3212
+ "pda": {
3213
+ "seeds": [
3214
+ {
3215
+ "kind": "const",
3216
+ "value": [
3217
+ 102,
3218
+ 101,
3219
+ 101,
3220
+ 95,
3221
+ 118,
3222
+ 97,
3223
+ 117,
3224
+ 108,
3225
+ 116
3226
+ ]
3227
+ },
3228
+ {
3229
+ "kind": "account",
3230
+ "path": "fee_config"
3231
+ }
3232
+ ],
3233
+ "program": {
3234
+ "kind": "const",
3235
+ "value": [
3236
+ 217,
3237
+ 168,
3238
+ 237,
3239
+ 183,
3240
+ 0,
3241
+ 44,
3242
+ 187,
3243
+ 171,
3244
+ 53,
3245
+ 87,
3246
+ 202,
3247
+ 162,
3248
+ 64,
3249
+ 131,
3250
+ 189,
3251
+ 106,
3252
+ 187,
3253
+ 249,
3254
+ 130,
3255
+ 171,
3256
+ 56,
3257
+ 202,
3258
+ 127,
3259
+ 190,
3260
+ 143,
3261
+ 121,
3262
+ 30,
3263
+ 195,
3264
+ 25,
3265
+ 86,
3266
+ 241,
3267
+ 242
3268
+ ]
3269
+ }
3270
+ }
3271
+ },
3272
+ {
3273
+ "name": "global_config",
3274
+ "docs": [
3275
+ "Global configuration for the protocol."
3276
+ ],
3277
+ "pda": {
3278
+ "seeds": [
3279
+ {
3280
+ "kind": "const",
3281
+ "value": [
3282
+ 103,
3283
+ 108,
3284
+ 111,
3285
+ 98,
3286
+ 97,
3287
+ 108,
3288
+ 95,
3289
+ 99,
3290
+ 111,
3291
+ 110,
3292
+ 102,
3293
+ 105,
3294
+ 103
3295
+ ]
3296
+ }
3297
+ ]
3298
+ }
3299
+ },
3300
+ {
3301
+ "name": "authority",
3302
+ "docs": [
3303
+ "Pool vault and LP mint authority."
3304
+ ],
3305
+ "pda": {
3306
+ "seeds": [
3307
+ {
3308
+ "kind": "const",
3309
+ "value": [
3310
+ 118,
3311
+ 97,
3312
+ 117,
3313
+ 108,
3314
+ 116,
3315
+ 95,
3316
+ 97,
3317
+ 110,
3318
+ 100,
3319
+ 95,
3320
+ 108,
3321
+ 112,
3322
+ 95,
3323
+ 109,
3324
+ 105,
3325
+ 110,
3326
+ 116,
3327
+ 95,
3328
+ 97,
3329
+ 117,
3330
+ 116,
3331
+ 104,
3332
+ 95,
3333
+ 115,
3334
+ 101,
3335
+ 101,
3336
+ 100
3337
+ ]
3338
+ }
3339
+ ]
3340
+ }
3341
+ },
3342
+ {
3343
+ "name": "base_mint",
3344
+ "docs": [
3345
+ "Base mint (Variable token)."
3346
+ ]
3347
+ },
3348
+ {
3349
+ "name": "quote_mint",
3350
+ "docs": [
3351
+ "Quote mint"
3352
+ ]
3353
+ },
3354
+ {
3355
+ "name": "cpi_authority",
3356
+ "docs": [
3357
+ "CPI authority PDA — proves this program's identity in cross-program calls."
3358
+ ],
3359
+ "pda": {
3360
+ "seeds": [
3361
+ {
3362
+ "kind": "const",
3363
+ "value": [
3364
+ 99,
3365
+ 112,
3366
+ 105,
3367
+ 95,
3368
+ 97,
3369
+ 117,
3370
+ 116,
3371
+ 104,
3372
+ 111,
3373
+ 114,
3374
+ 105,
3375
+ 116,
3376
+ 121
3377
+ ]
3378
+ }
3379
+ ]
3380
+ }
3381
+ },
3382
+ {
3383
+ "name": "liquid_state_program",
3384
+ "docs": [
3385
+ "Liquid state program for token volume CPI."
3386
+ ],
3387
+ "address": "State3HtEfi7cXdsTpAtRoBvrij8zSFCiGTAVWmYH2d"
3388
+ },
3389
+ {
3390
+ "name": "liquid_fees_program",
3391
+ "docs": [
3392
+ "Liquid fees program for fee configuration CPI."
3393
+ ],
3394
+ "address": "FeesZQLb1xTeZbvaFRGnqzrZYzzmQtwhTYKQphbNGQru"
3395
+ },
3396
+ {
3397
+ "name": "liquid_events_program",
3398
+ "docs": [
3399
+ "Liquid events program for CPI event emission."
3400
+ ],
3401
+ "address": "EventsQeXA43nLKR69DhHwNsJ6aM512AweMCgG3wG8zG"
3402
+ },
3403
+ {
3404
+ "name": "token_program",
3405
+ "docs": [
3406
+ "Program to create mint account and mint tokens."
3407
+ ],
3408
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
3409
+ },
3410
+ {
3411
+ "name": "base_token_program",
3412
+ "docs": [
3413
+ "SPL token program or token program 2022 for base."
3414
+ ]
3415
+ },
3416
+ {
3417
+ "name": "quote_token_program",
3418
+ "docs": [
3419
+ "SPL token program or token program 2022 for quote."
3420
+ ]
3421
+ },
3422
+ {
3423
+ "name": "associated_token_program",
3424
+ "docs": [
3425
+ "Program to create an ATA for receiving position NFT."
3426
+ ],
3427
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
3428
+ },
3429
+ {
3430
+ "name": "system_program",
3431
+ "docs": [
3432
+ "To create a new program account."
3433
+ ],
3434
+ "address": "11111111111111111111111111111111"
3435
+ }
3436
+ ],
3437
+ "args": [
3438
+ {
3439
+ "name": "init_amount_base",
3440
+ "type": "u64"
3441
+ },
3442
+ {
3443
+ "name": "init_amount_quote",
3444
+ "type": "u64"
3445
+ },
3446
+ {
3447
+ "name": "creator",
3448
+ "type": "pubkey"
2823
3449
  }
2824
3450
  ]
2825
3451
  },