Skip to content

Commit

Permalink
version 0.2.9 snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jun 14, 2024
1 parent 9fcdfbf commit 9f97899
Show file tree
Hide file tree
Showing 22 changed files with 668 additions and 358 deletions.
546 changes: 392 additions & 154 deletions Cargo.lock

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions clients/js/src/generated/accounts/counter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@
*/

import {
Account,
Address,
Codec,
Decoder,
EncodedAccount,
Encoder,
FetchAccountConfig,
FetchAccountsConfig,
MaybeAccount,
MaybeEncodedAccount,
assertAccountExists,
assertAccountsExist,
combineCodec,
Expand All @@ -30,6 +20,16 @@ import {
getU32Decoder,
getU32Encoder,
transformEncoder,
type Account,
type Address,
type Codec,
type Decoder,
type EncodedAccount,
type Encoder,
type FetchAccountConfig,
type FetchAccountsConfig,
type MaybeAccount,
type MaybeEncodedAccount,
} from '@solana/web3.js';
import { CounterSeeds, findCounterPda } from '../pdas';
import { Key, getKeyDecoder, getKeyEncoder } from '../types';
Expand Down
32 changes: 16 additions & 16 deletions clients/js/src/generated/instructions/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,37 @@
*/

import {
Address,
BASE_ACCOUNT_SIZE,
Codec,
Decoder,
Encoder,
IAccountMeta,
IAccountSignerMeta,
IInstruction,
IInstructionWithAccounts,
IInstructionWithData,
ReadonlyAccount,
ReadonlySignerAccount,
TransactionSigner,
WritableAccount,
WritableSignerAccount,
combineCodec,
getStructDecoder,
getStructEncoder,
getU8Decoder,
getU8Encoder,
transformEncoder,
type Address,
type Codec,
type Decoder,
type Encoder,
type IAccountMeta,
type IAccountSignerMeta,
type IInstruction,
type IInstructionWithAccounts,
type IInstructionWithData,
type ReadonlyAccount,
type ReadonlySignerAccount,
type TransactionSigner,
type WritableAccount,
type WritableSignerAccount,
} from '@solana/web3.js';
import { getCounterSize } from '../accounts';
import { findCounterPda } from '../pdas';
import { COUNTER_PROGRAM_ADDRESS } from '../programs';
import {
IInstructionWithByteDelta,
ResolvedAccount,
expectAddress,
expectSome,
getAccountMetaFactory,
type IInstructionWithByteDelta,
type ResolvedAccount,
} from '../shared';

export type CreateInstruction<
Expand Down
30 changes: 15 additions & 15 deletions clients/js/src/generated/instructions/increment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,6 @@
*/

import {
Address,
Codec,
Decoder,
Encoder,
IAccountMeta,
IAccountSignerMeta,
IInstruction,
IInstructionWithAccounts,
IInstructionWithData,
Option,
OptionOrNullable,
ReadonlySignerAccount,
TransactionSigner,
WritableAccount,
combineCodec,
getOptionDecoder,
getOptionEncoder,
Expand All @@ -32,13 +18,27 @@ import {
getU8Encoder,
none,
transformEncoder,
type Address,
type Codec,
type Decoder,
type Encoder,
type IAccountMeta,
type IAccountSignerMeta,
type IInstruction,
type IInstructionWithAccounts,
type IInstructionWithData,
type Option,
type OptionOrNullable,
type ReadonlySignerAccount,
type TransactionSigner,
type WritableAccount,
} from '@solana/web3.js';
import { findCounterPda } from '../pdas';
import { COUNTER_PROGRAM_ADDRESS } from '../programs';
import {
ResolvedAccount,
expectAddress,
getAccountMetaFactory,
type ResolvedAccount,
} from '../shared';

export type IncrementInstruction<
Expand Down
4 changes: 2 additions & 2 deletions clients/js/src/generated/pdas/counter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
*/

import {
Address,
ProgramDerivedAddress,
getAddressEncoder,
getProgramDerivedAddress,
getUtf8Encoder,
type Address,
type ProgramDerivedAddress,
} from '@solana/web3.js';

export type CounterSeeds = {
Expand Down
6 changes: 3 additions & 3 deletions clients/js/src/generated/programs/counter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
* @see https://github.com/kinobi-so/kinobi
*/

import { Address, containsBytes, getU8Encoder } from '@solana/web3.js';
import { containsBytes, getU8Encoder, type Address } from '@solana/web3.js';
import {
ParsedCreateInstruction,
ParsedIncrementInstruction,
type ParsedCreateInstruction,
type ParsedIncrementInstruction,
} from '../instructions';
import { Key, getKeyEncoder } from '../types';

Expand Down
10 changes: 5 additions & 5 deletions clients/js/src/generated/shared/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

import {
AccountRole,
Address,
IAccountMeta,
IAccountSignerMeta,
ProgramDerivedAddress,
TransactionSigner,
isProgramDerivedAddress,
isTransactionSigner as web3JsIsTransactionSigner,
type Address,
type IAccountMeta,
type IAccountSignerMeta,
type ProgramDerivedAddress,
type TransactionSigner,
upgradeRoleToSigner,
} from '@solana/web3.js';

Expand Down
6 changes: 3 additions & 3 deletions clients/js/src/generated/types/key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
*/

import {
Codec,
Decoder,
Encoder,
combineCodec,
getEnumDecoder,
getEnumEncoder,
type Codec,
type Decoder,
type Encoder,
} from '@solana/web3.js';

export enum Key {
Expand Down
25 changes: 25 additions & 0 deletions clients/rust/src/generated/accounts/counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,28 @@ impl<'a> TryFrom<&solana_program::account_info::AccountInfo<'a>> for Counter {
Self::deserialize(&mut data)
}
}

#[cfg(feature = "anchor")]
impl anchor_lang::AccountDeserialize for Counter {
fn try_deserialize_unchecked(buf: &mut &[u8]) -> anchor_lang::Result<Self> {
Ok(Self::deserialize(buf)?)
}
}

#[cfg(feature = "anchor")]
impl anchor_lang::AccountSerialize for Counter {}

#[cfg(feature = "anchor")]
impl anchor_lang::Owner for Counter {
fn owner() -> Pubkey {
crate::COUNTER_ID
}
}

#[cfg(feature = "anchor-idl-build")]
impl anchor_lang::IdlBuild for Counter {}

#[cfg(feature = "anchor-idl-build")]
impl anchor_lang::Discriminator for Counter {
const DISCRIMINATOR: [u8; 8] = [0; 8];
}
11 changes: 10 additions & 1 deletion clients/rust/src/generated/types/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ use borsh::BorshSerialize;
use num_derive::FromPrimitive;

#[derive(
BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq, PartialOrd, Hash, FromPrimitive,
BorshSerialize,
BorshDeserialize,
Clone,
Debug,
Eq,
PartialEq,
Copy,
PartialOrd,
Hash,
FromPrimitive,
)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum Key {
Expand Down
Loading

0 comments on commit 9f97899

Please sign in to comment.