When creating a job using Snowflake SDK or Snowflake Composer, you may notice that we have a fee account with a balance. This PDA (Program Derived Address) is authorized by your wallet address to pay the transaction fee on behalf of your wallet. To learn more about the fee account, read this guide.

While developing your Web3 application using the Snowflake SDK, there are methods to interact with the fee account and process the fee payment. The method getSnowflakePDAForUser is to retrieve the Snowflake PDA or the fee account of a provided public key.

async getSnowflakePDAForUser(user: PublicKey): Promise<PublicKey>;

On the other hand, the method depositFeeAccount receives a number of lamports as argument functions to transfer the SOL directly from the defined wallet address directly to the fee account.

The wallet is constructed with the declared environment variable ANCHOR_WALLET in the SDK configuration step. See this article for more information.

async depositFeeAccount(lamports: number): Promise<string>;

Did this answer your question?