@streamflow/stream 12.0.0 → 12.1.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.
@@ -1,4 +1,4 @@
1
- export { AIRDROP_AMOUNT, AIRDROP_TEST_TOKEN, ALIGNED_COMPUTE_LIMIT, ALIGNED_PRECISION_FACTOR_POW, ALIGNED_UNLOCKS_PROGRAM_ID, Account, AlignedContract, AlignedProxyErrorCode, AlignedStream, AlignedStreamData, AlignedUnlocksContract, ApiClient, ApiClientOptions, BatchItem, BatchItemError, BatchItemResult, BatchItemSuccess, CONTRACT_DISCRIMINATOR, CONTRACT_SEED, CREATE_PARAMS_PADDING, Chain, ChangeOracleParams, ClientCreationOptions, Contract, ContractErrorCode, ContractSchema, ContractType, CreateParams, CreateTestOracleParams, DEFAULT_AUTO_CLAIM_FEE_SOL, DEFAULT_CREATION_FEE_SOL, DEFAULT_STREAMFLOW_FEE, DecodedStream, DynamicContractSchema, ESCROW_SEED, FEES_METADATA_SEED, FEE_ORACLE_PUBLIC_KEY, GetContractsOptions, IAlignedStreamConfig, IBaseStreamConfig, ICancelData, ICreateAlignedStreamData, ICreateExt, ICreateLinearStreamData, ICreateMultiError, ICreateMultipleAlignedStreamData, ICreateMultipleLinearStreamData, ICreateMultipleStreamData, ICreateResult, ICreateStreamData, ICreateStreamExt, ICreateStreamInstructions, IFees, IGetAllData, IGetFeesData, IGetOneData, IInteractData, IInteractStreamExt, IMultiTransactionResult, IPrepareCreateStreamExt, IPrepareStreamExt, IPrepareTopUpstreamExt, IRecipient, ISearchStreams, ITopUpData, ITopUpStreamExt, ITransactionExtWithInstructions, ITransactionResult, ITransferData, IUpdateData, IWithdrawData, InstructionGenerator, LinearStream, MAX_SAFE_UNIX_TIME_VALUE, METADATA_SEED, MetadataRecipientHashMap, ORIGINAL_CONTRACT_SENDER_OFFSET, OracleType, OracleTypeName, PARTNERS_SCHEMA, PARTNER_ORACLE_PROGRAM_ID, PARTNER_SCHEMA, PROGRAM_ID, PriceOracleType, REPOPULATED_METADATA_SEED, SOLANA_ERROR_MAP, SOLANA_ERROR_MATCH_REGEX, STREAMFLOW_TREASURY_PUBLIC_KEY, STREAM_STRUCT_OFFSETS, STREAM_STRUCT_OFFSET_CLOSED, STREAM_STRUCT_OFFSET_MINT, STREAM_STRUCT_OFFSET_OLD_METADATA_KEY, STREAM_STRUCT_OFFSET_RECIPIENT, STREAM_STRUCT_OFFSET_SENDER, SolanaStreamClient, Stream, StreamClientOptions, StreamDirection, StreamType, TEST_ORACLE_DISCRIMINATOR, TEST_ORACLE_SEED, TX_FINALITY_CONFIRMED, TabulariumContract, TestOracle, TransactionSchedulingOptions, UpdateTestOracleParams, WITHDRAWOR, WITHDRAWOR_PUBLIC_KEY, WITHDRAW_AVAILABLE_AMOUNT, buildStreamType, calculateTotalAmountToDeposit, calculateUnlockedAmount, cancelStreamInstruction, createClient, createStreamInstruction, createStreamV2Instruction, createUncheckedStreamInstruction, createUncheckedStreamV2Instruction, decodeEndTime, decodeStream, deriveContractPDA, deriveEscrowPDA, deriveRepopulatedMetadataPDA, deriveStreamMetadataPDA, deriveTestOraclePDA, extractSolanaErrorCode, getMetadataKey, handleContractError, isAligned, isCliffCloseToDepositedAmount, isCreateAlignedStreamData, isDynamicLock, isTokenLock, isVesting, sendAndConfirmStreamRawTransaction, signAllTransactionWithRecipients, timelockIDL, topupStreamInstruction, transferStreamInstruction, transformContract, updateStreamInstruction, withdrawStreamInstruction } from './solana/index.cjs';
1
+ export { AIRDROP_AMOUNT, AIRDROP_TEST_TOKEN, ALIGNED_COMPUTE_LIMIT, ALIGNED_PRECISION_FACTOR_POW, ALIGNED_UNLOCKS_PROGRAM_ID, Account, AlignedContract, AlignedProxyErrorCode, AlignedStream, AlignedStreamData, AlignedUnlocksContract, ApiClient, ApiClientOptions, BatchItem, BatchItemError, BatchItemResult, BatchItemSuccess, CONTRACT_DISCRIMINATOR, CONTRACT_SEED, CREATE_PARAMS_PADDING, Chain, ChangeOracleParams, ClientCreationOptions, Contract, ContractErrorCode, ContractSchema, ContractType, CreateParams, CreateTestOracleParams, DEFAULT_AUTO_CLAIM_FEE_SOL, DEFAULT_CREATION_FEE_SOL, DEFAULT_STREAMFLOW_FEE, DecodedStream, DynamicContractSchema, ESCROW_SEED, FEES_METADATA_SEED, FEE_ORACLE_PUBLIC_KEY, GetContractsOptions, IAlignedStreamConfig, IBaseStreamConfig, ICancelData, ICreateAlignedStreamData, ICreateExt, ICreateLinearStreamData, ICreateMultiError, ICreateMultipleAlignedStreamData, ICreateMultipleLinearStreamData, ICreateMultipleStreamData, ICreateResult, ICreateStreamData, ICreateStreamExt, ICreateStreamInstructions, IFees, IGetAllData, IGetFeesData, IGetOneData, IInteractData, IInteractStreamExt, IMultiTransactionResult, IPrepareCreateStreamExt, IPrepareStreamExt, IPrepareTopUpstreamExt, IRecipient, IRequestCancelData, ISearchStreams, ITopUpData, ITopUpStreamExt, ITransactionExtWithInstructions, ITransactionResult, ITransferData, IUpdateData, IWithdrawCancelRequestData, IWithdrawData, InstructionGenerator, LinearStream, MAX_SAFE_UNIX_TIME_VALUE, METADATA_SEED, MetadataRecipientHashMap, ORIGINAL_CONTRACT_SENDER_OFFSET, OracleType, OracleTypeName, PARTNERS_SCHEMA, PARTNER_ORACLE_PROGRAM_ID, PARTNER_SCHEMA, PROGRAM_ID, PriceOracleType, REPOPULATED_METADATA_SEED, SOLANA_ERROR_MAP, SOLANA_ERROR_MATCH_REGEX, STREAMFLOW_TREASURY_PUBLIC_KEY, STREAM_STRUCT_OFFSETS, STREAM_STRUCT_OFFSET_CLOSED, STREAM_STRUCT_OFFSET_MINT, STREAM_STRUCT_OFFSET_OLD_METADATA_KEY, STREAM_STRUCT_OFFSET_RECIPIENT, STREAM_STRUCT_OFFSET_SENDER, SolanaStreamClient, Stream, StreamClientOptions, StreamDirection, StreamType, TEST_ORACLE_DISCRIMINATOR, TEST_ORACLE_SEED, TX_FINALITY_CONFIRMED, TabulariumContract, TestOracle, TransactionSchedulingOptions, UpdateTestOracleParams, WITHDRAWOR, WITHDRAWOR_PUBLIC_KEY, WITHDRAW_AVAILABLE_AMOUNT, buildStreamType, calculateTotalAmountToDeposit, calculateUnlockedAmount, cancelStreamInstruction, createClient, createStreamInstruction, createStreamV2Instruction, createUncheckedStreamInstruction, createUncheckedStreamV2Instruction, decodeEndTime, decodeStream, deriveContractPDA, deriveEscrowPDA, deriveRepopulatedMetadataPDA, deriveStreamMetadataPDA, deriveTestOraclePDA, extractSolanaErrorCode, getMetadataKey, handleContractError, isAligned, isCliffCloseToDepositedAmount, isCreateAlignedStreamData, isDynamicLock, isTokenLock, isVesting, requestCancelStreamInstruction, sendAndConfirmStreamRawTransaction, signAllTransactionWithRecipients, timelockIDL, topupStreamInstruction, transferStreamInstruction, transformContract, updateStreamInstruction, withdrawCancelRequestInstruction, withdrawStreamInstruction } from './solana/index.cjs';
2
2
  export { ContractError, ICluster, getBN, getNumberFromBN } from '@streamflow/common';
