privy_ruby 0.3.0 → 0.5.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 (158) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/README.md +1 -1
  4. data/lib/privy/authorization/canonicalization.rb +2 -0
  5. data/lib/privy/models/custom_token_transfer_source.rb +14 -13
  6. data/lib/privy/models/ethereum_yield_provider.rb +1 -0
  7. data/lib/privy/models/named_token_transfer_source.rb +14 -13
  8. data/lib/privy/models/rpc_intent_request_details.rb +2 -2
  9. data/lib/privy/models/rpc_intent_response.rb +2 -2
  10. data/lib/privy/models/spark_coop_exit_fee_quote.rb +101 -0
  11. data/lib/privy/models/spark_coop_exit_request.rb +90 -0
  12. data/lib/privy/models/spark_currency_amount.rb +23 -0
  13. data/lib/privy/models/spark_exit_speed.rb +17 -0
  14. data/lib/privy/models/spark_get_withdrawal_fee_quote_rpc_input.rb +43 -0
  15. data/lib/privy/models/spark_get_withdrawal_fee_quote_rpc_input_params.rb +23 -0
  16. data/lib/privy/models/spark_get_withdrawal_fee_quote_rpc_response.rb +35 -0
  17. data/lib/privy/models/spark_rpc_input.rb +7 -1
  18. data/lib/privy/models/spark_rpc_response.rb +7 -1
  19. data/lib/privy/models/spark_withdraw_rpc_input.rb +43 -0
  20. data/lib/privy/models/spark_withdraw_rpc_input_params.rb +53 -0
  21. data/lib/privy/models/spark_withdraw_rpc_response.rb +35 -0
  22. data/lib/privy/models/transaction_chain_name_input.rb +25 -0
  23. data/lib/privy/models/transfer_received_transaction_detail.rb +6 -0
  24. data/lib/privy/models/transfer_sent_transaction_detail.rb +6 -0
  25. data/lib/privy/models/unsafe_unwrap_webhook_event.rb +17 -1
  26. data/lib/privy/models/wallet_action_earn_fee_collect_created_webhook_payload.rb +153 -0
  27. data/lib/privy/models/wallet_action_earn_fee_collect_failed_webhook_payload.rb +178 -0
  28. data/lib/privy/models/wallet_action_earn_fee_collect_rejected_webhook_payload.rb +177 -0
  29. data/lib/privy/models/wallet_action_earn_fee_collect_succeeded_webhook_payload.rb +169 -0
  30. data/lib/privy/models/wallet_asset.rb +2 -0
  31. data/lib/privy/models/wallet_asset_chain_name_input.rb +3 -0
  32. data/lib/privy/models/wallet_creation_input.rb +11 -1
  33. data/lib/privy/models/wallet_ethereum_asset.rb +1 -0
  34. data/lib/privy/models/wallet_rpc_request_body.rb +7 -1
  35. data/lib/privy/models/wallet_rpc_response.rb +7 -1
  36. data/lib/privy/models/wallet_tron_asset.rb +17 -0
  37. data/lib/privy/models/wallets/aave_vault_details.rb +130 -0
  38. data/lib/privy/models/wallets/balance_get_params.rb +6 -0
  39. data/lib/privy/models/wallets/balance_get_response.rb +6 -0
  40. data/lib/privy/models/wallets/earn_fee_collect_action_response.rb +149 -0
  41. data/lib/privy/models/wallets/earn_fee_collect_request_body.rb +20 -0
  42. data/lib/privy/models/wallets/ethereum_earn_provider.rb +1 -0
  43. data/lib/privy/models/wallets/ethereum_earn_vault_details_response.rb +13 -83
  44. data/lib/privy/models/wallets/list_wallet_actions_response.rb +2 -2
  45. data/lib/privy/models/wallets/morpho_vault_details.rb +130 -0
  46. data/lib/privy/models/wallets/transaction_get_params.rb +10 -20
  47. data/lib/privy/models/wallets/veda_vault_details.rb +122 -0
  48. data/lib/privy/models/wallets/wallet_action_response.rb +4 -1
  49. data/lib/privy/models/wallets/wallet_action_type.rb +1 -0
  50. data/lib/privy/models/webhook_payload.rb +13 -1
  51. data/lib/privy/models.rb +36 -0
  52. data/lib/privy/public_api/services/tron.rb +103 -0
  53. data/lib/privy/public_api/services/wallets.rb +4 -0
  54. data/lib/privy/resources/intents.rb +1 -1
  55. data/lib/privy/resources/wallets/actions.rb +1 -1
  56. data/lib/privy/resources/wallets/transactions.rb +1 -1
  57. data/lib/privy/resources/wallets.rb +2 -2
  58. data/lib/privy/resources/webhooks.rb +1 -1
  59. data/lib/privy/version.rb +1 -1
  60. data/lib/privy.rb +22 -0
  61. data/rbi/privy/models/custom_token_transfer_source.rbi +18 -13
  62. data/rbi/privy/models/ethereum_yield_provider.rbi +1 -0
  63. data/rbi/privy/models/named_token_transfer_source.rbi +18 -13
  64. data/rbi/privy/models/rpc_intent_request_details.rbi +6 -0
  65. data/rbi/privy/models/rpc_intent_response.rbi +2 -0
  66. data/rbi/privy/models/spark_coop_exit_fee_quote.rbi +143 -0
  67. data/rbi/privy/models/spark_coop_exit_request.rbi +114 -0
  68. data/rbi/privy/models/spark_currency_amount.rbi +31 -0
  69. data/rbi/privy/models/spark_exit_speed.rbi +21 -0
  70. data/rbi/privy/models/spark_get_withdrawal_fee_quote_rpc_input.rbi +94 -0
  71. data/rbi/privy/models/spark_get_withdrawal_fee_quote_rpc_input_params.rbi +34 -0
  72. data/rbi/privy/models/spark_get_withdrawal_fee_quote_rpc_response.rbi +82 -0
  73. data/rbi/privy/models/spark_rpc_input.rbi +3 -1
  74. data/rbi/privy/models/spark_rpc_response.rbi +3 -1
  75. data/rbi/privy/models/spark_withdraw_rpc_input.rbi +77 -0
  76. data/rbi/privy/models/spark_withdraw_rpc_input_params.rbi +80 -0
  77. data/rbi/privy/models/spark_withdraw_rpc_response.rbi +71 -0
  78. data/rbi/privy/models/transaction_chain_name_input.rbi +38 -0
  79. data/rbi/privy/models/transfer_received_transaction_detail.rbi +10 -0
  80. data/rbi/privy/models/transfer_sent_transaction_detail.rbi +4 -0
  81. data/rbi/privy/models/unsafe_unwrap_webhook_event.rbi +4 -0
  82. data/rbi/privy/models/wallet_action_earn_fee_collect_created_webhook_payload.rbi +232 -0
  83. data/rbi/privy/models/wallet_action_earn_fee_collect_failed_webhook_payload.rbi +271 -0
  84. data/rbi/privy/models/wallet_action_earn_fee_collect_rejected_webhook_payload.rbi +269 -0
  85. data/rbi/privy/models/wallet_action_earn_fee_collect_succeeded_webhook_payload.rbi +258 -0
  86. data/rbi/privy/models/wallet_asset.rbi +2 -0
  87. data/rbi/privy/models/wallet_asset_chain_name_input.rbi +4 -0
  88. data/rbi/privy/models/wallet_creation_input.rbi +15 -0
  89. data/rbi/privy/models/wallet_ethereum_asset.rbi +1 -0
  90. data/rbi/privy/models/wallet_rpc_request_body.rbi +2 -0
  91. data/rbi/privy/models/wallet_rpc_response.rbi +2 -0
  92. data/rbi/privy/models/wallet_tron_asset.rbi +21 -0
  93. data/rbi/privy/models/wallets/aave_vault_details.rbi +165 -0
  94. data/rbi/privy/models/wallets/balance_get_params.rbi +4 -0
  95. data/rbi/privy/models/wallets/balance_get_response.rbi +10 -0
  96. data/rbi/privy/models/wallets/earn_fee_collect_action_response.rbi +236 -0
  97. data/rbi/privy/models/wallets/earn_fee_collect_request_body.rbi +33 -0
  98. data/rbi/privy/models/wallets/ethereum_earn_provider.rbi +1 -0
  99. data/rbi/privy/models/wallets/ethereum_earn_vault_details_response.rbi +11 -103
  100. data/rbi/privy/models/wallets/list_wallet_actions_response.rbi +6 -3
  101. data/rbi/privy/models/wallets/morpho_vault_details.rbi +167 -0
  102. data/rbi/privy/models/wallets/transaction_get_params.rbi +15 -69
  103. data/rbi/privy/models/wallets/veda_vault_details.rbi +157 -0
  104. data/rbi/privy/models/wallets/wallet_action_response.rbi +2 -1
  105. data/rbi/privy/models/wallets/wallet_action_type.rbi +5 -0
  106. data/rbi/privy/models/webhook_payload.rbi +5 -1
  107. data/rbi/privy/models.rbi +39 -0
  108. data/rbi/privy/resources/intents.rbi +2 -0
  109. data/rbi/privy/resources/wallets/transactions.rbi +2 -1
  110. data/rbi/privy/resources/wallets.rbi +2 -0
  111. data/rbi/privy/resources/webhooks.rbi +4 -0
  112. data/sig/privy/models/custom_token_transfer_source.rbs +8 -6
  113. data/sig/privy/models/ethereum_yield_provider.rbs +2 -1
  114. data/sig/privy/models/named_token_transfer_source.rbs +7 -5
  115. data/sig/privy/models/spark_coop_exit_fee_quote.rbs +75 -0
  116. data/sig/privy/models/spark_coop_exit_request.rbs +76 -0
  117. data/sig/privy/models/spark_currency_amount.rbs +16 -0
  118. data/sig/privy/models/spark_exit_speed.rbs +15 -0
  119. data/sig/privy/models/spark_get_withdrawal_fee_quote_rpc_input.rbs +44 -0
  120. data/sig/privy/models/spark_get_withdrawal_fee_quote_rpc_input_params.rbs +16 -0
  121. data/sig/privy/models/spark_get_withdrawal_fee_quote_rpc_response.rbs +37 -0
  122. data/sig/privy/models/spark_rpc_input.rbs +2 -0
  123. data/sig/privy/models/spark_rpc_response.rbs +2 -0
  124. data/sig/privy/models/spark_withdraw_rpc_input.rbs +44 -0
  125. data/sig/privy/models/spark_withdraw_rpc_input_params.rbs +53 -0
  126. data/sig/privy/models/spark_withdraw_rpc_response.rbs +37 -0
  127. data/sig/privy/models/transaction_chain_name_input.rbs +34 -0
  128. data/sig/privy/models/transfer_received_transaction_detail.rbs +4 -0
  129. data/sig/privy/models/transfer_sent_transaction_detail.rbs +4 -0
  130. data/sig/privy/models/unsafe_unwrap_webhook_event.rbs +4 -0
  131. data/sig/privy/models/wallet_action_earn_fee_collect_created_webhook_payload.rbs +111 -0
  132. data/sig/privy/models/wallet_action_earn_fee_collect_failed_webhook_payload.rbs +126 -0
  133. data/sig/privy/models/wallet_action_earn_fee_collect_rejected_webhook_payload.rbs +126 -0
  134. data/sig/privy/models/wallet_action_earn_fee_collect_succeeded_webhook_payload.rbs +121 -0
  135. data/sig/privy/models/wallet_asset.rbs +13 -1
  136. data/sig/privy/models/wallet_asset_chain_name_input.rbs +6 -0
  137. data/sig/privy/models/wallet_creation_input.rbs +7 -0
  138. data/sig/privy/models/wallet_ethereum_asset.rbs +2 -1
  139. data/sig/privy/models/wallet_rpc_request_body.rbs +2 -0
  140. data/sig/privy/models/wallet_rpc_response.rbs +2 -0
  141. data/sig/privy/models/wallet_tron_asset.rbs +15 -0
  142. data/sig/privy/models/wallets/aave_vault_details.rbs +92 -0
  143. data/sig/privy/models/wallets/balance_get_params.rbs +4 -0
  144. data/sig/privy/models/wallets/balance_get_response.rbs +4 -0
  145. data/sig/privy/models/wallets/earn_fee_collect_action_response.rbs +114 -0
  146. data/sig/privy/models/wallets/earn_fee_collect_request_body.rbs +15 -0
  147. data/sig/privy/models/wallets/ethereum_earn_provider.rbs +2 -1
  148. data/sig/privy/models/wallets/ethereum_earn_vault_details_response.rbs +6 -57
  149. data/sig/privy/models/wallets/morpho_vault_details.rbs +92 -0
  150. data/sig/privy/models/wallets/transaction_get_params.rbs +8 -31
  151. data/sig/privy/models/wallets/veda_vault_details.rbs +87 -0
  152. data/sig/privy/models/wallets/wallet_action_response.rbs +1 -0
  153. data/sig/privy/models/wallets/wallet_action_type.rbs +2 -0
  154. data/sig/privy/models/webhook_payload.rbs +4 -0
  155. data/sig/privy/models.rbs +32 -0
  156. data/sig/privy/resources/wallets/transactions.rbs +1 -1
  157. data/sig/privy/resources/webhooks.rbs +4 -0
  158. metadata +66 -2
