pub struct RedPacket {Show 17 fields
pub chain: Option<String>,
pub claim_authority: Option<String>,
pub claimed_amount: Option<String>,
pub claimed_count: Option<i32>,
pub created_at: Option<i64>,
pub creator: String,
pub expiration: Option<i64>,
pub expired: Option<bool>,
pub expired_at: Option<i64>,
pub id: String,
pub max_claims: i32,
pub memo: Option<String>,
pub mint: String,
pub refunded_amount: Option<String>,
pub share_id: Option<String>,
pub total_amount: String,
pub tx_hash: Option<String>,
}Expand description
Red packet detail
JSON schema
{
"description": "Red packet detail",
"type": "object",
"required": [
"creator",
"id",
"maxClaims",
"mint",
"totalAmount"
],
"properties": {
"chain": {
"description": "Blockchain network for the red packet",
"examples": [
"sol"
],
"type": "string"
},
"claimAuthority": {
"description": "Claim authority address",
"examples": [
"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
],
"type": "string"
},
"claimedAmount": {
"description": "Amount claimed from the red packet",
"examples": [
"500000000"
],
"type": "string"
},
"claimedCount": {
"description": "Number of claims made",
"examples": [
5
],
"type": "integer",
"format": "int32"
},
"createdAt": {
"description": "Red packet creation timestamp",
"examples": [
1717334400000
],
"type": "integer",
"format": "int64"
},
"creator": {
"description": "Creator wallet address",
"examples": [
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
],
"type": "string"
},
"expiration": {
"description": "Expiration duration in seconds",
"examples": [
24
],
"type": "integer",
"format": "int64"
},
"expired": {
"description": "Whether the red packet has been withdrawn",
"type": "boolean"
},
"expiredAt": {
"description": "Expiration timestamp",
"examples": [
1717420800000
],
"type": "integer",
"format": "int64"
},
"id": {
"description": "Red packet identifier",
"examples": [
"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
],
"type": "string"
},
"maxClaims": {
"description": "Maximum number of claims allowed",
"examples": [
10
],
"type": "integer",
"format": "int32"
},
"memo": {
"description": "Red packet memo message",
"examples": [
"Happy Red Packet"
],
"type": "string"
},
"mint": {
"description": "Token mint address",
"examples": [
"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
],
"type": "string"
},
"refundedAmount": {
"description": "Refunded amount",
"examples": [
"0"
],
"type": "string"
},
"shareId": {
"description": "Share identifier",
"examples": [
"abc123"
],
"type": "string"
},
"totalAmount": {
"description": "Total amount in the red packet",
"examples": [
"1000000000"
],
"type": "string"
},
"txHash": {
"description": "Transaction hash",
"examples": [
"5UfDuX7hXbL3mFfPdq1pymNHM..."
],
"type": "string"
}
}
}Fields§
§chain: Option<String>Blockchain network for the red packet
Claim authority address
claimed_amount: Option<String>Amount claimed from the red packet
claimed_count: Option<i32>Number of claims made
created_at: Option<i64>Red packet creation timestamp
creator: StringCreator wallet address
expiration: Option<i64>Expiration duration in seconds
expired: Option<bool>Whether the red packet has been withdrawn
expired_at: Option<i64>Expiration timestamp
id: StringRed packet identifier
max_claims: i32Maximum number of claims allowed
memo: Option<String>Red packet memo message
mint: StringToken mint address
refunded_amount: Option<String>Refunded amount
Share identifier
total_amount: StringTotal amount in the red packet
tx_hash: Option<String>Transaction hash
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RedPacket
impl<'de> Deserialize<'de> for RedPacket
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
Auto Trait Implementations§
impl Freeze for RedPacket
impl RefUnwindSafe for RedPacket
impl Send for RedPacket
impl Sync for RedPacket
impl Unpin for RedPacket
impl UnsafeUnpin for RedPacket
impl UnwindSafe for RedPacket
Blanket Implementations§
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