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,177 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Privy
4
+ module Models
5
+ class WalletActionEarnFeeCollectRejectedWebhookPayload < Privy::Internal::Type::BaseModel
6
+ # @!attribute action_type
7
+ # Type of wallet action
8
+ #
9
+ # @return [Symbol, Privy::Models::Wallets::WalletActionType]
10
+ required :action_type, enum: -> { Privy::Wallets::WalletActionType }
11
+
12
+ # @!attribute asset_address
13
+ # Underlying asset token address.
14
+ #
15
+ # @return [String]
16
+ required :asset_address, String
17
+
18
+ # @!attribute caip2
19
+ # CAIP-2 chain identifier.
20
+ #
21
+ # @return [String]
22
+ required :caip2, String
23
+
24
+ # @!attribute created_at
25
+ # ISO 8601 timestamp of when the wallet action was created.
26
+ #
27
+ # @return [String]
28
+ required :created_at, String
29
+
30
+ # @!attribute failure_reason
31
+ # A description of why a wallet action (or a step within a wallet action) failed.
32
+ #
33
+ # @return [Privy::Models::Wallets::FailureReason]
34
+ required :failure_reason, -> { Privy::Wallets::FailureReason }
35
+
36
+ # @!attribute raw_amount
37
+ # Base-unit amount of fees collected (e.g. "1500000").
38
+ #
39
+ # @return [String]
40
+ required :raw_amount, String
41
+
42
+ # @!attribute rejected_at
43
+ # ISO 8601 timestamp of when the wallet action was rejected.
44
+ #
45
+ # @return [String]
46
+ required :rejected_at, String
47
+
48
+ # @!attribute status
49
+ # The status of the wallet action.
50
+ #
51
+ # @return [Symbol, Privy::Models::WalletActionEarnFeeCollectRejectedWebhookPayload::Status]
52
+ required :status, enum: -> { Privy::WalletActionEarnFeeCollectRejectedWebhookPayload::Status }
53
+
54
+ # @!attribute steps
55
+ # The steps of the wallet action at the time of rejection.
56
+ #
57
+ # @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>]
58
+ required :steps, -> { Privy::Internal::Type::ArrayOf[union: Privy::Wallets::WalletActionStep] }
59
+
60
+ # @!attribute type
61
+ # The type of webhook event.
62
+ #
63
+ # @return [Symbol, Privy::Models::WalletActionEarnFeeCollectRejectedWebhookPayload::Type]
64
+ required :type, enum: -> { Privy::WalletActionEarnFeeCollectRejectedWebhookPayload::Type }
65
+
66
+ # @!attribute vault_address
67
+ # ERC-4626 vault contract address.
68
+ #
69
+ # @return [String]
70
+ required :vault_address, String
71
+
72
+ # @!attribute vault_id
73
+ # The vault ID.
74
+ #
75
+ # @return [String]
76
+ required :vault_id, String
77
+
78
+ # @!attribute wallet_action_id
79
+ # The ID of the wallet action.
80
+ #
81
+ # @return [String]
82
+ required :wallet_action_id, String
83
+
84
+ # @!attribute wallet_id
85
+ # The ID of the wallet involved in the action.
86
+ #
87
+ # @return [String]
88
+ required :wallet_id, String
89
+
90
+ # @!attribute amount
91
+ # Human-readable decimal amount of fees collected (e.g. "1.5"). Only present when
92
+ # the token is known in the asset registry.
93
+ #
94
+ # @return [String, nil]
95
+ optional :amount, String
96
+
97
+ # @!attribute asset
98
+ # Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
99
+ # the asset registry.
100
+ #
101
+ # @return [String, nil]
102
+ optional :asset, String
103
+
104
+ # @!attribute decimals
105
+ # Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
106
+ # present when the token is known in the asset registry.
107
+ #
108
+ # @return [Integer, nil]
109
+ optional :decimals, Integer
110
+
111
+ # @!method initialize(action_type:, asset_address:, caip2:, created_at:, failure_reason:, raw_amount:, rejected_at:, status:, steps:, type:, vault_address:, vault_id:, wallet_action_id:, wallet_id:, amount: nil, asset: nil, decimals: nil)
112
+ # Some parameter documentations has been truncated, see
113
+ # {Privy::Models::WalletActionEarnFeeCollectRejectedWebhookPayload} for more
114
+ # details.
115
+ #
116
+ # Payload for the wallet_action.earn_fee_collect.rejected webhook event.
117
+ #
118
+ # @param action_type [Symbol, Privy::Models::Wallets::WalletActionType] Type of wallet action
119
+ #
120
+ # @param asset_address [String] Underlying asset token address.
121
+ #
122
+ # @param caip2 [String] CAIP-2 chain identifier.
123
+ #
124
+ # @param created_at [String] ISO 8601 timestamp of when the wallet action was created.
125
+ #
126
+ # @param failure_reason [Privy::Models::Wallets::FailureReason] A description of why a wallet action (or a step within a wallet action) failed.
127
+ #
128
+ # @param raw_amount [String] Base-unit amount of fees collected (e.g. "1500000").
129
+ #
130
+ # @param rejected_at [String] ISO 8601 timestamp of when the wallet action was rejected.
131
+ #
132
+ # @param status [Symbol, Privy::Models::WalletActionEarnFeeCollectRejectedWebhookPayload::Status] The status of the wallet action.
133
+ #
134
+ # @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 at the time of rejection.
135
+ #
136
+ # @param type [Symbol, Privy::Models::WalletActionEarnFeeCollectRejectedWebhookPayload::Type] The type of webhook event.
137
+ #
138
+ # @param vault_address [String] ERC-4626 vault contract address.
139
+ #
140
+ # @param vault_id [String] The vault ID.
141
+ #
142
+ # @param wallet_action_id [String] The ID of the wallet action.
143
+ #
144
+ # @param wallet_id [String] The ID of the wallet involved in the action.
145
+ #
146
+ # @param amount [String] Human-readable decimal amount of fees collected (e.g. "1.5"). Only present when
147
+ #
148
+ # @param asset [String] Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in t
149
+ #
150
+ # @param decimals [Integer] Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
151
+
152
+ # The status of the wallet action.
153
+ #
154
+ # @see Privy::Models::WalletActionEarnFeeCollectRejectedWebhookPayload#status
155
+ module Status
156
+ extend Privy::Internal::Type::Enum
157
+
158
+ REJECTED = :rejected
159
+
160
+ # @!method self.values
161
+ # @return [Array<Symbol>]
162
+ end
163
+
164
+ # The type of webhook event.
165
+ #
166
+ # @see Privy::Models::WalletActionEarnFeeCollectRejectedWebhookPayload#type
167
+ module Type
168
+ extend Privy::Internal::Type::Enum
169
+
170
+ WALLET_ACTION_EARN_FEE_COLLECT_REJECTED = :"wallet_action.earn_fee_collect.rejected"
171
+
172
+ # @!method self.values
173
+ # @return [Array<Symbol>]
174
+ end
175
+ end
176
+ end
177
+ end
@@ -0,0 +1,169 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Privy
4
+ module Models
5
+ class WalletActionEarnFeeCollectSucceededWebhookPayload < Privy::Internal::Type::BaseModel
6
+ # @!attribute action_type
7
+ # Type of wallet action
8
+ #
9
+ # @return [Symbol, Privy::Models::Wallets::WalletActionType]
10
+ required :action_type, enum: -> { Privy::Wallets::WalletActionType }
11
+
12
+ # @!attribute asset_address
13
+ # Underlying asset token address.
14
+ #
15
+ # @return [String]
16
+ required :asset_address, String
17
+
18
+ # @!attribute caip2
19
+ # CAIP-2 chain identifier.
20
+ #
21
+ # @return [String]
22
+ required :caip2, String
23
+
24
+ # @!attribute completed_at
25
+ # ISO 8601 timestamp of when the wallet action completed successfully.
26
+ #
27
+ # @return [String]
28
+ required :completed_at, String
29
+
30
+ # @!attribute created_at
31
+ # ISO 8601 timestamp of when the wallet action was created.
32
+ #
33
+ # @return [String]
34
+ required :created_at, String
35
+
36
+ # @!attribute raw_amount
37
+ # Base-unit amount of fees collected (e.g. "1500000").
38
+ #
39
+ # @return [String]
40
+ required :raw_amount, String
41
+
42
+ # @!attribute status
43
+ # The status of the wallet action.
44
+ #
45
+ # @return [Symbol, Privy::Models::WalletActionEarnFeeCollectSucceededWebhookPayload::Status]
46
+ required :status, enum: -> { Privy::WalletActionEarnFeeCollectSucceededWebhookPayload::Status }
47
+
48
+ # @!attribute steps
49
+ # The steps of the wallet action, including transaction hashes.
50
+ #
51
+ # @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>]
52
+ required :steps, -> { Privy::Internal::Type::ArrayOf[union: Privy::Wallets::WalletActionStep] }
53
+
54
+ # @!attribute type
55
+ # The type of webhook event.
56
+ #
57
+ # @return [Symbol, Privy::Models::WalletActionEarnFeeCollectSucceededWebhookPayload::Type]
58
+ required :type, enum: -> { Privy::WalletActionEarnFeeCollectSucceededWebhookPayload::Type }
59
+
60
+ # @!attribute vault_address
61
+ # ERC-4626 vault contract address.
62
+ #
63
+ # @return [String]
64
+ required :vault_address, String
65
+
66
+ # @!attribute vault_id
67
+ # The vault ID.
68
+ #
69
+ # @return [String]
70
+ required :vault_id, String
71
+
72
+ # @!attribute wallet_action_id
73
+ # The ID of the wallet action.
74
+ #
75
+ # @return [String]
76
+ required :wallet_action_id, String
77
+
78
+ # @!attribute wallet_id
79
+ # The ID of the wallet involved in the action.
80
+ #
81
+ # @return [String]
82
+ required :wallet_id, String
83
+
84
+ # @!attribute amount
85
+ # Human-readable decimal amount of fees collected (e.g. "1.5"). Only present when
86
+ # the token is known in the asset registry.
87
+ #
88
+ # @return [String, nil]
89
+ optional :amount, String
90
+
91
+ # @!attribute asset
92
+ # Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
93
+ # the asset registry.
94
+ #
95
+ # @return [String, nil]
96
+ optional :asset, String
97
+
98
+ # @!attribute decimals
99
+ # Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
100
+ # present when the token is known in the asset registry.
101
+ #
102
+ # @return [Integer, nil]
103
+ optional :decimals, Integer
104
+
105
+ # @!method initialize(action_type:, asset_address:, caip2:, completed_at:, created_at:, raw_amount:, status:, steps:, type:, vault_address:, vault_id:, wallet_action_id:, wallet_id:, amount: nil, asset: nil, decimals: nil)
106
+ # Some parameter documentations has been truncated, see
107
+ # {Privy::Models::WalletActionEarnFeeCollectSucceededWebhookPayload} for more
108
+ # details.
109
+ #
110
+ # Payload for the wallet_action.earn_fee_collect.succeeded webhook event.
111
+ #
112
+ # @param action_type [Symbol, Privy::Models::Wallets::WalletActionType] Type of wallet action
113
+ #
114
+ # @param asset_address [String] Underlying asset token address.
115
+ #
116
+ # @param caip2 [String] CAIP-2 chain identifier.
117
+ #
118
+ # @param completed_at [String] ISO 8601 timestamp of when the wallet action completed successfully.
119
+ #
120
+ # @param created_at [String] ISO 8601 timestamp of when the wallet action was created.
121
+ #
122
+ # @param raw_amount [String] Base-unit amount of fees collected (e.g. "1500000").
123
+ #
124
+ # @param status [Symbol, Privy::Models::WalletActionEarnFeeCollectSucceededWebhookPayload::Status] The status of the wallet action.
125
+ #
126
+ # @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, including transaction hashes.
127
+ #
128
+ # @param type [Symbol, Privy::Models::WalletActionEarnFeeCollectSucceededWebhookPayload::Type] The type of webhook event.
129
+ #
130
+ # @param vault_address [String] ERC-4626 vault contract address.
131
+ #
132
+ # @param vault_id [String] The vault ID.
133
+ #
134
+ # @param wallet_action_id [String] The ID of the wallet action.
135
+ #
136
+ # @param wallet_id [String] The ID of the wallet involved in the action.
137
+ #
138
+ # @param amount [String] Human-readable decimal amount of fees collected (e.g. "1.5"). Only present when
139
+ #
140
+ # @param asset [String] Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in t
141
+ #
142
+ # @param decimals [Integer] Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
143
+
144
+ # The status of the wallet action.
145
+ #
146
+ # @see Privy::Models::WalletActionEarnFeeCollectSucceededWebhookPayload#status
147
+ module Status
148
+ extend Privy::Internal::Type::Enum
149
+
150
+ SUCCEEDED = :succeeded
151
+
152
+ # @!method self.values
153
+ # @return [Array<Symbol>]
154
+ end
155
+
156
+ # The type of webhook event.
157
+ #
158
+ # @see Privy::Models::WalletActionEarnFeeCollectSucceededWebhookPayload#type
159
+ module Type
160
+ extend Privy::Internal::Type::Enum
161
+
162
+ WALLET_ACTION_EARN_FEE_COLLECT_SUCCEEDED = :"wallet_action.earn_fee_collect.succeeded"
163
+
164
+ # @!method self.values
165
+ # @return [Array<Symbol>]
166
+ end
167
+ end
168
+ end
169
+ end
@@ -11,10 +11,12 @@ module Privy
11
11
  ETH = :eth