@@ -0,0 +1,149 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Privy
4
+ module Models
5
+ module Wallets
6
+ class EarnFeeCollectActionResponse < Privy::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The ID of the wallet action.
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute asset_address
14
+ # Underlying asset token address.
15
+ #
16
+ # @return [String]
17
+ required :asset_address, String
18
+
19
+ # @!attribute caip2
20
+ # CAIP-2 chain identifier.
21
+ #
22
+ # @return [String]
23
+ required :caip2, String
24
+
25
+ # @!attribute created_at
26
+ # ISO 8601 timestamp of when the wallet action was created.
27
+ #
28
+ # @return [Time]
29
+ required :created_at, Time
30
+
31
+ # @!attribute raw_amount
32
+ # Base-unit amount of fees collected (e.g. "1500000"). Populated after on-chain
33
+ # confirmation.
34
+ #
35
+ # @return [String, nil]
36
+ required :raw_amount, String, nil?: true
37
+
38
+ # @!attribute status
39
+ # Status of a wallet action.
40
+ #
41
+ # @return [Symbol, Privy::Models::Wallets::WalletActionStatus]
42
+ required :status, enum: -> { Privy::Wallets::WalletActionStatus }
43
+
44
+ # @!attribute type
45
+ #
46
+ # @return [Symbol, Privy::Models::Wallets::EarnFeeCollectActionResponse::Type]
47
+ required :type, enum: -> { Privy::Wallets::EarnFeeCollectActionResponse::Type }
48
+
49
+ # @!attribute vault_address
50
+ # ERC-4626 vault contract address.
51
+ #
52
+ # @return [String]
53
+ required :vault_address, String
54
+
55
+ # @!attribute vault_id
56
+ # The vault ID.
57
+ #
58
+ # @return [String]
59
+ required :vault_id, String
60
+
61
+ # @!attribute wallet_id
62
+ # The ID of the wallet involved in the action.
63
+ #
64
+ # @return [String]
65
+ required :wallet_id, String
66
+
67
+ # @!attribute amount
68
+ # Human-readable decimal amount of fees collected (e.g. "1.5"). Omitted when the
69
+ # token is not in the asset registry. Null while the action is pending; populated
70
+ # after on-chain confirmation.
71
+ #
72
+ # @return [String, nil]
73
+ optional :amount, String, nil?: true
74
+
75
+ # @!attribute asset
76
+ # Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
77
+ # the asset registry.
78
+ #
79
+ # @return [String, nil]
80
+ optional :asset, String
81
+
82
+ # @!attribute decimals
83
+ # Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
84
+ # present when the token is known in the asset registry.
85
+ #
86
+ # @return [Integer, nil]
87
+ optional :decimals, Integer
88
+
89
+ # @!attribute failure_reason
90
+ # A description of why a wallet action (or a step within a wallet action) failed.
91
+ #
92
+ # @return [Privy::Models::Wallets::FailureReason, nil]
93
+ optional :failure_reason, -> { Privy::Wallets::FailureReason }
94
+
95
+ # @!attribute steps
96
+ # The steps of the wallet action. Only returned if `?include=steps` is provided.
97
+ #
98
+ # @return [Array<Privy::Models::Wallets::EvmTransactionWalletActionStep, Privy::Models::Wallets::EvmUserOperationWalletActionStep, Privy::Models::Wallets::SvmTransactionWalletActionStep, Privy::Models::Wallets::TvmTransactionWalletActionStep, Privy::Models::Wallets::ExternalTransactionWalletActionStep, Privy::Models::Wallets::CustodianTransactionWalletActionStep>, nil]
99
+ optional :steps, -> { Privy::Internal::Type::ArrayOf[union: Privy::Wallets::WalletActionStep] }
100
+
101
+ # @!method initialize(id:, asset_address:, caip2:, created_at:, raw_amount:, status:, type:, vault_address:, vault_id:, wallet_id:, amount: nil, asset: nil, decimals: nil, failure_reason: nil, steps: nil)
102
+ # Some parameter documentations has been truncated, see
103
+ # {Privy::Models::Wallets::EarnFeeCollectActionResponse} for more details.
104
+ #
105
+ # Response for an earn fee collect action.
106
+ #
107
+ # @param id [String] The ID of the wallet action.
108
+ #
109
+ # @param asset_address [String] Underlying asset token address.
110
+ #
111
+ # @param caip2 [String] CAIP-2 chain identifier.
112
+ #
113
+ # @param created_at [Time] ISO 8601 timestamp of when the wallet action was created.
114
+ #
115
+ # @param raw_amount [String, nil] Base-unit amount of fees collected (e.g. "1500000"). Populated after on-chain co
116
+ #
117
+ # @param status [Symbol, Privy::Models::Wallets::WalletActionStatus] Status of a wallet action.
118
+ #
119
+ # @param type [Symbol, Privy::Models::Wallets::EarnFeeCollectActionResponse::Type]
120
+ #
121
+ # @param vault_address [String] ERC-4626 vault contract address.
122
+ #
123
+ # @param vault_id [String] The vault ID.
124
+ #
125
+ # @param wallet_id [String] The ID of the wallet involved in the action.
126
+ #
127
+ # @param amount [String, nil] Human-readable decimal amount of fees collected (e.g. "1.5"). Omitted when the t
128
+ #
129
+ # @param asset [String] Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in t
130
+ #
131
+ # @param decimals [Integer] Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
132
+ #
133
+ # @param failure_reason [Privy::Models::Wallets::FailureReason] A description of why a wallet action (or a step within a wallet action) failed.
134
+ #
135
+ # @param steps [Array<Privy::Models::Wallets::EvmTransactionWalletActionStep, Privy::Models::Wallets::EvmUserOperationWalletActionStep, Privy::Models::Wallets::SvmTransactionWalletActionStep, Privy::Models::Wallets::TvmTransactionWalletActionStep, Privy::Models::Wallets::ExternalTransactionWalletActionStep, Privy::Models::Wallets::CustodianTransactionWalletActionStep>] The steps of the wallet action. Only returned if `?include=steps` is provided.
136
+
137
+ # @see Privy::Models::Wallets::EarnFeeCollectActionResponse#type
138
+ module Type
139
+ extend Privy::Internal::Type::Enum
140
+
141
+ EARN_FEE_COLLECT = :earn_fee_collect
142
+
143
+ # @!method self.values
144
+ # @return [Array<Symbol>]
145
+ end
146
+ end
147
+ end
148
+ end
149
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Privy
4
+ module Models
5
+ module Wallets
6
+ class EarnFeeCollectRequestBody < Privy::Internal::Type::BaseModel
7
+ # @!attribute vault_id
8
+ # The ID of the vault to collect fees from.
9
+ #
10
+ # @return [String]
11
+ required :vault_id, String
12
+
13
+ # @!method initialize(vault_id:)
14
+ # Input for collecting accumulated fees from an Aave vault.
15
+ #
16
+ # @param vault_id [String] The ID of the vault to collect fees from.
17
+ end
18
+ end
19
+ end
20
+ end
@@ -9,6 +9,7 @@ module Privy
9
9
 
