Class: Mudbase::WalletApi

Inherits:
Object
  • Object
show all
Defined in:
lib/mudbase/api/wallet_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ WalletApi



19
20
21
# File 'lib/mudbase/api/wallet_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/mudbase/api/wallet_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#wallet_broadcast_transaction(wallet_broadcast_transaction_request, opts = {}) ⇒ WalletBroadcastTransaction200Response

Broadcast a client-signed transaction Broadcast a transaction that has been signed client-side. The transaction must be fully signed before sending. The fromAddress must be registered and belong to your organization (POST /api/wallet/non-custodial/register-address). **Supported chains:** EVM (ethereum, polygon, arbitrum, optimism, base, bsc, binance, avalanche, celo), UTXO (bitcoin, litecoin, dogecoin), and chain-specific (tron, solana, ton, cardano). Use binance or bsc for BNB Smart Chain. **Testing with custodial:** You can create a wallet via POST /api/wallet/create, get its private key via GET /api/wallet/walletId/private-key, register that address with POST /api/wallet/non-custodial/register-address, then build a signed tx (using POST /api/wallet/estimate-network-fee or estimate-gas for fees) and broadcast it here to test the non-custodial flow end-to-end.



27
28
29
30
# File 'lib/mudbase/api/wallet_api.rb', line 27

def wallet_broadcast_transaction(wallet_broadcast_transaction_request, opts = {})
  data, _status_code, _headers = wallet_broadcast_transaction_with_http_info(wallet_broadcast_transaction_request, opts)
  data
end

#wallet_broadcast_transaction_with_http_info(wallet_broadcast_transaction_request, opts = {}) ⇒ Array<(WalletBroadcastTransaction200Response, Integer, Hash)>

Broadcast a client-signed transaction Broadcast a transaction that has been signed client-side. The transaction must be fully signed before sending. The fromAddress must be registered and belong to your organization (POST /api/wallet/non-custodial/register-address). **Supported chains:** EVM (ethereum, polygon, arbitrum, optimism, base, bsc, binance, avalanche, celo), UTXO (bitcoin, litecoin, dogecoin), and chain-specific (tron, solana, ton, cardano). Use &#x60;binance&#x60; or &#x60;bsc&#x60; for BNB Smart Chain. **Testing with custodial:** You can create a wallet via POST /api/wallet/create, get its private key via GET /api/wallet/walletId/private-key, register that address with POST /api/wallet/non-custodial/register-address, then build a signed tx (using POST /api/wallet/estimate-network-fee or estimate-gas for fees) and broadcast it here to test the non-custodial flow end-to-end.



37
38
39
40
41
42
43
44
45
46
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
# File 'lib/mudbase/api/wallet_api.rb', line 37

