@solana-mobile/guardian-client 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +6 -42
  2. package/dist/src/index.js +4641 -0
  3. package/dist/src/index.js.map +1 -0
  4. package/dist/src/index.mjs +4282 -0
  5. package/dist/src/index.mjs.map +1 -0
  6. package/dist/types/generated/accounts/appAccount.d.ts +50 -0
  7. package/dist/types/generated/accounts/guardiansConfig.d.ts +54 -0
  8. package/dist/types/generated/accounts/index.d.ts +10 -0
  9. package/dist/types/generated/accounts/pendingRegistry.d.ts +35 -0
  10. package/dist/types/generated/constants/guardian.d.ts +8 -0
  11. package/dist/types/generated/constants/index.d.ts +8 -0
  12. package/dist/types/generated/errors/guardian.d.ts +95 -0
  13. package/dist/types/generated/errors/index.d.ts +8 -0
  14. package/dist/types/generated/events/appAuthorityAccepted.d.ts +42 -0
  15. package/dist/types/generated/events/appAuthorityProposed.d.ts +42 -0
  16. package/dist/types/generated/events/appDeveloperUpdated.d.ts +42 -0
  17. package/dist/types/generated/events/appRegistered.d.ts +42 -0
  18. package/dist/types/generated/events/configAuthorityAccepted.d.ts +38 -0
  19. package/dist/types/generated/events/configAuthorityProposed.d.ts +38 -0
  20. package/dist/types/generated/events/configInitialized.d.ts +46 -0
  21. package/dist/types/generated/events/configUpdated.d.ts +52 -0
  22. package/dist/types/generated/events/guardianAdded.d.ts +34 -0
  23. package/dist/types/generated/events/guardianRegistered.d.ts +46 -0
  24. package/dist/types/generated/events/guardianRemoved.d.ts +42 -0
  25. package/dist/types/generated/events/guardianVoteAuthorityRotated.d.ts +42 -0
  26. package/dist/types/generated/events/index.d.ts +25 -0
  27. package/dist/types/generated/events/releaseApproved.d.ts +27 -0
  28. package/dist/types/generated/events/releaseCancelled.d.ts +38 -0
  29. package/dist/types/generated/events/releaseExpired.d.ts +38 -0
  30. package/dist/types/generated/events/releaseProposed.d.ts +42 -0
  31. package/dist/types/generated/events/releaseRejected.d.ts +27 -0
  32. package/dist/types/generated/events/voteCast.d.ts +55 -0
  33. package/dist/types/generated/index.d.ts +15 -0
  34. package/dist/types/generated/instructions/acceptAppAuthority.d.ts +71 -0
  35. package/dist/types/generated/instructions/acceptConfigAuthority.d.ts +71 -0
  36. package/dist/types/generated/instructions/addGuardian.d.ts +90 -0
  37. package/dist/types/generated/instructions/cancelRelease.d.ts +78 -0
  38. package/dist/types/generated/instructions/expireRelease.d.ts +71 -0
  39. package/dist/types/generated/instructions/index.d.ts +24 -0
  40. package/dist/types/generated/instructions/initializeConfig.d.ts +135 -0
  41. package/dist/types/generated/instructions/proposeAppAuthority.d.ts +76 -0
  42. package/dist/types/generated/instructions/proposeConfigAuthority.d.ts +76 -0
  43. package/dist/types/generated/instructions/proposeRelease.d.ts +121 -0
  44. package/dist/types/generated/instructions/registerApp.d.ts +87 -0
  45. package/dist/types/generated/instructions/registerGuardian.d.ts +120 -0
  46. package/dist/types/generated/instructions/removeGuardian.d.ts +120 -0
  47. package/dist/types/generated/instructions/rotateVoteAuthority.d.ts +80 -0
  48. package/dist/types/generated/instructions/setAppDeveloper.d.ts +112 -0
  49. package/dist/types/generated/instructions/updateConfig.d.ts +88 -0
  50. package/dist/types/generated/instructions/vote.d.ts +116 -0
  51. package/dist/types/generated/instructions/writeReleaseManifest.d.ts +104 -0
  52. package/dist/types/generated/pdas/bondVault.d.ts +11 -0
  53. package/dist/types/generated/pdas/guardiansConfig.d.ts +11 -0
  54. package/dist/types/generated/pdas/index.d.ts +10 -0
  55. package/dist/types/generated/pdas/pendingRegistry.d.ts +11 -0
  56. package/dist/types/generated/programs/guardian.d.ts +179 -0
  57. package/dist/types/generated/programs/index.d.ts +8 -0
  58. package/dist/types/generated/types/bondInfo.d.ts +19 -0
  59. package/dist/types/generated/types/guardianInfo.d.ts +19 -0
  60. package/dist/types/generated/types/index.d.ts +14 -0
  61. package/dist/types/generated/types/pendingRelease.d.ts +29 -0
  62. package/dist/types/generated/types/publishedApp.d.ts +16 -0
  63. package/dist/types/generated/types/releaseManifest.d.ts +45 -0
  64. package/dist/types/generated/types/releaseResolution.d.ts +65 -0
  65. package/dist/types/generated/types/voteFinding.d.ts +24 -0
  66. package/dist/types/index.d.ts +3 -0
  67. package/dist/types/manifest.d.ts +72 -0
  68. package/dist/types/proposal.d.ts +66 -0
  69. package/package.json +59 -8