12
12
  AVAX = :avax
13
13
  POL = :pol
14
+ BNB = :bnb
14
15
  USDT = :usdt
15
16
  EURC = :eurc
16
17
  USDB = :usdb
17
18
  SOL = :sol
19
+ TRX = :trx
18
20
 
19
21
  # @!method self.values
20
22
  # @return [Array<Symbol>]
@@ -14,7 +14,9 @@ module Privy
14
14
  LINEA = :linea
15
15
  OPTIMISM = :optimism
16
16
  POLYGON = :polygon
17
+ BSC = :bsc
17
18
  SOLANA = :solana
19
+ TRON = :tron
18
20
  ZKSYNC_ERA = :zksync_era
19
21
  SEPOLIA = :sepolia
20
22
  ARBITRUM_SEPOLIA = :arbitrum_sepolia
@@ -25,6 +27,7 @@ module Privy
25
27
  POLYGON_AMOY = :polygon_amoy
26
28
  SOLANA_DEVNET = :solana_devnet
27
29
  SOLANA_TESTNET = :solana_testnet
30
+ TRON_NILE = :tron_nile
28
31
 
29
32
  # @!method self.values
30
33
  # @return [Array<Symbol>]
@@ -23,6 +23,14 @@ module Privy
23
23
  # @return [Boolean, nil]
