@streamflow/stream 8.1.1 → 8.2.1

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