Skip to content

Models

spl.token.models

Pydantic models for SPL token types.

These are the Pydantic successors to the deprecated NamedTuple types in :mod:spl.token.core (account/mint info) and :mod:spl.token.instructions (instruction params). They carry the same field names and defaults, so migrating is a matter of changing the import path.

AccountInfo

Information about an account.

Source code in src/spl/token/models.py
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
class AccountInfo(PydanticModel):
    """Information about an account."""

    mint: Pubkey
    """The mint associated with this account."""
    owner: Pubkey
    """Owner of this account."""
    amount: int
    """Amount of tokens this account holds."""
    delegate: Optional[Pubkey]
    """The delegate for this account."""
    delegated_amount: int
    """The amount of tokens the delegate authorized to the delegate."""
    is_initialized: bool
    """ Is this account initialized."""
    is_frozen: bool
    """Is this account frozen."""
    is_native: bool
    """Is this a native token account."""
    rent_exempt_reserve: Optional[int]
    """If this account is a native token, it must be rent-exempt.

    This value logs the rent-exempt reserve which must remain in the balance
    until the account is closed.
    """
    close_authority: Optional[Pubkey]
    """Optional authority to close the account."""

amount instance-attribute

Amount of tokens this account holds.

close_authority instance-attribute

Optional authority to close the account.

delegate instance-attribute

The delegate for this account.

delegated_amount instance-attribute

The amount of tokens the delegate authorized to the delegate.

is_frozen instance-attribute

Is this account frozen.

is_initialized instance-attribute

Is this account initialized.

is_native instance-attribute

Is this a native token account.

mint instance-attribute

The mint associated with this account.

owner instance-attribute

Owner of this account.

rent_exempt_reserve instance-attribute

If this account is a native token, it must be rent-exempt.

This value logs the rent-exempt reserve which must remain in the balance until the account is closed.

AmountToUiAmountParams

AmountToUiAmount token transaction params.

Source code in src/spl/token/models.py
486
487
488
489
490
491
492
493
494
class AmountToUiAmountParams(PydanticModel):
    """AmountToUiAmount token transaction params."""

    program_id: Pubkey
    """SPL Token program account."""
    mint: Pubkey
    """Mint to use for conversion."""
    amount: int
    """Amount of tokens to reformat."""

amount instance-attribute

Amount of tokens to reformat.

mint instance-attribute

Mint to use for conversion.

program_id instance-attribute

SPL Token program account.

ApproveCheckedParams

ApproveChecked token transaction params.

Source code in src/spl/token/models.py
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
class ApproveCheckedParams(PydanticModel):
    """ApproveChecked token transaction params."""

    program_id: Pubkey
    """SPL Token program account."""
    source: Pubkey
    """Source account."""
    mint: Pubkey
    """Public key of the minter account."""
    delegate: Pubkey
    """Delegate account authorized to perform a transfer of tokens from the source account."""
    owner: Pubkey
    """Owner of the source account."""
    amount: int
    """Maximum number of tokens the delegate may transfer."""
    decimals: int
    """Amount decimals."""
    signers: List[Pubkey] = []
    """Signing accounts if `owner` is a multiSig."""

amount instance-attribute

Maximum number of tokens the delegate may transfer.

decimals instance-attribute

Amount decimals.

delegate instance-attribute

Delegate account authorized to perform a transfer of tokens from the source account.

mint instance-attribute

Public key of the minter account.

owner instance-attribute

Owner of the source account.

program_id instance-attribute

SPL Token program account.

signers = [] class-attribute instance-attribute

Signing accounts if owner is a multiSig.

source instance-attribute

Source account.

ApproveParams

Approve token transaction params.

Source code in src/spl/token/models.py
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
class ApproveParams(PydanticModel):
    """Approve token transaction params."""

    program_id: Pubkey
    """SPL Token program account."""
    source: Pubkey
    """Source account."""
    delegate: Pubkey
    """Delegate account authorized to perform a transfer of tokens from the source account."""
    owner: Pubkey
    """Owner of the source account."""
    amount: int
    """Maximum number of tokens the delegate may transfer."""
    signers: List[Pubkey] = []
    """Signing accounts if `owner` is a multiSig."""

