@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.
- package/README.md +6 -42
- package/dist/src/index.js +4641 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/index.mjs +4282 -0
- package/dist/src/index.mjs.map +1 -0
- package/dist/types/generated/accounts/appAccount.d.ts +50 -0
- package/dist/types/generated/accounts/guardiansConfig.d.ts +54 -0
- package/dist/types/generated/accounts/index.d.ts +10 -0
- package/dist/types/generated/accounts/pendingRegistry.d.ts +35 -0
- package/dist/types/generated/constants/guardian.d.ts +8 -0
- package/dist/types/generated/constants/index.d.ts +8 -0
- package/dist/types/generated/errors/guardian.d.ts +95 -0
- package/dist/types/generated/errors/index.d.ts +8 -0
- package/dist/types/generated/events/appAuthorityAccepted.d.ts +42 -0
- package/dist/types/generated/events/appAuthorityProposed.d.ts +42 -0
- package/dist/types/generated/events/appDeveloperUpdated.d.ts +42 -0
- package/dist/types/generated/events/appRegistered.d.ts +42 -0
- package/dist/types/generated/events/configAuthorityAccepted.d.ts +38 -0
- package/dist/types/generated/events/configAuthorityProposed.d.ts +38 -0
- package/dist/types/generated/events/configInitialized.d.ts +46 -0
- package/dist/types/generated/events/configUpdated.d.ts +52 -0
- package/dist/types/generated/events/guardianAdded.d.ts +34 -0
- package/dist/types/generated/events/guardianRegistered.d.ts +46 -0
- package/dist/types/generated/events/guardianRemoved.d.ts +42 -0
- package/dist/types/generated/events/guardianVoteAuthorityRotated.d.ts +42 -0
- package/dist/types/generated/events/index.d.ts +25 -0
- package/dist/types/generated/events/releaseApproved.d.ts +27 -0
- package/dist/types/generated/events/releaseCancelled.d.ts +38 -0
- package/dist/types/generated/events/releaseExpired.d.ts +38 -0
- package/dist/types/generated/events/releaseProposed.d.ts +42 -0
- package/dist/types/generated/events/releaseRejected.d.ts +27 -0
- package/dist/types/generated/events/voteCast.d.ts +55 -0
- package/dist/types/generated/index.d.ts +15 -0
- package/dist/types/generated/instructions/acceptAppAuthority.d.ts +71 -0
- package/dist/types/generated/instructions/acceptConfigAuthority.d.ts +71 -0
- package/dist/types/generated/instructions/addGuardian.d.ts +90 -0
- package/dist/types/generated/instructions/cancelRelease.d.ts +78 -0
- package/dist/types/generated/instructions/expireRelease.d.ts +71 -0
- package/dist/types/generated/instructions/index.d.ts +24 -0
- package/dist/types/generated/instructions/initializeConfig.d.ts +135 -0
- package/dist/types/generated/instructions/proposeAppAuthority.d.ts +76 -0
- package/dist/types/generated/instructions/proposeConfigAuthority.d.ts +76 -0
- package/dist/types/generated/instructions/proposeRelease.d.ts +121 -0
- package/dist/types/generated/instructions/registerApp.d.ts +87 -0
- package/dist/types/generated/instructions/registerGuardian.d.ts +120 -0
- package/dist/types/generated/instructions/removeGuardian.d.ts +120 -0
- package/dist/types/generated/instructions/rotateVoteAuthority.d.ts +80 -0
- package/dist/types/generated/instructions/setAppDeveloper.d.ts +112 -0
- package/dist/types/generated/instructions/updateConfig.d.ts +88 -0
- package/dist/types/generated/instructions/vote.d.ts +116 -0
- package/dist/types/generated/instructions/writeReleaseManifest.d.ts +104 -0
- package/dist/types/generated/pdas/bondVault.d.ts +11 -0
- package/dist/types/generated/pdas/guardiansConfig.d.ts +11 -0
- package/dist/types/generated/pdas/index.d.ts +10 -0
- package/dist/types/generated/pdas/pendingRegistry.d.ts +11 -0
- package/dist/types/generated/programs/guardian.d.ts +179 -0
- package/dist/types/generated/programs/index.d.ts +8 -0
- package/dist/types/generated/types/bondInfo.d.ts +19 -0
- package/dist/types/generated/types/guardianInfo.d.ts +19 -0
- package/dist/types/generated/types/index.d.ts +14 -0
- package/dist/types/generated/types/pendingRelease.d.ts +29 -0
- package/dist/types/generated/types/publishedApp.d.ts +16 -0
- package/dist/types/generated/types/releaseManifest.d.ts +45 -0
- package/dist/types/generated/types/releaseResolution.d.ts +65 -0
- package/dist/types/generated/types/voteFinding.d.ts +24 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/manifest.d.ts +72 -0
- package/dist/types/proposal.d.ts +66 -0
- package/package.json +59 -8
|
@@ -0,0 +1,90 @@
|
|
|
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 ADD_GUARDIAN_DISCRIMINATOR: ReadonlyUint8Array;
|
|
12
|
+
export declare function getAddGuardianDiscriminatorBytes(): ReadonlyUint8Array;
|
|
13
|
+
export type AddGuardianInstruction<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, 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
|
+
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
|
|
18
|
+
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
19
|
+
TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
|
|
20
|
+
...TRemainingAccounts
|
|
21
|
+
]>;
|
|
22
|
+
export type AddGuardianInstructionData = {
|
|
23
|
+
discriminator: ReadonlyUint8Array;
|
|
24
|
+
guardian: Address;
|
|
25
|
+
};
|
|
26
|
+
export type AddGuardianInstructionDataArgs = {
|
|
27
|
+
guardian: Address | HasAddress;
|
|
28
|
+
};
|
|
29
|
+
export declare function getAddGuardianInstructionDataEncoder(): FixedSizeEncoder<AddGuardianInstructionDataArgs>;
|
|
30
|
+
export declare function getAddGuardianInstructionDataDecoder(): FixedSizeDecoder<AddGuardianInstructionData>;
|
|
31
|
+
export declare function getAddGuardianInstructionDataCodec(): FixedSizeCodec<AddGuardianInstructionDataArgs, AddGuardianInstructionData>;
|
|
32
|
+
export type AddGuardianAsyncInput<TAccountFunder extends InstructionSignerInput = InstructionSignerInput, TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountConfig extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
33
|
+
/** Pays rent for the new entry. Must be owned by the System Program. */
|
|
34
|
+
funder: TAccountFunder;
|
|
35
|
+
/** Config authority. */
|
|
36
|
+
authority: TAccountAuthority;
|
|
37
|
+
/** Global config. */
|
|
38
|
+
config?: TAccountConfig;
|
|
39
|
+
/** For the rent transfer. */
|
|
40
|
+
systemProgram?: TAccountSystemProgram;
|
|
41
|
+
/** CHECK: Only the event authority can invoke self-CPI */
|
|
42
|
+
eventAuthority?: TAccountEventAuthority;
|
|
43
|
+
/** CHECK: Kept for v1-compatible account ordering and IDL shape */
|
|
44
|
+
program?: TAccountProgram;
|
|
45
|
+
guardian: AddGuardianInstructionDataArgs['guardian'];
|
|
46
|
+
};
|
|
47
|
+
export declare function getAddGuardianInstructionAsync<TAccountFunder extends InstructionSignerInput, TAccountAuthority extends InstructionSignerInput, TAccountConfig extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: AddGuardianAsyncInput<TAccountFunder, TAccountAuthority, TAccountConfig, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
48
|
+
programAddress?: TProgramAddress | {
|
|
49
|
+
readonly address: TProgramAddress;
|
|
50
|
+
};
|
|
51
|
+
}): Promise<AddGuardianInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountFunder, InstructionAccountInputAddress<TAccountFunder>>, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountConfig, InstructionAccountInputAddress<TAccountConfig>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>>;
|
|
52
|
+
export type AddGuardianInput<TAccountFunder extends InstructionSignerInput = InstructionSignerInput, TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountConfig extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
53
|
+
/** Pays rent for the new entry. Must be owned by the System Program. */
|
|
54
|
+
funder: TAccountFunder;
|
|
55
|
+
/** Config authority. */
|
|
56
|
+
authority: TAccountAuthority;
|
|
57
|
+
/** Global config. */
|
|
58
|
+
config: TAccountConfig;
|
|
59
|
+
/** For the rent transfer. */
|
|
60
|
+
systemProgram?: TAccountSystemProgram;
|
|
61
|
+
/** CHECK: Only the event authority can invoke self-CPI */
|
|
62
|
+
eventAuthority: TAccountEventAuthority;
|
|
63
|
+
/** CHECK: Kept for v1-compatible account ordering and IDL shape */
|
|
64
|
+
program?: TAccountProgram;
|
|
65
|
+
guardian: AddGuardianInstructionDataArgs['guardian'];
|
|
66
|
+
};
|
|
67
|
+
export declare function getAddGuardianInstruction<TAccountFunder extends InstructionSignerInput, TAccountAuthority extends InstructionSignerInput, TAccountConfig extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: AddGuardianInput<TAccountFunder, TAccountAuthority, TAccountConfig, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
68
|
+
programAddress?: TProgramAddress | {
|
|
69
|
+
readonly address: TProgramAddress;
|
|
70
|
+
};
|
|
71
|
+
}): AddGuardianInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountFunder, InstructionAccountInputAddress<TAccountFunder>>, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountConfig, InstructionAccountInputAddress<TAccountConfig>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>;
|
|
72
|
+
export type ParsedAddGuardianInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
73
|
+
programAddress: Address<TProgram>;
|
|
74
|
+
accounts: {
|
|
75
|
+
/** Pays rent for the new entry. Must be owned by the System Program. */
|
|
76
|
+
funder: TAccountMetas[0];
|
|
77
|
+
/** Config authority. */
|
|
78
|
+
authority: TAccountMetas[1];
|
|
79
|
+
/** Global config. */
|
|
80
|
+
config: TAccountMetas[2];
|
|
81
|
+
/** For the rent transfer. */
|
|
82
|
+
systemProgram: TAccountMetas[3];
|
|
83
|
+
/** CHECK: Only the event authority can invoke self-CPI */
|
|
84
|
+
eventAuthority: TAccountMetas[4];
|
|
85
|
+
/** CHECK: Kept for v1-compatible account ordering and IDL shape */
|
|
86
|
+
program: TAccountMetas[5];
|
|
87
|
+
};
|
|
88
|
+
data: AddGuardianInstructionData;
|
|
89
|
+
};
|
|
90
|
+
export declare function parseAddGuardianInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedAddGuardianInstruction<TProgram, TAccountMetas>;
|
|
@@ -0,0 +1,78 @@
|
|
|
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 } 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 CANCEL_RELEASE_DISCRIMINATOR: ReadonlyUint8Array;
|
|
12
|
+
export declare function getCancelReleaseDiscriminatorBytes(): ReadonlyUint8Array;
|
|
13
|
+
export type CancelReleaseInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountAuthority extends string | AccountMeta<string> = string, TAccountApp extends string | AccountMeta<string> = string, TAccountRegistry 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
|
+
TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
|
|
15
|
+
TAccountApp extends string ? WritableAccount<TAccountApp> : TAccountApp,
|
|
16
|
+
TAccountRegistry extends string ? WritableAccount<TAccountRegistry> : TAccountRegistry,
|
|
17
|
+
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
18
|
+
TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
|
|
19
|
+
...TRemainingAccounts
|
|
20
|
+
]>;
|
|
21
|
+
export type CancelReleaseInstructionData = {
|
|
22
|
+
discriminator: ReadonlyUint8Array;
|
|
23
|
+
};
|
|
24
|
+
export type CancelReleaseInstructionDataArgs = {};
|
|
25
|
+
export declare function getCancelReleaseInstructionDataEncoder(): FixedSizeEncoder<CancelReleaseInstructionDataArgs>;
|
|
26
|
+
export declare function getCancelReleaseInstructionDataDecoder(): FixedSizeDecoder<CancelReleaseInstructionData>;
|
|
27
|
+
export declare function getCancelReleaseInstructionDataCodec(): FixedSizeCodec<CancelReleaseInstructionDataArgs, CancelReleaseInstructionData>;
|
|
28
|
+
export type CancelReleaseAsyncInput<TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountApp extends InstructionAccountInput = InstructionAccountInput, TAccountRegistry extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
29
|
+
/** App authority. Developers can't cancel. */
|
|
30
|
+
authority: TAccountAuthority;
|
|
31
|
+
/** App with the pending release to discard. */
|
|
32
|
+
app: TAccountApp;
|
|
33
|
+
/** Pending-release registry. The app is removed from it. */
|
|
34
|
+
registry?: TAccountRegistry;
|
|
35
|
+
/** CHECK: Only the event authority can invoke self-CPI */
|
|
36
|
+
eventAuthority?: TAccountEventAuthority;
|
|
37
|
+
/** CHECK: Kept for v1-compatible account ordering and IDL shape */
|
|
38
|
+
program?: TAccountProgram;
|
|
39
|
+
};
|
|
40
|
+
export declare function getCancelReleaseInstructionAsync<TAccountAuthority extends InstructionSignerInput, TAccountApp extends InstructionAccountInput, TAccountRegistry extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: CancelReleaseAsyncInput<TAccountAuthority, TAccountApp, TAccountRegistry, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
41
|
+
programAddress?: TProgramAddress | {
|
|
42
|
+
readonly address: TProgramAddress;
|
|
43
|
+
};
|
|
44
|
+
}): Promise<CancelReleaseInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountApp, InstructionAccountInputAddress<TAccountApp>>, ResolvedInstructionAccountMeta<TAccountRegistry, InstructionAccountInputAddress<TAccountRegistry>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>>;
|
|
45
|
+
export type CancelReleaseInput<TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountApp extends InstructionAccountInput = InstructionAccountInput, TAccountRegistry extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
46
|
+
/** App authority. Developers can't cancel. */
|
|
47
|
+
authority: TAccountAuthority;
|
|
48
|
+
/** App with the pending release to discard. */
|
|
49
|
+
app: TAccountApp;
|
|
50
|
+
/** Pending-release registry. The app is removed from it. */
|
|
51
|
+
registry: TAccountRegistry;
|
|
52
|
+
/** CHECK: Only the event authority can invoke self-CPI */
|
|
53
|
+
eventAuthority: TAccountEventAuthority;
|
|
54
|
+
/** CHECK: Kept for v1-compatible account ordering and IDL shape */
|
|
55
|
+
program?: TAccountProgram;
|
|
56
|
+
};
|
|
57
|
+
export declare function getCancelReleaseInstruction<TAccountAuthority extends InstructionSignerInput, TAccountApp extends InstructionAccountInput, TAccountRegistry extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: CancelReleaseInput<TAccountAuthority, TAccountApp, TAccountRegistry, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
58
|
+
programAddress?: TProgramAddress | {
|
|
59
|
+
readonly address: TProgramAddress;
|
|
60
|
+
};
|
|
61
|
+
}): CancelReleaseInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountApp, InstructionAccountInputAddress<TAccountApp>>, ResolvedInstructionAccountMeta<TAccountRegistry, InstructionAccountInputAddress<TAccountRegistry>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>;
|
|
62
|
+
export type ParsedCancelReleaseInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
63
|
+
programAddress: Address<TProgram>;
|
|
64
|
+
accounts: {
|
|
65
|
+
/** App authority. Developers can't cancel. */
|
|
66
|
+
authority: TAccountMetas[0];
|
|
67
|
+
/** App with the pending release to discard. */
|
|
68
|
+
app: TAccountMetas[1];
|
|
69
|
+
/** Pending-release registry. The app is removed from it. */
|
|
70
|
+
registry: TAccountMetas[2];
|
|
71
|
+
/** CHECK: Only the event authority can invoke self-CPI */
|
|
72
|
+
eventAuthority: TAccountMetas[3];
|
|
73
|
+
/** CHECK: Kept for v1-compatible account ordering and IDL shape */
|
|
74
|
+
program: TAccountMetas[4];
|
|
75
|
+
};
|
|
76
|
+
data: CancelReleaseInstructionData;
|
|
77
|
+
};
|
|
78
|
+
export declare function parseCancelReleaseInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedCancelReleaseInstruction<TProgram, TAccountMetas>;
|
|
@@ -0,0 +1,71 @@
|
|
|
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 Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type WritableAccount } from '@solana/kit';
|
|
9
|
+
import { type InstructionAccountInput, type InstructionAccountInputAddress, type ResolvedInstructionAccountMeta } from '@solana/program-client-core';
|
|
10
|
+
import { GUARDIAN_PROGRAM_ADDRESS } from '../programs';
|
|
11
|
+
export declare const EXPIRE_RELEASE_DISCRIMINATOR: ReadonlyUint8Array;
|
|
12
|
+
export declare function getExpireReleaseDiscriminatorBytes(): ReadonlyUint8Array;
|
|
13
|
+
export type ExpireReleaseInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountApp extends string | AccountMeta<string> = string, TAccountRegistry 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
|
+
TAccountApp extends string ? WritableAccount<TAccountApp> : TAccountApp,
|
|
15
|
+
TAccountRegistry extends string ? WritableAccount<TAccountRegistry> : TAccountRegistry,
|
|
16
|
+
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
17
|
+
TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
|
|
18
|
+
...TRemainingAccounts
|
|
19
|
+
]>;
|
|
20
|
+
export type ExpireReleaseInstructionData = {
|
|
21
|
+
discriminator: ReadonlyUint8Array;
|
|
22
|
+
};
|
|
23
|
+
export type ExpireReleaseInstructionDataArgs = {};
|
|
24
|
+
export declare function getExpireReleaseInstructionDataEncoder(): FixedSizeEncoder<ExpireReleaseInstructionDataArgs>;
|
|
25
|
+
export declare function getExpireReleaseInstructionDataDecoder(): FixedSizeDecoder<ExpireReleaseInstructionData>;
|
|
26
|
+
export declare function getExpireReleaseInstructionDataCodec(): FixedSizeCodec<ExpireReleaseInstructionDataArgs, ExpireReleaseInstructionData>;
|
|
27
|
+
export type ExpireReleaseAsyncInput<TAccountApp extends InstructionAccountInput = InstructionAccountInput, TAccountRegistry extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
28
|
+
/** App whose pending release is past its voting deadline. */
|
|
29
|
+
app: TAccountApp;
|
|
30
|
+
/** Pending-release registry. The app is removed from it. */
|
|
31
|
+
registry?: TAccountRegistry;
|
|
32
|
+
/** CHECK: Only the event authority can invoke self-CPI */
|
|
33
|
+
eventAuthority?: TAccountEventAuthority;
|
|
34
|
+
/** CHECK: Kept for v1-compatible account ordering and IDL shape */
|
|
35
|
+
program?: TAccountProgram;
|
|
36
|
+
};
|
|
37
|
+
export declare function getExpireReleaseInstructionAsync<TAccountApp extends InstructionAccountInput, TAccountRegistry extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: ExpireReleaseAsyncInput<TAccountApp, TAccountRegistry, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
38
|
+
programAddress?: TProgramAddress | {
|
|
39
|
+
readonly address: TProgramAddress;
|
|
40
|
+
};
|
|
41
|
+
}): Promise<ExpireReleaseInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountApp, InstructionAccountInputAddress<TAccountApp>>, ResolvedInstructionAccountMeta<TAccountRegistry, InstructionAccountInputAddress<TAccountRegistry>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>>;
|
|
42
|
+
export type ExpireReleaseInput<TAccountApp extends InstructionAccountInput = InstructionAccountInput, TAccountRegistry extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
43
|
+
/** App whose pending release is past its voting deadline. */
|
|
44
|
+
app: TAccountApp;
|
|
45
|
+
/** Pending-release registry. The app is removed from it. */
|
|
46
|
+
registry: TAccountRegistry;
|
|
47
|
+
/** CHECK: Only the event authority can invoke self-CPI */
|
|
48
|
+
eventAuthority: TAccountEventAuthority;
|
|
49
|
+
/** CHECK: Kept for v1-compatible account ordering and IDL shape */
|
|
50
|
+
program?: TAccountProgram;
|
|
51
|
+
};
|
|
52
|
+
export declare function getExpireReleaseInstruction<TAccountApp extends InstructionAccountInput, TAccountRegistry extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: ExpireReleaseInput<TAccountApp, TAccountRegistry, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
53
|
+
programAddress?: TProgramAddress | {
|
|
54
|
+
readonly address: TProgramAddress;
|
|
55
|
+
};
|
|
56
|
+
}): ExpireReleaseInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountApp, InstructionAccountInputAddress<TAccountApp>>, ResolvedInstructionAccountMeta<TAccountRegistry, InstructionAccountInputAddress<TAccountRegistry>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>;
|
|
57
|
+
export type ParsedExpireReleaseInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
58
|
+
programAddress: Address<TProgram>;
|
|
59
|
+
accounts: {
|
|
60
|
+
/** App whose pending release is past its voting deadline. */
|
|
61
|
+
app: TAccountMetas[0];
|
|
62
|
+
/** Pending-release registry. The app is removed from it. */
|
|
63
|
+
registry: TAccountMetas[1];
|
|
64
|
+
/** CHECK: Only the event authority can invoke self-CPI */
|
|
65
|
+
eventAuthority: TAccountMetas[2];
|
|
66
|
+
/** CHECK: Kept for v1-compatible account ordering and IDL shape */
|
|
67
|
+
program: TAccountMetas[3];
|
|
68
|
+
};
|
|
69
|
+
data: ExpireReleaseInstructionData;
|
|
70
|
+
};
|
|
71
|
+
export declare function parseExpireReleaseInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedExpireReleaseInstruction<TProgram, TAccountMetas>;
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
export * from './acceptAppAuthority';
|
|
9
|
+
export * from './acceptConfigAuthority';
|
|
10
|
+
export * from './addGuardian';
|
|
11
|
+
export * from './cancelRelease';
|
|
12
|
+
export * from './expireRelease';
|
|
13
|
+
export * from './initializeConfig';
|
|
14
|
+
export * from './proposeAppAuthority';
|
|
15
|
+
export * from './proposeConfigAuthority';
|
|
16
|
+
export * from './proposeRelease';
|
|
17
|
+
export * from './registerApp';
|
|
18
|
+
export * from './registerGuardian';
|
|
19
|
+
export * from './removeGuardian';
|
|
20
|
+
export * from './rotateVoteAuthority';
|
|
21
|
+
export * from './setAppDeveloper';
|
|
22
|
+
export * from './updateConfig';
|
|
23
|
+
export * from './vote';
|
|
24
|
+
export * from './writeReleaseManifest';
|
|
@@ -0,0 +1,135 @@
|
|
|
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 INITIALIZE_CONFIG_DISCRIMINATOR: ReadonlyUint8Array;
|
|
12
|
+
export declare function getInitializeConfigDiscriminatorBytes(): ReadonlyUint8Array;
|
|
13
|
+
export type InitializeConfigInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountFunder extends string | AccountMeta<string> = string, TAccountSetupAuthority extends string | AccountMeta<string> = 'setup9dEwHLaDMvUwEsigW9nkXYHVenLMPzToyx3cpj', TAccountConfig extends string | AccountMeta<string> = string, TAccountRegistry extends string | AccountMeta<string> = string, TAccountBondMint 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
|
+
TAccountSetupAuthority extends string ? ReadonlySignerAccount<TAccountSetupAuthority> & AccountSignerMeta<TAccountSetupAuthority> : TAccountSetupAuthority,
|
|
16
|
+
TAccountConfig extends string ? WritableAccount<TAccountConfig> : TAccountConfig,
|
|
17
|
+
TAccountRegistry extends string ? WritableAccount<TAccountRegistry> : TAccountRegistry,
|
|
18
|
+
TAccountBondMint extends string ? ReadonlyAccount<TAccountBondMint> : TAccountBondMint,
|
|
19
|
+
TAccountBondVault extends string ? WritableAccount<TAccountBondVault> : TAccountBondVault,
|
|
20
|
+
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
|
|
21
|
+
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
|
|
22
|
+
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
23
|
+
TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
|
|
24
|
+
...TRemainingAccounts
|
|
25
|
+
]>;
|
|
26
|
+
export type InitializeConfigInstructionData = {
|
|
27
|
+
discriminator: ReadonlyUint8Array;
|
|
28
|
+
authority: Address;
|
|
29
|
+
voteWindow: number;
|
|
30
|
+
votingPeriod: number;
|
|
31
|
+
};
|
|
32
|
+
export type InitializeConfigInstructionDataArgs = {
|
|
33
|
+
authority: Address | HasAddress;
|
|
34
|
+
voteWindow: number;
|
|
35
|
+
votingPeriod: number;
|
|
36
|
+
};
|
|
37
|
+
export declare function getInitializeConfigInstructionDataEncoder(): FixedSizeEncoder<InitializeConfigInstructionDataArgs>;
|
|
38
|
+
export declare function getInitializeConfigInstructionDataDecoder(): FixedSizeDecoder<InitializeConfigInstructionData>;
|
|
39
|
+
export declare function getInitializeConfigInstructionDataCodec(): FixedSizeCodec<InitializeConfigInstructionDataArgs, InitializeConfigInstructionData>;
|
|
40
|
+
export type InitializeConfigAsyncInput<TAccountFunder extends InstructionSignerInput = InstructionSignerInput, TAccountSetupAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountConfig extends InstructionAccountInput = InstructionAccountInput, TAccountRegistry extends InstructionAccountInput = InstructionAccountInput, TAccountBondMint extends InstructionAccountInput = InstructionAccountInput, TAccountBondVault extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
41
|
+
/**
|
|
42
|
+
* Pays rent for the config, the registry, and the bond vault. Must be owned by the System
|
|
43
|
+
* Program.
|
|
44
|
+
*/
|
|
45
|
+
funder: TAccountFunder;
|
|
46
|
+
/** Must be `SETUP_AUTHORITY`. */
|
|
47
|
+
setupAuthority?: TAccountSetupAuthority;
|
|
48
|
+
/** The config, created here. */
|
|
49
|
+
config?: TAccountConfig;
|
|
50
|
+
/** The pending-release registry, created here. */
|
|
51
|
+
registry?: TAccountRegistry;
|
|
52
|
+
/** Mint for guardian bonds. Can't be changed later. */
|
|
53
|
+
bondMint: TAccountBondMint;
|
|
54
|
+
/** The bond vault, created here. A `bond_mint` token account owned by the config. */
|
|
55
|
+
bondVault?: TAccountBondVault;
|
|
56
|
+
/** Initializes the bond vault. */
|
|
57
|
+
tokenProgram?: TAccountTokenProgram;
|
|
58
|
+
/** Creates the accounts. */
|
|
59
|
+
systemProgram?: TAccountSystemProgram;
|
|
60
|
+
/** CHECK: Only the event authority can invoke self-CPI */
|
|
61
|
+
eventAuthority?: TAccountEventAuthority;
|
|
62
|
+
/** CHECK: Kept for v1-compatible account ordering and IDL shape */
|
|
63
|
+
program?: TAccountProgram;
|
|
64
|
+
authority: InitializeConfigInstructionDataArgs['authority'];
|
|
65
|
+
voteWindow: InitializeConfigInstructionDataArgs['voteWindow'];
|
|
66
|
+
votingPeriod: InitializeConfigInstructionDataArgs['votingPeriod'];
|
|
67
|
+
};
|
|
68
|
+
export declare function getInitializeConfigInstructionAsync<TAccountFunder extends InstructionSignerInput, TAccountSetupAuthority extends InstructionSignerInput, TAccountConfig extends InstructionAccountInput, TAccountRegistry extends InstructionAccountInput, TAccountBondMint 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: InitializeConfigAsyncInput<TAccountFunder, TAccountSetupAuthority, TAccountConfig, TAccountRegistry, TAccountBondMint, TAccountBondVault, TAccountTokenProgram, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
69
|
+
programAddress?: TProgramAddress | {
|
|
70
|
+
readonly address: TProgramAddress;
|
|
71
|
+
};
|
|
72
|
+
}): Promise<InitializeConfigInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountFunder, InstructionAccountInputAddress<TAccountFunder>>, ResolvedInstructionAccountMeta<TAccountSetupAuthority, InstructionAccountInputAddress<TAccountSetupAuthority>>, ResolvedInstructionAccountMeta<TAccountConfig, InstructionAccountInputAddress<TAccountConfig>>, ResolvedInstructionAccountMeta<TAccountRegistry, InstructionAccountInputAddress<TAccountRegistry>>, ResolvedInstructionAccountMeta<TAccountBondMint, InstructionAccountInputAddress<TAccountBondMint>>, ResolvedInstructionAccountMeta<TAccountBondVault, InstructionAccountInputAddress<TAccountBondVault>>, ResolvedInstructionAccountMeta<TAccountTokenProgram, InstructionAccountInputAddress<TAccountTokenProgram>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>>;
|
|
73
|
+
export type InitializeConfigInput<TAccountFunder extends InstructionSignerInput = InstructionSignerInput, TAccountSetupAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountConfig extends InstructionAccountInput = InstructionAccountInput, TAccountRegistry extends InstructionAccountInput = InstructionAccountInput, TAccountBondMint extends InstructionAccountInput = InstructionAccountInput, TAccountBondVault extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
74
|
+
/**
|
|
75
|
+
* Pays rent for the config, the registry, and the bond vault. Must be owned by the System
|
|
76
|
+
* Program.
|
|
77
|
+
*/
|
|
78
|
+
funder: TAccountFunder;
|
|
79
|
+
/** Must be `SETUP_AUTHORITY`. */
|
|
80
|
+
setupAuthority?: TAccountSetupAuthority;
|
|
81
|
+
/** The config, created here. */
|
|
82
|
+
config: TAccountConfig;
|
|
83
|
+
/** The pending-release registry, created here. */
|
|
84
|
+
registry: TAccountRegistry;
|
|
85
|
+
/** Mint for guardian bonds. Can't be changed later. */
|
|
86
|
+
bondMint: TAccountBondMint;
|
|
87
|
+
/** The bond vault, created here. A `bond_mint` token account owned by the config. */
|
|
88
|
+
bondVault: TAccountBondVault;
|
|
89
|
+
/** Initializes the bond vault. */
|
|
90
|
+
tokenProgram?: TAccountTokenProgram;
|
|
91
|
+
/** Creates the accounts. */
|
|
92
|
+
systemProgram?: TAccountSystemProgram;
|
|
93
|
+
/** CHECK: Only the event authority can invoke self-CPI */
|
|
94
|
+
eventAuthority: TAccountEventAuthority;
|
|
95
|
+
/** CHECK: Kept for v1-compatible account ordering and IDL shape */
|
|
96
|
+
program?: TAccountProgram;
|
|
97
|
+
authority: InitializeConfigInstructionDataArgs['authority'];
|
|
98
|
+
voteWindow: InitializeConfigInstructionDataArgs['voteWindow'];
|
|
99
|
+
votingPeriod: InitializeConfigInstructionDataArgs['votingPeriod'];
|
|
100
|
+
};
|
|
101
|
+
export declare function getInitializeConfigInstruction<TAccountFunder extends InstructionSignerInput, TAccountSetupAuthority extends InstructionSignerInput, TAccountConfig extends InstructionAccountInput, TAccountRegistry extends InstructionAccountInput, TAccountBondMint 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: InitializeConfigInput<TAccountFunder, TAccountSetupAuthority, TAccountConfig, TAccountRegistry, TAccountBondMint, TAccountBondVault, TAccountTokenProgram, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
102
|
+
programAddress?: TProgramAddress | {
|
|
103
|
+
readonly address: TProgramAddress;
|
|
104
|
+
};
|
|
105
|
+
}): InitializeConfigInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountFunder, InstructionAccountInputAddress<TAccountFunder>>, ResolvedInstructionAccountMeta<TAccountSetupAuthority, InstructionAccountInputAddress<TAccountSetupAuthority>>, ResolvedInstructionAccountMeta<TAccountConfig, InstructionAccountInputAddress<TAccountConfig>>, ResolvedInstructionAccountMeta<TAccountRegistry, InstructionAccountInputAddress<TAccountRegistry>>, ResolvedInstructionAccountMeta<TAccountBondMint, InstructionAccountInputAddress<TAccountBondMint>>, ResolvedInstructionAccountMeta<TAccountBondVault, InstructionAccountInputAddress<TAccountBondVault>>, ResolvedInstructionAccountMeta<TAccountTokenProgram, InstructionAccountInputAddress<TAccountTokenProgram>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>;
|
|
106
|
+
export type ParsedInitializeConfigInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
107
|
+
programAddress: Address<TProgram>;
|
|
108
|
+
accounts: {
|
|
109
|
+
/**
|
|
110
|
+
* Pays rent for the config, the registry, and the bond vault. Must be owned by the System
|
|
111
|
+
* Program.
|
|
112
|
+
*/
|
|
113
|
+
funder: TAccountMetas[0];
|
|
114
|
+
/** Must be `SETUP_AUTHORITY`. */
|
|
115
|
+
setupAuthority: TAccountMetas[1];
|
|
116
|
+
/** The config, created here. */
|
|
117
|
+
config: TAccountMetas[2];
|
|
118
|
+
/** The pending-release registry, created here. */
|
|
119
|
+
registry: TAccountMetas[3];
|
|
120
|
+
/** Mint for guardian bonds. Can't be changed later. */
|
|
121
|
+
bondMint: TAccountMetas[4];
|
|
122
|
+
/** The bond vault, created here. A `bond_mint` token account owned by the config. */
|
|
123
|
+
bondVault: TAccountMetas[5];
|
|
124
|
+
/** Initializes the bond vault. */
|
|
125
|
+
tokenProgram: TAccountMetas[6];
|
|
126
|
+
/** Creates the accounts. */
|
|
127
|
+
systemProgram: TAccountMetas[7];
|
|
128
|
+
/** CHECK: Only the event authority can invoke self-CPI */
|
|
129
|
+
eventAuthority: TAccountMetas[8];
|
|
130
|
+
/** CHECK: Kept for v1-compatible account ordering and IDL shape */
|
|
131
|
+
program: TAccountMetas[9];
|
|
132
|
+
};
|
|
133
|
+
data: InitializeConfigInstructionData;
|
|
134
|
+
};
|
|
135
|
+
export declare function parseInitializeConfigInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedInitializeConfigInstruction<TProgram, TAccountMetas>;
|
|
@@ -0,0 +1,76 @@
|
|
|
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 PROPOSE_APP_AUTHORITY_DISCRIMINATOR: ReadonlyUint8Array;
|
|
12
|
+
export declare function getProposeAppAuthorityDiscriminatorBytes(): ReadonlyUint8Array;
|
|
13
|
+
export type ProposeAppAuthorityInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountAuthority extends string | AccountMeta<string> = string, TAccountApp 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
|
+
TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
|
|
15
|
+
TAccountApp extends string ? WritableAccount<TAccountApp> : TAccountApp,
|
|
16
|
+
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
17
|
+
TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
|
|
18
|
+
...TRemainingAccounts
|
|
19
|
+
]>;
|
|
20
|
+
export type ProposeAppAuthorityInstructionData = {
|
|
21
|
+
discriminator: ReadonlyUint8Array;
|
|
22
|
+
newAuthority: Address;
|
|
23
|
+
};
|
|
24
|
+
export type ProposeAppAuthorityInstructionDataArgs = {
|
|
25
|
+
newAuthority: Address | HasAddress;
|
|
26
|
+
};
|
|
27
|
+
export declare function getProposeAppAuthorityInstructionDataEncoder(): FixedSizeEncoder<ProposeAppAuthorityInstructionDataArgs>;
|
|
28
|
+
export declare function getProposeAppAuthorityInstructionDataDecoder(): FixedSizeDecoder<ProposeAppAuthorityInstructionData>;
|
|
29
|
+
export declare function getProposeAppAuthorityInstructionDataCodec(): FixedSizeCodec<ProposeAppAuthorityInstructionDataArgs, ProposeAppAuthorityInstructionData>;
|
|
30
|
+
export type ProposeAppAuthorityAsyncInput<TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountApp extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
31
|
+
/** App authority. */
|
|
32
|
+
authority: TAccountAuthority;
|
|
33
|
+
/** The app. */
|
|
34
|
+
app: TAccountApp;
|
|
35
|
+
/** CHECK: Only the event authority can invoke self-CPI */
|
|
36
|
+
eventAuthority?: TAccountEventAuthority;
|
|
37
|
+
/** CHECK: Kept for v1-compatible account ordering and IDL shape */
|
|
38
|
+
program?: TAccountProgram;
|
|
39
|
+
newAuthority: ProposeAppAuthorityInstructionDataArgs['newAuthority'];
|
|
40
|
+
};
|
|
41
|
+
export declare function getProposeAppAuthorityInstructionAsync<TAccountAuthority extends InstructionSignerInput, TAccountApp extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: ProposeAppAuthorityAsyncInput<TAccountAuthority, TAccountApp, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
42
|
+
programAddress?: TProgramAddress | {
|
|
43
|
+
readonly address: TProgramAddress;
|
|
44
|
+
};
|
|
45
|
+
}): Promise<ProposeAppAuthorityInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountApp, InstructionAccountInputAddress<TAccountApp>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>>;
|
|
46
|
+
export type ProposeAppAuthorityInput<TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountApp extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
47
|
+
/** App authority. */
|
|
48
|
+
authority: TAccountAuthority;
|
|
49
|
+
/** The app. */
|
|
50
|
+
app: TAccountApp;
|
|
51
|
+
/** CHECK: Only the event authority can invoke self-CPI */
|
|
52
|
+
eventAuthority: TAccountEventAuthority;
|
|
53
|
+
/** CHECK: Kept for v1-compatible account ordering and IDL shape */
|
|
54
|
+
program?: TAccountProgram;
|
|
55
|
+
newAuthority: ProposeAppAuthorityInstructionDataArgs['newAuthority'];
|
|
56
|
+
};
|
|
57
|
+
export declare function getProposeAppAuthorityInstruction<TAccountAuthority extends InstructionSignerInput, TAccountApp extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: ProposeAppAuthorityInput<TAccountAuthority, TAccountApp, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
58
|
+
programAddress?: TProgramAddress | {
|
|
59
|
+
readonly address: TProgramAddress;
|
|
60
|
+
};
|
|
61
|
+
}): ProposeAppAuthorityInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountApp, InstructionAccountInputAddress<TAccountApp>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>;
|
|
62
|
+
export type ParsedProposeAppAuthorityInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
63
|
+
programAddress: Address<TProgram>;
|
|
64
|
+
accounts: {
|
|
65
|
+
/** App authority. */
|
|
66
|
+
authority: TAccountMetas[0];
|
|
67
|
+
/** The app. */
|
|
68
|
+
app: TAccountMetas[1];
|
|
69
|
+
/** CHECK: Only the event authority can invoke self-CPI */
|
|
70
|
+
eventAuthority: TAccountMetas[2];
|
|
71
|
+
/** CHECK: Kept for v1-compatible account ordering and IDL shape */
|
|
72
|
+
program: TAccountMetas[3];
|
|
73
|
+
};
|
|
74
|
+
data: ProposeAppAuthorityInstructionData;
|
|
75
|
+
};
|
|
76
|
+
export declare function parseProposeAppAuthorityInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedProposeAppAuthorityInstruction<TProgram, TAccountMetas>;
|
|
@@ -0,0 +1,76 @@
|
|
|
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 PROPOSE_CONFIG_AUTHORITY_DISCRIMINATOR: ReadonlyUint8Array;
|
|
12
|
+
export declare function getProposeConfigAuthorityDiscriminatorBytes(): ReadonlyUint8Array;
|
|
13
|
+
export type ProposeConfigAuthorityInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountAuthority 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
|
+
TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
|
|
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 ProposeConfigAuthorityInstructionData = {
|
|
21
|
+
discriminator: ReadonlyUint8Array;
|
|
22
|
+
newAuthority: Address;
|
|
23
|
+
};
|
|
24
|
+
export type ProposeConfigAuthorityInstructionDataArgs = {
|
|
25
|
+
newAuthority: Address | HasAddress;
|
|
26
|
+
};
|
|
27
|
+
export declare function getProposeConfigAuthorityInstructionDataEncoder(): FixedSizeEncoder<ProposeConfigAuthorityInstructionDataArgs>;
|
|
28
|
+
export declare function getProposeConfigAuthorityInstructionDataDecoder(): FixedSizeDecoder<ProposeConfigAuthorityInstructionData>;
|
|
29
|
+
export declare function getProposeConfigAuthorityInstructionDataCodec(): FixedSizeCodec<ProposeConfigAuthorityInstructionDataArgs, ProposeConfigAuthorityInstructionData>;
|
|
30
|
+
export type ProposeConfigAuthorityAsyncInput<TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountConfig extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
31
|
+
/** Config authority. */
|
|
32
|
+
authority: TAccountAuthority;
|
|
33
|
+
/** Global config. */
|
|
34
|
+
config?: TAccountConfig;
|
|
35
|
+
/** CHECK: Only the event authority can invoke self-CPI */
|
|
36
|
+
eventAuthority?: TAccountEventAuthority;
|
|
37
|
+
/** CHECK: Kept for v1-compatible account ordering and IDL shape */
|
|
38
|
+
program?: TAccountProgram;
|
|
39
|
+
newAuthority: ProposeConfigAuthorityInstructionDataArgs['newAuthority'];
|
|
40
|
+
};
|
|
41
|
+
export declare function getProposeConfigAuthorityInstructionAsync<TAccountAuthority extends InstructionSignerInput, TAccountConfig extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: ProposeConfigAuthorityAsyncInput<TAccountAuthority, TAccountConfig, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
42
|
+
programAddress?: TProgramAddress | {
|
|
43
|
+
readonly address: TProgramAddress;
|
|
44
|
+
};
|
|
45
|
+
}): Promise<ProposeConfigAuthorityInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountConfig, InstructionAccountInputAddress<TAccountConfig>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>>;
|
|
46
|
+
export type ProposeConfigAuthorityInput<TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountConfig extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
47
|
+
/** Config authority. */
|
|
48
|
+
authority: TAccountAuthority;
|
|
49
|
+
/** Global config. */
|
|
50
|
+
config: TAccountConfig;
|
|
51
|
+
/** CHECK: Only the event authority can invoke self-CPI */
|
|
52
|
+
eventAuthority: TAccountEventAuthority;
|
|
53
|
+
/** CHECK: Kept for v1-compatible account ordering and IDL shape */
|
|
54
|
+
program?: TAccountProgram;
|
|
55
|
+
newAuthority: ProposeConfigAuthorityInstructionDataArgs['newAuthority'];
|
|
56
|
+
};
|
|
57
|
+
export declare function getProposeConfigAuthorityInstruction<TAccountAuthority extends InstructionSignerInput, TAccountConfig extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: ProposeConfigAuthorityInput<TAccountAuthority, TAccountConfig, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
58
|
+
programAddress?: TProgramAddress | {
|
|
59
|
+
readonly address: TProgramAddress;
|
|
60
|
+
};
|
|
61
|
+
}): ProposeConfigAuthorityInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountConfig, InstructionAccountInputAddress<TAccountConfig>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>;
|
|
62
|
+
export type ParsedProposeConfigAuthorityInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
63
|
+
programAddress: Address<TProgram>;
|
|
64
|
+
accounts: {
|
|
65
|
+
/** Config authority. */
|
|
66
|
+
authority: TAccountMetas[0];
|
|
67
|
+
/** Global config. */
|
|
68
|
+
config: TAccountMetas[1];
|
|
69
|
+
/** CHECK: Only the event authority can invoke self-CPI */
|
|
70
|
+
eventAuthority: TAccountMetas[2];
|
|
71
|
+
/** CHECK: Kept for v1-compatible account ordering and IDL shape */
|
|
72
|
+
program: TAccountMetas[3];
|
|
73
|
+
};
|
|
74
|
+
data: ProposeConfigAuthorityInstructionData;
|
|
75
|
+
};
|
|
76
|
+
export declare function parseProposeConfigAuthorityInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedProposeConfigAuthorityInstruction<TProgram, TAccountMetas>;
|