coinbase-sdk 0.13.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/coinbase/address/wallet_address.rb +6 -3
- data/lib/coinbase/client/api/addresses_api.rb +1 -1
- data/lib/coinbase/client/api/assets_api.rb +1 -1
- data/lib/coinbase/client/api/balance_history_api.rb +1 -1
- data/lib/coinbase/client/api/contract_events_api.rb +1 -1
- data/lib/coinbase/client/api/contract_invocations_api.rb +1 -1
- data/lib/coinbase/client/api/external_addresses_api.rb +1 -1
- data/lib/coinbase/client/api/fund_api.rb +1 -1
- data/lib/coinbase/client/api/mpc_wallet_stake_api.rb +1 -1
- data/lib/coinbase/client/api/networks_api.rb +1 -1
- data/lib/coinbase/client/api/onchain_identity_api.rb +1 -1
- data/lib/coinbase/client/api/reputation_api.rb +1 -1
- data/lib/coinbase/client/api/server_signers_api.rb +1 -1
- data/lib/coinbase/client/api/smart_contracts_api.rb +1 -1
- data/lib/coinbase/client/api/stake_api.rb +1 -1
- data/lib/coinbase/client/api/trades_api.rb +1 -1
- data/lib/coinbase/client/api/transaction_history_api.rb +1 -1
- data/lib/coinbase/client/api/transfers_api.rb +10 -10
- data/lib/coinbase/client/api/users_api.rb +1 -1
- data/lib/coinbase/client/api/wallets_api.rb +1 -1
- data/lib/coinbase/client/api/webhooks_api.rb +1 -1
- data/lib/coinbase/client/api_client.rb +1 -1
- data/lib/coinbase/client/api_error.rb +1 -1
- data/lib/coinbase/client/configuration.rb +1 -1
- data/lib/coinbase/client/models/address.rb +1 -1
- data/lib/coinbase/client/models/address_balance_list.rb +1 -1
- data/lib/coinbase/client/models/address_historical_balance_list.rb +1 -1
- data/lib/coinbase/client/models/address_list.rb +1 -1
- data/lib/coinbase/client/models/address_reputation.rb +1 -1
- data/lib/coinbase/client/models/address_reputation_metadata.rb +1 -1
- data/lib/coinbase/client/models/address_transaction_list.rb +1 -1
- data/lib/coinbase/client/models/asset.rb +1 -1
- data/lib/coinbase/client/models/balance.rb +1 -1
- data/lib/coinbase/client/models/broadcast_contract_invocation_request.rb +1 -1
- data/lib/coinbase/client/models/broadcast_external_transfer_request.rb +2 -2
- data/lib/coinbase/client/models/broadcast_staking_operation_request.rb +1 -1
- data/lib/coinbase/client/models/broadcast_trade_request.rb +1 -1
- data/lib/coinbase/client/models/broadcast_transfer_request.rb +222 -0
- data/lib/coinbase/client/models/build_staking_operation_request.rb +1 -1
- data/lib/coinbase/client/models/contract_event.rb +1 -1
- data/lib/coinbase/client/models/contract_event_list.rb +1 -1
- data/lib/coinbase/client/models/contract_invocation.rb +1 -1
- data/lib/coinbase/client/models/contract_invocation_list.rb +1 -1
- data/lib/coinbase/client/models/create_address_request.rb +1 -1
- data/lib/coinbase/client/models/create_contract_invocation_request.rb +1 -1
- data/lib/coinbase/client/models/create_external_transfer_request.rb +15 -5
- data/lib/coinbase/client/models/create_fund_operation_request.rb +1 -1
- data/lib/coinbase/client/models/create_fund_quote_request.rb +1 -1
- data/lib/coinbase/client/models/create_payload_signature_request.rb +1 -1
- data/lib/coinbase/client/models/create_server_signer_request.rb +1 -1
- data/lib/coinbase/client/models/create_smart_contract_request.rb +1 -1
- data/lib/coinbase/client/models/create_staking_operation_request.rb +1 -1
- data/lib/coinbase/client/models/create_trade_request.rb +1 -1
- data/lib/coinbase/client/models/create_transfer_request.rb +15 -5
- data/lib/coinbase/client/models/create_wallet_request.rb +1 -1
- data/lib/coinbase/client/models/create_wallet_request_wallet.rb +1 -1
- data/lib/coinbase/client/models/create_wallet_webhook_request.rb +1 -1
- data/lib/coinbase/client/models/create_webhook_request.rb +1 -1
- data/lib/coinbase/client/models/crypto_amount.rb +1 -1
- data/lib/coinbase/client/models/deploy_smart_contract_request.rb +1 -1
- data/lib/coinbase/client/models/erc20_transfer_event.rb +1 -1
- data/lib/coinbase/client/models/erc721_transfer_event.rb +1 -1
- data/lib/coinbase/client/models/error.rb +1 -1
- data/lib/coinbase/client/models/ethereum_token_transfer.rb +1 -1
- data/lib/coinbase/client/models/ethereum_transaction.rb +1 -1
- data/lib/coinbase/client/models/ethereum_transaction_access.rb +1 -1
- data/lib/coinbase/client/models/ethereum_transaction_access_list.rb +1 -1
- data/lib/coinbase/client/models/ethereum_transaction_flattened_trace.rb +1 -1
- data/lib/coinbase/client/models/ethereum_validator_metadata.rb +1 -1
- data/lib/coinbase/client/models/faucet_transaction.rb +1 -1
- data/lib/coinbase/client/models/feature_set.rb +1 -1
- data/lib/coinbase/client/models/fetch_historical_staking_balances200_response.rb +1 -1
- data/lib/coinbase/client/models/fetch_staking_rewards200_response.rb +1 -1
- data/lib/coinbase/client/models/fetch_staking_rewards_request.rb +1 -1
- data/lib/coinbase/client/models/fiat_amount.rb +1 -1
- data/lib/coinbase/client/models/fund_operation.rb +1 -1
- data/lib/coinbase/client/models/fund_operation_fees.rb +1 -1
- data/lib/coinbase/client/models/fund_operation_list.rb +1 -1
- data/lib/coinbase/client/models/fund_quote.rb +1 -1
- data/lib/coinbase/client/models/get_staking_context_request.rb +1 -1
- data/lib/coinbase/client/models/historical_balance.rb +1 -1
- data/lib/coinbase/client/models/multi_token_contract_options.rb +1 -1
- data/lib/coinbase/client/models/network.rb +1 -1
- data/lib/coinbase/client/models/network_identifier.rb +1 -1
- data/lib/coinbase/client/models/nft_contract_options.rb +1 -1
- data/lib/coinbase/client/models/onchain_name.rb +1 -1
- data/lib/coinbase/client/models/onchain_name_list.rb +1 -1
- data/lib/coinbase/client/models/payload_signature.rb +1 -1
- data/lib/coinbase/client/models/payload_signature_list.rb +1 -1
- data/lib/coinbase/client/models/read_contract_request.rb +1 -1
- data/lib/coinbase/client/models/register_smart_contract_request.rb +1 -1
- data/lib/coinbase/client/models/seed_creation_event.rb +1 -1
- data/lib/coinbase/client/models/seed_creation_event_result.rb +1 -1
- data/lib/coinbase/client/models/server_signer.rb +1 -1
- data/lib/coinbase/client/models/server_signer_event.rb +1 -1
- data/lib/coinbase/client/models/server_signer_event_event.rb +1 -1
- data/lib/coinbase/client/models/server_signer_event_list.rb +1 -1
- data/lib/coinbase/client/models/server_signer_list.rb +1 -1
- data/lib/coinbase/client/models/signature_creation_event.rb +1 -1
- data/lib/coinbase/client/models/signature_creation_event_result.rb +1 -1
- data/lib/coinbase/client/models/signed_voluntary_exit_message_metadata.rb +1 -1
- data/lib/coinbase/client/models/smart_contract.rb +1 -1
- data/lib/coinbase/client/models/smart_contract_activity_event.rb +1 -1
- data/lib/coinbase/client/models/smart_contract_list.rb +1 -1
- data/lib/coinbase/client/models/smart_contract_options.rb +1 -1
- data/lib/coinbase/client/models/smart_contract_type.rb +1 -1
- data/lib/coinbase/client/models/solidity_value.rb +1 -1
- data/lib/coinbase/client/models/sponsored_send.rb +1 -1
- data/lib/coinbase/client/models/staking_balance.rb +1 -1
- data/lib/coinbase/client/models/staking_context.rb +1 -1
- data/lib/coinbase/client/models/staking_context_context.rb +1 -1
- data/lib/coinbase/client/models/staking_operation.rb +1 -1
- data/lib/coinbase/client/models/staking_operation_metadata.rb +1 -1
- data/lib/coinbase/client/models/staking_reward.rb +1 -1
- data/lib/coinbase/client/models/staking_reward_format.rb +1 -1
- data/lib/coinbase/client/models/staking_reward_usd_value.rb +1 -1
- data/lib/coinbase/client/models/token_contract_options.rb +1 -1
- data/lib/coinbase/client/models/token_transfer_type.rb +1 -1
- data/lib/coinbase/client/models/trade.rb +1 -1
- data/lib/coinbase/client/models/trade_list.rb +1 -1
- data/lib/coinbase/client/models/transaction.rb +1 -1
- data/lib/coinbase/client/models/transaction_content.rb +1 -1
- data/lib/coinbase/client/models/transaction_type.rb +1 -1
- data/lib/coinbase/client/models/transfer.rb +1 -1
- data/lib/coinbase/client/models/transfer_list.rb +1 -1
- data/lib/coinbase/client/models/update_smart_contract_request.rb +1 -1
- data/lib/coinbase/client/models/update_webhook_request.rb +1 -1
- data/lib/coinbase/client/models/user.rb +1 -1
- data/lib/coinbase/client/models/validator.rb +1 -1
- data/lib/coinbase/client/models/validator_details.rb +1 -1
- data/lib/coinbase/client/models/validator_list.rb +1 -1
- data/lib/coinbase/client/models/validator_status.rb +1 -1
- data/lib/coinbase/client/models/wallet.rb +1 -1
- data/lib/coinbase/client/models/wallet_list.rb +1 -1
- data/lib/coinbase/client/models/webhook.rb +1 -1
- data/lib/coinbase/client/models/webhook_event_filter.rb +1 -1
- data/lib/coinbase/client/models/webhook_event_type.rb +1 -1
- data/lib/coinbase/client/models/webhook_event_type_filter.rb +1 -1
- data/lib/coinbase/client/models/webhook_list.rb +1 -1
- data/lib/coinbase/client/models/webhook_smart_contract_event_filter.rb +1 -1
- data/lib/coinbase/client/models/webhook_wallet_activity_filter.rb +1 -1
- data/lib/coinbase/client/version.rb +1 -1
- data/lib/coinbase/client.rb +2 -1
- data/lib/coinbase/transfer.rb +24 -2
- data/lib/coinbase/version.rb +1 -1
- metadata +4 -3
data/lib/coinbase/client.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 0.0.1-alpha
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
Generator version: 7.9.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -30,6 +30,7 @@ Coinbase::Client.autoload :BroadcastContractInvocationRequest, 'coinbase/client/
|
|
30
30
|
Coinbase::Client.autoload :BroadcastExternalTransferRequest, 'coinbase/client/models/broadcast_external_transfer_request'
|
31
31
|
Coinbase::Client.autoload :BroadcastStakingOperationRequest, 'coinbase/client/models/broadcast_staking_operation_request'
|
32
32
|
Coinbase::Client.autoload :BroadcastTradeRequest, 'coinbase/client/models/broadcast_trade_request'
|
33
|
+
Coinbase::Client.autoload :BroadcastTransferRequest, 'coinbase/client/models/broadcast_transfer_request'
|
33
34
|
Coinbase::Client.autoload :BuildStakingOperationRequest, 'coinbase/client/models/build_staking_operation_request'
|
34
35
|
Coinbase::Client.autoload :ContractEvent, 'coinbase/client/models/contract_event'
|
35
36
|
Coinbase::Client.autoload :ContractEventList, 'coinbase/client/models/contract_event_list'
|
data/lib/coinbase/transfer.rb
CHANGED
@@ -22,9 +22,24 @@ module Coinbase
|
|
22
22
|
# If the destination is a String, it uses it as the Address ID.
|
23
23
|
# @param network [Coinbase::Network, Symbol] The Network or Network ID of the Asset
|
24
24
|
# @param wallet_id [String] The Wallet ID of the sending Wallet
|
25
|
+
# @param gasless [Boolean] Whether the transfer should be gasless. Defaults to false.
|
26
|
+
# @param skip_batching [Boolean] When true, the Transfer will be submitted immediately.
|
27
|
+
# Otherwise, the Transfer will be batched. Defaults to false.
|
28
|
+
# Note: requires gasless option to be set to true.
|
25
29
|
# @return [Transfer] The new pending Transfer object
|
26
30
|
# @raise [Coinbase::ApiError] If the Transfer fails
|
27
|
-
def create(
|
31
|
+
def create(
|
32
|
+
address_id:,
|
33
|
+
amount:,
|
34
|
+
asset_id:,
|
35
|
+
destination:,
|
36
|
+
network:,
|
37
|
+
wallet_id:,
|
38
|
+
gasless: false,
|
39
|
+
skip_batching: false
|
40
|
+
)
|
41
|
+
ensure_can_skip_batching!(gasless, skip_batching)
|
42
|
+
|
28
43
|
network = Coinbase::Network.from_id(network)
|
29
44
|
asset = network.get_asset(asset_id)
|
30
45
|
|
@@ -37,7 +52,8 @@ module Coinbase
|
|
37
52
|
asset_id: asset.primary_denomination.to_s,
|
38
53
|
destination: Coinbase::Destination.new(destination, network: network).address_id,
|
39
54
|
network_id: network.normalized_id,
|
40
|
-
gasless: gasless
|
55
|
+
gasless: gasless,
|
56
|
+
skip_batching: skip_batching
|
41
57
|
}
|
42
58
|
)
|
43
59
|
end
|
@@ -66,6 +82,12 @@ module Coinbase
|
|
66
82
|
def fetch_page(wallet_id, address_id, page)
|
67
83
|
transfers_api.list_transfers(wallet_id, address_id, { limit: DEFAULT_PAGE_LIMIT, page: page })
|
68
84
|
end
|
85
|
+
|
86
|
+
def ensure_can_skip_batching!(gasless, skip_batching)
|
87
|
+
return unless skip_batching && !gasless
|
88
|
+
|
89
|
+
raise ArgumentError, 'Cannot skip batching without gasless option set to true'
|
90
|
+
end
|
69
91
|
end
|
70
92
|
|
71
93
|
# Returns a new Transfer object. Do not use this method directly. Instead, use Wallet#transfer or
|
data/lib/coinbase/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coinbase-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuga Cohler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bigdecimal
|
@@ -314,6 +314,7 @@ files:
|
|
314
314
|
- lib/coinbase/client/models/broadcast_external_transfer_request.rb
|
315
315
|
- lib/coinbase/client/models/broadcast_staking_operation_request.rb
|
316
316
|
- lib/coinbase/client/models/broadcast_trade_request.rb
|
317
|
+
- lib/coinbase/client/models/broadcast_transfer_request.rb
|
317
318
|
- lib/coinbase/client/models/build_staking_operation_request.rb
|
318
319
|
- lib/coinbase/client/models/contract_event.rb
|
319
320
|
- lib/coinbase/client/models/contract_event_list.rb
|
@@ -461,7 +462,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
461
462
|
requirements:
|
462
463
|
- - ">="
|
463
464
|
- !ruby/object:Gem::Version
|
464
|
-
version:
|
465
|
+
version: 3.0.0
|
465
466
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
466
467
|
requirements:
|
467
468
|
- - ">="
|