amount instance-attribute

Maximum number of tokens the delegate may transfer.

delegate instance-attribute

Delegate account authorized to perform a transfer of tokens from the source account.

owner instance-attribute

Owner of the source account.

program_id instance-attribute

SPL Token program account.

signers = [] class-attribute instance-attribute

Signing accounts if owner is a multiSig.

source instance-attribute

Source account.

AuthorityType

Specifies the authority type for SetAuthority instructions.

Source code in src/spl/token/models.py
19
20
21
22
23
24
25
26
27
28
29
class AuthorityType(IntEnum):
    """Specifies the authority type for SetAuthority instructions."""

    MINT_TOKENS = 0
    """"Authority to mint new tokens."""
    FREEZE_ACCOUNT = 1
    """Authority to freeze any account associated with the Mint."""
    ACCOUNT_OWNER = 2
    """Owner of a given token account."""
    CLOSE_ACCOUNT = 3
    """Authority to close a token account."""

ACCOUNT_OWNER = 2 class-attribute instance-attribute

Owner of a given token account.

CLOSE_ACCOUNT = 3 class-attribute instance-attribute

Authority to close a token account.

FREEZE_ACCOUNT = 1 class-attribute instance-attribute

Authority to freeze any account associated with the Mint.

MINT_TOKENS = 0 class-attribute instance-attribute

"Authority to mint new tokens.

BurnCheckedParams

BurnChecked token transaction params.

Source code in src/spl/token/models.py
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
class BurnCheckedParams(PydanticModel):
    """BurnChecked token transaction params."""

    program_id: Pubkey
    """SPL Token program account."""
    mint: Pubkey
    """Public key of the minter account."""
    account: Pubkey
    """Account to burn tokens from."""
    owner: Pubkey
    """Owner of the account."""
    amount: int
    """Amount to burn."""
    decimals: int
    """Amount decimals."""
    signers: List[Pubkey] = []
    """Signing accounts if `owner` is a multiSig"""

account instance-attribute

Account to burn tokens from.

amount instance-attribute

Amount to burn.

decimals instance-attribute

Amount decimals.

mint instance-attribute

Public key of the minter account.

owner instance-attribute

Owner of the account.

program_id instance-attribute

SPL Token program account.

signers = [] class-attribute instance-attribute

Signing accounts if owner is a multiSig

BurnParams

Burn token transaction params.

Source code in src/spl/token/models.py
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
class BurnParams(PydanticModel):
    """Burn token transaction params."""

    program_id: Pubkey
    """SPL Token program account."""
    account: Pubkey
    """Account to burn tokens from."""
    mint: Pubkey
    """Public key of the minter account."""
    owner: Pubkey
    """Owner of the account."""
    amount: int
    """Amount to burn."""
    signers: List[Pubkey] = []
    """Signing accounts if `owner` is a multiSig"""

account instance-attribute

Account to burn tokens from.

amount instance-attribute

Amount to burn.

mint instance-attribute

Public key of the minter account.

owner instance-attribute

Owner of the account.

program_id instance-attribute

SPL Token program account.

signers = [] class-attribute instance-attribute

Signing accounts if owner is a multiSig

CloseAccountParams

Close token account transaction params.

Source code in src/spl/token/models.py
274
275
276
277
278
279
280
281
282
283
284
285
286
class CloseAccountParams(PydanticModel):
    """Close token account transaction params."""

    program_id: Pubkey
    """SPL Token program account."""
    account: Pubkey
    """Address of account to close."""
    dest: Pubkey
    """Address of account to receive the remaining balance of the closed account."""
    owner: Pubkey
    """Owner of the account."""
    signers: List[Pubkey] = []
    """Signing accounts if `owner` is a multiSig"""

account instance-attribute

Address of account to close.

dest instance-attribute

Address of account to receive the remaining balance of the closed account.

