@privy-io/api-types 0.8.0 → 0.9.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 (112) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/client.d.mts +19 -19
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +19 -19
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs +1 -1
  8. package/client.mjs.map +1 -1
  9. package/internal/utils/env.js +2 -2
  10. package/internal/utils/env.js.map +1 -1
  11. package/internal/utils/env.mjs +2 -2
  12. package/internal/utils/env.mjs.map +1 -1
  13. package/package.json +1 -1
  14. package/resources/apps.d.mts +16 -2
  15. package/resources/apps.d.mts.map +1 -1
  16. package/resources/apps.d.ts +16 -2
  17. package/resources/apps.d.ts.map +1 -1
  18. package/resources/client-auth.d.mts +14 -14
  19. package/resources/client-auth.d.mts.map +1 -1
  20. package/resources/client-auth.d.ts +14 -14
  21. package/resources/client-auth.d.ts.map +1 -1
  22. package/resources/embedded-wallets.d.mts +50 -50
  23. package/resources/embedded-wallets.d.mts.map +1 -1
  24. package/resources/embedded-wallets.d.ts +50 -50
  25. package/resources/embedded-wallets.d.ts.map +1 -1
  26. package/resources/index.d.mts +11 -11
  27. package/resources/index.d.mts.map +1 -1
  28. package/resources/index.d.ts +11 -11
  29. package/resources/index.d.ts.map +1 -1
  30. package/resources/index.js.map +1 -1
  31. package/resources/index.mjs.map +1 -1
  32. package/resources/intents.d.mts +2 -2
  33. package/resources/intents.d.mts.map +1 -1
  34. package/resources/intents.d.ts +2 -2
  35. package/resources/intents.d.ts.map +1 -1
  36. package/resources/kraken-embed.d.mts +52 -1
  37. package/resources/kraken-embed.d.mts.map +1 -1
  38. package/resources/kraken-embed.d.ts +52 -1
  39. package/resources/kraken-embed.d.ts.map +1 -1
  40. package/resources/policies.d.mts +223 -112
  41. package/resources/policies.d.mts.map +1 -1
  42. package/resources/policies.d.ts +223 -112
  43. package/resources/policies.d.ts.map +1 -1
  44. package/resources/swaps.d.mts +3 -3
  45. package/resources/swaps.d.mts.map +1 -1
  46. package/resources/swaps.d.ts +3 -3
  47. package/resources/swaps.d.ts.map +1 -1
  48. package/resources/transactions.d.mts +10 -20
  49. package/resources/transactions.d.mts.map +1 -1
  50. package/resources/transactions.d.ts +10 -20
  51. package/resources/transactions.d.ts.map +1 -1
  52. package/resources/users.d.mts +199 -199
  53. package/resources/users.d.mts.map +1 -1
  54. package/resources/users.d.ts +199 -199
  55. package/resources/users.d.ts.map +1 -1
  56. package/resources/wallet-actions.d.mts +255 -3
  57. package/resources/wallet-actions.d.mts.map +1 -1
  58. package/resources/wallet-actions.d.ts +255 -3
  59. package/resources/wallet-actions.d.ts.map +1 -1
  60. package/resources/wallets/balance.d.mts +2 -1
  61. package/resources/wallets/balance.d.mts.map +1 -1
  62. package/resources/wallets/balance.d.ts +2 -1
  63. package/resources/wallets/balance.d.ts.map +1 -1
  64. package/resources/wallets/balance.js.map +1 -1
  65. package/resources/wallets/balance.mjs.map +1 -1
  66. package/resources/wallets/index.d.mts +1 -1
  67. package/resources/wallets/index.d.mts.map +1 -1
  68. package/resources/wallets/index.d.ts +1 -1
  69. package/resources/wallets/index.d.ts.map +1 -1
  70. package/resources/wallets/index.js.map +1 -1
  71. package/resources/wallets/index.mjs.map +1 -1
  72. package/resources/wallets/transactions.d.mts +10 -30
  73. package/resources/wallets/transactions.d.mts.map +1 -1
  74. package/resources/wallets/transactions.d.ts +10 -30
  75. package/resources/wallets/transactions.d.ts.map +1 -1
  76. package/resources/wallets/transactions.js.map +1 -1
  77. package/resources/wallets/transactions.mjs.map +1 -1
  78. package/resources/wallets/wallets.d.mts +222 -116
  79. package/resources/wallets/wallets.d.mts.map +1 -1
  80. package/resources/wallets/wallets.d.ts +222 -116
  81. package/resources/wallets/wallets.d.ts.map +1 -1
  82. package/resources/wallets/wallets.js +6 -5
  83. package/resources/wallets/wallets.js.map +1 -1
  84. package/resources/wallets/wallets.mjs +6 -5
  85. package/resources/wallets/wallets.mjs.map +1 -1
  86. package/resources/webhooks.d.mts +798 -93
  87. package/resources/webhooks.d.mts.map +1 -1
  88. package/resources/webhooks.d.ts +798 -93
  89. package/resources/webhooks.d.ts.map +1 -1
  90. package/src/client.ts +163 -35
  91. package/src/internal/utils/env.ts +2 -2
  92. package/src/resources/apps.ts +24 -1
  93. package/src/resources/client-auth.ts +17 -17
  94. package/src/resources/embedded-wallets.ts +59 -59
  95. package/src/resources/index.ts +92 -31
  96. package/src/resources/intents.ts +2 -2
  97. package/src/resources/kraken-embed.ts +105 -0
  98. package/src/resources/policies.ts +310 -181
  99. package/src/resources/swaps.ts +4 -4
  100. package/src/resources/transactions.ts +11 -38
  101. package/src/resources/users.ts +724 -724
  102. package/src/resources/wallet-actions.ts +324 -2
  103. package/src/resources/wallets/balance.ts +2 -1
  104. package/src/resources/wallets/index.ts +13 -2
  105. package/src/resources/wallets/transactions.ts +10 -88
  106. package/src/resources/wallets/wallets.ts +319 -136
  107. package/src/resources/webhooks.ts +1021 -141
  108. package/src/version.ts +1 -1
  109. package/version.d.mts +1 -1
  110. package/version.d.ts +1 -1
  111. package/version.js +1 -1
  112. package/version.mjs +1 -1