3
3
  import 'p-queue';
4
4
  import '@solana/web3.js';
@@ -8,7 +8,7 @@ type StreamflowAlignedUnlocks = {
8
8
  "address": "aSTRM2NKoKxNnkmLWk9sz3k74gKBk9t7bpPrTGxMszH";
9
9
  "metadata": {
10
10
  "name": "streamflowAlignedUnlocks";
11
- "version": "1.4.0";
11
+ "version": "1.7.0";
12
12
  "spec": "0.1.0";
13
13
  "description": "Proxy to update unlock amount within Streamflow vesting protocol according to Token performance and other metrics";
14
14
  };
@@ -391,6 +391,388 @@ type StreamflowAlignedUnlocks = {
391
391
  ];
392
392
  "args": [];
393
393
  },
394
+ {
395
+ "name": "cancelV2";
396
+ "discriminator": [
397
+ 160,
398
+ 58,
399
+ 112,
400
+ 172,
401
+ 233,
402
+ 228,
403
+ 38,
404
+ 140
405
+ ];
406
+ "accounts": [
407
+ {
408
+ "name": "caller";
409
+ "writable": true;
410
+ "signer": true;
411
+ },
412
+ {
413
+ "name": "sender";
414
+ "writable": true;
415
+ },
416
+ {
417
+ "name": "senderTokens";
418
+ "docs": [
419
+ "Associated token account address of `sender`."
420
+ ];
421
+ "writable": true;
422
+ "pda": {
423
+ "seeds": [
424
+ {
425
+ "kind": "account";
426
+ "path": "sender";
427
+ },
428
+ {
429
+ "kind": "account";
430
+ "path": "tokenProgram";
431
+ },
432
+ {
433
+ "kind": "account";
434
+ "path": "mint";
435
+ }
436
+ ];
437
+ "program": {
438
+ "kind": "const";
439
+ "value": [
440
+ 140,
441
+ 151,
442
+ 37,
443
+ 143,
444
+ 78,
445
+ 36,
446
+ 137,
447
+ 241,
448
+ 187,
449
+ 61,
450
+ 16,
451
+ 41,
452
+ 20,
453
+ 142,
454
+ 13,
455
+ 131,
456
+ 11,
457
+ 90,
458
+ 19,
459
+ 153,
460
+ 218,
461
+ 255,
462
+ 16,
463
+ 132,
464
+ 4,
465
+ 142,
466
+ 123,
467
+ 216,
468
+ 219,
469
+ 233,
470
+ 248,
471
+ 89
472
+ ];
473
+ };
474
+ };
475
+ },
476
+ {
477
+ "name": "recipient";
478
+ "writable": true;
479
+ },
480
+ {
481
+ "name": "recipientTokens";
482
+ "docs": [
483
+ "CHECK; Associated token account address of `recipient`."
484
+ ];
485
+ "writable": true;
486
+ "pda": {
487
+ "seeds": [
488
+ {
489
+ "kind": "account";
490
+ "path": "recipient";
491
+ },
492
+ {
493
+ "kind": "account";
494
+ "path": "tokenProgram";
495
+ },
496
+ {
497
+ "kind": "account";
498
+ "path": "mint";
499
+ }
500
+ ];
501
+ "program": {
502
+ "kind": "const";
503
+ "value": [
504
+ 140,
505
+ 151,
506
+ 37,
507
+ 143,
508
+ 78,
509
+ 36,
510
+ 137,
511
+ 241,
512
+ 187,
513
+ 61,
514
+ 16,
515
+ 41,
516
+ 20,
517
+ 142,
518
+ 13,
519
+ 131,
520
+ 11,
521
+ 90,
522
+ 19,
523
+ 153,
524
+ 218,
525
+ 255,
526
+ 16,
527
+ 132,
528
+ 4,
529
+ 142,
530
+ 123,
531
+ 216,
532
+ 219,
533
+ 233,
534
+ 248,
535
+ 89
536
+ ];
537
+ };
538
+ };
539
+ },
540
+ {
541
+ "name": "proxyMetadata";
542
+ "docs": [
543
+ "Proxy Contract"
544
+ ];
545
+ "writable": true;
546
+ "pda": {
547
+ "seeds": [
548
+ {
549
+ "kind": "const";
550
+ "value": [
551
+ 99,
552
+ 111,
553
+ 110,
554
+ 116,
555
+ 114,
556
+ 97,
557
+ 99,
558
+ 116
559
+ ];
560
+ },
561
+ {
562
+ "kind": "account";
563
+ "path": "streamMetadata";
564
+ }
565
+ ];
566
+ };
567
+ },
568
+ {
569
+ "name": "proxyTokens";
570
+ "writable": true;
571
+ "pda": {
572
+ "seeds": [
573
+ {
574
+ "kind": "account";
575
+ "path": "proxyMetadata";
576
+ },
577
+ {
578
+ "kind": "account";
579
+ "path": "tokenProgram";
580
+ },
581
+ {
582
+ "kind": "account";
583
+ "path": "mint";
584
+ }
585
+ ];
586
+ "program": {
587
+ "kind": "const";
588
+ "value": [
589
+ 140,
590
+ 151,
591
+ 37,
592
+ 143,
593
+ 78,
594
+ 36,
595
+ 137,
596
+ 241,
597
+ 187,
598
+ 61,
599
+ 16,
600
+ 41,
601
+ 20,
602
+ 142,
603
+ 13,
604
+ 131,
605
+ 11,
606
+ 90,
607
+ 19,
608
+ 153,
609
+ 218,
610
+ 255,
611
+ 16,
612
+ 132,
613
+ 4,
614
+ 142,
615
+ 123,
616
+ 216,
617
+ 219,
618
+ 233,
619
+ 248,
620
+ 89
621
+ ];
622
+ };
623
+ };
624
+ },
625
+ {
626
+ "name": "streamMetadata";
627
+ "writable": true;
628
+ },
629
+ {
630
+ "name": "escrowTokens";
631
+ "writable": true;
632
+ },
633
+ {
634
+ "name": "streamflowTreasury";
635
+ "writable": true;
636
+ },
637
+ {
638
+ "name": "streamflowTreasuryTokens";
639
+ "writable": true;
640
+ "pda": {
641
+ "seeds": [
642
+ {
643
+ "kind": "account";
644
+ "path": "streamflowTreasury";
645
+ },
646
+ {
647
+ "kind": "account";
648
+ "path": "tokenProgram";
649
+ },
650
+ {
651
+ "kind": "account";
652
+ "path": "mint";
653
+ }
654
+ ];
655
+ "program": {
656
+ "kind": "const";
657
+ "value": [
658
+ 140,
659
+ 151,
660
+ 37,
661
+ 143,
662
+ 78,
663
+ 36,
664
+ 137,
665
+ 241,
666
+ 187,
667
+ 61,
668
+ 16,
669
+ 41,
670
+ 20,
671
+ 142,
672
+ 13,
673
+ 131,
674
+ 11,
675
+ 90,
676
+ 19,
677
+ 153,
678
+ 218,
679
+ 255,
680
+ 16,
681
+ 132,
682
+ 4,
683
+ 142,
684
+ 123,
685
+ 216,
686
+ 219,
687
+ 233,
688
+ 248,
689
+ 89
690
+ ];
691
+ };
692
+ };
693
+ },
694
+ {
695
+ "name": "partner";
696
+ "writable": true;
697
+ },
698
+ {
699
+ "name": "partnerTokens";
700
+ "writable": true;
701
+ "pda": {
702
+ "seeds": [
703
+ {
704
+ "kind": "account";
705
+ "path": "partner";
706
+ },
707
+ {
708
+ "kind": "account";
709
+ "path": "tokenProgram";
710
+ },
711
+ {
712
+ "kind": "account";
713
+ "path": "mint";
714
+ }
715
+ ];
716
+ "program": {
717
+ "kind": "const";
718
+ "value": [
719
+ 140,
720
+ 151,
721
+ 37,
722
+ 143,
723
+ 78,
724
+ 36,
725
+ 137,
726
+ 241,
727
+ 187,
728
+ 61,
729
+ 16,
730
+ 41,
731
+ 20,
732
+ 142,
733
+ 13,
734
+ 131,
735
+ 11,
736
+ 90,
737
+ 19,
738
+ 153,
739
+ 218,
740
+ 255,
741
+ 16,
742
+ 132,
743
+ 4,
744
+ 142,
745
+ 123,
746
+ 216,
747
+ 219,
748
+ 233,
749
+ 248,
750
+ 89
751
+ ];
752
+ };
753
+ };
754
+ },
755
+ {
756
+ "name": "mint";
757
+ "docs": [
758
+ "The SPL token mint account."
759
+ ];
760
+ "writable": true;
761
+ },
762
+ {
763
+ "name": "streamflowProgram";
764
+ "address": "strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m";
765
+ },
766
+ {
767
+ "name": "tokenProgram";
768
+ "docs": [
769
+ "The SPL program needed in case an associated account",
770
+ "for the new recipient is being created."
771
+ ];
772
+ }
773
+ ];
774
+ "args": [];
775
+ },
394
776
  {
395
777
  "name": "changeOracle";
396
778
  "discriminator": [
@@ -679,6 +1061,7 @@ type StreamflowAlignedUnlocks = {
679
1061
  },
680
1062
  {
681
1063
  "name": "feeOracle";
1064
+ "address": "B743wFVk2pCYhV91cn287e1xY7f1vt4gdY48hhNiuQmT";
682
1065
  },
683
1066
  {
684
1067
  "name": "priceOracle";
@@ -1104,6 +1487,21 @@ type StreamflowAlignedUnlocks = {
1104
1487
  "code": 6016;
1105
1488
  "name": "invalidFloorPrice";
1106
1489
  "msg": "Provided floor price is invalid, should be less than minimum price";
1490
+ },
1491
+ {
1492
+ "code": 6017;
1493
+ "name": "amountNotUpdated";
1494
+ "msg": "Update won't lead to any changes in unlock schedule";
1495
+ },
1496
+ {
1497
+ "code": 6018;
1498
+ "name": "oldMetadataNotDrained";
1499
+ "msg": "Old metadata account must be drained";
1500
+ },
1501
+ {
1502
+ "code": 6019;
1503
+ "name": "newMetadataMissing";
1504
+ "msg": "New metadata account does not exist";
1107
1505
  }
1108
1506
  ];
1109
1507
  "types": [