Class: CryptoApis::TransactionsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/crypto_apis/api/transactions_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ TransactionsApi

Returns a new instance of TransactionsApi.



19
20
21
# File 'lib/crypto_apis/api/transactions_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/crypto_apis/api/transactions_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_coins_transaction_from_address_for_whole_amount(address, blockchain, network, wallet_id, opts = {}) ⇒ CreateCoinsTransactionFromAddressForWholeAmountR

Create Coins Transaction From Address For Whole Amount Through this endpoint customers can create a new transaction from address for coins specifically, which will transfer over the entire available amount.

Parameters:

  • address (String)

    Defines the source address.

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • network (String)

    Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten" are test networks.

  • wallet_id (String)

    Represents the sender's specific and unique Wallet ID of the sender.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.

  • :create_coins_transaction_from_address_for_whole_amount_rb (CreateCoinsTransactionFromAddressForWholeAmountRB)

Returns:



32
33
34
35
# File 'lib/crypto_apis/api/transactions_api.rb', line 32

def create_coins_transaction_from_address_for_whole_amount(address, blockchain, network, wallet_id, opts = {})
  data, _status_code, _headers = create_coins_transaction_from_address_for_whole_amount_with_http_info(address, blockchain, network, wallet_id, opts)
  data
end

#create_coins_transaction_from_address_for_whole_amount_with_http_info(address, blockchain, network, wallet_id, opts = {}) ⇒ Array<(CreateCoinsTransactionFromAddressForWholeAmountR, Integer, Hash)>

Create Coins Transaction From Address For Whole Amount Through this endpoint customers can create a new transaction from address for coins specifically, which will transfer over the entire available amount.

Parameters:

  • address (String)

    Defines the source address.

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • network (String)

    Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • wallet_id (String)

    Represents the sender&#39;s specific and unique Wallet ID of the sender.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user.

  • :create_coins_transaction_from_address_for_whole_amount_rb (CreateCoinsTransactionFromAddressForWholeAmountRB)

Returns:



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/crypto_apis/api/transactions_api.rb', line 47