10
10
  MORPHO = :morpho
11
11
  AAVE = :aave
12
+ VEDA = :veda
12
13
 
13
14
  # @!method self.values
14
15
  # @return [Array<Symbol>]
@@ -3,94 +3,24 @@
3
3
  module Privy
4
4
  module Models
5
5
  module Wallets
6
- class EthereumEarnVaultDetailsResponse < Privy::Internal::Type::BaseModel
7
- # @!attribute id
8
- # Vault identifier.
9
- #
10
- # @return [String]
11
- required :id, String
6
+ # Detailed vault information including current APY, liquidity, and asset metadata.
7
+ # Discriminated on provider.
8
+ module EthereumEarnVaultDetailsResponse
9
+ extend Privy::Internal::Type::Union
12
10
 
13
- # @!attribute app_apy
14
- # Annual percentage yield earned by the app from fee wrapper fees, in basis
15
- # points.
16
- #
17
- # @return [Float, nil]
18
- required :app_apy, Float, nil?: true
11
+ discriminator :provider
19
12
 
20
- # @!attribute asset
21
- # Asset metadata for an earn vault position.
22
- #
23
- # @return [Privy::Models::Wallets::EarnAsset]
24
- required :asset, -> { Privy::Wallets::EarnAsset }
13
+ # Vault details for an Aave earn vault, including fee visibility.
14
+ variant :aave, -> { Privy::Wallets::AaveVaultDetails }
25
15
 