24
24
  optional :create_smart_wallet, Privy::Internal::Type::Boolean
25
25
 
26
+ # @!attribute external_id
27
+ # A customer-provided identifier for mapping to external systems. Write-once, set
28
+ # only at creation. Must be alphanumeric, hyphens, or underscores, max 64
29
+ # characters.
30
+ #
31
+ # @return [String, nil]
32
+ optional :external_id, String
33
+
26
34
  # @!attribute policy_ids
27
35
  # Policy IDs to enforce on the wallet. Currently, only one policy is supported per
28
36
  # wallet.
@@ -30,7 +38,7 @@ module Privy
30
38
  # @return [Array<String>, nil]
31
39
  optional :policy_ids, Privy::Internal::Type::ArrayOf[String]
32
40
 
33
- # @!method initialize(chain_type:, additional_signers: nil, create_smart_wallet: nil, policy_ids: nil)
41
+ # @!method initialize(chain_type:, additional_signers: nil, create_smart_wallet: nil, external_id: nil, policy_ids: nil)
34
42
  # Some parameter documentations has been truncated, see
35
43
  # {Privy::Models::WalletCreationInput} for more details.
36
44
  #
@@ -43,6 +51,8 @@ module Privy
43
51
  #
44
52
  # @param create_smart_wallet [Boolean] Create a smart wallet with this wallet as the signer. Only supported for wallets