owner instance-attribute

Owner of the account.

program_id instance-attribute

SPL Token program account.

signers = [] class-attribute instance-attribute

Signing accounts if owner is a multiSig

FreezeAccountParams

Freeze token account transaction params.

Source code in src/spl/token/models.py
289
290
291
292
293
294
295
296
297
298
299
300
301
class FreezeAccountParams(PydanticModel):
    """Freeze token account transaction params."""

    program_id: Pubkey
    """SPL Token program account."""
    account: Pubkey
    """Account to freeze."""
    mint: Pubkey
    """Public key of the minter account."""
    authority: Pubkey
    """Mint freeze authority"""
    multi_signers: List[Pubkey] = []
    """Signing accounts if `authority` is a multiSig"""

account instance-attribute

Account to freeze.

authority instance-attribute

Mint freeze authority

mint instance-attribute

Public key of the minter account.

multi_signers = [] class-attribute instance-attribute

Signing accounts if authority is a multiSig

program_id instance-attribute

SPL Token program account.

GetAccountDataSizeParams

GetAccountDataSize token transaction params.

Source code in src/spl/token/models.py
408
409
410
411
412
413
414
class GetAccountDataSizeParams(PydanticModel):
    """GetAccountDataSize token transaction params."""

    program_id: Pubkey
    """SPL Token program account."""
    mint: Pubkey
    """Mint to calculate account size for."""

mint instance-attribute

Mint to calculate account size for.

program_id instance-attribute

SPL Token program account.

HarvestWithheldTokensToMintParams

HarvestWithheldTokensToMint token transaction params.

Source code in src/spl/token/models.py
475
476
477
478
479
480
481
482
483
class HarvestWithheldTokensToMintParams(PydanticModel):
    """HarvestWithheldTokensToMint token transaction params."""

    program_id: Pubkey
    """SPL Token 2022 program account."""
    mint: Pubkey
    """Mint to harvest withheld tokens to."""
    sources: List[Pubkey] = []
    """Token accounts to harvest withheld tokens from."""

mint instance-attribute

Mint to harvest withheld tokens to.

program_id instance-attribute

SPL Token 2022 program account.

sources = [] class-attribute instance-attribute

Token accounts to harvest withheld tokens from.

InitializeAccount2Params

Initialize token account transaction params with owner in instruction data.

Source code in src/spl/token/models.py
124
125
126
127
128
129
130
131
132
133
134
class InitializeAccount2Params(PydanticModel):
    """Initialize token account transaction params with owner in instruction data."""

    program_id: Pubkey
    """SPL Token program account."""
    account: Pubkey
    """Public key of the new account."""
    mint: Pubkey
    """Public key of the minter account."""
    owner: Pubkey
    """Owner of the new account."""

account instance-attribute

Public key of the new account.

mint instance-attribute

Public key of the minter account.

owner instance-attribute

Owner of the new account.

program_id instance-attribute

SPL Token program account.

InitializeAccount3Params

Initialize token account transaction params with owner in instruction data and no Rent sysvar.

Source code in src/spl/token/models.py
137
138
139
140
141
142
143
144
145
146
147
class InitializeAccount3Params(PydanticModel):
    """Initialize token account transaction params with owner in instruction data and no Rent sysvar."""

    program_id: Pubkey
    """SPL Token program account."""
    account: Pubkey
    """Public key of the new account."""
    mint: Pubkey
    """Public key of the minter account."""
    owner: Pubkey
    """Owner of the new account."""

account instance-attribute

Public key of the new account.

mint instance-attribute

Public key of the minter account.

owner instance-attribute

Owner of the new account.

program_id instance-attribute

SPL Token program account.

InitializeAccountParams

Initialize token account transaction params.

Source code in src/spl/token/models.py
111
112
113
114
115
116
117
118
119
120
121
class InitializeAccountParams(PydanticModel):
    """Initialize token account transaction params."""

    program_id: Pubkey
    """SPL Token program account."""
    account: Pubkey
    """Public key of the new account."""
    mint: Pubkey
    """Public key of the minter account."""
    owner: Pubkey
    """Owner of the new account."""