@@ -0,0 +1,121 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type WritableAccount, type WritableSignerAccount } from '@solana/kit';
9
+ import { type InstructionAccountInput, type InstructionAccountInputAddress, type InstructionSignerInput, type ResolvedInstructionAccountMeta } from '@solana/program-client-core';
10
+ import { GUARDIAN_PROGRAM_ADDRESS } from '../programs';
11
+ export declare const PROPOSE_RELEASE_DISCRIMINATOR: ReadonlyUint8Array;
12
+ export declare function getProposeReleaseDiscriminatorBytes(): ReadonlyUint8Array;
13
+ export type ProposeReleaseInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountFunder extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TAccountApp extends string | AccountMeta<string> = string, TAccountConfig extends string | AccountMeta<string> = string, TAccountRegistry extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TAccountEventAuthority extends string | AccountMeta<string> = string, TAccountProgram extends string | AccountMeta<string> = 'GUARDsVUfAaydbPU6QGcpWRLUkExaULtaygwEtkdhZAD', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
14
+ TAccountFunder extends string ? WritableSignerAccount<TAccountFunder> & AccountSignerMeta<TAccountFunder> : TAccountFunder,
15
+ TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
16
+ TAccountApp extends string ? WritableAccount<TAccountApp> : TAccountApp,
17
+ TAccountConfig extends string ? ReadonlyAccount<TAccountConfig> : TAccountConfig,
18
+ TAccountRegistry extends string ? WritableAccount<TAccountRegistry> : TAccountRegistry,
19
+ TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
20
+ TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
21
+ TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
22
+ ...TRemainingAccounts
23
+ ]>;
24
+ export type ProposeReleaseInstructionData = {
25
+ discriminator: ReadonlyUint8Array;
26
+ versionCode: number;
27
+ manifestHash: ReadonlyUint8Array;
28
+ certificateSha256: ReadonlyUint8Array;
29
+ };
30
+ export type ProposeReleaseInstructionDataArgs = {
31
+ versionCode: number;
32
+ manifestHash: ReadonlyUint8Array;
33
+ certificateSha256: ReadonlyUint8Array;
34
+ };
35
+ export declare function getProposeReleaseInstructionDataEncoder(): FixedSizeEncoder<ProposeReleaseInstructionDataArgs>;
36
+ export declare function getProposeReleaseInstructionDataDecoder(): FixedSizeDecoder<ProposeReleaseInstructionData>;
37
+ export declare function getProposeReleaseInstructionDataCodec(): FixedSizeCodec<ProposeReleaseInstructionDataArgs, ProposeReleaseInstructionData>;
38
+ export type ProposeReleaseAsyncInput<TAccountFunder extends InstructionSignerInput = InstructionSignerInput, TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountApp extends InstructionAccountInput = InstructionAccountInput, TAccountConfig extends InstructionAccountInput = InstructionAccountInput, TAccountRegistry extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
39
+ /**
40
+ * Pays rent for the release's votes, its published version, and its registry entry. Must be
41
+ * owned by the System Program.
42
+ */
43
+ funder: TAccountFunder;
44
+ /** App authority or one of its developers. */
45
+ authority: TAccountAuthority;
46
+ /** App with the upload to finalize. */
47
+ app: TAccountApp;
48
+ /** Global config. */
49
+ config?: TAccountConfig;
50
+ /** Pending-release registry. Finalizing adds the app. */
51
+ registry?: TAccountRegistry;
52
+ /** For the rent transfer. */
53
+ systemProgram?: TAccountSystemProgram;
54
+ /** CHECK: Only the event authority can invoke self-CPI */
55
+ eventAuthority?: TAccountEventAuthority;
56
+ /** CHECK: Kept for v1-compatible account ordering and IDL shape */
57
+ program?: TAccountProgram;
58
+ versionCode: ProposeReleaseInstructionDataArgs['versionCode'];
59
+ manifestHash: ProposeReleaseInstructionDataArgs['manifestHash'];
60
+ certificateSha256: ProposeReleaseInstructionDataArgs['certificateSha256'];
61
+ };
62
+ export declare function getProposeReleaseInstructionAsync<TAccountFunder extends InstructionSignerInput, TAccountAuthority extends InstructionSignerInput, TAccountApp extends InstructionAccountInput, TAccountConfig extends InstructionAccountInput, TAccountRegistry extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: ProposeReleaseAsyncInput<TAccountFunder, TAccountAuthority, TAccountApp, TAccountConfig, TAccountRegistry, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
63
+ programAddress?: TProgramAddress | {
64
+ readonly address: TProgramAddress;
65
+ };
66
+ }): Promise<ProposeReleaseInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountFunder, InstructionAccountInputAddress<TAccountFunder>>, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountApp, InstructionAccountInputAddress<TAccountApp>>, ResolvedInstructionAccountMeta<TAccountConfig, InstructionAccountInputAddress<TAccountConfig>>, ResolvedInstructionAccountMeta<TAccountRegistry, InstructionAccountInputAddress<TAccountRegistry>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>>;
67
+ export type ProposeReleaseInput<TAccountFunder extends InstructionSignerInput = InstructionSignerInput, TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountApp extends InstructionAccountInput = InstructionAccountInput, TAccountConfig extends InstructionAccountInput = InstructionAccountInput, TAccountRegistry extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
68
+ /**
69
+ * Pays rent for the release's votes, its published version, and its registry entry. Must be
70
+ * owned by the System Program.
71
+ */
72
+ funder: TAccountFunder;
73
+ /** App authority or one of its developers. */
74
+ authority: TAccountAuthority;
75
+ /** App with the upload to finalize. */
76
+ app: TAccountApp;
77
+ /** Global config. */
78
+ config: TAccountConfig;
79
+ /** Pending-release registry. Finalizing adds the app. */
80
+ registry: TAccountRegistry;
81
+ /** For the rent transfer. */
82
+ systemProgram?: TAccountSystemProgram;
83
+ /** CHECK: Only the event authority can invoke self-CPI */
84
+ eventAuthority: TAccountEventAuthority;
85
+ /** CHECK: Kept for v1-compatible account ordering and IDL shape */
86
+ program?: TAccountProgram;
87
+ versionCode: ProposeReleaseInstructionDataArgs['versionCode'];
88
+ manifestHash: ProposeReleaseInstructionDataArgs['manifestHash'];
89
+ certificateSha256: ProposeReleaseInstructionDataArgs['certificateSha256'];
90
+ };
91
+ export declare function getProposeReleaseInstruction<TAccountFunder extends InstructionSignerInput, TAccountAuthority extends InstructionSignerInput, TAccountApp extends InstructionAccountInput, TAccountConfig extends InstructionAccountInput, TAccountRegistry extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: ProposeReleaseInput<TAccountFunder, TAccountAuthority, TAccountApp, TAccountConfig, TAccountRegistry, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
92
+ programAddress?: TProgramAddress | {
93
+ readonly address: TProgramAddress;
94
+ };
95
+ }): ProposeReleaseInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountFunder, InstructionAccountInputAddress<TAccountFunder>>, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountApp, InstructionAccountInputAddress<TAccountApp>>, ResolvedInstructionAccountMeta<TAccountConfig, InstructionAccountInputAddress<TAccountConfig>>, ResolvedInstructionAccountMeta<TAccountRegistry, InstructionAccountInputAddress<TAccountRegistry>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>;
96
+ export type ParsedProposeReleaseInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
97
+ programAddress: Address<TProgram>;
98
+ accounts: {
99
+ /**
100
+ * Pays rent for the release's votes, its published version, and its registry entry. Must be
101
+ * owned by the System Program.
102
+ */
103
+ funder: TAccountMetas[0];
104
+ /** App authority or one of its developers. */
105
+ authority: TAccountMetas[1];
106
+ /** App with the upload to finalize. */
107
+ app: TAccountMetas[2];
108
+ /** Global config. */
109
+ config: TAccountMetas[3];
110
+ /** Pending-release registry. Finalizing adds the app. */
111
+ registry: TAccountMetas[4];
112
+ /** For the rent transfer. */
113
+ systemProgram: TAccountMetas[5];
114
+ /** CHECK: Only the event authority can invoke self-CPI */
115
+ eventAuthority: TAccountMetas[6];
116
+ /** CHECK: Kept for v1-compatible account ordering and IDL shape */
117
+ program: TAccountMetas[7];
118
+ };
119
+ data: ProposeReleaseInstructionData;
120
+ };
121
+ export declare function parseProposeReleaseInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedProposeReleaseInstruction<TProgram, TAccountMetas>;
@@ -0,0 +1,87 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type AccountMeta, type AccountSignerMeta, type Address, type Codec, type Decoder, type Encoder, type HasAddress, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type WritableSignerAccount } from '@solana/kit';
9
+ import { type InstructionAccountInput, type InstructionAccountInputAddress, type InstructionSignerInput, type ResolvedInstructionAccountMeta } from '@solana/program-client-core';
10
+ import { GUARDIAN_PROGRAM_ADDRESS } from '../programs';
11
+ export declare const REGISTER_APP_DISCRIMINATOR: ReadonlyUint8Array;
12
+ export declare function getRegisterAppDiscriminatorBytes(): ReadonlyUint8Array;
13
+ export type RegisterAppInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountFunder extends string | AccountMeta<string> = string, TAccountApp extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TAccountEventAuthority extends string | AccountMeta<string> = string, TAccountProgram extends string | AccountMeta<string> = 'GUARDsVUfAaydbPU6QGcpWRLUkExaULtaygwEtkdhZAD', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
14
+ TAccountFunder extends string ? WritableSignerAccount<TAccountFunder> & AccountSignerMeta<TAccountFunder> : TAccountFunder,
15
+ TAccountApp extends string ? WritableSignerAccount<TAccountApp> & AccountSignerMeta<TAccountApp> : TAccountApp,
16
+ TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
17
+ TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
18
+ TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
19
+ ...TRemainingAccounts
20
+ ]>;
21
+ export type RegisterAppInstructionData = {
22
+ discriminator: ReadonlyUint8Array;
23
+ authority: Address;
24
+ name: string;
25
+ };
26
+ export type RegisterAppInstructionDataArgs = {
27
+ authority: Address | HasAddress;
28
+ name: string;
29
+ };
30
+ export declare function getRegisterAppInstructionDataEncoder(): Encoder<RegisterAppInstructionDataArgs>;
31
+ export declare function getRegisterAppInstructionDataDecoder(): Decoder<RegisterAppInstructionData>;
32
+ export declare function getRegisterAppInstructionDataCodec(): Codec<RegisterAppInstructionDataArgs, RegisterAppInstructionData>;
33
+ export type RegisterAppAsyncInput<TAccountFunder extends InstructionSignerInput = InstructionSignerInput, TAccountApp extends InstructionSignerInput = InstructionSignerInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
34
+ /** Pays rent for the app account. Must be owned by the System Program. */
35
+ funder: TAccountFunder;
36
+ /** The new app account. A fresh keypair that signs this transaction. */
37
+ app: TAccountApp;
38
+ /** Creates the app account. */
39
+ systemProgram?: TAccountSystemProgram;
40
+ /** CHECK: Only the event authority can invoke self-CPI */
41
+ eventAuthority?: TAccountEventAuthority;
42
+ /** CHECK: Kept for v1-compatible account ordering and IDL shape */
43
+ program?: TAccountProgram;
44
+ authority: RegisterAppInstructionDataArgs['authority'];
45
+ name: RegisterAppInstructionDataArgs['name'];
46
+ };
47
+ export declare function getRegisterAppInstructionAsync<TAccountFunder extends InstructionSignerInput, TAccountApp extends InstructionSignerInput, TAccountSystemProgram extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: RegisterAppAsyncInput<TAccountFunder, TAccountApp, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
48
+ programAddress?: TProgramAddress | {
49
+ readonly address: TProgramAddress;
50
+ };
51
+ }): Promise<RegisterAppInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountFunder, InstructionAccountInputAddress<TAccountFunder>>, ResolvedInstructionAccountMeta<TAccountApp, InstructionAccountInputAddress<TAccountApp>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>>;
52
+ export type RegisterAppInput<TAccountFunder extends InstructionSignerInput = InstructionSignerInput, TAccountApp extends InstructionSignerInput = InstructionSignerInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
53
+ /** Pays rent for the app account. Must be owned by the System Program. */
54
+ funder: TAccountFunder;
55
+ /** The new app account. A fresh keypair that signs this transaction. */
56
+ app: TAccountApp;
57
+ /** Creates the app account. */
58
+ systemProgram?: TAccountSystemProgram;
59
+ /** CHECK: Only the event authority can invoke self-CPI */
60
+ eventAuthority: TAccountEventAuthority;
61
+ /** CHECK: Kept for v1-compatible account ordering and IDL shape */
62
+ program?: TAccountProgram;
63
+ authority: RegisterAppInstructionDataArgs['authority'];
64
+ name: RegisterAppInstructionDataArgs['name'];
65
+ };
66
+ export declare function getRegisterAppInstruction<TAccountFunder extends InstructionSignerInput, TAccountApp extends InstructionSignerInput, TAccountSystemProgram extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: RegisterAppInput<TAccountFunder, TAccountApp, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
67
+ programAddress?: TProgramAddress | {
68
+ readonly address: TProgramAddress;
69
+ };
70
+ }): RegisterAppInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountFunder, InstructionAccountInputAddress<TAccountFunder>>, ResolvedInstructionAccountMeta<TAccountApp, InstructionAccountInputAddress<TAccountApp>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>;
71
+ export type ParsedRegisterAppInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
72
+ programAddress: Address<TProgram>;
73
+ accounts: {
74
+ /** Pays rent for the app account. Must be owned by the System Program. */
75
+ funder: TAccountMetas[0];
76
+ /** The new app account. A fresh keypair that signs this transaction. */
77
+ app: TAccountMetas[1];
78
+ /** Creates the app account. */
79
+ systemProgram: TAccountMetas[2];
80
+ /** CHECK: Only the event authority can invoke self-CPI */
81
+ eventAuthority: TAccountMetas[3];
82
+ /** CHECK: Kept for v1-compatible account ordering and IDL shape */
83
+ program: TAccountMetas[4];
84
+ };
85
+ data: RegisterAppInstructionData;
86
+ };
87
+ export declare function parseRegisterAppInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedRegisterAppInstruction<TProgram, TAccountMetas>;
@@ -0,0 +1,120 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type HasAddress, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type WritableAccount, type WritableSignerAccount } from '@solana/kit';
9
+ import { type InstructionAccountInput, type InstructionAccountInputAddress, type InstructionSignerInput, type ResolvedInstructionAccountMeta } from '@solana/program-client-core';
10
+ import { GUARDIAN_PROGRAM_ADDRESS } from '../programs';
11
+ export declare const REGISTER_GUARDIAN_DISCRIMINATOR: ReadonlyUint8Array;
12
+ export declare function getRegisterGuardianDiscriminatorBytes(): ReadonlyUint8Array;
13
+ export type RegisterGuardianInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountFunder extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TAccountConfig extends string | AccountMeta<string> = string, TAccountBondSource extends string | AccountMeta<string> = string, TAccountBondVault extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TAccountEventAuthority extends string | AccountMeta<string> = string, TAccountProgram extends string | AccountMeta<string> = 'GUARDsVUfAaydbPU6QGcpWRLUkExaULtaygwEtkdhZAD', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
14
+ TAccountFunder extends string ? WritableSignerAccount<TAccountFunder> & AccountSignerMeta<TAccountFunder> : TAccountFunder,
15
+ TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
16
+ TAccountConfig extends string ? WritableAccount<TAccountConfig> : TAccountConfig,
17
+ TAccountBondSource extends string ? WritableAccount<TAccountBondSource> : TAccountBondSource,
18
+ TAccountBondVault extends string ? WritableAccount<TAccountBondVault> : TAccountBondVault,
19
+ TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
20
+ TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
21
+ TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
22
+ TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
23
+ ...TRemainingAccounts
24
+ ]>;
25
+ export type RegisterGuardianInstructionData = {
26
+ discriminator: ReadonlyUint8Array;
27
+ voteAuthority: Address;
28
+ };
29
+ export type RegisterGuardianInstructionDataArgs = {
30
+ voteAuthority: Address | HasAddress;
31
+ };
32
+ export declare function getRegisterGuardianInstructionDataEncoder(): FixedSizeEncoder<RegisterGuardianInstructionDataArgs>;
33
+ export declare function getRegisterGuardianInstructionDataDecoder(): FixedSizeDecoder<RegisterGuardianInstructionData>;
34
+ export declare function getRegisterGuardianInstructionDataCodec(): FixedSizeCodec<RegisterGuardianInstructionDataArgs, RegisterGuardianInstructionData>;
35
+ export type RegisterGuardianAsyncInput<TAccountFunder extends InstructionSignerInput = InstructionSignerInput, TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountConfig extends InstructionAccountInput = InstructionAccountInput, TAccountBondSource extends InstructionAccountInput = InstructionAccountInput, TAccountBondVault extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
36
+ /** Pays rent for the new entry. Must be owned by the System Program. */
37
+ funder: TAccountFunder;
38
+ /** The guardian's authority key. */
39
+ authority: TAccountAuthority;
40
+ /** Global config. */
41
+ config?: TAccountConfig;
42
+ /**
43
+ * Token account the bond is paid from. `authority` must own it or be its delegate, and its
44
+ * mint must be the bond mint.
45
+ */
46
+ bondSource: TAccountBondSource;
47
+ /** Bond vault. Receives the bond. */
48
+ bondVault?: TAccountBondVault;
49
+ /** For the bond transfer. */
50
+ tokenProgram?: TAccountTokenProgram;
51
+ /** For the rent transfer. */
52
+ systemProgram?: TAccountSystemProgram;
53
+ /** CHECK: Only the event authority can invoke self-CPI */
54
+ eventAuthority?: TAccountEventAuthority;
55
+ /** CHECK: Kept for v1-compatible account ordering and IDL shape */
56
+ program?: TAccountProgram;
57
+ voteAuthority: RegisterGuardianInstructionDataArgs['voteAuthority'];
58
+ };
59
+ export declare function getRegisterGuardianInstructionAsync<TAccountFunder extends InstructionSignerInput, TAccountAuthority extends InstructionSignerInput, TAccountConfig extends InstructionAccountInput, TAccountBondSource extends InstructionAccountInput, TAccountBondVault extends InstructionAccountInput, TAccountTokenProgram extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: RegisterGuardianAsyncInput<TAccountFunder, TAccountAuthority, TAccountConfig, TAccountBondSource, TAccountBondVault, TAccountTokenProgram, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
60
+ programAddress?: TProgramAddress | {
61
+ readonly address: TProgramAddress;
62
+ };
63
+ }): Promise<RegisterGuardianInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountFunder, InstructionAccountInputAddress<TAccountFunder>>, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountConfig, InstructionAccountInputAddress<TAccountConfig>>, ResolvedInstructionAccountMeta<TAccountBondSource, InstructionAccountInputAddress<TAccountBondSource>>, ResolvedInstructionAccountMeta<TAccountBondVault, InstructionAccountInputAddress<TAccountBondVault>>, ResolvedInstructionAccountMeta<TAccountTokenProgram, InstructionAccountInputAddress<TAccountTokenProgram>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>>;
64
+ export type RegisterGuardianInput<TAccountFunder extends InstructionSignerInput = InstructionSignerInput, TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountConfig extends InstructionAccountInput = InstructionAccountInput, TAccountBondSource extends InstructionAccountInput = InstructionAccountInput, TAccountBondVault extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
65
+ /** Pays rent for the new entry. Must be owned by the System Program. */
66
+ funder: TAccountFunder;
67
+ /** The guardian's authority key. */
68
+ authority: TAccountAuthority;
69
+ /** Global config. */
70
+ config: TAccountConfig;
71
+ /**
72
+ * Token account the bond is paid from. `authority` must own it or be its delegate, and its
73
+ * mint must be the bond mint.
74
+ */
75
+ bondSource: TAccountBondSource;
76
+ /** Bond vault. Receives the bond. */
77
+ bondVault: TAccountBondVault;
78
+ /** For the bond transfer. */
79
+ tokenProgram?: TAccountTokenProgram;
80
+ /** For the rent transfer. */
81
+ systemProgram?: TAccountSystemProgram;
82
+ /** CHECK: Only the event authority can invoke self-CPI */
83
+ eventAuthority: TAccountEventAuthority;
84
+ /** CHECK: Kept for v1-compatible account ordering and IDL shape */
85
+ program?: TAccountProgram;
86
+ voteAuthority: RegisterGuardianInstructionDataArgs['voteAuthority'];
87
+ };
88
+ export declare function getRegisterGuardianInstruction<TAccountFunder extends InstructionSignerInput, TAccountAuthority extends InstructionSignerInput, TAccountConfig extends InstructionAccountInput, TAccountBondSource extends InstructionAccountInput, TAccountBondVault extends InstructionAccountInput, TAccountTokenProgram extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: RegisterGuardianInput<TAccountFunder, TAccountAuthority, TAccountConfig, TAccountBondSource, TAccountBondVault, TAccountTokenProgram, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
89
+ programAddress?: TProgramAddress | {
90
+ readonly address: TProgramAddress;
91
+ };
92
+ }): RegisterGuardianInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountFunder, InstructionAccountInputAddress<TAccountFunder>>, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountConfig, InstructionAccountInputAddress<TAccountConfig>>, ResolvedInstructionAccountMeta<TAccountBondSource, InstructionAccountInputAddress<TAccountBondSource>>, ResolvedInstructionAccountMeta<TAccountBondVault, InstructionAccountInputAddress<TAccountBondVault>>, ResolvedInstructionAccountMeta<TAccountTokenProgram, InstructionAccountInputAddress<TAccountTokenProgram>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>;
93
+ export type ParsedRegisterGuardianInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
94
+ programAddress: Address<TProgram>;
95
+ accounts: {
96
+ /** Pays rent for the new entry. Must be owned by the System Program. */
97
+ funder: TAccountMetas[0];
98
+ /** The guardian's authority key. */
99
+ authority: TAccountMetas[1];
100
+ /** Global config. */
101
+ config: TAccountMetas[2];
102
+ /**
103
+ * Token account the bond is paid from. `authority` must own it or be its delegate, and its
104
+ * mint must be the bond mint.
105
+ */
106
+ bondSource: TAccountMetas[3];
107
+ /** Bond vault. Receives the bond. */
108
+ bondVault: TAccountMetas[4];
109
+ /** For the bond transfer. */
110
+ tokenProgram: TAccountMetas[5];
111
+ /** For the rent transfer. */
112
+ systemProgram: TAccountMetas[6];
113
+ /** CHECK: Only the event authority can invoke self-CPI */
114
+ eventAuthority: TAccountMetas[7];
115
+ /** CHECK: Kept for v1-compatible account ordering and IDL shape */
116
+ program: TAccountMetas[8];
117
+ };
118
+ data: RegisterGuardianInstructionData;
119
+ };
120
+ export declare function parseRegisterGuardianInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedRegisterGuardianInstruction<TProgram, TAccountMetas>;
@@ -0,0 +1,120 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type HasAddress, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type WritableAccount, type WritableSignerAccount } from '@solana/kit';
9
+ import { type InstructionAccountInput, type InstructionAccountInputAddress, type InstructionSignerInput, type ResolvedInstructionAccountMeta } from '@solana/program-client-core';
10
+ import { GUARDIAN_PROGRAM_ADDRESS } from '../programs';
11
+ export declare const REMOVE_GUARDIAN_DISCRIMINATOR: ReadonlyUint8Array;
12
+ export declare function getRemoveGuardianDiscriminatorBytes(): ReadonlyUint8Array;
13
+ export type RemoveGuardianInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountFunder extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TAccountConfig extends string | AccountMeta<string> = string, TAccountBondVault extends string | AccountMeta<string> = string, TAccountDestination extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TAccountEventAuthority extends string | AccountMeta<string> = string, TAccountProgram extends string | AccountMeta<string> = 'GUARDsVUfAaydbPU6QGcpWRLUkExaULtaygwEtkdhZAD', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
14
+ TAccountFunder extends string ? WritableSignerAccount<TAccountFunder> & AccountSignerMeta<TAccountFunder> : TAccountFunder,
15
+ TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
16
+ TAccountConfig extends string ? WritableAccount<TAccountConfig> : TAccountConfig,
17
+ TAccountBondVault extends string ? WritableAccount<TAccountBondVault> : TAccountBondVault,
18
+ TAccountDestination extends string ? WritableAccount<TAccountDestination> : TAccountDestination,
19
+ TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
20
+ TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
21
+ TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
22
+ TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
23
+ ...TRemainingAccounts
24
+ ]>;
25
+ export type RemoveGuardianInstructionData = {
26
+ discriminator: ReadonlyUint8Array;
27
+ guardian: Address;
28
+ };
29
+ export type RemoveGuardianInstructionDataArgs = {
30
+ guardian: Address | HasAddress;
31
+ };
32
+ export declare function getRemoveGuardianInstructionDataEncoder(): FixedSizeEncoder<RemoveGuardianInstructionDataArgs>;
33
+ export declare function getRemoveGuardianInstructionDataDecoder(): FixedSizeDecoder<RemoveGuardianInstructionData>;
34
+ export declare function getRemoveGuardianInstructionDataCodec(): FixedSizeCodec<RemoveGuardianInstructionDataArgs, RemoveGuardianInstructionData>;
35
+ export type RemoveGuardianAsyncInput<TAccountFunder extends InstructionSignerInput = InstructionSignerInput, TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountConfig extends InstructionAccountInput = InstructionAccountInput, TAccountBondVault extends InstructionAccountInput = InstructionAccountInput, TAccountDestination extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
36
+ /**
37
+ * Gets the config's lamports above rent exemption, including the rent this removal frees. Must
38
+ * be owned by the System Program.
39
+ */
40
+ funder: TAccountFunder;
41
+ /** Config authority. */
42
+ authority: TAccountAuthority;
43
+ /** Global config. */
44
+ config?: TAccountConfig;
45
+ /** Bond vault. Pays out a registered guardian's bond. */
46
+ bondVault?: TAccountBondVault;
47
+ /** Receives the bond. Required for a registered guardian, ignored for a pending one. */
48
+ destination?: TAccountDestination;
49
+ /** For the bond transfer. */
50
+ tokenProgram?: TAccountTokenProgram;
51
+ /** For the rent refund. */
52
+ systemProgram?: TAccountSystemProgram;
53
+ /** CHECK: Only the event authority can invoke self-CPI */
54
+ eventAuthority?: TAccountEventAuthority;
55
+ /** CHECK: Kept for v1-compatible account ordering and IDL shape */
56
+ program?: TAccountProgram;
57
+ guardian: RemoveGuardianInstructionDataArgs['guardian'];
58
+ };
59
+ export declare function getRemoveGuardianInstructionAsync<TAccountFunder extends InstructionSignerInput, TAccountAuthority extends InstructionSignerInput, TAccountConfig extends InstructionAccountInput, TAccountBondVault extends InstructionAccountInput, TAccountDestination extends InstructionAccountInput, TAccountTokenProgram extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: RemoveGuardianAsyncInput<TAccountFunder, TAccountAuthority, TAccountConfig, TAccountBondVault, TAccountDestination, TAccountTokenProgram, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
60
+ programAddress?: TProgramAddress | {
61
+ readonly address: TProgramAddress;
62
+ };
63
+ }): Promise<RemoveGuardianInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountFunder, InstructionAccountInputAddress<TAccountFunder>>, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountConfig, InstructionAccountInputAddress<TAccountConfig>>, ResolvedInstructionAccountMeta<TAccountBondVault, InstructionAccountInputAddress<TAccountBondVault>>, ResolvedInstructionAccountMeta<TAccountDestination, InstructionAccountInputAddress<TAccountDestination>>, ResolvedInstructionAccountMeta<TAccountTokenProgram, InstructionAccountInputAddress<TAccountTokenProgram>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>>;
64
+ export type RemoveGuardianInput<TAccountFunder extends InstructionSignerInput = InstructionSignerInput, TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountConfig extends InstructionAccountInput = InstructionAccountInput, TAccountBondVault extends InstructionAccountInput = InstructionAccountInput, TAccountDestination extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
65
+ /**
66
+ * Gets the config's lamports above rent exemption, including the rent this removal frees. Must
67
+ * be owned by the System Program.
68
+ */
69
+ funder: TAccountFunder;
70
+ /** Config authority. */
71
+ authority: TAccountAuthority;
72
+ /** Global config. */
73
+ config: TAccountConfig;
74
+ /** Bond vault. Pays out a registered guardian's bond. */
75
+ bondVault: TAccountBondVault;
76
+ /** Receives the bond. Required for a registered guardian, ignored for a pending one. */
77
+ destination?: TAccountDestination;
78
+ /** For the bond transfer. */
79
+ tokenProgram?: TAccountTokenProgram;
80
+ /** For the rent refund. */
81
+ systemProgram?: TAccountSystemProgram;
82
+ /** CHECK: Only the event authority can invoke self-CPI */
83
+ eventAuthority: TAccountEventAuthority;
84
+ /** CHECK: Kept for v1-compatible account ordering and IDL shape */
85
+ program?: TAccountProgram;
86
+ guardian: RemoveGuardianInstructionDataArgs['guardian'];
87
+ };
88
+ export declare function getRemoveGuardianInstruction<TAccountFunder extends InstructionSignerInput, TAccountAuthority extends InstructionSignerInput, TAccountConfig extends InstructionAccountInput, TAccountBondVault extends InstructionAccountInput, TAccountDestination extends InstructionAccountInput, TAccountTokenProgram extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: RemoveGuardianInput<TAccountFunder, TAccountAuthority, TAccountConfig, TAccountBondVault, TAccountDestination, TAccountTokenProgram, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
89
+ programAddress?: TProgramAddress | {
90
+ readonly address: TProgramAddress;
91
+ };
92
+ }): RemoveGuardianInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountFunder, InstructionAccountInputAddress<TAccountFunder>>, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountConfig, InstructionAccountInputAddress<TAccountConfig>>, ResolvedInstructionAccountMeta<TAccountBondVault, InstructionAccountInputAddress<TAccountBondVault>>, ResolvedInstructionAccountMeta<TAccountDestination, InstructionAccountInputAddress<TAccountDestination>>, ResolvedInstructionAccountMeta<TAccountTokenProgram, InstructionAccountInputAddress<TAccountTokenProgram>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>;
93
+ export type ParsedRemoveGuardianInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
94
+ programAddress: Address<TProgram>;
95
+ accounts: {
96
+ /**
97
+ * Gets the config's lamports above rent exemption, including the rent this removal frees. Must
98
+ * be owned by the System Program.
99
+ */
100
+ funder: TAccountMetas[0];
101
+ /** Config authority. */
102
+ authority: TAccountMetas[1];
103
+ /** Global config. */
104
+ config: TAccountMetas[2];
105
+ /** Bond vault. Pays out a registered guardian's bond. */
106
+ bondVault: TAccountMetas[3];
107
+ /** Receives the bond. Required for a registered guardian, ignored for a pending one. */
108
+ destination?: TAccountMetas[4] | undefined;
109
+ /** For the bond transfer. */
110
+ tokenProgram: TAccountMetas[5];
111
+ /** For the rent refund. */
112
+ systemProgram: TAccountMetas[6];
113
+ /** CHECK: Only the event authority can invoke self-CPI */
114
+ eventAuthority: TAccountMetas[7];
115
+ /** CHECK: Kept for v1-compatible account ordering and IDL shape */
116
+ program: TAccountMetas[8];
117
+ };
118
+ data: RemoveGuardianInstructionData;
119
+ };
120
+ export declare function parseRemoveGuardianInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedRemoveGuardianInstruction<TProgram, TAccountMetas>;
@@ -0,0 +1,80 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type HasAddress, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type WritableAccount } from '@solana/kit';
9
+ import { type InstructionAccountInput, type InstructionAccountInputAddress, type InstructionSignerInput, type ResolvedInstructionAccountMeta } from '@solana/program-client-core';
10
+ import { GUARDIAN_PROGRAM_ADDRESS } from '../programs';
11
+ export declare const ROTATE_VOTE_AUTHORITY_DISCRIMINATOR: ReadonlyUint8Array;
12
+ export declare function getRotateVoteAuthorityDiscriminatorBytes(): ReadonlyUint8Array;
13
+ export type RotateVoteAuthorityInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountSigner extends string | AccountMeta<string> = string, TAccountConfig extends string | AccountMeta<string> = string, TAccountEventAuthority extends string | AccountMeta<string> = string, TAccountProgram extends string | AccountMeta<string> = 'GUARDsVUfAaydbPU6QGcpWRLUkExaULtaygwEtkdhZAD', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
14
+ TAccountSigner extends string ? ReadonlySignerAccount<TAccountSigner> & AccountSignerMeta<TAccountSigner> : TAccountSigner,
15
+ TAccountConfig extends string ? WritableAccount<TAccountConfig> : TAccountConfig,
16
+ TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
17
+ TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
18
+ ...TRemainingAccounts
19
+ ]>;
20
+ export type RotateVoteAuthorityInstructionData = {
21
+ discriminator: ReadonlyUint8Array;
22
+ guardian: Address;
23
+ newVoteAuthority: Address;
24
+ };
25
+ export type RotateVoteAuthorityInstructionDataArgs = {
26
+ guardian: Address | HasAddress;
27
+ newVoteAuthority: Address | HasAddress;
28
+ };
29
+ export declare function getRotateVoteAuthorityInstructionDataEncoder(): FixedSizeEncoder<RotateVoteAuthorityInstructionDataArgs>;
30
+ export declare function getRotateVoteAuthorityInstructionDataDecoder(): FixedSizeDecoder<RotateVoteAuthorityInstructionData>;
31
+ export declare function getRotateVoteAuthorityInstructionDataCodec(): FixedSizeCodec<RotateVoteAuthorityInstructionDataArgs, RotateVoteAuthorityInstructionData>;
32
+ export type RotateVoteAuthorityAsyncInput<TAccountSigner extends InstructionSignerInput = InstructionSignerInput, TAccountConfig extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
33
+ /** The guardian's authority key or its current vote authority. */
34
+ signer: TAccountSigner;
35
+ /** Global config. */
36
+ config?: TAccountConfig;
37
+ /** CHECK: Only the event authority can invoke self-CPI */
38
+ eventAuthority?: TAccountEventAuthority;
39
+ /** CHECK: Kept for v1-compatible account ordering and IDL shape */
40
+ program?: TAccountProgram;
41
+ guardian: RotateVoteAuthorityInstructionDataArgs['guardian'];
42
+ newVoteAuthority: RotateVoteAuthorityInstructionDataArgs['newVoteAuthority'];
43
+ };
44
+ export declare function getRotateVoteAuthorityInstructionAsync<TAccountSigner extends InstructionSignerInput, TAccountConfig extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: RotateVoteAuthorityAsyncInput<TAccountSigner, TAccountConfig, TAccountEventAuthority, TAccountProgram>, config?: {
45
+ programAddress?: TProgramAddress | {
46
+ readonly address: TProgramAddress;
47
+ };
48
+ }): Promise<RotateVoteAuthorityInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountSigner, InstructionAccountInputAddress<TAccountSigner>>, ResolvedInstructionAccountMeta<TAccountConfig, InstructionAccountInputAddress<TAccountConfig>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>>;
49
+ export type RotateVoteAuthorityInput<TAccountSigner extends InstructionSignerInput = InstructionSignerInput, TAccountConfig extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
50
+ /** The guardian's authority key or its current vote authority. */
51
+ signer: TAccountSigner;
52
+ /** Global config. */
53
+ config: TAccountConfig;
54
+ /** CHECK: Only the event authority can invoke self-CPI */
55
+ eventAuthority: TAccountEventAuthority;
56
+ /** CHECK: Kept for v1-compatible account ordering and IDL shape */
57
+ program?: TAccountProgram;
58
+ guardian: RotateVoteAuthorityInstructionDataArgs['guardian'];
59
+ newVoteAuthority: RotateVoteAuthorityInstructionDataArgs['newVoteAuthority'];
60
+ };
61
+ export declare function getRotateVoteAuthorityInstruction<TAccountSigner extends InstructionSignerInput, TAccountConfig extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: RotateVoteAuthorityInput<TAccountSigner, TAccountConfig, TAccountEventAuthority, TAccountProgram>, config?: {
62
+ programAddress?: TProgramAddress | {
63
+ readonly address: TProgramAddress;
64
+ };
65
+ }): RotateVoteAuthorityInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountSigner, InstructionAccountInputAddress<TAccountSigner>>, ResolvedInstructionAccountMeta<TAccountConfig, InstructionAccountInputAddress<TAccountConfig>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>;
66
+ export type ParsedRotateVoteAuthorityInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
67
+ programAddress: Address<TProgram>;
68
+ accounts: {
69
+ /** The guardian's authority key or its current vote authority. */
70
+ signer: TAccountMetas[0];
71
+ /** Global config. */
72
+ config: TAccountMetas[1];
73
+ /** CHECK: Only the event authority can invoke self-CPI */
74
+ eventAuthority: TAccountMetas[2];
75
+ /** CHECK: Kept for v1-compatible account ordering and IDL shape */
76
+ program: TAccountMetas[3];
77
+ };
78
+ data: RotateVoteAuthorityInstructionData;
79
+ };
80
+ export declare function parseRotateVoteAuthorityInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedRotateVoteAuthorityInstruction<TProgram, TAccountMetas>;