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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/README.md +1 -1
- data/lib/privy/authorization/canonicalization.rb +2 -0
- 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/rpc_intent_request_details.rb +2 -2
- data/lib/privy/models/rpc_intent_response.rb +2 -2
- data/lib/privy/models/spark_coop_exit_fee_quote.rb +101 -0
- data/lib/privy/models/spark_coop_exit_request.rb +90 -0
- data/lib/privy/models/spark_currency_amount.rb +23 -0
- data/lib/privy/models/spark_exit_speed.rb +17 -0
- data/lib/privy/models/spark_get_withdrawal_fee_quote_rpc_input.rb +43 -0
- data/lib/privy/models/spark_get_withdrawal_fee_quote_rpc_input_params.rb +23 -0
- data/lib/privy/models/spark_get_withdrawal_fee_quote_rpc_response.rb +35 -0
- data/lib/privy/models/spark_rpc_input.rb +7 -1
- data/lib/privy/models/spark_rpc_response.rb +7 -1
- data/lib/privy/models/spark_withdraw_rpc_input.rb +43 -0
- data/lib/privy/models/spark_withdraw_rpc_input_params.rb +53 -0
- data/lib/privy/models/spark_withdraw_rpc_response.rb +35 -0
- data/lib/privy/models/transaction_chain_name_input.rb +25 -0
- data/lib/privy/models/transfer_received_transaction_detail.rb +6 -0
- data/lib/privy/models/transfer_sent_transaction_detail.rb +6 -0
- 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/wallet_asset.rb +2 -0
- data/lib/privy/models/wallet_asset_chain_name_input.rb +3 -0
- data/lib/privy/models/wallet_creation_input.rb +11 -1
- data/lib/privy/models/wallet_ethereum_asset.rb +1 -0
- data/lib/privy/models/wallet_rpc_request_body.rb +7 -1
- data/lib/privy/models/wallet_rpc_response.rb +7 -1
- data/lib/privy/models/wallet_tron_asset.rb +17 -0
- data/lib/privy/models/wallets/aave_vault_details.rb +130 -0
- data/lib/privy/models/wallets/balance_get_params.rb +6 -0
- data/lib/privy/models/wallets/balance_get_response.rb +6 -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 +13 -83
- data/lib/privy/models/wallets/list_wallet_actions_response.rb +2 -2
- data/lib/privy/models/wallets/morpho_vault_details.rb +130 -0
- data/lib/privy/models/wallets/transaction_get_params.rb +10 -20
- 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 +36 -0
- data/lib/privy/public_api/services/tron.rb +103 -0
- data/lib/privy/public_api/services/wallets.rb +4 -0
- data/lib/privy/resources/intents.rb +1 -1
- data/lib/privy/resources/wallets/actions.rb +1 -1
- data/lib/privy/resources/wallets/transactions.rb +1 -1
- data/lib/privy/resources/wallets.rb +2 -2
- data/lib/privy/resources/webhooks.rb +1 -1
- data/lib/privy/version.rb +1 -1
- data/lib/privy.rb +22 -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/rpc_intent_request_details.rbi +6 -0
- data/rbi/privy/models/rpc_intent_response.rbi +2 -0
- data/rbi/privy/models/spark_coop_exit_fee_quote.rbi +143 -0
- data/rbi/privy/models/spark_coop_exit_request.rbi +114 -0
- data/rbi/privy/models/spark_currency_amount.rbi +31 -0
- data/rbi/privy/models/spark_exit_speed.rbi +21 -0
- data/rbi/privy/models/spark_get_withdrawal_fee_quote_rpc_input.rbi +94 -0
- data/rbi/privy/models/spark_get_withdrawal_fee_quote_rpc_input_params.rbi +34 -0
- data/rbi/privy/models/spark_get_withdrawal_fee_quote_rpc_response.rbi +82 -0
- data/rbi/privy/models/spark_rpc_input.rbi +3 -1
- data/rbi/privy/models/spark_rpc_response.rbi +3 -1
- data/rbi/privy/models/spark_withdraw_rpc_input.rbi +77 -0
- data/rbi/privy/models/spark_withdraw_rpc_input_params.rbi +80 -0
- data/rbi/privy/models/spark_withdraw_rpc_response.rbi +71 -0
- data/rbi/privy/models/transaction_chain_name_input.rbi +38 -0
- data/rbi/privy/models/transfer_received_transaction_detail.rbi +10 -0
- data/rbi/privy/models/transfer_sent_transaction_detail.rbi +4 -0
- 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/wallet_asset.rbi +2 -0
- data/rbi/privy/models/wallet_asset_chain_name_input.rbi +4 -0
- data/rbi/privy/models/wallet_creation_input.rbi +15 -0
- data/rbi/privy/models/wallet_ethereum_asset.rbi +1 -0
- data/rbi/privy/models/wallet_rpc_request_body.rbi +2 -0
- data/rbi/privy/models/wallet_rpc_response.rbi +2 -0
- data/rbi/privy/models/wallet_tron_asset.rbi +21 -0
- data/rbi/privy/models/wallets/aave_vault_details.rbi +165 -0
- data/rbi/privy/models/wallets/balance_get_params.rbi +4 -0
- data/rbi/privy/models/wallets/balance_get_response.rbi +10 -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 +11 -103
- data/rbi/privy/models/wallets/list_wallet_actions_response.rbi +6 -3
- data/rbi/privy/models/wallets/morpho_vault_details.rbi +167 -0
- data/rbi/privy/models/wallets/transaction_get_params.rbi +15 -69
- 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 +39 -0
- data/rbi/privy/resources/intents.rbi +2 -0
- data/rbi/privy/resources/wallets/transactions.rbi +2 -1
- data/rbi/privy/resources/wallets.rbi +2 -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/spark_coop_exit_fee_quote.rbs +75 -0
- data/sig/privy/models/spark_coop_exit_request.rbs +76 -0
- data/sig/privy/models/spark_currency_amount.rbs +16 -0
- data/sig/privy/models/spark_exit_speed.rbs +15 -0
- data/sig/privy/models/spark_get_withdrawal_fee_quote_rpc_input.rbs +44 -0
- data/sig/privy/models/spark_get_withdrawal_fee_quote_rpc_input_params.rbs +16 -0
- data/sig/privy/models/spark_get_withdrawal_fee_quote_rpc_response.rbs +37 -0
- data/sig/privy/models/spark_rpc_input.rbs +2 -0
- data/sig/privy/models/spark_rpc_response.rbs +2 -0
- data/sig/privy/models/spark_withdraw_rpc_input.rbs +44 -0
- data/sig/privy/models/spark_withdraw_rpc_input_params.rbs +53 -0
- data/sig/privy/models/spark_withdraw_rpc_response.rbs +37 -0
- data/sig/privy/models/transaction_chain_name_input.rbs +34 -0
- data/sig/privy/models/transfer_received_transaction_detail.rbs +4 -0
- data/sig/privy/models/transfer_sent_transaction_detail.rbs +4 -0
- 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/wallet_asset.rbs +13 -1
- data/sig/privy/models/wallet_asset_chain_name_input.rbs +6 -0
- data/sig/privy/models/wallet_creation_input.rbs +7 -0
- data/sig/privy/models/wallet_ethereum_asset.rbs +2 -1
- data/sig/privy/models/wallet_rpc_request_body.rbs +2 -0
- data/sig/privy/models/wallet_rpc_response.rbs +2 -0
- data/sig/privy/models/wallet_tron_asset.rbs +15 -0
- data/sig/privy/models/wallets/aave_vault_details.rbs +92 -0
- data/sig/privy/models/wallets/balance_get_params.rbs +4 -0
- data/sig/privy/models/wallets/balance_get_response.rbs +4 -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 +6 -57
- data/sig/privy/models/wallets/morpho_vault_details.rbs +92 -0
- data/sig/privy/models/wallets/transaction_get_params.rbs +8 -31
- 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 +32 -0
- data/sig/privy/resources/wallets/transactions.rbs +1 -1
- data/sig/privy/resources/webhooks.rbs +4 -0
- metadata +66 -2
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Privy
|
|
4
|
+
module Models
|
|
5
|
+
class SparkWithdrawRpcResponse < Privy::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Privy::SparkWithdrawRpcResponse, Privy::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
sig { returns(Privy::SparkWithdrawRpcResponse::Method::TaggedSymbol) }
|
|
12
|
+
attr_accessor :method_
|
|
13
|
+
|
|
14
|
+
# A cooperative exit request from Spark to Bitcoin L1.
|
|
15
|
+
sig { returns(T.nilable(Privy::SparkCoopExitRequest)) }
|
|
16
|
+
attr_reader :data
|
|
17
|
+
|
|
18
|
+
sig { params(data: Privy::SparkCoopExitRequest::OrHash).void }
|
|
19
|
+
attr_writer :data
|
|
20
|
+
|
|
21
|
+
# Response to the Spark `withdraw` RPC.
|
|
22
|
+
sig do
|
|
23
|
+
params(
|
|
24
|
+
method_: Privy::SparkWithdrawRpcResponse::Method::OrSymbol,
|
|
25
|
+
data: Privy::SparkCoopExitRequest::OrHash
|
|
26
|
+
).returns(T.attached_class)
|
|
27
|
+
end
|
|
28
|
+
def self.new(
|
|
29
|
+
method_:,
|
|
30
|
+
# A cooperative exit request from Spark to Bitcoin L1.
|
|
31
|
+
data: nil
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
sig do
|
|
36
|
+
override.returns(
|
|
37
|
+
{
|
|
38
|
+
method_: Privy::SparkWithdrawRpcResponse::Method::TaggedSymbol,
|
|
39
|
+
data: Privy::SparkCoopExitRequest
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
def to_hash
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
module Method
|
|
47
|
+
extend Privy::Internal::Type::Enum
|
|
48
|
+
|
|
49
|
+
TaggedSymbol =
|
|
50
|
+
T.type_alias do
|
|
51
|
+
T.all(Symbol, Privy::SparkWithdrawRpcResponse::Method)
|
|
52
|
+
end
|
|
53
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
54
|
+
|
|
55
|
+
WITHDRAW =
|
|
56
|
+
T.let(
|
|
57
|
+
:withdraw,
|
|
58
|
+
Privy::SparkWithdrawRpcResponse::Method::TaggedSymbol
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
sig do
|
|
62
|
+
override.returns(
|
|
63
|
+
T::Array[Privy::SparkWithdrawRpcResponse::Method::TaggedSymbol]
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
def self.values
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Privy
|
|
4
|
+
module Models
|
|
5
|
+
# Chains supported for transaction history queries.
|
|
6
|
+
module TransactionChainNameInput
|
|
7
|
+
extend Privy::Internal::Type::Enum
|
|
8
|
+
|
|
9
|
+
TaggedSymbol =
|
|
10
|
+
T.type_alias { T.all(Symbol, Privy::TransactionChainNameInput) }
|
|
11
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
12
|
+
|
|
13
|
+
ETHEREUM =
|
|
14
|
+
T.let(:ethereum, Privy::TransactionChainNameInput::TaggedSymbol)
|
|
15
|
+
ARBITRUM =
|
|
16
|
+
T.let(:arbitrum, Privy::TransactionChainNameInput::TaggedSymbol)
|
|
17
|
+
AVALANCHE =
|
|
18
|
+
T.let(:avalanche, Privy::TransactionChainNameInput::TaggedSymbol)
|
|
19
|
+
BASE = T.let(:base, Privy::TransactionChainNameInput::TaggedSymbol)
|
|
20
|
+
BSC = T.let(:bsc, Privy::TransactionChainNameInput::TaggedSymbol)
|
|
21
|
+
TEMPO = T.let(:tempo, Privy::TransactionChainNameInput::TaggedSymbol)
|
|
22
|
+
LINEA = T.let(:linea, Privy::TransactionChainNameInput::TaggedSymbol)
|
|
23
|
+
OPTIMISM =
|
|
24
|
+
T.let(:optimism, Privy::TransactionChainNameInput::TaggedSymbol)
|
|
25
|
+
POLYGON = T.let(:polygon, Privy::TransactionChainNameInput::TaggedSymbol)
|
|
26
|
+
SOLANA = T.let(:solana, Privy::TransactionChainNameInput::TaggedSymbol)
|
|
27
|
+
SEPOLIA = T.let(:sepolia, Privy::TransactionChainNameInput::TaggedSymbol)
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
T::Array[Privy::TransactionChainNameInput::TaggedSymbol]
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
def self.values
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -147,6 +147,11 @@ module Privy
|
|
|
147
147
|
:pol,
|
|
148
148
|
Privy::TransferReceivedTransactionDetail::Asset::TaggedSymbol
|
|
149
149
|
)
|
|
150
|
+
BNB =
|
|
151
|
+
T.let(
|
|
152
|
+
:bnb,
|
|
153
|
+
Privy::TransferReceivedTransactionDetail::Asset::TaggedSymbol
|
|
154
|
+
)
|
|
150
155
|
USDT =
|
|
151
156
|
T.let(
|
|
152
157
|
:usdt,
|
|
@@ -167,6 +172,11 @@ module Privy
|
|
|
167
172
|
:sol,
|
|
168
173
|
Privy::TransferReceivedTransactionDetail::Asset::TaggedSymbol
|
|
169
174
|
)
|
|
175
|
+
TRX =
|
|
176
|
+
T.let(
|
|
177
|
+
:trx,
|
|
178
|
+
Privy::TransferReceivedTransactionDetail::Asset::TaggedSymbol
|
|
179
|
+
)
|
|
170
180
|
end
|
|
171
181
|
|
|
172
182
|
module Type
|
|
@@ -136,6 +136,8 @@ module Privy
|
|
|
136
136
|
)
|
|
137
137
|
POL =
|
|
138
138
|
T.let(:pol, Privy::TransferSentTransactionDetail::Asset::TaggedSymbol)
|
|
139
|
+
BNB =
|
|
140
|
+
T.let(:bnb, Privy::TransferSentTransactionDetail::Asset::TaggedSymbol)
|
|
139
141
|
USDT =
|
|
140
142
|
T.let(
|
|
141
143
|
:usdt,
|
|
@@ -153,6 +155,8 @@ module Privy
|
|
|
153
155
|
)
|
|
154
156
|
SOL =
|
|
155
157
|
T.let(:sol, Privy::TransferSentTransactionDetail::Asset::TaggedSymbol)
|
|
158
|
+
TRX =
|
|
159
|
+
T.let(:trx, Privy::TransferSentTransactionDetail::Asset::TaggedSymbol)
|
|
156
160
|
end
|
|
157
161
|
|
|
158
162
|
module Type
|
|
@@ -42,6 +42,10 @@ module Privy
|
|
|
42
42
|
Privy::WalletActionEarnDepositFailedWebhookPayload,
|
|
43
43
|
Privy::WalletActionEarnDepositRejectedWebhookPayload,
|
|
44
44
|
Privy::WalletActionEarnDepositSucceededWebhookPayload,
|
|
45
|
+
Privy::WalletActionEarnFeeCollectCreatedWebhookPayload,
|
|
46
|
+
Privy::WalletActionEarnFeeCollectFailedWebhookPayload,
|
|
47
|
+
Privy::WalletActionEarnFeeCollectRejectedWebhookPayload,
|
|
48
|
+
Privy::WalletActionEarnFeeCollectSucceededWebhookPayload,
|
|
45
49
|
Privy::WalletActionEarnIncentiveClaimCreatedWebhookPayload,
|
|
46
50
|
Privy::WalletActionEarnIncentiveClaimFailedWebhookPayload,
|
|
47
51
|
Privy::WalletActionEarnIncentiveClaimRejectedWebhookPayload,
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Privy
|
|
4
|
+
module Models
|
|
5
|
+
class WalletActionEarnFeeCollectCreatedWebhookPayload < Privy::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Privy::WalletActionEarnFeeCollectCreatedWebhookPayload,
|
|
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
|
+
# Base-unit amount of fees collected (e.g. "1500000").
|
|
31
|
+
sig { returns(String) }
|
|
32
|
+
attr_accessor :raw_amount
|
|
33
|
+
|
|
34
|
+
# The status of the wallet action.
|
|
35
|
+
sig do
|
|
36
|
+
returns(
|
|
37
|
+
Privy::WalletActionEarnFeeCollectCreatedWebhookPayload::Status::TaggedSymbol
|
|
38
|
+
)
|
|
39
|
+
end
|
|
40
|
+
attr_accessor :status
|
|
41
|
+
|
|
42
|
+
# The type of webhook event.
|
|
43
|
+
sig do
|
|
44
|
+
returns(
|
|
45
|
+
Privy::WalletActionEarnFeeCollectCreatedWebhookPayload::Type::TaggedSymbol
|
|
46
|
+
)
|
|
47
|
+
end
|
|
48
|
+
attr_accessor :type
|
|
49
|
+
|
|
50
|
+
# ERC-4626 vault contract address.
|
|
51
|
+
sig { returns(String) }
|
|
52
|
+
attr_accessor :vault_address
|
|
53
|
+
|
|
54
|
+
# The vault ID.
|
|
55
|
+
sig { returns(String) }
|
|
56
|
+
attr_accessor :vault_id
|
|
57
|
+
|
|
58
|
+
# The ID of the wallet action.
|
|
59
|
+
sig { returns(String) }
|
|
60
|
+
attr_accessor :wallet_action_id
|
|
61
|
+
|
|
62
|
+
# The ID of the wallet involved in the action.
|
|
63
|
+
sig { returns(String) }
|
|
64
|
+
attr_accessor :wallet_id
|
|
65
|
+
|
|
66
|
+
# Human-readable decimal amount of fees collected (e.g. "1.5"). Only present when
|
|
67
|
+
# the token is known in the asset registry.
|
|
68
|
+
sig { returns(T.nilable(String)) }
|
|
69
|
+
attr_reader :amount
|
|
70
|
+
|
|
71
|
+
sig { params(amount: String).void }
|
|
72
|
+
attr_writer :amount
|
|
73
|
+
|
|
74
|
+
# Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
|
|
75
|
+
# the asset registry.
|
|
76
|
+
sig { returns(T.nilable(String)) }
|
|
77
|
+
attr_reader :asset
|
|
78
|
+
|
|
79
|
+
sig { params(asset: String).void }
|
|
80
|
+
attr_writer :asset
|
|
81
|
+
|
|
82
|
+
# Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
|
|
83
|
+
# present when the token is known in the asset registry.
|
|
84
|
+
sig { returns(T.nilable(Integer)) }
|
|
85
|
+
attr_reader :decimals
|
|
86
|
+
|
|
87
|
+
sig { params(decimals: Integer).void }
|
|
88
|
+
attr_writer :decimals
|
|
89
|
+
|
|
90
|
+
# Payload for the wallet_action.earn_fee_collect.created webhook event.
|
|
91
|
+
sig do
|
|
92
|
+
params(
|
|
93
|
+
action_type: Privy::Wallets::WalletActionType::OrSymbol,
|
|
94
|
+
asset_address: String,
|
|
95
|
+
caip2: String,
|
|
96
|
+
created_at: String,
|
|
97
|
+
raw_amount: String,
|
|
98
|
+
status:
|
|
99
|
+
Privy::WalletActionEarnFeeCollectCreatedWebhookPayload::Status::OrSymbol,
|
|
100
|
+
type:
|
|
101
|
+
Privy::WalletActionEarnFeeCollectCreatedWebhookPayload::Type::OrSymbol,
|
|
102
|
+
vault_address: String,
|
|
103
|
+
vault_id: String,
|
|
104
|
+
wallet_action_id: String,
|
|
105
|
+
wallet_id: String,
|
|
106
|
+
amount: String,
|
|
107
|
+
asset: String,
|
|
108
|
+
decimals: Integer
|
|
109
|
+
).returns(T.attached_class)
|
|
110
|
+
end
|
|
111
|
+
def self.new(
|
|
112
|
+
# Type of wallet action
|
|
113
|
+
action_type:,
|
|
114
|
+
# Underlying asset token address.
|
|
115
|
+
asset_address:,
|
|
116
|
+
# CAIP-2 chain identifier.
|
|
117
|
+
caip2:,
|
|
118
|
+
# ISO 8601 timestamp of when the wallet action was created.
|
|
119
|
+
created_at:,
|
|
120
|
+
# Base-unit amount of fees collected (e.g. "1500000").
|
|
121
|
+
raw_amount:,
|
|
122
|
+
# The status of the wallet action.
|
|
123
|
+
status:,
|
|
124
|
+
# The type of webhook event.
|
|
125
|
+
type:,
|
|
126
|
+
# ERC-4626 vault contract address.
|
|
127
|
+
vault_address:,
|
|
128
|
+
# The vault ID.
|
|
129
|
+
vault_id:,
|
|
130
|
+
# The ID of the wallet action.
|
|
131
|
+
wallet_action_id:,
|
|
132
|
+
# The ID of the wallet involved in the action.
|
|
133
|
+
wallet_id:,
|
|
134
|
+
# Human-readable decimal amount of fees collected (e.g. "1.5"). Only present when
|
|
135
|
+
# the token is known in the asset registry.
|
|
136
|
+
amount: nil,
|
|
137
|
+
# Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
|
|
138
|
+
# the asset registry.
|
|
139
|
+
asset: nil,
|
|
140
|
+
# Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
|
|
141
|
+
# present when the token is known in the asset registry.
|
|
142
|
+
decimals: nil
|
|
143
|
+
)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
sig do
|
|
147
|
+
override.returns(
|
|
148
|
+
{
|
|
149
|
+
action_type: Privy::Wallets::WalletActionType::TaggedSymbol,
|
|
150
|
+
asset_address: String,
|
|
151
|
+
caip2: String,
|
|
152
|
+
created_at: String,
|
|
153
|
+
raw_amount: String,
|
|
154
|
+
status:
|
|
155
|
+
Privy::WalletActionEarnFeeCollectCreatedWebhookPayload::Status::TaggedSymbol,
|
|
156
|
+
type:
|
|
157
|
+
Privy::WalletActionEarnFeeCollectCreatedWebhookPayload::Type::TaggedSymbol,
|
|
158
|
+
vault_address: String,
|
|
159
|
+
vault_id: String,
|
|
160
|
+
wallet_action_id: String,
|
|
161
|
+
wallet_id: String,
|
|
162
|
+
amount: String,
|
|
163
|
+
asset: String,
|
|
164
|
+
decimals: Integer
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
end
|
|
168
|
+
def to_hash
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# The status of the wallet action.
|
|
172
|
+
module Status
|
|
173
|
+
extend Privy::Internal::Type::Enum
|
|
174
|
+
|
|
175
|
+
TaggedSymbol =
|
|
176
|
+
T.type_alias do
|
|
177
|
+
T.all(
|
|
178
|
+
Symbol,
|
|
179
|
+
Privy::WalletActionEarnFeeCollectCreatedWebhookPayload::Status
|
|
180
|
+
)
|
|
181
|
+
end
|
|
182
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
183
|
+
|
|
184
|
+
PENDING =
|
|
185
|
+
T.let(
|
|
186
|
+
:pending,
|
|
187
|
+
Privy::WalletActionEarnFeeCollectCreatedWebhookPayload::Status::TaggedSymbol
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
sig do
|
|
191
|
+
override.returns(
|
|
192
|
+
T::Array[
|
|
193
|
+
Privy::WalletActionEarnFeeCollectCreatedWebhookPayload::Status::TaggedSymbol
|
|
194
|
+
]
|
|
195
|
+
)
|
|
196
|
+
end
|
|
197
|
+
def self.values
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# The type of webhook event.
|
|
202
|
+
module Type
|
|
203
|
+
extend Privy::Internal::Type::Enum
|
|
204
|
+
|
|
205
|
+
TaggedSymbol =
|
|
206
|
+
T.type_alias do
|
|
207
|
+
T.all(
|
|
208
|
+
Symbol,
|
|
209
|
+
Privy::WalletActionEarnFeeCollectCreatedWebhookPayload::Type
|
|
210
|
+
)
|
|
211
|
+
end
|
|
212
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
213
|
+
|
|
214
|
+
WALLET_ACTION_EARN_FEE_COLLECT_CREATED =
|
|
215
|
+
T.let(
|
|
216
|
+
:"wallet_action.earn_fee_collect.created",
|
|
217
|
+
Privy::WalletActionEarnFeeCollectCreatedWebhookPayload::Type::TaggedSymbol
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
sig do
|
|
221
|
+
override.returns(
|
|
222
|
+
T::Array[
|
|
223
|
+
Privy::WalletActionEarnFeeCollectCreatedWebhookPayload::Type::TaggedSymbol
|
|
224
|
+
]
|
|
225
|
+
)
|
|
226
|
+
end
|
|
227
|
+
def self.values
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
end
|
|
@@ -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
|