Documentation
    Preparing search index...

    Function resolveOrCreateATAs

    • IMPORTANT: wrappedSolAmountIn should only be used for input/source token that could be SOL. This is because when SOL is the output, it is the end destination, and thus does not need to be wrapped with an amount.

      Parameters

      • connection: Connection

        Solana connection class

      • ownerAddress: PublicKey

        The user's public key

      • requests: ResolvedTokenAddressRequest[]
      • getAccountRentExempt: () => Promise<number>
      • payer: PublicKey = ownerAddress

        Payer that would pay the rent for the creation of the ATAs

      • modeIdempotent: boolean = false

        Optional. Use CreateIdempotent instruction instead of Create instruction

      • allowPDAOwnerAddress: boolean = false

        Optional. Allow PDA to be used as the ATA owner address

      • wrappedSolAccountCreateMethod: WrappedSolAccountCreateMethod = "keypair"

        Optional. How to create the temporary WSOL account.

      Returns Promise<ResolvedTokenAddressInstruction[]>