#[repr(u8)]
pub enum GatewayInstruction {
AddGatekeeper {},
IssueVanilla {
seed: Option<AddressSeed>,
expire_time: Option<UnixTimestamp>,
},
SetState {
state: GatewayTokenState,
},
UpdateExpiry {
expire_time: UnixTimestamp,
},
RemoveGatekeeper,
AddFeatureToNetwork {
feature: NetworkFeature,
},
RemoveFeatureFromNetwork {
feature: NetworkFeature,
},
ExpireToken {
padding: Option<AddressSeed>,
gatekeeper_network: Pubkey,
},
}
Expand description
Instructions supported by the program
Variants
AddGatekeeper
Fields
Add a new Gatekeeper to a network
Accounts expected by this instruction:
[writable, signer]
funder_account: the payer of the transaction[writeable]
gatekeeper_account: the destination account containing details of the gatekeeper[]
gatekeeper_authority: the authority that owns the gatekeeper account[signer]
gatekeeper_network: the gatekeeper network to which the gatekeeper belongs[]
Rent sysvar[]
System program
IssueVanilla
Fields
seed: Option<AddressSeed>
An optional seed to use when generating a gateway token allowing multiple gateway tokens per wallet
expire_time: Option<UnixTimestamp>
An optional unix timestamp at which point the issued token is no longer valid
Issue a new gateway token
Accounts expected by this instruction:
[writable, signer]
funder_account: the payer of the transaction[writable]
gateway_token: the destination account of the gateway token[]
owner: the wallet that the gateway token is issued for[]
gatekeeper_account: the account containing details of the gatekeeper issuing the gateway token[signer]
gatekeeper_authority: the authority that owns the gatekeeper account[]
gatekeeper_network: the gatekeeper network to which the gatekeeper belongs[]
Rent sysvar[]
System program
SetState
Fields
state: GatewayTokenState
The new state of the gateway token
Update the gateway token state Revoke, freeze or unfreeze
Accounts expected by this instruction:
[writable]
gateway_token: the destination account of the gateway token[signer]
gatekeeper_authority: the gatekeeper authority that is making the change[]
gatekeeper_account: the account containing details of the gatekeeper
UpdateExpiry
Fields
expire_time: UnixTimestamp
the new expiry time of the gateway token
Update the gateway token expiry time
Accounts expected by this instruction:
[writable]
gateway_token: the destination account of the gateway token[signer]
gatekeeper_authority: the gatekeeper authority that is making the change[]
gatekeeper_account: the account containing details of the gatekeeper
RemoveGatekeeper
Removes a gatekeeper funding the rent back to an address and invalidating their addresses
Accounts expected by this instruction:
[writable]
funds_to_account: the account that will receive the rent back[writable]
gatekeeper_account: the gatekeeper account to close[]
gatekeeper_authority: the authority that owns the gatekeeper account[signer]
gatekeeper_network: the gatekeeper network to which the gatekeeper belong
AddFeatureToNetwork
Fields
feature: NetworkFeature
[signer, writable]
funder_account: The account funding this transaction[signer]
gatekeeper_network: The gatekeeper network receiving a feature[writable]
feature_account: The new feature account[]
system_program: The system program
RemoveFeatureFromNetwork
Fields
feature: NetworkFeature
[signer, writable]
funds_to_account: The account receiving the funds[signer]
gatekeeper_network: The gatekeeper network receiving a feature[writable]
feature_account: The new feature account
ExpireToken
Fields
padding: Option<AddressSeed>
Padding for backwards compatibility
gatekeeper_network: Pubkey
The gatekeeper network
[writable]
gateway_token: The token to expire[signer]
owner: The wallet that the gateway token is for[]
network_expire_feature: The expire feature for the gatekeeper network
Trait Implementations
sourceimpl BorshDeserialize for GatewayInstruction where
Option<AddressSeed>: BorshDeserialize,
Option<UnixTimestamp>: BorshDeserialize,
GatewayTokenState: BorshDeserialize,
UnixTimestamp: BorshDeserialize,
NetworkFeature: BorshDeserialize,
NetworkFeature: BorshDeserialize,
Option<AddressSeed>: BorshDeserialize,
Pubkey: BorshDeserialize,
impl BorshDeserialize for GatewayInstruction where
Option<AddressSeed>: BorshDeserialize,
Option<UnixTimestamp>: BorshDeserialize,
GatewayTokenState: BorshDeserialize,
UnixTimestamp: BorshDeserialize,
NetworkFeature: BorshDeserialize,
NetworkFeature: BorshDeserialize,
Option<AddressSeed>: BorshDeserialize,
Pubkey: BorshDeserialize,
sourceimpl BorshSerialize for GatewayInstruction where
Option<AddressSeed>: BorshSerialize,
Option<UnixTimestamp>: BorshSerialize,
GatewayTokenState: BorshSerialize,
UnixTimestamp: BorshSerialize,
NetworkFeature: BorshSerialize,
NetworkFeature: BorshSerialize,
Option<AddressSeed>: BorshSerialize,
Pubkey: BorshSerialize,
impl BorshSerialize for GatewayInstruction where
Option<AddressSeed>: BorshSerialize,
Option<UnixTimestamp>: BorshSerialize,
GatewayTokenState: BorshSerialize,
UnixTimestamp: BorshSerialize,
NetworkFeature: BorshSerialize,
NetworkFeature: BorshSerialize,
Option<AddressSeed>: BorshSerialize,
Pubkey: BorshSerialize,
sourceimpl Clone for GatewayInstruction
impl Clone for GatewayInstruction
sourcefn clone(&self) -> GatewayInstruction
fn clone(&self) -> GatewayInstruction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for GatewayInstruction
impl Debug for GatewayInstruction
sourceimpl PartialEq<GatewayInstruction> for GatewayInstruction
impl PartialEq<GatewayInstruction> for GatewayInstruction
sourcefn eq(&self, other: &GatewayInstruction) -> bool
fn eq(&self, other: &GatewayInstruction) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &GatewayInstruction) -> bool
fn ne(&self, other: &GatewayInstruction) -> bool
This method tests for !=
.
impl StructuralPartialEq for GatewayInstruction
Auto Trait Implementations
impl RefUnwindSafe for GatewayInstruction
impl Send for GatewayInstruction
impl Sync for GatewayInstruction
impl Unpin for GatewayInstruction
impl UnwindSafe for GatewayInstruction
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more