26
- # @!attribute available_liquidity_usd
27
- # Available liquidity in USD.
28
- #
29
- # @return [Float, nil]
30
- required :available_liquidity_usd, Float, nil?: true
16
+ # Vault details for a Morpho earn vault.
17
+ variant :morpho, -> { Privy::Wallets::MorphoVaultDetails }
31
18
 
32
- # @!attribute caip2
33
- # CAIP-2 chain identifier (e.g. "eip155:8453").
34
- #
35
- # @return [String]
36
- required :caip2, String
19
+ # Vault details for a Veda (BoringVault) earn vault.
20
+ variant :veda, -> { Privy::Wallets::VedaVaultDetails }
37
21
 
38
- # @!attribute name
39
- # Human-readable vault name from the yield provider.
40
- #
41
- # @return [String]
42
- required :name, String
43
-
44
- # @!attribute provider
45
- # Supported earn provider protocols.
46
- #
47
- # @return [Symbol, Privy::Models::Wallets::EthereumEarnProvider]
48
- required :provider, enum: -> { Privy::Wallets::EthereumEarnProvider }
49
-
50
- # @!attribute tvl_usd
51
- # Total value locked in USD.
52
- #
53
- # @return [Float, nil]
54
- required :tvl_usd, Float, nil?: true
55
-
56
- # @!attribute user_apy
57
- # Current annual percentage yield in basis points (e.g. 500 for 5%). 1 basis point
58
- # = 0.01%.
59
- #
60
- # @return [Float, nil]
61
- required :user_apy, Float, nil?: true
62
-
63
- # @!attribute vault_address
64
- # Onchain vault contract address.
65
- #
66
- # @return [String]
67
- required :vault_address, String
68
-
69
- # @!method initialize(id:, app_apy:, asset:, available_liquidity_usd:, caip2:, name:, provider:, tvl_usd:, user_apy:, vault_address:)
70
- # Some parameter documentations has been truncated, see
71
- # {Privy::Models::Wallets::EthereumEarnVaultDetailsResponse} for more details.
72
- #
73
- # Detailed vault information including current APY, liquidity, and asset metadata.
74
- #
75
- # @param id [String] Vault identifier.
76
- #
77
- # @param app_apy [Float, nil] Annual percentage yield earned by the app from fee wrapper fees, in basis points
78
- #
79
- # @param asset [Privy::Models::Wallets::EarnAsset] Asset metadata for an earn vault position.
80
- #
81
- # @param available_liquidity_usd [Float, nil] Available liquidity in USD.
82
- #
83
- # @param caip2 [String] CAIP-2 chain identifier (e.g. "eip155:8453").
84
- #
85
- # @param name [String] Human-readable vault name from the yield provider.
86
- #
87
- # @param provider [Symbol, Privy::Models::Wallets::EthereumEarnProvider] Supported earn provider protocols.
88
- #
89
- # @param tvl_usd [Float, nil] Total value locked in USD.
90
- #
91
- # @param user_apy [Float, nil] Current annual percentage yield in basis points (e.g. 500 for 5%). 1 basis point
92
- #
93
- # @param vault_address [String] Onchain vault contract address.
22
+ # @!method self.variants
23
+ # @return [Array(Privy::Models::Wallets::AaveVaultDetails, Privy::Models::Wallets::MorphoVaultDetails, Privy::Models::Wallets::VedaVaultDetails)]
94
24
  end
