privy_ruby 0.0.2 → 0.1.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/base58.rb +41 -0
- data/lib/privy/client.rb +8 -0
- data/lib/privy/cryptography.rb +34 -0
- data/lib/privy/models/create_link_auth_intent_input.rb +17 -0
- data/lib/privy/models/create_link_auth_intent_response.rb +36 -0
- data/lib/privy/models/create_stripe_onramp_session_input.rb +33 -0
- data/lib/privy/models/create_stripe_onramp_session_response.rb +23 -0
- data/lib/privy/models/device_authorization_response.rb +63 -0
- data/lib/privy/models/earn_incentive_reward_entry.rb +50 -0
- data/lib/privy/models/earn_incentive_rewards_query.rb +18 -0
- data/lib/privy/models/earn_incentive_rewards_response.rb +19 -0
- data/lib/privy/models/exchange_stripe_tokens_input.rb +23 -0
- data/lib/privy/models/exchange_stripe_tokens_response.rb +17 -0
- data/lib/privy/models/fiat_onramp_provider.rb +2 -0
- data/lib/privy/models/fiat_onramp_stripe_sdk_session_response.rb +45 -0
- data/lib/privy/models/fiat_onramp_url_session_response.rb +39 -0
- data/lib/privy/models/get_fiat_onramp_url_response.rb +12 -14
- data/lib/privy/models/get_stripe_crypto_customer_response.rb +39 -0
- data/lib/privy/models/kraken_embed_custom_order_cancelled_webhook_payload.rb +66 -0
- data/lib/privy/models/kraken_embed_custom_order_executed_webhook_payload.rb +54 -0
- data/lib/privy/models/kraken_embed_custom_order_execution_failed_webhook_payload.rb +67 -0
- data/lib/privy/models/link_auth_intent_created.rb +35 -0
- data/lib/privy/models/link_auth_intent_no_account.rb +27 -0
- data/lib/privy/models/list_stripe_consumer_wallets_response.rb +17 -0
- data/lib/privy/models/list_stripe_payment_tokens_response.rb +17 -0
- data/lib/privy/models/onramp_session_params.rb +61 -0
- data/lib/privy/models/refresh_stripe_quote_response.rb +18 -0
- data/lib/privy/models/rule_delete_intent_response.rb +63 -0
- data/lib/privy/models/rule_intent_response.rb +0 -1
- data/lib/privy/models/rule_mutate_intent_response.rb +64 -0
- data/lib/privy/models/stripe_consumer_wallet.rb +29 -0
- data/lib/privy/models/stripe_crypto_customer_active.rb +39 -0
- data/lib/privy/models/stripe_crypto_customer_expired.rb +33 -0
- data/lib/privy/models/stripe_crypto_customer_none.rb +27 -0
- data/lib/privy/models/stripe_onramp_checkout_response.rb +25 -0
- data/lib/privy/models/stripe_onramp_session_status.rb +17 -0
- data/lib/privy/models/stripe_payment_token.rb +23 -0
- data/lib/privy/models/stripe_quote.rb +17 -0
- data/lib/privy/models/stripe_transaction_details.rb +17 -0
- data/lib/privy/models/stripe_verification.rb +23 -0
- data/lib/privy/models/swap_action_response.rb +9 -1
- data/lib/privy/models/swap_destination.rb +13 -4
- data/lib/privy/models/swap_quote_destination.rb +15 -4
- data/lib/privy/models/swap_quote_request_body.rb +9 -1
- data/lib/privy/models/swap_quote_response.rb +25 -1
- data/lib/privy/models/swap_request_body.rb +9 -1
- data/lib/privy/models/wallets/swap_execute_params.rb +45 -0
- data/lib/privy/models/wallets/swap_quote_params.rb +36 -0
- data/lib/privy/models.rb +71 -4
- data/lib/privy/public_api/privy_client.rb +2 -1
- data/lib/privy/public_api/services/earn/ethereum/incentive.rb +61 -0
- data/lib/privy/public_api/services/earn/ethereum.rb +131 -0
- data/lib/privy/public_api/services/earn.rb +18 -0
- data/lib/privy/public_api/services/key_quorums.rb +7 -1
- data/lib/privy/public_api/services/policies.rb +21 -3
- data/lib/privy/public_api/services/transactions.rb +14 -0
- data/lib/privy/public_api/services/wallets.rb +153 -1
- data/lib/privy/resources/intents.rb +6 -6
- data/lib/privy/resources/oauth.rb +14 -0
- data/lib/privy/resources/onramps.rb +14 -0
- data/lib/privy/resources/wallets/swap.rb +105 -0
- data/lib/privy/resources/wallets.rb +10 -2
- data/lib/privy/version.rb +1 -1
- data/lib/privy/wallet_entropy.rb +60 -0
- data/lib/privy.rb +47 -4
- data/rbi/privy/client.rbi +6 -0
- data/rbi/privy/models/create_link_auth_intent_input.rbi +27 -0
- data/rbi/privy/models/create_link_auth_intent_response.rbi +68 -0
- data/rbi/privy/models/create_stripe_onramp_session_input.rbi +55 -0
- data/rbi/privy/models/create_stripe_onramp_session_response.rbi +30 -0
- data/rbi/privy/models/device_authorization_response.rbi +81 -0
- data/rbi/privy/models/earn_incentive_reward_entry.rbi +73 -0
- data/rbi/privy/models/earn_incentive_rewards_query.rbi +28 -0
- data/rbi/privy/models/earn_incentive_rewards_response.rbi +35 -0
- data/rbi/privy/models/exchange_stripe_tokens_input.rbi +33 -0
- data/rbi/privy/models/exchange_stripe_tokens_response.rbi +24 -0
- data/rbi/privy/models/fiat_onramp_provider.rbi +3 -0
- data/rbi/privy/models/fiat_onramp_stripe_sdk_session_response.rbi +78 -0
- data/rbi/privy/models/fiat_onramp_url_session_response.rbi +65 -0
- data/rbi/privy/models/get_fiat_onramp_url_response.rbi +12 -15
- data/rbi/privy/models/get_stripe_crypto_customer_response.rbi +81 -0
- data/rbi/privy/models/kraken_embed_custom_order_cancelled_webhook_payload.rbi +111 -0
- data/rbi/privy/models/kraken_embed_custom_order_executed_webhook_payload.rbi +101 -0
- data/rbi/privy/models/kraken_embed_custom_order_execution_failed_webhook_payload.rbi +111 -0
- data/rbi/privy/models/link_auth_intent_created.rbi +60 -0
- data/rbi/privy/models/link_auth_intent_no_account.rbi +54 -0
- data/rbi/privy/models/list_stripe_consumer_wallets_response.rbi +31 -0
- data/rbi/privy/models/list_stripe_payment_tokens_response.rbi +31 -0
- data/rbi/privy/models/onramp_session_params.rbi +76 -0
- data/rbi/privy/models/refresh_stripe_quote_response.rbi +33 -0
- data/rbi/privy/models/rule_delete_intent_response.rbi +113 -0
- data/rbi/privy/models/rule_mutate_intent_response.rbi +113 -0
- data/rbi/privy/models/stripe_consumer_wallet.rbi +38 -0
- data/rbi/privy/models/stripe_crypto_customer_active.rbi +68 -0
- data/rbi/privy/models/stripe_crypto_customer_expired.rbi +63 -0
- data/rbi/privy/models/stripe_crypto_customer_none.rbi +53 -0
- data/rbi/privy/models/stripe_onramp_checkout_response.rbi +51 -0
- data/rbi/privy/models/stripe_onramp_session_status.rbi +26 -0
- data/rbi/privy/models/stripe_payment_token.rbi +27 -0
- data/rbi/privy/models/stripe_quote.rbi +22 -0
- data/rbi/privy/models/stripe_transaction_details.rbi +24 -0
- data/rbi/privy/models/stripe_verification.rbi +27 -0
- data/rbi/privy/models/swap_action_response.rbi +17 -27
- data/rbi/privy/models/swap_destination.rbi +26 -7
- data/rbi/privy/models/swap_quote_destination.rbi +30 -7
- data/rbi/privy/models/swap_quote_request_body.rbi +11 -0
- data/rbi/privy/models/swap_quote_response.rbi +54 -3
- data/rbi/privy/models/swap_request_body.rbi +11 -0
- data/rbi/privy/models/wallets/swap_execute_params.rbi +71 -0
- data/rbi/privy/models/wallets/swap_quote_params.rbi +58 -0
- data/rbi/privy/models.rbi +76 -5
- data/rbi/privy/resources/intents.rbi +3 -3
- data/rbi/privy/resources/oauth.rbi +12 -0
- data/rbi/privy/resources/onramps.rbi +12 -0
- data/rbi/privy/resources/wallets/swap.rbi +94 -0
- data/rbi/privy/resources/wallets.rbi +9 -2
- data/sig/privy/client.rbs +4 -0
- data/sig/privy/models/create_link_auth_intent_input.rbs +15 -0
- data/sig/privy/models/create_link_auth_intent_response.rbs +26 -0
- data/sig/privy/models/create_stripe_onramp_session_input.rbs +30 -0
- data/sig/privy/models/create_stripe_onramp_session_response.rbs +16 -0
- data/sig/privy/models/device_authorization_response.rbs +45 -0
- data/sig/privy/models/earn_incentive_reward_entry.rbs +42 -0
- data/sig/privy/models/earn_incentive_rewards_query.rbs +13 -0
- data/sig/privy/models/earn_incentive_rewards_response.rbs +16 -0
- data/sig/privy/models/exchange_stripe_tokens_input.rbs +19 -0
- data/sig/privy/models/exchange_stripe_tokens_response.rbs +13 -0
- data/sig/privy/models/fiat_onramp_provider.rbs +4 -0
- data/sig/privy/models/fiat_onramp_stripe_sdk_session_response.rbs +45 -0
- data/sig/privy/models/fiat_onramp_url_session_response.rbs +40 -0
- data/sig/privy/models/get_fiat_onramp_url_response.rbs +6 -8
- data/sig/privy/models/get_stripe_crypto_customer_response.rbs +29 -0
- data/sig/privy/models/kraken_embed_custom_order_cancelled_webhook_payload.rbs +50 -0
- data/sig/privy/models/kraken_embed_custom_order_executed_webhook_payload.rbs +45 -0
- data/sig/privy/models/kraken_embed_custom_order_execution_failed_webhook_payload.rbs +50 -0
- data/sig/privy/models/link_auth_intent_created.rbs +32 -0
- data/sig/privy/models/link_auth_intent_no_account.rbs +26 -0
- data/sig/privy/models/list_stripe_consumer_wallets_response.rbs +14 -0
- data/sig/privy/models/list_stripe_payment_tokens_response.rbs +14 -0
- data/sig/privy/models/onramp_session_params.rbs +50 -0
- data/sig/privy/models/refresh_stripe_quote_response.rbs +13 -0
- data/sig/privy/models/rule_delete_intent_response.rbs +66 -0
- data/sig/privy/models/rule_mutate_intent_response.rbs +66 -0
- data/sig/privy/models/stripe_consumer_wallet.rbs +22 -0
- data/sig/privy/models/stripe_crypto_customer_active.rbs +40 -0
- data/sig/privy/models/stripe_crypto_customer_expired.rbs +35 -0
- data/sig/privy/models/stripe_crypto_customer_none.rbs +28 -0
- data/sig/privy/models/stripe_onramp_checkout_response.rbs +29 -0
- data/sig/privy/models/stripe_onramp_session_status.rbs +15 -0
- data/sig/privy/models/stripe_payment_token.rbs +15 -0
- data/sig/privy/models/stripe_quote.rbs +13 -0
- data/sig/privy/models/stripe_transaction_details.rbs +13 -0
- data/sig/privy/models/stripe_verification.rbs +15 -0
- data/sig/privy/models/swap_action_response.rbs +7 -0
- data/sig/privy/models/swap_destination.rbs +16 -3
- data/sig/privy/models/swap_quote_destination.rbs +16 -3
- data/sig/privy/models/swap_quote_request_body.rbs +9 -0
- data/sig/privy/models/swap_quote_response.rbs +26 -3
- data/sig/privy/models/swap_request_body.rbs +9 -0
- data/sig/privy/models/wallets/swap_execute_params.rbs +44 -0
- data/sig/privy/models/wallets/swap_quote_params.rbs +34 -0
- data/sig/privy/models.rbs +69 -5
- data/sig/privy/resources/intents.rbs +3 -3
- data/sig/privy/resources/oauth.rbs +7 -0
- data/sig/privy/resources/onramps.rbs +7 -0
- data/sig/privy/resources/wallets/swap.rbs +34 -0
- data/sig/privy/resources/wallets.rbs +2 -0
- metadata +125 -8
- data/lib/privy/models/gas_sponsorship_configuration.rb +0 -29
- data/lib/privy/models/gas_sponsorship_configuration_input.rb +0 -29
- data/rbi/privy/models/gas_sponsorship_configuration.rbi +0 -48
- data/rbi/privy/models/gas_sponsorship_configuration_input.rbi +0 -60
- data/sig/privy/models/gas_sponsorship_configuration.rbs +0 -30
- data/sig/privy/models/gas_sponsorship_configuration_input.rbs +0 -36
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Privy
|
|
4
|
+
module Models
|
|
5
|
+
module Wallets
|
|
6
|
+
class SwapQuoteParams < Privy::Models::SwapQuoteRequestBody
|
|
7
|
+
extend Privy::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Privy::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(Privy::Wallets::SwapQuoteParams, Privy::Internal::AnyHash)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# ID of the wallet.
|
|
16
|
+
sig { returns(String) }
|
|
17
|
+
attr_accessor :wallet_id
|
|
18
|
+
|
|
19
|
+
# Request authorization signature. If multiple signatures are required, they
|
|
20
|
+
# should be comma separated.
|
|
21
|
+
sig { returns(T.nilable(String)) }
|
|
22
|
+
attr_reader :privy_authorization_signature
|
|
23
|
+
|
|
24
|
+
sig { params(privy_authorization_signature: String).void }
|
|
25
|
+
attr_writer :privy_authorization_signature
|
|
26
|
+
|
|
27
|
+
sig do
|
|
28
|
+
params(
|
|
29
|
+
wallet_id: String,
|
|
30
|
+
privy_authorization_signature: String,
|
|
31
|
+
request_options: Privy::RequestOptions::OrHash
|
|
32
|
+
).returns(T.attached_class)
|
|
33
|
+
end
|
|
34
|
+
def self.new(
|
|
35
|
+
# ID of the wallet.
|
|
36
|
+
wallet_id:,
|
|
37
|
+
# Request authorization signature. If multiple signatures are required, they
|
|
38
|
+
# should be comma separated.
|
|
39
|
+
privy_authorization_signature: nil,
|
|
40
|
+
request_options: {}
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
sig do
|
|
45
|
+
override.returns(
|
|
46
|
+
{
|
|
47
|
+
wallet_id: String,
|
|
48
|
+
privy_authorization_signature: String,
|
|
49
|
+
request_options: Privy::RequestOptions
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
end
|
|
53
|
+
def to_hash
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
data/rbi/privy/models.rbi
CHANGED
|
@@ -239,12 +239,21 @@ module Privy
|
|
|
239
239
|
|
|
240
240
|
CreateAccountInput = Privy::Models::CreateAccountInput
|
|
241
241
|
|
|
242
|
+
CreateLinkAuthIntentInput = Privy::Models::CreateLinkAuthIntentInput
|
|
243
|
+
|
|
244
|
+
CreateLinkAuthIntentResponse = Privy::Models::CreateLinkAuthIntentResponse
|
|
245
|
+
|
|
242
246
|
CreateOrganizationSecretResponse =
|
|
243
247
|
Privy::Models::CreateOrganizationSecretResponse
|
|
244
248
|
|
|
245
249
|
CreateOrUpdateFiatCustomerRequestInput =
|
|
246
250
|
Privy::Models::CreateOrUpdateFiatCustomerRequestInput
|
|
247
251
|
|
|
252
|
+
CreateStripeOnrampSessionInput = Privy::Models::CreateStripeOnrampSessionInput
|
|
253
|
+
|
|
254
|
+
CreateStripeOnrampSessionResponse =
|
|
255
|
+
Privy::Models::CreateStripeOnrampSessionResponse
|
|
256
|
+
|
|
248
257
|
CrossAppConnection = Privy::Models::CrossAppConnection
|
|
249
258
|
|
|
250
259
|
CrossAppConnectionsResponse = Privy::Models::CrossAppConnectionsResponse
|
|
@@ -289,6 +298,8 @@ module Privy
|
|
|
289
298
|
|
|
290
299
|
DeveloperFee = Privy::Models::DeveloperFee
|
|
291
300
|
|
|
301
|
+
DeviceAuthorizationResponse = Privy::Models::DeviceAuthorizationResponse
|
|
302
|
+
|
|
292
303
|
EarnAsset = Privy::Models::EarnAsset
|
|
293
304
|
|
|
294
305
|
EarnDepositActionResponse = Privy::Models::EarnDepositActionResponse
|
|
@@ -300,6 +311,12 @@ module Privy
|
|
|
300
311
|
|
|
301
312
|
EarnIncentiveClaimRequestBody = Privy::Models::EarnIncentiveClaimRequestBody
|
|
302
313
|
|
|
314
|
+
EarnIncentiveRewardEntry = Privy::Models::EarnIncentiveRewardEntry
|
|
315
|
+
|
|
316
|
+
EarnIncentiveRewardsQuery = Privy::Models::EarnIncentiveRewardsQuery
|
|
317
|
+
|
|
318
|
+
EarnIncentiveRewardsResponse = Privy::Models::EarnIncentiveRewardsResponse
|
|
319
|
+
|
|
303
320
|
EarnIncetiveClaimRewardEntry = Privy::Models::EarnIncetiveClaimRewardEntry
|
|
304
321
|
|
|
305
322
|
EarnWithdrawActionResponse = Privy::Models::EarnWithdrawActionResponse
|
|
@@ -492,6 +509,10 @@ module Privy
|
|
|
492
509
|
|
|
493
510
|
EvmWalletActionStepStatus = Privy::Models::EvmWalletActionStepStatus
|
|
494
511
|
|
|
512
|
+
ExchangeStripeTokensInput = Privy::Models::ExchangeStripeTokensInput
|
|
513
|
+
|
|
514
|
+
ExchangeStripeTokensResponse = Privy::Models::ExchangeStripeTokensResponse
|
|
515
|
+
|
|
495
516
|
ExportPrivateKeyRpcInput = Privy::Models::ExportPrivateKeyRpcInput
|
|
496
517
|
|
|
497
518
|
ExportPrivateKeyRpcResponse = Privy::Models::ExportPrivateKeyRpcResponse
|
|
@@ -601,8 +622,13 @@ module Privy
|
|
|
601
622
|
|
|
602
623
|
FiatOnrampSource = Privy::Models::FiatOnrampSource
|
|
603
624
|
|
|
625
|
+
FiatOnrampStripeSDKSessionResponse =
|
|
626
|
+
Privy::Models::FiatOnrampStripeSDKSessionResponse
|
|
627
|
+
|
|
604
628
|
FiatOnrampTransactionStatus = Privy::Models::FiatOnrampTransactionStatus
|
|
605
629
|
|
|
630
|
+
FiatOnrampURLSessionResponse = Privy::Models::FiatOnrampURLSessionResponse
|
|
631
|
+
|
|
606
632
|
FiatVirtualAccountRequest = Privy::Models::FiatVirtualAccountRequest
|
|
607
633
|
|
|
608
634
|
FiatVirtualAccountResponse = Privy::Models::FiatVirtualAccountResponse
|
|
@@ -625,11 +651,6 @@ module Privy
|
|
|
625
651
|
|
|
626
652
|
GasSpendResponseBody = Privy::Models::GasSpendResponseBody
|
|
627
653
|
|
|
628
|
-
GasSponsorshipConfiguration = Privy::Models::GasSponsorshipConfiguration
|
|
629
|
-
|
|
630
|
-
GasSponsorshipConfigurationInput =
|
|
631
|
-
Privy::Models::GasSponsorshipConfigurationInput
|
|
632
|
-
|
|
633
654
|
GetByWalletAddressRequestBody = Privy::Models::GetByWalletAddressRequestBody
|
|
634
655
|
|
|
635
656
|
GetFiatCustomerRequestInput = Privy::Models::GetFiatCustomerRequestInput
|
|
@@ -648,6 +669,9 @@ module Privy
|
|
|
648
669
|
|
|
649
670
|
GetFiatOnrampURLResponse = Privy::Models::GetFiatOnrampURLResponse
|
|
650
671
|
|
|
672
|
+
GetStripeCryptoCustomerResponse =
|
|
673
|
+
Privy::Models::GetStripeCryptoCustomerResponse
|
|
674
|
+
|
|
651
675
|
GuestAuthenticateRequestBody = Privy::Models::GuestAuthenticateRequestBody
|
|
652
676
|
|
|
653
677
|
HDInitInput = Privy::Models::HDInitInput
|
|
@@ -762,6 +786,15 @@ module Privy
|
|
|
762
786
|
|
|
763
787
|
KrakenEmbedCustomOrderAmount = Privy::Models::KrakenEmbedCustomOrderAmount
|
|
764
788
|
|
|
789
|
+
KrakenEmbedCustomOrderCancelledWebhookPayload =
|
|
790
|
+
Privy::Models::KrakenEmbedCustomOrderCancelledWebhookPayload
|
|
791
|
+
|
|
792
|
+
KrakenEmbedCustomOrderExecutedWebhookPayload =
|
|
793
|
+
Privy::Models::KrakenEmbedCustomOrderExecutedWebhookPayload
|
|
794
|
+
|
|
795
|
+
KrakenEmbedCustomOrderExecutionFailedWebhookPayload =
|
|
796
|
+
Privy::Models::KrakenEmbedCustomOrderExecutionFailedWebhookPayload
|
|
797
|
+
|
|
765
798
|
KrakenEmbedCustomOrderOccurrence =
|
|
766
799
|
Privy::Models::KrakenEmbedCustomOrderOccurrence
|
|
767
800
|
|
|
@@ -911,6 +944,10 @@ module Privy
|
|
|
911
944
|
KrakenEmbedUserVerifiedWebhookPayload =
|
|
912
945
|
Privy::Models::KrakenEmbedUserVerifiedWebhookPayload
|
|
913
946
|
|
|
947
|
+
LinkAuthIntentCreated = Privy::Models::LinkAuthIntentCreated
|
|
948
|
+
|
|
949
|
+
LinkAuthIntentNoAccount = Privy::Models::LinkAuthIntentNoAccount
|
|
950
|
+
|
|
914
951
|
LinkedAccount = Privy::Models::LinkedAccount
|
|
915
952
|
|
|
916
953
|
LinkedAccountAppleInput = Privy::Models::LinkedAccountAppleInput
|
|
@@ -1025,6 +1062,12 @@ module Privy
|
|
|
1025
1062
|
|
|
1026
1063
|
LinkJwtInput = Privy::Models::LinkJwtInput
|
|
1027
1064
|
|
|
1065
|
+
ListStripeConsumerWalletsResponse =
|
|
1066
|
+
Privy::Models::ListStripeConsumerWalletsResponse
|
|
1067
|
+
|
|
1068
|
+
ListStripePaymentTokensResponse =
|
|
1069
|
+
Privy::Models::ListStripePaymentTokensResponse
|
|
1070
|
+
|
|
1028
1071
|
MfaDisabledWebhookPayload = Privy::Models::MfaDisabledWebhookPayload
|
|
1029
1072
|
|
|
1030
1073
|
MfaEnabledWebhookPayload = Privy::Models::MfaEnabledWebhookPayload
|
|
@@ -1123,6 +1166,8 @@ module Privy
|
|
|
1123
1166
|
|
|
1124
1167
|
OnrampProvider = Privy::Models::OnrampProvider
|
|
1125
1168
|
|
|
1169
|
+
OnrampSessionParams = Privy::Models::OnrampSessionParams
|
|
1170
|
+
|
|
1126
1171
|
OptionalRefreshTokenInput = Privy::Models::OptionalRefreshTokenInput
|
|
1127
1172
|
|
|
1128
1173
|
OrganizationSecretIDInput = Privy::Models::OrganizationSecretIDInput
|
|
@@ -1310,6 +1355,8 @@ module Privy
|
|
|
1310
1355
|
|
|
1311
1356
|
RecoveryType = Privy::Models::RecoveryType
|
|
1312
1357
|
|
|
1358
|
+
RefreshStripeQuoteResponse = Privy::Models::RefreshStripeQuoteResponse
|
|
1359
|
+
|
|
1313
1360
|
RelayerFee = Privy::Models::RelayerFee
|
|
1314
1361
|
|
|
1315
1362
|
ResponsePasskeyInitAuthenticate =
|
|
@@ -1323,6 +1370,8 @@ module Privy
|
|
|
1323
1370
|
|
|
1324
1371
|
RpcIntentResponse = Privy::Models::RpcIntentResponse
|
|
1325
1372
|
|
|
1373
|
+
RuleDeleteIntentResponse = Privy::Models::RuleDeleteIntentResponse
|
|
1374
|
+
|
|
1326
1375
|
RuleIntentCreateRequestDetails = Privy::Models::RuleIntentCreateRequestDetails
|
|
1327
1376
|
|
|
1328
1377
|
RuleIntentDeleteRequestDetails = Privy::Models::RuleIntentDeleteRequestDetails
|
|
@@ -1333,6 +1382,8 @@ module Privy
|
|
|
1333
1382
|
|
|
1334
1383
|
RuleIntentUpdateRequestDetails = Privy::Models::RuleIntentUpdateRequestDetails
|
|
1335
1384
|
|
|
1385
|
+
RuleMutateIntentResponse = Privy::Models::RuleMutateIntentResponse
|
|
1386
|
+
|
|
1336
1387
|
SeedPhraseExportInput = Privy::Models::SeedPhraseExportInput
|
|
1337
1388
|
|
|
1338
1389
|
SeedPhraseExportResponse = Privy::Models::SeedPhraseExportResponse
|
|
@@ -1563,6 +1614,26 @@ module Privy
|
|
|
1563
1614
|
|
|
1564
1615
|
SparkWalletLeaf = Privy::Models::SparkWalletLeaf
|
|
1565
1616
|
|
|
1617
|
+
StripeConsumerWallet = Privy::Models::StripeConsumerWallet
|
|
1618
|
+
|
|
1619
|
+
StripeCryptoCustomerActive = Privy::Models::StripeCryptoCustomerActive
|
|
1620
|
+
|
|
1621
|
+
StripeCryptoCustomerExpired = Privy::Models::StripeCryptoCustomerExpired
|
|
1622
|
+
|
|
1623
|
+
StripeCryptoCustomerNone = Privy::Models::StripeCryptoCustomerNone
|
|
1624
|
+
|
|
1625
|
+
StripeOnrampCheckoutResponse = Privy::Models::StripeOnrampCheckoutResponse
|
|
1626
|
+
|
|
1627
|
+
StripeOnrampSessionStatus = Privy::Models::StripeOnrampSessionStatus
|
|
1628
|
+
|
|
1629
|
+
StripePaymentToken = Privy::Models::StripePaymentToken
|
|
1630
|
+
|
|
1631
|
+
StripeQuote = Privy::Models::StripeQuote
|
|
1632
|
+
|
|
1633
|
+
StripeTransactionDetails = Privy::Models::StripeTransactionDetails
|
|
1634
|
+
|
|
1635
|
+
StripeVerification = Privy::Models::StripeVerification
|
|
1636
|
+
|
|
1566
1637
|
SuccessResponse = Privy::Models::SuccessResponse
|
|
1567
1638
|
|
|
1568
1639
|
SuiCommandName = Privy::Models::SuiCommandName
|
|
@@ -67,7 +67,7 @@ module Privy
|
|
|
67
67
|
name: String,
|
|
68
68
|
privy_request_expiry: String,
|
|
69
69
|
request_options: Privy::RequestOptions::OrHash
|
|
70
|
-
).returns(Privy::
|
|
70
|
+
).returns(Privy::RuleMutateIntentResponse)
|
|
71
71
|
end
|
|
72
72
|
def create_policy_rule(
|
|
73
73
|
# Path param: ID of the policy.
|
|
@@ -95,7 +95,7 @@ module Privy
|
|
|
95
95
|
policy_id: String,
|
|
96
96
|
privy_request_expiry: String,
|
|
97
97
|
request_options: Privy::RequestOptions::OrHash
|
|
98
|
-
).returns(Privy::
|
|
98
|
+
).returns(Privy::RuleDeleteIntentResponse)
|
|
99
99
|
end
|
|
100
100
|
def delete_policy_rule(
|
|
101
101
|
# Path param: ID of the rule.
|
|
@@ -319,7 +319,7 @@ module Privy
|
|
|
319
319
|
name: String,
|
|
320
320
|
privy_request_expiry: String,
|
|
321
321
|
request_options: Privy::RequestOptions::OrHash
|
|
322
|
-
).returns(Privy::
|
|
322
|
+
).returns(Privy::RuleMutateIntentResponse)
|
|
323
323
|
end
|
|
324
324
|
def update_policy_rule(
|
|
325
325
|
# Path param: ID of the rule.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Privy
|
|
4
|
+
module Resources
|
|
5
|
+
class Wallets
|
|
6
|
+
# Operations for swapping tokens within wallets
|
|
7
|
+
class Swap
|
|
8
|
+
# Execute a token swap within a wallet.
|
|
9
|
+
sig do
|
|
10
|
+
params(
|
|
11
|
+
wallet_id: String,
|
|
12
|
+
base_amount: String,
|
|
13
|
+
destination: Privy::SwapDestination::OrHash,
|
|
14
|
+
source: Privy::SwapSource::OrHash,
|
|
15
|
+
amount_type: Privy::AmountType::OrSymbol,
|
|
16
|
+
fee_configuration: Privy::FeeConfiguration::OrHash,
|
|
17
|
+
slippage_bps: Float,
|
|
18
|
+
privy_authorization_signature: String,
|
|
19
|
+
privy_idempotency_key: String,
|
|
20
|
+
request_options: Privy::RequestOptions::OrHash
|
|
21
|
+
).returns(Privy::SwapActionResponse)
|
|
22
|
+
end
|
|
23
|
+
def execute(
|
|
24
|
+
# Path param: ID of the wallet.
|
|
25
|
+
wallet_id,
|
|
26
|
+
# Body param: Amount in base units (e.g., wei for ETH). Must be a non-negative
|
|
27
|
+
# integer string.
|
|
28
|
+
base_amount:,
|
|
29
|
+
# Body param: The output side of a swap execution request.
|
|
30
|
+
destination:,
|
|
31
|
+
# Body param: The input side of a swap request, including token and chain.
|
|
32
|
+
source:,
|
|
33
|
+
# Body param: Whether the amount refers to the input token or output token.
|
|
34
|
+
amount_type: nil,
|
|
35
|
+
# Body param: Total fees assessed on a transfer, in BPS
|
|
36
|
+
fee_configuration: nil,
|
|
37
|
+
# Body param: Maximum slippage tolerance in basis points (e.g., 50 for 0.5%).
|
|
38
|
+
slippage_bps: nil,
|
|
39
|
+
# Header param: Request authorization signature. If multiple signatures are
|
|
40
|
+
# required, they should be comma separated.
|
|
41
|
+
privy_authorization_signature: nil,
|
|
42
|
+
# Header param: Idempotency keys ensure API requests are executed only once within
|
|
43
|
+
# a 24-hour window.
|
|
44
|
+
privy_idempotency_key: nil,
|
|
45
|
+
request_options: {}
|
|
46
|
+
)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Get a price quote for swapping tokens within a wallet.
|
|
50
|
+
sig do
|
|
51
|
+
params(
|
|
52
|
+
wallet_id: String,
|
|
53
|
+
base_amount: String,
|
|
54
|
+
destination: Privy::SwapQuoteDestination::OrHash,
|
|
55
|
+
source: Privy::SwapSource::OrHash,
|
|
56
|
+
amount_type: Privy::AmountType::OrSymbol,
|
|
57
|
+
fee_configuration: Privy::FeeConfiguration::OrHash,
|
|
58
|
+
slippage_bps: Float,
|
|
59
|
+
privy_authorization_signature: String,
|
|
60
|
+
request_options: Privy::RequestOptions::OrHash
|
|
61
|
+
).returns(Privy::SwapQuoteResponse)
|
|
62
|
+
end
|
|
63
|
+
def quote(
|
|
64
|
+
# Path param: ID of the wallet.
|
|
65
|
+
wallet_id,
|
|
66
|
+
# Body param: Amount in base units (e.g., wei for ETH). Must be a non-negative
|
|
67
|
+
# integer string.
|
|
68
|
+
base_amount:,
|
|
69
|
+
# Body param: The output side of a swap quote request.
|
|
70
|
+
destination:,
|
|
71
|
+
# Body param: The input side of a swap request, including token and chain.
|
|
72
|
+
source:,
|
|
73
|
+
# Body param: Whether the amount refers to the input token or output token.
|
|
74
|
+
amount_type: nil,
|
|
75
|
+
# Body param: Total fees assessed on a transfer, in BPS
|
|
76
|
+
fee_configuration: nil,
|
|
77
|
+
# Body param: Maximum slippage tolerance in basis points (e.g., 50 for 0.5%). If
|
|
78
|
+
# omitted, auto-slippage is used.
|
|
79
|
+
slippage_bps: nil,
|
|
80
|
+
# Header param: Request authorization signature. If multiple signatures are
|
|
81
|
+
# required, they should be comma separated.
|
|
82
|
+
privy_authorization_signature: nil,
|
|
83
|
+
request_options: {}
|
|
84
|
+
)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# @api private
|
|
88
|
+
sig { params(client: Privy::Client).returns(T.attached_class) }
|
|
89
|
+
def self.new(client:)
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
@@ -14,6 +14,10 @@ module Privy
|
|
|
14
14
|
sig { returns(Privy::Resources::Wallets::Balance) }
|
|
15
15
|
attr_reader :balance
|
|
16
16
|
|
|
17
|
+
# Operations for swapping tokens within wallets
|
|
18
|
+
sig { returns(Privy::Resources::Wallets::Swap) }
|
|
19
|
+
attr_reader :swap
|
|
20
|
+
|
|
17
21
|
# Creates a new wallet on the requested chain and for the requested owner.
|
|
18
22
|
sig do
|
|
19
23
|
params(
|
|
@@ -249,7 +253,8 @@ module Privy
|
|
|
249
253
|
)
|
|
250
254
|
end
|
|
251
255
|
|
|
252
|
-
#
|
|
256
|
+
# Exchange a user JWT for a session key authorized to act on the user's wallets.
|
|
257
|
+
# Returns the encrypted authorization key and the list of wallets it can access.
|
|
253
258
|
sig do
|
|
254
259
|
params(
|
|
255
260
|
encryption_type:
|
|
@@ -272,7 +277,9 @@ module Privy
|
|
|
272
277
|
)
|
|
273
278
|
end
|
|
274
279
|
|
|
275
|
-
# Create wallets with
|
|
280
|
+
# Create one or more wallets associated with a recovery user, so the user can
|
|
281
|
+
# later regain wallet access via the linked accounts. Deprecated; prefer the
|
|
282
|
+
# standard wallet creation flow combined with a separate recovery setup.
|
|
276
283
|
sig do
|
|
277
284
|
params(
|
|
278
285
|
primary_signer:
|
data/sig/privy/client.rbs
CHANGED
|
@@ -43,6 +43,8 @@ module Privy
|
|
|
43
43
|
|
|
44
44
|
attr_reader client_auth: Privy::Resources::ClientAuth
|
|
45
45
|
|
|
46
|
+
attr_reader onramps: Privy::Resources::Onramps
|
|
47
|
+
|
|
46
48
|
attr_reader funding: Privy::Resources::Funding
|
|
47
49
|
|
|
48
50
|
attr_reader organizations: Privy::Resources::Organizations
|
|
@@ -51,6 +53,8 @@ module Privy
|
|
|
51
53
|
|
|
52
54
|
attr_reader shared: Privy::Resources::Shared
|
|
53
55
|
|
|
56
|
+
attr_reader oauth: Privy::Resources::OAuth
|
|
57
|
+
|
|
54
58
|
attr_reader wallet_actions: Privy::Resources::WalletActions
|
|
55
59
|
|
|
56
60
|
attr_reader yield_: Privy::Resources::Yield
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module Privy
|
|
2
|
+
module Models
|
|
3
|
+
type create_link_auth_intent_input = { email: String }
|
|
4
|
+
|
|
5
|
+
class CreateLinkAuthIntentInput < Privy::Internal::Type::BaseModel
|
|
6
|
+
attr_reader email: String?
|
|
7
|
+
|
|
8
|
+
def email=: (String) -> String
|
|
9
|
+
|
|
10
|
+
def initialize: (?email: String) -> void
|
|
11
|
+
|
|
12
|
+
def to_hash: -> { email: String }
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module Privy
|
|
2
|
+
module Models
|
|
3
|
+
type create_link_auth_intent_response =
|
|
4
|
+
{ data: Privy::Models::CreateLinkAuthIntentResponse::data }
|
|
5
|
+
|
|
6
|
+
class CreateLinkAuthIntentResponse < Privy::Internal::Type::BaseModel
|
|
7
|
+
attr_accessor data: Privy::Models::CreateLinkAuthIntentResponse::data
|
|
8
|
+
|
|
9
|
+
def initialize: (
|
|
10
|
+
data: Privy::Models::CreateLinkAuthIntentResponse::data
|
|
11
|
+
) -> void
|
|
12
|
+
|
|
13
|
+
def to_hash: -> {
|
|
14
|
+
data: Privy::Models::CreateLinkAuthIntentResponse::data
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
type data = Privy::LinkAuthIntentCreated | Privy::LinkAuthIntentNoAccount
|
|
18
|
+
|
|
19
|
+
module Data
|
|
20
|
+
extend Privy::Internal::Type::Union
|
|
21
|
+
|
|
22
|
+
def self?.variants: -> ::Array[Privy::Models::CreateLinkAuthIntentResponse::data]
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module Privy
|
|
2
|
+
module Models
|
|
3
|
+
type create_stripe_onramp_session_input =
|
|
4
|
+
{
|
|
5
|
+
environment: Privy::Models::fiat_onramp_environment,
|
|
6
|
+
session: Privy::OnrampSessionParams,
|
|
7
|
+
session_id: String
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
class CreateStripeOnrampSessionInput < Privy::Internal::Type::BaseModel
|
|
11
|
+
attr_accessor environment: Privy::Models::fiat_onramp_environment
|
|
12
|
+
|
|
13
|
+
attr_accessor session: Privy::OnrampSessionParams
|
|
14
|
+
|
|
15
|
+
attr_accessor session_id: String
|
|
16
|
+
|
|
17
|
+
def initialize: (
|
|
18
|
+
environment: Privy::Models::fiat_onramp_environment,
|
|
19
|
+
session: Privy::OnrampSessionParams,
|
|
20
|
+
session_id: String
|
|
21
|
+
) -> void
|
|
22
|
+
|
|
23
|
+
def to_hash: -> {
|
|
24
|
+
environment: Privy::Models::fiat_onramp_environment,
|
|
25
|
+
session: Privy::OnrampSessionParams,
|
|
26
|
+
session_id: String
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module Privy
|
|
2
|
+
module Models
|
|
3
|
+
type create_stripe_onramp_session_response =
|
|
4
|
+
{ id: String, session_id: String }
|
|
5
|
+
|
|
6
|
+
class CreateStripeOnrampSessionResponse < Privy::Internal::Type::BaseModel
|
|
7
|
+
attr_accessor id: String
|
|
8
|
+
|
|
9
|
+
attr_accessor session_id: String
|
|
10
|
+
|
|
11
|
+
def initialize: (id: String, session_id: String) -> void
|
|
12
|
+
|
|
13
|
+
def to_hash: -> { id: String, session_id: String }
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
module Privy
|
|
2
|
+
module Models
|
|
3
|
+
type device_authorization_response =
|
|
4
|
+
{
|
|
5
|
+
device_code: String,
|
|
6
|
+
expires_in: Integer,
|
|
7
|
+
interval: Integer,
|
|
8
|
+
user_code: String,
|
|
9
|
+
verification_uri: String,
|
|
10
|
+
verification_uri_complete: String
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class DeviceAuthorizationResponse < Privy::Internal::Type::BaseModel
|
|
14
|
+
attr_accessor device_code: String
|
|
15
|
+
|
|
16
|
+
attr_accessor expires_in: Integer
|
|
17
|
+
|
|
18
|
+
attr_accessor interval: Integer
|
|
19
|
+
|
|
20
|
+
attr_accessor user_code: String
|
|
21
|
+
|
|
22
|
+
attr_accessor verification_uri: String
|
|
23
|
+
|
|
24
|
+
attr_accessor verification_uri_complete: String
|
|
25
|
+
|
|
26
|
+
def initialize: (
|
|
27
|
+
device_code: String,
|
|
28
|
+
expires_in: Integer,
|
|
29
|
+
interval: Integer,
|
|
30
|
+
user_code: String,
|
|
31
|
+
verification_uri: String,
|
|
32
|
+
verification_uri_complete: String
|
|
33
|
+
) -> void
|
|
34
|
+
|
|
35
|
+
def to_hash: -> {
|
|
36
|
+
device_code: String,
|
|
37
|
+
expires_in: Integer,
|
|
38
|
+
interval: Integer,
|
|
39
|
+
user_code: String,
|
|
40
|
+
verification_uri: String,
|
|
41
|
+
verification_uri_complete: String
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
module Privy
|
|
2
|
+
module Models
|
|
3
|
+
type earn_incentive_reward_entry =
|
|
4
|
+
{
|
|
5
|
+
amount_claimed: String,
|
|
6
|
+
amount_unclaimed: String,
|
|
7
|
+
token_address: String,
|
|
8
|
+
token_symbol: String,
|
|
9
|
+
token_decimals: Integer
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
class EarnIncentiveRewardEntry < Privy::Internal::Type::BaseModel
|
|
13
|
+
attr_accessor amount_claimed: String
|
|
14
|
+
|
|
15
|
+
attr_accessor amount_unclaimed: String
|
|
16
|
+
|
|
17
|
+
attr_accessor token_address: String
|
|
18
|
+
|
|
19
|
+
attr_accessor token_symbol: String
|
|
20
|
+
|
|
21
|
+
attr_reader token_decimals: Integer?
|
|
22
|
+
|
|
23
|
+
def token_decimals=: (Integer) -> Integer
|
|
24
|
+
|
|
25
|
+
def initialize: (
|
|
26
|
+
amount_claimed: String,
|
|
27
|
+
amount_unclaimed: String,
|
|
28
|
+
token_address: String,
|
|
29
|
+
token_symbol: String,
|
|
30
|
+
?token_decimals: Integer
|
|
31
|
+
) -> void
|
|
32
|
+
|
|
33
|
+
def to_hash: -> {
|
|
34
|
+
amount_claimed: String,
|
|
35
|
+
amount_unclaimed: String,
|
|
36
|
+
token_address: String,
|
|
37
|
+
token_symbol: String,
|
|
38
|
+
token_decimals: Integer
|
|
39
|
+
}
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Privy
|
|
2
|
+
module Models
|
|
3
|
+
type earn_incentive_rewards_query = { chain: String }
|
|
4
|
+
|
|
5
|
+
class EarnIncentiveRewardsQuery < Privy::Internal::Type::BaseModel
|
|
6
|
+
attr_accessor chain: String
|
|
7
|
+
|
|
8
|
+
def initialize: (chain: String) -> void
|
|
9
|
+
|
|
10
|
+
def to_hash: -> { chain: String }
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module Privy
|
|
2
|
+
module Models
|
|
3
|
+
type earn_incentive_rewards_response =
|
|
4
|
+
{ rewards: ::Array[Privy::EarnIncentiveRewardEntry] }
|
|
5
|
+
|
|
6
|
+
class EarnIncentiveRewardsResponse < Privy::Internal::Type::BaseModel
|
|
7
|
+
attr_accessor rewards: ::Array[Privy::EarnIncentiveRewardEntry]
|
|
8
|
+
|
|
9
|
+
def initialize: (
|
|
10
|
+
rewards: ::Array[Privy::EarnIncentiveRewardEntry]
|
|
11
|
+
) -> void
|
|
12
|
+
|
|
13
|
+
def to_hash: -> { rewards: ::Array[Privy::EarnIncentiveRewardEntry] }
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Privy
|
|
2
|
+
module Models
|
|
3
|
+
type exchange_stripe_tokens_input =
|
|
4
|
+
{ auth_intent_id: String, crypto_customer_id: String }
|
|
5
|
+
|
|
6
|
+
class ExchangeStripeTokensInput < Privy::Internal::Type::BaseModel
|
|
7
|
+
attr_accessor auth_intent_id: String
|
|
8
|
+
|
|
9
|
+
attr_accessor crypto_customer_id: String
|
|
10
|
+
|
|
11
|
+
def initialize: (
|
|
12
|
+
auth_intent_id: String,
|
|
13
|
+
crypto_customer_id: String
|
|
14
|
+
) -> void
|
|
15
|
+
|
|
16
|
+
def to_hash: -> { auth_intent_id: String, crypto_customer_id: String }
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Privy
|
|
2
|
+
module Models
|
|
3
|
+
type exchange_stripe_tokens_response = { crypto_customer_id: String }
|
|
4
|
+
|
|
5
|
+
class ExchangeStripeTokensResponse < Privy::Internal::Type::BaseModel
|
|
6
|
+
attr_accessor crypto_customer_id: String
|
|
7
|
+
|
|
8
|
+
def initialize: (crypto_customer_id: String) -> void
|
|
9
|
+
|
|
10
|
+
def to_hash: -> { crypto_customer_id: String }
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|