def create_coins_transaction_from_address_for_whole_amount_with_http_info(address, blockchain, network, wallet_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransactionsApi.create_coins_transaction_from_address_for_whole_amount ...'
  end
  # verify the required parameter 'address' is set
  if @api_client.config.client_side_validation && address.nil?
    fail ArgumentError, "Missing the required parameter 'address' when calling TransactionsApi.create_coins_transaction_from_address_for_whole_amount"
  end
  # verify the required parameter 'blockchain' is set
  if @api_client.config.client_side_validation && blockchain.nil?
    fail ArgumentError, "Missing the required parameter 'blockchain' when calling TransactionsApi.create_coins_transaction_from_address_for_whole_amount"
  end
  # verify enum value
  allowable_values = ["ethereum", "ethereum-classic", "binance-smart-chain", "polygon"]
  if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
    fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'network' is set
  if @api_client.config.client_side_validation && network.nil?
    fail ArgumentError, "Missing the required parameter 'network' when calling TransactionsApi.create_coins_transaction_from_address_for_whole_amount"
  end
  # verify enum value
  allowable_values = ["mainnet", "mordor", "testnet", "goerli", "mumbai"]
  if @api_client.config.client_side_validation && !allowable_values.include?(network)
    fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'wallet_id' is set
  if @api_client.config.client_side_validation && wallet_id.nil?
    fail ArgumentError, "Missing the required parameter 'wallet_id' when calling TransactionsApi.create_coins_transaction_from_address_for_whole_amount"
  end
  # resource path
  local_var_path = '/wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses/{address}/all-transaction-requests'.sub('{' + 'address' + '}', CGI.escape(address.to_s)).sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'walletId' + '}', CGI.escape(wallet_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?

  # 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'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_coins_transaction_from_address_for_whole_amount_rb'])

  # return_type
  return_type = opts[:debug_return_type] || 'CreateCoinsTransactionFromAddressForWholeAmountR'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"TransactionsApi.create_coins_transaction_from_address_for_whole_amount",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransactionsApi#create_coins_transaction_from_address_for_whole_amount\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_coins_transaction_request_from_address(address, blockchain, network, wallet_id, opts = {}) ⇒ CreateCoinsTransactionRequestFromAddressR

Create Coins Transaction Request from Address Through this endpoint users can create a new single transaction request from one address to another.

Parameters:

  • address (String)

    Defines the specific source address for the transaction. For XRP we also support the X-address format.

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • network (String)

    Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • wallet_id (String)

    Represents the sender&#39;s specific and unique Wallet ID of the sender.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user.

  • :create_coins_transaction_request_from_address_rb (CreateCoinsTransactionRequestFromAddressRB)

Returns:



133
134
135
136
# File 'lib/crypto_apis/api/transactions_api.rb', line 133

def create_coins_transaction_request_from_address(address, blockchain, network, wallet_id, opts = {})
  data, _status_code, _headers = create_coins_transaction_request_from_address_with_http_info(address, blockchain, network, wallet_id, opts)
  data
end

#create_coins_transaction_request_from_address_with_http_info(address, blockchain, network, wallet_id, opts = {}) ⇒ Array<(CreateCoinsTransactionRequestFromAddressR, Integer, Hash)>

Create Coins Transaction Request from Address Through this endpoint users can create a new single transaction request from one address to another.

Parameters:

  • address (String)

    Defines the specific source address for the transaction. For XRP we also support the X-address format.

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • network (String)

    Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • wallet_id (String)

    Represents the sender&#39;s specific and unique Wallet ID of the sender.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user.

  • :create_coins_transaction_request_from_address_rb (CreateCoinsTransactionRequestFromAddressRB)

Returns:



148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/crypto_apis/api/transactions_api.rb', line 148

def create_coins_transaction_request_from_address_with_http_info(address, blockchain, network, wallet_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransactionsApi.create_coins_transaction_request_from_address ...'
  end
  # verify the required parameter 'address' is set
  if @api_client.config.client_side_validation && address.nil?
    fail ArgumentError, "Missing the required parameter 'address' when calling TransactionsApi.create_coins_transaction_request_from_address"
  end
  # verify the required parameter 'blockchain' is set
  if @api_client.config.client_side_validation && blockchain.nil?
    fail ArgumentError, "Missing the required parameter 'blockchain' when calling TransactionsApi.create_coins_transaction_request_from_address"
  end
  # verify enum value
  allowable_values = ["ethereum", "ethereum-classic", "binance-smart-chain", "xrp", "polygon"]
  if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
    fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'network' is set
  if @api_client.config.client_side_validation && network.nil?
    fail ArgumentError, "Missing the required parameter 'network' when calling TransactionsApi.create_coins_transaction_request_from_address"
  end
  # verify enum value
  allowable_values = ["mainnet", "mordor", "testnet", "goerli", "mumbai"]
  if @api_client.config.client_side_validation && !allowable_values.include?(network)
    fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'wallet_id' is set
  if @api_client.config.client_side_validation && wallet_id.nil?
    fail ArgumentError, "Missing the required parameter 'wallet_id' when calling TransactionsApi.create_coins_transaction_request_from_address"
  end
  # resource path
  local_var_path = '/wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses/{address}/transaction-requests'.sub('{' + 'address' + '}', CGI.escape(address.to_s)).sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'walletId' + '}', CGI.escape(wallet_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?

  # 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'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_coins_transaction_request_from_address_rb'])

  # return_type
  return_type = opts[:debug_return_type] || 'CreateCoinsTransactionRequestFromAddressR'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"TransactionsApi.create_coins_transaction_request_from_address",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransactionsApi#create_coins_transaction_request_from_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_coins_transaction_request_from_wallet(blockchain, network, wallet_id, opts = {}) ⇒ CreateCoinsTransactionRequestFromWalletR

Create Coins Transaction Request from Wallet Through this endpoint users can create a new transaction request from the entire Wallet instead from just a specific address. This endpoint can generate transactions from multiple to multiple addresses. warningThis is available only for UTXO-based protocols such as Bitcoin, Bitcoin Cash, Litecoin, etc. It **is not** available for Account-based protocols like Ethereum./warning

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • network (String)

    Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • wallet_id (String)

    Represents the sender&#39;s specific and unique Wallet ID of the sender.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user.

  • :create_coins_transaction_request_from_wallet_rb (CreateCoinsTransactionRequestFromWalletRB)

Returns:



233
234
235
236
# File 'lib/crypto_apis/api/transactions_api.rb', line 233

def create_coins_transaction_request_from_wallet(blockchain, network, wallet_id, opts = {})
  data, _status_code, _headers = create_coins_transaction_request_from_wallet_with_http_info(blockchain, network, wallet_id, opts)
  data
end

#create_coins_transaction_request_from_wallet_with_http_info(blockchain, network, wallet_id, opts = {}) ⇒ Array<(CreateCoinsTransactionRequestFromWalletR, Integer, Hash)>

Create Coins Transaction Request from Wallet Through this endpoint users can create a new transaction request from the entire Wallet instead from just a specific address. This endpoint can generate transactions from multiple to multiple addresses. warningThis is available only for UTXO-based protocols such as Bitcoin, Bitcoin Cash, Litecoin, etc. It **is not** available for Account-based protocols like Ethereum./warning

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • network (String)

    Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • wallet_id (String)

    Represents the sender&#39;s specific and unique Wallet ID of the sender.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user.

  • :create_coins_transaction_request_from_wallet_rb (CreateCoinsTransactionRequestFromWalletRB)

Returns:



247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'lib/crypto_apis/api/transactions_api.rb', line 247

def create_coins_transaction_request_from_wallet_with_http_info(blockchain, network, wallet_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransactionsApi.create_coins_transaction_request_from_wallet ...'
  end
  # verify the required parameter 'blockchain' is set
  if @api_client.config.client_side_validation && blockchain.nil?
    fail ArgumentError, "Missing the required parameter 'blockchain' when calling TransactionsApi.create_coins_transaction_request_from_wallet"
  end
  # verify enum value
  allowable_values = ["bitcoin", "bitcoin-cash", "litecoin", "dogecoin", "dash", "zcash"]
  if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
    fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'network' is set
  if @api_client.config.client_side_validation && network.nil?
    fail ArgumentError, "Missing the required parameter 'network' when calling TransactionsApi.create_coins_transaction_request_from_wallet"
  end
  # verify enum value
  allowable_values = ["mainnet", "testnet"]
  if @api_client.config.client_side_validation && !allowable_values.include?(network)
    fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'wallet_id' is set
  if @api_client.config.client_side_validation && wallet_id.nil?
    fail ArgumentError, "Missing the required parameter 'wallet_id' when calling TransactionsApi.create_coins_transaction_request_from_wallet"
  end
  # resource path
  local_var_path = '/wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/transaction-requests'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'walletId' + '}', CGI.escape(wallet_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?

  # 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'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_coins_transaction_request_from_wallet_rb'])

  # return_type
  return_type = opts[:debug_return_type] || 'CreateCoinsTransactionRequestFromWalletR'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"TransactionsApi.create_coins_transaction_request_from_wallet",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransactionsApi#create_coins_transaction_request_from_wallet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_fungible_token_transaction_request_from_address_without_fee_priority(blockchain, network, sender_address, wallet_id, opts = {}) ⇒ CreateFungibleTokenTransactionRequestFromAddressWithoutFeePriorityR

Create Fungible Token Transaction Request From Address Without Fee Priority Through this endpoint customers can make a single feeless token transaction on the Tron blockchain protocol. TRX transactions burn certain resources called Bandwidth and Energy. Each account has 1500 bandwidth free for use every 24 hours and more can be obtained by staking TRX. The unit price of Energy is 280 SUN and of bandwidth - 1000 SUN. If the resources are insufficient, TRX will be burned to pay for them.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • network (String)

    Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • sender_address (String)

    Defines the specific source address for the transaction.

  • wallet_id (String)

    Defines the unique ID of the Wallet.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user.

  • :create_fungible_token_transaction_request_from_address_without_fee_priority_rb (CreateFungibleTokenTransactionRequestFromAddressWithoutFeePriorityRB)

Returns:



329
330
331
332
# File 'lib/crypto_apis/api/transactions_api.rb', line 329

def create_fungible_token_transaction_request_from_address_without_fee_priority(blockchain, network, sender_address, wallet_id, opts = {})
  data, _status_code, _headers = create_fungible_token_transaction_request_from_address_without_fee_priority_with_http_info(blockchain, network, sender_address, wallet_id, opts)
  data
end

#create_fungible_token_transaction_request_from_address_without_fee_priority_with_http_info(blockchain, network, sender_address, wallet_id, opts = {}) ⇒ Array<(CreateFungibleTokenTransactionRequestFromAddressWithoutFeePriorityR, Integer, Hash)>

Create Fungible Token Transaction Request From Address Without Fee Priority Through this endpoint customers can make a single feeless token transaction on the Tron blockchain protocol. TRX transactions burn certain resources called Bandwidth and Energy. Each account has 1500 bandwidth free for use every 24 hours and more can be obtained by staking TRX. The unit price of Energy is 280 SUN and of bandwidth - 1000 SUN. If the resources are insufficient, TRX will be burned to pay for them.

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • network (String)

    Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • sender_address (String)

    Defines the specific source address for the transaction.

  • wallet_id (String)

    Defines the unique ID of the Wallet.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user.

  • :create_fungible_token_transaction_request_from_address_without_fee_priority_rb (CreateFungibleTokenTransactionRequestFromAddressWithoutFeePriorityRB)

Returns:



344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
# File 'lib/crypto_apis/api/transactions_api.rb', line 344

def create_fungible_token_transaction_request_from_address_without_fee_priority_with_http_info(blockchain, network, sender_address, wallet_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransactionsApi.create_fungible_token_transaction_request_from_address_without_fee_priority ...'
  end
  # verify the required parameter 'blockchain' is set
  if @api_client.config.client_side_validation && blockchain.nil?
    fail ArgumentError, "Missing the required parameter 'blockchain' when calling TransactionsApi.create_fungible_token_transaction_request_from_address_without_fee_priority"
  end
  # verify enum value
  allowable_values = ["tron"]
  if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
    fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'network' is set
  if @api_client.config.client_side_validation && network.nil?
    fail ArgumentError, "Missing the required parameter 'network' when calling TransactionsApi.create_fungible_token_transaction_request_from_address_without_fee_priority"
  end
  # verify enum value
  allowable_values = ["mainnet", "nile"]
  if @api_client.config.client_side_validation && !allowable_values.include?(network)
    fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'sender_address' is set
  if @api_client.config.client_side_validation && sender_address.nil?
    fail ArgumentError, "Missing the required parameter 'sender_address' when calling TransactionsApi.create_fungible_token_transaction_request_from_address_without_fee_priority"
  end
  # verify the required parameter 'wallet_id' is set
  if @api_client.config.client_side_validation && wallet_id.nil?
    fail ArgumentError, "Missing the required parameter 'wallet_id' when calling TransactionsApi.create_fungible_token_transaction_request_from_address_without_fee_priority"
  end
  # resource path
  local_var_path = '/wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses/{senderAddress}/feeless-token-transaction-requests'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'senderAddress' + '}', CGI.escape(sender_address.to_s)).sub('{' + 'walletId' + '}', CGI.escape(wallet_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?

  # 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'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_fungible_token_transaction_request_from_address_without_fee_priority_rb'])

  # return_type
  return_type = opts[:debug_return_type] || 'CreateFungibleTokenTransactionRequestFromAddressWithoutFeePriorityR'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"TransactionsApi.create_fungible_token_transaction_request_from_address_without_fee_priority",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransactionsApi#create_fungible_token_transaction_request_from_address_without_fee_priority\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_fungible_tokens_transaction_request_from_address(blockchain, network, sender_address, wallet_id, opts = {}) ⇒ CreateFungibleTokensTransactionRequestFromAddressR

Create Fungible Tokens Transaction Request from Address Through this endpoint users can make a single token transaction. noteTo have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url)./note warningCrypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn’t happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur./warning

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • network (String)

    Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • sender_address (String)

    Defines the specific source address for the transaction.

  • wallet_id (String)

    Defines the unique ID of the Wallet.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user.

  • :create_fungible_tokens_transaction_request_from_address_rb (CreateFungibleTokensTransactionRequestFromAddressRB)

Returns:



430
431
432
433
# File 'lib/crypto_apis/api/transactions_api.rb', line 430

def create_fungible_tokens_transaction_request_from_address(blockchain, network, sender_address, wallet_id, opts = {})
  data, _status_code, _headers = create_fungible_tokens_transaction_request_from_address_with_http_info(blockchain, network, sender_address, wallet_id, opts)
  data
end

#create_fungible_tokens_transaction_request_from_address_with_http_info(blockchain, network, sender_address, wallet_id, opts = {}) ⇒ Array<(CreateFungibleTokensTransactionRequestFromAddressR, Integer, Hash)>

Create Fungible Tokens Transaction Request from Address Through this endpoint users can make a single token transaction. noteTo have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks [here](developers.cryptoapis.io/technical-documentation/general-information/callbacks#callback-url)./note warningCrypto APIs will notify the user **only when** the event occurs. There are cases when the specific event doesn&#39;t happen at all, or takes a long time to do so. A callback notification **will not** be sent if the event does not or cannot occur, or will take long time to occur./warning

Parameters:

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • network (String)

    Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • sender_address (String)

    Defines the specific source address for the transaction.

  • wallet_id (String)

    Defines the unique ID of the Wallet.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user.

  • :create_fungible_tokens_transaction_request_from_address_rb (CreateFungibleTokensTransactionRequestFromAddressRB)

Returns:



445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
# File 'lib/crypto_apis/api/transactions_api.rb', line 445

def create_fungible_tokens_transaction_request_from_address_with_http_info(blockchain, network, sender_address, wallet_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransactionsApi.create_fungible_tokens_transaction_request_from_address ...'
  end
  # verify the required parameter 'blockchain' is set
  if @api_client.config.client_side_validation && blockchain.nil?
    fail ArgumentError, "Missing the required parameter 'blockchain' when calling TransactionsApi.create_fungible_tokens_transaction_request_from_address"
  end
  # verify enum value
  allowable_values = ["ethereum", "ethereum-classic", "binance-smart-chain", "polygon"]
  if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
    fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'network' is set
  if @api_client.config.client_side_validation && network.nil?
    fail ArgumentError, "Missing the required parameter 'network' when calling TransactionsApi.create_fungible_tokens_transaction_request_from_address"
  end
  # verify enum value
  allowable_values = ["mainnet", "mordor", "testnet", "goerli", "mumbai"]
  if @api_client.config.client_side_validation && !allowable_values.include?(network)
    fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'sender_address' is set
  if @api_client.config.client_side_validation && sender_address.nil?
    fail ArgumentError, "Missing the required parameter 'sender_address' when calling TransactionsApi.create_fungible_tokens_transaction_request_from_address"
  end
  # verify the required parameter 'wallet_id' is set
  if @api_client.config.client_side_validation && wallet_id.nil?
    fail ArgumentError, "Missing the required parameter 'wallet_id' when calling TransactionsApi.create_fungible_tokens_transaction_request_from_address"
  end
  # resource path
  local_var_path = '/wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses/{senderAddress}/token-transaction-requests'.sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'senderAddress' + '}', CGI.escape(sender_address.to_s)).sub('{' + 'walletId' + '}', CGI.escape(wallet_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?

  # 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'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_fungible_tokens_transaction_request_from_address_rb'])

  # return_type
  return_type = opts[:debug_return_type] || 'CreateFungibleTokensTransactionRequestFromAddressR'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"TransactionsApi.create_fungible_tokens_transaction_request_from_address",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransactionsApi#create_fungible_tokens_transaction_request_from_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_single_transaction_request_from_address_without_fee_priority(address, blockchain, network, wallet_id, opts = {}) ⇒ CreateSingleTransactionRequestFromAddressWithoutFeePriorityR

Create Single Transaction Request From Address Without Fee Priority Through this endpoint users can create a new single transaction request from one address to another. The difference between this endpoint and "Create Coins Transaction Request from Address" is that for Tron blockchain there is no Fee Priority that defines how fast a transaction can be mined.

Parameters:

  • address (String)

    Defines the specific source address for the transaction.

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • network (String)

    Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • wallet_id (String)

    Represents the sender&#39;s specific and unique Wallet ID of the sender.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user.

  • :create_single_transaction_request_from_address_without_fee_priority_rb (CreateSingleTransactionRequestFromAddressWithoutFeePriorityRB)

Returns:



531
532
533
534
# File 'lib/crypto_apis/api/transactions_api.rb', line 531

def create_single_transaction_request_from_address_without_fee_priority(address, blockchain, network, wallet_id, opts = {})
  data, _status_code, _headers = create_single_transaction_request_from_address_without_fee_priority_with_http_info(address, blockchain, network, wallet_id, opts)
  data
end

#create_single_transaction_request_from_address_without_fee_priority_with_http_info(address, blockchain, network, wallet_id, opts = {}) ⇒ Array<(CreateSingleTransactionRequestFromAddressWithoutFeePriorityR, Integer, Hash)>

Create Single Transaction Request From Address Without Fee Priority Through this endpoint users can create a new single transaction request from one address to another. The difference between this endpoint and &quot;Create Coins Transaction Request from Address&quot; is that for Tron blockchain there is no Fee Priority that defines how fast a transaction can be mined.

Parameters:

  • address (String)

    Defines the specific source address for the transaction.

  • blockchain (String)

    Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

  • network (String)

    Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.

  • wallet_id (String)

    Represents the sender&#39;s specific and unique Wallet ID of the sender.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :context (String)

    In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. &#x60;context&#x60; is specified by the user.

  • :create_single_transaction_request_from_address_without_fee_priority_rb (CreateSingleTransactionRequestFromAddressWithoutFeePriorityRB)

Returns:



546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
# File 'lib/crypto_apis/api/transactions_api.rb', line 546

def create_single_transaction_request_from_address_without_fee_priority_with_http_info(address, blockchain, network, wallet_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransactionsApi.create_single_transaction_request_from_address_without_fee_priority ...'
  end
  # verify the required parameter 'address' is set
  if @api_client.config.client_side_validation && address.nil?
    fail ArgumentError, "Missing the required parameter 'address' when calling TransactionsApi.create_single_transaction_request_from_address_without_fee_priority"
  end
  # verify the required parameter 'blockchain' is set
  if @api_client.config.client_side_validation && blockchain.nil?
    fail ArgumentError, "Missing the required parameter 'blockchain' when calling TransactionsApi.create_single_transaction_request_from_address_without_fee_priority"
  end
  # verify enum value
  allowable_values = ["tron"]
  if @api_client.config.client_side_validation && !allowable_values.include?(blockchain)
    fail ArgumentError, "invalid value for \"blockchain\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'network' is set
  if @api_client.config.client_side_validation && network.nil?
    fail ArgumentError, "Missing the required parameter 'network' when calling TransactionsApi.create_single_transaction_request_from_address_without_fee_priority"
  end
  # verify enum value
  allowable_values = ["mainnet", "nile"]
  if @api_client.config.client_side_validation && !allowable_values.include?(network)
    fail ArgumentError, "invalid value for \"network\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'wallet_id' is set
  if @api_client.config.client_side_validation && wallet_id.nil?
    fail ArgumentError, "Missing the required parameter 'wallet_id' when calling TransactionsApi.create_single_transaction_request_from_address_without_fee_priority"
  end
  # resource path
  local_var_path = '/wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses/{address}/feeless-transaction-requests'.sub('{' + 'address' + '}', CGI.escape(address.to_s)).sub('{' + 'blockchain' + '}', CGI.escape(blockchain.to_s)).sub('{' + 'network' + '}', CGI.escape(network.to_s)).sub('{' + 'walletId' + '}', CGI.escape(wallet_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'context'] = opts[:'context'] if !opts[:'context'].nil?

  # 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'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_single_transaction_request_from_address_without_fee_priority_rb'])

  # return_type
  return_type = opts[:debug_return_type] || 'CreateSingleTransactionRequestFromAddressWithoutFeePriorityR'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKey']

  new_options = opts.merge(
    :operation => :"TransactionsApi.create_single_transaction_request_from_address_without_fee_priority",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransactionsApi#create_single_transaction_request_from_address_without_fee_priority\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end