def wallet_broadcast_transaction_with_http_info(wallet_broadcast_transaction_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WalletApi.wallet_broadcast_transaction ...'
  end
  # verify the required parameter 'wallet_broadcast_transaction_request' is set
  if @api_client.config.client_side_validation && wallet_broadcast_transaction_request.nil?
    fail ArgumentError, "Missing the required parameter 'wallet_broadcast_transaction_request' when calling WalletApi.wallet_broadcast_transaction"
  end
  # resource path
  local_var_path = '/api/wallet/non-custodial/broadcast'

  # 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']) unless header_params['Accept']
  # 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(wallet_broadcast_transaction_request)

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

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

  new_options = opts.merge(
    :operation => :"WalletApi.wallet_broadcast_transaction",
    :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: WalletApi#wallet_broadcast_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#wallet_create_webhook(wallet_create_webhook_request, opts = {}) ⇒ WalletCreateWebhook201Response

Create a wallet webhook Register a webhook URL to receive wallet events (balance updates, transaction confirmed/failed/detected/broadcast, token balance, address created/deactivated). Optional filters by addresses and chains.



95
96
97
98
# File 'lib/mudbase/api/wallet_api.rb', line 95

def wallet_create_webhook(wallet_create_webhook_request, opts = {})
  data, _status_code, _headers = wallet_create_webhook_with_http_info(wallet_create_webhook_request, opts)
  data
end

#wallet_create_webhook_with_http_info(wallet_create_webhook_request, opts = {}) ⇒ Array<(WalletCreateWebhook201Response, Integer, Hash)>

Create a wallet webhook Register a webhook URL to receive wallet events (balance updates, transaction confirmed/failed/detected/broadcast, token balance, address created/deactivated). Optional filters by addresses and chains.



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/mudbase/api/wallet_api.rb', line 105

def wallet_create_webhook_with_http_info(wallet_create_webhook_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WalletApi.wallet_create_webhook ...'
  end
  # verify the required parameter 'wallet_create_webhook_request' is set
  if @api_client.config.client_side_validation && wallet_create_webhook_request.nil?
    fail ArgumentError, "Missing the required parameter 'wallet_create_webhook_request' when calling WalletApi.wallet_create_webhook"
  end
  # resource path
  local_var_path = '/api/wallet/non-custodial/webhooks'

  # 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']) unless header_params['Accept']
  # 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(wallet_create_webhook_request)

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

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

  new_options = opts.merge(
    :operation => :"WalletApi.wallet_create_webhook",
    :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: WalletApi#wallet_create_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#wallet_delete_address(address_id, opts = {}) ⇒ FunctionsDelete200Response

Delete (soft-delete) a non-custodial address Soft-deletes a registered non-custodial address. The address is marked inactive and no longer used for broadcasts or balance/transaction queries.



163
164
165
166
# File 'lib/mudbase/api/wallet_api.rb', line 163

def wallet_delete_address(address_id, opts = {})
  data, _status_code, _headers = wallet_delete_address_with_http_info(address_id, opts)
  data
end

#wallet_delete_address_with_http_info(address_id, opts = {}) ⇒ Array<(FunctionsDelete200Response, Integer, Hash)>

Delete (soft-delete) a non-custodial address Soft-deletes a registered non-custodial address. The address is marked inactive and no longer used for broadcasts or balance/transaction queries.



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
# File 'lib/mudbase/api/wallet_api.rb', line 173

def wallet_delete_address_with_http_info(address_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WalletApi.wallet_delete_address ...'
  end
  # verify the required parameter 'address_id' is set
  if @api_client.config.client_side_validation && address_id.nil?
    fail ArgumentError, "Missing the required parameter 'address_id' when calling WalletApi.wallet_delete_address"
  end
  # resource path
  local_var_path = '/api/wallet/non-custodial/addresses/{addressId}'.sub('{' + 'addressId' + '}', CGI.escape(address_id.to_s))

  # 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']) unless header_params['Accept']

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

  # http body (model)
  post_body = opts[:debug_body]

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

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

  new_options = opts.merge(
    :operation => :"WalletApi.wallet_delete_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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WalletApi#wallet_delete_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#wallet_delete_webhook(webhook_id, opts = {}) ⇒ FunctionsDelete200Response

Delete a wallet webhook Permanently delete a wallet webhook. Delivery will stop immediately.



226
227
228
229
# File 'lib/mudbase/api/wallet_api.rb', line 226

def wallet_delete_webhook(webhook_id, opts = {})
  data, _status_code, _headers = wallet_delete_webhook_with_http_info(webhook_id, opts)
  data
end

#wallet_delete_webhook_with_http_info(webhook_id, opts = {}) ⇒ Array<(FunctionsDelete200Response, Integer, Hash)>

Delete a wallet webhook Permanently delete a wallet webhook. Delivery will stop immediately.



236
237
238
239
240
241
242
243
244
245
246
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
# File 'lib/mudbase/api/wallet_api.rb', line 236

def wallet_delete_webhook_with_http_info(webhook_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WalletApi.wallet_delete_webhook ...'
  end
  # verify the required parameter 'webhook_id' is set
  if @api_client.config.client_side_validation && webhook_id.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WalletApi.wallet_delete_webhook"
  end
  # resource path
  local_var_path = '/api/wallet/non-custodial/webhooks/{webhookId}'.sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.to_s))

  # 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']) unless header_params['Accept']

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

  # http body (model)
  post_body = opts[:debug_body]

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

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

  new_options = opts.merge(
    :operation => :"WalletApi.wallet_delete_webhook",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WalletApi#wallet_delete_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#wallet_estimate_gas(wallet_estimate_gas_request, opts = {}) ⇒ WalletEstimateGas200Response

Estimate network fee from blockchain (all supported chains; not controlled by Mudbase) **Network fee (from blockchain only).** Returns network fee **estimated directly from the blockchain** via RPC or fee APIs. **Not controlled by Mudbase.** Both POST /api/wallet/estimate-network-fee (or calculate-fee) and this endpoint return network fee only; use either for gas/fee display. This endpoint is chain-oriented and supports full transaction shape for EVM. **EVM chains:** ethereum, polygon, arbitrum, optimism, base, bsc, binance, avalanche, celo — require transaction (from, and to/value or tokenAddress/amount). Response includes gasLimit, gasPrice, networkFee, estimatedTime, currency. **Non-EVM chains:** bitcoin, litecoin, dogecoin, solana, tron, ton, cardano — only chain is required; transaction is optional/ignored. Returns networkFee, estimatedTime, currency (and e.g. satPerVb for UTXO). See docs/FEE_ARCHITECTURE.md. Results cached 15s.



289
290
291
292
# File 'lib/mudbase/api/wallet_api.rb', line 289

def wallet_estimate_gas(wallet_estimate_gas_request, opts = {})
  data, _status_code, _headers = wallet_estimate_gas_with_http_info(wallet_estimate_gas_request, opts)
  data
end

#wallet_estimate_gas_with_http_info(wallet_estimate_gas_request, opts = {}) ⇒ Array<(WalletEstimateGas200Response, Integer, Hash)>

Estimate network fee from blockchain (all supported chains; not controlled by Mudbase) **Network fee (from blockchain only).** Returns network fee **estimated directly from the blockchain** via RPC or fee APIs. **Not controlled by Mudbase.** Both POST /api/wallet/estimate-network-fee (or calculate-fee) and this endpoint return network fee only; use either for gas/fee display. This endpoint is chain-oriented and supports full transaction shape for EVM. **EVM chains:** ethereum, polygon, arbitrum, optimism, base, bsc, binance, avalanche, celo — require &#x60;transaction&#x60; (from, and to/value or tokenAddress/amount). Response includes gasLimit, gasPrice, networkFee, estimatedTime, currency. **Non-EVM chains:** bitcoin, litecoin, dogecoin, solana, tron, ton, cardano — only &#x60;chain&#x60; is required; &#x60;transaction&#x60; is optional/ignored. Returns networkFee, estimatedTime, currency (and e.g. satPerVb for UTXO). See docs/FEE_ARCHITECTURE.md. Results cached 15s.



299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
# File 'lib/mudbase/api/wallet_api.rb', line 299

def wallet_estimate_gas_with_http_info(wallet_estimate_gas_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WalletApi.wallet_estimate_gas ...'
  end
  # verify the required parameter 'wallet_estimate_gas_request' is set
  if @api_client.config.client_side_validation && wallet_estimate_gas_request.nil?
    fail ArgumentError, "Missing the required parameter 'wallet_estimate_gas_request' when calling WalletApi.wallet_estimate_gas"
  end
  # resource path
  local_var_path = '/api/wallet/non-custodial/estimate-gas'

  # 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']) unless header_params['Accept']
  # 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(wallet_estimate_gas_request)

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

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

  new_options = opts.merge(
    :operation => :"WalletApi.wallet_estimate_gas",
    :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: WalletApi#wallet_estimate_gas\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#wallet_get_address(address_id, opts = {}) ⇒ NonCustodialAddressResponse

Get non-custodial address by ID Returns metadata and status for a single registered non-custodial address (ID, address, chain, label, org, project, derivationPath, isActive, timestamps).



357
358
359
360
# File 'lib/mudbase/api/wallet_api.rb', line 357

def wallet_get_address(address_id, opts = {})
  data, _status_code, _headers = wallet_get_address_with_http_info(address_id, opts)
  data
end

#wallet_get_address_with_http_info(address_id, opts = {}) ⇒ Array<(NonCustodialAddressResponse, Integer, Hash)>

Get non-custodial address by ID Returns metadata and status for a single registered non-custodial address (ID, address, chain, label, org, project, derivationPath, isActive, timestamps).



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
# File 'lib/mudbase/api/wallet_api.rb', line 367

def wallet_get_address_with_http_info(address_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WalletApi.wallet_get_address ...'
  end
  # verify the required parameter 'address_id' is set
  if @api_client.config.client_side_validation && address_id.nil?
    fail ArgumentError, "Missing the required parameter 'address_id' when calling WalletApi.wallet_get_address"
  end
  # resource path
  local_var_path = '/api/wallet/non-custodial/addresses/{addressId}'.sub('{' + 'addressId' + '}', CGI.escape(address_id.to_s))

  # 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']) unless header_params['Accept']

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

  # http body (model)
  post_body = opts[:debug_body]

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

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

  new_options = opts.merge(
    :operation => :"WalletApi.wallet_get_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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WalletApi#wallet_get_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#wallet_get_balance(address_id, opts = {}) ⇒ WalletGetBalance200Response

Get balance for a non-custodial address Returns native token balance (confirmed, unconfirmed, total, currency) for a registered non-custodial address. Updated periodically from the chain.



420
421
422
423
# File 'lib/mudbase/api/wallet_api.rb', line 420

def wallet_get_balance(address_id, opts = {})
  data, _status_code, _headers = wallet_get_balance_with_http_info(address_id, opts)
  data
end

#wallet_get_balance_with_http_info(address_id, opts = {}) ⇒ Array<(WalletGetBalance200Response, Integer, Hash)>

Get balance for a non-custodial address Returns native token balance (confirmed, unconfirmed, total, currency) for a registered non-custodial address. Updated periodically from the chain.



430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
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
# File 'lib/mudbase/api/wallet_api.rb', line 430

def wallet_get_balance_with_http_info(address_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WalletApi.wallet_get_balance ...'
  end
  # verify the required parameter 'address_id' is set
  if @api_client.config.client_side_validation && address_id.nil?
    fail ArgumentError, "Missing the required parameter 'address_id' when calling WalletApi.wallet_get_balance"
  end
  # resource path
  local_var_path = '/api/wallet/non-custodial/addresses/{addressId}/balance'.sub('{' + 'addressId' + '}', CGI.escape(address_id.to_s))

  # 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']) unless header_params['Accept']

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

  # http body (model)
  post_body = opts[:debug_body]

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

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

  new_options = opts.merge(
    :operation => :"WalletApi.wallet_get_balance",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WalletApi#wallet_get_balance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#wallet_get_cancel_params(wallet_get_cancel_params_request, opts = {}) ⇒ WalletGetCancelParams200Response

Get replacement tx params for cancel (stuck EVM tx) Returns **replacement transaction params** to cancel a stuck EVM transaction (same nonce, to=self, value=0, data=0x, higher gas). Client signs and broadcasts via POST /api/wallet/non-custodial/broadcast. Address must be registered for your organization. EVM chains only.



483
484
485
486
# File 'lib/mudbase/api/wallet_api.rb', line 483

def wallet_get_cancel_params(wallet_get_cancel_params_request, opts = {})
  data, _status_code, _headers = wallet_get_cancel_params_with_http_info(wallet_get_cancel_params_request, opts)
  data
end

#wallet_get_cancel_params_with_http_info(wallet_get_cancel_params_request, opts = {}) ⇒ Array<(WalletGetCancelParams200Response, Integer, Hash)>

Get replacement tx params for cancel (stuck EVM tx) Returns **replacement transaction params** to cancel a stuck EVM transaction (same nonce, to&#x3D;self, value&#x3D;0, data&#x3D;0x, higher gas). Client signs and broadcasts via POST /api/wallet/non-custodial/broadcast. Address must be registered for your organization. EVM chains only.



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
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
# File 'lib/mudbase/api/wallet_api.rb', line 493

def wallet_get_cancel_params_with_http_info(wallet_get_cancel_params_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WalletApi.wallet_get_cancel_params ...'
  end
  # verify the required parameter 'wallet_get_cancel_params_request' is set
  if @api_client.config.client_side_validation && wallet_get_cancel_params_request.nil?
    fail ArgumentError, "Missing the required parameter 'wallet_get_cancel_params_request' when calling WalletApi.wallet_get_cancel_params"
  end
  # resource path
  local_var_path = '/api/wallet/non-custodial/cancel'

  # 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']) unless header_params['Accept']
  # 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(wallet_get_cancel_params_request)

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

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

  new_options = opts.merge(
    :operation => :"WalletApi.wallet_get_cancel_params",
    :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: WalletApi#wallet_get_cancel_params\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#wallet_get_speed_up_params(wallet_get_speed_up_params_request, opts = {}) ⇒ WalletGetSpeedUpParams200Response

Get replacement tx params for speed-up (stuck EVM tx) Returns **replacement transaction params** for a stuck EVM transaction (same nonce, same to/value/data, higher gas). Client signs the replacement and broadcasts via POST /api/wallet/non-custodial/broadcast. Address must be registered for your organization. Use when a tx has been pending >5 min (stuck). EVM chains only.



551
552
553
554
# File 'lib/mudbase/api/wallet_api.rb', line 551

def wallet_get_speed_up_params(wallet_get_speed_up_params_request, opts = {})
  data, _status_code, _headers = wallet_get_speed_up_params_with_http_info(wallet_get_speed_up_params_request, opts)
  data
end

#wallet_get_speed_up_params_with_http_info(wallet_get_speed_up_params_request, opts = {}) ⇒ Array<(WalletGetSpeedUpParams200Response, Integer, Hash)>

Get replacement tx params for speed-up (stuck EVM tx) Returns **replacement transaction params** for a stuck EVM transaction (same nonce, same to/value/data, higher gas). Client signs the replacement and broadcasts via POST /api/wallet/non-custodial/broadcast. Address must be registered for your organization. Use when a tx has been pending &gt;5 min (stuck). EVM chains only.



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
# File 'lib/mudbase/api/wallet_api.rb', line 561

def wallet_get_speed_up_params_with_http_info(wallet_get_speed_up_params_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WalletApi.wallet_get_speed_up_params ...'
  end
  # verify the required parameter 'wallet_get_speed_up_params_request' is set
  if @api_client.config.client_side_validation && wallet_get_speed_up_params_request.nil?
    fail ArgumentError, "Missing the required parameter 'wallet_get_speed_up_params_request' when calling WalletApi.wallet_get_speed_up_params"
  end
  # resource path
  local_var_path = '/api/wallet/non-custodial/speed-up'

  # 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']) unless header_params['Accept']
  # 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(wallet_get_speed_up_params_request)

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

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

  new_options = opts.merge(
    :operation => :"WalletApi.wallet_get_speed_up_params",
    :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: WalletApi#wallet_get_speed_up_params\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#wallet_get_transaction_by_hash(tx_hash, chain, opts = {}) ⇒ WalletGetTransactionByHash200Response

Get transaction by hash Returns a transaction by its hash. The chain query parameter is required because the same hash format can exist on different chains (e.g. 0x-style on EVM chains).



620
621
622
623
# File 'lib/mudbase/api/wallet_api.rb', line 620

def wallet_get_transaction_by_hash(tx_hash, chain, opts = {})
  data, _status_code, _headers = wallet_get_transaction_by_hash_with_http_info(tx_hash, chain, opts)
  data
end

#wallet_get_transaction_by_hash_with_http_info(tx_hash, chain, opts = {}) ⇒ Array<(WalletGetTransactionByHash200Response, Integer, Hash)>

Get transaction by hash Returns a transaction by its hash. The chain query parameter is required because the same hash format can exist on different chains (e.g. 0x-style on EVM chains).



631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
# File 'lib/mudbase/api/wallet_api.rb', line 631

def wallet_get_transaction_by_hash_with_http_info(tx_hash, chain, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WalletApi.wallet_get_transaction_by_hash ...'
  end
  # verify the required parameter 'tx_hash' is set
  if @api_client.config.client_side_validation && tx_hash.nil?
    fail ArgumentError, "Missing the required parameter 'tx_hash' when calling WalletApi.wallet_get_transaction_by_hash"
  end
  # verify the required parameter 'chain' is set
  if @api_client.config.client_side_validation && chain.nil?
    fail ArgumentError, "Missing the required parameter 'chain' when calling WalletApi.wallet_get_transaction_by_hash"
  end
  # verify enum value
  allowable_values = ["ethereum", "binance", "polygon", "celo", "bitcoin", "litecoin", "solana", "tron", "ripple", "cardano", "dogecoin", "ton"]
  if @api_client.config.client_side_validation && !allowable_values.include?(chain)
    fail ArgumentError, "invalid value for \"chain\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/api/wallet/non-custodial/transactions/{txHash}'.sub('{' + 'txHash' + '}', CGI.escape(tx_hash.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'chain'] = chain

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

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

  # http body (model)
  post_body = opts[:debug_body]

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

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

  new_options = opts.merge(
    :operation => :"WalletApi.wallet_get_transaction_by_hash",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WalletApi#wallet_get_transaction_by_hash\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#wallet_get_transactions(address_id, opts = {}) ⇒ WalletGetTransactions200Response

Get transaction history for a non-custodial address Returns paginated transaction history for a registered non-custodial address (incoming/outgoing, status, confirmations, amounts).

Options Hash (opts):

  • :limit (Integer)

    Number of transactions per page. (default to 50)

  • :page (Integer)

    Page number (1-based). (default to 1)



696
697
698
699
# File 'lib/mudbase/api/wallet_api.rb', line 696

def wallet_get_transactions(address_id, opts = {})
  data, _status_code, _headers = wallet_get_transactions_with_http_info(address_id, opts)
  data
end

#wallet_get_transactions_with_http_info(address_id, opts = {}) ⇒ Array<(WalletGetTransactions200Response, Integer, Hash)>

Get transaction history for a non-custodial address Returns paginated transaction history for a registered non-custodial address (incoming/outgoing, status, confirmations, amounts).

Options Hash (opts):

  • :limit (Integer)

    Number of transactions per page. (default to 50)

  • :page (Integer)

    Page number (1-based). (default to 1)



708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
# File 'lib/mudbase/api/wallet_api.rb', line 708

def wallet_get_transactions_with_http_info(address_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WalletApi.wallet_get_transactions ...'
  end
  # verify the required parameter 'address_id' is set
  if @api_client.config.client_side_validation && address_id.nil?
    fail ArgumentError, "Missing the required parameter 'address_id' when calling WalletApi.wallet_get_transactions"
  end
  # resource path
  local_var_path = '/api/wallet/non-custodial/addresses/{addressId}/transactions'.sub('{' + 'addressId' + '}', CGI.escape(address_id.to_s))

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

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

  # http body (model)
  post_body = opts[:debug_body]

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

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

  new_options = opts.merge(
    :operation => :"WalletApi.wallet_get_transactions",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WalletApi#wallet_get_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#wallet_get_webhook_logs(webhook_id, opts = {}) ⇒ WalletGetWebhookLogs200Response

Get webhook delivery logs List delivery attempts for a wallet webhook (success/failure, payload, response, duration). Paginated by limit.

Options Hash (opts):

  • :limit (Integer)

    Maximum number of log entries to return. (default to 50)



764
765
766
767
# File 'lib/mudbase/api/wallet_api.rb', line 764

def wallet_get_webhook_logs(webhook_id, opts = {})
  data, _status_code, _headers = wallet_get_webhook_logs_with_http_info(webhook_id, opts)
  data
end

#wallet_get_webhook_logs_with_http_info(webhook_id, opts = {}) ⇒ Array<(WalletGetWebhookLogs200Response, Integer, Hash)>

Get webhook delivery logs List delivery attempts for a wallet webhook (success/failure, payload, response, duration). Paginated by limit.

Options Hash (opts):

  • :limit (Integer)

    Maximum number of log entries to return. (default to 50)



775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
# File 'lib/mudbase/api/wallet_api.rb', line 775

def wallet_get_webhook_logs_with_http_info(webhook_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WalletApi.wallet_get_webhook_logs ...'
  end
  # verify the required parameter 'webhook_id' is set
  if @api_client.config.client_side_validation && webhook_id.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WalletApi.wallet_get_webhook_logs"
  end
  # resource path
  local_var_path = '/api/wallet/non-custodial/webhooks/{webhookId}/logs'.sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.to_s))

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

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

  # http body (model)
  post_body = opts[:debug_body]

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerToken']

  new_options = opts.merge(
    :operation => :"WalletApi.wallet_get_webhook_logs",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WalletApi#wallet_get_webhook_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#wallet_list_addresses(opts = {}) ⇒ WalletListAddresses200Response

List registered non-custodial addresses Returns all non-custodial addresses registered for the current project/organization. Optional filters by chain and projectId. Addresses must be registered via POST /api/wallet/non-custodial/register-address before use.

Options Hash (opts):

  • :chain (String)

    Filter by chain (optional)

  • :project_id (String)

    Filter by project ID (optional).



830
831
832
833
# File 'lib/mudbase/api/wallet_api.rb', line 830

def wallet_list_addresses(opts = {})
  data, _status_code, _headers = wallet_list_addresses_with_http_info(opts)
  data
end

#wallet_list_addresses_with_http_info(opts = {}) ⇒ Array<(WalletListAddresses200Response, Integer, Hash)>

List registered non-custodial addresses Returns all non-custodial addresses registered for the current project/organization. Optional filters by chain and projectId. Addresses must be registered via POST /api/wallet/non-custodial/register-address before use.

Options Hash (opts):

  • :chain (String)

    Filter by chain (optional)

  • :project_id (String)

    Filter by project ID (optional).



841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
# File 'lib/mudbase/api/wallet_api.rb', line 841

def wallet_list_addresses_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WalletApi.wallet_list_addresses ...'
  end
  allowable_values = ["ethereum", "binance", "bsc", "polygon", "arbitrum", "optimism", "base", "avalanche", "celo", "bitcoin", "litecoin", "dogecoin", "solana", "tron", "ripple", "cardano", "ton"]
  if @api_client.config.client_side_validation && opts[:'chain'] && !allowable_values.include?(opts[:'chain'])
    fail ArgumentError, "invalid value for \"chain\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/api/wallet/non-custodial/addresses'

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

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

  # http body (model)
  post_body = opts[:debug_body]

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

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

  new_options = opts.merge(
    :operation => :"WalletApi.wallet_list_addresses",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WalletApi#wallet_list_addresses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#wallet_list_webhooks(opts = {}) ⇒ WalletListWebhooks200Response

List wallet webhooks Returns all wallet webhooks for the current context, optionally filtered by projectId. Includes delivery stats and active status.

Options Hash (opts):

  • :project_id (String)

    Filter by project ID (optional).



896
897
898
899
# File 'lib/mudbase/api/wallet_api.rb', line 896

def wallet_list_webhooks(opts = {})
  data, _status_code, _headers = wallet_list_webhooks_with_http_info(opts)
  data
end

#wallet_list_webhooks_with_http_info(opts = {}) ⇒ Array<(WalletListWebhooks200Response, Integer, Hash)>

List wallet webhooks Returns all wallet webhooks for the current context, optionally filtered by projectId. Includes delivery stats and active status.

Options Hash (opts):

  • :project_id (String)

    Filter by project ID (optional).



906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
# File 'lib/mudbase/api/wallet_api.rb', line 906

def wallet_list_webhooks_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WalletApi.wallet_list_webhooks ...'
  end
  # resource path
  local_var_path = '/api/wallet/non-custodial/webhooks'

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

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

  # http body (model)
  post_body = opts[:debug_body]

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

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

  new_options = opts.merge(
    :operation => :"WalletApi.wallet_list_webhooks",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WalletApi#wallet_list_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#wallet_register_address(wallet_register_address_request, opts = {}) ⇒ NonCustodialAddressResponse

Register a non-custodial wallet address Register a public wallet address for balance monitoring, transaction indexing, and webhook notifications. Keys are never sent to the server; generation and signing happen client-side only. Supports EVM, UTXO, Solana, Tron, TON, Cardano, and other chains. Optionally provide derivation path and label for multi-address tracking.



956
957
958
959
# File 'lib/mudbase/api/wallet_api.rb', line 956

def wallet_register_address(wallet_register_address_request, opts = {})
  data, _status_code, _headers = wallet_register_address_with_http_info(wallet_register_address_request, opts)
  data
end

#wallet_register_address_with_http_info(wallet_register_address_request, opts = {}) ⇒ Array<(NonCustodialAddressResponse, Integer, Hash)>

Register a non-custodial wallet address Register a public wallet address for balance monitoring, transaction indexing, and webhook notifications. Keys are never sent to the server; generation and signing happen client-side only. Supports EVM, UTXO, Solana, Tron, TON, Cardano, and other chains. Optionally provide derivation path and label for multi-address tracking.



966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
# File 'lib/mudbase/api/wallet_api.rb', line 966

def wallet_register_address_with_http_info(wallet_register_address_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WalletApi.wallet_register_address ...'
  end
  # verify the required parameter 'wallet_register_address_request' is set
  if @api_client.config.client_side_validation && wallet_register_address_request.nil?
    fail ArgumentError, "Missing the required parameter 'wallet_register_address_request' when calling WalletApi.wallet_register_address"
  end
  # resource path
  local_var_path = '/api/wallet/non-custodial/register-address'

  # 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']) unless header_params['Accept']
  # 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(wallet_register_address_request)

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

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

  new_options = opts.merge(
    :operation => :"WalletApi.wallet_register_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: WalletApi#wallet_register_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#wallet_test_webhook(wallet_test_webhook_request, opts = {}) ⇒ WalletTestWebhook200Response

Test a webhook delivery (sends a single test payload) Sends a test payload to the given URL to verify webhook connectivity and signature. Uses the same signing as real deliveries.



1024
1025
1026
1027
# File 'lib/mudbase/api/wallet_api.rb', line 1024

def wallet_test_webhook(wallet_test_webhook_request, opts = {})
  data, _status_code, _headers = wallet_test_webhook_with_http_info(wallet_test_webhook_request, opts)
  data
end

#wallet_test_webhook_with_http_info(wallet_test_webhook_request, opts = {}) ⇒ Array<(WalletTestWebhook200Response, Integer, Hash)>

Test a webhook delivery (sends a single test payload) Sends a test payload to the given URL to verify webhook connectivity and signature. Uses the same signing as real deliveries.



1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
# File 'lib/mudbase/api/wallet_api.rb', line 1034

def wallet_test_webhook_with_http_info(wallet_test_webhook_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WalletApi.wallet_test_webhook ...'
  end
  # verify the required parameter 'wallet_test_webhook_request' is set
  if @api_client.config.client_side_validation && wallet_test_webhook_request.nil?
    fail ArgumentError, "Missing the required parameter 'wallet_test_webhook_request' when calling WalletApi.wallet_test_webhook"
  end
  # resource path
  local_var_path = '/api/wallet/non-custodial/webhooks/test'

  # 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']) unless header_params['Accept']
  # 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(wallet_test_webhook_request)

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerToken']

  new_options = opts.merge(
    :operation => :"WalletApi.wallet_test_webhook",
    :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: WalletApi#wallet_test_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#wallet_update_webhook(webhook_id, wallet_update_webhook_request, opts = {}) ⇒ WalletUpdateWebhook200Response

Update a wallet webhook Update webhook URL, events, secret, or filters. Partially applied; only provided fields are updated.



1093
1094
1095
1096
# File 'lib/mudbase/api/wallet_api.rb', line 1093

def wallet_update_webhook(webhook_id, wallet_update_webhook_request, opts = {})
  data, _status_code, _headers = wallet_update_webhook_with_http_info(webhook_id, wallet_update_webhook_request, opts)
  data
end

#wallet_update_webhook_with_http_info(webhook_id, wallet_update_webhook_request, opts = {}) ⇒ Array<(WalletUpdateWebhook200Response, Integer, Hash)>

Update a wallet webhook Update webhook URL, events, secret, or filters. Partially applied; only provided fields are updated.



1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
# File 'lib/mudbase/api/wallet_api.rb', line 1104

def wallet_update_webhook_with_http_info(webhook_id, wallet_update_webhook_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WalletApi.wallet_update_webhook ...'
  end
  # verify the required parameter 'webhook_id' is set
  if @api_client.config.client_side_validation && webhook_id.nil?
    fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WalletApi.wallet_update_webhook"
  end
  # verify the required parameter 'wallet_update_webhook_request' is set
  if @api_client.config.client_side_validation && wallet_update_webhook_request.nil?
    fail ArgumentError, "Missing the required parameter 'wallet_update_webhook_request' when calling WalletApi.wallet_update_webhook"
  end
  # resource path
  local_var_path = '/api/wallet/non-custodial/webhooks/{webhookId}'.sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.to_s))

  # 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']) unless header_params['Accept']
  # 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(wallet_update_webhook_request)

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerToken']

  new_options = opts.merge(
    :operation => :"WalletApi.wallet_update_webhook",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WalletApi#wallet_update_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end