95
25
  end
96
26
  end
@@ -6,7 +6,7 @@ module Privy
6
6
  class ListWalletActionsResponse < Privy::Internal::Type::BaseModel
7
7
  # @!attribute data
8
8
  #
9
- # @return [Array<Privy::Models::Wallets::SwapActionResponse, Privy::Models::Wallets::TransferActionResponse, Privy::Models::Wallets::EarnDepositActionResponse, Privy::Models::Wallets::EarnWithdrawActionResponse, Privy::Models::Wallets::EarnIncentiveClaimActionResponse>]
9
+ # @return [Array<Privy::Models::Wallets::SwapActionResponse, Privy::Models::Wallets::TransferActionResponse, Privy::Models::Wallets::EarnDepositActionResponse, Privy::Models::Wallets::EarnWithdrawActionResponse, Privy::Models::Wallets::EarnIncentiveClaimActionResponse, Privy::Models::Wallets::EarnFeeCollectActionResponse>]
10
10
  required :data, -> { Privy::Internal::Type::ArrayOf[union: Privy::Wallets::WalletActionResponse] }
11
11
 
12
12
  # @!attribute next_cursor
@@ -17,7 +17,7 @@ module Privy
17
17
  # @!method initialize(data:, next_cursor:)
18
18
  # Paginated list of wallet actions.