45
53
  #
54
+ # @param external_id [String] A customer-provided identifier for mapping to external systems. Write-once, set
55
+ #
46
56
  # @param policy_ids [Array<String>] Policy IDs to enforce on the wallet. Currently, only one policy is supported per
47
57
  end
48
58
  end
@@ -11,6 +11,7 @@ module Privy
11
11
  ETH = :eth
12
12
  AVAX = :avax
13
13
  POL = :pol
14
+ BNB = :bnb
14
15
  USDT = :usdt
15
16
  EURC = :eurc
16
17
  USDB = :usdb
@@ -68,6 +68,12 @@ module Privy
68
68
  # Signs a message with the Spark identity key.
69
69
  variant :signMessageWithIdentityKey, -> { Privy::SparkSignMessageWithIdentityKeyRpcInput }
70
70
 
71
+ # Withdraws from Spark to a Bitcoin L1 address (cooperative exit).
72
+ variant :withdraw, -> { Privy::SparkWithdrawRpcInput }
73
+
74
+ # Gets a fee quote for withdrawing from Spark to a Bitcoin L1 address.
75
+ variant :getWithdrawalFeeQuote, -> { Privy::SparkGetWithdrawalFeeQuoteRpcInput }
76
+
71
77
  # Executes the Tron `tron_signTransaction` RPC to sign a transaction. The caller is responsible for broadcasting.