account instance-attribute

Public key of the new account.

mint instance-attribute

Public key of the minter account.

owner instance-attribute

Owner of the new account.

program_id instance-attribute

SPL Token program account.

InitializeImmutableOwnerParams

InitializeImmutableOwner token transaction params.

Source code in src/spl/token/models.py
417
418
419
420
421
422
423
class InitializeImmutableOwnerParams(PydanticModel):
    """InitializeImmutableOwner token transaction params."""

    program_id: Pubkey
    """SPL Token program account."""
    account: Pubkey
    """Token account to initialize immutable owner for."""

account instance-attribute

Token account to initialize immutable owner for.

program_id instance-attribute

SPL Token program account.

InitializeMint2Params

Initialize token mint transaction params without Rent sysvar.

Source code in src/spl/token/models.py
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
class InitializeMint2Params(PydanticModel):
    """Initialize token mint transaction params without Rent sysvar."""

    decimals: int
    """Number of base 10 digits to the right of the decimal place."""
    program_id: Pubkey
    """SPL Token program account."""
    mint: Pubkey
    """Public key of the minter account."""
    mint_authority: Pubkey
    """The authority/multisignature to mint tokens."""
    freeze_authority: Optional[Pubkey] = None
    """The freeze authority/multisignature of the mint."""

decimals instance-attribute

Number of base 10 digits to the right of the decimal place.

freeze_authority = None class-attribute instance-attribute

The freeze authority/multisignature of the mint.

mint instance-attribute

Public key of the minter account.

mint_authority instance-attribute

The authority/multisignature to mint tokens.

program_id instance-attribute

SPL Token program account.

InitializeMintParams

Initialize token mint transaction params.

Source code in src/spl/token/models.py
81
82
83
84
85
86
87
88
89
90
91
92
93
class InitializeMintParams(PydanticModel):
    """Initialize token mint transaction params."""

    decimals: int
    """Number of base 10 digits to the right of the decimal place."""
    program_id: Pubkey
    """SPL Token program account."""
    mint: Pubkey
    """Public key of the minter account."""
    mint_authority: Pubkey
    """The authority/multisignature to mint tokens."""
    freeze_authority: Optional[Pubkey] = None
    """The freeze authority/multisignature of the mint."""

decimals instance-attribute

Number of base 10 digits to the right of the decimal place.

freeze_authority = None class-attribute instance-attribute

The freeze authority/multisignature of the mint.

mint instance-attribute

Public key of the minter account.

mint_authority instance-attribute

The authority/multisignature to mint tokens.

program_id instance-attribute

SPL Token program account.

InitializeMultisig2Params

Initialize multisig token account transaction params without Rent sysvar.

Source code in src/spl/token/models.py
163
164
165
166
167
168
169
170
171
172
173
class InitializeMultisig2Params(PydanticModel):
    """Initialize multisig token account transaction params without Rent sysvar."""

    program_id: Pubkey
    """SPL Token program account."""
    multisig: Pubkey
    """New multisig account address."""
    m: int
    """The number of signers (M) required to validate this multisignature account."""
    signers: List[Pubkey] = []
    """Addresses of multisig signers."""

m instance-attribute

The number of signers (M) required to validate this multisignature account.

multisig instance-attribute

New multisig account address.

program_id instance-attribute

SPL Token program account.

signers = [] class-attribute instance-attribute

Addresses of multisig signers.

InitializeMultisigParams

Initialize multisig token account transaction params.

Source code in src/spl/token/models.py
150
151
152
153
154
155
156
157
158
159
160
class InitializeMultisigParams(PydanticModel):
    """Initialize multisig token account transaction params."""

    program_id: Pubkey
    """SPL Token program account."""
    multisig: Pubkey
    """New multisig account address."""
    m: int
    """The number of signers (M) required to validate this multisignature account."""
    signers: List[Pubkey] = []
    """Addresses of multisig signers."""