19
19
  #
20
- # @param data [Array<Privy::Models::Wallets::SwapActionResponse, Privy::Models::Wallets::TransferActionResponse, Privy::Models::Wallets::EarnDepositActionResponse, Privy::Models::Wallets::EarnWithdrawActionResponse, Privy::Models::Wallets::EarnIncentiveClaimActionResponse>]
20
+ # @param data [Array<Privy::Models::Wallets::SwapActionResponse, Privy::Models::Wallets::TransferActionResponse, Privy::Models::Wallets::EarnDepositActionResponse, Privy::Models::Wallets::EarnWithdrawActionResponse, Privy::Models::Wallets::EarnIncentiveClaimActionResponse, Privy::Models::Wallets::EarnFeeCollectActionResponse>]
21
21
  # @param next_cursor [String, nil]
22
22
  end
23
23
  end
@@ -0,0 +1,130 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Privy
4
+ module Models
5
+ module Wallets
6
+ class MorphoVaultDetails < Privy::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # Vault identifier.
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute admin_wallet_address
14
+ # EVM address of the vault admin wallet.
15
+ #
16
+ # @return [String]
17
+ required :admin_wallet_address, String
18
+
19
+ # @!attribute admin_wallet_id
20
+ # Privy wallet ID of the vault admin.
21
+ #
22
+ # @return [String]
23
+ required :admin_wallet_id, String
24
+
25
+ # @!attribute app_apy
26
+ # Annual percentage yield earned by the app from fee wrapper fees, in basis
27
+ # points.
28
+ #
29
+ # @return [Float, nil]
30
+ required :app_apy, Float, nil?: true
31
+
32
+ # @!attribute asset
33
+ # Asset metadata for an earn vault position.
34
+ #
35
+ # @return [Privy::Models::Wallets::EarnAsset]
36
+ required :asset, -> { Privy::Wallets::EarnAsset }
37
+
38
+ # @!attribute available_liquidity_usd
39
+ # Available liquidity in USD.
40
+ #
41
+ # @return [Float, nil]
42
+ required :available_liquidity_usd, Float, nil?: true
43
+
44
+ # @!attribute caip2
45
+ # CAIP-2 chain identifier (e.g. "eip155:8453").
46
+ #
47
+ # @return [String]
48
+ required :caip2, String
49
+
50
+ # @!attribute name
51
+ # Human-readable vault name from the yield provider.
52
+ #
53
+ # @return [String]
54
+ required :name, String
55
+
56
+ # @!attribute provider
57
+ #
58
+ # @return [Symbol, Privy::Models::Wallets::MorphoVaultDetails::Provider]
59
+ required :provider, enum: -> { Privy::Wallets::MorphoVaultDetails::Provider }
60
+
61
+ # @!attribute total_rewards_apr
62
+ # Total rewards annual percentage rate in basis points.
63
+ #
64
+ # @return [Float]
65
+ required :total_rewards_apr, Float
66
+
67
+ # @!attribute tvl_usd
68
+ # Total value locked in USD.
69
+ #
70
+ # @return [Float, nil]
71
+ required :tvl_usd, Float, nil?: true
72
+
73
+ # @!attribute user_apy
74
+ # Annual percentage yield available to the user, after fees and excluding rewards,
75
+ # in basis points (e.g. 500 for 5%). 1 basis point = 0.01%.
76
+ #
77
+ # @return [Float, nil]
78
+ required :user_apy, Float, nil?: true
79
+
80
+ # @!attribute vault_address
81
+ # Onchain vault contract address.
82
+ #
83
+ # @return [String]
84
+ required :vault_address, String
85
+
86
+ # @!method initialize(id:, admin_wallet_address:, admin_wallet_id:, app_apy:, asset:, available_liquidity_usd:, caip2:, name:, provider:, total_rewards_apr:, tvl_usd:, user_apy:, vault_address:)
87
+ # Some parameter documentations has been truncated, see
88
+ # {Privy::Models::Wallets::MorphoVaultDetails} for more details.
89
+ #
90
+ # Vault details for a Morpho earn vault.
91
+ #
92
+ # @param id [String] Vault identifier.
93
+ #
94
+ # @param admin_wallet_address [String] EVM address of the vault admin wallet.
95
+ #
96
+ # @param admin_wallet_id [String] Privy wallet ID of the vault admin.
97
+ #
98
+ # @param app_apy [Float, nil] Annual percentage yield earned by the app from fee wrapper fees, in basis points
99
+ #
100
+ # @param asset [Privy::Models::Wallets::EarnAsset] Asset metadata for an earn vault position.
101
+ #
102
+ # @param available_liquidity_usd [Float, nil] Available liquidity in USD.
103
+ #
104
+ # @param caip2 [String] CAIP-2 chain identifier (e.g. "eip155:8453").
105
+ #
106
+ # @param name [String] Human-readable vault name from the yield provider.
107
+ #
108
+ # @param provider [Symbol, Privy::Models::Wallets::MorphoVaultDetails::Provider]
109
+ #
110
+ # @param total_rewards_apr [Float] Total rewards annual percentage rate in basis points.
111
+ #
112
+ # @param tvl_usd [Float, nil] Total value locked in USD.
113
+ #
114
+ # @param user_apy [Float, nil] Annual percentage yield available to the user, after fees and excluding rewards,
115
+ #
116
+ # @param vault_address [String] Onchain vault contract address.
117
+
118
+ # @see Privy::Models::Wallets::MorphoVaultDetails#provider
119
+ module Provider
120
+ extend Privy::Internal::Type::Enum
121
+
122
+ MORPHO = :morpho
123
+
124
+ # @!method self.values
125
+ # @return [Array<Symbol>]
126
+ end
127
+ end
128
+ end
129
+ end
130
+ end
@@ -15,9 +15,10 @@ module Privy
15
15
  required :wallet_id, String