72
78
  variant :tron_signTransaction, -> { Privy::TronSignTransactionRpcInput }
73
79
 
@@ -81,7 +87,7 @@ module Privy
81
87
  variant :exportSeedPhrase, -> { Privy::ExportSeedPhraseRpcInput }
82
88
 
83
89
  # @!method self.variants
84
- # @return [Array(Privy::Models::EthereumSignTransactionRpcInput, Privy::Models::EthereumSendTransactionRpcInput, Privy::Models::EthereumPersonalSignRpcInput, Privy::Models::EthereumSignTypedDataRpcInput, Privy::Models::EthereumSecp256k1SignRpcInput, Privy::Models::EthereumSign7702AuthorizationRpcInput, Privy::Models::EthereumSignUserOperationRpcInput, Privy::Models::EthereumSendCallsRpcInput, Privy::Models::SolanaSignTransactionRpcInput, Privy::Models::SolanaSignAndSendTransactionRpcInput, Privy::Models::SolanaSignMessageRpcInput, Privy::Models::SparkTransferRpcInput, Privy::Models::SparkGetBalanceRpcInput, Privy::Models::SparkTransferTokensRpcInput, Privy::Models::SparkGetStaticDepositAddressRpcInput, Privy::Models::SparkGetClaimStaticDepositQuoteRpcInput, Privy::Models::SparkClaimStaticDepositRpcInput, Privy::Models::SparkCreateLightningInvoiceRpcInput, Privy::Models::SparkPayLightningInvoiceRpcInput, Privy::Models::SparkSignMessageWithIdentityKeyRpcInput, Privy::Models::TronSignTransactionRpcInput, Privy::Models::TronSendTransactionRpcInput, Privy::Models::ExportPrivateKeyRpcInput, Privy::Models::ExportSeedPhraseRpcInput)]
90
+ # @return [Array(Privy::Models::EthereumSignTransactionRpcInput, Privy::Models::EthereumSendTransactionRpcInput, Privy::Models::EthereumPersonalSignRpcInput, Privy::Models::EthereumSignTypedDataRpcInput, Privy::Models::EthereumSecp256k1SignRpcInput, Privy::Models::EthereumSign7702AuthorizationRpcInput, Privy::Models::EthereumSignUserOperationRpcInput, Privy::Models::EthereumSendCallsRpcInput, Privy::Models::SolanaSignTransactionRpcInput, Privy::Models::SolanaSignAndSendTransactionRpcInput, Privy::Models::SolanaSignMessageRpcInput, Privy::Models::SparkTransferRpcInput, Privy::Models::SparkGetBalanceRpcInput, Privy::Models::SparkTransferTokensRpcInput, Privy::Models::SparkGetStaticDepositAddressRpcInput, Privy::Models::SparkGetClaimStaticDepositQuoteRpcInput, Privy::Models::SparkClaimStaticDepositRpcInput, Privy::Models::SparkCreateLightningInvoiceRpcInput, Privy::Models::SparkPayLightningInvoiceRpcInput, Privy::Models::SparkSignMessageWithIdentityKeyRpcInput, Privy::Models::SparkWithdrawRpcInput, Privy::Models::SparkGetWithdrawalFeeQuoteRpcInput, Privy::Models::TronSignTransactionRpcInput, Privy::Models::TronSendTransactionRpcInput, Privy::Models::ExportPrivateKeyRpcInput, Privy::Models::ExportSeedPhraseRpcInput)]
85
91
  end
