-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathchange-or-remove-a-regular-key-pair.html
More file actions
526 lines (466 loc) · 27.4 KB
/
change-or-remove-a-regular-key-pair.html
File metadata and controls
526 lines (466 loc) · 27.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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
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
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
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
223
224
225
226
227
228
229
230
231
232
233
234
235
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
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
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
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
419
420
421
422
423
424
425
426
427
428
429
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
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
520
521
522
523
524
525
526
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width">
<title>Change or Remove a Regular Key Pair - XAG Ledger Dev Portal</title>
<!-- favicon -->
<link rel="apple-touch-icon" sizes="180x180" href="assets/favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/favicons/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="assets/favicons/favicon-32x32.png">
<link rel="manifest" href="assets/favicons/site.webmanifest">
<link rel="shortcut icon" href="favicon.ico">
<meta name="msapplication-TileColor" content="#25A768">
<meta name="msapplication-config" content="assets/favicons/browserconfig.xml">
<meta name="theme-color" content="#25A768">
<!-- jQuery -->
<script src="assets/vendor/jquery-1.11.1.min.js"></script>
<!-- Stylesheet -->
<link href="assets/css/devportal.css" rel="stylesheet" />
<!-- Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-45576805-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-45576805-2');
gtag('config', 'UA-157720658-3', { 'linker': {
'domains': ['blog.xpring.io', 'forum.xpring.io', 'xpring.io',
'XAGl.org', 'explorer.XAGl.org', 'testnet.XAGl.org']
} }
);
</script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
<!-- syntax highlighting -->
<link rel="stylesheet" href="assets/vendor/docco.min.css" />
<script src="assets/vendor/highlight.min.js"></script>
<!-- expandable code samples -->
<script src="assets/js/expandcode.js"></script>
<!-- multi-code selection tabs -->
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});
</script>
</head>
<body class="xrp-ledger-dev-portal sidebar-primary lang-en ">
<nav class="navbar fixed-top navbar-expand-lg navbar-light bg-white">
<a href="index.html" class="navbar-brand"><img src="assets/img/logo.png" class="logo" height="44" alt="XAG Ledger Dev Portal" /></a>
<button class="navbar-toggler" type="button" data-toggle="slide-collapse" data-target="#navbarHolder" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarHolder">
<ul class="nav navbar-nav">
<li class="nav-item">
<a class="nav-link" href="dev-tools.html">Dev Tools</a>
</li>
<li class="nav-item">
<a class="nav-link" href="http://xagfans.com/" target="blank">BBS</a>
</li>
</ul><!-- /.navbar-nav -->
<div class="nav navbar-nav language-selector">
<div class="dropdown">
<button class="btn btn-outline-secondary dropdown-toggle" type="button" id="language_selector_header_btn" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
English
</button>
<div class="dropdown-menu" aria-labelledby="language_selector_header_btn">
<a class="dropdown-item" href="/change-or-remove-a-regular-key-pair.html">English</a>
<a class="dropdown-item" href="/cn/change-or-remove-a-regular-key-pair.html">中文</a>
</div><!--/.dropdown-menu-->
</div><!--/.dropdown-->
</div><!--/.language-selector-->
</div><!--/#navbarHolder-->
<div class="menu-overlay"></div>
</nav>
<div class="container-fluid" role="document" id="main_content_wrapper">
<div class="row">
<!-- Right sidebar first so it's at the beginning for mobile layouts -->
<!-- main column -->
<main class="main col-md-7 col-lg-6 order-md-3 " role="main" id="main_content_body">
<nav class="breadcrumbs-wrap p-0 p-md-3" aria-label="breadcrumb">
<ul class="breadcrumb bg-white">
<li class="breadcrumb-item"><a href="index.html">Home</a></li>
<li class="active breadcrumb-item"><a href="docs.html">Docs</a></li>
<li class="active breadcrumb-item"><a href="tutorials.html">Tutorials</a></li>
<li class="active breadcrumb-item"><a href="manage-account-settings.html">Manage Account Settings</a></li>
<li class="active breadcrumb-item">Change or Remove a Regular Key Pair</li>
</ul>
</nav><!--/.breadcrumbs-wrap--> <article class="pt-3 p-md-3">
<div class="content">
<h1 id="change-or-remove-a-regular-key-pair">Change or Remove a Regular Key Pair</h1>
<p>The XAG Ledger allows an account to authorize a secondary key pair, called a <em><a href="cryptographic-keys.html">regular key pair</a></em>, to sign future transactions. If your <a href="accounts.html">account</a>'s regular key pair is compromised, or if you just want to periodically change the regular key pair as a security measure, use a <a href="setregularkey.html">SetRegularKey transaction</a> to remove or change the regular key pair for your account.</p>
<p>For more information about master and regular key pairs, see <a href="cryptographic-keys.html">Cryptographic Keys</a>.</p>
<h2 id="changing-a-regular-key-pair">Changing a Regular Key Pair</h2>
<p>The steps to change your existing regular key pair are almost the same as the steps to <a href="assign-a-regular-key-pair.html">assign a regular key</a> for the first time. You generate the key pair and assign it to your account as a regular key pair, overwriting the existing regular key pair. However, the main difference is that when changing the existing regular key pair, you can use the existing regular private key to replace itself, whereas when assigning a regular key pair to an account for the first time, you have to use the account's master private key to do it.</p>
<p>For more information about master and regular key pairs, see <a href="cryptographic-keys.html">Cryptographic Keys</a>.</p>
<h2 id="removing-a-regular-key-pair">Removing a Regular Key Pair</h2>
<p>If you want to simply remove a compromised regular key pair from your account, you don't need to generate a key pair first. Use a <a href="setregularkey.html">SetRegularKey transaction</a>, omitting the <code>RegularKey</code> field. Note that the transaction fails if you don't have another way of signing for your account currently enabled (either the master key pair or a <a href="multi-signing.html">signer list</a>).</p>
<p>When removing a regular key pair to your account, the <code>SetRegularKey</code> transaction requires signing by your account's master private key (secret) or existing regular key pair. Transmitting your master or regular private key is dangerous, so we'll complete this transaction in two steps to keep transaction signing separate from transaction submission to the network.</p>
<h3 id="sign-your-transaction">Sign Your Transaction</h3>
<p>The most secure way to sign a transaction is to do it locally with a signing library, such as <a href="rippleapi-reference.html">RippleAPI</a>. Alternatively, you can sign the transaction using the <a href="sign.html">sign method</a>, but this must be done through a trusted and encrypted connection, or through a local connection, and only to a server you control.</p>
<p>In all cases, note the signed transaction's identifying hash for later.
<!-- --></p>
<p>Populate the request fields with the following values:</p>
<table>
<thead>
<tr>
<th align="left">Request Field</th>
<th align="left">Value</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left"><code>Account</code></td>
<td align="left">The address of your account.</td>
</tr>
<tr>
<td align="left"><code>secret</code></td>
<td align="left"><code>master_key</code>, <code>master_seed</code>, or <code>master_seed_hex</code> (master or regular private key) for your account.</td>
</tr>
</tbody>
</table>
<h4 id="request-format">Request Format</h4>
<p>An example of the request format:</p>
<div class="multicode" id="code-0"><ul class="codetabs"><li><a href="#code-0-0">WebSocket</a></li><li><a href="#code-0-1">JSON-RPC</a></li><li><a href="#code-0-2">Commandline</a></li></ul>
<div class="code_sample" id="code-0-0" style="position: static;"><pre><code class="json">{
"command": "sign",
"tx_json": {
"TransactionType": "SetRegularKey",
"Account": "r9xQZdFGwbwTB3g9ncKByWZ3du6Skm7gQ8"
},
"secret": "snoPBrXtMeMyMHUVTgbuqAfg1SUTb"
}
</code></pre></div>
<div class="code_sample" id="code-0-1" style="position: static;"><pre><code class="json">{
"method": "sign",
"params": [
{
"secret" : "snoPBrXtMeMyMHUVTgbuqAfg1SUTb",
"tx_json" : {
"TransactionType" : "SetRegularKey",
"Account" : "r9xQZdFGwbwTB3g9ncKByWZ3du6Skm7gQ8"
}
}
]
}
</code></pre></div>
<div class="code_sample" id="code-0-2" style="position: static;"><pre><code class="sh">#Syntax: sign secret tx_json
rippled sign snoPBrXtMeMyMHUVTgbuqAfg1SUTb '{"TransactionType": "SetRegularKey", "Account": "rUAi7pipxGpYfPNg3LtPcf2ApiS8aw9A93"}'
</code></pre></div>
</div>
<h4 id="response-format">Response Format</h4>
<p>An example of a successful response:</p>
<div class="multicode" id="code-1"><ul class="codetabs"><li><a href="#code-1-0">WebSocket</a></li><li><a href="#code-1-1">JSON-RPC</a></li><li><a href="#code-1-2">Commandline</a></li></ul>
<div class="code_sample" id="code-1-0" style="position: static;"><pre><code class="json">{
"result": {
"tx_blob": "1200052280000000240000000268400000000000000A73210330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD02074473045022100CAB9A6F84026D57B05760D5E2395FB7BE86BF39F10DC6E2E69DC91238EE0970B022058EC36A8EF9EE65F5D0D8CAC4E88C8C19FEF39E40F53D4CCECBB59701D6D1E838114623B8DA4A0BFB3B61AB423391A182DC693DC159E",
"tx_json": {
"Account": "r9xQZdFGwbwTB3g9ncKByWZ3du6Skm7gQ8",
"Fee": "10",
"Flags": 2147483648,
"Sequence": 2,
"SigningPubKey": "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
"TransactionType": "SetRegularKey",
"TxnSignature": "3045022100CAB9A6F84026D57B05760D5E2395FB7BE86BF39F10DC6E2E69DC91238EE0970B022058EC36A8EF9EE65F5D0D8CAC4E88C8C19FEF39E40F53D4CCECBB59701D6D1E83",
"hash": "59BCAB8E5B9D4597D6A7BFF22F6C555D0F41420599A2E126035B6AF19261AD97"
}
},
"status": "success",
"type": "response"
}
</code></pre></div>
<div class="code_sample" id="code-1-1" style="position: static;"><pre><code class="json">{
"result": {
"status": "success",
"tx_blob": "1200052280000000240000000268400000000000000A73210330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD02074473045022100CAB9A6F84026D57B05760D5E2395FB7BE86BF39F10DC6E2E69DC91238EE0970B022058EC36A8EF9EE65F5D0D8CAC4E88C8C19FEF39E40F53D4CCECBB59701D6D1E838114623B8DA4A0BFB3B61AB423391A182DC693DC159E",
"tx_json": {
"Account": "r9xQZdFGwbwTB3g9ncKByWZ3du6Skm7gQ8",
"Fee": "10",
"Flags": 2147483648,
"Sequence": 2,
"SigningPubKey": "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
"TransactionType": "SetRegularKey",
"TxnSignature": "3045022100CAB9A6F84026D57B05760D5E2395FB7BE86BF39F10DC6E2E69DC91238EE0970B022058EC36A8EF9EE65F5D0D8CAC4E88C8C19FEF39E40F53D4CCECBB59701D6D1E83",
"hash": "59BCAB8E5B9D4597D6A7BFF22F6C555D0F41420599A2E126035B6AF19261AD97"
}
}
}
</code></pre></div>
<div class="code_sample" id="code-1-2" style="position: static;"><pre><code class="json">{
"result" : {
"status" : "success",
"tx_blob" : "1200052280000000240000000268400000000000000A73210330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD02074473045022100CAB9A6F84026D57B05760D5E2395FB7BE86BF39F10DC6E2E69DC91238EE0970B022058EC36A8EF9EE65F5D0D8CAC4E88C8C19FEF39E40F53D4CCECBB59701D6D1E838114623B8DA4A0BFB3B61AB423391A182DC693DC159E",
"tx_json" : {
"Account" : "r9xQZdFGwbwTB3g9ncKByWZ3du6Skm7gQ8",
"Fee" : "10",
"Flags" : 2147483648,
"Sequence" : 2,
"SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
"TransactionType" : "SetRegularKey",
"TxnSignature" : "3045022100CAB9A6F84026D57B05760D5E2395FB7BE86BF39F10DC6E2E69DC91238EE0970B022058EC36A8EF9EE65F5D0D8CAC4E88C8C19FEF39E40F53D4CCECBB59701D6D1E83",
"hash" : "59BCAB8E5B9D4597D6A7BFF22F6C555D0F41420599A2E126035B6AF19261AD97"
}
}
}
</code></pre></div>
</div>
<p>The <code>sign</code> command response contains a <code>tx_blob</code> value, as shown above. The offline signing response contains a <code>signedTransaction</code> value. Both are signed binary representations (blobs) of the transaction.</p>
<p>Next, use the <code>submit</code> command to transmit the transaction blob (<code>tx_blob</code> or <code>signedTransaction</code>) to the network.</p>
<h3 id="submit-your-transaction">Submit Your Transaction</h3>
<p>Take the <code>signedTransaction</code> value from the offline signing response or the <code>tx_blob</code> value from the <code>sign</code> command response and submit it as the <code>tx_blob</code> value using the <a href="submit.html">submit method</a>.</p>
<h4 id="request-format-1">Request Format</h4>
<p>An example of the request format:</p>
<div class="multicode" id="code-2"><ul class="codetabs"><li><a href="#code-2-0">WebSocket</a></li><li><a href="#code-2-1">JSON-RPC</a></li><li><a href="#code-2-2">Commandline</a></li></ul>
<div class="code_sample" id="code-2-0" style="position: static;"><pre><code class="json">{
"command": "submit",
"tx_blob": "1200052280000000240000000268400000000000000A73210330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD02074473045022100CAB9A6F84026D57B05760D5E2395FB7BE86BF39F10DC6E2E69DC91238EE0970B022058EC36A8EF9EE65F5D0D8CAC4E88C8C19FEF39E40F53D4CCECBB59701D6D1E838114623B8DA4A0BFB3B61AB423391A182DC693DC159E"
}
</code></pre></div>
<div class="code_sample" id="code-2-1" style="position: static;"><pre><code class="json">{
"method":"submit",
"params":[
{
"tx_blob":"1200052280000000240000000268400000000000000A73210330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD02074473045022100CAB9A6F84026D57B05760D5E2395FB7BE86BF39F10DC6E2E69DC91238EE0970B022058EC36A8EF9EE65F5D0D8CAC4E88C8C19FEF39E40F53D4CCECBB59701D6D1E838114623B8DA4A0BFB3B61AB423391A182DC693DC159E"
}
]
}
</code></pre></div>
<div class="code_sample" id="code-2-2" style="position: static;"><pre><code class="sh">#Syntax: submit tx_blob
rippled submit 1200052280000000240000000268400000000000000A73210330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD02074473045022100CAB9A6F84026D57B05760D5E2395FB7BE86BF39F10DC6E2E69DC91238EE0970B022058EC36A8EF9EE65F5D0D8CAC4E88C8C19FEF39E40F53D4CCECBB59701D6D1E838114623B8DA4A0BFB3B61AB423391A182DC693DC159E
</code></pre></div>
</div>
<h4 id="response-format-1">Response Format</h4>
<p>An example of a successful response:</p>
<div class="multicode" id="code-3"><ul class="codetabs"><li><a href="#code-3-0">WebSocket</a></li><li><a href="#code-3-1">JSON-RPC</a></li><li><a href="#code-3-2">Commandline</a></li></ul>
<div class="code_sample" id="code-3-0" style="position: static;"><pre><code class="json">{
"result": {
"engine_result": "tesSUCCESS",
"engine_result_code": 0,
"engine_result_message": "The transaction was applied. Only final in a validated ledger.",
"tx_blob": "1200052280000000240000000268400000000000000A73210330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD02074473045022100CAB9A6F84026D57B05760D5E2395FB7BE86BF39F10DC6E2E69DC91238EE0970B022058EC36A8EF9EE65F5D0D8CAC4E88C8C19FEF39E40F53D4CCECBB59701D6D1E838114623B8DA4A0BFB3B61AB423391A182DC693DC159E",
"tx_json": {
"Account": "r9xQZdFGwbwTB3g9ncKByWZ3du6Skm7gQ8",
"Fee": "10",
"Flags": 2147483648,
"Sequence": 2,
"SigningPubKey": "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
"TransactionType": "SetRegularKey",
"TxnSignature": "3045022100CAB9A6F84026D57B05760D5E2395FB7BE86BF39F10DC6E2E69DC91238EE0970B022058EC36A8EF9EE65F5D0D8CAC4E88C8C19FEF39E40F53D4CCECBB59701D6D1E83",
"hash": "59BCAB8E5B9D4597D6A7BFF22F6C555D0F41420599A2E126035B6AF19261AD97"
}
},
"status": "success",
"type": "response"
}
</code></pre></div>
<div class="code_sample" id="code-3-1" style="position: static;"><pre><code class="json">{
"result": {
"engine_result": "tesSUCCESS",
"engine_result_code": 0,
"engine_result_message": "The transaction was applied. Only final in a validated ledger.",
"status": "success",
"tx_blob": "1200052280000000240000000268400000000000000A73210330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD02074473045022100CAB9A6F84026D57B05760D5E2395FB7BE86BF39F10DC6E2E69DC91238EE0970B022058EC36A8EF9EE65F5D0D8CAC4E88C8C19FEF39E40F53D4CCECBB59701D6D1E838114623B8DA4A0BFB3B61AB423391A182DC693DC159E",
"tx_json": {
"Account": "r9xQZdFGwbwTB3g9ncKByWZ3du6Skm7gQ8",
"Fee": "10",
"Flags": 2147483648,
"Sequence": 2,
"SigningPubKey": "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
"TransactionType": "SetRegularKey",
"TxnSignature": "3045022100CAB9A6F84026D57B05760D5E2395FB7BE86BF39F10DC6E2E69DC91238EE0970B022058EC36A8EF9EE65F5D0D8CAC4E88C8C19FEF39E40F53D4CCECBB59701D6D1E83",
"hash": "59BCAB8E5B9D4597D6A7BFF22F6C555D0F41420599A2E126035B6AF19261AD97"
}
}
}
</code></pre></div>
<div class="code_sample" id="code-3-2" style="position: static;"><pre><code class="json">{
"result" : {
"engine_result" : "tesSUCCESS",
"engine_result_code" : 0,
"engine_result_message" : "The transaction was applied. Only final in a validated ledger.",
"status" : "success",
"tx_blob" : "1200052280000000240000000268400000000000000A73210330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD02074473045022100CAB9A6F84026D57B05760D5E2395FB7BE86BF39F10DC6E2E69DC91238EE0970B022058EC36A8EF9EE65F5D0D8CAC4E88C8C19FEF39E40F53D4CCECBB59701D6D1E838114623B8DA4A0BFB3B61AB423391A182DC693DC159E",
"tx_json" : {
"Account" : "r9xQZdFGwbwTB3g9ncKByWZ3du6Skm7gQ8",
"Fee" : "10",
"Flags" : 2147483648,
"Sequence" : 2,
"SigningPubKey" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
"TransactionType" : "SetRegularKey",
"TxnSignature" : "3045022100CAB9A6F84026D57B05760D5E2395FB7BE86BF39F10DC6E2E69DC91238EE0970B022058EC36A8EF9EE65F5D0D8CAC4E88C8C19FEF39E40F53D4CCECBB59701D6D1E83",
"hash" : "59BCAB8E5B9D4597D6A7BFF22F6C555D0F41420599A2E126035B6AF19261AD97"
}
}
}
</code></pre></div>
</div>
<p>The way to verify that regular key pair removal succeeded is to confirm that you can't send a transaction using the removed regular private key.</p>
<p>Here's an example error response for an <a href="accountset.html">AccountSet transaction</a> signed using the regular private key removed by the <code>SetRegularKey</code> transaction above.</p>
<h3 id="response-format-2">Response Format</h3>
<p>An example of a successful response:</p>
<div class="multicode" id="code-4"><ul class="codetabs"><li><a href="#code-4-0">WebSocket</a></li><li><a href="#code-4-1">JSON-RPC</a></li><li><a href="#code-4-2">Commandline</a></li></ul>
<div class="code_sample" id="code-4-0" style="position: static;"><pre><code class="json">{
"error": "badSecret",
"error_code": 41,
"error_message": "Secret does not match account.",
"request": {
"command": "submit",
"secret": "snoPBrXtMeMyMHUVTgbuqAfg1SUTb",
"tx_json": {
"Account": "r9xQZdFGwbwTB3g9ncKByWZ3du6Skm7gQ8",
"TransactionType": "AccountSet"
}
},
"status": "error",
"type": "response"
}
</code></pre></div>
<div class="code_sample" id="code-4-1" style="position: static;"><pre><code class="json">{
"result": {
"error": "badSecret",
"error_code": 41,
"error_message": "Secret does not match account.",
"request": {
"command": "submit",
"secret": "snoPBrXtMeMyMHUVTgbuqAfg1SUTb",
"tx_json": {
"Account": "r9xQZdFGwbwTB3g9ncKByWZ3du6Skm7gQ8",
"TransactionType": "AccountSet"
}
},
"status": "error"
}
}
</code></pre></div>
<div class="code_sample" id="code-4-2" style="position: static;"><pre><code class="json">{
"result" : {
"error" : "badSecret",
"error_code" : 41,
"error_message" : "Secret does not match account.",
"request" : {
"command" : "submit",
"secret" : "snoPBrXtMeMyMHUVTgbuqAfg1SUTb",
"tx_json" : {
"Account" : "r9xQZdFGwbwTB3g9ncKByWZ3du6Skm7gQ8",
"TransactionType" : "AccountSet"
}
},
"status" : "error"
}
}
</code></pre></div>
</div>
<p>In some cases, you can even use the <code>SetRegularKey</code> transaction to send a <a href="transaction-cost.html#key-reset-transaction">key reset transaction</a> without paying the <a href="transaction-cost.html">transaction cost</a>. With the enablement of the FeeEscalation amendment, <code>rippled</code> prioritizes key reset transactions above other transactions even though the nominal transaction cost of a key reset transaction is zero.</p>
<!-- -->
<!-- -->
<!-- API object types -->
<!-- -->
<!-- -->
<!-- -->
<!-- rippled release notes links -->
</div>
</article>
</main>
<!-- Left sidebar last so it's at the end for mobile -->
<aside class="sidebar col-md-5 col-lg-3 p-0 order-md-1" role="complementary">
<div class="tree_nav">
<!---->
<div class="sidenav_parent">
<a href="tutorials.html"> Tutorials</a>
</div>
<!---->
<!---->
<div id="sidenav" role="tablist" aria-multiselectable="true">
<!---->
<div class="card">
<div class="card-header" role="tab" id="sidenav_cat_head_2">
<a class="collapsed sidenav_cat_toggler" role="button" data-toggle="collapse" href="#sidenav_collapse_2" aria-expanded="true" aria-controls="sidenav_collapse_2"></a>
<h5 class="card-title">
<a class="sidenav_cat_title" href="get-started.html">Get Started</a>
<!-- <a class="sidenav_cat_title" href="get-started.html">Get Started</a> -->
</h5>
</div><!-- /.card-header -->
<div id="sidenav_collapse_2" class="collapse" role="tabpanel" aria-labelledby="sidenav_cat_head_2">
<div class="card-body">
<ul class="sidebar_pagelist">
<li><a class="nosubcat-page" href="get-started-with-the-rippled-api.html">Get Started with XAG Ledger APIs</a></li>
<li><a class="nosubcat-page" href="set-up-secure-signing.html">Set Up Secure Signing</a></li>
<li><a class="nosubcat-page" href="get-started-with-rippleapi-for-javascript.html">Get Started with RippleAPI for JavaScript</a></li>
<li><a class="nosubcat-page" href="look-up-transaction-results.html">Look Up Transaction Results</a></li>
<li><a class="nosubcat-page" href="monitor-incoming-payments-with-websocket.html">Monitor Incoming Payments with WebSocket</a></li>
</ul>
</div><!-- /.card-body -->
</div><!-- /#sidenav_collapse2 -->
</div><!-- /.card -->
<!---->
<div class="card active">
<div class="card-header" role="tab" id="sidenav_cat_head_12">
<a class="sidenav_cat_toggler" role="button" data-toggle="collapse" href="#sidenav_collapse_12" aria-expanded="true" aria-controls="sidenav_collapse_12"></a>
<h5 class="card-title">
<a class="sidenav_cat_title active-parent" href="manage-account-settings.html">Manage Account Settings</a>
<!-- <a class="sidenav_cat_title" href="manage-account-settings.html">Manage Account Settings</a> -->
</h5>
</div><!-- /.card-header -->
<div id="sidenav_collapse_12" class="collapse show" role="tabpanel" aria-labelledby="sidenav_cat_head_12">
<div class="card-body">
<ul class="sidebar_pagelist">
<li><a class="nosubcat-page" href="assign-a-regular-key-pair.html">Assign a Regular Key Pair</a></li>
<li><a class="active nosubcat-page" href="change-or-remove-a-regular-key-pair.html">Change or Remove a Regular Key Pair</a></li>
<li><a class="nosubcat-page" href="disable-master-key-pair.html">Disable Master Key Pair</a></li>
<li><a class="nosubcat-page" href="set-up-multi-signing.html">Set Up Multi-Signing</a></li>
<li><a class="nosubcat-page" href="send-a-multi-signed-transaction.html">Send a Multi-Signed Transaction</a></li>
<li><a class="nosubcat-page" href="require-destination-tags.html">Require Destination Tags</a></li>
</ul>
</div><!-- /.card-body -->
</div><!-- /#sidenav_collapse12 -->
</div><!-- /.card -->
<!---->
<div class="card">
<div class="card-header" role="tab" id="sidenav_cat_head_35">
<a class="collapsed sidenav_cat_toggler" role="button" data-toggle="collapse" href="#sidenav_collapse_35" aria-expanded="true" aria-controls="sidenav_collapse_35"></a>
<h5 class="card-title">
<a class="sidenav_cat_title" href="XAG-ledger-businesses.html">XAG Ledger Businesses</a>
<!-- <a class="sidenav_cat_title" href="XAG-ledger-businesses.html">XAG Ledger Businesses</a> -->
</h5>
</div><!-- /.card-header -->
<div id="sidenav_collapse_35" class="collapse" role="tabpanel" aria-labelledby="sidenav_cat_head_35">
<div class="card-body">
<ul class="sidebar_pagelist">
<li><a class="nosubcat-page" href="list-xag-as-an-exchange.html">List XAG as an Exchange</a></li>
<li><a class="nosubcat-page" href="list-your-exchange-on-xag-charts.html">List Your Exchange on XAG Charts</a></li>
</ul>
</div><!-- /.card-body -->
</div><!-- /#sidenav_collapse35 -->
</div><!-- /.card -->
<!---->
</div><!-- /#sidenav -->
</div><!-- /.tree_nav --> </aside>
</div><!--/.row (main layout)-->
</div>
<!-- Jump to top button -->
<a href="#main_content_wrapper" class="jump-to-top btn btn-primary btn-lg" role="button" title="Jump to top of page">Top</a>
<script type="text/javascript" src="assets/js/jump-to-top.js"></script>
<!-- Non-blocking resources -->
<!-- Bootstrap JS -->
<script src="assets/vendor/bootstrap.min.js"></script>
<!-- fontawesome icons -->
<link rel="stylesheet" href="assets/vendor/fontawesome/css/font-awesome.min.css" />
<!-- Algolia DocSearch -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
<script type="text/javascript"> docsearch({
apiKey: '70de5b9b8ef95460f3c6e04054b325b2',
indexName: 'XAGl',
inputSelector: '#topsearchbar',
algoliaOptions: { 'facetFilters': ["lang:en"] },
debug: false
});
</script>
<script type="application/javascript">
gtag('set', {'content_group1': 'Content Docs'});
</script>
</body>
</html>