@streamflow/stream 8.1.0 → 8.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 (32) hide show
  1. package/dist/cjs/{BaseStreamClient-t7I4NOSm.d.cts → BaseStreamClient-CrOrYUEv.d.cts} +2 -0
  2. package/dist/cjs/aptos/index.d.cts +2 -2
  3. package/dist/cjs/evm/index.d.cts +2 -2
  4. package/dist/cjs/{index-BRL3w_PW.d.cts → index-Bfl2ORyG.d.cts} +1 -1
  5. package/dist/cjs/{index-kcFtmz7O.d.cts → index-CEGRqEY6.d.cts} +1 -1
  6. package/dist/cjs/{index-DU0JxxIj.d.cts → index-CGiXzafU.d.cts} +1 -1
  7. package/dist/cjs/{index-IHOpuPSg.d.cts → index-h2__-B-1.d.cts} +1 -1
  8. package/dist/cjs/index.cjs +321 -68
  9. package/dist/cjs/index.cjs.map +1 -1
  10. package/dist/cjs/index.d.cts +10 -10
  11. package/dist/cjs/solana/descriptor/streamflow_aligned_unlocks.d.cts +766 -517
  12. package/dist/cjs/solana/index.cjs +321 -68
  13. package/dist/cjs/solana/index.cjs.map +1 -1
  14. package/dist/cjs/solana/index.d.cts +2 -2
  15. package/dist/cjs/sui/index.d.cts +2 -2
  16. package/dist/esm/{BaseStreamClient-t7I4NOSm.d.ts → BaseStreamClient-CrOrYUEv.d.ts} +2 -0
  17. package/dist/esm/aptos/index.d.ts +2 -2
  18. package/dist/esm/evm/index.d.ts +2 -2
  19. package/dist/esm/{index-BGOG6wUc.d.ts → index-5ngU1FTN.d.ts} +1 -1
  20. package/dist/esm/{index-C81Z69-K.d.ts → index-DWj7zoqD.d.ts} +1 -1
  21. package/dist/esm/{index-BfQ0dUgG.d.ts → index-DZXjfaVc.d.ts} +1 -1
  22. package/dist/esm/{index-B2txI-oF.d.ts → index-DoPKUkBc.d.ts} +1 -1
  23. package/dist/esm/index.d.ts +10 -10
  24. package/dist/esm/index.js +321 -68
  25. package/dist/esm/index.js.map +1 -1
  26. package/dist/esm/solana/descriptor/idl/streamflow_aligned_unlocks.json +569 -80
  27. package/dist/esm/solana/descriptor/streamflow_aligned_unlocks.d.ts +766 -517
  28. package/dist/esm/solana/index.d.ts +2 -2
  29. package/dist/esm/solana/index.js +321 -68
  30. package/dist/esm/solana/index.js.map +1 -1
  31. package/dist/esm/sui/index.d.ts +2 -2
  32. package/package.json +4 -4