@@ -471,6 +471,17 @@ export namespace AbiSchema {
471
471
  }
472
472
  }
473
473
 
474
+ /**
475
+ * Operator to use for policy conditions.
476
+ */
477
+ export type ConditionOperator = 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
478
+
479
+ /**
480
+ * Value to compare against in a policy condition. Can be a single string or an
481
+ * array of strings.
482
+ */
483
+ export type ConditionValue = string | Array<string>;
484
+
474
485
  /**
475
486
  * Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
476
487
  * supported for command names.
@@ -484,32 +495,32 @@ export type SuiTransactionCommandOperator = 'eq' | 'in';
484
495
  export type SuiTransferObjectsCommandField = 'recipient' | 'amount';
485
496
 
486
497
  /**
487
- * TRON transaction fields for TransferContract and TriggerSmartContract
488
- * transaction types.
498
+ * The verbatim Ethereum transaction object in an eth_signTransaction or
499
+ * eth_sendTransaction request.
489
500
  */
490
- export interface TronTransactionCondition {
491
- /**
492
- * Supported TRON transaction fields in format "TransactionType.field_name"
493
- */
494
- field:
495
- | 'TransferContract.to_address'
496
- | 'TransferContract.amount'
497
- | 'TriggerSmartContract.contract_address'
498
- | 'TriggerSmartContract.call_value'
499
- | 'TriggerSmartContract.token_id'
500
- | 'TriggerSmartContract.call_token_value';
501
+ export interface EthereumTransactionCondition {
502
+ field: 'to' | 'value' | 'chain_id';
501
503
 
502
- field_source: 'tron_transaction';
504
+ field_source: 'ethereum_transaction';
503
505
 
504
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
506
+ /**
507
+ * Operator to use for policy conditions.
508
+ */
509
+ operator: ConditionOperator;
505
510
 
506
- value: string | Array<string>;
511
+ /**
512
+ * Value to compare against in a policy condition. Can be a single string or an
513
+ * array of strings.
514
+ */
515
+ value: ConditionValue;
507
516
  }
508
517
 
509
518
  /**
510
- * Decoded calldata from a TRON TriggerSmartContract interaction.
519
+ * The decoded calldata in a smart contract interaction as the smart contract
520
+ * method's parameters. Note that that 'ethereum_calldata' conditions must contain
521
+ * an abi parameter with the JSON ABI of the smart contract.
511
522
  */
512
- export interface TronCalldataCondition {
523
+ export interface EthereumCalldataCondition {
513
524
  /**
514
525
  * A Solidity ABI definition for decoding smart contract calldata.
515
526
  */
@@ -517,253 +528,342 @@ export interface TronCalldataCondition {
517
528
 
518
529
  field: string;
519
530
 
520
- field_source: 'tron_trigger_smart_contract_data';
531
+ field_source: 'ethereum_calldata';
521
532
 
522
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
533
+ /**
534
+ * Operator to use for policy conditions.
535
+ */
536
+ operator: ConditionOperator;
523
537
 
524
- value: string | Array<string>;
538
+ /**
539
+ * Value to compare against in a policy condition. Can be a single string or an
540
+ * array of strings.
541
+ */
542
+ value: ConditionValue;
525
543
  }
526
544
 
527
545
  /**
528
- * SUI transaction command attributes, enables allowlisting specific command types.
529
- * Allowed commands: 'TransferObjects', 'SplitCoins', 'MergeCoins'. Only 'eq' and
530
- * 'in' operators are supported.
546
+ * Attributes from the signing domain that will verify the signature.
531
547
  */
532
- export interface SuiTransactionCommandCondition {
533
- field: 'commandName';
548
+ export interface EthereumTypedDataDomainCondition {
549
+ field: 'chainId' | 'verifyingContract' | 'chain_id' | 'verifying_contract';
534
550
 
535
- field_source: 'sui_transaction_command';
551
+ field_source: 'ethereum_typed_data_domain';
536
552
 
537
553
  /**
538
- * Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
539
- * supported for command names.
554
+ * Operator to use for policy conditions.
540
555
  */
541
- operator: SuiTransactionCommandOperator;
556
+ operator: ConditionOperator;
542
557
 
543
558
  /**
544
- * Command name(s) to match. Must be one of: 'TransferObjects', 'SplitCoins',
545
- * 'MergeCoins'
559
+ * Value to compare against in a policy condition. Can be a single string or an
560
+ * array of strings.
546
561
  */
547
- value: WalletsAPI.SuiCommandName | Array<WalletsAPI.SuiCommandName>;
562
+ value: ConditionValue;
548
563
  }
549
564
 
550
565
  /**
551
- * SUI TransferObjects command attributes, including recipient and amount fields.
566
+ * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
567
+ * EIP-712.
552
568
  */
553
- export interface SuiTransferObjectsCommandCondition {
569
+ export interface EthereumTypedDataMessageCondition {
570
+ field: string;
571
+
572
+ field_source: 'ethereum_typed_data_message';
573
+
554
574
  /**
555
- * Supported fields for SUI TransferObjects command conditions. Only 'recipient'
556
- * and 'amount' are supported.
575
+ * Operator to use for policy conditions.
557
576
  */
558
- field: SuiTransferObjectsCommandField;
577
+ operator: ConditionOperator;
559
578
 
560
- field_source: 'sui_transfer_objects_command';
579
+ typed_data: EthereumTypedDataMessageCondition.TypedData;
561
580
 
562
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
581
+ /**
582
+ * Value to compare against in a policy condition. Can be a single string or an
583
+ * array of strings.
584
+ */
585
+ value: ConditionValue;
586
+ }
563
587
 
564
- value: string | Array<string>;
588
+ export namespace EthereumTypedDataMessageCondition {
589
+ export interface TypedData {
590
+ primary_type: string;
591
+
592
+ /**
593
+ * The type definitions for EIP-712 typed data signing.
594
+ */
595
+ types: WalletsAPI.TypedDataTypesInputParams;
596
+ }
565
597
  }
566
598
 
567
599
  /**
568
- * Condition referencing an aggregation value. The field must start with
569
- * "aggregation." followed by the aggregation ID.
600
+ * Allowed contract addresses for eth_sign7702Authorization requests.
570
601
  */
571
- export interface AggregationCondition {
572
- field: string;
602
+ export interface Ethereum7702AuthorizationCondition {
603
+ field: 'contract';
573
604
 
574
- field_source: 'reference';
605
+ field_source: 'ethereum_7702_authorization';
575
606
 
576
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
607
+ /**
608
+ * Operator to use for policy conditions.
609
+ */
610
+ operator: ConditionOperator;
577
611
 
578
- value: string | Array<string>;
612
+ /**
613
+ * Value to compare against in a policy condition. Can be a single string or an
614
+ * array of strings.
615
+ */
616
+ value: ConditionValue;
579
617
  }
580
618
 
581
619
  /**
582
- * A condition that must be true for the rule action to be applied.
620
+ * Solana Program attributes, enables allowlisting Solana Programs.
583
621
  */
584
- export type PolicyCondition =
585
- | PolicyCondition.EthereumTransactionCondition
586
- | PolicyCondition.EthereumCalldataCondition
587
- | PolicyCondition.EthereumTypedDataDomainCondition
588
- | PolicyCondition.EthereumTypedDataMessageCondition
589
- | PolicyCondition.Ethereum7702AuthorizationCondition
590
- | PolicyCondition.SolanaProgramInstructionCondition
591
- | PolicyCondition.SolanaSystemProgramInstructionCondition
592
- | PolicyCondition.SolanaTokenProgramInstructionCondition
593
- | PolicyCondition.SystemCondition
594
- | TronTransactionCondition
595
- | TronCalldataCondition
596
- | SuiTransactionCommandCondition
597
- | SuiTransferObjectsCommandCondition
598
- | AggregationCondition;
622
+ export interface SolanaProgramInstructionCondition {
623
+ field: 'programId';
624
+
625
+ field_source: 'solana_program_instruction';
599
626
 
600
- export namespace PolicyCondition {
601
627
  /**
602
- * The verbatim Ethereum transaction object in an eth_signTransaction or
603
- * eth_sendTransaction request.
628
+ * Operator to use for policy conditions.
604
629
  */
605
- export interface EthereumTransactionCondition {
606
- field: 'to' | 'value' | 'chain_id';
630
+ operator: ConditionOperator;
607
631
 
608
- field_source: 'ethereum_transaction';
632
+ /**
633
+ * Value to compare against in a policy condition. Can be a single string or an
634
+ * array of strings.
635
+ */
636
+ value: ConditionValue;
637
+ }
609
638
 
610
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
639
+ /**
640
+ * Solana System Program attributes, including more granular Transfer instruction
641
+ * fields.
642
+ */
643
+ export interface SolanaSystemProgramInstructionCondition {
644
+ field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
611
645
 
612
- value: string | Array<string>;
613
- }
646
+ field_source: 'solana_system_program_instruction';
614
647
 
615
648
  /**
616
- * The decoded calldata in a smart contract interaction as the smart contract
617
- * method's parameters. Note that that 'ethereum_calldata' conditions must contain
618
- * an abi parameter with the JSON ABI of the smart contract.
649
+ * Operator to use for policy conditions.
619
650
  */
620
- export interface EthereumCalldataCondition {
621
- /**
622
- * A Solidity ABI definition for decoding smart contract calldata.
623
- */
624
- abi: PoliciesAPI.AbiSchema;
651
+ operator: ConditionOperator;
625
652
 
626
- field: string;
653
+ /**
654
+ * Value to compare against in a policy condition. Can be a single string or an
655
+ * array of strings.
656
+ */
657
+ value: ConditionValue;
658
+ }
627
659
 
628
- field_source: 'ethereum_calldata';
660
+ /**
661
+ * Solana Token Program attributes, including more granular TransferChecked
662
+ * instruction fields.
663
+ */
664
+ export interface SolanaTokenProgramInstructionCondition {
665
+ field:
666
+ | 'instructionName'
667
+ | 'Transfer.source'
668
+ | 'Transfer.destination'
669
+ | 'Transfer.authority'
670
+ | 'Transfer.amount'
671
+ | 'TransferChecked.source'
672
+ | 'TransferChecked.destination'
673
+ | 'TransferChecked.authority'
674
+ | 'TransferChecked.amount'
675
+ | 'TransferChecked.mint'
676
+ | 'Burn.account'
677
+ | 'Burn.mint'
678
+ | 'Burn.authority'
679
+ | 'Burn.amount'
680
+ | 'MintTo.mint'
681
+ | 'MintTo.account'
682
+ | 'MintTo.authority'
683
+ | 'MintTo.amount'
684
+ | 'CloseAccount.account'
685
+ | 'CloseAccount.destination'
686
+ | 'CloseAccount.authority'
687
+ | 'InitializeAccount3.account'
688
+ | 'InitializeAccount3.mint'
689
+ | 'InitializeAccount3.owner';
690
+
691
+ field_source: 'solana_token_program_instruction';
692
+
693
+ /**
694
+ * Operator to use for policy conditions.
695
+ */
696
+ operator: ConditionOperator;
697
+
698
+ /**
699
+ * Value to compare against in a policy condition. Can be a single string or an
700
+ * array of strings.
701
+ */
702
+ value: ConditionValue;
703
+ }
629
704
 
630
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
705
+ /**
706
+ * System attributes, including current unix timestamp (in seconds).
707
+ */
708
+ export interface SystemCondition {
709
+ field: 'current_unix_timestamp';
631
710
 
632
- value: string | Array<string>;
633
- }
711
+ field_source: 'system';
634
712
 
635
713
  /**
636
- * Attributes from the signing domain that will verify the signature.
714
+ * Operator to use for policy conditions.
637
715
  */
638
- export interface EthereumTypedDataDomainCondition {
639
- field: 'chainId' | 'verifyingContract' | 'chain_id' | 'verifying_contract';
640
-
641
- field_source: 'ethereum_typed_data_domain';
716
+ operator: ConditionOperator;
642
717
 
643
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
644
-
645
- value: string | Array<string>;
646
- }
718
+ /**
719
+ * Value to compare against in a policy condition. Can be a single string or an
720
+ * array of strings.
721
+ */
722
+ value: ConditionValue;
723
+ }
647
724
 
725
+ /**
726
+ * TRON transaction fields for TransferContract and TriggerSmartContract
727
+ * transaction types.
728
+ */
729
+ export interface TronTransactionCondition {
648
730
  /**
649
- * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
650
- * EIP-712.
731
+ * Supported TRON transaction fields in format "TransactionType.field_name"
651
732
  */
652
- export interface EthereumTypedDataMessageCondition {
653
- field: string;
733
+ field:
734
+ | 'TransferContract.to_address'
735
+ | 'TransferContract.amount'
736
+ | 'TriggerSmartContract.contract_address'
737
+ | 'TriggerSmartContract.call_value'
738
+ | 'TriggerSmartContract.token_id'
739
+ | 'TriggerSmartContract.call_token_value';
654
740
 
655
- field_source: 'ethereum_typed_data_message';
741
+ field_source: 'tron_transaction';
656
742
 
657
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
743
+ /**
744
+ * Operator to use for policy conditions.
745
+ */
746
+ operator: ConditionOperator;
658
747
 
659
- typed_data: EthereumTypedDataMessageCondition.TypedData;
748
+ /**
749
+ * Value to compare against in a policy condition. Can be a single string or an
750
+ * array of strings.
751
+ */
752
+ value: ConditionValue;
753
+ }
660
754
 
661
- value: string | Array<string>;
662
- }
755
+ /**
756
+ * Decoded calldata from a TRON TriggerSmartContract interaction.
757
+ */
758
+ export interface TronCalldataCondition {
759
+ /**
760
+ * A Solidity ABI definition for decoding smart contract calldata.
761
+ */
762
+ abi: AbiSchema;
663
763
 
664
- export namespace EthereumTypedDataMessageCondition {
665
- export interface TypedData {
666
- primary_type: string;
764
+ field: string;
667
765
 
668
- /**
669
- * The type definitions for EIP-712 typed data signing.
670
- */
671
- types: WalletsAPI.TypedDataTypesInputParams;
672
- }
673
- }
766
+ field_source: 'tron_trigger_smart_contract_data';
674
767
 
675
768
  /**
676
- * Allowed contract addresses for eth_sign7702Authorization requests.
769
+ * Operator to use for policy conditions.
677
770
  */
678
- export interface Ethereum7702AuthorizationCondition {
679
- field: 'contract';
771
+ operator: ConditionOperator;
680
772
 
681
- field_source: 'ethereum_7702_authorization';
773
+ /**
774
+ * Value to compare against in a policy condition. Can be a single string or an
775
+ * array of strings.
776
+ */
777
+ value: ConditionValue;
778
+ }
682
779
 
683
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
780
+ /**
781
+ * SUI transaction command attributes, enables allowlisting specific command types.
782
+ * Allowed commands: 'TransferObjects', 'SplitCoins', 'MergeCoins'. Only 'eq' and
783
+ * 'in' operators are supported.
784
+ */
785
+ export interface SuiTransactionCommandCondition {
786
+ field: 'commandName';
684
787
 
685
- value: string | Array<string>;
686
- }
788
+ field_source: 'sui_transaction_command';
687
789
 
688
790
  /**
689
- * Solana Program attributes, enables allowlisting Solana Programs.
791
+ * Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
792
+ * supported for command names.
690
793
  */
691
- export interface SolanaProgramInstructionCondition {
692
- field: 'programId';
794
+ operator: SuiTransactionCommandOperator;
693
795
 
694
- field_source: 'solana_program_instruction';
796
+ /**
797
+ * Command name(s) to match. Must be one of: 'TransferObjects', 'SplitCoins',
798
+ * 'MergeCoins'
799
+ */
800
+ value: WalletsAPI.SuiCommandName | Array<WalletsAPI.SuiCommandName>;
801
+ }
695
802
 
696
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
803
+ /**
804
+ * SUI TransferObjects command attributes, including recipient and amount fields.
805
+ */
806
+ export interface SuiTransferObjectsCommandCondition {
807
+ /**
808
+ * Supported fields for SUI TransferObjects command conditions. Only 'recipient'
809
+ * and 'amount' are supported.
810
+ */
811
+ field: SuiTransferObjectsCommandField;
697
812
 
698
- value: string | Array<string>;
699
- }
813
+ field_source: 'sui_transfer_objects_command';
700
814
 
701
815
  /**
702
- * Solana System Program attributes, including more granular Transfer instruction
703
- * fields.
816
+ * Operator to use for policy conditions.
704
817
  */
705
- export interface SolanaSystemProgramInstructionCondition {
706
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
818
+ operator: ConditionOperator;
707
819
 
708
- field_source: 'solana_system_program_instruction';
820
+ /**
821
+ * Value to compare against in a policy condition. Can be a single string or an
822
+ * array of strings.
823
+ */
824
+ value: ConditionValue;
825
+ }
709
826
 
710
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
827
+ /**
828
+ * Condition referencing an aggregation value. The field must start with
829
+ * "aggregation." followed by the aggregation ID.
830
+ */
831
+ export interface AggregationCondition {
832
+ field: string;
711
833
 
712
- value: string | Array<string>;
713
- }
834
+ field_source: 'reference';
714
835
 
715
836
  /**
716
- * Solana Token Program attributes, including more granular TransferChecked
717
- * instruction fields.
718
- */
719
- export interface SolanaTokenProgramInstructionCondition {
720
- field:
721
- | 'instructionName'
722
- | 'Transfer.source'
723
- | 'Transfer.destination'
724
- | 'Transfer.authority'
725
- | 'Transfer.amount'
726
- | 'TransferChecked.source'
727
- | 'TransferChecked.destination'
728
- | 'TransferChecked.authority'
729
- | 'TransferChecked.amount'
730
- | 'TransferChecked.mint'
731
- | 'Burn.account'
732
- | 'Burn.mint'
733
- | 'Burn.authority'
734
- | 'Burn.amount'
735
- | 'MintTo.mint'
736
- | 'MintTo.account'
737
- | 'MintTo.authority'
738
- | 'MintTo.amount'
739
- | 'CloseAccount.account'
740
- | 'CloseAccount.destination'
741
- | 'CloseAccount.authority'
742
- | 'InitializeAccount3.account'
743
- | 'InitializeAccount3.mint'
744
- | 'InitializeAccount3.owner';
745
-
746
- field_source: 'solana_token_program_instruction';
747
-
748
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
749
-
750
- value: string | Array<string>;
751
- }
837
+ * Operator to use for policy conditions.
838
+ */
839
+ operator: ConditionOperator;
752
840
 
753
841
  /**
754
- * System attributes, including current unix timestamp (in seconds).
842
+ * Value to compare against in a policy condition. Can be a single string or an
843
+ * array of strings.
755
844
  */
756
- export interface SystemCondition {
757
- field: 'current_unix_timestamp';
758
-
759
- field_source: 'system';
760
-
761
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
762
-
763
- value: string | Array<string>;
764
- }
845
+ value: ConditionValue;
765
846
  }
766
847
 
848
+ /**
849
+ * A condition that must be true for the rule action to be applied.
850
+ */
851
+ export type PolicyCondition =
852
+ | EthereumTransactionCondition
853
+ | EthereumCalldataCondition
854
+ | EthereumTypedDataDomainCondition
855
+ | EthereumTypedDataMessageCondition
856
+ | Ethereum7702AuthorizationCondition
857
+ | SolanaProgramInstructionCondition
858
+ | SolanaSystemProgramInstructionCondition
859
+ | SolanaTokenProgramInstructionCondition
860
+ | SystemCondition
861
+ | TronTransactionCondition
862
+ | TronCalldataCondition
863
+ | SuiTransactionCommandCondition
864
+ | SuiTransferObjectsCommandCondition
865
+ | AggregationCondition;
866
+
767
867
  /**
768
868
  * Method the rule applies to.
769
869
  */
@@ -860,6 +960,22 @@ export interface Policy {
860
960
  version: '1.0';
861
961
  }
862
962
 
963
+ /**
964
+ * Unique ID of the policy to take actions on.
965
+ */
966
+ export interface PolicyRequestBody {
967
+ policy_id: string;
968
+ }
969
+
970
+ /**
971
+ * Unique IDs of the policy and the rule within the policy to take actions on.
972
+ */
973
+ export interface PolicyRuleRequestParams {
974
+ policy_id: string;
975
+
976
+ rule_id: string;
977
+ }
978
+
863
979
  /**
864
980
  * Headers required to authorize modifications to policies.
865
981
  */
@@ -1125,8 +1241,19 @@ export declare namespace Policies {
1125
1241
  type PolicyAction as PolicyAction,
1126
1242
  type AbiParameter as AbiParameter,
1127
1243
  type AbiSchema as AbiSchema,
1244
+ type ConditionOperator as ConditionOperator,
1245
+ type ConditionValue as ConditionValue,
1128
1246
  type SuiTransactionCommandOperator as SuiTransactionCommandOperator,
1129
1247
  type SuiTransferObjectsCommandField as SuiTransferObjectsCommandField,
1248
+ type EthereumTransactionCondition as EthereumTransactionCondition,
1249
+ type EthereumCalldataCondition as EthereumCalldataCondition,
1250
+ type EthereumTypedDataDomainCondition as EthereumTypedDataDomainCondition,
1251
+ type EthereumTypedDataMessageCondition as EthereumTypedDataMessageCondition,
1252
+ type Ethereum7702AuthorizationCondition as Ethereum7702AuthorizationCondition,
1253
+ type SolanaProgramInstructionCondition as SolanaProgramInstructionCondition,
1254
+ type SolanaSystemProgramInstructionCondition as SolanaSystemProgramInstructionCondition,
1255
+ type SolanaTokenProgramInstructionCondition as SolanaTokenProgramInstructionCondition,
1256
+ type SystemCondition as SystemCondition,
1130
1257
  type TronTransactionCondition as TronTransactionCondition,
1131
1258
  type TronCalldataCondition as TronCalldataCondition,
1132
1259
  type SuiTransactionCommandCondition as SuiTransactionCommandCondition,
@@ -1137,6 +1264,8 @@ export declare namespace Policies {
1137
1264
  type PolicyRuleRequestBody as PolicyRuleRequestBody,
1138
1265
  type PolicyRuleResponse as PolicyRuleResponse,
1139
1266
  type Policy as Policy,
1267
+ type PolicyRequestBody as PolicyRequestBody,
1268
+ type PolicyRuleRequestParams as PolicyRuleRequestParams,
1140
1269
  type PolicyAuthorizationHeaders as PolicyAuthorizationHeaders,
1141
1270
  type ConditionSetAuthorizationHeaders as ConditionSetAuthorizationHeaders,
1142
1271
  type PolicyCreateParams as PolicyCreateParams,
@@ -12,7 +12,7 @@ export type SwapAmountType = 'exact_input' | 'exact_output';
12
12
  /**
13
13
  * Input for requesting a token swap quote.
14
14
  */
15
- export interface SwapQuoteRequest {
15
+ export interface SwapQuoteRequestBody {
16
16
  /**
17
17
  * Amount in base units (e.g., wei for ETH).
18
18
  */
@@ -88,7 +88,7 @@ export interface SwapQuoteResponse {
88
88
  /**
89
89
  * Input for executing a token swap.
90
90
  */
91
- export interface SwapRequest {
91
+ export interface SwapRequestBody {
92
92
  /**
93
93
  * Amount in base units (e.g., wei for ETH).
94
94
  */
@@ -129,8 +129,8 @@ export interface SwapRequest {
129
129
  export declare namespace Swaps {
130
130
  export {
131
131
  type SwapAmountType as SwapAmountType,
132
- type SwapQuoteRequest as SwapQuoteRequest,
132
+ type SwapQuoteRequestBody as SwapQuoteRequestBody,
133
133
  type SwapQuoteResponse as SwapQuoteResponse,
134
- type SwapRequest as SwapRequest,
134
+ type SwapRequestBody as SwapRequestBody,
135
135
  };
136
136
  }