16
16
 
17
17
  # @!attribute chain
18
+ # Chains supported for transaction history queries.
18
19
  #
19
- # @return [Symbol, Privy::Models::Wallets::TransactionGetParams::Chain]
20
- required :chain, enum: -> { Privy::Wallets::TransactionGetParams::Chain }
20
+ # @return [Symbol, Privy::Models::TransactionChainNameInput]
21
+ required :chain, enum: -> { Privy::TransactionChainNameInput }
21
22
 
22
23
  # @!attribute token
23
24
  # Exactly one of `token` or `asset` is required. Cannot be used together with
@@ -60,7 +61,7 @@ module Privy
60
61
  #
61
62
  # @param wallet_id [String] ID of the wallet.
62
63
  #
63
- # @param chain [Symbol, Privy::Models::Wallets::TransactionGetParams::Chain]
64
+ # @param chain [Symbol, Privy::Models::TransactionChainNameInput] Chains supported for transaction history queries.
64
65
  #
65
66
  # @param token [String, Array<String>] Exactly one of `token` or `asset` is required. Cannot be used together with `ass
66
67
  #
@@ -76,23 +77,6 @@ module Privy
76
77
  #
77
78
  # @param request_options [Privy::RequestOptions, Hash{Symbol=>Object}]
78
79
 
79
- module Chain
80
- extend Privy::Internal::Type::Enum
81
-
82
- ETHEREUM = :ethereum
83
- ARBITRUM = :arbitrum
84
- BASE = :base
85
- TEMPO = :tempo
86
- LINEA = :linea
87
- OPTIMISM = :optimism
88
- POLYGON = :polygon
89
- SOLANA = :solana
90
- SEPOLIA = :sepolia
91
-
92
- # @!method self.values
93
- # @return [Array<Symbol>]
94
- end
95
-
96
80
  # Exactly one of `token` or `asset` is required. Cannot be used together with
97
81
  # `asset`.
98
82
  module Token
@@ -125,6 +109,8 @@ module Privy
125
109
 
126
110
  variant const: -> { Privy::Models::Wallets::TransactionGetParams::Asset::POL }
127
111
 
112
+ variant const: -> { Privy::Models::Wallets::TransactionGetParams::Asset::BNB }
113
+
128
114
  variant const: -> { Privy::Models::Wallets::TransactionGetParams::Asset::USDT }
129
115
 
130
116
  variant const: -> { Privy::Models::Wallets::TransactionGetParams::Asset::EURC }
@@ -133,6 +119,8 @@ module Privy
133
119
 
134
120
  variant const: -> { Privy::Models::Wallets::TransactionGetParams::Asset::SOL }
135
121
 
122
+ variant const: -> { Privy::Models::Wallets::TransactionGetParams::Asset::TRX }
123
+
136
124
  variant -> { Privy::Models::Wallets::TransactionGetParams::Asset::WalletAssetArray }
137
125
 
138
126
  # @!method self.variants
@@ -154,10 +142,12 @@ module Privy
154
142
  ETH = :eth
155
143
  AVAX = :avax
156
144
  POL = :pol
145
+ BNB = :bnb
157
146
  USDT = :usdt
158
147
  EURC = :eurc
159
148
  USDB = :usdb
160
149
  SOL = :sol
150
+ TRX = :trx
161
151
 
162
152
  # @!endgroup
163
153
 
