privy_ruby 0.4.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +1 -1
- data/lib/privy/models/custom_token_transfer_source.rb +14 -13
- data/lib/privy/models/ethereum_yield_provider.rb +1 -0
- data/lib/privy/models/named_token_transfer_source.rb +14 -13
- data/lib/privy/models/unsafe_unwrap_webhook_event.rb +17 -1
- data/lib/privy/models/wallet_action_earn_fee_collect_created_webhook_payload.rb +153 -0
- data/lib/privy/models/wallet_action_earn_fee_collect_failed_webhook_payload.rb +178 -0
- data/lib/privy/models/wallet_action_earn_fee_collect_rejected_webhook_payload.rb +177 -0
- data/lib/privy/models/wallet_action_earn_fee_collect_succeeded_webhook_payload.rb +169 -0
- data/lib/privy/models/wallets/earn_fee_collect_action_response.rb +149 -0
- data/lib/privy/models/wallets/earn_fee_collect_request_body.rb +20 -0
- data/lib/privy/models/wallets/ethereum_earn_provider.rb +1 -0
- data/lib/privy/models/wallets/ethereum_earn_vault_details_response.rb +4 -1
- data/lib/privy/models/wallets/list_wallet_actions_response.rb +2 -2
- data/lib/privy/models/wallets/veda_vault_details.rb +122 -0
- data/lib/privy/models/wallets/wallet_action_response.rb +4 -1
- data/lib/privy/models/wallets/wallet_action_type.rb +1 -0
- data/lib/privy/models/webhook_payload.rb +13 -1
- data/lib/privy/models.rb +12 -0
- data/lib/privy/resources/wallets/actions.rb +1 -1
- data/lib/privy/resources/webhooks.rb +1 -1
- data/lib/privy/version.rb +1 -1
- data/lib/privy.rb +7 -0
- data/rbi/privy/models/custom_token_transfer_source.rbi +18 -13
- data/rbi/privy/models/ethereum_yield_provider.rbi +1 -0
- data/rbi/privy/models/named_token_transfer_source.rbi +18 -13
- data/rbi/privy/models/unsafe_unwrap_webhook_event.rbi +4 -0
- data/rbi/privy/models/wallet_action_earn_fee_collect_created_webhook_payload.rbi +232 -0
- data/rbi/privy/models/wallet_action_earn_fee_collect_failed_webhook_payload.rbi +271 -0
- data/rbi/privy/models/wallet_action_earn_fee_collect_rejected_webhook_payload.rbi +269 -0
- data/rbi/privy/models/wallet_action_earn_fee_collect_succeeded_webhook_payload.rbi +258 -0
- data/rbi/privy/models/wallets/earn_fee_collect_action_response.rbi +236 -0
- data/rbi/privy/models/wallets/earn_fee_collect_request_body.rbi +33 -0
- data/rbi/privy/models/wallets/ethereum_earn_provider.rbi +1 -0
- data/rbi/privy/models/wallets/ethereum_earn_vault_details_response.rbi +2 -1
- data/rbi/privy/models/wallets/list_wallet_actions_response.rbi +6 -3
- data/rbi/privy/models/wallets/veda_vault_details.rbi +157 -0
- data/rbi/privy/models/wallets/wallet_action_response.rbi +2 -1
- data/rbi/privy/models/wallets/wallet_action_type.rbi +5 -0
- data/rbi/privy/models/webhook_payload.rbi +5 -1
- data/rbi/privy/models.rbi +12 -0
- data/rbi/privy/resources/webhooks.rbi +4 -0
- data/sig/privy/models/custom_token_transfer_source.rbs +8 -6
- data/sig/privy/models/ethereum_yield_provider.rbs +2 -1
- data/sig/privy/models/named_token_transfer_source.rbs +7 -5
- data/sig/privy/models/unsafe_unwrap_webhook_event.rbs +4 -0
- data/sig/privy/models/wallet_action_earn_fee_collect_created_webhook_payload.rbs +111 -0
- data/sig/privy/models/wallet_action_earn_fee_collect_failed_webhook_payload.rbs +126 -0
- data/sig/privy/models/wallet_action_earn_fee_collect_rejected_webhook_payload.rbs +126 -0
- data/sig/privy/models/wallet_action_earn_fee_collect_succeeded_webhook_payload.rbs +121 -0
- data/sig/privy/models/wallets/earn_fee_collect_action_response.rbs +114 -0
- data/sig/privy/models/wallets/earn_fee_collect_request_body.rbs +15 -0
- data/sig/privy/models/wallets/ethereum_earn_provider.rbs +2 -1
- data/sig/privy/models/wallets/ethereum_earn_vault_details_response.rbs +3 -1
- data/sig/privy/models/wallets/veda_vault_details.rbs +87 -0
- data/sig/privy/models/wallets/wallet_action_response.rbs +1 -0
- data/sig/privy/models/wallets/wallet_action_type.rbs +2 -0
- data/sig/privy/models/webhook_payload.rbs +4 -0
- data/sig/privy/models.rbs +8 -0
- data/sig/privy/resources/webhooks.rbs +4 -0
- metadata +23 -2
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Privy
|
|
4
|
+
module Models
|
|
5
|
+
class WalletActionEarnFeeCollectFailedWebhookPayload < Privy::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Privy::WalletActionEarnFeeCollectFailedWebhookPayload,
|
|
10
|
+
Privy::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Type of wallet action
|
|
15
|
+
sig { returns(Privy::Wallets::WalletActionType::TaggedSymbol) }
|
|
16
|
+
attr_accessor :action_type
|
|
17
|
+
|
|
18
|
+
# Underlying asset token address.
|
|
19
|
+
sig { returns(String) }
|
|
20
|
+
attr_accessor :asset_address
|
|
21
|
+
|
|
22
|
+
# CAIP-2 chain identifier.
|
|
23
|
+
sig { returns(String) }
|
|
24
|
+
attr_accessor :caip2
|
|
25
|
+
|
|
26
|
+
# ISO 8601 timestamp of when the wallet action was created.
|
|
27
|
+
sig { returns(String) }
|
|
28
|
+
attr_accessor :created_at
|
|
29
|
+
|
|
30
|
+
# ISO 8601 timestamp of when the wallet action failed.
|
|
31
|
+
sig { returns(String) }
|
|
32
|
+
attr_accessor :failed_at
|
|
33
|
+
|
|
34
|
+
# A description of why a wallet action (or a step within a wallet action) failed.
|
|
35
|
+
sig { returns(Privy::Wallets::FailureReason) }
|
|
36
|
+
attr_reader :failure_reason
|
|
37
|
+
|
|
38
|
+
sig { params(failure_reason: Privy::Wallets::FailureReason::OrHash).void }
|
|
39
|
+
attr_writer :failure_reason
|
|
40
|
+
|
|
41
|
+
# Base-unit amount of fees collected (e.g. "1500000").
|
|
42
|
+
sig { returns(String) }
|
|
43
|
+
attr_accessor :raw_amount
|
|
44
|
+
|
|
45
|
+
# The status of the wallet action.
|
|
46
|
+
sig do
|
|
47
|
+
returns(
|
|
48
|
+
Privy::WalletActionEarnFeeCollectFailedWebhookPayload::Status::TaggedSymbol
|
|
49
|
+
)
|
|
50
|
+
end
|
|
51
|
+
attr_accessor :status
|
|
52
|
+
|
|
53
|
+
# The steps of the wallet action. Completed steps will have transaction hashes;
|
|
54
|
+
# the failing step will have a failure_reason.
|
|
55
|
+
sig { returns(T::Array[Privy::Wallets::WalletActionStep::Variants]) }
|
|
56
|
+
attr_accessor :steps
|
|
57
|
+
|
|
58
|
+
# The type of webhook event.
|
|
59
|
+
sig do
|
|
60
|
+
returns(
|
|
61
|
+
Privy::WalletActionEarnFeeCollectFailedWebhookPayload::Type::TaggedSymbol
|
|
62
|
+
)
|
|
63
|
+
end
|
|
64
|
+
attr_accessor :type
|
|
65
|
+
|
|
66
|
+
# ERC-4626 vault contract address.
|
|
67
|
+
sig { returns(String) }
|
|
68
|
+
attr_accessor :vault_address
|
|
69
|
+
|
|
70
|
+
# The vault ID.
|
|
71
|
+
sig { returns(String) }
|
|
72
|
+
attr_accessor :vault_id
|
|
73
|
+
|
|
74
|
+
# The ID of the wallet action.
|
|
75
|
+
sig { returns(String) }
|
|
76
|
+
attr_accessor :wallet_action_id
|
|
77
|
+
|
|
78
|
+
# The ID of the wallet involved in the action.
|
|
79
|
+
sig { returns(String) }
|
|
80
|
+
attr_accessor :wallet_id
|
|
81
|
+
|
|
82
|
+
# Human-readable decimal amount of fees collected (e.g. "1.5"). Only present when
|
|
83
|
+
# the token is known in the asset registry.
|
|
84
|
+
sig { returns(T.nilable(String)) }
|
|
85
|
+
attr_reader :amount
|
|
86
|
+
|
|
87
|
+
sig { params(amount: String).void }
|
|
88
|
+
attr_writer :amount
|
|
89
|
+
|
|
90
|
+
# Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
|
|
91
|
+
# the asset registry.
|
|
92
|
+
sig { returns(T.nilable(String)) }
|
|
93
|
+
attr_reader :asset
|
|
94
|
+
|
|
95
|
+
sig { params(asset: String).void }
|
|
96
|
+
attr_writer :asset
|
|
97
|
+
|
|
98
|
+
# Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
|
|
99
|
+
# present when the token is known in the asset registry.
|
|
100
|
+
sig { returns(T.nilable(Integer)) }
|
|
101
|
+
attr_reader :decimals
|
|
102
|
+
|
|
103
|
+
sig { params(decimals: Integer).void }
|
|
104
|
+
attr_writer :decimals
|
|
105
|
+
|
|
106
|
+
# Payload for the wallet_action.earn_fee_collect.failed webhook event.
|
|
107
|
+
sig do
|
|
108
|
+
params(
|
|
109
|
+
action_type: Privy::Wallets::WalletActionType::OrSymbol,
|
|
110
|
+
asset_address: String,
|
|
111
|
+
caip2: String,
|
|
112
|
+
created_at: String,
|
|
113
|
+
failed_at: String,
|
|
114
|
+
failure_reason: Privy::Wallets::FailureReason::OrHash,
|
|
115
|
+
raw_amount: String,
|
|
116
|
+
status:
|
|
117
|
+
Privy::WalletActionEarnFeeCollectFailedWebhookPayload::Status::OrSymbol,
|
|
118
|
+
steps:
|
|
119
|
+
T::Array[
|
|
120
|
+
T.any(
|
|
121
|
+
Privy::Wallets::EvmTransactionWalletActionStep::OrHash,
|
|
122
|
+
Privy::Wallets::EvmUserOperationWalletActionStep::OrHash,
|
|
123
|
+
Privy::Wallets::SvmTransactionWalletActionStep::OrHash,
|
|
124
|
+
Privy::Wallets::TvmTransactionWalletActionStep::OrHash,
|
|
125
|
+
Privy::Wallets::ExternalTransactionWalletActionStep::OrHash,
|
|
126
|
+
Privy::Wallets::CustodianTransactionWalletActionStep::OrHash
|
|
127
|
+
)
|
|
128
|
+
],
|
|
129
|
+
type:
|
|
130
|
+
Privy::WalletActionEarnFeeCollectFailedWebhookPayload::Type::OrSymbol,
|
|
131
|
+
vault_address: String,
|
|
132
|
+
vault_id: String,
|
|
133
|
+
wallet_action_id: String,
|
|
134
|
+
wallet_id: String,
|
|
135
|
+
amount: String,
|
|
136
|
+
asset: String,
|
|
137
|
+
decimals: Integer
|
|
138
|
+
).returns(T.attached_class)
|
|
139
|
+
end
|
|
140
|
+
def self.new(
|
|
141
|
+
# Type of wallet action
|
|
142
|
+
action_type:,
|
|
143
|
+
# Underlying asset token address.
|
|
144
|
+
asset_address:,
|
|
145
|
+
# CAIP-2 chain identifier.
|
|
146
|
+
caip2:,
|
|
147
|
+
# ISO 8601 timestamp of when the wallet action was created.
|
|
148
|
+
created_at:,
|
|
149
|
+
# ISO 8601 timestamp of when the wallet action failed.
|
|
150
|
+
failed_at:,
|
|
151
|
+
# A description of why a wallet action (or a step within a wallet action) failed.
|
|
152
|
+
failure_reason:,
|
|
153
|
+
# Base-unit amount of fees collected (e.g. "1500000").
|
|
154
|
+
raw_amount:,
|
|
155
|
+
# The status of the wallet action.
|
|
156
|
+
status:,
|
|
157
|
+
# The steps of the wallet action. Completed steps will have transaction hashes;
|
|
158
|
+
# the failing step will have a failure_reason.
|
|
159
|
+
steps:,
|
|
160
|
+
# The type of webhook event.
|
|
161
|
+
type:,
|
|
162
|
+
# ERC-4626 vault contract address.
|
|
163
|
+
vault_address:,
|
|
164
|
+
# The vault ID.
|
|
165
|
+
vault_id:,
|
|
166
|
+
# The ID of the wallet action.
|
|
167
|
+
wallet_action_id:,
|
|
168
|
+
# The ID of the wallet involved in the action.
|
|
169
|
+
wallet_id:,
|
|
170
|
+
# Human-readable decimal amount of fees collected (e.g. "1.5"). Only present when
|
|
171
|
+
# the token is known in the asset registry.
|
|
172
|
+
amount: nil,
|
|
173
|
+
# Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
|
|
174
|
+
# the asset registry.
|
|
175
|
+
asset: nil,
|
|
176
|
+
# Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
|
|
177
|
+
# present when the token is known in the asset registry.
|
|
178
|
+
decimals: nil
|
|
179
|
+
)
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
sig do
|
|
183
|
+
override.returns(
|
|
184
|
+
{
|
|
185
|
+
action_type: Privy::Wallets::WalletActionType::TaggedSymbol,
|
|
186
|
+
asset_address: String,
|
|
187
|
+
caip2: String,
|
|
188
|
+
created_at: String,
|
|
189
|
+
failed_at: String,
|
|
190
|
+
failure_reason: Privy::Wallets::FailureReason,
|
|
191
|
+
raw_amount: String,
|
|
192
|
+
status:
|
|
193
|
+
Privy::WalletActionEarnFeeCollectFailedWebhookPayload::Status::TaggedSymbol,
|
|
194
|
+
steps: T::Array[Privy::Wallets::WalletActionStep::Variants],
|
|
195
|
+
type:
|
|
196
|
+
Privy::WalletActionEarnFeeCollectFailedWebhookPayload::Type::TaggedSymbol,
|
|
197
|
+
vault_address: String,
|
|
198
|
+
vault_id: String,
|
|
199
|
+
wallet_action_id: String,
|
|
200
|
+
wallet_id: String,
|
|
201
|
+
amount: String,
|
|
202
|
+
asset: String,
|
|
203
|
+
decimals: Integer
|
|
204
|
+
}
|
|
205
|
+
)
|
|
206
|
+
end
|
|
207
|
+
def to_hash
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# The status of the wallet action.
|
|
211
|
+
module Status
|
|
212
|
+
extend Privy::Internal::Type::Enum
|
|
213
|
+
|
|
214
|
+
TaggedSymbol =
|
|
215
|
+
T.type_alias do
|
|
216
|
+
T.all(
|
|
217
|
+
Symbol,
|
|
218
|
+
Privy::WalletActionEarnFeeCollectFailedWebhookPayload::Status
|
|
219
|
+
)
|
|
220
|
+
end
|
|
221
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
222
|
+
|
|
223
|
+
FAILED =
|
|
224
|
+
T.let(
|
|
225
|
+
:failed,
|
|
226
|
+
Privy::WalletActionEarnFeeCollectFailedWebhookPayload::Status::TaggedSymbol
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
sig do
|
|
230
|
+
override.returns(
|
|
231
|
+
T::Array[
|
|
232
|
+
Privy::WalletActionEarnFeeCollectFailedWebhookPayload::Status::TaggedSymbol
|
|
233
|
+
]
|
|
234
|
+
)
|
|
235
|
+
end
|
|
236
|
+
def self.values
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# The type of webhook event.
|
|
241
|
+
module Type
|
|
242
|
+
extend Privy::Internal::Type::Enum
|
|
243
|
+
|
|
244
|
+
TaggedSymbol =
|
|
245
|
+
T.type_alias do
|
|
246
|
+
T.all(
|
|
247
|
+
Symbol,
|
|
248
|
+
Privy::WalletActionEarnFeeCollectFailedWebhookPayload::Type
|
|
249
|
+
)
|
|
250
|
+
end
|
|
251
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
252
|
+
|
|
253
|
+
WALLET_ACTION_EARN_FEE_COLLECT_FAILED =
|
|
254
|
+
T.let(
|
|
255
|
+
:"wallet_action.earn_fee_collect.failed",
|
|
256
|
+
Privy::WalletActionEarnFeeCollectFailedWebhookPayload::Type::TaggedSymbol
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
sig do
|
|
260
|
+
override.returns(
|
|
261
|
+
T::Array[
|
|
262
|
+
Privy::WalletActionEarnFeeCollectFailedWebhookPayload::Type::TaggedSymbol
|
|
263
|
+
]
|
|
264
|
+
)
|
|
265
|
+
end
|
|
266
|
+
def self.values
|
|
267
|
+
end
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
end
|
|
271
|
+
end
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Privy
|
|
4
|
+
module Models
|
|
5
|
+
class WalletActionEarnFeeCollectRejectedWebhookPayload < Privy::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Privy::WalletActionEarnFeeCollectRejectedWebhookPayload,
|
|
10
|
+
Privy::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Type of wallet action
|
|
15
|
+
sig { returns(Privy::Wallets::WalletActionType::TaggedSymbol) }
|
|
16
|
+
attr_accessor :action_type
|
|
17
|
+
|
|
18
|
+
# Underlying asset token address.
|
|
19
|
+
sig { returns(String) }
|
|
20
|
+
attr_accessor :asset_address
|
|
21
|
+
|
|
22
|
+
# CAIP-2 chain identifier.
|
|
23
|
+
sig { returns(String) }
|
|
24
|
+
attr_accessor :caip2
|
|
25
|
+
|
|
26
|
+
# ISO 8601 timestamp of when the wallet action was created.
|
|
27
|
+
sig { returns(String) }
|
|
28
|
+
attr_accessor :created_at
|
|
29
|
+
|
|
30
|
+
# A description of why a wallet action (or a step within a wallet action) failed.
|
|
31
|
+
sig { returns(Privy::Wallets::FailureReason) }
|
|
32
|
+
attr_reader :failure_reason
|
|
33
|
+
|
|
34
|
+
sig { params(failure_reason: Privy::Wallets::FailureReason::OrHash).void }
|
|
35
|
+
attr_writer :failure_reason
|
|
36
|
+
|
|
37
|
+
# Base-unit amount of fees collected (e.g. "1500000").
|
|
38
|
+
sig { returns(String) }
|
|
39
|
+
attr_accessor :raw_amount
|
|
40
|
+
|
|
41
|
+
# ISO 8601 timestamp of when the wallet action was rejected.
|
|
42
|
+
sig { returns(String) }
|
|
43
|
+
attr_accessor :rejected_at
|
|
44
|
+
|
|
45
|
+
# The status of the wallet action.
|
|
46
|
+
sig do
|
|
47
|
+
returns(
|
|
48
|
+
Privy::WalletActionEarnFeeCollectRejectedWebhookPayload::Status::TaggedSymbol
|
|
49
|
+
)
|
|
50
|
+
end
|
|
51
|
+
attr_accessor :status
|
|
52
|
+
|
|
53
|
+
# The steps of the wallet action at the time of rejection.
|
|
54
|
+
sig { returns(T::Array[Privy::Wallets::WalletActionStep::Variants]) }
|
|
55
|
+
attr_accessor :steps
|
|
56
|
+
|
|
57
|
+
# The type of webhook event.
|
|
58
|
+
sig do
|
|
59
|
+
returns(
|
|
60
|
+
Privy::WalletActionEarnFeeCollectRejectedWebhookPayload::Type::TaggedSymbol
|
|
61
|
+
)
|
|
62
|
+
end
|
|
63
|
+
attr_accessor :type
|
|
64
|
+
|
|
65
|
+
# ERC-4626 vault contract address.
|
|
66
|
+
sig { returns(String) }
|
|
67
|
+
attr_accessor :vault_address
|
|
68
|
+
|
|
69
|
+
# The vault ID.
|
|
70
|
+
sig { returns(String) }
|
|
71
|
+
attr_accessor :vault_id
|
|
72
|
+
|
|
73
|
+
# The ID of the wallet action.
|
|
74
|
+
sig { returns(String) }
|
|
75
|
+
attr_accessor :wallet_action_id
|
|
76
|
+
|
|
77
|
+
# The ID of the wallet involved in the action.
|
|
78
|
+
sig { returns(String) }
|
|
79
|
+
attr_accessor :wallet_id
|
|
80
|
+
|
|
81
|
+
# Human-readable decimal amount of fees collected (e.g. "1.5"). Only present when
|
|
82
|
+
# the token is known in the asset registry.
|
|
83
|
+
sig { returns(T.nilable(String)) }
|
|
84
|
+
attr_reader :amount
|
|
85
|
+
|
|
86
|
+
sig { params(amount: String).void }
|
|
87
|
+
attr_writer :amount
|
|
88
|
+
|
|
89
|
+
# Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
|
|
90
|
+
# the asset registry.
|
|
91
|
+
sig { returns(T.nilable(String)) }
|
|
92
|
+
attr_reader :asset
|
|
93
|
+
|
|
94
|
+
sig { params(asset: String).void }
|
|
95
|
+
attr_writer :asset
|
|
96
|
+
|
|
97
|
+
# Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
|
|
98
|
+
# present when the token is known in the asset registry.
|
|
99
|
+
sig { returns(T.nilable(Integer)) }
|
|
100
|
+
attr_reader :decimals
|
|
101
|
+
|
|
102
|
+
sig { params(decimals: Integer).void }
|
|
103
|
+
attr_writer :decimals
|
|
104
|
+
|
|
105
|
+
# Payload for the wallet_action.earn_fee_collect.rejected webhook event.
|
|
106
|
+
sig do
|
|
107
|
+
params(
|
|
108
|
+
action_type: Privy::Wallets::WalletActionType::OrSymbol,
|
|
109
|
+
asset_address: String,
|
|
110
|
+
caip2: String,
|
|
111
|
+
created_at: String,
|
|
112
|
+
failure_reason: Privy::Wallets::FailureReason::OrHash,
|
|
113
|
+
raw_amount: String,
|
|
114
|
+
rejected_at: String,
|
|
115
|
+
status:
|
|
116
|
+
Privy::WalletActionEarnFeeCollectRejectedWebhookPayload::Status::OrSymbol,
|
|
117
|
+
steps:
|
|
118
|
+
T::Array[
|
|
119
|
+
T.any(
|
|
120
|
+
Privy::Wallets::EvmTransactionWalletActionStep::OrHash,
|
|
121
|
+
Privy::Wallets::EvmUserOperationWalletActionStep::OrHash,
|
|
122
|
+
Privy::Wallets::SvmTransactionWalletActionStep::OrHash,
|
|
123
|
+
Privy::Wallets::TvmTransactionWalletActionStep::OrHash,
|
|
124
|
+
Privy::Wallets::ExternalTransactionWalletActionStep::OrHash,
|
|
125
|
+
Privy::Wallets::CustodianTransactionWalletActionStep::OrHash
|
|
126
|
+
)
|
|
127
|
+
],
|
|
128
|
+
type:
|
|
129
|
+
Privy::WalletActionEarnFeeCollectRejectedWebhookPayload::Type::OrSymbol,
|
|
130
|
+
vault_address: String,
|
|
131
|
+
vault_id: String,
|
|
132
|
+
wallet_action_id: String,
|
|
133
|
+
wallet_id: String,
|
|
134
|
+
amount: String,
|
|
135
|
+
asset: String,
|
|
136
|
+
decimals: Integer
|
|
137
|
+
).returns(T.attached_class)
|
|
138
|
+
end
|
|
139
|
+
def self.new(
|
|
140
|
+
# Type of wallet action
|
|
141
|
+
action_type:,
|
|
142
|
+
# Underlying asset token address.
|
|
143
|
+
asset_address:,
|
|
144
|
+
# CAIP-2 chain identifier.
|
|
145
|
+
caip2:,
|
|
146
|
+
# ISO 8601 timestamp of when the wallet action was created.
|
|
147
|
+
created_at:,
|
|
148
|
+
# A description of why a wallet action (or a step within a wallet action) failed.
|
|
149
|
+
failure_reason:,
|
|
150
|
+
# Base-unit amount of fees collected (e.g. "1500000").
|
|
151
|
+
raw_amount:,
|
|
152
|
+
# ISO 8601 timestamp of when the wallet action was rejected.
|
|
153
|
+
rejected_at:,
|
|
154
|
+
# The status of the wallet action.
|
|
155
|
+
status:,
|
|
156
|
+
# The steps of the wallet action at the time of rejection.
|
|
157
|
+
steps:,
|
|
158
|
+
# The type of webhook event.
|
|
159
|
+
type:,
|
|
160
|
+
# ERC-4626 vault contract address.
|
|
161
|
+
vault_address:,
|
|
162
|
+
# The vault ID.
|
|
163
|
+
vault_id:,
|
|
164
|
+
# The ID of the wallet action.
|
|
165
|
+
wallet_action_id:,
|
|
166
|
+
# The ID of the wallet involved in the action.
|
|
167
|
+
wallet_id:,
|
|
168
|
+
# Human-readable decimal amount of fees collected (e.g. "1.5"). Only present when
|
|
169
|
+
# the token is known in the asset registry.
|
|
170
|
+
amount: nil,
|
|
171
|
+
# Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
|
|
172
|
+
# the asset registry.
|
|
173
|
+
asset: nil,
|
|
174
|
+
# Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
|
|
175
|
+
# present when the token is known in the asset registry.
|
|
176
|
+
decimals: nil
|
|
177
|
+
)
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
sig do
|
|
181
|
+
override.returns(
|
|
182
|
+
{
|
|
183
|
+
action_type: Privy::Wallets::WalletActionType::TaggedSymbol,
|
|
184
|
+
asset_address: String,
|
|
185
|
+
caip2: String,
|
|
186
|
+
created_at: String,
|
|
187
|
+
failure_reason: Privy::Wallets::FailureReason,
|
|
188
|
+
raw_amount: String,
|
|
189
|
+
rejected_at: String,
|
|
190
|
+
status:
|
|
191
|
+
Privy::WalletActionEarnFeeCollectRejectedWebhookPayload::Status::TaggedSymbol,
|
|
192
|
+
steps: T::Array[Privy::Wallets::WalletActionStep::Variants],
|
|
193
|
+
type:
|
|
194
|
+
Privy::WalletActionEarnFeeCollectRejectedWebhookPayload::Type::TaggedSymbol,
|
|
195
|
+
vault_address: String,
|
|
196
|
+
vault_id: String,
|
|
197
|
+
wallet_action_id: String,
|
|
198
|
+
wallet_id: String,
|
|
199
|
+
amount: String,
|
|
200
|
+
asset: String,
|
|
201
|
+
decimals: Integer
|
|
202
|
+
}
|
|
203
|
+
)
|
|
204
|
+
end
|
|
205
|
+
def to_hash
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# The status of the wallet action.
|
|
209
|
+
module Status
|
|
210
|
+
extend Privy::Internal::Type::Enum
|
|
211
|
+
|
|
212
|
+
TaggedSymbol =
|
|
213
|
+
T.type_alias do
|
|
214
|
+
T.all(
|
|
215
|
+
Symbol,
|
|
216
|
+
Privy::WalletActionEarnFeeCollectRejectedWebhookPayload::Status
|
|
217
|
+
)
|
|
218
|
+
end
|
|
219
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
220
|
+
|
|
221
|
+
REJECTED =
|
|
222
|
+
T.let(
|
|
223
|
+
:rejected,
|
|
224
|
+
Privy::WalletActionEarnFeeCollectRejectedWebhookPayload::Status::TaggedSymbol
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
sig do
|
|
228
|
+
override.returns(
|
|
229
|
+
T::Array[
|
|
230
|
+
Privy::WalletActionEarnFeeCollectRejectedWebhookPayload::Status::TaggedSymbol
|
|
231
|
+
]
|
|
232
|
+
)
|
|
233
|
+
end
|
|
234
|
+
def self.values
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# The type of webhook event.
|
|
239
|
+
module Type
|
|
240
|
+
extend Privy::Internal::Type::Enum
|
|
241
|
+
|
|
242
|
+
TaggedSymbol =
|
|
243
|
+
T.type_alias do
|
|
244
|
+
T.all(
|
|
245
|
+
Symbol,
|
|
246
|
+
Privy::WalletActionEarnFeeCollectRejectedWebhookPayload::Type
|
|
247
|
+
)
|
|
248
|
+
end
|
|
249
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
250
|
+
|
|
251
|
+
WALLET_ACTION_EARN_FEE_COLLECT_REJECTED =
|
|
252
|
+
T.let(
|
|
253
|
+
:"wallet_action.earn_fee_collect.rejected",
|
|
254
|
+
Privy::WalletActionEarnFeeCollectRejectedWebhookPayload::Type::TaggedSymbol
|
|
255
|
+
)
|
|
256
|
+
|
|
257
|
+
sig do
|
|
258
|
+
override.returns(
|
|
259
|
+
T::Array[
|
|
260
|
+
Privy::WalletActionEarnFeeCollectRejectedWebhookPayload::Type::TaggedSymbol
|
|
261
|
+
]
|
|
262
|
+
)
|
|
263
|
+
end
|
|
264
|
+
def self.values
|
|
265
|
+
end
|
|
266
|
+
end
|
|
267
|
+
end
|
|
268
|
+
end
|
|
269
|
+
end
|