privy_ruby 0.3.0 → 0.4.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 +11 -0
- data/README.md +1 -1
- data/lib/privy/authorization/canonicalization.rb +2 -0
- 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/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/ethereum_earn_vault_details_response.rb +11 -84
- 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.rb +24 -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/transactions.rb +1 -1
- data/lib/privy/resources/wallets.rb +2 -2
- data/lib/privy/version.rb +1 -1
- data/lib/privy.rb +15 -0
- 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/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/ethereum_earn_vault_details_response.rbi +10 -103
- 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.rbi +27 -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/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/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/ethereum_earn_vault_details_response.rbs +4 -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.rbs +24 -0
- data/sig/privy/resources/wallets/transactions.rbs +1 -1
- metadata +45 -2
data/lib/privy/models.rb
CHANGED
|
@@ -1498,12 +1498,20 @@ module Privy
|
|
|
1498
1498
|
|
|
1499
1499
|
SparkClaimStaticDepositRpcResponseData = Privy::Models::SparkClaimStaticDepositRpcResponseData
|
|
1500
1500
|
|
|
1501
|
+
SparkCoopExitFeeQuote = Privy::Models::SparkCoopExitFeeQuote
|
|
1502
|
+
|
|
1503
|
+
SparkCoopExitRequest = Privy::Models::SparkCoopExitRequest
|
|
1504
|
+
|
|
1501
1505
|
SparkCreateLightningInvoiceRpcInput = Privy::Models::SparkCreateLightningInvoiceRpcInput
|
|
1502
1506
|
|
|
1503
1507
|
SparkCreateLightningInvoiceRpcInputParams = Privy::Models::SparkCreateLightningInvoiceRpcInputParams
|
|
1504
1508
|
|
|
1505
1509
|
SparkCreateLightningInvoiceRpcResponse = Privy::Models::SparkCreateLightningInvoiceRpcResponse
|
|
1506
1510
|
|
|
1511
|
+
SparkCurrencyAmount = Privy::Models::SparkCurrencyAmount
|
|
1512
|
+
|
|
1513
|
+
SparkExitSpeed = Privy::Models::SparkExitSpeed
|
|
1514
|
+
|
|
1507
1515
|
SparkGetBalanceRpcInput = Privy::Models::SparkGetBalanceRpcInput
|
|
1508
1516
|
|
|
1509
1517
|
SparkGetBalanceRpcResponse = Privy::Models::SparkGetBalanceRpcResponse
|
|
@@ -1524,6 +1532,12 @@ module Privy
|
|
|
1524
1532
|
|
|
1525
1533
|
SparkGetStaticDepositAddressRpcResponseData = Privy::Models::SparkGetStaticDepositAddressRpcResponseData
|
|
1526
1534
|
|
|
1535
|
+
SparkGetWithdrawalFeeQuoteRpcInput = Privy::Models::SparkGetWithdrawalFeeQuoteRpcInput
|
|
1536
|
+
|
|
1537
|
+
SparkGetWithdrawalFeeQuoteRpcInputParams = Privy::Models::SparkGetWithdrawalFeeQuoteRpcInputParams
|
|
1538
|
+
|
|
1539
|
+
SparkGetWithdrawalFeeQuoteRpcResponse = Privy::Models::SparkGetWithdrawalFeeQuoteRpcResponse
|
|
1540
|
+
|
|
1527
1541
|
SparkLightningFee = Privy::Models::SparkLightningFee
|
|
1528
1542
|
|
|
1529
1543
|
SparkLightningReceiveRequest = Privy::Models::SparkLightningReceiveRequest
|
|
@@ -1580,6 +1594,12 @@ module Privy
|
|
|
1580
1594
|
|
|
1581
1595
|
SparkWalletLeaf = Privy::Models::SparkWalletLeaf
|
|
1582
1596
|
|
|
1597
|
+
SparkWithdrawRpcInput = Privy::Models::SparkWithdrawRpcInput
|
|
1598
|
+
|
|
1599
|
+
SparkWithdrawRpcInputParams = Privy::Models::SparkWithdrawRpcInputParams
|
|
1600
|
+
|
|
1601
|
+
SparkWithdrawRpcResponse = Privy::Models::SparkWithdrawRpcResponse
|
|
1602
|
+
|
|
1583
1603
|
StripeConsumerWallet = Privy::Models::StripeConsumerWallet
|
|
1584
1604
|
|
|
1585
1605
|
StripeCryptoCustomerActive = Privy::Models::StripeCryptoCustomerActive
|
|
@@ -1676,6 +1696,8 @@ module Privy
|
|
|
1676
1696
|
|
|
1677
1697
|
TransactionBroadcastedWebhookPayload = Privy::Models::TransactionBroadcastedWebhookPayload
|
|
1678
1698
|
|
|
1699
|
+
TransactionChainNameInput = Privy::Models::TransactionChainNameInput
|
|
1700
|
+
|
|
1679
1701
|
TransactionConfirmedWebhookPayload = Privy::Models::TransactionConfirmedWebhookPayload
|
|
1680
1702
|
|
|
1681
1703
|
TransactionDetail = Privy::Models::TransactionDetail
|
|
@@ -2069,6 +2091,8 @@ module Privy
|
|
|
2069
2091
|
|
|
2070
2092
|
WalletTransferParams = Privy::Models::WalletTransferParams
|
|
2071
2093
|
|
|
2094
|
+
WalletTronAsset = Privy::Models::WalletTronAsset
|
|
2095
|
+
|
|
2072
2096
|
WalletUpdateParams = Privy::Models::WalletUpdateParams
|
|
2073
2097
|
|
|
2074
2098
|
WalletUpdateRequestBody = Privy::Models::WalletUpdateRequestBody
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Privy
|
|
4
|
+
module Services
|
|
5
|
+
class Tron
|
|
6
|
+
def initialize(wallets:)
|
|
7
|
+
@wallets = wallets
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
# Signs a Tron transaction without broadcasting.
|
|
11
|
+
#
|
|
12
|
+
# @example Sign a Tron transaction
|
|
13
|
+
# client.wallets.tron.sign_transaction(wallet_id, params: {
|
|
14
|
+
# raw_data: {
|
|
15
|
+
# contract: [{
|
|
16
|
+
# type: "TransferContract",
|
|
17
|
+
# owner_address: "41...",
|
|
18
|
+
# to_address: "41...",
|
|
19
|
+
# amount: 1
|
|
20
|
+
# }],
|
|
21
|
+
# ref_block_bytes: "1a2b",
|
|
22
|
+
# ref_block_hash: "abc1234567890def",
|
|
23
|
+
# expiration: (Time.now.to_i * 1000) + 60_000,
|
|
24
|
+
# timestamp: Time.now.to_i * 1000
|
|
25
|
+
# }
|
|
26
|
+
# })
|
|
27
|
+
#
|
|
28
|
+
# @param wallet_id [String] ID of the wallet.
|
|
29
|
+
# @param params [Hash] Parameters for tron_signTransaction. Required key: :raw_data.
|
|
30
|
+
# @param authorization_context [Privy::Authorization::AuthorizationContext, nil]
|
|
31
|
+
# @param idempotency_key [String, nil]
|
|
32
|
+
# @param request_expiry [Integer, nil]
|
|
33
|
+
# @param request_options [Privy::RequestOptions, Hash, nil]
|
|
34
|
+
#
|
|
35
|
+
# @return [Privy::Models::TronSignTransactionRpcResponseData]
|
|
36
|
+
def sign_transaction(
|
|
37
|
+
wallet_id,
|
|
38
|
+
params:,
|
|
39
|
+
authorization_context: nil,
|
|
40
|
+
idempotency_key: nil,
|
|
41
|
+
request_expiry: nil,
|
|
42
|
+
request_options: nil
|
|
43
|
+
)
|
|
44
|
+
response = @wallets.rpc(
|
|
45
|
+
wallet_id,
|
|
46
|
+
wallet_rpc_request_body: {method: :tron_signTransaction, params: params},
|
|
47
|
+
authorization_context: authorization_context,
|
|
48
|
+
idempotency_key: idempotency_key,
|
|
49
|
+
request_expiry: request_expiry,
|
|
50
|
+
request_options: request_options
|
|
51
|
+
)
|
|
52
|
+
response.data
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Signs and broadcasts a Tron transaction.
|
|
56
|
+
#
|
|
57
|
+
# @example Send a Tron transaction
|
|
58
|
+
# client.wallets.tron.send_transaction(wallet_id, params: {
|
|
59
|
+
# raw_data: {
|
|
60
|
+
# contract: [{
|
|
61
|
+
# type: "TransferContract",
|
|
62
|
+
# owner_address: "41...",
|
|
63
|
+
# to_address: "41...",
|
|
64
|
+
# amount: 1
|
|
65
|
+
# }]
|
|
66
|
+
# },
|
|
67
|
+
# reference_id: "my-idempotency-key"
|
|
68
|
+
# }, caip2: "tron:0xcd8690dc")
|
|
69
|
+
#
|
|
70
|
+
# @param wallet_id [String] ID of the wallet.
|
|
71
|
+
# @param params [Hash] Parameters for tron_sendTransaction. Required key: :raw_data.
|
|
72
|
+
# Optional key: :reference_id for idempotent broadcast.
|
|
73
|
+
# @param caip2 [String, nil] A valid CAIP-2 chain ID (e.g. 'tron:0xcd8690dc').
|
|
74
|
+
# @param authorization_context [Privy::Authorization::AuthorizationContext, nil]
|
|
75
|
+
# @param idempotency_key [String, nil]
|
|
76
|
+
# @param request_expiry [Integer, nil]
|
|
77
|
+
# @param request_options [Privy::RequestOptions, Hash, nil]
|
|
78
|
+
#
|
|
79
|
+
# @return [Privy::Models::TronSendTransactionRpcResponseData]
|
|
80
|
+
def send_transaction(
|
|
81
|
+
wallet_id,
|
|
82
|
+
params:,
|
|
83
|
+
caip2: nil,
|
|
84
|
+
authorization_context: nil,
|
|
85
|
+
idempotency_key: nil,
|
|
86
|
+
request_expiry: nil,
|
|
87
|
+
request_options: nil
|
|
88
|
+
)
|
|
89
|
+
body = {method: :tron_sendTransaction, params: params}
|
|
90
|
+
body[:caip2] = caip2 if caip2
|
|
91
|
+
response = @wallets.rpc(
|
|
92
|
+
wallet_id,
|
|
93
|
+
wallet_rpc_request_body: body,
|
|
94
|
+
authorization_context: authorization_context,
|
|
95
|
+
idempotency_key: idempotency_key,
|
|
96
|
+
request_expiry: request_expiry,
|
|
97
|
+
request_options: request_options
|
|
98
|
+
)
|
|
99
|
+
response.data
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
@@ -8,10 +8,14 @@ module Privy
|
|
|
8
8
|
# @return [Privy::Services::Earn]
|
|
9
9
|
attr_reader :earn
|
|
10
10
|
|
|
11
|
+
# @return [Privy::Services::Tron]
|
|
12
|
+
attr_reader :tron
|
|
13
|
+
|
|
11
14
|
def initialize(client:, privy_client:)
|
|
12
15
|
super(client: client)
|
|
13
16
|
@privy_client = privy_client
|
|
14
17
|
@earn = Privy::Services::Earn.new(client: client, privy_client: privy_client)
|
|
18
|
+
@tron = Privy::Services::Tron.new(wallets: self)
|
|
15
19
|
end
|
|
16
20
|
|
|
17
21
|
# Create a new wallet on the requested chain and for the requested owner.
|
|
@@ -148,7 +148,7 @@ module Privy
|
|
|
148
148
|
#
|
|
149
149
|
# @param wallet_id [String] Path param: ID of the wallet.
|
|
150
150
|
#
|
|
151
|
-
# @param wallet_rpc_request_body [Privy::Models::EthereumSignTransactionRpcInput, Privy::Models::EthereumSendTransactionRpcInput, Privy::Models::EthereumPersonalSignRpcInput, Privy::Models::EthereumSignTypedDataRpcInput, Privy::Models::EthereumSecp256k1SignRpcInput, Privy::Models::EthereumSign7702AuthorizationRpcInput, Privy::Models::EthereumSignUserOperationRpcInput, Privy::Models::EthereumSendCallsRpcInput, Privy::Models::SolanaSignTransactionRpcInput, Privy::Models::SolanaSignAndSendTransactionRpcInput, Privy::Models::SolanaSignMessageRpcInput, Privy::Models::SparkTransferRpcInput, Privy::Models::SparkGetBalanceRpcInput, Privy::Models::SparkTransferTokensRpcInput, Privy::Models::SparkGetStaticDepositAddressRpcInput, Privy::Models::SparkGetClaimStaticDepositQuoteRpcInput, Privy::Models::SparkClaimStaticDepositRpcInput, Privy::Models::SparkCreateLightningInvoiceRpcInput, Privy::Models::SparkPayLightningInvoiceRpcInput, Privy::Models::SparkSignMessageWithIdentityKeyRpcInput, Privy::Models::TronSignTransactionRpcInput, Privy::Models::TronSendTransactionRpcInput, Privy::Models::ExportPrivateKeyRpcInput, Privy::Models::ExportSeedPhraseRpcInput] Body param: Request body for wallet RPC operations, discriminated by method.
|
|
151
|
+
# @param wallet_rpc_request_body [Privy::Models::EthereumSignTransactionRpcInput, Privy::Models::EthereumSendTransactionRpcInput, Privy::Models::EthereumPersonalSignRpcInput, Privy::Models::EthereumSignTypedDataRpcInput, Privy::Models::EthereumSecp256k1SignRpcInput, Privy::Models::EthereumSign7702AuthorizationRpcInput, Privy::Models::EthereumSignUserOperationRpcInput, Privy::Models::EthereumSendCallsRpcInput, Privy::Models::SolanaSignTransactionRpcInput, Privy::Models::SolanaSignAndSendTransactionRpcInput, Privy::Models::SolanaSignMessageRpcInput, Privy::Models::SparkTransferRpcInput, Privy::Models::SparkGetBalanceRpcInput, Privy::Models::SparkTransferTokensRpcInput, Privy::Models::SparkGetStaticDepositAddressRpcInput, Privy::Models::SparkGetClaimStaticDepositQuoteRpcInput, Privy::Models::SparkClaimStaticDepositRpcInput, Privy::Models::SparkCreateLightningInvoiceRpcInput, Privy::Models::SparkPayLightningInvoiceRpcInput, Privy::Models::SparkSignMessageWithIdentityKeyRpcInput, Privy::Models::SparkWithdrawRpcInput, Privy::Models::SparkGetWithdrawalFeeQuoteRpcInput, Privy::Models::TronSignTransactionRpcInput, Privy::Models::TronSendTransactionRpcInput, Privy::Models::ExportPrivateKeyRpcInput, Privy::Models::ExportSeedPhraseRpcInput] Body param: Request body for wallet RPC operations, discriminated by method.
|
|
152
152
|
#
|
|
153
153
|
# @param privy_request_expiry [String] Header param: Request expiry. Value is a Unix timestamp in milliseconds represen
|
|
154
154
|
#
|
|
@@ -14,7 +14,7 @@ module Privy
|
|
|
14
14
|
#
|
|
15
15
|
# @param wallet_id [String] ID of the wallet.
|
|
16
16
|
#
|
|
17
|
-
# @param chain [Symbol, Privy::Models::
|
|
17
|
+
# @param chain [Symbol, Privy::Models::TransactionChainNameInput] Chains supported for transaction history queries.
|
|
18
18
|
#
|
|
19
19
|
# @param token [String, Array<String>] Exactly one of `token` or `asset` is required. Cannot be used together with `ass
|
|
20
20
|
#
|
|
@@ -503,7 +503,7 @@ module Privy
|
|
|
503
503
|
#
|
|
504
504
|
# @param wallet_id [String] Path param: ID of the wallet.
|
|
505
505
|
#
|
|
506
|
-
# @param wallet_rpc_request_body [Privy::Models::EthereumSignTransactionRpcInput, Privy::Models::EthereumSendTransactionRpcInput, Privy::Models::EthereumPersonalSignRpcInput, Privy::Models::EthereumSignTypedDataRpcInput, Privy::Models::EthereumSecp256k1SignRpcInput, Privy::Models::EthereumSign7702AuthorizationRpcInput, Privy::Models::EthereumSignUserOperationRpcInput, Privy::Models::EthereumSendCallsRpcInput, Privy::Models::SolanaSignTransactionRpcInput, Privy::Models::SolanaSignAndSendTransactionRpcInput, Privy::Models::SolanaSignMessageRpcInput, Privy::Models::SparkTransferRpcInput, Privy::Models::SparkGetBalanceRpcInput, Privy::Models::SparkTransferTokensRpcInput, Privy::Models::SparkGetStaticDepositAddressRpcInput, Privy::Models::SparkGetClaimStaticDepositQuoteRpcInput, Privy::Models::SparkClaimStaticDepositRpcInput, Privy::Models::SparkCreateLightningInvoiceRpcInput, Privy::Models::SparkPayLightningInvoiceRpcInput, Privy::Models::SparkSignMessageWithIdentityKeyRpcInput, Privy::Models::TronSignTransactionRpcInput, Privy::Models::TronSendTransactionRpcInput, Privy::Models::ExportPrivateKeyRpcInput, Privy::Models::ExportSeedPhraseRpcInput] Body param: Request body for wallet RPC operations, discriminated by method.
|
|
506
|
+
# @param wallet_rpc_request_body [Privy::Models::EthereumSignTransactionRpcInput, Privy::Models::EthereumSendTransactionRpcInput, Privy::Models::EthereumPersonalSignRpcInput, Privy::Models::EthereumSignTypedDataRpcInput, Privy::Models::EthereumSecp256k1SignRpcInput, Privy::Models::EthereumSign7702AuthorizationRpcInput, Privy::Models::EthereumSignUserOperationRpcInput, Privy::Models::EthereumSendCallsRpcInput, Privy::Models::SolanaSignTransactionRpcInput, Privy::Models::SolanaSignAndSendTransactionRpcInput, Privy::Models::SolanaSignMessageRpcInput, Privy::Models::SparkTransferRpcInput, Privy::Models::SparkGetBalanceRpcInput, Privy::Models::SparkTransferTokensRpcInput, Privy::Models::SparkGetStaticDepositAddressRpcInput, Privy::Models::SparkGetClaimStaticDepositQuoteRpcInput, Privy::Models::SparkClaimStaticDepositRpcInput, Privy::Models::SparkCreateLightningInvoiceRpcInput, Privy::Models::SparkPayLightningInvoiceRpcInput, Privy::Models::SparkSignMessageWithIdentityKeyRpcInput, Privy::Models::SparkWithdrawRpcInput, Privy::Models::SparkGetWithdrawalFeeQuoteRpcInput, Privy::Models::TronSignTransactionRpcInput, Privy::Models::TronSendTransactionRpcInput, Privy::Models::ExportPrivateKeyRpcInput, Privy::Models::ExportSeedPhraseRpcInput] Body param: Request body for wallet RPC operations, discriminated by method.
|
|
507
507
|
#
|
|
508
508
|
# @param privy_authorization_signature [String] Header param: Request authorization signature. If multiple signatures are requir
|
|
509
509
|
#
|
|
@@ -513,7 +513,7 @@ module Privy
|
|
|
513
513
|
#
|
|
514
514
|
# @param request_options [Privy::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
515
515
|
#
|
|
516
|
-
# @return [Privy::Models::EthereumPersonalSignRpcResponse, Privy::Models::EthereumSignTypedDataRpcResponse, Privy::Models::EthereumSignTransactionRpcResponse, Privy::Models::EthereumSendTransactionRpcResponse, Privy::Models::EthereumSignUserOperationRpcResponse, Privy::Models::EthereumSign7702AuthorizationRpcResponse, Privy::Models::EthereumSecp256k1SignRpcResponse, Privy::Models::EthereumSendCallsRpcResponse, Privy::Models::SolanaSignMessageRpcResponse, Privy::Models::SolanaSignTransactionRpcResponse, Privy::Models::SolanaSignAndSendTransactionRpcResponse, Privy::Models::SparkTransferRpcResponse, Privy::Models::SparkGetBalanceRpcResponse, Privy::Models::SparkTransferTokensRpcResponse, Privy::Models::SparkGetStaticDepositAddressRpcResponse, Privy::Models::SparkGetClaimStaticDepositQuoteRpcResponse, Privy::Models::SparkClaimStaticDepositRpcResponse, Privy::Models::SparkCreateLightningInvoiceRpcResponse, Privy::Models::SparkPayLightningInvoiceRpcResponse, Privy::Models::SparkSignMessageWithIdentityKeyRpcResponse, Privy::Models::TronSignTransactionRpcResponse, Privy::Models::TronSendTransactionRpcResponse, Privy::Models::ExportPrivateKeyRpcResponse, Privy::Models::ExportSeedPhraseRpcResponse]
|
|
516
|
+
# @return [Privy::Models::EthereumPersonalSignRpcResponse, Privy::Models::EthereumSignTypedDataRpcResponse, Privy::Models::EthereumSignTransactionRpcResponse, Privy::Models::EthereumSendTransactionRpcResponse, Privy::Models::EthereumSignUserOperationRpcResponse, Privy::Models::EthereumSign7702AuthorizationRpcResponse, Privy::Models::EthereumSecp256k1SignRpcResponse, Privy::Models::EthereumSendCallsRpcResponse, Privy::Models::SolanaSignMessageRpcResponse, Privy::Models::SolanaSignTransactionRpcResponse, Privy::Models::SolanaSignAndSendTransactionRpcResponse, Privy::Models::SparkTransferRpcResponse, Privy::Models::SparkGetBalanceRpcResponse, Privy::Models::SparkTransferTokensRpcResponse, Privy::Models::SparkGetStaticDepositAddressRpcResponse, Privy::Models::SparkGetClaimStaticDepositQuoteRpcResponse, Privy::Models::SparkClaimStaticDepositRpcResponse, Privy::Models::SparkCreateLightningInvoiceRpcResponse, Privy::Models::SparkPayLightningInvoiceRpcResponse, Privy::Models::SparkSignMessageWithIdentityKeyRpcResponse, Privy::Models::SparkWithdrawRpcResponse, Privy::Models::SparkGetWithdrawalFeeQuoteRpcResponse, Privy::Models::TronSignTransactionRpcResponse, Privy::Models::TronSendTransactionRpcResponse, Privy::Models::ExportPrivateKeyRpcResponse, Privy::Models::ExportSeedPhraseRpcResponse]
|
|
517
517
|
#
|
|
518
518
|
# @see Privy::Models::WalletRpcParams
|
|
519
519
|
def rpc(wallet_id, params)
|
data/lib/privy/version.rb
CHANGED
data/lib/privy.rb
CHANGED
|
@@ -784,9 +784,13 @@ require_relative "privy/models/spark_claim_static_deposit_rpc_input"
|
|
|
784
784
|
require_relative "privy/models/spark_claim_static_deposit_rpc_input_params"
|
|
785
785
|
require_relative "privy/models/spark_claim_static_deposit_rpc_response"
|
|
786
786
|
require_relative "privy/models/spark_claim_static_deposit_rpc_response_data"
|
|
787
|
+
require_relative "privy/models/spark_coop_exit_fee_quote"
|
|
788
|
+
require_relative "privy/models/spark_coop_exit_request"
|
|
787
789
|
require_relative "privy/models/spark_create_lightning_invoice_rpc_input"
|
|
788
790
|
require_relative "privy/models/spark_create_lightning_invoice_rpc_input_params"
|
|
789
791
|
require_relative "privy/models/spark_create_lightning_invoice_rpc_response"
|
|
792
|
+
require_relative "privy/models/spark_currency_amount"
|
|
793
|
+
require_relative "privy/models/spark_exit_speed"
|
|
790
794
|
require_relative "privy/models/spark_get_balance_rpc_input"
|
|
791
795
|
require_relative "privy/models/spark_get_balance_rpc_response"
|
|
792
796
|
require_relative "privy/models/spark_get_claim_static_deposit_quote_rpc_input"
|
|
@@ -796,6 +800,9 @@ require_relative "privy/models/spark_get_claim_static_deposit_quote_rpc_response
|
|
|
796
800
|
require_relative "privy/models/spark_get_static_deposit_address_rpc_input"
|
|
797
801
|
require_relative "privy/models/spark_get_static_deposit_address_rpc_response"
|
|
798
802
|
require_relative "privy/models/spark_get_static_deposit_address_rpc_response_data"
|
|
803
|
+
require_relative "privy/models/spark_get_withdrawal_fee_quote_rpc_input"
|
|
804
|
+
require_relative "privy/models/spark_get_withdrawal_fee_quote_rpc_input_params"
|
|
805
|
+
require_relative "privy/models/spark_get_withdrawal_fee_quote_rpc_response"
|
|
799
806
|
require_relative "privy/models/spark_lightning_fee"
|
|
800
807
|
require_relative "privy/models/spark_lightning_receive_request"
|
|
801
808
|
require_relative "privy/models/spark_lightning_send_request"
|
|
@@ -823,6 +830,9 @@ require_relative "privy/models/spark_transfer_tokens_rpc_response"
|
|
|
823
830
|
require_relative "privy/models/spark_transfer_tokens_rpc_response_data"
|
|
824
831
|
require_relative "privy/models/spark_user_token_metadata"
|
|
825
832
|
require_relative "privy/models/spark_wallet_leaf"
|
|
833
|
+
require_relative "privy/models/spark_withdraw_rpc_input"
|
|
834
|
+
require_relative "privy/models/spark_withdraw_rpc_input_params"
|
|
835
|
+
require_relative "privy/models/spark_withdraw_rpc_response"
|
|
826
836
|
require_relative "privy/models/stripe_consumer_wallet"
|
|
827
837
|
require_relative "privy/models/stripe_crypto_customer_active"
|
|
828
838
|
require_relative "privy/models/stripe_crypto_customer_expired"
|
|
@@ -869,6 +879,7 @@ require_relative "privy/models/total_fee_configuration_bps"
|
|
|
869
879
|
require_relative "privy/models/totp_mfa_method"
|
|
870
880
|
require_relative "privy/models/transaction"
|
|
871
881
|
require_relative "privy/models/transaction_broadcasted_webhook_payload"
|
|
882
|
+
require_relative "privy/models/transaction_chain_name_input"
|
|
872
883
|
require_relative "privy/models/transaction_confirmed_webhook_payload"
|
|
873
884
|
require_relative "privy/models/transaction_detail"
|
|
874
885
|
require_relative "privy/models/transaction_execution_reverted_webhook_payload"
|
|
@@ -1048,6 +1059,7 @@ require_relative "privy/models/wallet_restored_webhook_payload"
|
|
|
1048
1059
|
require_relative "privy/models/wallet_revoke_response"
|
|
1049
1060
|
require_relative "privy/models/wallet_rpc_params"
|
|
1050
1061
|
require_relative "privy/models/wallet_rpc_response"
|
|
1062
|
+
require_relative "privy/models/wallets/aave_vault_details"
|
|
1051
1063
|
require_relative "privy/models/wallets/action_get_params"
|
|
1052
1064
|
require_relative "privy/models/wallets/balance_get_params"
|
|
1053
1065
|
require_relative "privy/models/wallets/balance_get_response"
|
|
@@ -1077,6 +1089,7 @@ require_relative "privy/models/wallets/external_transaction_wallet_action_step_s
|
|
|
1077
1089
|
require_relative "privy/models/wallets/failure_reason"
|
|
1078
1090
|
require_relative "privy/models/wallets/list_wallet_actions_query"
|
|
1079
1091
|
require_relative "privy/models/wallets/list_wallet_actions_response"
|
|
1092
|
+
require_relative "privy/models/wallets/morpho_vault_details"
|
|
1080
1093
|
require_relative "privy/models/wallets/svm_transaction_wallet_action_step"
|
|
1081
1094
|
require_relative "privy/models/wallets/svm_wallet_action_step_status"
|
|
1082
1095
|
require_relative "privy/models/wallets/swap_action_response"
|
|
@@ -1096,6 +1109,7 @@ require_relative "privy/models/wallets/wallet_action_type"
|
|
|
1096
1109
|
require_relative "privy/models/wallet_solana_asset"
|
|
1097
1110
|
require_relative "privy/models/wallet_submit_import_params"
|
|
1098
1111
|
require_relative "privy/models/wallet_transfer_params"
|
|
1112
|
+
require_relative "privy/models/wallet_tron_asset"
|
|
1099
1113
|
require_relative "privy/models/wallet_update_params"
|
|
1100
1114
|
require_relative "privy/models/webhook_payload"
|
|
1101
1115
|
require_relative "privy/models/webhook_unsafe_unwrap_params"
|
|
@@ -1142,6 +1156,7 @@ require_relative "privy/wallet_entropy"
|
|
|
1142
1156
|
require_relative "privy/public_api/services/earn"
|
|
1143
1157
|
require_relative "privy/public_api/services/earn/ethereum"
|
|
1144
1158
|
require_relative "privy/public_api/services/earn/ethereum/incentive"
|
|
1159
|
+
require_relative "privy/public_api/services/tron"
|
|
1145
1160
|
require_relative "privy/public_api/services/wallets"
|
|
1146
1161
|
require_relative "privy/public_api/services/users"
|
|
1147
1162
|
require_relative "privy/public_api/services/policies"
|
|
@@ -32,6 +32,8 @@ module Privy
|
|
|
32
32
|
Privy::SparkCreateLightningInvoiceRpcInput,
|
|
33
33
|
Privy::SparkPayLightningInvoiceRpcInput,
|
|
34
34
|
Privy::SparkSignMessageWithIdentityKeyRpcInput,
|
|
35
|
+
Privy::SparkWithdrawRpcInput,
|
|
36
|
+
Privy::SparkGetWithdrawalFeeQuoteRpcInput,
|
|
35
37
|
Privy::TronSignTransactionRpcInput,
|
|
36
38
|
Privy::TronSendTransactionRpcInput,
|
|
37
39
|
Privy::ExportPrivateKeyRpcInput,
|
|
@@ -72,6 +74,8 @@ module Privy
|
|
|
72
74
|
Privy::SparkCreateLightningInvoiceRpcInput::OrHash,
|
|
73
75
|
Privy::SparkPayLightningInvoiceRpcInput::OrHash,
|
|
74
76
|
Privy::SparkSignMessageWithIdentityKeyRpcInput::OrHash,
|
|
77
|
+
Privy::SparkWithdrawRpcInput::OrHash,
|
|
78
|
+
Privy::SparkGetWithdrawalFeeQuoteRpcInput::OrHash,
|
|
75
79
|
Privy::TronSignTransactionRpcInput::OrHash,
|
|
76
80
|
Privy::TronSendTransactionRpcInput::OrHash,
|
|
77
81
|
Privy::ExportPrivateKeyRpcInput::OrHash,
|
|
@@ -114,6 +118,8 @@ module Privy
|
|
|
114
118
|
Privy::SparkCreateLightningInvoiceRpcInput,
|
|
115
119
|
Privy::SparkPayLightningInvoiceRpcInput,
|
|
116
120
|
Privy::SparkSignMessageWithIdentityKeyRpcInput,
|
|
121
|
+
Privy::SparkWithdrawRpcInput,
|
|
122
|
+
Privy::SparkGetWithdrawalFeeQuoteRpcInput,
|
|
117
123
|
Privy::TronSignTransactionRpcInput,
|
|
118
124
|
Privy::TronSendTransactionRpcInput,
|
|
119
125
|
Privy::ExportPrivateKeyRpcInput,
|
|
@@ -135,6 +135,8 @@ module Privy
|
|
|
135
135
|
Privy::SparkCreateLightningInvoiceRpcInput::OrHash,
|
|
136
136
|
Privy::SparkPayLightningInvoiceRpcInput::OrHash,
|
|
137
137
|
Privy::SparkSignMessageWithIdentityKeyRpcInput::OrHash,
|
|
138
|
+
Privy::SparkWithdrawRpcInput::OrHash,
|
|
139
|
+
Privy::SparkGetWithdrawalFeeQuoteRpcInput::OrHash,
|
|
138
140
|
Privy::TronSignTransactionRpcInput::OrHash,
|
|
139
141
|
Privy::TronSendTransactionRpcInput::OrHash,
|
|
140
142
|
Privy::ExportPrivateKeyRpcInput::OrHash,
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Privy
|
|
4
|
+
module Models
|
|
5
|
+
class SparkCoopExitFeeQuote < Privy::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Privy::SparkCoopExitFeeQuote, Privy::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
sig { returns(String) }
|
|
12
|
+
attr_accessor :id
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :created_at
|
|
16
|
+
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :expires_at
|
|
19
|
+
|
|
20
|
+
# A currency amount with its original value and unit.
|
|
21
|
+
sig { returns(Privy::SparkCurrencyAmount) }
|
|
22
|
+
attr_reader :l1_broadcast_fee_fast
|
|
23
|
+
|
|
24
|
+
sig do
|
|
25
|
+
params(l1_broadcast_fee_fast: Privy::SparkCurrencyAmount::OrHash).void
|
|
26
|
+
end
|
|
27
|
+
attr_writer :l1_broadcast_fee_fast
|
|
28
|
+
|
|
29
|
+
# A currency amount with its original value and unit.
|
|
30
|
+
sig { returns(Privy::SparkCurrencyAmount) }
|
|
31
|
+
attr_reader :l1_broadcast_fee_medium
|
|
32
|
+
|
|
33
|
+
sig do
|
|
34
|
+
params(l1_broadcast_fee_medium: Privy::SparkCurrencyAmount::OrHash).void
|
|
35
|
+
end
|
|
36
|
+
attr_writer :l1_broadcast_fee_medium
|
|
37
|
+
|
|
38
|
+
# A currency amount with its original value and unit.
|
|
39
|
+
sig { returns(Privy::SparkCurrencyAmount) }
|
|
40
|
+
attr_reader :l1_broadcast_fee_slow
|
|
41
|
+
|
|
42
|
+
sig do
|
|
43
|
+
params(l1_broadcast_fee_slow: Privy::SparkCurrencyAmount::OrHash).void
|
|
44
|
+
end
|
|
45
|
+
attr_writer :l1_broadcast_fee_slow
|
|
46
|
+
|
|
47
|
+
sig { returns(String) }
|
|
48
|
+
attr_accessor :network
|
|
49
|
+
|
|
50
|
+
# A currency amount with its original value and unit.
|
|
51
|
+
sig { returns(Privy::SparkCurrencyAmount) }
|
|
52
|
+
attr_reader :total_amount
|
|
53
|
+
|
|
54
|
+
sig { params(total_amount: Privy::SparkCurrencyAmount::OrHash).void }
|
|
55
|
+
attr_writer :total_amount
|
|
56
|
+
|
|
57
|
+
sig { returns(String) }
|
|
58
|
+
attr_accessor :updated_at
|
|
59
|
+
|
|
60
|
+
# A currency amount with its original value and unit.
|
|
61
|
+
sig { returns(Privy::SparkCurrencyAmount) }
|
|
62
|
+
attr_reader :user_fee_fast
|
|
63
|
+
|
|
64
|
+
sig { params(user_fee_fast: Privy::SparkCurrencyAmount::OrHash).void }
|
|
65
|
+
attr_writer :user_fee_fast
|
|
66
|
+
|
|
67
|
+
# A currency amount with its original value and unit.
|
|
68
|
+
sig { returns(Privy::SparkCurrencyAmount) }
|
|
69
|
+
attr_reader :user_fee_medium
|
|
70
|
+
|
|
71
|
+
sig { params(user_fee_medium: Privy::SparkCurrencyAmount::OrHash).void }
|
|
72
|
+
attr_writer :user_fee_medium
|
|
73
|
+
|
|
74
|
+
# A currency amount with its original value and unit.
|
|
75
|
+
sig { returns(Privy::SparkCurrencyAmount) }
|
|
76
|
+
attr_reader :user_fee_slow
|
|
77
|
+
|
|
78
|
+
sig { params(user_fee_slow: Privy::SparkCurrencyAmount::OrHash).void }
|
|
79
|
+
attr_writer :user_fee_slow
|
|
80
|
+
|
|
81
|
+
# A fee quote for a cooperative exit from Spark to Bitcoin L1.
|
|
82
|
+
sig do
|
|
83
|
+
params(
|
|
84
|
+
id: String,
|
|
85
|
+
created_at: String,
|
|
86
|
+
expires_at: String,
|
|
87
|
+
l1_broadcast_fee_fast: Privy::SparkCurrencyAmount::OrHash,
|
|
88
|
+
l1_broadcast_fee_medium: Privy::SparkCurrencyAmount::OrHash,
|
|
89
|
+
l1_broadcast_fee_slow: Privy::SparkCurrencyAmount::OrHash,
|
|
90
|
+
network: String,
|
|
91
|
+
total_amount: Privy::SparkCurrencyAmount::OrHash,
|
|
92
|
+
updated_at: String,
|
|
93
|
+
user_fee_fast: Privy::SparkCurrencyAmount::OrHash,
|
|
94
|
+
user_fee_medium: Privy::SparkCurrencyAmount::OrHash,
|
|
95
|
+
user_fee_slow: Privy::SparkCurrencyAmount::OrHash
|
|
96
|
+
).returns(T.attached_class)
|
|
97
|
+
end
|
|
98
|
+
def self.new(
|
|
99
|
+
id:,
|
|
100
|
+
created_at:,
|
|
101
|
+
expires_at:,
|
|
102
|
+
# A currency amount with its original value and unit.
|
|
103
|
+
l1_broadcast_fee_fast:,
|
|
104
|
+
# A currency amount with its original value and unit.
|
|
105
|
+
l1_broadcast_fee_medium:,
|
|
106
|
+
# A currency amount with its original value and unit.
|
|
107
|
+
l1_broadcast_fee_slow:,
|
|
108
|
+
network:,
|
|
109
|
+
# A currency amount with its original value and unit.
|
|
110
|
+
total_amount:,
|
|
111
|
+
updated_at:,
|
|
112
|
+
# A currency amount with its original value and unit.
|
|
113
|
+
user_fee_fast:,
|
|
114
|
+
# A currency amount with its original value and unit.
|
|
115
|
+
user_fee_medium:,
|
|
116
|
+
# A currency amount with its original value and unit.
|
|
117
|
+
user_fee_slow:
|
|
118
|
+
)
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
sig do
|
|
122
|
+
override.returns(
|
|
123
|
+
{
|
|
124
|
+
id: String,
|
|
125
|
+
created_at: String,
|
|
126
|
+
expires_at: String,
|
|
127
|
+
l1_broadcast_fee_fast: Privy::SparkCurrencyAmount,
|
|
128
|
+
l1_broadcast_fee_medium: Privy::SparkCurrencyAmount,
|
|
129
|
+
l1_broadcast_fee_slow: Privy::SparkCurrencyAmount,
|
|
130
|
+
network: String,
|
|
131
|
+
total_amount: Privy::SparkCurrencyAmount,
|
|
132
|
+
updated_at: String,
|
|
133
|
+
user_fee_fast: Privy::SparkCurrencyAmount,
|
|
134
|
+
user_fee_medium: Privy::SparkCurrencyAmount,
|
|
135
|
+
user_fee_slow: Privy::SparkCurrencyAmount
|
|
136
|
+
}
|
|
137
|
+
)
|
|
138
|
+
end
|
|
139
|
+
def to_hash
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
end
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Privy
|
|
4
|
+
module Models
|
|
5
|
+
class SparkCoopExitRequest < Privy::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Privy::SparkCoopExitRequest, Privy::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
sig { returns(String) }
|
|
12
|
+
attr_accessor :id
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :coop_exit_txid
|
|
16
|
+
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :created_at
|
|
19
|
+
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :expires_at
|
|
22
|
+
|
|
23
|
+
# A currency amount with its original value and unit.
|
|
24
|
+
sig { returns(Privy::SparkCurrencyAmount) }
|
|
25
|
+
attr_reader :fee
|
|
26
|
+
|
|
27
|
+
sig { params(fee: Privy::SparkCurrencyAmount::OrHash).void }
|
|
28
|
+
attr_writer :fee
|
|
29
|
+
|
|
30
|
+
# A currency amount with its original value and unit.
|
|
31
|
+
sig { returns(Privy::SparkCurrencyAmount) }
|
|
32
|
+
attr_reader :l1_broadcast_fee
|
|
33
|
+
|
|
34
|
+
sig { params(l1_broadcast_fee: Privy::SparkCurrencyAmount::OrHash).void }
|
|
35
|
+
attr_writer :l1_broadcast_fee
|
|
36
|
+
|
|
37
|
+
sig { returns(String) }
|
|
38
|
+
attr_accessor :network
|
|
39
|
+
|
|
40
|
+
sig { returns(String) }
|
|
41
|
+
attr_accessor :status
|
|
42
|
+
|
|
43
|
+
sig { returns(String) }
|
|
44
|
+
attr_accessor :updated_at
|
|
45
|
+
|
|
46
|
+
# The exit speed for a cooperative withdrawal from Spark to L1.
|
|
47
|
+
sig { returns(T.nilable(Privy::SparkExitSpeed::TaggedSymbol)) }
|
|
48
|
+
attr_reader :exit_speed
|
|
49
|
+
|
|
50
|
+
sig { params(exit_speed: Privy::SparkExitSpeed::OrSymbol).void }
|
|
51
|
+
attr_writer :exit_speed
|
|
52
|
+
|
|
53
|
+
sig { returns(T.nilable(String)) }
|
|
54
|
+
attr_reader :fee_quote_id
|
|
55
|
+
|
|
56
|
+
sig { params(fee_quote_id: String).void }
|
|
57
|
+
attr_writer :fee_quote_id
|
|
58
|
+
|
|
59
|
+
# A cooperative exit request from Spark to Bitcoin L1.
|
|
60
|
+
sig do
|
|
61
|
+
params(
|
|
62
|
+
id: String,
|
|
63
|
+
coop_exit_txid: String,
|
|
64
|
+
created_at: String,
|
|
65
|
+
expires_at: String,
|
|
66
|
+
fee: Privy::SparkCurrencyAmount::OrHash,
|
|
67
|
+
l1_broadcast_fee: Privy::SparkCurrencyAmount::OrHash,
|
|
68
|
+
network: String,
|
|
69
|
+
status: String,
|
|
70
|
+
updated_at: String,
|
|
71
|
+
exit_speed: Privy::SparkExitSpeed::OrSymbol,
|
|
72
|
+
fee_quote_id: String
|
|
73
|
+
).returns(T.attached_class)
|
|
74
|
+
end
|
|
75
|
+
def self.new(
|
|
76
|
+
id:,
|
|
77
|
+
coop_exit_txid:,
|
|
78
|
+
created_at:,
|
|
79
|
+
expires_at:,
|
|
80
|
+
# A currency amount with its original value and unit.
|
|
81
|
+
fee:,
|
|
82
|
+
# A currency amount with its original value and unit.
|
|
83
|
+
l1_broadcast_fee:,
|
|
84
|
+
network:,
|
|
85
|
+
status:,
|
|
86
|
+
updated_at:,
|
|
87
|
+
# The exit speed for a cooperative withdrawal from Spark to L1.
|
|
88
|
+
exit_speed: nil,
|
|
89
|
+
fee_quote_id: nil
|
|
90
|
+
)
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
sig do
|
|
94
|
+
override.returns(
|
|
95
|
+
{
|
|
96
|
+
id: String,
|
|
97
|
+
coop_exit_txid: String,
|
|
98
|
+
created_at: String,
|
|
99
|
+
expires_at: String,
|
|
100
|
+
fee: Privy::SparkCurrencyAmount,
|
|
101
|
+
l1_broadcast_fee: Privy::SparkCurrencyAmount,
|
|
102
|
+
network: String,
|
|
103
|
+
status: String,
|
|
104
|
+
updated_at: String,
|
|
105
|
+
exit_speed: Privy::SparkExitSpeed::TaggedSymbol,
|
|
106
|
+
fee_quote_id: String
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
end
|
|
110
|
+
def to_hash
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Privy
|
|
4
|
+
module Models
|
|
5
|
+
class SparkCurrencyAmount < Privy::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Privy::SparkCurrencyAmount, Privy::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
sig { returns(String) }
|
|
12
|
+
attr_accessor :original_unit
|
|
13
|
+
|
|
14
|
+
sig { returns(Float) }
|
|
15
|
+
attr_accessor :original_value
|
|
16
|
+
|
|
17
|
+
# A currency amount with its original value and unit.
|
|
18
|
+
sig do
|
|
19
|
+
params(original_unit: String, original_value: Float).returns(
|
|
20
|
+
T.attached_class
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
def self.new(original_unit:, original_value:)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig { override.returns({ original_unit: String, original_value: Float }) }
|
|
27
|
+
def to_hash
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Privy
|
|
4
|
+
module Models
|
|
5
|
+
# The exit speed for a cooperative withdrawal from Spark to L1.
|
|
6
|
+
module SparkExitSpeed
|
|
7
|
+
extend Privy::Internal::Type::Enum
|
|
8
|
+
|
|
9
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, Privy::SparkExitSpeed) }
|
|
10
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
11
|
+
|
|
12
|
+
FAST = T.let(:FAST, Privy::SparkExitSpeed::TaggedSymbol)
|
|
13
|
+
MEDIUM = T.let(:MEDIUM, Privy::SparkExitSpeed::TaggedSymbol)
|
|
14
|
+
SLOW = T.let(:SLOW, Privy::SparkExitSpeed::TaggedSymbol)
|
|
15
|
+
|
|
16
|
+
sig { override.returns(T::Array[Privy::SparkExitSpeed::TaggedSymbol]) }
|
|
17
|
+
def self.values
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|