86
92
  end
87
93
  end
@@ -70,6 +70,12 @@ module Privy
70
70
  # Response to the Spark `signMessageWithIdentityKey` RPC.
71
71
  variant :signMessageWithIdentityKey, -> { Privy::SparkSignMessageWithIdentityKeyRpcResponse }
72
72
 
73
+ # Response to the Spark `withdraw` RPC.
74
+ variant :withdraw, -> { Privy::SparkWithdrawRpcResponse }
75
+
76
+ # Response to the Spark `getWithdrawalFeeQuote` RPC.
77
+ variant :getWithdrawalFeeQuote, -> { Privy::SparkGetWithdrawalFeeQuoteRpcResponse }
78
+
73
79
  # Response to the Tron `tron_signTransaction` RPC.
74
80
  variant :tron_signTransaction, -> { Privy::TronSignTransactionRpcResponse }
75
81
 
@@ -83,7 +89,7 @@ module Privy
83
89
  variant :exportSeedPhrase, -> { Privy::ExportSeedPhraseRpcResponse }
84
90
 
85
91
  # @!method self.variants
86
- # @return [Array(Privy::Models::EthereumPersonalSignRpcResponse, Privy::Models::EthereumSignTypedDataRpcResponse, Privy::Models::EthereumSignTransactionRpcResponse, Privy::Models::EthereumSendTransactionRpcResponse, Privy::Models::EthereumSignUserOperationRpcResponse, Privy::Models::EthereumSign7702AuthorizationRpcResponse, Privy::Models::EthereumSecp256k1SignRpcResponse, Privy::Models::EthereumSendCallsRpcResponse, Privy::Models::SolanaSignMessageRpcResponse, Privy::Models::SolanaSignTransactionRpcResponse, Privy::Models::SolanaSignAndSendTransactionRpcResponse, Privy::Models::SparkTransferRpcResponse, Privy::Models::SparkGetBalanceRpcResponse, Privy::Models::SparkTransferTokensRpcResponse, Privy::Models::SparkGetStaticDepositAddressRpcResponse, Privy::Models::SparkGetClaimStaticDepositQuoteRpcResponse, Privy::Models::SparkClaimStaticDepositRpcResponse, Privy::Models::SparkCreateLightningInvoiceRpcResponse, Privy::Models::SparkPayLightningInvoiceRpcResponse, Privy::Models::SparkSignMessageWithIdentityKeyRpcResponse, Privy::Models::TronSignTransactionRpcResponse, Privy::Models::TronSendTransactionRpcResponse, Privy::Models::ExportPrivateKeyRpcResponse, Privy::Models::ExportSeedPhraseRpcResponse)]
92
+ # @return [Array(Privy::Models::EthereumPersonalSignRpcResponse, Privy::Models::EthereumSignTypedDataRpcResponse, Privy::Models::EthereumSignTransactionRpcResponse, Privy::Models::EthereumSendTransactionRpcResponse, Privy::Models::EthereumSignUserOperationRpcResponse, Privy::Models::EthereumSign7702AuthorizationRpcResponse, Privy::Models::EthereumSecp256k1SignRpcResponse, Privy::Models::EthereumSendCallsRpcResponse, Privy::Models::SolanaSignMessageRpcResponse, Privy::Models::SolanaSignTransactionRpcResponse, Privy::Models::SolanaSignAndSendTransactionRpcResponse, Privy::Models::SparkTransferRpcResponse, Privy::Models::SparkGetBalanceRpcResponse, Privy::Models::SparkTransferTokensRpcResponse, Privy::Models::SparkGetStaticDepositAddressRpcResponse, Privy::Models::SparkGetClaimStaticDepositQuoteRpcResponse, Privy::Models::SparkClaimStaticDepositRpcResponse, Privy::Models::SparkCreateLightningInvoiceRpcResponse, Privy::Models::SparkPayLightningInvoiceRpcResponse, Privy::Models::SparkSignMessageWithIdentityKeyRpcResponse, Privy::Models::SparkWithdrawRpcResponse, Privy::Models::SparkGetWithdrawalFeeQuoteRpcResponse, Privy::Models::TronSignTransactionRpcResponse, Privy::Models::TronSendTransactionRpcResponse, Privy::Models::ExportPrivateKeyRpcResponse, Privy::Models::ExportSeedPhraseRpcResponse)]
87
93
  end
