-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5416db3
commit fff19a0
Showing
13 changed files
with
174 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* This code was AUTOGENERATED using the kinobi library. | ||
* Please DO NOT EDIT THIS FILE, instead use visitors | ||
* to add features, then rerun kinobi to update it. | ||
* | ||
* @see https://github.com/kinobi-so/kinobi | ||
*/ | ||
|
||
import { | ||
combineCodec, | ||
fixDecoderSize, | ||
fixEncoderSize, | ||
getBytesDecoder, | ||
getBytesEncoder, | ||
getStructDecoder, | ||
getStructEncoder, | ||
getU64Decoder, | ||
getU64Encoder, | ||
type Codec, | ||
type Decoder, | ||
type Encoder, | ||
type ReadonlyUint8Array, | ||
} from '@solana/web3.js'; | ||
|
||
export type RewardBucket = { rewards: bigint; reserved: ReadonlyUint8Array }; | ||
|
||
export type RewardBucketArgs = { | ||
rewards: number | bigint; | ||
reserved: ReadonlyUint8Array; | ||
}; | ||
|
||
export function getRewardBucketEncoder(): Encoder<RewardBucketArgs> { | ||
return getStructEncoder([ | ||
['rewards', getU64Encoder()], | ||
['reserved', fixEncoderSize(getBytesEncoder(), 64)], | ||
]); | ||
} | ||
|
||
export function getRewardBucketDecoder(): Decoder<RewardBucket> { | ||
return getStructDecoder([ | ||
['rewards', getU64Decoder()], | ||
['reserved', fixDecoderSize(getBytesDecoder(), 64)], | ||
]); | ||
} | ||
|
||
export function getRewardBucketCodec(): Codec<RewardBucketArgs, RewardBucket> { | ||
return combineCodec(getRewardBucketEncoder(), getRewardBucketDecoder()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/** | ||
* This code was AUTOGENERATED using the kinobi library. | ||
* Please DO NOT EDIT THIS FILE, instead use visitors | ||
* to add features, then rerun kinobi to update it. | ||
* | ||
* @see https://github.com/kinobi-so/kinobi | ||
*/ | ||
|
||
import { | ||
combineCodec, | ||
getAddressDecoder, | ||
getAddressEncoder, | ||
getArrayDecoder, | ||
getArrayEncoder, | ||
getStructDecoder, | ||
getStructEncoder, | ||
getU64Decoder, | ||
getU64Encoder, | ||
getU8Decoder, | ||
getU8Encoder, | ||
type Address, | ||
type Codec, | ||
type Decoder, | ||
type Encoder, | ||
} from '@solana/web3.js'; | ||
|
||
export type RewardRoutes = { | ||
destination: Address; | ||
rewards: bigint; | ||
reserved: Array<number>; | ||
}; | ||
|
||
export type RewardRoutesArgs = { | ||
destination: Address; | ||
rewards: number | bigint; | ||
reserved: Array<number>; | ||
}; | ||
|
||
export function getRewardRoutesEncoder(): Encoder<RewardRoutesArgs> { | ||
return getStructEncoder([ | ||
['destination', getAddressEncoder()], | ||
['rewards', getU64Encoder()], | ||
['reserved', getArrayEncoder(getU8Encoder(), { size: 128 })], | ||
]); | ||
} | ||
|
||
export function getRewardRoutesDecoder(): Decoder<RewardRoutes> { | ||
return getStructDecoder([ | ||
['destination', getAddressDecoder()], | ||
['rewards', getU64Decoder()], | ||
['reserved', getArrayDecoder(getU8Decoder(), { size: 128 })], | ||
]); | ||
} | ||
|
||
export function getRewardRoutesCodec(): Codec<RewardRoutesArgs, RewardRoutes> { | ||
return combineCodec(getRewardRoutesEncoder(), getRewardRoutesDecoder()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
clients/rust/jito_tip_router/src/generated/types/reward_bucket.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//! This code was AUTOGENERATED using the kinobi library. | ||
//! Please DO NOT EDIT THIS FILE, instead use visitors | ||
//! to add features, then rerun kinobi to update it. | ||
//! | ||
//! <https://github.com/kinobi-so/kinobi> | ||
use borsh::{BorshDeserialize, BorshSerialize}; | ||
|
||
#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)] | ||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] | ||
pub struct RewardBucket { | ||
pub rewards: u64, | ||
#[cfg_attr(feature = "serde", serde(with = "serde_with::As::<serde_with::Bytes>"))] | ||
pub reserved: [u8; 64], | ||
} |
21 changes: 21 additions & 0 deletions
21
clients/rust/jito_tip_router/src/generated/types/reward_routes.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
//! This code was AUTOGENERATED using the kinobi library. | ||
//! Please DO NOT EDIT THIS FILE, instead use visitors | ||
//! to add features, then rerun kinobi to update it. | ||
//! | ||
//! <https://github.com/kinobi-so/kinobi> | ||
use borsh::{BorshDeserialize, BorshSerialize}; | ||
use solana_program::pubkey::Pubkey; | ||
|
||
#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)] | ||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] | ||
pub struct RewardRoutes { | ||
#[cfg_attr( | ||
feature = "serde", | ||
serde(with = "serde_with::As::<serde_with::DisplayFromStr>") | ||
)] | ||
pub destination: Pubkey, | ||
pub rewards: u64, | ||
#[cfg_attr(feature = "serde", serde(with = "serde_with::As::<serde_with::Bytes>"))] | ||
pub reserved: [u8; 128], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.