#[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:

  1. [writable, signer] funder_account: the payer of the transaction
  2. [writeable] gatekeeper_account: the destination account containing details of the gatekeeper
  3. [] gatekeeper_authority: the authority that owns the gatekeeper account
  4. [signer] gatekeeper_network: the gatekeeper network to which the gatekeeper belongs
  5. [] Rent sysvar
  6. [] 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:

  1. [writable, signer] funder_account: the payer of the transaction
  2. [writable] gateway_token: the destination account of the gateway token
  3. [] owner: the wallet that the gateway token is issued for
  4. [] gatekeeper_account: the account containing details of the gatekeeper issuing the gateway token
  5. [signer] gatekeeper_authority: the authority that owns the gatekeeper account
  6. [] gatekeeper_network: the gatekeeper network to which the gatekeeper belongs
  7. [] Rent sysvar
  8. [] 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:

  1. [writable] gateway_token: the destination account of the gateway token
  2. [signer] gatekeeper_authority: the gatekeeper authority that is making the change
  3. [] 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:

  1. [writable] gateway_token: the destination account of the gateway token
  2. [signer] gatekeeper_authority: the gatekeeper authority that is making the change
  3. [] 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:

  1. [writable] funds_to_account: the account that will receive the rent back
  2. [writable] gatekeeper_account: the gatekeeper account to close
  3. [] gatekeeper_authority: the authority that owns the gatekeeper account
  4. [signer] gatekeeper_network: the gatekeeper network to which the gatekeeper belong

AddFeatureToNetwork

Fields

feature: NetworkFeature
  1. [signer, writable] funder_account: The account funding this transaction
  2. [signer] gatekeeper_network: The gatekeeper network receiving a feature
  3. [writable] feature_account: The new feature account
  4. [] system_program: The system program

RemoveFeatureFromNetwork

Fields

feature: NetworkFeature
  1. [signer, writable] funds_to_account: The account receiving the funds
  2. [signer] gatekeeper_network: The gatekeeper network receiving a feature
  3. [writable] feature_account: The new feature account

ExpireToken

Fields

padding: Option<AddressSeed>

Padding for backwards compatibility

gatekeeper_network: Pubkey

The gatekeeper network

  1. [writable] gateway_token: The token to expire
  2. [signer] owner: The wallet that the gateway token is for
  3. [] network_expire_feature: The expire feature for the gatekeeper network

Trait Implementations

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes. Read more

Deserialize this instance from a slice of bytes.

Serialize this instance into a vector of bytes.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.