m instance-attribute

The number of signers (M) required to validate this multisignature account.

multisig instance-attribute

New multisig account address.

program_id instance-attribute

SPL Token program account.

signers = [] class-attribute instance-attribute

Addresses of multisig signers.

InitializeTransferFeeConfigParams

InitializeTransferFeeConfig token transaction params.

Source code in src/spl/token/models.py
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
class InitializeTransferFeeConfigParams(PydanticModel):
    """InitializeTransferFeeConfig token transaction params."""

    program_id: Pubkey
    """SPL Token 2022 program account."""
    mint: Pubkey
    """Mint to initialize transfer fee config for."""
    transfer_fee_config_authority: Optional[Pubkey]
    """Authority that may update the transfer fee config."""
    withdraw_withheld_authority: Optional[Pubkey]
    """Authority that may withdraw withheld tokens."""
    transfer_fee_basis_points: int
    """Amount of transfer collected as fees, expressed in basis points."""
    maximum_fee: int
    """Maximum fee assessed on transfers."""

maximum_fee instance-attribute

Maximum fee assessed on transfers.

mint instance-attribute

Mint to initialize transfer fee config for.

program_id instance-attribute

SPL Token 2022 program account.

transfer_fee_basis_points instance-attribute

Amount of transfer collected as fees, expressed in basis points.

transfer_fee_config_authority instance-attribute

Authority that may update the transfer fee config.

withdraw_withheld_authority instance-attribute

Authority that may withdraw withheld tokens.

MintInfo

Information about the mint.

Source code in src/spl/token/models.py
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
class MintInfo(PydanticModel):
    """Information about the mint."""

    mint_authority: Optional[Pubkey]
    """"Optional authority used to mint new tokens.

    The mint authority may only be provided during mint creation. If no mint
    authority is present then the mint has a fixed supply and no further tokens
    may be minted.
    """
    supply: int
    """Total supply of tokens."""
    decimals: int
    """Number of base 10 digits to the right of the decimal place."""
    is_initialized: bool
    """Is this mint initialized."""
    freeze_authority: Optional[Pubkey]
    """ Optional authority to freeze token accounts."""

decimals instance-attribute

Number of base 10 digits to the right of the decimal place.

freeze_authority instance-attribute

Optional authority to freeze token accounts.

is_initialized instance-attribute

Is this mint initialized.

mint_authority instance-attribute

"Optional authority used to mint new tokens.

The mint authority may only be provided during mint creation. If no mint authority is present then the mint has a fixed supply and no further tokens may be minted.

supply instance-attribute

Total supply of tokens.

MintToCheckedParams

MintToChecked token transaction params.

Source code in src/spl/token/models.py
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
class MintToCheckedParams(PydanticModel):
    """MintToChecked token transaction params."""

    program_id: Pubkey
    """SPL Token program account."""
    mint: Pubkey
    """Public key of the minter account."""
    dest: Pubkey
    """Public key of the account to mint to."""
    mint_authority: Pubkey
    """The mint authority."""
    amount: int
    """Amount to mint."""
    decimals: int
    """Amount decimals."""
    signers: List[Pubkey] = []
    """Signing accounts if `mint_authority` is a multiSig."""

amount instance-attribute

Amount to mint.

decimals instance-attribute

Amount decimals.

dest instance-attribute

Public key of the account to mint to.

mint instance-attribute

Public key of the minter account.

mint_authority instance-attribute

The mint authority.

program_id instance-attribute

SPL Token program account.

signers = [] class-attribute instance-attribute

Signing accounts if mint_authority is a multiSig.

MintToParams

Mint token transaction params.

Source code in src/spl/token/models.py
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
class MintToParams(PydanticModel):
    """Mint token transaction params."""

    program_id: Pubkey
    """SPL Token program account."""
    mint: Pubkey
    """Public key of the minter account."""
    dest: Pubkey
    """Public key of the account to mint to."""
    mint_authority: Pubkey
    """The mint authority."""
    amount: int
    """Amount to mint."""
    signers: List[Pubkey] = []
    """Signing accounts if `mint_authority` is a multiSig."""

