@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.
- package/CHANGELOG.md +19 -0
- package/client.d.mts +19 -19
- package/client.d.mts.map +1 -1
- package/client.d.ts +19 -19
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs +1 -1
- package/client.mjs.map +1 -1
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/apps.d.mts +16 -2
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +16 -2
- package/resources/apps.d.ts.map +1 -1
- package/resources/client-auth.d.mts +14 -14
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +14 -14
- package/resources/client-auth.d.ts.map +1 -1
- package/resources/embedded-wallets.d.mts +50 -50
- package/resources/embedded-wallets.d.mts.map +1 -1
- package/resources/embedded-wallets.d.ts +50 -50
- package/resources/embedded-wallets.d.ts.map +1 -1
- package/resources/index.d.mts +11 -11
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +11 -11
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/intents.d.mts +2 -2
- package/resources/intents.d.mts.map +1 -1
- package/resources/intents.d.ts +2 -2
- package/resources/intents.d.ts.map +1 -1
- package/resources/kraken-embed.d.mts +52 -1
- package/resources/kraken-embed.d.mts.map +1 -1
- package/resources/kraken-embed.d.ts +52 -1
- package/resources/kraken-embed.d.ts.map +1 -1
- package/resources/policies.d.mts +223 -112
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +223 -112
- package/resources/policies.d.ts.map +1 -1
- package/resources/swaps.d.mts +3 -3
- package/resources/swaps.d.mts.map +1 -1
- package/resources/swaps.d.ts +3 -3
- package/resources/swaps.d.ts.map +1 -1
- package/resources/transactions.d.mts +10 -20
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +10 -20
- package/resources/transactions.d.ts.map +1 -1
- package/resources/users.d.mts +199 -199
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +199 -199
- package/resources/users.d.ts.map +1 -1
- package/resources/wallet-actions.d.mts +255 -3
- package/resources/wallet-actions.d.mts.map +1 -1
- package/resources/wallet-actions.d.ts +255 -3
- package/resources/wallet-actions.d.ts.map +1 -1
- package/resources/wallets/balance.d.mts +2 -1
- package/resources/wallets/balance.d.mts.map +1 -1
- package/resources/wallets/balance.d.ts +2 -1
- package/resources/wallets/balance.d.ts.map +1 -1
- package/resources/wallets/balance.js.map +1 -1
- package/resources/wallets/balance.mjs.map +1 -1
- package/resources/wallets/index.d.mts +1 -1
- package/resources/wallets/index.d.mts.map +1 -1
- package/resources/wallets/index.d.ts +1 -1
- package/resources/wallets/index.d.ts.map +1 -1
- package/resources/wallets/index.js.map +1 -1
- package/resources/wallets/index.mjs.map +1 -1
- package/resources/wallets/transactions.d.mts +10 -30
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +10 -30
- package/resources/wallets/transactions.d.ts.map +1 -1
- package/resources/wallets/transactions.js.map +1 -1
- package/resources/wallets/transactions.mjs.map +1 -1
- package/resources/wallets/wallets.d.mts +222 -116
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +222 -116
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +6 -5
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +6 -5
- package/resources/wallets/wallets.mjs.map +1 -1
- package/resources/webhooks.d.mts +798 -93
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +798 -93
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +163 -35
- package/src/internal/utils/env.ts +2 -2
- package/src/resources/apps.ts +24 -1
- package/src/resources/client-auth.ts +17 -17
- package/src/resources/embedded-wallets.ts +59 -59
- package/src/resources/index.ts +92 -31
- package/src/resources/intents.ts +2 -2
- package/src/resources/kraken-embed.ts +105 -0
- package/src/resources/policies.ts +310 -181
- package/src/resources/swaps.ts +4 -4
- package/src/resources/transactions.ts +11 -38
- package/src/resources/users.ts +724 -724
- package/src/resources/wallet-actions.ts +324 -2
- package/src/resources/wallets/balance.ts +2 -1
- package/src/resources/wallets/index.ts +13 -2
- package/src/resources/wallets/transactions.ts +10 -88
- package/src/resources/wallets/wallets.ts +319 -136
- package/src/resources/webhooks.ts +1021 -141
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- 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
|
-
*
|
|
488
|
-
*
|
|
498
|
+
* The verbatim Ethereum transaction object in an eth_signTransaction or
|
|
499
|
+
* eth_sendTransaction request.
|
|
489
500
|
*/
|
|
490
|
-
export interface
|
|
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: '
|
|
504
|
+
field_source: 'ethereum_transaction';
|
|
503
505
|
|
|
504
|
-
|
|
506
|
+
/**
|
|
507
|
+
* Operator to use for policy conditions.
|
|
508
|
+
*/
|
|
509
|
+
operator: ConditionOperator;
|
|
505
510
|
|
|
506
|
-
|
|
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
|
-
*
|
|
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
|
|
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: '
|
|
531
|
+
field_source: 'ethereum_calldata';
|
|
521
532
|
|
|
522
|
-
|
|
533
|
+
/**
|
|
534
|
+
* Operator to use for policy conditions.
|
|
535
|
+
*/
|
|
536
|
+
operator: ConditionOperator;
|
|
523
537
|
|
|
524
|
-
|
|
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
|
-
*
|
|
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
|
|
533
|
-
field: '
|
|
548
|
+
export interface EthereumTypedDataDomainCondition {
|
|
549
|
+
field: 'chainId' | 'verifyingContract' | 'chain_id' | 'verifying_contract';
|
|
534
550
|
|
|
535
|
-
field_source: '
|
|
551
|
+
field_source: 'ethereum_typed_data_domain';
|
|
536
552
|
|
|
537
553
|
/**
|
|
538
|
-
* Operator to use for
|
|
539
|
-
* supported for command names.
|
|
554
|
+
* Operator to use for policy conditions.
|
|
540
555
|
*/
|
|
541
|
-
operator:
|
|
556
|
+
operator: ConditionOperator;
|
|
542
557
|
|
|
543
558
|
/**
|
|
544
|
-
*
|
|
545
|
-
*
|
|
559
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
560
|
+
* array of strings.
|
|
546
561
|
*/
|
|
547
|
-
value:
|
|
562
|
+
value: ConditionValue;
|
|
548
563
|
}
|
|
549
564
|
|
|
550
565
|
/**
|
|
551
|
-
*
|
|
566
|
+
* 'types' and 'primary_type' attributes of the TypedData JSON object defined in
|
|
567
|
+
* EIP-712.
|
|
552
568
|
*/
|
|
553
|
-
export interface
|
|
569
|
+
export interface EthereumTypedDataMessageCondition {
|
|
570
|
+
field: string;
|
|
571
|
+
|
|
572
|
+
field_source: 'ethereum_typed_data_message';
|
|
573
|
+
|
|
554
574
|
/**
|
|
555
|
-
*
|
|
556
|
-
* and 'amount' are supported.
|
|
575
|
+
* Operator to use for policy conditions.
|
|
557
576
|
*/
|
|
558
|
-
|
|
577
|
+
operator: ConditionOperator;
|
|
559
578
|
|
|
560
|
-
|
|
579
|
+
typed_data: EthereumTypedDataMessageCondition.TypedData;
|
|
561
580
|
|
|
562
|
-
|
|
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
|
-
|
|
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
|
-
*
|
|
569
|
-
* "aggregation." followed by the aggregation ID.
|
|
600
|
+
* Allowed contract addresses for eth_sign7702Authorization requests.
|
|
570
601
|
*/
|
|
571
|
-
export interface
|
|
572
|
-
field:
|
|
602
|
+
export interface Ethereum7702AuthorizationCondition {
|
|
603
|
+
field: 'contract';
|
|
573
604
|
|
|
574
|
-
field_source: '
|
|
605
|
+
field_source: 'ethereum_7702_authorization';
|
|
575
606
|
|
|
576
|
-
|
|
607
|
+
/**
|
|
608
|
+
* Operator to use for policy conditions.
|
|
609
|
+
*/
|
|
610
|
+
operator: ConditionOperator;
|
|
577
611
|
|
|
578
|
-
|
|
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
|
-
*
|
|
620
|
+
* Solana Program attributes, enables allowlisting Solana Programs.
|
|
583
621
|
*/
|
|
584
|
-
export
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
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
|
-
*
|
|
603
|
-
* eth_sendTransaction request.
|
|
628
|
+
* Operator to use for policy conditions.
|
|
604
629
|
*/
|
|
605
|
-
|
|
606
|
-
field: 'to' | 'value' | 'chain_id';
|
|
630
|
+
operator: ConditionOperator;
|
|
607
631
|
|
|
608
|
-
|
|
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
|
-
|
|
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
|
-
|
|
613
|
-
}
|
|
646
|
+
field_source: 'solana_system_program_instruction';
|
|
614
647
|
|
|
615
648
|
/**
|
|
616
|
-
*
|
|
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
|
-
|
|
621
|
-
/**
|
|
622
|
-
* A Solidity ABI definition for decoding smart contract calldata.
|
|
623
|
-
*/
|
|
624
|
-
abi: PoliciesAPI.AbiSchema;
|
|
651
|
+
operator: ConditionOperator;
|
|
625
652
|
|
|
626
|
-
|
|
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
|
-
|
|
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
|
-
|
|
705
|
+
/**
|
|
706
|
+
* System attributes, including current unix timestamp (in seconds).
|
|
707
|
+
*/
|
|
708
|
+
export interface SystemCondition {
|
|
709
|
+
field: 'current_unix_timestamp';
|
|
631
710
|
|
|
632
|
-
|
|
633
|
-
}
|
|
711
|
+
field_source: 'system';
|
|
634
712
|
|
|
635
713
|
/**
|
|
636
|
-
*
|
|
714
|
+
* Operator to use for policy conditions.
|
|
637
715
|
*/
|
|
638
|
-
|
|
639
|
-
field: 'chainId' | 'verifyingContract' | 'chain_id' | 'verifying_contract';
|
|
640
|
-
|
|
641
|
-
field_source: 'ethereum_typed_data_domain';
|
|
716
|
+
operator: ConditionOperator;
|
|
642
717
|
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
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
|
-
*
|
|
650
|
-
* EIP-712.
|
|
731
|
+
* Supported TRON transaction fields in format "TransactionType.field_name"
|
|
651
732
|
*/
|
|
652
|
-
|
|
653
|
-
|
|
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
|
-
|
|
741
|
+
field_source: 'tron_transaction';
|
|
656
742
|
|
|
657
|
-
|
|
743
|
+
/**
|
|
744
|
+
* Operator to use for policy conditions.
|
|
745
|
+
*/
|
|
746
|
+
operator: ConditionOperator;
|
|
658
747
|
|
|
659
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
*
|
|
769
|
+
* Operator to use for policy conditions.
|
|
677
770
|
*/
|
|
678
|
-
|
|
679
|
-
field: 'contract';
|
|
771
|
+
operator: ConditionOperator;
|
|
680
772
|
|
|
681
|
-
|
|
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
|
-
|
|
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
|
-
|
|
686
|
-
}
|
|
788
|
+
field_source: 'sui_transaction_command';
|
|
687
789
|
|
|
688
790
|
/**
|
|
689
|
-
*
|
|
791
|
+
* Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
|
|
792
|
+
* supported for command names.
|
|
690
793
|
*/
|
|
691
|
-
|
|
692
|
-
field: 'programId';
|
|
794
|
+
operator: SuiTransactionCommandOperator;
|
|
693
795
|
|
|
694
|
-
|
|
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
|
-
|
|
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
|
-
|
|
699
|
-
}
|
|
813
|
+
field_source: 'sui_transfer_objects_command';
|
|
700
814
|
|
|
701
815
|
/**
|
|
702
|
-
*
|
|
703
|
-
* fields.
|
|
816
|
+
* Operator to use for policy conditions.
|
|
704
817
|
*/
|
|
705
|
-
|
|
706
|
-
field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
|
|
818
|
+
operator: ConditionOperator;
|
|
707
819
|
|
|
708
|
-
|
|
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
|
-
|
|
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
|
-
|
|
713
|
-
}
|
|
834
|
+
field_source: 'reference';
|
|
714
835
|
|
|
715
836
|
/**
|
|
716
|
-
*
|
|
717
|
-
|
|
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
|
-
*
|
|
842
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
843
|
+
* array of strings.
|
|
755
844
|
*/
|
|
756
|
-
|
|
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,
|
package/src/resources/swaps.ts
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
132
|
+
type SwapQuoteRequestBody as SwapQuoteRequestBody,
|
|
133
133
|
type SwapQuoteResponse as SwapQuoteResponse,
|
|
134
|
-
type
|
|
134
|
+
type SwapRequestBody as SwapRequestBody,
|
|
135
135
|
};
|
|
136
136
|
}
|