Skip to content

PublicKey

bigearsenal edited this page May 17, 2022 · 1 revision

PublicKey

public struct PublicKey: Codable, Equatable, CustomStringConvertible, Hashable 

Inheritance

BorshCodable, Codable, CustomStringConvertible, Equatable, ExpressibleByExtendedGraphemeClusterLiteral, ExpressibleByStringLiteral, ExpressibleByUnicodeScalarLiteral, Hashable

Initializers

init(stringLiteral:)

public init(stringLiteral value: String) 

init(unicodeScalarLiteral:)

public init(unicodeScalarLiteral value: String) 

init(extendedGraphemeClusterLiteral:)

public init(extendedGraphemeClusterLiteral value: String) 

init(from:)

public init(from decoder: Decoder) throws 

init(string:)

public init(string: String?) throws 

init(data:)

public init(data: Data) throws 

init(bytes:)

public init(bytes: [UInt8]?) throws 

init(from:)

public init(from reader: inout BinaryReader) throws 

Properties

NULL_PUBLICKEY_BYTES

public static let NULL_PUBLICKEY_BYTES: [UInt8] 

numberOfBytes

public static let numberOfBytes = 32

bytes

public let bytes: [UInt8]

base58EncodedString

public var base58EncodedString: String 

data

public var data: Data 

description

public var description: String 

tokenProgramId

@available(*, deprecated, renamed: "TokenProgram.id")
    static var tokenProgramId: PublicKey 

sysvarRent

static var sysvarRent: PublicKey 

programId

@available(*, deprecated, renamed: "SystemProgram.id")
    static var programId: PublicKey 

wrappedSOLMint

static var wrappedSOLMint: PublicKey 

solMint

static var solMint: PublicKey 

swapHostFeeAddress

static var swapHostFeeAddress: PublicKey 

splAssociatedTokenAccountProgramId

@available(*, deprecated, renamed: "AssociatedTokenProgram.id")
    static var splAssociatedTokenAccountProgramId: PublicKey 

renBTCMint

static var renBTCMint: PublicKey 

renBTCMintDevnet

static var renBTCMintDevnet: PublicKey 

fake

static var fake: PublicKey 

usdcMint

static var usdcMint: PublicKey 

usdtMint

static var usdtMint: PublicKey 

dexPID

static var dexPID: PublicKey 

serumSwapPID

static var serumSwapPID: PublicKey 

isUsdx

var isUsdx: Bool 

Methods

encode(to:)

public func encode(to encoder: Encoder) throws 

short(numOfSymbolsRevealed:)

public func short(numOfSymbolsRevealed: Int = 4) -> String 

hash(into:)

public func hash(into hasher: inout Hasher) 

associatedTokenAddress(walletAddress:tokenMintAddress:)

public static func associatedTokenAddress(
        walletAddress: PublicKey,
        tokenMintAddress: PublicKey
    ) throws -> PublicKey 

findProgramAddress(seeds:programId:)

public static func findProgramAddress(
        seeds: [Data],
        programId: Self
    ) throws -> (Self, UInt8) 

createProgramAddress(seeds:programId:)

public static func createProgramAddress(
        seeds: [Data],
        programId: PublicKey
    ) throws -> PublicKey 

createWithSeed(fromPublicKey:seed:programId:)

public static func createWithSeed(
        fromPublicKey: PublicKey,
        seed: String,
        programId: PublicKey
    ) throws -> PublicKey 

orcaSwapId(version:)

static func orcaSwapId(version: Int = 2) -> PublicKey 

serialize(to:)

public func serialize(to writer: inout Data) throws 

Operators

==

public static func == (lhs: PublicKey, rhs: PublicKey) -> Bool 
Types
Protocols
Global Typealiases
Global Variables
Global Functions
Operators
Extensions
Clone this wiki locally