amount instance-attribute

Amount to mint.

dest instance-attribute

Public key of the account to mint to.

mint instance-attribute

Public key of the minter account.

mint_authority instance-attribute

The mint authority.

program_id instance-attribute

SPL Token program account.

signers = [] class-attribute instance-attribute

Signing accounts if mint_authority is a multiSig.

RevokeParams

Revoke token transaction params.

Source code in src/spl/token/models.py
210
211
212
213
214
215
216
217
218
219
220
class RevokeParams(PydanticModel):
    """Revoke token transaction params."""

    program_id: Pubkey
    """SPL Token program account."""
    account: Pubkey
    """Source account for which transfer authority is being revoked."""
    owner: Pubkey
    """Owner of the source account."""
    signers: List[Pubkey] = []
    """Signing accounts if `owner` is a multiSig."""

account instance-attribute

Source account for which transfer authority is being revoked.

owner instance-attribute

Owner of the source account.

program_id instance-attribute

SPL Token program account.

signers = [] class-attribute instance-attribute

Signing accounts if owner is a multiSig.

SetAuthorityParams

Set token authority transaction params.

Source code in src/spl/token/models.py
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
class SetAuthorityParams(PydanticModel):
    """Set token authority transaction params."""

    program_id: Pubkey
    """SPL Token program account."""
    account: Pubkey
    """Public key of the token account."""
    authority: AuthorityType
    """The type of authority to update."""
    current_authority: Pubkey
    """Current authority of the specified type."""
    signers: List[Pubkey] = []
    """Signing accounts if `current_authority` is a multiSig."""
    new_authority: Optional[Pubkey] = None
    """New authority of the account."""

account instance-attribute

Public key of the token account.

authority instance-attribute

The type of authority to update.

current_authority instance-attribute

Current authority of the specified type.

new_authority = None class-attribute instance-attribute

New authority of the account.

program_id instance-attribute

SPL Token program account.

signers = [] class-attribute instance-attribute

Signing accounts if current_authority is a multiSig.

SyncNativeParams

BurnChecked token transaction params.

Source code in src/spl/token/models.py
399
400
401
402
403
404
405
class SyncNativeParams(PydanticModel):
    """BurnChecked token transaction params."""

    program_id: Pubkey
    """SPL Token program account."""
    account: Pubkey
    """Account to sync."""

account instance-attribute

Account to sync.

program_id instance-attribute

SPL Token program account.

ThawAccountParams

Thaw token account transaction params.

Source code in src/spl/token/models.py
304
305
306
307
308
309
310
311
312
313
314
315
316
class ThawAccountParams(PydanticModel):
    """Thaw token account transaction params."""

    program_id: Pubkey
    """SPL Token program account."""
    account: Pubkey
    """Account to thaw."""
    mint: Pubkey
    """Public key of the minter account."""
    authority: Pubkey
    """Mint freeze authority"""
    multi_signers: List[Pubkey] = []
    """Signing accounts if `authority` is a multiSig"""

account instance-attribute

Account to thaw.

authority instance-attribute

Mint freeze authority

mint instance-attribute

Public key of the minter account.

multi_signers = [] class-attribute instance-attribute

Signing accounts if authority is a multiSig

program_id instance-attribute

SPL Token program account.

TransferCheckedParams

TransferChecked token transaction params.

Source code in src/spl/token/models.py
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
class TransferCheckedParams(PydanticModel):
    """TransferChecked token transaction params."""

    program_id: Pubkey
    """SPL Token program account."""
    source: Pubkey
    """Source account."""
    mint: Pubkey
    """Public key of the minter account."""
    dest: Pubkey
    """Destination account."""
    owner: Pubkey
    """Owner of the source account."""
    amount: int
    """Number of tokens to transfer."""
    decimals: int
    """Amount decimals."""
    signers: List[Pubkey] = []
    """Signing accounts if `owner` is a multiSig."""

