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,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
|
|
@@ -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
|
|
@@ -16,8 +16,11 @@ module Privy
|
|
|
16
16
|
# Vault details for a Morpho earn vault.
|
|
17
17
|
variant :morpho, -> { Privy::Wallets::MorphoVaultDetails }
|
|
18
18
|
|
|
19
|
+
# Vault details for a Veda (BoringVault) earn vault.
|
|
20
|
+
variant :veda, -> { Privy::Wallets::VedaVaultDetails }
|
|
21
|
+
|
|
19
22
|
# @!method self.variants
|
|
20
|
-
# @return [Array(Privy::Models::Wallets::AaveVaultDetails, Privy::Models::Wallets::MorphoVaultDetails)]
|
|
23
|
+
# @return [Array(Privy::Models::Wallets::AaveVaultDetails, Privy::Models::Wallets::MorphoVaultDetails, Privy::Models::Wallets::VedaVaultDetails)]
|
|
21
24
|
end
|
|
22
25
|
end
|
|
23
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,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
|