generated from metaplex-foundation/solana-project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add NonceVersion and NonceState enums
- Loading branch information
1 parent
2477d3a
commit 1639c47
Showing
13 changed files
with
203 additions
and
43 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
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,10 @@ | ||
/** | ||
* 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/metaplex-foundation/kinobi | ||
*/ | ||
|
||
export * from './nonceState'; | ||
export * from './nonceVersion'; |
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,37 @@ | ||
/** | ||
* 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/metaplex-foundation/kinobi | ||
*/ | ||
|
||
import { Codec, Decoder, Encoder, combineCodec } from '@solana/codecs-core'; | ||
import { | ||
getScalarEnumDecoder, | ||
getScalarEnumEncoder, | ||
} from '@solana/codecs-data-structures'; | ||
import { getU32Decoder, getU32Encoder } from '@solana/codecs-numbers'; | ||
|
||
export enum NonceState { | ||
Uninitialized, | ||
Initialized, | ||
} | ||
|
||
export type NonceStateArgs = NonceState; | ||
|
||
export function getNonceStateEncoder() { | ||
return getScalarEnumEncoder(NonceState, { | ||
size: getU32Encoder(), | ||
}) satisfies Encoder<NonceStateArgs>; | ||
} | ||
|
||
export function getNonceStateDecoder() { | ||
return getScalarEnumDecoder(NonceState, { | ||
size: getU32Decoder(), | ||
}) satisfies Decoder<NonceState>; | ||
} | ||
|
||
export function getNonceStateCodec(): Codec<NonceStateArgs, NonceState> { | ||
return combineCodec(getNonceStateEncoder(), getNonceStateDecoder()); | ||
} |
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,37 @@ | ||
/** | ||
* 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/metaplex-foundation/kinobi | ||
*/ | ||
|
||
import { Codec, Decoder, Encoder, combineCodec } from '@solana/codecs-core'; | ||
import { | ||
getScalarEnumDecoder, | ||
getScalarEnumEncoder, | ||
} from '@solana/codecs-data-structures'; | ||
import { getU32Decoder, getU32Encoder } from '@solana/codecs-numbers'; | ||
|
||
export enum NonceVersion { | ||
Legacy, | ||
Current, | ||
} | ||
|
||
export type NonceVersionArgs = NonceVersion; | ||
|
||
export function getNonceVersionEncoder() { | ||
return getScalarEnumEncoder(NonceVersion, { | ||
size: getU32Encoder(), | ||
}) satisfies Encoder<NonceVersionArgs>; | ||
} | ||
|
||
export function getNonceVersionDecoder() { | ||
return getScalarEnumDecoder(NonceVersion, { | ||
size: getU32Decoder(), | ||
}) satisfies Decoder<NonceVersion>; | ||
} | ||
|
||
export function getNonceVersionCodec(): Codec<NonceVersionArgs, NonceVersion> { | ||
return combineCodec(getNonceVersionEncoder(), getNonceVersionDecoder()); | ||
} |
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
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,12 @@ | ||
//! 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/metaplex-foundation/kinobi] | ||
//! | ||
pub(crate) mod r#nonce_state; | ||
pub(crate) mod r#nonce_version; | ||
|
||
pub use self::r#nonce_state::*; | ||
pub use self::r#nonce_version::*; |
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,16 @@ | ||
//! 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/metaplex-foundation/kinobi] | ||
//! | ||
use borsh::BorshDeserialize; | ||
use borsh::BorshSerialize; | ||
|
||
#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq, PartialOrd, Hash)] | ||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] | ||
pub enum NonceState { | ||
Uninitialized, | ||
Initialized, | ||
} |
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,16 @@ | ||
//! 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/metaplex-foundation/kinobi] | ||
//! | ||
use borsh::BorshDeserialize; | ||
use borsh::BorshSerialize; | ||
|
||
#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq, PartialOrd, Hash)] | ||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] | ||
pub enum NonceVersion { | ||
Legacy, | ||
Current, | ||
} |
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