amount instance-attribute

Number of tokens to transfer.

decimals instance-attribute

Amount decimals.

dest instance-attribute

Destination account.

mint instance-attribute

Public key of the minter account.

owner instance-attribute

Owner of the source account.

program_id instance-attribute

SPL Token program account.

signers = [] class-attribute instance-attribute

Signing accounts if owner is a multiSig.

source instance-attribute

Source account.

TransferParams

Transfer token transaction params.

Source code in src/spl/token/models.py
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
class TransferParams(PydanticModel):
    """Transfer token transaction params."""

    program_id: Pubkey
    """SPL Token program account."""
    source: Pubkey
    """Source account."""
    dest: Pubkey
    """Destination account."""
    owner: Pubkey
    """Owner of the source account."""
    amount: int
    """Number of tokens to transfer."""
    signers: List[Pubkey] = []
    """Signing accounts if `owner` is a multiSig."""

amount instance-attribute

Number of tokens to transfer.

dest instance-attribute

Destination account.

owner instance-attribute

Owner of the source account.

program_id instance-attribute

SPL Token program account.

signers = [] class-attribute instance-attribute

Signing accounts if owner is a multiSig.

source instance-attribute

Source account.

UiAmountToAmountParams

UiAmountToAmount token transaction params.

Source code in src/spl/token/models.py
497
498
499
500
501
502
503
504
505
class UiAmountToAmountParams(PydanticModel):
    """UiAmountToAmount token transaction params."""

    program_id: Pubkey
    """SPL Token program account."""
    mint: Pubkey
    """Mint to use for conversion."""
    ui_amount: str
    """The ui_amount string to convert."""

mint instance-attribute

Mint to use for conversion.

program_id instance-attribute

SPL Token program account.

ui_amount instance-attribute

The ui_amount string to convert.

WithdrawWithheldTokensFromAccountsParams

WithdrawWithheldTokensFromAccounts token transaction params.

Source code in src/spl/token/models.py
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
class WithdrawWithheldTokensFromAccountsParams(PydanticModel):
    """WithdrawWithheldTokensFromAccounts token transaction params."""

    program_id: Pubkey
    """SPL Token 2022 program account."""
    mint: Pubkey
    """Mint that includes the TransferFeeConfig extension."""
    dest: Pubkey
    """Fee receiver token account."""
    authority: Pubkey
    """Withdraw withheld authority."""
    signers: List[Pubkey] = []
    """Signing accounts if `authority` is a multiSig."""
    sources: List[Pubkey] = []
    """Token accounts to withdraw withheld tokens from."""

authority instance-attribute

Withdraw withheld authority.

dest instance-attribute

Fee receiver token account.

mint instance-attribute

Mint that includes the TransferFeeConfig extension.

program_id instance-attribute

SPL Token 2022 program account.

signers = [] class-attribute instance-attribute

Signing accounts if authority is a multiSig.

sources = [] class-attribute instance-attribute

Token accounts to withdraw withheld tokens from.

WithdrawWithheldTokensFromMintParams

WithdrawWithheldTokensFromMint token transaction params.

Source code in src/spl/token/models.py
460
461
462
463
464
465
466
467
468
469
470
471
472
class WithdrawWithheldTokensFromMintParams(PydanticModel):
    """WithdrawWithheldTokensFromMint token transaction params."""

    program_id: Pubkey
    """SPL Token 2022 program account."""
    mint: Pubkey
    """Mint that includes the TransferFeeConfig extension."""
    dest: Pubkey
    """Fee receiver token account."""
    authority: Pubkey
    """Withdraw withheld authority."""
    signers: List[Pubkey] = []
    """Signing accounts if `authority` is a multiSig."""

authority instance-attribute

Withdraw withheld authority.

dest instance-attribute

Fee receiver token account.

mint instance-attribute

Mint that includes the TransferFeeConfig extension.

program_id instance-attribute

SPL Token 2022 program account.

signers = [] class-attribute instance-attribute

Signing accounts if authority is a multiSig.