From 939d0bca369258232e043e19c7091ebc7c5d272b Mon Sep 17 00:00:00 2001 From: Ethan Konkolowicz Date: Fri, 20 Feb 2026 17:19:20 -0500 Subject: [PATCH] chore: release versioning and changelog gen --- CHANGELOG.md | 7 +- turnkey_client/lib/turnkey_client.rb | 7 + .../turnkey_client/api/broadcasting_api.rb | 24 +- .../lib/turnkey_client/api/wallets_api.rb | 116 ++++++++ .../turnkey_client/models/asset_balance.rb | 255 ++++++++++++++++ .../models/asset_balance_display.rb | 216 ++++++++++++++ .../turnkey_client/models/asset_metadata.rb | 246 ++++++++++++++++ .../models/create_tvc_deployment_intent.rb | 32 +- .../models/eth_send_raw_transaction_intent.rb | 4 +- .../models/get_nonces_request.rb | 36 ++- .../get_wallet_address_balances_request.rb | 275 ++++++++++++++++++ .../get_wallet_address_balances_response.rb | 208 +++++++++++++ .../models/list_supported_assets_request.rb | 260 +++++++++++++++++ .../models/list_supported_assets_response.rb | 208 +++++++++++++ .../models/upsert_gas_usage_config_intent.rb | 19 +- turnkey_client/lib/turnkey_client/version.rb | 2 +- turnkey_client_inputs/config.json | 2 +- turnkey_client_inputs/public_api.swagger.json | 236 ++++++++++++++- 18 files changed, 2118 insertions(+), 35 deletions(-) create mode 100644 turnkey_client/lib/turnkey_client/models/asset_balance.rb create mode 100644 turnkey_client/lib/turnkey_client/models/asset_balance_display.rb create mode 100644 turnkey_client/lib/turnkey_client/models/asset_metadata.rb create mode 100644 turnkey_client/lib/turnkey_client/models/get_wallet_address_balances_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/get_wallet_address_balances_response.rb create mode 100644 turnkey_client/lib/turnkey_client/models/list_supported_assets_request.rb create mode 100644 turnkey_client/lib/turnkey_client/models/list_supported_assets_response.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 2800b39..a7afc98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.0.18 -- 2026-02-20 + +### Patch Changes +- Synced with mono v2026.2.5 + ## 0.0.17 -- 2026-01-30 ### Patch Changes @@ -11,4 +16,4 @@ ## 0.0.16 -- 2026-01-29 -Version yanked because the resulting gem was too large in size (81MB) +Version yanked because the resulting gem was too large in size (81MB) \ No newline at end of file diff --git a/turnkey_client/lib/turnkey_client.rb b/turnkey_client/lib/turnkey_client.rb index 0107a28..36d7da8 100644 --- a/turnkey_client/lib/turnkey_client.rb +++ b/turnkey_client/lib/turnkey_client.rb @@ -37,6 +37,9 @@ require 'turnkey_client/models/app_proof' require 'turnkey_client/models/approve_activity_intent' require 'turnkey_client/models/approve_activity_request' +require 'turnkey_client/models/asset_balance' +require 'turnkey_client/models/asset_balance_display' +require 'turnkey_client/models/asset_metadata' require 'turnkey_client/models/attestation' require 'turnkey_client/models/authenticator' require 'turnkey_client/models/authenticator_attestation_response' @@ -290,6 +293,8 @@ require 'turnkey_client/models/get_wallet_account_response' require 'turnkey_client/models/get_wallet_accounts_request' require 'turnkey_client/models/get_wallet_accounts_response' +require 'turnkey_client/models/get_wallet_address_balances_request' +require 'turnkey_client/models/get_wallet_address_balances_response' require 'turnkey_client/models/get_wallet_request' require 'turnkey_client/models/get_wallet_response' require 'turnkey_client/models/get_wallets_request' @@ -334,6 +339,8 @@ require 'turnkey_client/models/list_oauth2_credentials_response' require 'turnkey_client/models/list_private_key_tags_request' require 'turnkey_client/models/list_private_key_tags_response' +require 'turnkey_client/models/list_supported_assets_request' +require 'turnkey_client/models/list_supported_assets_response' require 'turnkey_client/models/list_user_tags_request' require 'turnkey_client/models/list_user_tags_response' require 'turnkey_client/models/mnemonic_language' diff --git a/turnkey_client/lib/turnkey_client/api/broadcasting_api.rb b/turnkey_client/lib/turnkey_client/api/broadcasting_api.rb index 5f96544..bcff23c 100644 --- a/turnkey_client/lib/turnkey_client/api/broadcasting_api.rb +++ b/turnkey_client/lib/turnkey_client/api/broadcasting_api.rb @@ -15,8 +15,8 @@ class BroadcastingApi def initialize(api_client = ApiClient.default) @api_client = api_client end - # Submit a transaction intent for broadcasting. - # Submit a transaction intent describing a transaction you would like to broadcast. + # Broadcast EVM transaction + # Submit a transaction intent describing an EVM transaction you would like to broadcast. # @param body # @param [Hash] opts the optional parameters # @return [ActivityResponse] @@ -25,8 +25,8 @@ def eth_send_transaction(body, opts = {}) data end - # Submit a transaction intent for broadcasting. - # Submit a transaction intent describing a transaction you would like to broadcast. + # Broadcast EVM transaction + # Submit a transaction intent describing an EVM transaction you would like to broadcast. # @param body # @param [Hash] opts the optional parameters # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers @@ -73,7 +73,7 @@ def eth_send_transaction_with_http_info(body, opts = {}) end return data, status_code, headers end - # Get gas usage and limits. + # Get gas usage # Get gas usage and gas limits for either the parent organization or a sub-organization. # @param body # @param [Hash] opts the optional parameters @@ -83,7 +83,7 @@ def get_gas_usage(body, opts = {}) data end - # Get gas usage and limits. + # Get gas usage # Get gas usage and gas limits for either the parent organization or a sub-organization. # @param body # @param [Hash] opts the optional parameters @@ -131,7 +131,7 @@ def get_gas_usage_with_http_info(body, opts = {}) end return data, status_code, headers end - # Get nonces for an address. + # Get nonces # Get nonce values for an address on a given network. Can fetch the standard on-chain nonce and/or the gas station nonce used for sponsored transactions. # @param body # @param [Hash] opts the optional parameters @@ -141,7 +141,7 @@ def get_nonces(body, opts = {}) data end - # Get nonces for an address. + # Get nonces # Get nonce values for an address on a given network. Can fetch the standard on-chain nonce and/or the gas station nonce used for sponsored transactions. # @param body # @param [Hash] opts the optional parameters @@ -189,8 +189,8 @@ def get_nonces_with_http_info(body, opts = {}) end return data, status_code, headers end - # Submit a transaction intent for broadcasting. - # Submit a transaction intent describing a transaction you would like to broadcast. + # Broadcast SVM transaction + # Submit a transaction intent describing an SVM transaction you would like to broadcast. # @param body # @param [Hash] opts the optional parameters # @return [ActivityResponse] @@ -199,8 +199,8 @@ def sol_send_transaction(body, opts = {}) data end - # Submit a transaction intent for broadcasting. - # Submit a transaction intent describing a transaction you would like to broadcast. + # Broadcast SVM transaction + # Submit a transaction intent describing an SVM transaction you would like to broadcast. # @param body # @param [Hash] opts the optional parameters # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers diff --git a/turnkey_client/lib/turnkey_client/api/wallets_api.rb b/turnkey_client/lib/turnkey_client/api/wallets_api.rb index f5097f6..167851d 100644 --- a/turnkey_client/lib/turnkey_client/api/wallets_api.rb +++ b/turnkey_client/lib/turnkey_client/api/wallets_api.rb @@ -537,6 +537,64 @@ def get_wallet_accounts_with_http_info(body, opts = {}) end return data, status_code, headers end + # Get balances + # Get balances of supported assets for an address on the specified network. Only non-zero balances are returned. This feature is in beta - please contact support for access. + # @param body + # @param [Hash] opts the optional parameters + # @return [GetWalletAddressBalancesResponse] + def get_wallet_address_balances(body, opts = {}) + data, _status_code, _headers = get_wallet_address_balances_with_http_info(body, opts) + data + end + + # Get balances + # Get balances of supported assets for an address on the specified network. Only non-zero balances are returned. This feature is in beta - please contact support for access. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(GetWalletAddressBalancesResponse, Integer, Hash)>] GetWalletAddressBalancesResponse data, response status code and response headers + def get_wallet_address_balances_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WalletsApi.get_wallet_address_balances ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling WalletsApi.get_wallet_address_balances" + end + # resource path + local_var_path = '/public/v1/query/get_wallet_address_balances' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'GetWalletAddressBalancesResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: WalletsApi#get_wallet_address_balances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end # List wallets # List all wallets within an organization. # @param body @@ -711,6 +769,64 @@ def init_import_wallet_with_http_info(body, opts = {}) end return data, status_code, headers end + # List supported assets + # List supported assets for the specified network. This feature is in beta - please contact support for access. + # @param body + # @param [Hash] opts the optional parameters + # @return [ListSupportedAssetsResponse] + def list_supported_assets(body, opts = {}) + data, _status_code, _headers = list_supported_assets_with_http_info(body, opts) + data + end + + # List supported assets + # List supported assets for the specified network. This feature is in beta - please contact support for access. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ListSupportedAssetsResponse, Integer, Hash)>] ListSupportedAssetsResponse data, response status code and response headers + def list_supported_assets_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WalletsApi.list_supported_assets ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling WalletsApi.list_supported_assets" + end + # resource path + local_var_path = '/public/v1/query/list_supported_assets' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ListSupportedAssetsResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: WalletsApi#list_supported_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end # Update wallet # Update a wallet for an organization. # @param body diff --git a/turnkey_client/lib/turnkey_client/models/asset_balance.rb b/turnkey_client/lib/turnkey_client/models/asset_balance.rb new file mode 100644 index 0000000..d86b91e --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/asset_balance.rb @@ -0,0 +1,255 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class AssetBalance + # The caip-19 asset identifier + attr_accessor :caip19 + + # The asset symbol + attr_accessor :symbol + + # The balance in atomic units + attr_accessor :balance + + # The number of decimals this asset uses + attr_accessor :decimals + + attr_accessor :display + + # The asset name + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'caip19' => :'caip19', + :'symbol' => :'symbol', + :'balance' => :'balance', + :'decimals' => :'decimals', + :'display' => :'display', + :'name' => :'name' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'caip19' => :'Object', + :'symbol' => :'Object', + :'balance' => :'Object', + :'decimals' => :'Object', + :'display' => :'Object', + :'name' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::AssetBalance` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::AssetBalance`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'caip19') + self.caip19 = attributes[:'caip19'] + end + + if attributes.key?(:'symbol') + self.symbol = attributes[:'symbol'] + end + + if attributes.key?(:'balance') + self.balance = attributes[:'balance'] + end + + if attributes.key?(:'decimals') + self.decimals = attributes[:'decimals'] + end + + if attributes.key?(:'display') + self.display = attributes[:'display'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + caip19 == o.caip19 && + symbol == o.symbol && + balance == o.balance && + decimals == o.decimals && + display == o.display && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [caip19, symbol, balance, decimals, display, name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/asset_balance_display.rb b/turnkey_client/lib/turnkey_client/models/asset_balance_display.rb new file mode 100644 index 0000000..da692c3 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/asset_balance_display.rb @@ -0,0 +1,216 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class AssetBalanceDisplay + # USD value for display purposes only. Do not do any arithmetic or calculations with these, as the results could be imprecise. + attr_accessor :usd + + # Normalized crypto value for display purposes only. Do not do any arithmetic or calculations with these, as the results could be imprecise. + attr_accessor :crypto + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'usd' => :'usd', + :'crypto' => :'crypto' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'usd' => :'Object', + :'crypto' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::AssetBalanceDisplay` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::AssetBalanceDisplay`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'usd') + self.usd = attributes[:'usd'] + end + + if attributes.key?(:'crypto') + self.crypto = attributes[:'crypto'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + usd == o.usd && + crypto == o.crypto + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [usd, crypto].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/asset_metadata.rb b/turnkey_client/lib/turnkey_client/models/asset_metadata.rb new file mode 100644 index 0000000..4815b68 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/asset_metadata.rb @@ -0,0 +1,246 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class AssetMetadata + # The caip-19 asset identifier + attr_accessor :caip19 + + # The asset symbol + attr_accessor :symbol + + # The number of decimals this asset uses + attr_accessor :decimals + + # The url of the asset logo + attr_accessor :logo_url + + # The asset name + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'caip19' => :'caip19', + :'symbol' => :'symbol', + :'decimals' => :'decimals', + :'logo_url' => :'logoUrl', + :'name' => :'name' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'caip19' => :'Object', + :'symbol' => :'Object', + :'decimals' => :'Object', + :'logo_url' => :'Object', + :'name' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::AssetMetadata` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::AssetMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'caip19') + self.caip19 = attributes[:'caip19'] + end + + if attributes.key?(:'symbol') + self.symbol = attributes[:'symbol'] + end + + if attributes.key?(:'decimals') + self.decimals = attributes[:'decimals'] + end + + if attributes.key?(:'logo_url') + self.logo_url = attributes[:'logo_url'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + caip19 == o.caip19 && + symbol == o.symbol && + decimals == o.decimals && + logo_url == o.logo_url && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [caip19, symbol, decimals, logo_url, name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/create_tvc_deployment_intent.rb b/turnkey_client/lib/turnkey_client/models/create_tvc_deployment_intent.rb index 87cf939..cf03f52 100644 --- a/turnkey_client/lib/turnkey_client/models/create_tvc_deployment_intent.rb +++ b/turnkey_client/lib/turnkey_client/models/create_tvc_deployment_intent.rb @@ -42,6 +42,12 @@ class CreateTvcDeploymentIntent # Optional nonce to ensure uniqueness of the deployment manifest. If not provided, it defaults to the current Unix timestamp in seconds. attr_accessor :nonce + # Optional encrypted pull secret to authorize Turnkey to pull the pivot container image. If your image is public, leave this empty. + attr_accessor :pivot_container_encrypted_pull_secret + + # Optional encrypted pull secret to authorize Turnkey to pull the host container image. If your image is public, leave this empty. + attr_accessor :host_container_encrypted_pull_secret + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -54,7 +60,9 @@ def self.attribute_map :'host_container_image_url' => :'hostContainerImageUrl', :'host_path' => :'hostPath', :'host_args' => :'hostArgs', - :'nonce' => :'nonce' + :'nonce' => :'nonce', + :'pivot_container_encrypted_pull_secret' => :'pivotContainerEncryptedPullSecret', + :'host_container_encrypted_pull_secret' => :'hostContainerEncryptedPullSecret' } end @@ -70,14 +78,18 @@ def self.openapi_types :'host_container_image_url' => :'Object', :'host_path' => :'Object', :'host_args' => :'Object', - :'nonce' => :'Object' + :'nonce' => :'Object', + :'pivot_container_encrypted_pull_secret' => :'Object', + :'host_container_encrypted_pull_secret' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'nonce' + :'nonce', + :'pivot_container_encrypted_pull_secret', + :'host_container_encrypted_pull_secret' ]) end @@ -139,6 +151,14 @@ def initialize(attributes = {}) if attributes.key?(:'nonce') self.nonce = attributes[:'nonce'] end + + if attributes.key?(:'pivot_container_encrypted_pull_secret') + self.pivot_container_encrypted_pull_secret = attributes[:'pivot_container_encrypted_pull_secret'] + end + + if attributes.key?(:'host_container_encrypted_pull_secret') + self.host_container_encrypted_pull_secret = attributes[:'host_container_encrypted_pull_secret'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -213,7 +233,9 @@ def ==(o) host_container_image_url == o.host_container_image_url && host_path == o.host_path && host_args == o.host_args && - nonce == o.nonce + nonce == o.nonce && + pivot_container_encrypted_pull_secret == o.pivot_container_encrypted_pull_secret && + host_container_encrypted_pull_secret == o.host_container_encrypted_pull_secret end # @see the `==` method @@ -225,7 +247,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [app_id, qos_version, pivot_container_image_url, pivot_path, pivot_args, expected_pivot_digest, host_container_image_url, host_path, host_args, nonce].hash + [app_id, qos_version, pivot_container_image_url, pivot_path, pivot_args, expected_pivot_digest, host_container_image_url, host_path, host_args, nonce, pivot_container_encrypted_pull_secret, host_container_encrypted_pull_secret].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/eth_send_raw_transaction_intent.rb b/turnkey_client/lib/turnkey_client/models/eth_send_raw_transaction_intent.rb index 7f25584..37b3e3a 100644 --- a/turnkey_client/lib/turnkey_client/models/eth_send_raw_transaction_intent.rb +++ b/turnkey_client/lib/turnkey_client/models/eth_send_raw_transaction_intent.rb @@ -106,7 +106,7 @@ def list_invalid_properties def valid? return false if @signed_transaction.nil? return false if @caip2.nil? - caip2_validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532']) + caip2_validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532', 'eip155:137', 'eip155:80002']) return false unless caip2_validator.valid?(@caip2) true end @@ -114,7 +114,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] caip2 Object to be assigned def caip2=(caip2) - validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532']) + validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532', 'eip155:137', 'eip155:80002']) unless validator.valid?(caip2) fail ArgumentError, "invalid value for \"caip2\", must be one of #{validator.allowable_values}." end diff --git a/turnkey_client/lib/turnkey_client/models/get_nonces_request.rb b/turnkey_client/lib/turnkey_client/models/get_nonces_request.rb index ad42006..bbc3b0c 100644 --- a/turnkey_client/lib/turnkey_client/models/get_nonces_request.rb +++ b/turnkey_client/lib/turnkey_client/models/get_nonces_request.rb @@ -18,7 +18,7 @@ class GetNoncesRequest # The Ethereum address to query nonces for. attr_accessor :address - # The network identifier in CAIP-2 format (e.g., 'eip155:1' for Ethereum mainnet). + # CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet). attr_accessor :caip2 # Whether to fetch the standard on-chain nonce. @@ -27,6 +27,28 @@ class GetNoncesRequest # Whether to fetch the gas station nonce used for sponsored transactions. attr_accessor :gas_station_nonce + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -116,9 +138,21 @@ def valid? return false if @organization_id.nil? return false if @address.nil? return false if @caip2.nil? + caip2_validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532', 'eip155:137', 'eip155:80002']) + return false unless caip2_validator.valid?(@caip2) true end + # Custom attribute writer method checking allowed values (enum). + # @param [Object] caip2 Object to be assigned + def caip2=(caip2) + validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532', 'eip155:137', 'eip155:80002']) + unless validator.valid?(caip2) + fail ArgumentError, "invalid value for \"caip2\", must be one of #{validator.allowable_values}." + end + @caip2 = caip2 + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/turnkey_client/lib/turnkey_client/models/get_wallet_address_balances_request.rb b/turnkey_client/lib/turnkey_client/models/get_wallet_address_balances_request.rb new file mode 100644 index 0000000..d7038b4 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/get_wallet_address_balances_request.rb @@ -0,0 +1,275 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class GetWalletAddressBalancesRequest + # Unique identifier for a given organization. + attr_accessor :organization_id + + # Address corresponding to a wallet account. + attr_accessor :address + + # CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet). + attr_accessor :caip2 + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId', + :'address' => :'address', + :'caip2' => :'caip2' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'organization_id' => :'Object', + :'address' => :'Object', + :'caip2' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetWalletAddressBalancesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetWalletAddressBalancesRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + + if attributes.key?(:'caip2') + self.caip2 = attributes[:'caip2'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @address.nil? + invalid_properties.push('invalid value for "address", address cannot be nil.') + end + + if @caip2.nil? + invalid_properties.push('invalid value for "caip2", caip2 cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @organization_id.nil? + return false if @address.nil? + return false if @caip2.nil? + caip2_validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532', 'eip155:137', 'eip155:80002']) + return false unless caip2_validator.valid?(@caip2) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] caip2 Object to be assigned + def caip2=(caip2) + validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532', 'eip155:137', 'eip155:80002']) + unless validator.valid?(caip2) + fail ArgumentError, "invalid value for \"caip2\", must be one of #{validator.allowable_values}." + end + @caip2 = caip2 + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + organization_id == o.organization_id && + address == o.address && + caip2 == o.caip2 + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [organization_id, address, caip2].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/get_wallet_address_balances_response.rb b/turnkey_client/lib/turnkey_client/models/get_wallet_address_balances_response.rb new file mode 100644 index 0000000..0ec2fcb --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/get_wallet_address_balances_response.rb @@ -0,0 +1,208 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class GetWalletAddressBalancesResponse + # List of asset balances + attr_accessor :balances + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'balances' => :'balances' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'balances' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetWalletAddressBalancesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetWalletAddressBalancesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'balances') + if (value = attributes[:'balances']).is_a?(Array) + self.balances = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + balances == o.balances + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [balances].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/list_supported_assets_request.rb b/turnkey_client/lib/turnkey_client/models/list_supported_assets_request.rb new file mode 100644 index 0000000..f7ca79a --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/list_supported_assets_request.rb @@ -0,0 +1,260 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class ListSupportedAssetsRequest + # Unique identifier for a given organization. + attr_accessor :organization_id + + # CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet). + attr_accessor :caip2 + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId', + :'caip2' => :'caip2' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'organization_id' => :'Object', + :'caip2' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::ListSupportedAssetsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::ListSupportedAssetsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'caip2') + self.caip2 = attributes[:'caip2'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @caip2.nil? + invalid_properties.push('invalid value for "caip2", caip2 cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @organization_id.nil? + return false if @caip2.nil? + caip2_validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532', 'eip155:137', 'eip155:80002']) + return false unless caip2_validator.valid?(@caip2) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] caip2 Object to be assigned + def caip2=(caip2) + validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532', 'eip155:137', 'eip155:80002']) + unless validator.valid?(caip2) + fail ArgumentError, "invalid value for \"caip2\", must be one of #{validator.allowable_values}." + end + @caip2 = caip2 + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + organization_id == o.organization_id && + caip2 == o.caip2 + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [organization_id, caip2].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/list_supported_assets_response.rb b/turnkey_client/lib/turnkey_client/models/list_supported_assets_response.rb new file mode 100644 index 0000000..d49962a --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/list_supported_assets_response.rb @@ -0,0 +1,208 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class ListSupportedAssetsResponse + # List of asset metadata + attr_accessor :assets + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'assets' => :'assets' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'assets' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::ListSupportedAssetsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::ListSupportedAssetsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'assets') + if (value = attributes[:'assets']).is_a?(Array) + self.assets = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + assets == o.assets + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [assets].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/upsert_gas_usage_config_intent.rb b/turnkey_client/lib/turnkey_client/models/upsert_gas_usage_config_intent.rb index c2fb16a..09533d3 100644 --- a/turnkey_client/lib/turnkey_client/models/upsert_gas_usage_config_intent.rb +++ b/turnkey_client/lib/turnkey_client/models/upsert_gas_usage_config_intent.rb @@ -21,12 +21,16 @@ class UpsertGasUsageConfigIntent # Rolling sponsorship window duration, expressed in minutes. attr_accessor :window_duration_minutes + # Whether gas sponsorship is enabled for the organization. + attr_accessor :enabled + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'org_window_limit_usd' => :'orgWindowLimitUsd', :'sub_org_window_limit_usd' => :'subOrgWindowLimitUsd', - :'window_duration_minutes' => :'windowDurationMinutes' + :'window_duration_minutes' => :'windowDurationMinutes', + :'enabled' => :'enabled' } end @@ -35,13 +39,15 @@ def self.openapi_types { :'org_window_limit_usd' => :'Object', :'sub_org_window_limit_usd' => :'Object', - :'window_duration_minutes' => :'Object' + :'window_duration_minutes' => :'Object', + :'enabled' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'enabled' ]) end @@ -71,6 +77,10 @@ def initialize(attributes = {}) if attributes.key?(:'window_duration_minutes') self.window_duration_minutes = attributes[:'window_duration_minutes'] end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -108,7 +118,8 @@ def ==(o) self.class == o.class && org_window_limit_usd == o.org_window_limit_usd && sub_org_window_limit_usd == o.sub_org_window_limit_usd && - window_duration_minutes == o.window_duration_minutes + window_duration_minutes == o.window_duration_minutes && + enabled == o.enabled end # @see the `==` method @@ -120,7 +131,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [org_window_limit_usd, sub_org_window_limit_usd, window_duration_minutes].hash + [org_window_limit_usd, sub_org_window_limit_usd, window_duration_minutes, enabled].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/version.rb b/turnkey_client/lib/turnkey_client/version.rb index f1504b0..cc6fcf0 100644 --- a/turnkey_client/lib/turnkey_client/version.rb +++ b/turnkey_client/lib/turnkey_client/version.rb @@ -9,5 +9,5 @@ =end module TurnkeyClient - VERSION = '0.0.17' + VERSION = '0.0.18' end diff --git a/turnkey_client_inputs/config.json b/turnkey_client_inputs/config.json index 0b77478..bb7cdab 100644 --- a/turnkey_client_inputs/config.json +++ b/turnkey_client_inputs/config.json @@ -6,5 +6,5 @@ "gemAuthor": "Turnkey Engineering", "gemAuthorEmail": "hello@turnkey.com", "moduleName": "TurnkeyClient", - "gemVersion": "0.0.17" + "gemVersion": "0.0.18" } diff --git a/turnkey_client_inputs/public_api.swagger.json b/turnkey_client_inputs/public_api.swagger.json index 6f86413..48750ba 100644 --- a/turnkey_client_inputs/public_api.swagger.json +++ b/turnkey_client_inputs/public_api.swagger.json @@ -223,7 +223,7 @@ }, "/public/v1/query/get_gas_usage": { "post": { - "summary": "Get gas usage and limits.", + "summary": "Get gas usage", "description": "Get gas usage and gas limits for either the parent organization or a sub-organization.", "operationId": "GetGasUsage", "responses": { @@ -275,7 +275,7 @@ }, "/public/v1/query/get_nonces": { "post": { - "summary": "Get nonces for an address.", + "summary": "Get nonces", "description": "Get nonce values for an address on a given network. Can fetch the standard on-chain nonce and/or the gas station nonce used for sponsored transactions.", "operationId": "GetNonces", "responses": { @@ -610,6 +610,32 @@ "tags": ["Wallets"] } }, + "/public/v1/query/get_wallet_address_balances": { + "post": { + "summary": "Get balances", + "description": "Get balances of supported assets for an address on the specified network. Only non-zero balances are returned. This feature is in beta - please contact support for access.", + "operationId": "GetWalletAddressBalances", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetWalletAddressBalancesResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GetWalletAddressBalancesRequest" + } + } + ], + "tags": ["Wallets"] + } + }, "/public/v1/query/list_activities": { "post": { "summary": "List activities", @@ -844,6 +870,32 @@ "tags": ["Organizations"] } }, + "/public/v1/query/list_supported_assets": { + "post": { + "summary": "List supported assets", + "description": "List supported assets for the specified network. This feature is in beta - please contact support for access.", + "operationId": "ListSupportedAssets", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ListSupportedAssetsResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ListSupportedAssetsRequest" + } + } + ], + "tags": ["Wallets"] + } + }, "/public/v1/query/list_user_tags": { "post": { "summary": "List user tags", @@ -1938,8 +1990,8 @@ }, "/public/v1/submit/eth_send_transaction": { "post": { - "summary": "Submit a transaction intent for broadcasting.", - "description": "Submit a transaction intent describing a transaction you would like to broadcast.", + "summary": "Broadcast EVM transaction", + "description": "Submit a transaction intent describing an EVM transaction you would like to broadcast.", "operationId": "EthSendTransaction", "responses": { "200": { @@ -2562,8 +2614,8 @@ }, "/public/v1/submit/sol_send_transaction": { "post": { - "summary": "Submit a transaction intent for broadcasting.", - "description": "Submit a transaction intent describing a transaction you would like to broadcast.", + "summary": "Broadcast SVM transaction", + "description": "Submit a transaction intent describing an SVM transaction you would like to broadcast.", "operationId": "SolSendTransaction", "responses": { "200": { @@ -3445,6 +3497,75 @@ }, "required": ["type", "timestampMs", "organizationId", "parameters"] }, + "AssetBalance": { + "type": "object", + "properties": { + "caip19": { + "type": "string", + "description": "The caip-19 asset identifier" + }, + "symbol": { + "type": "string", + "description": "The asset symbol" + }, + "balance": { + "type": "string", + "description": "The balance in atomic units" + }, + "decimals": { + "type": "integer", + "format": "int32", + "description": "The number of decimals this asset uses" + }, + "display": { + "$ref": "#/definitions/AssetBalanceDisplay", + "description": "Normalized balance values for display purposes only. Do not do any arithmetic or calculations with these, as the results could be imprecise. Use the balance field instead." + }, + "name": { + "type": "string", + "description": "The asset name" + } + } + }, + "AssetBalanceDisplay": { + "type": "object", + "properties": { + "usd": { + "type": "string", + "description": "USD value for display purposes only. Do not do any arithmetic or calculations with these, as the results could be imprecise." + }, + "crypto": { + "type": "string", + "description": "Normalized crypto value for display purposes only. Do not do any arithmetic or calculations with these, as the results could be imprecise." + } + } + }, + "AssetMetadata": { + "type": "object", + "properties": { + "caip19": { + "type": "string", + "description": "The caip-19 asset identifier" + }, + "symbol": { + "type": "string", + "description": "The asset symbol" + }, + "decimals": { + "type": "integer", + "format": "int32", + "description": "The number of decimals this asset uses" + }, + "logoUrl": { + "type": "string", + "description": "The url of the asset logo" + }, + "name": { + "type": "string", + "description": "The asset name" + } + } + }, "Attestation": { "type": "object", "properties": { @@ -5255,6 +5376,16 @@ "format": "int64", "x-nullable": true, "description": "Optional nonce to ensure uniqueness of the deployment manifest. If not provided, it defaults to the current Unix timestamp in seconds." + }, + "pivotContainerEncryptedPullSecret": { + "type": "string", + "x-nullable": true, + "description": "Optional encrypted pull secret to authorize Turnkey to pull the pivot container image. If your image is public, leave this empty." + }, + "hostContainerEncryptedPullSecret": { + "type": "string", + "x-nullable": true, + "description": "Optional encrypted pull secret to authorize Turnkey to pull the host container image. If your image is public, leave this empty." } }, "required": [ @@ -6811,7 +6942,9 @@ "eip155:1", "eip155:11155111", "eip155:8453", - "eip155:84532" + "eip155:84532", + "eip155:137", + "eip155:80002" ], "description": "CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet)." } @@ -7522,7 +7655,15 @@ }, "caip2": { "type": "string", - "description": "The network identifier in CAIP-2 format (e.g., 'eip155:1' for Ethereum mainnet)." + "enum": [ + "eip155:1", + "eip155:11155111", + "eip155:8453", + "eip155:84532", + "eip155:137", + "eip155:80002" + ], + "description": "CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet)." }, "nonce": { "type": "boolean", @@ -8052,6 +8193,45 @@ }, "required": ["accounts"] }, + "GetWalletAddressBalancesRequest": { + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "Unique identifier for a given organization." + }, + "address": { + "type": "string", + "description": "Address corresponding to a wallet account." + }, + "caip2": { + "type": "string", + "enum": [ + "eip155:1", + "eip155:11155111", + "eip155:8453", + "eip155:84532", + "eip155:137", + "eip155:80002" + ], + "description": "CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet)." + } + }, + "required": ["organizationId", "address", "caip2"] + }, + "GetWalletAddressBalancesResponse": { + "type": "object", + "properties": { + "balances": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/AssetBalance" + }, + "description": "List of asset balances" + } + } + }, "GetWalletRequest": { "type": "object", "properties": { @@ -9422,6 +9602,41 @@ }, "required": ["privateKeyTags"] }, + "ListSupportedAssetsRequest": { + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "Unique identifier for a given organization." + }, + "caip2": { + "type": "string", + "enum": [ + "eip155:1", + "eip155:11155111", + "eip155:8453", + "eip155:84532", + "eip155:137", + "eip155:80002" + ], + "description": "CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet)." + } + }, + "required": ["organizationId", "caip2"] + }, + "ListSupportedAssetsResponse": { + "type": "object", + "properties": { + "assets": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/AssetMetadata" + }, + "description": "List of asset metadata" + } + } + }, "ListUserTagsRequest": { "type": "object", "properties": { @@ -12263,6 +12478,11 @@ "windowDurationMinutes": { "type": "string", "description": "Rolling sponsorship window duration, expressed in minutes." + }, + "enabled": { + "type": "boolean", + "x-nullable": true, + "description": "Whether gas sponsorship is enabled for the organization." } }, "required": [