Skip to content

Releases: solana-labs/solana-program-library

SPL Stake Pool - v0.1.0

03 May 21:04
3dd6767
Compare
Choose a tag to compare

Introducing SPL Stake Pools

A program for pooling together SOL to be staked by an off-chain agent running a Delegation bot which redistributes the stakes across the network and tries to maximize censorship resistance and rewards.

Please see additional documentation and CLI use-cases at: https://spl.solana.com/stake-pool

SPL Token Swap - v2.1.0

05 Apr 20:09
e8f59e4
Compare
Choose a tag to compare

NOTE: The program built from this tag is NOT deployed to mainnet at SwaPpA9LAaLfeLi3a68M4DjnLqgtticKg6CnyNwgAC8

Changes

  • Update the Solana SDK to 1.6
  • Use spl-math library for PreciseNumber calculations

SPL Math - v0.1.0

05 Apr 18:23
7f89183
Compare
Choose a tag to compare

Introducing SPL Math!

The SPL Math library contains mathematical helpers to be used in Solana on-chain programs. Currently it contains:

  • support for U256 and U192 types through the uint library
  • BPF instruction efficient sqrt calculation on integer types
  • PreciseNumber to mimic floating point operations using an unsigned int as data storage

@solana/spl-token v0.1.3

31 Mar 06:54
0cfc42e
Compare
Choose a tag to compare

Fixes

Use Connection's configured commitment value for transaction submissions, instead of hard-coded recent.

@solana/spl-token v0.1.2

30 Mar 02:57
7550748
Compare
Choose a tag to compare

Fixes

Resolved Buffer incompatibility issues through an @solana/web3.js dependency upgrade. The following errors should now be resolved:

Unhandled Rejection (TypeError): Blob.encode[programId] requires (length 32) Buffer as src

@solana/spl-token v0.1.1

03 Mar 13:59
68b8da2
Compare
Choose a tag to compare

Associated Token Program support

  • Added Token.createAssociatedTokenAccountInstruction for building an instruction to create a new associated token account
  • Added helper method getOrCreateAssociatedAccountInfo for creating associated token accounts on behalf of a wallet address if it doesn't exist yet
  • Added helper method getAssociatedTokenAddress for finding the associated token address for a wallet address, token pair.

@solana/spl-token v0.1.0

25 Feb 07:04
6eac7bc
Compare
Choose a tag to compare
  • Fix type definitions
  • Export browser-compatible modules

SPL Token - v3.1.0

12 Feb 00:19
Compare
Choose a tag to compare

Changes

  • Normalize validation of self-transfers with that of two-party transfers
  • Add InitializeAccount2 instruction with improved CPI ergonomics

@solana/spl-token-swap - v0.1.0

01 Mar 22:37
9839b18
Compare
Choose a tag to compare

Changes

  • Make all layouts compatible with SPL Token Swap v2.0.0
  • Specify CurveType on pool initialization: ConstantProduct, ConstantPrice, or Offset
  • New instructions
    • depositSingleTokenTypeExactAmountIn: deposit one token type in exchange for pool tokens, instead of both types
    • withdrawSingleTokenTypeExactAmountOut: withdraw one token type in exchange for pool tokens, instead of both types

SPL Token Swap - v2.0.0

01 Mar 22:29
b264915
Compare
Choose a tag to compare

Changes

  • Add multiple curve possibilities on top of the traditional constant product / Uniswap curve
    • constant price: price fixed at pool creation
    • constant product with offset: adds a faked amount of liquidity on one side of the pool, useful for new coin offerings
  • Add ability to deposit and withdraw a single token type, instead of both at once
  • Improve calculations

Build

The token swap program contains hard-coded constraints on fees and fee account owners. For this build, available at program id SwaPpA9LAaLfeLi3a68M4DjnLqgtticKg6CnyNwgAC8 on devnet, testnet, and mainnet-beta, the fee account for any pool must be owned by HfoTxFR1Tm6kGmWgYWD6J7YHVy1UwqSULUGVLXkJqaKN.

Run the build command from token-swap/program:

SWAP_PROGRAM_OWNER_FEE_ADDRESS=HfoTxFR1Tm6kGmWgYWD6J7YHVy1UwqSULUGVLXkJqaKN cargo build-bpf --features=production