Releases: solana-labs/solana-program-library
@solana/spl-token v0.1.2
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
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
- Fix type definitions
- Export browser-compatible modules
SPL Token - v3.1.0
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
Changes
- Make all layouts compatible with SPL Token Swap v2.0.0
- Specify
CurveType
on pool initialization:ConstantProduct
,ConstantPrice
, orOffset
- New instructions
depositSingleTokenTypeExactAmountIn
: deposit one token type in exchange for pool tokens, instead of both typeswithdrawSingleTokenTypeExactAmountOut
: withdraw one token type in exchange for pool tokens, instead of both types
SPL Token Swap - v2.0.0
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
SPL Memo v3.0.0
In addition to validating a string of UTF-8 encoded characters, the Memo program now:
- verifies that any accounts provided are signers of the transaction
- logs the memo, as well as any verified signer addresses, to the transaction log, so that anyone can easily observe memos and know they were approved by zero or more addresses by inspecting the transaction log from a trusted provider.
SPL Feature Proposal v1.0.0
The SPL Feature Proposal Program provides a workflow for activation of Solana network features through community vote based on validator stake weight.
SPL Associated Token Account v1.0.1
The SPL Associated Token Account program defines the convention and the provides the mechanism for mapping a user wallet address to its associated token accounts
SPL Token v2.0.6
Features:
- Multisig: require a 1x1 pairing of
M
signers toM
multisig keys - Allows various accounts to be borrowed multiple times in token instructions, which generally enables Account and Mint accounts to serve as their own authority
- Standardized error-case ordering in instruction processing