@@ -0,0 +1,122 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Privy
4
+ module Models
5
+ module Wallets
6
+ class VedaVaultDetails < Privy::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # Vault identifier.
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute admin_wallet_address
14
+ # EVM address of the vault admin wallet.
15
+ #
16
+ # @return [String]
17
+ required :admin_wallet_address, String
18
+
19
+ # @!attribute admin_wallet_id
20
+ # Privy wallet ID of the vault admin.
21
+ #
22
+ # @return [String]
23
+ required :admin_wallet_id, String
24
+
25
+ # @!attribute app_apy
26
+ # Annual percentage yield earned by the app from fee wrapper fees, in basis
27
+ # points.
28
+ #
29
+ # @return [Float, nil]
30
+ required :app_apy, Float, nil?: true
31
+
32
+ # @!attribute asset
33
+ # Asset metadata for an earn vault position.
34
+ #
35
+ # @return [Privy::Models::Wallets::EarnAsset]
36
+ required :asset, -> { Privy::Wallets::EarnAsset }
37
+
38
+ # @!attribute available_liquidity_usd
39
+ # Available liquidity in USD.
40
+ #
41
+ # @return [Float, nil]
42
+ required :available_liquidity_usd, Float, nil?: true
43
+
44
+ # @!attribute caip2
45
+ # CAIP-2 chain identifier (e.g. "eip155:8453").
46
+ #
47
+ # @return [String]
48
+ required :caip2, String
49
+
50
+ # @!attribute name
51
+ # Human-readable vault name from the yield provider.
52
+ #
53
+ # @return [String]
54
+ required :name, String
55
+
56
+ # @!attribute provider
57
+ #
58
+ # @return [Symbol, Privy::Models::Wallets::VedaVaultDetails::Provider]
59
+ required :provider, enum: -> { Privy::Wallets::VedaVaultDetails::Provider }
60
+
61
+ # @!attribute tvl_usd
62
+ # Total value locked in USD.
63
+ #
64
+ # @return [Float, nil]
65
+ required :tvl_usd, Float, nil?: true
66
+
67
+ # @!attribute user_apy
68
+ # Annual percentage yield available to the user, after fees and excluding rewards,
69
+ # in basis points (e.g. 500 for 5%). 1 basis point = 0.01%.
70
+ #
71
+ # @return [Float, nil]
72
+ required :user_apy, Float, nil?: true
73
+
74
+ # @!attribute vault_address
75
+ # Onchain vault contract address.
76
+ #
77
+ # @return [String]
78
+ required :vault_address, String
79
+
80
+ # @!method initialize(id:, admin_wallet_address:, admin_wallet_id:, app_apy:, asset:, available_liquidity_usd:, caip2:, name:, provider:, tvl_usd:, user_apy:, vault_address:)
81
+ # Some parameter documentations has been truncated, see
82
+ # {Privy::Models::Wallets::VedaVaultDetails} for more details.
83
+ #
84
+ # Vault details for a Veda (BoringVault) earn vault.
85
+ #
86
+ # @param id [String] Vault identifier.
87
+ #
88
+ # @param admin_wallet_address [String] EVM address of the vault admin wallet.
89
+ #
90
+ # @param admin_wallet_id [String] Privy wallet ID of the vault admin.
91
+ #
92
+ # @param app_apy [Float, nil] Annual percentage yield earned by the app from fee wrapper fees, in basis points
93
+ #
94
+ # @param asset [Privy::Models::Wallets::EarnAsset] Asset metadata for an earn vault position.
95
+ #
96
+ # @param available_liquidity_usd [Float, nil] Available liquidity in USD.
97
+ #
98
+ # @param caip2 [String] CAIP-2 chain identifier (e.g. "eip155:8453").
99
+ #
100
+ # @param name [String] Human-readable vault name from the yield provider.
101
+ #
102
+ # @param provider [Symbol, Privy::Models::Wallets::VedaVaultDetails::Provider]
103
+ #
104
+ # @param tvl_usd [Float, nil] Total value locked in USD.
105
+ #
106
+ # @param user_apy [Float, nil] Annual percentage yield available to the user, after fees and excluding rewards,
107
+ #
108
+ # @param vault_address [String] Onchain vault contract address.
109
+
110
+ # @see Privy::Models::Wallets::VedaVaultDetails#provider
111
+ module Provider
112
+ extend Privy::Internal::Type::Enum
113
+
114
+ VEDA = :veda
115
+
116
+ # @!method self.values
117
+ # @return [Array<Symbol>]
118
+ end
119
+ end
120
+ end
121
+ end
122
+ end
@@ -26,8 +26,11 @@ module Privy
26
26
  # Response for an earn incentive claim action.
27
27
  variant :earn_incentive_claim, -> { Privy::Wallets::EarnIncentiveClaimActionResponse }
28
28
 
29
+ # Response for an earn fee collect action.
30
+ variant :earn_fee_collect, -> { Privy::Wallets::EarnFeeCollectActionResponse }
31
+
29
32
  # @!method self.variants
30
- # @return [Array(Privy::Models::Wallets::SwapActionResponse, Privy::Models::Wallets::TransferActionResponse, Privy::Models::Wallets::EarnDepositActionResponse, Privy::Models::Wallets::EarnWithdrawActionResponse, Privy::Models::Wallets::EarnIncentiveClaimActionResponse)]
33
+ # @return [Array(Privy::Models::Wallets::SwapActionResponse, Privy::Models::Wallets::TransferActionResponse, Privy::Models::Wallets::EarnDepositActionResponse, Privy::Models::Wallets::EarnWithdrawActionResponse, Privy::Models::Wallets::EarnIncentiveClaimActionResponse, Privy::Models::Wallets::EarnFeeCollectActionResponse)]
31
34
  end
32
35
  end
33
36
 
@@ -12,6 +12,7 @@ module Privy
12
12
  EARN_DEPOSIT = :earn_deposit
13
13
  EARN_WITHDRAW = :earn_withdraw
14
14
  EARN_INCENTIVE_CLAIM = :earn_incentive_claim
15
+ EARN_FEE_COLLECT = :earn_fee_collect
15
16
 
16
17
  # @!method self.values
17
18
  # @return [Array<Symbol>]