88
94
  end
89
95
  end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Privy
4
+ module Models
5
+ # A named asset on Tron.
6
+ module WalletTronAsset
7
+ extend Privy::Internal::Type::Enum
8
+
9
+ TRX = :trx
10
+ USDT = :usdt
11
+ USDC = :usdc
12
+
13
+ # @!method self.values
14
+ # @return [Array<Symbol>]
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,130 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Privy
4
+ module Models
5
+ module Wallets
6
+ class AaveVaultDetails < 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_fees
39
+ # Fees available to collect, in smallest unit of the underlying asset.
40
+ #
41
+ # @return [String]
42
+ required :available_fees, String
43
+
44
+ # @!attribute available_liquidity_usd
45
+ # Available liquidity in USD.
46
+ #
47
+ # @return [Float, nil]
48
+ required :available_liquidity_usd, Float, nil?: true
49
+
50
+ # @!attribute caip2
51
+ # CAIP-2 chain identifier (e.g. "eip155:8453").
52
+ #
53
+ # @return [String]
54
+ required :caip2, String
55
+
56
+ # @!attribute name
57
+ # Human-readable vault name from the yield provider.
58
+ #
59
+ # @return [String]
60
+ required :name, String
61
+
62
+ # @!attribute provider
63
+ #
64
+ # @return [Symbol, Privy::Models::Wallets::AaveVaultDetails::Provider]
65
+ required :provider, enum: -> { Privy::Wallets::AaveVaultDetails::Provider }
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_fees:, available_liquidity_usd:, caip2:, name:, provider:, tvl_usd:, user_apy:, vault_address:)
87
+ # Some parameter documentations has been truncated, see
88
+ # {Privy::Models::Wallets::AaveVaultDetails} for more details.
89
+ #
90
+ # Vault details for an Aave earn vault, including fee visibility.
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_fees [String] Fees available to collect, in smallest unit of the underlying asset.
103
+ #
104
+ # @param available_liquidity_usd [Float, nil] Available liquidity in USD.
105
+ #
106
+ # @param caip2 [String] CAIP-2 chain identifier (e.g. "eip155:8453").
107
+ #
108
+ # @param name [String] Human-readable vault name from the yield provider.
109
+ #
110
+ # @param provider [Symbol, Privy::Models::Wallets::AaveVaultDetails::Provider]
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::AaveVaultDetails#provider
119
+ module Provider
120
+ extend Privy::Internal::Type::Enum
121
+
122
+ AAVE = :aave
123
+
124
+ # @!method self.values
125
+ # @return [Array<Symbol>]
126
+ end
127
+ end
128
+ end
129
+ end
130
+ end
@@ -101,6 +101,8 @@ module Privy
101
101
 
