github.com/gagliardetto/solana-go@v1.11.0/program_ids.go (about)

     1  // Copyright 2021 github.com/gagliardetto
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //      http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package solana
    16  
    17  var (
    18  	// Create new accounts, allocate account data, assign accounts to owning programs,
    19  	// transfer lamports from System Program owned accounts and pay transacation fees.
    20  	SystemProgramID = MustPublicKeyFromBase58("11111111111111111111111111111111")
    21  
    22  	// Add configuration data to the chain and the list of public keys that are permitted to modify it.
    23  	ConfigProgramID = MustPublicKeyFromBase58("Config1111111111111111111111111111111111111")
    24  
    25  	// Create and manage accounts representing stake and rewards for delegations to validators.
    26  	StakeProgramID = MustPublicKeyFromBase58("Stake11111111111111111111111111111111111111")
    27  
    28  	// Create and manage accounts that track validator voting state and rewards.
    29  	VoteProgramID = MustPublicKeyFromBase58("Vote111111111111111111111111111111111111111")
    30  
    31  	BPFLoaderDeprecatedProgramID = MustPublicKeyFromBase58("BPFLoader1111111111111111111111111111111111")
    32  	// Deploys, upgrades, and executes programs on the chain.
    33  	BPFLoaderProgramID            = MustPublicKeyFromBase58("BPFLoader2111111111111111111111111111111111")
    34  	BPFLoaderUpgradeableProgramID = MustPublicKeyFromBase58("BPFLoaderUpgradeab1e11111111111111111111111")
    35  
    36  	// Verify secp256k1 public key recovery operations (ecrecover).
    37  	Secp256k1ProgramID = MustPublicKeyFromBase58("KeccakSecp256k11111111111111111111111111111")
    38  
    39  	FeatureProgramID = MustPublicKeyFromBase58("Feature111111111111111111111111111111111111")
    40  
    41  	ComputeBudget = MustPublicKeyFromBase58("ComputeBudget111111111111111111111111111111")
    42  )
    43  
    44  // SPL:
    45  var (
    46  	// A Token program on the Solana blockchain.
    47  	// This program defines a common implementation for Fungible and Non Fungible tokens.
    48  	TokenProgramID = MustPublicKeyFromBase58("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA")
    49  
    50  	Token2022ProgramID = MustPublicKeyFromBase58("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb")
    51  
    52  	// A Uniswap-like exchange for the Token program on the Solana blockchain,
    53  	// implementing multiple automated market maker (AMM) curves.
    54  	TokenSwapProgramID = MustPublicKeyFromBase58("SwaPpA9LAaLfeLi3a68M4DjnLqgtticKg6CnyNwgAC8")
    55  	TokenSwapFeeOwner  = MustPublicKeyFromBase58("HfoTxFR1Tm6kGmWgYWD6J7YHVy1UwqSULUGVLXkJqaKN")
    56  
    57  	// A lending protocol for the Token program on the Solana blockchain inspired by Aave and Compound.
    58  	TokenLendingProgramID = MustPublicKeyFromBase58("LendZqTs8gn5CTSJU1jWKhKuVpjJGom45nnwPb2AMTi")
    59  
    60  	// This program defines the convention and provides the mechanism for mapping
    61  	// the user's wallet address to the associated token accounts they hold.
    62  	SPLAssociatedTokenAccountProgramID = MustPublicKeyFromBase58("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL")
    63  
    64  	// The Memo program is a simple program that validates a string of UTF-8 encoded characters
    65  	// and verifies that any accounts provided are signers of the transaction.
    66  	// The program also logs the memo, as well as any verified signer addresses,
    67  	// to the transaction log, so that anyone can easily observe memos
    68  	// and know they were approved by zero or more addresses
    69  	// by inspecting the transaction log from a trusted provider.
    70  	MemoProgramID = MustPublicKeyFromBase58("MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr")
    71  )
    72  
    73  var (
    74  	// The Mint for native SOL Token accounts
    75  	SolMint    = MustPublicKeyFromBase58("So11111111111111111111111111111111111111112")
    76  	WrappedSol = SolMint
    77  )
    78  
    79  var TokenMetadataProgramID = MustPublicKeyFromBase58("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s")