@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,34 @@
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 Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type HasAddress, type ReadonlyUint8Array } from '@solana/kit';
9
+ export declare const GUARDIAN_ADDED_EVENT_DISCRIMINATOR: ReadonlyUint8Array;
10
+ export declare function getGuardianAddedEventDiscriminatorBytes(): ReadonlyUint8Array;
11
+ export type GuardianAddedEvent = {
12
+ /** This event's `VERSION`. */
13
+ version: number;
14
+ /** Position in the config's event sequence. */
15
+ seq: bigint;
16
+ /** The pending guardian's authority key. */
17
+ guardian: Address;
18
+ };
19
+ export type GuardianAddedEventArgs = {
20
+ /** This event's `VERSION`. */
21
+ version: number;
22
+ /** Position in the config's event sequence. */
23
+ seq: number | bigint;
24
+ /** The pending guardian's authority key. */
25
+ guardian: Address | HasAddress;
26
+ };
27
+ /** Gets the encoder for {@link GuardianAddedEventArgs} event data. */
28
+ export declare function getGuardianAddedEventEncoder(): FixedSizeEncoder<GuardianAddedEventArgs>;
29
+ /** Gets the decoder for {@link GuardianAddedEvent} event data. */
30
+ export declare function getGuardianAddedEventDecoder(): FixedSizeDecoder<GuardianAddedEvent>;
31
+ /** Gets the codec for {@link GuardianAddedEvent} event data. */
32
+ export declare function getGuardianAddedEventCodec(): FixedSizeCodec<GuardianAddedEventArgs, GuardianAddedEvent>;
33
+ /** Parses the provided bytes into {@link GuardianAddedEvent} event data. */
34
+ export declare function parseGuardianAddedEvent(data: ReadonlyUint8Array | Uint8Array): GuardianAddedEvent;
@@ -0,0 +1,46 @@
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 Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type HasAddress, type ReadonlyUint8Array } from '@solana/kit';
9
+ export declare const GUARDIAN_REGISTERED_EVENT_DISCRIMINATOR: ReadonlyUint8Array;
10
+ export declare function getGuardianRegisteredEventDiscriminatorBytes(): ReadonlyUint8Array;
11
+ export type GuardianRegisteredEvent = {
12
+ /** This event's `VERSION`. */
13
+ version: number;
14
+ /** Position in the config's event sequence. */
15
+ seq: bigint;
16
+ /** The guardian's authority key. */
17
+ guardian: Address;
18
+ /** Key that signs the guardian's votes. */
19
+ voteAuthority: Address;
20
+ /** Bond posted, in base units of the bond mint. */
21
+ bond: bigint;
22
+ /** Guardian-set nonce after this change. */
23
+ updateNonce: number;
24
+ };
25
+ export type GuardianRegisteredEventArgs = {
26
+ /** This event's `VERSION`. */
27
+ version: number;
28
+ /** Position in the config's event sequence. */
29
+ seq: number | bigint;
30
+ /** The guardian's authority key. */
31
+ guardian: Address | HasAddress;
32
+ /** Key that signs the guardian's votes. */
33
+ voteAuthority: Address | HasAddress;
34
+ /** Bond posted, in base units of the bond mint. */
35
+ bond: number | bigint;
36
+ /** Guardian-set nonce after this change. */
37
+ updateNonce: number;
38
+ };
39
+ /** Gets the encoder for {@link GuardianRegisteredEventArgs} event data. */
40
+ export declare function getGuardianRegisteredEventEncoder(): FixedSizeEncoder<GuardianRegisteredEventArgs>;
41
+ /** Gets the decoder for {@link GuardianRegisteredEvent} event data. */
42
+ export declare function getGuardianRegisteredEventDecoder(): FixedSizeDecoder<GuardianRegisteredEvent>;
43
+ /** Gets the codec for {@link GuardianRegisteredEvent} event data. */
44
+ export declare function getGuardianRegisteredEventCodec(): FixedSizeCodec<GuardianRegisteredEventArgs, GuardianRegisteredEvent>;
45
+ /** Parses the provided bytes into {@link GuardianRegisteredEvent} event data. */
46
+ export declare function parseGuardianRegisteredEvent(data: ReadonlyUint8Array | Uint8Array): GuardianRegisteredEvent;
@@ -0,0 +1,42 @@
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 Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type HasAddress, type ReadonlyUint8Array } from '@solana/kit';
9
+ export declare const GUARDIAN_REMOVED_EVENT_DISCRIMINATOR: ReadonlyUint8Array;
10
+ export declare function getGuardianRemovedEventDiscriminatorBytes(): ReadonlyUint8Array;
11
+ export type GuardianRemovedEvent = {
12
+ /** This event's `VERSION`. */
13
+ version: number;
14
+ /** Position in the config's event sequence. */
15
+ seq: bigint;
16
+ /** Authority key of the removed guardian. */
17
+ guardian: Address;
18
+ /** Bond returned, in base units of the bond mint. Zero for a guardian that never registered. */
19
+ refunded: bigint;
20
+ /** Guardian-set nonce after this change. Unchanged if the guardian never registered. */
21
+ updateNonce: number;
22
+ };
23
+ export type GuardianRemovedEventArgs = {
24
+ /** This event's `VERSION`. */
25
+ version: number;
26
+ /** Position in the config's event sequence. */
27
+ seq: number | bigint;
28
+ /** Authority key of the removed guardian. */
29
+ guardian: Address | HasAddress;
30
+ /** Bond returned, in base units of the bond mint. Zero for a guardian that never registered. */
31
+ refunded: number | bigint;
32
+ /** Guardian-set nonce after this change. Unchanged if the guardian never registered. */
33
+ updateNonce: number;
34
+ };
35
+ /** Gets the encoder for {@link GuardianRemovedEventArgs} event data. */
36
+ export declare function getGuardianRemovedEventEncoder(): FixedSizeEncoder<GuardianRemovedEventArgs>;
37
+ /** Gets the decoder for {@link GuardianRemovedEvent} event data. */
38
+ export declare function getGuardianRemovedEventDecoder(): FixedSizeDecoder<GuardianRemovedEvent>;
39
+ /** Gets the codec for {@link GuardianRemovedEvent} event data. */
40
+ export declare function getGuardianRemovedEventCodec(): FixedSizeCodec<GuardianRemovedEventArgs, GuardianRemovedEvent>;
41
+ /** Parses the provided bytes into {@link GuardianRemovedEvent} event data. */
42
+ export declare function parseGuardianRemovedEvent(data: ReadonlyUint8Array | Uint8Array): GuardianRemovedEvent;
@@ -0,0 +1,42 @@
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 Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type HasAddress, type ReadonlyUint8Array } from '@solana/kit';
9
+ export declare const GUARDIAN_VOTE_AUTHORITY_ROTATED_EVENT_DISCRIMINATOR: ReadonlyUint8Array;
10
+ export declare function getGuardianVoteAuthorityRotatedEventDiscriminatorBytes(): ReadonlyUint8Array;
11
+ export type GuardianVoteAuthorityRotatedEvent = {
12
+ /** This event's `VERSION`. */
13
+ version: number;
14
+ /** Position in the config's event sequence. */
15
+ seq: bigint;
16
+ /** The guardian's authority key. */
17
+ guardian: Address;
18
+ /** Vote authority before the rotation. */
19
+ oldVoteAuthority: Address;
20
+ /** Vote authority after the rotation. */
21
+ newVoteAuthority: Address;
22
+ };
23
+ export type GuardianVoteAuthorityRotatedEventArgs = {
24
+ /** This event's `VERSION`. */
25
+ version: number;
26
+ /** Position in the config's event sequence. */
27
+ seq: number | bigint;
28
+ /** The guardian's authority key. */
29
+ guardian: Address | HasAddress;
30
+ /** Vote authority before the rotation. */
31
+ oldVoteAuthority: Address | HasAddress;
32
+ /** Vote authority after the rotation. */
33
+ newVoteAuthority: Address | HasAddress;
34
+ };
35
+ /** Gets the encoder for {@link GuardianVoteAuthorityRotatedEventArgs} event data. */
36
+ export declare function getGuardianVoteAuthorityRotatedEventEncoder(): FixedSizeEncoder<GuardianVoteAuthorityRotatedEventArgs>;
37
+ /** Gets the decoder for {@link GuardianVoteAuthorityRotatedEvent} event data. */
38
+ export declare function getGuardianVoteAuthorityRotatedEventDecoder(): FixedSizeDecoder<GuardianVoteAuthorityRotatedEvent>;
39
+ /** Gets the codec for {@link GuardianVoteAuthorityRotatedEvent} event data. */
40
+ export declare function getGuardianVoteAuthorityRotatedEventCodec(): FixedSizeCodec<GuardianVoteAuthorityRotatedEventArgs, GuardianVoteAuthorityRotatedEvent>;
41
+ /** Parses the provided bytes into {@link GuardianVoteAuthorityRotatedEvent} event data. */
42
+ export declare function parseGuardianVoteAuthorityRotatedEvent(data: ReadonlyUint8Array | Uint8Array): GuardianVoteAuthorityRotatedEvent;
@@ -0,0 +1,25 @@
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 './appAuthorityAccepted';
9
+ export * from './appAuthorityProposed';
10
+ export * from './appDeveloperUpdated';
11
+ export * from './appRegistered';
12
+ export * from './configAuthorityAccepted';
13
+ export * from './configAuthorityProposed';
14
+ export * from './configInitialized';
15
+ export * from './configUpdated';
16
+ export * from './guardianAdded';
17
+ export * from './guardianRegistered';
18
+ export * from './guardianRemoved';
19
+ export * from './guardianVoteAuthorityRotated';
20
+ export * from './releaseApproved';
21
+ export * from './releaseCancelled';
22
+ export * from './releaseExpired';
23
+ export * from './releaseProposed';
24
+ export * from './releaseRejected';
25
+ export * from './voteCast';
@@ -0,0 +1,27 @@
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 Codec, type Decoder, type Encoder, type ReadonlyUint8Array } from '@solana/kit';
9
+ import { type ReleaseResolution, type ReleaseResolutionArgs } from '../types';
10
+ export declare const RELEASE_APPROVED_EVENT_DISCRIMINATOR: ReadonlyUint8Array;
11
+ export declare function getReleaseApprovedEventDiscriminatorBytes(): ReadonlyUint8Array;
12
+ export type ReleaseApprovedEvent = {
13
+ /** The release as it resolved. */
14
+ resolution: ReleaseResolution;
15
+ };
16
+ export type ReleaseApprovedEventArgs = {
17
+ /** The release as it resolved. */
18
+ resolution: ReleaseResolutionArgs;
19
+ };
20
+ /** Gets the encoder for {@link ReleaseApprovedEventArgs} event data. */
21
+ export declare function getReleaseApprovedEventEncoder(): Encoder<ReleaseApprovedEventArgs>;
22
+ /** Gets the decoder for {@link ReleaseApprovedEvent} event data. */
23
+ export declare function getReleaseApprovedEventDecoder(): Decoder<ReleaseApprovedEvent>;
24
+ /** Gets the codec for {@link ReleaseApprovedEvent} event data. */
25
+ export declare function getReleaseApprovedEventCodec(): Codec<ReleaseApprovedEventArgs, ReleaseApprovedEvent>;
26
+ /** Parses the provided bytes into {@link ReleaseApprovedEvent} event data. */
27
+ export declare function parseReleaseApprovedEvent(data: ReadonlyUint8Array | Uint8Array): ReleaseApprovedEvent;
@@ -0,0 +1,38 @@
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 Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type HasAddress, type ReadonlyUint8Array } from '@solana/kit';
9
+ export declare const RELEASE_CANCELLED_EVENT_DISCRIMINATOR: ReadonlyUint8Array;
10
+ export declare function getReleaseCancelledEventDiscriminatorBytes(): ReadonlyUint8Array;
11
+ export type ReleaseCancelledEvent = {
12
+ /** This event's `VERSION`. */
13
+ version: number;
14
+ /** Position in the app's event sequence. */
15
+ seq: bigint;
16
+ /** The app account. */
17
+ app: Address;
18
+ /** Version code of the cancelled release. */
19
+ versionCode: number;
20
+ };
21
+ export type ReleaseCancelledEventArgs = {
22
+ /** This event's `VERSION`. */
23
+ version: number;
24
+ /** Position in the app's event sequence. */
25
+ seq: number | bigint;
26
+ /** The app account. */
27
+ app: Address | HasAddress;
28
+ /** Version code of the cancelled release. */
29
+ versionCode: number;
30
+ };
31
+ /** Gets the encoder for {@link ReleaseCancelledEventArgs} event data. */
32
+ export declare function getReleaseCancelledEventEncoder(): FixedSizeEncoder<ReleaseCancelledEventArgs>;
33
+ /** Gets the decoder for {@link ReleaseCancelledEvent} event data. */
34
+ export declare function getReleaseCancelledEventDecoder(): FixedSizeDecoder<ReleaseCancelledEvent>;
35
+ /** Gets the codec for {@link ReleaseCancelledEvent} event data. */
36
+ export declare function getReleaseCancelledEventCodec(): FixedSizeCodec<ReleaseCancelledEventArgs, ReleaseCancelledEvent>;
37
+ /** Parses the provided bytes into {@link ReleaseCancelledEvent} event data. */
38
+ export declare function parseReleaseCancelledEvent(data: ReadonlyUint8Array | Uint8Array): ReleaseCancelledEvent;
@@ -0,0 +1,38 @@
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 Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type HasAddress, type ReadonlyUint8Array } from '@solana/kit';
9
+ export declare const RELEASE_EXPIRED_EVENT_DISCRIMINATOR: ReadonlyUint8Array;
10
+ export declare function getReleaseExpiredEventDiscriminatorBytes(): ReadonlyUint8Array;
11
+ export type ReleaseExpiredEvent = {
12
+ /** This event's `VERSION`. */
13
+ version: number;
14
+ /** Position in the app's event sequence. */
15
+ seq: bigint;
16
+ /** The app account. */
17
+ app: Address;
18
+ /** Version code of the expired release. */
19
+ versionCode: number;
20
+ };
21
+ export type ReleaseExpiredEventArgs = {
22
+ /** This event's `VERSION`. */
23
+ version: number;
24
+ /** Position in the app's event sequence. */
25
+ seq: number | bigint;
26
+ /** The app account. */
27
+ app: Address | HasAddress;
28
+ /** Version code of the expired release. */
29
+ versionCode: number;
30
+ };
31
+ /** Gets the encoder for {@link ReleaseExpiredEventArgs} event data. */
32
+ export declare function getReleaseExpiredEventEncoder(): FixedSizeEncoder<ReleaseExpiredEventArgs>;
33
+ /** Gets the decoder for {@link ReleaseExpiredEvent} event data. */
34
+ export declare function getReleaseExpiredEventDecoder(): FixedSizeDecoder<ReleaseExpiredEvent>;
35
+ /** Gets the codec for {@link ReleaseExpiredEvent} event data. */
36
+ export declare function getReleaseExpiredEventCodec(): FixedSizeCodec<ReleaseExpiredEventArgs, ReleaseExpiredEvent>;
37
+ /** Parses the provided bytes into {@link ReleaseExpiredEvent} event data. */
38
+ export declare function parseReleaseExpiredEvent(data: ReadonlyUint8Array | Uint8Array): ReleaseExpiredEvent;
@@ -0,0 +1,42 @@
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 Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type HasAddress, type ReadonlyUint8Array } from '@solana/kit';
9
+ export declare const RELEASE_PROPOSED_EVENT_DISCRIMINATOR: ReadonlyUint8Array;
10
+ export declare function getReleaseProposedEventDiscriminatorBytes(): ReadonlyUint8Array;
11
+ export type ReleaseProposedEvent = {
12
+ /** This event's `VERSION`. */
13
+ version: number;
14
+ /** Position in the app's event sequence. */
15
+ seq: bigint;
16
+ /** The app account. */
17
+ app: Address;
18
+ /** Version code of the finalized release. */
19
+ versionCode: number;
20
+ /** The config's policy bundle hash at finalize. Votes must match it. */
21
+ policyBundleHash: ReadonlyUint8Array;
22
+ };
23
+ export type ReleaseProposedEventArgs = {
24
+ /** This event's `VERSION`. */
25
+ version: number;
26
+ /** Position in the app's event sequence. */
27
+ seq: number | bigint;
28
+ /** The app account. */
29
+ app: Address | HasAddress;
30
+ /** Version code of the finalized release. */
31
+ versionCode: number;
32
+ /** The config's policy bundle hash at finalize. Votes must match it. */
33
+ policyBundleHash: ReadonlyUint8Array;
34
+ };
35
+ /** Gets the encoder for {@link ReleaseProposedEventArgs} event data. */
36
+ export declare function getReleaseProposedEventEncoder(): FixedSizeEncoder<ReleaseProposedEventArgs>;
37
+ /** Gets the decoder for {@link ReleaseProposedEvent} event data. */
38
+ export declare function getReleaseProposedEventDecoder(): FixedSizeDecoder<ReleaseProposedEvent>;
39
+ /** Gets the codec for {@link ReleaseProposedEvent} event data. */
40
+ export declare function getReleaseProposedEventCodec(): FixedSizeCodec<ReleaseProposedEventArgs, ReleaseProposedEvent>;
41
+ /** Parses the provided bytes into {@link ReleaseProposedEvent} event data. */
42
+ export declare function parseReleaseProposedEvent(data: ReadonlyUint8Array | Uint8Array): ReleaseProposedEvent;
@@ -0,0 +1,27 @@
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 Codec, type Decoder, type Encoder, type ReadonlyUint8Array } from '@solana/kit';
9
+ import { type ReleaseResolution, type ReleaseResolutionArgs } from '../types';
10
+ export declare const RELEASE_REJECTED_EVENT_DISCRIMINATOR: ReadonlyUint8Array;
11
+ export declare function getReleaseRejectedEventDiscriminatorBytes(): ReadonlyUint8Array;
12
+ export type ReleaseRejectedEvent = {
13
+ /** The release as it resolved. */
14
+ resolution: ReleaseResolution;
15
+ };
16
+ export type ReleaseRejectedEventArgs = {
17
+ /** The release as it resolved. */
18
+ resolution: ReleaseResolutionArgs;
19
+ };
20
+ /** Gets the encoder for {@link ReleaseRejectedEventArgs} event data. */
21
+ export declare function getReleaseRejectedEventEncoder(): Encoder<ReleaseRejectedEventArgs>;
22
+ /** Gets the decoder for {@link ReleaseRejectedEvent} event data. */
23
+ export declare function getReleaseRejectedEventDecoder(): Decoder<ReleaseRejectedEvent>;
24
+ /** Gets the codec for {@link ReleaseRejectedEvent} event data. */
25
+ export declare function getReleaseRejectedEventCodec(): Codec<ReleaseRejectedEventArgs, ReleaseRejectedEvent>;
26
+ /** Parses the provided bytes into {@link ReleaseRejectedEvent} event data. */
27
+ export declare function parseReleaseRejectedEvent(data: ReadonlyUint8Array | Uint8Array): ReleaseRejectedEvent;
@@ -0,0 +1,55 @@
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 Address, type Codec, type Decoder, type Encoder, type HasAddress, type ReadonlyUint8Array } from '@solana/kit';
9
+ import { type VoteFinding, type VoteFindingArgs } from '../types';
10
+ export declare const VOTE_CAST_EVENT_DISCRIMINATOR: ReadonlyUint8Array;
11
+ export declare function getVoteCastEventDiscriminatorBytes(): ReadonlyUint8Array;
12
+ export type VoteCastEvent = {
13
+ /** This event's `VERSION`. */
14
+ version: number;
15
+ /** Position in the app's event sequence. */
16
+ seq: bigint;
17
+ /** The app account. */
18
+ app: Address;
19
+ /** Version code the vote is for. */
20
+ versionCode: number;
21
+ /** Authority key of the voting guardian. */
22
+ guardian: Address;
23
+ /** `true` to approve, `false` to reject. */
24
+ approve: boolean;
25
+ /** Fingerprint of the policy bundle the guardian ran (sha256 of the borsh-encoded bundle). */
26
+ policyBundleHash: ReadonlyUint8Array;
27
+ /** The guardian's findings under that bundle. */
28
+ findings: Array<VoteFinding>;
29
+ };
30
+ export type VoteCastEventArgs = {
31
+ /** This event's `VERSION`. */
32
+ version: number;
33
+ /** Position in the app's event sequence. */
34
+ seq: number | bigint;
35
+ /** The app account. */
36
+ app: Address | HasAddress;
37
+ /** Version code the vote is for. */
38
+ versionCode: number;
39
+ /** Authority key of the voting guardian. */
40
+ guardian: Address | HasAddress;
41
+ /** `true` to approve, `false` to reject. */
42
+ approve: boolean;
43
+ /** Fingerprint of the policy bundle the guardian ran (sha256 of the borsh-encoded bundle). */
44
+ policyBundleHash: ReadonlyUint8Array;
45
+ /** The guardian's findings under that bundle. */
46
+ findings: Array<VoteFindingArgs>;
47
+ };
48
+ /** Gets the encoder for {@link VoteCastEventArgs} event data. */
49
+ export declare function getVoteCastEventEncoder(): Encoder<VoteCastEventArgs>;
50
+ /** Gets the decoder for {@link VoteCastEvent} event data. */
51
+ export declare function getVoteCastEventDecoder(): Decoder<VoteCastEvent>;
52
+ /** Gets the codec for {@link VoteCastEvent} event data. */
53
+ export declare function getVoteCastEventCodec(): Codec<VoteCastEventArgs, VoteCastEvent>;
54
+ /** Parses the provided bytes into {@link VoteCastEvent} event data. */
55
+ export declare function parseVoteCastEvent(data: ReadonlyUint8Array | Uint8Array): VoteCastEvent;
@@ -0,0 +1,15 @@
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 './accounts';
9
+ export * from './constants';
10
+ export * from './errors';
11
+ export * from './events';
12
+ export * from './instructions';
13
+ export * from './pdas';
14
+ export * from './programs';
15
+ export * from './types';
@@ -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 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 ACCEPT_APP_AUTHORITY_DISCRIMINATOR: ReadonlyUint8Array;
12
+ export declare function getAcceptAppAuthorityDiscriminatorBytes(): ReadonlyUint8Array;
13
+ export type AcceptAppAuthorityInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountNewAuthority 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
+ TAccountNewAuthority extends string ? ReadonlySignerAccount<TAccountNewAuthority> & AccountSignerMeta<TAccountNewAuthority> : TAccountNewAuthority,
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 AcceptAppAuthorityInstructionData = {
21
+ discriminator: ReadonlyUint8Array;
22
+ };
23
+ export type AcceptAppAuthorityInstructionDataArgs = {};
24
+ export declare function getAcceptAppAuthorityInstructionDataEncoder(): FixedSizeEncoder<AcceptAppAuthorityInstructionDataArgs>;
25
+ export declare function getAcceptAppAuthorityInstructionDataDecoder(): FixedSizeDecoder<AcceptAppAuthorityInstructionData>;
26
+ export declare function getAcceptAppAuthorityInstructionDataCodec(): FixedSizeCodec<AcceptAppAuthorityInstructionDataArgs, AcceptAppAuthorityInstructionData>;
27
+ export type AcceptAppAuthorityAsyncInput<TAccountNewAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountApp extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
28
+ /** The authority proposed with `propose_app_authority`. */
29
+ newAuthority: TAccountNewAuthority;
30
+ /** The app. */
31
+ app: TAccountApp;
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 getAcceptAppAuthorityInstructionAsync<TAccountNewAuthority extends InstructionSignerInput, TAccountApp extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: AcceptAppAuthorityAsyncInput<TAccountNewAuthority, TAccountApp, TAccountEventAuthority, TAccountProgram>, config?: {
38
+ programAddress?: TProgramAddress | {
39
+ readonly address: TProgramAddress;
40
+ };
41
+ }): Promise<AcceptAppAuthorityInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountNewAuthority, InstructionAccountInputAddress<TAccountNewAuthority>>, ResolvedInstructionAccountMeta<TAccountApp, InstructionAccountInputAddress<TAccountApp>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>>;
42
+ export type AcceptAppAuthorityInput<TAccountNewAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountApp extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
43
+ /** The authority proposed with `propose_app_authority`. */
44
+ newAuthority: TAccountNewAuthority;
45
+ /** The app. */
46
+ app: TAccountApp;
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 getAcceptAppAuthorityInstruction<TAccountNewAuthority extends InstructionSignerInput, TAccountApp extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: AcceptAppAuthorityInput<TAccountNewAuthority, TAccountApp, TAccountEventAuthority, TAccountProgram>, config?: {
53
+ programAddress?: TProgramAddress | {
54
+ readonly address: TProgramAddress;
55
+ };
56
+ }): AcceptAppAuthorityInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountNewAuthority, InstructionAccountInputAddress<TAccountNewAuthority>>, ResolvedInstructionAccountMeta<TAccountApp, InstructionAccountInputAddress<TAccountApp>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>;
57
+ export type ParsedAcceptAppAuthorityInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
58
+ programAddress: Address<TProgram>;
59
+ accounts: {
60
+ /** The authority proposed with `propose_app_authority`. */
61
+ newAuthority: TAccountMetas[0];
62
+ /** The app. */
63
+ app: 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: AcceptAppAuthorityInstructionData;
70
+ };
71
+ export declare function parseAcceptAppAuthorityInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedAcceptAppAuthorityInstruction<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 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 ACCEPT_CONFIG_AUTHORITY_DISCRIMINATOR: ReadonlyUint8Array;
12
+ export declare function getAcceptConfigAuthorityDiscriminatorBytes(): ReadonlyUint8Array;
13
+ export type AcceptConfigAuthorityInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountNewAuthority 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
+ TAccountNewAuthority extends string ? ReadonlySignerAccount<TAccountNewAuthority> & AccountSignerMeta<TAccountNewAuthority> : TAccountNewAuthority,
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 AcceptConfigAuthorityInstructionData = {
21
+ discriminator: ReadonlyUint8Array;
22
+ };
23
+ export type AcceptConfigAuthorityInstructionDataArgs = {};
24
+ export declare function getAcceptConfigAuthorityInstructionDataEncoder(): FixedSizeEncoder<AcceptConfigAuthorityInstructionDataArgs>;
25
+ export declare function getAcceptConfigAuthorityInstructionDataDecoder(): FixedSizeDecoder<AcceptConfigAuthorityInstructionData>;
26
+ export declare function getAcceptConfigAuthorityInstructionDataCodec(): FixedSizeCodec<AcceptConfigAuthorityInstructionDataArgs, AcceptConfigAuthorityInstructionData>;
27
+ export type AcceptConfigAuthorityAsyncInput<TAccountNewAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountConfig extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
28
+ /** The authority proposed with `propose_config_authority`. */
29
+ newAuthority: TAccountNewAuthority;
30
+ /** Global config. */
31
+ config?: TAccountConfig;
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 getAcceptConfigAuthorityInstructionAsync<TAccountNewAuthority extends InstructionSignerInput, TAccountConfig extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: AcceptConfigAuthorityAsyncInput<TAccountNewAuthority, TAccountConfig, TAccountEventAuthority, TAccountProgram>, config?: {
38
+ programAddress?: TProgramAddress | {
39
+ readonly address: TProgramAddress;
40
+ };
41
+ }): Promise<AcceptConfigAuthorityInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountNewAuthority, InstructionAccountInputAddress<TAccountNewAuthority>>, ResolvedInstructionAccountMeta<TAccountConfig, InstructionAccountInputAddress<TAccountConfig>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>>;
42
+ export type AcceptConfigAuthorityInput<TAccountNewAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountConfig extends InstructionAccountInput = InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput> = {
43
+ /** The authority proposed with `propose_config_authority`. */
44
+ newAuthority: TAccountNewAuthority;
45
+ /** Global config. */
46
+ config: TAccountConfig;
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 getAcceptConfigAuthorityInstruction<TAccountNewAuthority extends InstructionSignerInput, TAccountConfig extends InstructionAccountInput, TAccountEventAuthority extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof GUARDIAN_PROGRAM_ADDRESS>(input: AcceptConfigAuthorityInput<TAccountNewAuthority, TAccountConfig, TAccountEventAuthority, TAccountProgram>, config?: {
53
+ programAddress?: TProgramAddress | {
54
+ readonly address: TProgramAddress;
55
+ };
56
+ }): AcceptConfigAuthorityInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountNewAuthority, InstructionAccountInputAddress<TAccountNewAuthority>>, ResolvedInstructionAccountMeta<TAccountConfig, InstructionAccountInputAddress<TAccountConfig>>, ResolvedInstructionAccountMeta<TAccountEventAuthority, InstructionAccountInputAddress<TAccountEventAuthority>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>>;
57
+ export type ParsedAcceptConfigAuthorityInstruction<TProgram extends string = typeof GUARDIAN_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
58
+ programAddress: Address<TProgram>;
59
+ accounts: {
60
+ /** The authority proposed with `propose_config_authority`. */
61
+ newAuthority: TAccountMetas[0];
62
+ /** Global config. */
63
+ config: 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: AcceptConfigAuthorityInstructionData;
70
+ };
71
+ export declare function parseAcceptConfigAuthorityInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedAcceptConfigAuthorityInstruction<TProgram, TAccountMetas>;