Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions clients/js/src/generated/accounts/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down Expand Up @@ -56,20 +56,23 @@ export type ConfigArgs = {
data: ReadonlyUint8Array;
};

/** Gets the encoder for {@link ConfigArgs} account data. */
export function getConfigEncoder(): Encoder<ConfigArgs> {
return getStructEncoder([
['keys', getConfigKeysEncoder()],
['data', getBytesEncoder()],
]);
}

/** Gets the decoder for {@link Config} account data. */
export function getConfigDecoder(): Decoder<Config> {
return getStructDecoder([
['keys', getConfigKeysDecoder()],
['data', getBytesDecoder()],
]);
}

/** Gets the codec for {@link Config} account data. */
export function getConfigCodec(): Codec<ConfigArgs, Config> {
return combineCodec(getConfigEncoder(), getConfigDecoder());
}
Expand Down
4 changes: 2 additions & 2 deletions clients/js/src/generated/accounts/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down
4 changes: 2 additions & 2 deletions clients/js/src/generated/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down
4 changes: 2 additions & 2 deletions clients/js/src/generated/instructions/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down
17 changes: 6 additions & 11 deletions clients/js/src/generated/instructions/store.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down Expand Up @@ -150,21 +150,19 @@ export function getStoreInstruction<
);

const getAccountMeta = getAccountMetaFactory(programAddress, 'omitted');
const instruction = {
return Object.freeze({
accounts: [getAccountMeta(accounts.configAccount), ...remainingAccounts],
programAddress,
data: getStoreInstructionDataEncoder().encode(
args as StoreInstructionDataArgs
),
programAddress,
} as StoreInstruction<
TProgramAddress,
(typeof input)['configAccount'] extends TransactionSigner<TAccountConfigAccount>
? WritableSignerAccount<TAccountConfigAccount> &
AccountSignerMeta<TAccountConfigAccount>
: TAccountConfigAccount
>;

return instruction;
>);
}

export type ParsedStoreInstruction<
Expand All @@ -178,7 +176,6 @@ export type ParsedStoreInstruction<
* Must sign during the first call to `store` to initialize the account,
* or if no signers are configured in the config data.
*/

configAccount: TAccountMetas[0];
};
data: StoreInstructionData;
Expand All @@ -204,9 +201,7 @@ export function parseStoreInstruction<
};
return {
programAddress: instruction.programAddress,
accounts: {
configAccount: getNextAccount(),
},
accounts: { configAccount: getNextAccount() },
data: getStoreInstructionDataDecoder().decode(instruction.data),
};
}
4 changes: 2 additions & 2 deletions clients/js/src/generated/programs/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down
4 changes: 2 additions & 2 deletions clients/js/src/generated/programs/solanaConfig.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down
4 changes: 2 additions & 2 deletions clients/js/src/generated/shared/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down
5 changes: 2 additions & 3 deletions clients/js/src/generated/types/configKeys.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down Expand Up @@ -29,7 +29,6 @@ import {
* Each key tuple comprises a unique `Pubkey` identifier,
* and `bool` whether that key is a signer of the data.
*/

export type ConfigKeys = Array<readonly [Address, boolean]>;

export type ConfigKeysArgs = ConfigKeys;
Expand Down
4 changes: 2 additions & 2 deletions clients/js/src/generated/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code was AUTOGENERATED using the codama library.
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"generate:clients": "codama run --all"
},
"devDependencies": {
"@codama/renderers-js": "^1.3",
"@codama/renderers-js": "^1.5",
"@codama/renderers-rust": "~1.0",
"@codama/visitors-core": "^1.4.0",
"codama": "^1.4",
Expand Down
Loading