@@ -180,6 +180,7 @@ typedef enum Token_TokenInstruction_Tag {
180
180
/* *
181
181
* Approves a delegate. A delegate is given the authority over
182
182
* tokens on behalf of the source account's owner.
183
+ *
183
184
* Accounts expected by this instruction:
184
185
*
185
186
* * Single owner
@@ -311,6 +312,96 @@ typedef enum Token_TokenInstruction_Tag {
311
312
* 3. ..3+M '[signer]' M signer accounts.
312
313
*/
313
314
Token_TokenInstruction_ThawAccount,
315
+ /* *
316
+ * Transfers tokens from one account to another either directly or via a delegate. If this
317
+ * account is associated with the native mint then equal amounts of SOL and Tokens will be
318
+ * transferred to the destination account.
319
+ *
320
+ * This instruction differs from Transfer in that the token mint and decimals value is
321
+ * asserted by the caller. This may be useful when creating transactions offline or within a
322
+ * hardware wallet.
323
+ *
324
+ * Accounts expected by this instruction:
325
+ *
326
+ * * Single owner/delegate
327
+ * 0. `[writable]` The source account.
328
+ * 1. '[]' The token mint.
329
+ * 2. `[writable]` The destination account.
330
+ * 3. '[signer]' The source account's owner/delegate.
331
+ *
332
+ * * Multisignature owner/delegate
333
+ * 0. `[writable]` The source account.
334
+ * 1. '[]' The token mint.
335
+ * 2. `[writable]` The destination account.
336
+ * 3. '[]' The source account's multisignature owner/delegate.
337
+ * 4. ..4+M '[signer]' M signer accounts.
338
+ */
339
+ Token_TokenInstruction_Transfer2,
340
+ /* *
341
+ * Approves a delegate. A delegate is given the authority over
342
+ * tokens on behalf of the source account's owner.
343
+ *
344
+ * This instruction differs from Approve in that the token mint and decimals value is asserted
345
+ * by the caller. This may be useful when creating transactions offline or within a hardware
346
+ * wallet.
347
+ *
348
+ * Accounts expected by this instruction:
349
+ *
350
+ * * Single owner
351
+ * 0. `[writable]` The source account.
352
+ * 1. '[]' The token mint.
353
+ * 2. `[]` The delegate.
354
+ * 3. `[signer]` The source account owner.
355
+ *
356
+ * * Multisignature owner
357
+ * 0. `[writable]` The source account.
358
+ * 1. '[]' The token mint.
359
+ * 2. `[]` The delegate.
360
+ * 3. '[]' The source account's multisignature owner.
361
+ * 4. ..4+M '[signer]' M signer accounts
362
+ */
363
+ Token_TokenInstruction_Approve2,
364
+ /* *
365
+ * Mints new tokens to an account. The native mint does not support minting.
366
+ *
367
+ * This instruction differs from MintTo in that the decimals value is asserted by the
368
+ * caller. This may be useful when creating transactions offline or within a hardware wallet.
369
+ *
370
+ * Accounts expected by this instruction:
371
+ *
372
+ * * Single authority
373
+ * 0. `[writable]` The mint.
374
+ * 1. `[writable]` The account to mint tokens to.
375
+ * 2. `[signer]` The mint's minting authority.
376
+ *
377
+ * * Multisignature authority
378
+ * 0. `[writable]` The mint.
379
+ * 1. `[writable]` The account to mint tokens to.
380
+ * 2. `[]` The mint's multisignature mint-tokens authority.
381
+ * 3. ..3+M '[signer]' M signer accounts.
382
+ */
383
+ Token_TokenInstruction_MintTo2,
384
+ /* *
385
+ * Burns tokens by removing them from an account. `Burn2` does not support accounts
386
+ * associated with the native mint, use `CloseAccount` instead.
387
+ *
388
+ * This instruction differs from Burn in that the decimals value is asserted by the caller.
389
+ * This may be useful when creating transactions offline or within a hardware wallet.
390
+ *
391
+ * Accounts expected by this instruction:
392
+ *
393
+ * * Single owner/delegate
394
+ * 0. `[writable]` The account to burn from.
395
+ * 1. '[writable]' The token mint.
396
+ * 2. `[signer]` The account's owner/delegate.
397
+ *
398
+ * * Multisignature owner/delegate
399
+ * 0. `[writable]` The account to burn from.
400
+ * 1. '[writable]' The token mint.
401
+ * 2. `[]` The account's multisignature owner/delegate.
402
+ * 3. ..3+M '[signer]' M signer accounts.
403
+ */
404
+ Token_TokenInstruction_Burn2,
314
405
} Token_TokenInstruction_Tag;
315
406
316
407
typedef struct Token_TokenInstruction_Token_InitializeMint_Body {
@@ -374,6 +465,50 @@ typedef struct Token_TokenInstruction_Token_Burn_Body {
374
465
uint64_t amount;
375
466
} Token_TokenInstruction_Token_Burn_Body;
376
467
468
+ typedef struct Token_TokenInstruction_Token_Transfer2_Body {
469
+ /* *
470
+ * The amount of tokens to transfer.
471
+ */
472
+ uint64_t amount;
473
+ /* *
474
+ * Expected number of base 10 digits to the right of the decimal place.
475
+ */
476
+ uint8_t decimals;
477
+ } Token_TokenInstruction_Token_Transfer2_Body;
478
+
479
+ typedef struct Token_TokenInstruction_Token_Approve2_Body {
480
+ /* *
481
+ * The amount of tokens the delegate is approved for.
482
+ */
483
+ uint64_t amount;
484
+ /* *
485
+ * Expected number of base 10 digits to the right of the decimal place.
486
+ */
487
+ uint8_t decimals;
488
+ } Token_TokenInstruction_Token_Approve2_Body;
489
+
490
+ typedef struct Token_TokenInstruction_Token_MintTo2_Body {
491
+ /* *
492
+ * The amount of new tokens to mint.
493
+ */
494
+ uint64_t amount;
495
+ /* *
496
+ * Expected number of base 10 digits to the right of the decimal place.
497
+ */
498
+ uint8_t decimals;
499
+ } Token_TokenInstruction_Token_MintTo2_Body;
500
+
501
+ typedef struct Token_TokenInstruction_Token_Burn2_Body {
502
+ /* *
503
+ * The amount of tokens to burn.
504
+ */
505
+ uint64_t amount;
506
+ /* *
507
+ * Expected number of base 10 digits to the right of the decimal place.
508
+ */
509
+ uint8_t decimals;
510
+ } Token_TokenInstruction_Token_Burn2_Body;
511
+
377
512
typedef struct Token_TokenInstruction {
378
513
Token_TokenInstruction_Tag tag;
379
514
union {
@@ -384,6 +519,10 @@ typedef struct Token_TokenInstruction {
384
519
Token_TokenInstruction_Token_SetAuthority_Body set_authority;
385
520
Token_TokenInstruction_Token_MintTo_Body mint_to;
386
521
Token_TokenInstruction_Token_Burn_Body burn;
522
+ Token_TokenInstruction_Token_Transfer2_Body transfer2;
523
+ Token_TokenInstruction_Token_Approve2_Body approve2;
524
+ Token_TokenInstruction_Token_MintTo2_Body mint_to2;
525
+ Token_TokenInstruction_Token_Burn2_Body burn2;
387
526
};
388
527
} Token_TokenInstruction;
389
528
0 commit comments