package/dist/esm/index.js CHANGED
@@ -3465,14 +3465,23 @@ var streamflow_aligned_unlocks_default = {
3465
3465
  address: "aSTRM2NKoKxNnkmLWk9sz3k74gKBk9t7bpPrTGxMszH",
3466
3466
  metadata: {
3467
3467
  name: "streamflow_aligned_unlocks",
3468
- version: "1.1.1",
3468
+ version: "1.2.0",
3469
3469
  spec: "0.1.0",
3470
3470
  description: "Proxy to update unlock amount within Streamflow vesting protocol according to Token performance and other metrics"
3471
3471
  },
3472
3472
  instructions: [
3473
3473
  {
3474
3474
  name: "cancel",
3475
- discriminator: [232, 219, 223, 41, 219, 236, 220, 190],
3475
+ discriminator: [
3476
+ 232,
3477
+ 219,
3478
+ 223,
3479
+ 41,
3480
+ 219,
3481
+ 236,
3482
+ 220,
3483
+ 190
3484
+ ],
3476
3485
  accounts: [
3477
3486
  {
3478
3487
  name: "sender",
@@ -3481,7 +3490,9 @@ var streamflow_aligned_unlocks_default = {
3481
3490
  },
3482
3491
  {
3483
3492
  name: "sender_tokens",
3484
- docs: ["Associated token account address of `sender`."],
3493
+ docs: [
3494
+ "Associated token account address of `sender`."
3495
+ ],
3485
3496
  writable: true,
3486
3497
  pda: {
3487
3498
  seeds: [
@@ -3543,7 +3554,9 @@ var streamflow_aligned_unlocks_default = {
3543
3554
  },
3544
3555
  {
3545
3556
  name: "recipient_tokens",
3546
- docs: ["CHECK; Associated token account address of `recipient`."],
3557
+ docs: [
3558
+ "CHECK; Associated token account address of `recipient`."
3559
+ ],
3547
3560
  writable: true,
3548
3561
  pda: {
3549
3562
  seeds: [
@@ -3601,13 +3614,24 @@ var streamflow_aligned_unlocks_default = {
3601
3614
  },
3602
3615
  {
3603
3616
  name: "proxy_metadata",
3604
- docs: ["Proxy Contract"],
3617
+ docs: [
3618
+ "Proxy Contract"
3619
+ ],
3605
3620
  writable: true,
3606
3621
  pda: {
3607
3622
  seeds: [
3608
3623
  {
3609
3624
  kind: "const",
3610
- value: [99, 111, 110, 116, 114, 97, 99, 116]
3625
+ value: [
3626
+ 99,
3627
+ 111,
3628
+ 110,
3629
+ 116,
3630
+ 114,
3631
+ 97,
3632
+ 99,
3633
+ 116
3634
+ ]
3611
3635
  },
3612
3636
  {
3613
3637
  kind: "account",
@@ -3805,7 +3829,9 @@ var streamflow_aligned_unlocks_default = {
3805
3829
  },
3806
3830
  {
3807
3831
  name: "mint",
3808
- docs: ["The SPL token mint account."],
3832
+ docs: [
3833
+ "The SPL token mint account."
3834
+ ],
3809
3835
  writable: true
3810
3836
  },
3811
3837
  {
@@ -3814,14 +3840,26 @@ var streamflow_aligned_unlocks_default = {
3814
3840
  },
3815
3841
  {
3816
3842
  name: "token_program",
3817
- docs: ["The SPL program needed in case an associated account", "for the new recipient is being created."]
3843
+ docs: [
3844
+ "The SPL program needed in case an associated account",
3845
+ "for the new recipient is being created."
3846
+ ]
3818
3847
  }
3819
3848
  ],
3820
3849
  args: []
3821
3850
  },
3822
3851
  {
3823
3852
  name: "change_oracle",
3824
- discriminator: [177, 227, 230, 103, 13, 72, 141, 248],
3853
+ discriminator: [
3854
+ 177,
3855
+ 227,
3856
+ 230,
3857
+ 103,
3858
+ 13,
3859
+ 72,
3860
+ 141,
3861
+ 248
3862
+ ],
3825
3863
  accounts: [
3826
3864
  {
3827
3865
  name: "sender",
@@ -3830,7 +3868,9 @@ var streamflow_aligned_unlocks_default = {
3830
3868
  },
3831
3869
  {
3832
3870
  name: "proxy_metadata",
3833
- docs: ["Proxy Contract"],
3871
+ docs: [
3872
+ "Proxy Contract"
3873
+ ],
3834
3874
  writable: true
3835
3875
  },
3836
3876
  {
@@ -3850,11 +3890,22 @@ var streamflow_aligned_unlocks_default = {
3850
3890
  },
3851
3891
  {
3852
3892
  name: "create",
3853
- discriminator: [24, 30, 200, 40, 5, 28, 7, 119],
3893
+ discriminator: [
3894
+ 24,
3895
+ 30,
3896
+ 200,
3897
+ 40,
3898
+ 5,
3899
+ 28,
3900
+ 7,
3901
+ 119
3902
+ ],
3854
3903
  accounts: [
3855
3904
  {
3856
3905
  name: "payer",
3857
- docs: ["Rent payer"],
3906
+ docs: [
3907
+ "Rent payer"
3908
+ ],
3858
3909
  writable: true,
3859
3910
  signer: true
3860
3911
  },
@@ -3865,7 +3916,9 @@ var streamflow_aligned_unlocks_default = {
3865
3916
  },
3866
3917
  {
3867
3918
  name: "sender_tokens",
3868
- docs: ["Associated token account address of `payer`."],
3919
+ docs: [
3920
+ "Associated token account address of `payer`."
3921
+ ],
3869
3922
  writable: true,
3870
3923
  pda: {
3871
3924
  seeds: [
@@ -3987,7 +4040,16 @@ var streamflow_aligned_unlocks_default = {
3987
4040
  seeds: [
3988
4041
  {
3989
4042
  kind: "const",
3990
- value: [99, 111, 110, 116, 114, 97, 99, 116]
4043
+ value: [
4044
+ 99,
4045
+ 111,
4046
+ 110,
4047
+ 116,
4048
+ 114,
4049
+ 97,
4050
+ 99,
4051
+ 116
4052
+ ]
3991
4053
  },
3992
4054
  {
3993
4055
  kind: "account",
@@ -4111,7 +4173,16 @@ var streamflow_aligned_unlocks_default = {
4111
4173
  },
4112
4174
  {
4113
4175
  name: "create_test_oracle",
4114
- discriminator: [183, 110, 4, 11, 131, 220, 84, 12],
4176
+ discriminator: [
4177
+ 183,
4178
+ 110,
4179
+ 4,
4180
+ 11,
4181
+ 131,
4182
+ 220,
4183
+ 84,
4184
+ 12
4185
+ ],
4115
4186
  accounts: [
4116
4187
  {
4117
4188
  name: "creator",
@@ -4128,7 +4199,19 @@ var streamflow_aligned_unlocks_default = {
4128
4199
  seeds: [
4129
4200
  {
4130
4201
  kind: "const",
4131
- value: [116, 101, 115, 116, 45, 111, 114, 97, 99, 108, 101]
4202
+ value: [
4203
+ 116,
4204
+ 101,
4205
+ 115,
4206
+ 116,
4207
+ 45,
4208
+ 111,
4209
+ 114,
4210
+ 97,
4211
+ 99,
4212
+ 108,
4213
+ 101
4214
+ ]
4132
4215
  },
4133
4216
  {
4134
4217
  kind: "account",
@@ -4159,7 +4242,16 @@ var streamflow_aligned_unlocks_default = {
4159
4242
  },
4160
4243
  {
4161
4244
  name: "set_test_oracle_authority",
4162
- discriminator: [26, 66, 233, 99, 38, 118, 181, 247],
4245
+ discriminator: [
4246
+ 26,
4247
+ 66,
4248
+ 233,
4249
+ 99,
4250
+ 38,
4251
+ 118,
4252
+ 181,
4253
+ 247
4254
+ ],
4163
4255
  accounts: [
4164
4256
  {
4165
4257
  name: "authority",
@@ -4178,11 +4270,22 @@ var streamflow_aligned_unlocks_default = {
4178
4270
  },
4179
4271
  {
4180
4272
  name: "update_amount",
4181
- discriminator: [212, 178, 69, 133, 251, 180, 212, 71],
4273
+ discriminator: [
4274
+ 212,
4275
+ 178,
4276
+ 69,
4277
+ 133,
4278
+ 251,
4279
+ 180,
4280
+ 212,
4281
+ 71
4282
+ ],
4182
4283
  accounts: [
4183
4284
  {
4184
4285
  name: "authority",
4185
- docs: ["Wallet authorised to call this method"],
4286
+ docs: [
4287
+ "Wallet authorised to call this method"
4288
+ ],
4186
4289
  writable: true,
4187
4290
  signer: true
4188
4291
  },
@@ -4193,7 +4296,16 @@ var streamflow_aligned_unlocks_default = {
4193
4296
  seeds: [
4194
4297
  {
4195
4298
  kind: "const",
4196
- value: [99, 111, 110, 116, 114, 97, 99, 116]
4299
+ value: [
4300
+ 99,
4301
+ 111,
4302
+ 110,
4303
+ 116,
4304
+ 114,
4305
+ 97,
4306
+ 99,
4307
+ 116
4308
+ ]
4197
4309
  },
4198
4310
  {
4199
4311
  kind: "account",
@@ -4212,7 +4324,9 @@ var streamflow_aligned_unlocks_default = {
4212
4324
  },
4213
4325
  {
4214
4326
  name: "price_oracle",
4215
- relations: ["proxy_metadata"]
4327
+ relations: [
4328
+ "proxy_metadata"
4329
+ ]
4216
4330
  },
4217
4331
  {
4218
4332
  name: "streamflow_program",
@@ -4227,7 +4341,16 @@ var streamflow_aligned_unlocks_default = {
4227
4341
  },
4228
4342
  {
4229
4343
  name: "update_test_oracle",
4230
- discriminator: [158, 147, 215, 74, 34, 123, 80, 76],
4344
+ discriminator: [
4345
+ 158,
4346
+ 147,
4347
+ 215,
4348
+ 74,
4349
+ 34,
4350
+ 123,
4351
+ 80,
4352
+ 76
4353
+ ],
4231
4354
  accounts: [
4232
4355
  {
4233
4356
  name: "authority",
@@ -4254,11 +4377,29 @@ var streamflow_aligned_unlocks_default = {
4254
4377
  accounts: [
4255
4378
  {
4256
4379
  name: "Contract",
4257
- discriminator: [172, 138, 115, 242, 121, 67, 183, 26]
4380
+ discriminator: [
4381
+ 172,
4382
+ 138,
4383
+ 115,
4384
+ 242,
4385
+ 121,
4386
+ 67,
4387
+ 183,
4388
+ 26
4389
+ ]
4258
4390
  },
4259
4391
  {
4260
4392
  name: "TestOracle",
4261
- discriminator: [198, 49, 63, 134, 232, 251, 168, 28]
4393
+ discriminator: [
4394
+ 198,
4395
+ 49,
4396
+ 63,
4397
+ 134,
4398
+ 232,
4399
+ 251,
4400
+ 168,
4401
+ 28
4402
+ ]
4262
4403
  }
4263
4404
  ],
4264
4405
  errors: [
@@ -4299,33 +4440,43 @@ var streamflow_aligned_unlocks_default = {
4299
4440
  },
4300
4441
  {
4301
4442
  code: 6007,
4443
+ name: "InvalidExpiryDuration",
4444
+ msg: "Provided expiry time/percentage configuration is invalid"
4445
+ },
4446
+ {
4447
+ code: 6008,
4302
4448
  name: "UnsupportedOracle",
4303
4449
  msg: "Unsupported price oracle"
4304
4450
  },
4305
4451
  {
4306
- code: 6008,
4452
+ code: 6009,
4307
4453
  name: "InvalidOracleAccount",
4308
4454
  msg: "Invalid oracle account"
4309
4455
  },
4310
4456
  {
4311
- code: 6009,
4457
+ code: 6010,
4312
4458
  name: "InvalidOraclePrice",
4313
4459
  msg: "Invalid oracle price"
4314
4460
  },
4315
4461
  {
4316
- code: 6010,
4462
+ code: 6011,
4317
4463
  name: "InvalidStreamMetadata",
4318
4464
  msg: "Invalid Stream Metadata"
4319
4465
  },
4320
4466
  {
4321
- code: 6011,
4467
+ code: 6012,
4322
4468
  name: "AmountAlreadyUpdated",
4323
4469
  msg: "Release amount has already been updated in this period"
4324
4470
  },
4325
4471
  {
4326
- code: 6012,
4472
+ code: 6013,
4327
4473
  name: "AllFundsUnlocked",
4328
4474
  msg: "All funds are already unlocked"
4475
+ },
4476
+ {
4477
+ code: 6014,
4478
+ name: "DynamicScheduleExpired",
4479
+ msg: "Dynamic schedule expired, updates are not allowed"
4329
4480
  }
4330
4481
  ],
4331
4482
  types: [
@@ -4352,27 +4503,37 @@ var streamflow_aligned_unlocks_default = {
4352
4503
  fields: [
4353
4504
  {
4354
4505
  name: "bump",
4355
- docs: ["Bump Seed used to sign transactions"],
4506
+ docs: [
4507
+ "Bump Seed used to sign transactions"
4508
+ ],
4356
4509
  type: "u8"
4357
4510
  },
4358
4511
  {
4359
4512
  name: "sender",
4360
- docs: ["Original Contract sender"],
4513
+ docs: [
4514
+ "Original Contract sender"
4515
+ ],
4361
4516
  type: "pubkey"
4362
4517
  },
4363
4518
  {
4364
4519
  name: "sender_tokens",
4365
- docs: ["Original Contract sender tokens address"],
4520
+ docs: [
4521
+ "Original Contract sender tokens address"
4522
+ ],
4366
4523
  type: "pubkey"
4367
4524
  },
4368
4525
  {
4369
4526
  name: "stream",
4370
- docs: ["Vesting Stream address"],
4527
+ docs: [
4528
+ "Vesting Stream address"
4529
+ ],
4371
4530
  type: "pubkey"
4372
4531
  },
4373
4532
  {
4374
4533
  name: "price_oracle_type",
4375
- docs: ["Type of the Oracle used to derive Token Price"],
4534
+ docs: [
4535
+ "Type of the Oracle used to derive Token Price"
4536
+ ],
4376
4537
  type: {
4377
4538
  defined: {
4378
4539
  name: "OracleType"
@@ -4381,32 +4542,44 @@ var streamflow_aligned_unlocks_default = {
4381
4542
  },
4382
4543
  {
4383
4544
  name: "price_oracle",
4384
- docs: ["Address of the Price Oracle"],
4545
+ docs: [
4546
+ "Address of the Price Oracle"
4547
+ ],
4385
4548
  type: "pubkey"
4386
4549
  },
4387
4550
  {
4388
4551
  name: "min_price",
4389
- docs: ["Min price boundary"],
4552
+ docs: [
4553
+ "Min price boundary"
4554
+ ],
4390
4555
  type: "u64"
4391
4556
  },
4392
4557
  {
4393
4558
  name: "max_price",
4394
- docs: ["Max price boundary"],
4559
+ docs: [
4560
+ "Max price boundary"
4561
+ ],
4395
4562
  type: "u64"
4396
4563
  },
4397
4564
  {
4398
4565
  name: "min_percentage",
4399
- docs: ["Min percentage boundary, can be 0 that equals 1 Raw Token"],
4566
+ docs: [
4567
+ "Min percentage boundary, can be 0 that equals 1 Raw Token"
4568
+ ],
4400
4569
  type: "u64"
4401
4570
  },
4402
4571
  {
4403
4572
  name: "max_percentage",
4404
- docs: ["Max percentage boundary"],
4573
+ docs: [
4574
+ "Max percentage boundary"
4575
+ ],
4405
4576
  type: "u64"
4406
4577
  },
4407
4578
  {
4408
4579
  name: "tick_size",
4409
- docs: ["Ticket size for percentage boundaries"],
4580
+ docs: [
4581
+ "Ticket size for percentage boundaries"
4582
+ ],
4410
4583
  type: "u64"
4411
4584
  },
4412
4585
  {
@@ -4439,39 +4612,70 @@ var streamflow_aligned_unlocks_default = {
4439
4612
  },
4440
4613
  {
4441
4614
  name: "last_price",
4442
- docs: ["Price used on last amount calculation"],
4615
+ docs: [
4616
+ "Price used on last amount calculation"
4617
+ ],
4443
4618
  type: "u64"
4444
4619
  },
4445
4620
  {
4446
4621
  name: "stream_canceled_time",
4447
- docs: ["Timestamp when stream was cancelled"],
4622
+ docs: [
4623
+ "Timestamp when stream was cancelled"
4624
+ ],
4448
4625
  type: "u64"
4449
4626
  },
4450
4627
  {
4451
4628
  name: "initial_amount_per_period",
4452
- docs: ["Amount per period to use as base for calculations"],
4629
+ docs: [
4630
+ "Amount per period to use as base for calculations"
4631
+ ],
4453
4632
  type: "u64"
4454
4633
  },
4455
4634
  {
4456
4635
  name: "initial_price",
4457
- docs: ["Initial token price at the time of Contract creation"],
4636
+ docs: [
4637
+ "Initial token price at the time of Contract creation"
4638
+ ],
4458
4639
  type: "u64"
4459
4640
  },
4460
4641
  {
4461
4642
  name: "initial_net_amount",
4462
- docs: ["Initial deposited amount"],
4643
+ docs: [
4644
+ "Initial deposited amount"
4645
+ ],
4463
4646
  type: "u64"
4464
4647
  },
4465
4648
  {
4466
4649
  name: "mint",
4467
- docs: ["Mint for which the contract was created"],
4650
+ docs: [
4651
+ "Mint for which the contract was created"
4652
+ ],
4468
4653
  type: "pubkey"
4469
4654
  },
4655
+ {
4656
+ name: "expiry_time",
4657
+ docs: [
4658
+ "Time when contract expires, `expiry_percentage` will be set in this case"
4659
+ ],
4660
+ type: "u64"
4661
+ },
4662
+ {
4663
+ name: "expiry_percentage",
4664
+ docs: [
4665
+ "Percentage to set when contract expires, won't be updated after it"
4666
+ ],
4667
+ type: "u64"
4668
+ },
4470
4669
  {
4471
4670
  name: "buffer",
4472
- docs: ["Buffer for additional fields"],
4671
+ docs: [
4672
+ "Buffer for additional fields"
4673
+ ],
4473
4674
  type: {
4474
- array: ["u8", 32]
4675
+ array: [
4676
+ "u8",
4677
+ 16
4678
+ ]
4475
4679
  }
4476
4680
  }
4477
4681
  ]
@@ -4484,64 +4688,91 @@ var streamflow_aligned_unlocks_default = {
4484
4688
  fields: [
4485
4689
  {
4486
4690
  name: "start_time",
4487
- docs: ["Timestamp when the tokens start vesting"],
4691
+ docs: [
4692
+ "Timestamp when the tokens start vesting"
4693
+ ],
4488
4694
  type: "u64"
4489
4695
  },
4490
4696
  {
4491
4697
  name: "net_amount_deposited",
4492
- docs: ["Deposited amount of tokens"],
4698
+ docs: [
4699
+ "Deposited amount of tokens"
4700
+ ],
4493
4701
  type: "u64"
4494
4702
  },
4495
4703
  {
4496
4704
  name: "period",
4497
- docs: ["Time step (period) in seconds per which the vesting/release occurs"],
4705
+ docs: [
4706
+ "Time step (period) in seconds per which the vesting/release occurs"
4707
+ ],
4498
4708
  type: "u64"
4499
4709
  },
4500
4710
  {
4501
4711
  name: "amount_per_period",
4502
- docs: ["Base Amount released per period. Combined with `period`, we get a release rate."],
4712
+ docs: [
4713
+ "Base Amount released per period. Combined with `period`, we get a release rate."
4714
+ ],
4503
4715
  type: "u64"
4504
4716
  },
4505
4717
  {
4506
4718
  name: "cliff",
4507
- docs: ['Vesting contract "cliff" timestamp'],
4719
+ docs: [
4720
+ 'Vesting contract "cliff" timestamp'
4721
+ ],
4508
4722
  type: "u64"
4509
4723
  },
4510
4724
  {
4511
4725
  name: "cliff_amount",
4512
- docs: ['Amount unlocked at the "cliff" timestamp'],
4726
+ docs: [
4727
+ 'Amount unlocked at the "cliff" timestamp'
4728
+ ],
4513
4729
  type: "u64"
4514
4730
  },
4515
4731
  {
4516
4732
  name: "cancelable_by_sender",
4517
- docs: ["Whether a stream can be canceled by a sender"],
4733
+ docs: [
4734
+ "Whether a stream can be canceled by a sender"
4735
+ ],
4518
4736
  type: "bool"
4519
4737
  },
4520
4738
  {
4521
4739
  name: "cancelable_by_recipient",
4522
- docs: ["Whether a stream can be canceled by a recipient"],
4740
+ docs: [
4741
+ "Whether a stream can be canceled by a recipient"
4742
+ ],
4523
4743
  type: "bool"
4524
4744
  },
4525
4745
  {
4526
4746
  name: "transferable_by_sender",
4527
- docs: ["Whether the sender can transfer the stream"],
4747
+ docs: [
4748
+ "Whether the sender can transfer the stream"
4749
+ ],
4528
4750
  type: "bool"
4529
4751
  },
4530
4752
  {
4531
4753
  name: "transferable_by_recipient",
4532
- docs: ["Whether the recipient can transfer the stream"],
4754
+ docs: [
4755
+ "Whether the recipient can transfer the stream"
4756
+ ],
4533
4757
  type: "bool"
4534
4758
  },
4535
4759
  {
4536
4760
  name: "can_topup",
4537
- docs: ["Whether topup is enabled"],
4761
+ docs: [
4762
+ "Whether topup is enabled"
4763
+ ],
4538
4764
  type: "bool"
4539
4765
  },
4540
4766
  {
4541
4767
  name: "stream_name",
4542
- docs: ["The name of this stream"],
4768
+ docs: [
4769
+ "The name of this stream"
4770
+ ],
4543
4771
  type: {
4544
- array: ["u8", 64]
4772
+ array: [
4773
+ "u8",
4774
+ 64
4775
+ ]
4545
4776
  }
4546
4777
  },
4547
4778
  {
@@ -4566,17 +4797,35 @@ var streamflow_aligned_unlocks_default = {
4566
4797
  },
4567
4798
  {
4568
4799
  name: "skip_initial",
4569
- docs: ["Whether to skip initial calculation of amount per period"],
4800
+ docs: [
4801
+ "Whether to skip initial calculation of amount per period"
4802
+ ],
4570
4803
  type: "bool"
4571
4804
  },
4572
4805
  {
4573
4806
  name: "oracle_type",
4574
- docs: ["Type of Oracle to use to derive Token Price"],
4807
+ docs: [
4808
+ "Type of Oracle to use to derive Token Price"
4809
+ ],
4575
4810
  type: {
4576
4811
  defined: {
4577
4812
  name: "OracleType"
4578
4813
  }
4579
4814
  }
4815
+ },
4816
+ {
4817
+ name: "expiry_time",
4818
+ docs: [
4819
+ "Time when contract expires, `expiry_percentage` will be set in this case"
4820
+ ],
4821
+ type: "u64"
4822
+ },
4823
+ {
4824
+ name: "expiry_percentage",
4825
+ docs: [
4826
+ "Percentage to set when contract expires, won't be updated after it"
4827
+ ],
4828
+ type: "u64"
4580
4829
  }
4581
4830
  ]
4582
4831
  }
@@ -4759,7 +5008,7 @@ var SolanaStreamClient = class extends BaseStreamClient {
4759
5008
  throw new Error("Sender's PublicKey is not available, check passed wallet adapter!");
4760
5009
  }
4761
5010
  const ixs = await this.getCreateATAInstructions(
4762
- [STREAMFLOW_TREASURY_PUBLIC_KEY, partnerPublicKey],
5011
+ [partnerPublicKey],
4763
5012
  mintPublicKey,
4764
5013
  sender,
4765
5014
  true,
@@ -4820,7 +5069,9 @@ var SolanaStreamClient = class extends BaseStreamClient {
4820
5069
  tickSize,
4821
5070
  priceOracle,
4822
5071
  oracleType,
4823
- tokenProgramId: streamTokenProgramId
5072
+ tokenProgramId: streamTokenProgramId,
5073
+ expiryTime,
5074
+ expiryPercentage
4824
5075
  } = streamParams;
4825
5076
  const { isNative, sender, computeLimit, computePrice, metadataPubKeys } = extParams;
4826
5077
  if (!sender.publicKey) {
@@ -4872,7 +5123,9 @@ var SolanaStreamClient = class extends BaseStreamClient {
4872
5123
  minPercentage: minPercentage instanceof BN7 ? minPercentage : getBN$1(minPercentage, ALIGNED_PRECISION_FACTOR_POW),
4873
5124
  maxPercentage: maxPercentage instanceof BN7 ? maxPercentage : getBN$1(maxPercentage, ALIGNED_PRECISION_FACTOR_POW),
4874
5125
  tickSize: new BN7(tickSize || 1),
4875
- skipInitial: skipInitial ?? false
5126
+ skipInitial: skipInitial ?? false,
5127
+ expiryTime: new BN7(expiryTime ?? 0),
5128
+ expiryPercentage: expiryPercentage instanceof BN7 ? expiryPercentage : getBN$1(expiryPercentage ?? 0, ALIGNED_PRECISION_FACTOR_POW)
4876
5129
  }).accountsPartial({
4877
5130
  payer: sender.publicKey,
4878
5131
  sender: sender.publicKey,
@@ -5166,7 +5419,7 @@ var SolanaStreamClient = class extends BaseStreamClient {
5166
5419
  batch.push({ tx: createVersionedTransaction(ixs, sender.publicKey, hash.blockhash, [metadata]), recipient });
5167
5420
  }
5168
5421
  const prepareInstructions = await this.getCreateATAInstructions(
5169
- [STREAMFLOW_TREASURY_PUBLIC_KEY, partnerPublicKey],
5422
+ [partnerPublicKey],
5170
5423
  mintPublicKey,
5171
5424
  sender,
5172
5425
  true
@@ -5286,7 +5539,7 @@ var SolanaStreamClient = class extends BaseStreamClient {
5286
5539
  batch.push({ tx, recipient });
5287
5540
  }
5288
5541
  const prepareInstructions = await this.getCreateATAInstructions(
5289
- [STREAMFLOW_TREASURY_PUBLIC_KEY, partnerPublicKey],
5542
+ [partnerPublicKey],
5290
5543
  mintPublicKey,
5291
5544
  sender,
5292
5545
  true