pub struct StoreProgram {
pub id: StringPubkey,
pub store: StringPubkey,
}Expand description
A store program.
Fields§
§id: StringPubkeyProgram ID.
store: StringPubkeyStore address.
Implementations§
Source§impl StoreProgram
impl StoreProgram
Source§impl StoreProgram
impl StoreProgram
Sourcepub fn instruction(&self, args: impl InstructionData) -> InstructionBuilder<'_>
👎Deprecated since 0.8.0: Use ProgramExt::anchor_instruction instead.
pub fn instruction(&self, args: impl InstructionData) -> InstructionBuilder<'_>
ProgramExt::anchor_instruction instead.Create an instruction builder.
Find the event authority address.
Sourcepub fn find_store_wallet_address(&self) -> Pubkey
pub fn find_store_wallet_address(&self) -> Pubkey
Find the store wallet address.
Sourcepub fn find_order_address(&self, owner: &Pubkey, nonce: &NonceBytes) -> Pubkey
pub fn find_order_address(&self, owner: &Pubkey, nonce: &NonceBytes) -> Pubkey
Find order address.
Sourcepub fn find_deposit_address(&self, owner: &Pubkey, nonce: &NonceBytes) -> Pubkey
pub fn find_deposit_address(&self, owner: &Pubkey, nonce: &NonceBytes) -> Pubkey
Find deposit address.
Sourcepub fn find_withdrawal_address(
&self,
owner: &Pubkey,
nonce: &NonceBytes,
) -> Pubkey
pub fn find_withdrawal_address( &self, owner: &Pubkey, nonce: &NonceBytes, ) -> Pubkey
Find withdrawal address.
Sourcepub fn find_shift_address(&self, owner: &Pubkey, nonce: &NonceBytes) -> Pubkey
pub fn find_shift_address(&self, owner: &Pubkey, nonce: &NonceBytes) -> Pubkey
Find shift address.
Sourcepub fn find_glv_deposit_address(
&self,
owner: &Pubkey,
nonce: &NonceBytes,
) -> Pubkey
pub fn find_glv_deposit_address( &self, owner: &Pubkey, nonce: &NonceBytes, ) -> Pubkey
Find GLV deposit address.
Sourcepub fn find_glv_withdrawal_address(
&self,
owner: &Pubkey,
nonce: &NonceBytes,
) -> Pubkey
pub fn find_glv_withdrawal_address( &self, owner: &Pubkey, nonce: &NonceBytes, ) -> Pubkey
Find GLV withdrawal address.
Sourcepub fn find_market_address(&self, market_token: &Pubkey) -> Pubkey
pub fn find_market_address(&self, market_token: &Pubkey) -> Pubkey
Find market address.
Sourcepub fn find_user_address(&self, owner: &Pubkey) -> Pubkey
pub fn find_user_address(&self, owner: &Pubkey) -> Pubkey
Find user address.
Sourcepub fn find_position_address(
&self,
owner: &Pubkey,
market_token: &Pubkey,
collateral_token: &Pubkey,
is_long: bool,
) -> Pubkey
pub fn find_position_address( &self, owner: &Pubkey, market_token: &Pubkey, collateral_token: &Pubkey, is_long: bool, ) -> Pubkey
Find position address.
Find the PDA for callback authority.
Sourcepub fn find_glv_address(&self, glv_token: &Pubkey) -> Pubkey
pub fn find_glv_address(&self, glv_token: &Pubkey) -> Pubkey
Find the PDA for GLV account.
Trait Implementations§
Source§impl Clone for StoreProgram
impl Clone for StoreProgram
Source§fn clone(&self) -> StoreProgram
fn clone(&self) -> StoreProgram
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StoreProgram
impl Debug for StoreProgram
Source§impl Default for StoreProgram
impl Default for StoreProgram
Source§impl<'de> Deserialize<'de> for StoreProgram
impl<'de> Deserialize<'de> for StoreProgram
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<StoreProgram> for JsValuewhere
StoreProgram: Serialize,
impl From<StoreProgram> for JsValuewhere
StoreProgram: Serialize,
Source§fn from(value: StoreProgram) -> Self
fn from(value: StoreProgram) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for StoreProgramwhere
Self: DeserializeOwned,
impl FromWasmAbi for StoreProgramwhere
Self: DeserializeOwned,
Source§impl IntoWasmAbi for StoreProgramwhere
StoreProgram: Serialize,
impl IntoWasmAbi for StoreProgramwhere
StoreProgram: Serialize,
Source§impl OptionFromWasmAbi for StoreProgramwhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for StoreProgramwhere
Self: DeserializeOwned,
Source§impl OptionIntoWasmAbi for StoreProgramwhere
StoreProgram: Serialize,
impl OptionIntoWasmAbi for StoreProgramwhere
StoreProgram: Serialize,
Source§impl RefFromWasmAbi for StoreProgramwhere
Self: DeserializeOwned,
impl RefFromWasmAbi for StoreProgramwhere
Self: DeserializeOwned,
Source§type Abi = <JsType as RefFromWasmAbi>::Abi
type Abi = <JsType as RefFromWasmAbi>::Abi
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = SelfOwner<StoreProgram>
type Anchor = SelfOwner<StoreProgram>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl Serialize for StoreProgram
impl Serialize for StoreProgram
Source§impl Tsify for StoreProgram
impl Tsify for StoreProgram
const DECL: &'static str = "/**\n * A store program.\n */\nexport interface StoreProgram {\n /**\n * Program ID.\n */\n id: StringPubkey;\n /**\n * Store address.\n */\n store: StringPubkey;\n}"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
Source§impl VectorFromWasmAbi for StoreProgramwhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for StoreProgramwhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Source§impl VectorIntoWasmAbi for StoreProgramwhere
StoreProgram: Serialize,
impl VectorIntoWasmAbi for StoreProgramwhere
StoreProgram: Serialize,
type Abi = <JsType as VectorIntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Self]>) -> Self::Abi
Source§impl WasmDescribeVector for StoreProgram
impl WasmDescribeVector for StoreProgram
Auto Trait Implementations§
impl Freeze for StoreProgram
impl RefUnwindSafe for StoreProgram
impl Send for StoreProgram
impl Sync for StoreProgram
impl Unpin for StoreProgram
impl UnwindSafe for StoreProgram
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<P> ProgramExt for P
impl<P> ProgramExt for P
Source§fn instruction(&self, data: Vec<u8>) -> InstructionBuilder<'_, Self>where
Self: Sized,
fn instruction(&self, data: Vec<u8>) -> InstructionBuilder<'_, Self>where
Self: Sized,
Create an
InstructionBuilderSource§fn anchor_instruction(
&self,
args: impl InstructionData,
) -> InstructionBuilder<'_, Self>where
Self: Sized,
fn anchor_instruction(
&self,
args: impl InstructionData,
) -> InstructionBuilder<'_, Self>where
Self: Sized,
Create
InstructionBuilder with InstructionData.Source§fn anchor_accounts(
&self,
accounts: impl ToAccountMetas,
convert_optional: bool,
) -> Vec<AccountMeta>where
Self: Id,
fn anchor_accounts(
&self,
accounts: impl ToAccountMetas,
convert_optional: bool,
) -> Vec<AccountMeta>where
Self: Id,
Convert to account metas. Read more
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.