102
102
  variant const: -> { Privy::Models::Wallets::BalanceGetParams::Asset::POL }
103
103
 
104
+ variant const: -> { Privy::Models::Wallets::BalanceGetParams::Asset::BNB }
105
+
104
106
  variant const: -> { Privy::Models::Wallets::BalanceGetParams::Asset::USDT }
105
107
 
106
108
  variant const: -> { Privy::Models::Wallets::BalanceGetParams::Asset::EURC }
@@ -109,6 +111,8 @@ module Privy
109
111
 
110
112
  variant const: -> { Privy::Models::Wallets::BalanceGetParams::Asset::SOL }
111
113
 
114
+ variant const: -> { Privy::Models::Wallets::BalanceGetParams::Asset::TRX }
115
+
112
116
  variant -> { Privy::Models::Wallets::BalanceGetParams::Asset::WalletAssetArray }
113
117
 
114
118
  # @!method self.variants
@@ -125,10 +129,12 @@ module Privy
125
129
  ETH = :eth
126
130
  AVAX = :avax
127
131
  POL = :pol
132
+ BNB = :bnb
128
133
  USDT = :usdt
129
134
  EURC = :eurc
130
135
  USDB = :usdb
131
136
  SOL = :sol
137
+ TRX = :trx
132
138
 
133
139
  # @!endgroup
134
140
 
@@ -66,6 +66,8 @@ module Privy
66
66
 
67
67
  variant const: -> { Privy::Models::Wallets::BalanceGetResponse::Balance::Asset::POL }
68
68
 
69
+ variant const: -> { Privy::Models::Wallets::BalanceGetResponse::Balance::Asset::BNB }
70
+
69
71
  variant const: -> { Privy::Models::Wallets::BalanceGetResponse::Balance::Asset::USDT }
70
72
 
71
73
  variant const: -> { Privy::Models::Wallets::BalanceGetResponse::Balance::Asset::EURC }
@@ -74,6 +76,8 @@ module Privy
74
76
 
75
77
  variant const: -> { Privy::Models::Wallets::BalanceGetResponse::Balance::Asset::SOL }
76
78
 
79
+ variant const: -> { Privy::Models::Wallets::BalanceGetResponse::Balance::Asset::TRX }
80
+
77
81
  variant String
78
82
 
79
83
  # @!method self.variants
@@ -90,10 +94,12 @@ module Privy
90
94
  ETH = :eth
91
95
  AVAX = :avax
92
96
  POL = :pol
97
+ BNB = :bnb
93
98
  USDT = :usdt
94
99
  EURC = :eurc
95
100
  USDB = :usdb
96
101
  SOL = :sol
102
+ TRX = :trx
97
103
 
98
104
  # @!endgroup
99
105
  end