Preparing search index...
The search index is not available
@drift-labs/sdk
@drift-labs/sdk
TokenFaucet
Class TokenFaucet
Hierarchy
TokenFaucet
Index
Constructors
constructor
Properties
connection
context?
mint
opts?
program
provider
wallet
Methods
create
Associated
Token
Account
And
Mint
To
create
Associated
Token
Account
And
Mint
To
Instructions
fetch
State
get
Assosciated
MockUSDMint
Address
get
Faucet
Config
Public
Key
get
Faucet
Config
Public
Key
And
Nonce
get
Mint
Authority
get
Token
Account
Info
initialize
mint
To
User
mint
To
User
Ix
subscribe
To
Token
Account
transfer
Mint
Authority
Constructors
constructor
new
Token
Faucet
(
connection
:
Connection
, wallet
:
IWallet
, programId
:
PublicKey
, mint
:
PublicKey
, opts
?:
ConfirmOptions
, context
?:
BankrunContextWrapper
)
:
TokenFaucet
Parameters
connection:
Connection
wallet:
IWallet
programId:
PublicKey
mint:
PublicKey
Optional
opts:
ConfirmOptions
Optional
context:
BankrunContextWrapper
Returns
TokenFaucet
Properties
connection
connection
:
Connection
Optional
context
context
?:
BankrunContextWrapper
mint
mint
:
PublicKey
Optional
opts
opts
?:
ConfirmOptions
program
program
:
Program
<
Idl
>
provider
provider
:
AnchorProvider
wallet
wallet
:
IWallet
Methods
create
Associated
Token
Account
And
Mint
To
create
Associated
Token
Account
And
Mint
To
(
userPublicKey
:
PublicKey
, amount
:
BN
)
:
Promise
<
[
PublicKey
,
string
]
>
Parameters
userPublicKey:
PublicKey
amount:
BN
Returns
Promise
<
[
PublicKey
,
string
]
>
create
Associated
Token
Account
And
Mint
To
Instructions
create
Associated
Token
Account
And
Mint
To
Instructions
(
userPublicKey
:
PublicKey
, amount
:
BN
)
:
Promise
<
[
PublicKey
,
TransactionInstruction
,
TransactionInstruction
]
>
Parameters
userPublicKey:
PublicKey
amount:
BN
Returns
Promise
<
[
PublicKey
,
TransactionInstruction
,
TransactionInstruction
]
>
fetch
State
fetch
State
(
)
:
Promise
<
any
>
Returns
Promise
<
any
>
get
Assosciated
MockUSDMint
Address
get
Assosciated
MockUSDMint
Address
(
props
:
{
userPubKey
:
PublicKey
;
}
)
:
Promise
<
PublicKey
>
Parameters
props:
{
userPubKey
:
PublicKey
;
}
user
Pub
Key
:
PublicKey
Returns
Promise
<
PublicKey
>
get
Faucet
Config
Public
Key
get
Faucet
Config
Public
Key
(
)
:
Promise
<
PublicKey
>
Returns
Promise
<
PublicKey
>
get
Faucet
Config
Public
Key
And
Nonce
get
Faucet
Config
Public
Key
And
Nonce
(
)
:
Promise
<
[
PublicKey
,
number
]
>
Returns
Promise
<
[
PublicKey
,
number
]
>
get
Mint
Authority
get
Mint
Authority
(
)
:
Promise
<
PublicKey
>
Returns
Promise
<
PublicKey
>
get
Token
Account
Info
get
Token
Account
Info
(
props
:
{
userPubKey
:
PublicKey
;
}
)
:
Promise
<
Account
>
Parameters
props:
{
userPubKey
:
PublicKey
;
}
user
Pub
Key
:
PublicKey
Returns
Promise
<
Account
>
initialize
initialize
(
)
:
Promise
<
string
>
Returns
Promise
<
string
>
mint
To
User
mint
To
User
(
userTokenAccount
:
PublicKey
, amount
:
BN
)
:
Promise
<
string
>
Parameters
userTokenAccount:
PublicKey
amount:
BN
Returns
Promise
<
string
>
Private
mint
To
User
Ix
mint
To
User
Ix
(
userTokenAccount
:
PublicKey
, amount
:
BN
)
:
Promise
<
TransactionInstruction
>
Parameters
userTokenAccount:
PublicKey
amount:
BN
Returns
Promise
<
TransactionInstruction
>
subscribe
To
Token
Account
subscribe
To
Token
Account
(
props
:
{
callback
:
(
(
accountInfo
:
Account
)
=>
void
)
;
userPubKey
:
PublicKey
;
}
)
:
Promise
<
boolean
>
Parameters
props:
{
callback
:
(
(
accountInfo
:
Account
)
=>
void
)
;
userPubKey
:
PublicKey
;
}
callback
:
(
(
accountInfo
:
Account
)
=>
void
)
(
accountInfo
:
Account
)
:
void
Parameters
accountInfo:
Account
Returns
void
user
Pub
Key
:
PublicKey
Returns
Promise
<
boolean
>
transfer
Mint
Authority
transfer
Mint
Authority
(
)
:
Promise
<
string
>
Returns
Promise
<
string
>
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
Modules
@drift-
labs/sdk
BN
pyth
Token
Faucet
constructor
connection
context?
mint
opts?
program
provider
wallet
create
Associated
Token
Account
And
Mint
To
create
Associated
Token
Account
And
Mint
To
Instructions
fetch
State
get
Assosciated
MockUSDMint
Address
get
Faucet
Config
Public
Key
get
Faucet
Config
Public
Key
And
Nonce
get
Mint
Authority
get
Token
Account
Info
initialize
mint
To
User
mint
To
User
Ix
subscribe
To
Token
Account
transfer
Mint
Authority
Generated using
TypeDoc