@nosana/kit 2.0.32 → 2.0.35

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 (188) hide show
  1. package/dist/errors/NosanaError.d.ts +2 -2
  2. package/dist/generated_clients/jobs/accounts/index.d.ts +3 -3
  3. package/dist/generated_clients/jobs/accounts/index.js +3 -3
  4. package/dist/generated_clients/jobs/accounts/jobAccount.d.ts +2 -2
  5. package/dist/generated_clients/jobs/accounts/jobAccount.js +25 -25
  6. package/dist/generated_clients/jobs/accounts/marketAccount.d.ts +2 -2
  7. package/dist/generated_clients/jobs/accounts/marketAccount.js +25 -25
  8. package/dist/generated_clients/jobs/accounts/runAccount.d.ts +2 -2
  9. package/dist/generated_clients/jobs/accounts/runAccount.js +13 -13
  10. package/dist/generated_clients/jobs/errors/index.d.ts +1 -1
  11. package/dist/generated_clients/jobs/errors/index.js +1 -1
  12. package/dist/generated_clients/jobs/errors/nosanaJobs.d.ts +1 -1
  13. package/dist/generated_clients/jobs/errors/nosanaJobs.js +5 -5
  14. package/dist/generated_clients/jobs/index.d.ts +5 -5
  15. package/dist/generated_clients/jobs/index.js +5 -5
  16. package/dist/generated_clients/jobs/instructions/assign.d.ts +22 -6
  17. package/dist/generated_clients/jobs/instructions/assign.js +28 -13
  18. package/dist/generated_clients/jobs/instructions/assign.js.map +1 -1
  19. package/dist/generated_clients/jobs/instructions/claim.d.ts +16 -4
  20. package/dist/generated_clients/jobs/instructions/claim.js +19 -8
  21. package/dist/generated_clients/jobs/instructions/claim.js.map +1 -1
  22. package/dist/generated_clients/jobs/instructions/clean.d.ts +9 -3
  23. package/dist/generated_clients/jobs/instructions/clean.js +12 -7
  24. package/dist/generated_clients/jobs/instructions/clean.js.map +1 -1
  25. package/dist/generated_clients/jobs/instructions/cleanAdmin.d.ts +9 -3
  26. package/dist/generated_clients/jobs/instructions/cleanAdmin.js +12 -7
  27. package/dist/generated_clients/jobs/instructions/cleanAdmin.js.map +1 -1
  28. package/dist/generated_clients/jobs/instructions/close.d.ts +12 -4
  29. package/dist/generated_clients/jobs/instructions/close.js +15 -8
  30. package/dist/generated_clients/jobs/instructions/close.js.map +1 -1
  31. package/dist/generated_clients/jobs/instructions/closeAdmin.d.ts +12 -4
  32. package/dist/generated_clients/jobs/instructions/closeAdmin.js +15 -8
  33. package/dist/generated_clients/jobs/instructions/closeAdmin.js.map +1 -1
  34. package/dist/generated_clients/jobs/instructions/complete.d.ts +9 -4
  35. package/dist/generated_clients/jobs/instructions/complete.js +13 -9
  36. package/dist/generated_clients/jobs/instructions/complete.js.map +1 -1
  37. package/dist/generated_clients/jobs/instructions/delist.d.ts +14 -4
  38. package/dist/generated_clients/jobs/instructions/delist.js +17 -8
  39. package/dist/generated_clients/jobs/instructions/delist.js.map +1 -1
  40. package/dist/generated_clients/jobs/instructions/end.d.ts +16 -4
  41. package/dist/generated_clients/jobs/instructions/end.js +19 -8
  42. package/dist/generated_clients/jobs/instructions/end.js.map +1 -1
  43. package/dist/generated_clients/jobs/instructions/extend.d.ts +18 -5
  44. package/dist/generated_clients/jobs/instructions/extend.js +22 -10
  45. package/dist/generated_clients/jobs/instructions/extend.js.map +1 -1
  46. package/dist/generated_clients/jobs/instructions/finish.d.ts +19 -5
  47. package/dist/generated_clients/jobs/instructions/finish.js +23 -10
  48. package/dist/generated_clients/jobs/instructions/finish.js.map +1 -1
  49. package/dist/generated_clients/jobs/instructions/index.d.ts +19 -19
  50. package/dist/generated_clients/jobs/instructions/index.js +19 -19
  51. package/dist/generated_clients/jobs/instructions/list.d.ts +21 -6
  52. package/dist/generated_clients/jobs/instructions/list.js +27 -13
  53. package/dist/generated_clients/jobs/instructions/list.js.map +1 -1
  54. package/dist/generated_clients/jobs/instructions/open.d.ts +20 -9
  55. package/dist/generated_clients/jobs/instructions/open.js +30 -20
  56. package/dist/generated_clients/jobs/instructions/open.js.map +1 -1
  57. package/dist/generated_clients/jobs/instructions/quit.d.ts +10 -3
  58. package/dist/generated_clients/jobs/instructions/quit.js +13 -7
  59. package/dist/generated_clients/jobs/instructions/quit.js.map +1 -1
  60. package/dist/generated_clients/jobs/instructions/quitAdmin.d.ts +9 -3
  61. package/dist/generated_clients/jobs/instructions/quitAdmin.js +12 -7
  62. package/dist/generated_clients/jobs/instructions/quitAdmin.js.map +1 -1
  63. package/dist/generated_clients/jobs/instructions/recover.d.ts +14 -4
  64. package/dist/generated_clients/jobs/instructions/recover.js +17 -8
  65. package/dist/generated_clients/jobs/instructions/recover.js.map +1 -1
  66. package/dist/generated_clients/jobs/instructions/stop.d.ts +9 -3
  67. package/dist/generated_clients/jobs/instructions/stop.js +12 -7
  68. package/dist/generated_clients/jobs/instructions/stop.js.map +1 -1
  69. package/dist/generated_clients/jobs/instructions/update.d.ts +14 -8
  70. package/dist/generated_clients/jobs/instructions/update.js +22 -17
  71. package/dist/generated_clients/jobs/instructions/update.js.map +1 -1
  72. package/dist/generated_clients/jobs/instructions/work.d.ts +15 -4
  73. package/dist/generated_clients/jobs/instructions/work.js +18 -8
  74. package/dist/generated_clients/jobs/instructions/work.js.map +1 -1
  75. package/dist/generated_clients/jobs/programs/index.d.ts +1 -1
  76. package/dist/generated_clients/jobs/programs/index.js +1 -1
  77. package/dist/generated_clients/jobs/programs/nosanaJobs.d.ts +3 -3
  78. package/dist/generated_clients/jobs/programs/nosanaJobs.js +6 -6
  79. package/dist/generated_clients/jobs/shared/index.d.ts +2 -2
  80. package/dist/generated_clients/jobs/shared/index.js +9 -9
  81. package/dist/generated_clients/jobs/types/index.d.ts +3 -3
  82. package/dist/generated_clients/jobs/types/index.js +3 -3
  83. package/dist/generated_clients/jobs/types/jobState.d.ts +1 -1
  84. package/dist/generated_clients/jobs/types/jobState.js +1 -1
  85. package/dist/generated_clients/jobs/types/jobType.d.ts +1 -1
  86. package/dist/generated_clients/jobs/types/jobType.js +1 -1
  87. package/dist/generated_clients/jobs/types/queueType.d.ts +1 -1
  88. package/dist/generated_clients/jobs/types/queueType.js +1 -1
  89. package/dist/generated_clients/merkle_distributor/accounts/claimStatus.d.ts +2 -2
  90. package/dist/generated_clients/merkle_distributor/accounts/claimStatus.js +17 -17
  91. package/dist/generated_clients/merkle_distributor/accounts/index.d.ts +2 -2
  92. package/dist/generated_clients/merkle_distributor/accounts/index.js +2 -2
  93. package/dist/generated_clients/merkle_distributor/accounts/merkleDistributor.d.ts +2 -2
  94. package/dist/generated_clients/merkle_distributor/accounts/merkleDistributor.js +45 -45
  95. package/dist/generated_clients/merkle_distributor/errors/index.d.ts +1 -1
  96. package/dist/generated_clients/merkle_distributor/errors/index.js +1 -1
  97. package/dist/generated_clients/merkle_distributor/errors/merkleDistributor.d.ts +1 -1
  98. package/dist/generated_clients/merkle_distributor/errors/merkleDistributor.js +5 -5
  99. package/dist/generated_clients/merkle_distributor/index.d.ts +4 -4
  100. package/dist/generated_clients/merkle_distributor/index.js +4 -4
  101. package/dist/generated_clients/merkle_distributor/instructions/claimLocked.d.ts +13 -4
  102. package/dist/generated_clients/merkle_distributor/instructions/claimLocked.js +16 -8
  103. package/dist/generated_clients/merkle_distributor/instructions/claimLocked.js.map +1 -1
  104. package/dist/generated_clients/merkle_distributor/instructions/clawback.d.ts +13 -4
  105. package/dist/generated_clients/merkle_distributor/instructions/clawback.js +17 -9
  106. package/dist/generated_clients/merkle_distributor/instructions/clawback.js.map +1 -1
  107. package/dist/generated_clients/merkle_distributor/instructions/closeClaimStatus.d.ts +10 -3
  108. package/dist/generated_clients/merkle_distributor/instructions/closeClaimStatus.js +13 -7
  109. package/dist/generated_clients/merkle_distributor/instructions/closeClaimStatus.js.map +1 -1
  110. package/dist/generated_clients/merkle_distributor/instructions/closeDistributor.d.ts +12 -4
  111. package/dist/generated_clients/merkle_distributor/instructions/closeDistributor.js +15 -8
  112. package/dist/generated_clients/merkle_distributor/instructions/closeDistributor.js.map +1 -1
  113. package/dist/generated_clients/merkle_distributor/instructions/index.d.ts +9 -9
  114. package/dist/generated_clients/merkle_distributor/instructions/index.js +9 -9
  115. package/dist/generated_clients/merkle_distributor/instructions/newClaim.d.ts +17 -7
  116. package/dist/generated_clients/merkle_distributor/instructions/newClaim.js +24 -15
  117. package/dist/generated_clients/merkle_distributor/instructions/newClaim.js.map +1 -1
  118. package/dist/generated_clients/merkle_distributor/instructions/newDistributor.d.ts +24 -13
  119. package/dist/generated_clients/merkle_distributor/instructions/newDistributor.js +37 -27
  120. package/dist/generated_clients/merkle_distributor/instructions/newDistributor.js.map +1 -1
  121. package/dist/generated_clients/merkle_distributor/instructions/setAdmin.d.ts +9 -3
  122. package/dist/generated_clients/merkle_distributor/instructions/setAdmin.js +12 -7
  123. package/dist/generated_clients/merkle_distributor/instructions/setAdmin.js.map +1 -1
  124. package/dist/generated_clients/merkle_distributor/instructions/setClawbackReceiver.d.ts +9 -3
  125. package/dist/generated_clients/merkle_distributor/instructions/setClawbackReceiver.js +12 -7
  126. package/dist/generated_clients/merkle_distributor/instructions/setClawbackReceiver.js.map +1 -1
  127. package/dist/generated_clients/merkle_distributor/instructions/setEnableSlot.d.ts +9 -4
  128. package/dist/generated_clients/merkle_distributor/instructions/setEnableSlot.js +13 -9
  129. package/dist/generated_clients/merkle_distributor/instructions/setEnableSlot.js.map +1 -1
  130. package/dist/generated_clients/merkle_distributor/programs/index.d.ts +1 -1
  131. package/dist/generated_clients/merkle_distributor/programs/index.js +1 -1
  132. package/dist/generated_clients/merkle_distributor/programs/merkleDistributor.d.ts +3 -3
  133. package/dist/generated_clients/merkle_distributor/programs/merkleDistributor.js +6 -6
  134. package/dist/generated_clients/merkle_distributor/shared/index.d.ts +2 -2
  135. package/dist/generated_clients/merkle_distributor/shared/index.js +9 -9
  136. package/dist/generated_clients/staking/accounts/index.d.ts +2 -2
  137. package/dist/generated_clients/staking/accounts/index.js +2 -2
  138. package/dist/generated_clients/staking/accounts/settingsAccount.d.ts +2 -2
  139. package/dist/generated_clients/staking/accounts/settingsAccount.js +7 -7
  140. package/dist/generated_clients/staking/accounts/stakeAccount.d.ts +2 -2
  141. package/dist/generated_clients/staking/accounts/stakeAccount.js +17 -17
  142. package/dist/generated_clients/staking/errors/index.d.ts +1 -1
  143. package/dist/generated_clients/staking/errors/index.js +1 -1
  144. package/dist/generated_clients/staking/errors/nosanaStaking.d.ts +1 -1
  145. package/dist/generated_clients/staking/errors/nosanaStaking.js +5 -5
  146. package/dist/generated_clients/staking/index.d.ts +4 -4
  147. package/dist/generated_clients/staking/index.js +4 -4
  148. package/dist/generated_clients/staking/instructions/close.d.ts +12 -4
  149. package/dist/generated_clients/staking/instructions/close.js +15 -8
  150. package/dist/generated_clients/staking/instructions/close.js.map +1 -1
  151. package/dist/generated_clients/staking/instructions/extend.d.ts +9 -4
  152. package/dist/generated_clients/staking/instructions/extend.js +13 -9
  153. package/dist/generated_clients/staking/instructions/extend.js.map +1 -1
  154. package/dist/generated_clients/staking/instructions/index.d.ts +10 -10
  155. package/dist/generated_clients/staking/instructions/index.js +10 -10
  156. package/dist/generated_clients/staking/instructions/init.d.ts +11 -4
  157. package/dist/generated_clients/staking/instructions/init.js +15 -9
  158. package/dist/generated_clients/staking/instructions/init.js.map +1 -1
  159. package/dist/generated_clients/staking/instructions/restake.d.ts +9 -3
  160. package/dist/generated_clients/staking/instructions/restake.js +12 -7
  161. package/dist/generated_clients/staking/instructions/restake.js.map +1 -1
  162. package/dist/generated_clients/staking/instructions/slash.d.ts +14 -5
  163. package/dist/generated_clients/staking/instructions/slash.js +18 -10
  164. package/dist/generated_clients/staking/instructions/slash.js.map +1 -1
  165. package/dist/generated_clients/staking/instructions/stake.d.ts +17 -6
  166. package/dist/generated_clients/staking/instructions/stake.js +24 -14
  167. package/dist/generated_clients/staking/instructions/stake.js.map +1 -1
  168. package/dist/generated_clients/staking/instructions/topup.d.ts +13 -5
  169. package/dist/generated_clients/staking/instructions/topup.js +17 -10
  170. package/dist/generated_clients/staking/instructions/topup.js.map +1 -1
  171. package/dist/generated_clients/staking/instructions/unstake.d.ts +9 -3
  172. package/dist/generated_clients/staking/instructions/unstake.js +12 -7
  173. package/dist/generated_clients/staking/instructions/unstake.js.map +1 -1
  174. package/dist/generated_clients/staking/instructions/updateSettings.d.ts +10 -3
  175. package/dist/generated_clients/staking/instructions/updateSettings.js +13 -7
  176. package/dist/generated_clients/staking/instructions/updateSettings.js.map +1 -1
  177. package/dist/generated_clients/staking/instructions/withdraw.d.ts +12 -4
  178. package/dist/generated_clients/staking/instructions/withdraw.js +15 -8
  179. package/dist/generated_clients/staking/instructions/withdraw.js.map +1 -1
  180. package/dist/generated_clients/staking/programs/index.d.ts +1 -1
  181. package/dist/generated_clients/staking/programs/index.js +1 -1
  182. package/dist/generated_clients/staking/programs/nosanaStaking.d.ts +3 -3
  183. package/dist/generated_clients/staking/programs/nosanaStaking.js +6 -6
  184. package/dist/generated_clients/staking/shared/index.d.ts +2 -2
  185. package/dist/generated_clients/staking/shared/index.js +9 -9
  186. package/dist/index.d.ts +2 -2
  187. package/dist/index.js.map +1 -1
  188. package/package.json +20 -11
@@ -5,21 +5,21 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- import { containsBytes, fixEncoderSize, getBytesEncoder, } from '@solana/kit';
9
- export const MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS = 'merkp8F8f5EgYSYKadk3YiuQQdo3JPdnJWKviaaF425';
8
+ import { containsBytes, fixEncoderSize, getBytesEncoder, } from "@solana/kit";
9
+ export const MERKLE_DISTRIBUTOR_PROGRAM_ADDRESS = "merkp8F8f5EgYSYKadk3YiuQQdo3JPdnJWKviaaF425";
10
10
  export const MerkleDistributorAccount = {
11
11
  ClaimStatus: "ClaimStatus",
12
12
  MerkleDistributor: "MerkleDistributor",
13
13
  };
14
14
  export function identifyMerkleDistributorAccount(account) {
15
- const data = 'data' in account ? account.data : account;
15
+ const data = "data" in account ? account.data : account;
16
16
  if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([22, 183, 249, 157, 247, 95, 150, 96])), 0)) {
17
17
  return MerkleDistributorAccount.ClaimStatus;
18
18
  }
19
19
  if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([77, 119, 139, 70, 84, 247, 12, 26])), 0)) {
20
20
  return MerkleDistributorAccount.MerkleDistributor;
21
21
  }
22
- throw new Error('The provided account could not be identified as a merkleDistributor account.');
22
+ throw new Error("The provided account could not be identified as a merkleDistributor account.");
23
23
  }
24
24
  export const MerkleDistributorInstruction = {
25
25
  NewDistributor: "NewDistributor",
@@ -33,7 +33,7 @@ export const MerkleDistributorInstruction = {
33
33
  SetAdmin: "SetAdmin",
34
34
  };
35
35
  export function identifyMerkleDistributorInstruction(instruction) {
36
- const data = 'data' in instruction ? instruction.data : instruction;
36
+ const data = "data" in instruction ? instruction.data : instruction;
37
37
  if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([32, 139, 112, 171, 0, 2, 225, 155])), 0)) {
38
38
  return MerkleDistributorInstruction.NewDistributor;
39
39
  }
@@ -61,6 +61,6 @@ export function identifyMerkleDistributorInstruction(instruction) {
61
61
  if (containsBytes(data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([251, 163, 0, 52, 91, 194, 187, 92])), 0)) {
62
62
  return MerkleDistributorInstruction.SetAdmin;
63
63
  }
64
- throw new Error('The provided instruction could not be identified as a merkleDistributor instruction.');
64
+ throw new Error("The provided instruction could not be identified as a merkleDistributor instruction.");
65
65
  }
66
66
  //# sourceMappingURL=merkleDistributor.js.map
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- import { type AccountMeta, type AccountSignerMeta, type Address, type ProgramDerivedAddress, type TransactionSigner } from '@solana/kit';
8
+ import { type AccountMeta, type AccountSignerMeta, type Address, type ProgramDerivedAddress, type TransactionSigner } from "@solana/kit";
9
9
  /**
10
10
  * Asserts that the given value is not null or undefined.
11
11
  * @internal
@@ -45,5 +45,5 @@ export type InstructionWithByteDelta = {
45
45
  * Get account metas and signers from resolved accounts.
46
46
  * @internal
47
47
  */
48
- export declare function getAccountMetaFactory(programAddress: Address, optionalAccountStrategy: 'omitted' | 'programId'): (account: ResolvedAccount) => AccountMeta | AccountSignerMeta | undefined;
48
+ export declare function getAccountMetaFactory(programAddress: Address, optionalAccountStrategy: "omitted" | "programId"): (account: ResolvedAccount) => AccountMeta | AccountSignerMeta | undefined;
49
49
  export declare function isTransactionSigner<TAddress extends string = string>(value: Address<TAddress> | ProgramDerivedAddress<TAddress> | TransactionSigner<TAddress>): value is TransactionSigner<TAddress>;
@@ -5,14 +5,14 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- import { AccountRole, isProgramDerivedAddress, isTransactionSigner as kitIsTransactionSigner, upgradeRoleToSigner, } from '@solana/kit';
8
+ import { AccountRole, isProgramDerivedAddress, isTransactionSigner as kitIsTransactionSigner, upgradeRoleToSigner, } from "@solana/kit";
9
9
  /**
10
10
  * Asserts that the given value is not null or undefined.
11
11
  * @internal
12
12
  */
13
13
  export function expectSome(value) {
14
14
  if (value === null || value === undefined) {
15
- throw new Error('Expected a value but received null or undefined.');
15
+ throw new Error("Expected a value but received null or undefined.");
16
16
  }
17
17
  return value;
18
18
  }
@@ -22,9 +22,9 @@ export function expectSome(value) {
22
22
  */
23
23
  export function expectAddress(value) {
24
24
  if (!value) {
25
- throw new Error('Expected a Address.');
25
+ throw new Error("Expected a Address.");
26
26
  }
27
- if (typeof value === 'object' && 'address' in value) {
27
+ if (typeof value === "object" && "address" in value) {
28
28
  return value.address;
29
29
  }
30
30
  if (Array.isArray(value)) {
@@ -38,7 +38,7 @@ export function expectAddress(value) {
38
38
  */
39
39
  export function expectProgramDerivedAddress(value) {
40
40
  if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) {
41
- throw new Error('Expected a ProgramDerivedAddress.');
41
+ throw new Error("Expected a ProgramDerivedAddress.");
42
42
  }
43
43
  return value;
44
44
  }
@@ -48,7 +48,7 @@ export function expectProgramDerivedAddress(value) {
48
48
  */
49
49
  export function expectTransactionSigner(value) {
50
50
  if (!value || !isTransactionSigner(value)) {
51
- throw new Error('Expected a TransactionSigner.');
51
+ throw new Error("Expected a TransactionSigner.");
52
52
  }
53
53
  return value;
54
54
  }
@@ -59,7 +59,7 @@ export function expectTransactionSigner(value) {
59
59
  export function getAccountMetaFactory(programAddress, optionalAccountStrategy) {
60
60
  return (account) => {
61
61
  if (!account.value) {
62
- if (optionalAccountStrategy === 'omitted')
62
+ if (optionalAccountStrategy === "omitted")
63
63
  return;
64
64
  return Object.freeze({
65
65
  address: programAddress,
@@ -80,8 +80,8 @@ export function getAccountMetaFactory(programAddress, optionalAccountStrategy) {
80
80
  }
81
81
  export function isTransactionSigner(value) {
82
82
  return (!!value &&
83
- typeof value === 'object' &&
84
- 'address' in value &&
83
+ typeof value === "object" &&
84
+ "address" in value &&
85
85
  kitIsTransactionSigner(value));
86
86
  }
87
87
  //# sourceMappingURL=index.js.map
@@ -5,5 +5,5 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- export * from './settingsAccount.js';
9
- export * from './stakeAccount.js';
8
+ export * from "./settingsAccount.js";
9
+ export * from "./stakeAccount.js";
@@ -5,6 +5,6 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- export * from './settingsAccount.js';
9
- export * from './stakeAccount.js';
8
+ export * from "./settingsAccount.js";
9
+ export * from "./stakeAccount.js";
10
10
  //# sourceMappingURL=index.js.map
@@ -5,8 +5,8 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- import { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type EncodedAccount, type FetchAccountConfig, type FetchAccountsConfig, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from '@solana/kit';
9
- export declare const SETTINGS_ACCOUNT_DISCRIMINATOR: Uint8Array;
8
+ import { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type EncodedAccount, type FetchAccountConfig, type FetchAccountsConfig, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from "@solana/kit";
9
+ export declare const SETTINGS_ACCOUNT_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
10
10
  export declare function getSettingsAccountDiscriminatorBytes(): ReadonlyUint8Array;
11
11
  export type SettingsAccount = {
12
12
  discriminator: ReadonlyUint8Array;
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- import { assertAccountExists, assertAccountsExist, combineCodec, decodeAccount, fetchEncodedAccount, fetchEncodedAccounts, fixDecoderSize, fixEncoderSize, getAddressDecoder, getAddressEncoder, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, transformEncoder, } from '@solana/kit';
8
+ import { assertAccountExists, assertAccountsExist, combineCodec, decodeAccount, fetchEncodedAccount, fetchEncodedAccounts, fixDecoderSize, fixEncoderSize, getAddressDecoder, getAddressEncoder, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, transformEncoder, } from "@solana/kit";
9
9
  export const SETTINGS_ACCOUNT_DISCRIMINATOR = new Uint8Array([
10
10
  63, 89, 203, 155, 76, 237, 115, 58,
11
11
  ]);
@@ -15,17 +15,17 @@ export function getSettingsAccountDiscriminatorBytes() {
15
15
  /** Gets the encoder for {@link SettingsAccountArgs} account data. */
16
16
  export function getSettingsAccountEncoder() {
17
17
  return transformEncoder(getStructEncoder([
18
- ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],
19
- ['authority', getAddressEncoder()],
20
- ['tokenAccount', getAddressEncoder()],
18
+ ["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
19
+ ["authority", getAddressEncoder()],
20
+ ["tokenAccount", getAddressEncoder()],
21
21
  ]), (value) => ({ ...value, discriminator: SETTINGS_ACCOUNT_DISCRIMINATOR }));
22
22
  }
23
23
  /** Gets the decoder for {@link SettingsAccount} account data. */
24
24
  export function getSettingsAccountDecoder() {
25
25
  return getStructDecoder([
26
- ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],
27
- ['authority', getAddressDecoder()],
28
- ['tokenAccount', getAddressDecoder()],
26
+ ["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
27
+ ["authority", getAddressDecoder()],
28
+ ["tokenAccount", getAddressDecoder()],
29
29
  ]);
30
30
  }
31
31
  /** Gets the codec for {@link SettingsAccount} account data. */
@@ -5,8 +5,8 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- import { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type EncodedAccount, type FetchAccountConfig, type FetchAccountsConfig, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from '@solana/kit';
9
- export declare const STAKE_ACCOUNT_DISCRIMINATOR: Uint8Array;
8
+ import { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type EncodedAccount, type FetchAccountConfig, type FetchAccountsConfig, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from "@solana/kit";
9
+ export declare const STAKE_ACCOUNT_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
10
10
  export declare function getStakeAccountDiscriminatorBytes(): ReadonlyUint8Array;
11
11
  export type StakeAccount = {
12
12
  discriminator: ReadonlyUint8Array;
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- import { assertAccountExists, assertAccountsExist, combineCodec, decodeAccount, fetchEncodedAccount, fetchEncodedAccounts, fixDecoderSize, fixEncoderSize, getAddressDecoder, getAddressEncoder, getBytesDecoder, getBytesEncoder, getI64Decoder, getI64Encoder, getStructDecoder, getStructEncoder, getU128Decoder, getU128Encoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, transformEncoder, } from '@solana/kit';
8
+ import { assertAccountExists, assertAccountsExist, combineCodec, decodeAccount, fetchEncodedAccount, fetchEncodedAccounts, fixDecoderSize, fixEncoderSize, getAddressDecoder, getAddressEncoder, getBytesDecoder, getBytesEncoder, getI64Decoder, getI64Encoder, getStructDecoder, getStructEncoder, getU128Decoder, getU128Encoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, transformEncoder, } from "@solana/kit";
9
9
  export const STAKE_ACCOUNT_DISCRIMINATOR = new Uint8Array([
10
10
  80, 158, 67, 124, 50, 189, 192, 255,
11
11
  ]);
@@ -15,27 +15,27 @@ export function getStakeAccountDiscriminatorBytes() {
15
15
  /** Gets the encoder for {@link StakeAccountArgs} account data. */
16
16
  export function getStakeAccountEncoder() {
17
17
  return transformEncoder(getStructEncoder([
18
- ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],
19
- ['amount', getU64Encoder()],
20
- ['authority', getAddressEncoder()],
21
- ['duration', getU64Encoder()],
22
- ['timeUnstake', getI64Encoder()],
23
- ['vault', getAddressEncoder()],
24
- ['vaultBump', getU8Encoder()],
25
- ['xnos', getU128Encoder()],
18
+ ["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
19
+ ["amount", getU64Encoder()],
20
+ ["authority", getAddressEncoder()],
21
+ ["duration", getU64Encoder()],
22
+ ["timeUnstake", getI64Encoder()],
23
+ ["vault", getAddressEncoder()],
24
+ ["vaultBump", getU8Encoder()],
25
+ ["xnos", getU128Encoder()],
26
26
  ]), (value) => ({ ...value, discriminator: STAKE_ACCOUNT_DISCRIMINATOR }));
27
27
  }
28
28
  /** Gets the decoder for {@link StakeAccount} account data. */
29
29
  export function getStakeAccountDecoder() {
30
30
  return getStructDecoder([
31
- ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],
32
- ['amount', getU64Decoder()],
33
- ['authority', getAddressDecoder()],
34
- ['duration', getU64Decoder()],
35
- ['timeUnstake', getI64Decoder()],
36
- ['vault', getAddressDecoder()],
37
- ['vaultBump', getU8Decoder()],
38
- ['xnos', getU128Decoder()],
31
+ ["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
32
+ ["amount", getU64Decoder()],
33
+ ["authority", getAddressDecoder()],
34
+ ["duration", getU64Decoder()],
35
+ ["timeUnstake", getI64Decoder()],
36
+ ["vault", getAddressDecoder()],
37
+ ["vaultBump", getU8Decoder()],
38
+ ["xnos", getU128Decoder()],
39
39
  ]);
40
40
  }
41
41
  /** Gets the codec for {@link StakeAccount} account data. */
@@ -5,4 +5,4 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- export * from './nosanaStaking.js';
8
+ export * from "./nosanaStaking.js";
@@ -5,5 +5,5 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- export * from './nosanaStaking.js';
8
+ export * from "./nosanaStaking.js";
9
9
  //# sourceMappingURL=index.js.map
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- import { type Address, type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, type SolanaError } from '@solana/kit';
8
+ import { type Address, type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, type SolanaError } from "@solana/kit";
9
9
  /** AmountNotEnough: This amount is not enough. */
10
10
  export declare const NOSANA_STAKING_ERROR__AMOUNT_NOT_ENOUGH = 6000;
11
11
  /** AlreadyInitialized: This stake is already running. */
@@ -5,8 +5,8 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- import { isProgramError, } from '@solana/kit';
9
- import { NOSANA_STAKING_PROGRAM_ADDRESS } from '../programs/index.js';
8
+ import { isProgramError, } from "@solana/kit";
9
+ import { NOSANA_STAKING_PROGRAM_ADDRESS } from "../programs/index.js";
10
10
  /** AmountNotEnough: This amount is not enough. */
11
11
  export const NOSANA_STAKING_ERROR__AMOUNT_NOT_ENOUGH = 0x1770; // 6000
12
12
  /** AlreadyInitialized: This stake is already running. */
@@ -34,7 +34,7 @@ export const NOSANA_STAKING_ERROR__HAS_REWARD = 0x177b; // 6011
34
34
  /** InvalidStakeAccount: This stake does not belong to the authority. */
35
35
  export const NOSANA_STAKING_ERROR__INVALID_STAKE_ACCOUNT = 0x177c; // 6012
36
36
  let nosanaStakingErrorMessages;
37
- if (process.env.NODE_ENV !== 'production') {
37
+ if (process.env.NODE_ENV !== "production") {
38
38
  nosanaStakingErrorMessages = {
39
39
  [NOSANA_STAKING_ERROR__ALREADY_CLAIMED]: `This stake is already claimed.`,
40
40
  [NOSANA_STAKING_ERROR__ALREADY_INITIALIZED]: `This stake is already running.`,
@@ -52,10 +52,10 @@ if (process.env.NODE_ENV !== 'production') {
52
52
  };
53
53
  }
54
54
  export function getNosanaStakingErrorMessage(code) {
55
- if (process.env.NODE_ENV !== 'production') {
55
+ if (process.env.NODE_ENV !== "production") {
56
56
  return nosanaStakingErrorMessages[code];
57
57
  }
58
- return 'Error message not available in production bundles.';
58
+ return "Error message not available in production bundles.";
59
59
  }
60
60
  export function isNosanaStakingError(error, transactionMessage, code) {
61
61
  return isProgramError(error, transactionMessage, NOSANA_STAKING_PROGRAM_ADDRESS, code);
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- export * from './accounts/index.js';
9
- export * from './errors/index.js';
10
- export * from './instructions/index.js';
11
- export * from './programs/index.js';
8
+ export * from "./accounts/index.js";
9
+ export * from "./errors/index.js";
10
+ export * from "./instructions/index.js";
11
+ export * from "./programs/index.js";
@@ -5,8 +5,8 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- export * from './accounts/index.js';
9
- export * from './errors/index.js';
10
- export * from './instructions/index.js';
11
- export * from './programs/index.js';
8
+ export * from "./accounts/index.js";
9
+ export * from "./errors/index.js";
10
+ export * from "./instructions/index.js";
11
+ export * from "./programs/index.js";
12
12
  //# sourceMappingURL=index.js.map
@@ -5,11 +5,19 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from '@solana/kit';
9
- import { NOSANA_STAKING_PROGRAM_ADDRESS } from '../programs/index.js';
10
- export declare const CLOSE_DISCRIMINATOR: Uint8Array;
8
+ import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from "@solana/kit";
9
+ import { NOSANA_STAKING_PROGRAM_ADDRESS } from "../programs/index.js";
10
+ export declare const CLOSE_INSTRUCTION_ACCOUNTS: {
11
+ readonly user: 0;
12
+ readonly stake: 1;
13
+ readonly vault: 2;
14
+ readonly authority: 3;
15
+ readonly tokenProgram: 4;
16
+ };
17
+ export type CloseInstructionAccountName = keyof typeof CLOSE_INSTRUCTION_ACCOUNTS;
18
+ export declare const CLOSE_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
11
19
  export declare function getCloseDiscriminatorBytes(): ReadonlyUint8Array;
12
- export type CloseInstruction<TProgram extends string = typeof NOSANA_STAKING_PROGRAM_ADDRESS, TAccountUser extends string | AccountMeta<string> = string, TAccountStake extends string | AccountMeta<string> = string, TAccountVault extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
20
+ export type CloseInstruction<TProgram extends string = typeof NOSANA_STAKING_PROGRAM_ADDRESS, TAccountUser extends string | AccountMeta<string> = string, TAccountStake extends string | AccountMeta<string> = string, TAccountVault extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
13
21
  TAccountUser extends string ? WritableAccount<TAccountUser> : TAccountUser,
14
22
  TAccountStake extends string ? WritableAccount<TAccountStake> : TAccountStake,
15
23
  TAccountVault extends string ? WritableAccount<TAccountVault> : TAccountVault,
@@ -5,9 +5,16 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- import { combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, transformEncoder, } from '@solana/kit';
9
- import { NOSANA_STAKING_PROGRAM_ADDRESS } from '../programs/index.js';
10
- import { getAccountMetaFactory } from '../shared/index.js';
8
+ import { combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, transformEncoder, } from "@solana/kit";
9
+ import { NOSANA_STAKING_PROGRAM_ADDRESS } from "../programs/index.js";
10
+ import { getAccountMetaFactory } from "../shared/index.js";
11
+ export const CLOSE_INSTRUCTION_ACCOUNTS = {
12
+ user: 0,
13
+ stake: 1,
14
+ vault: 2,
15
+ authority: 3,
16
+ tokenProgram: 4,
17
+ };
11
18
  export const CLOSE_DISCRIMINATOR = new Uint8Array([
12
19
  98, 165, 201, 177, 108, 65, 206, 96,
13
20
  ]);
@@ -15,11 +22,11 @@ export function getCloseDiscriminatorBytes() {
15
22
  return fixEncoderSize(getBytesEncoder(), 8).encode(CLOSE_DISCRIMINATOR);
16
23
  }
17
24
  export function getCloseInstructionDataEncoder() {
18
- return transformEncoder(getStructEncoder([['discriminator', fixEncoderSize(getBytesEncoder(), 8)]]), (value) => ({ ...value, discriminator: CLOSE_DISCRIMINATOR }));
25
+ return transformEncoder(getStructEncoder([["discriminator", fixEncoderSize(getBytesEncoder(), 8)]]), (value) => ({ ...value, discriminator: CLOSE_DISCRIMINATOR }));
19
26
  }
20
27
  export function getCloseInstructionDataDecoder() {
21
28
  return getStructDecoder([
22
- ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],
29
+ ["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
23
30
  ]);
24
31
  }
25
32
  export function getCloseInstructionDataCodec() {
@@ -40,9 +47,9 @@ export function getCloseInstruction(input, config) {
40
47
  // Resolve default values.
41
48
  if (!accounts.tokenProgram.value) {
42
49
  accounts.tokenProgram.value =
43
- 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
50
+ "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
44
51
  }
45
- const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');
52
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
46
53
  return Object.freeze({
47
54
  accounts: [
48
55
  getAccountMeta(accounts.user),
@@ -58,7 +65,7 @@ export function getCloseInstruction(input, config) {
58
65
  export function parseCloseInstruction(instruction) {
59
66
  if (instruction.accounts.length < 5) {
60
67
  // TODO: Coded error.
61
- throw new Error('Not enough accounts');
68
+ throw new Error("Not enough accounts");
62
69
  }
63
70
  let accountIndex = 0;
64
71
  const getNextAccount = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"close.js","sourceRoot":"","sources":["../../../../src/generated_clients/staking/instructions/close.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GAejB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,qBAAqB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WAAW,CAAC,QAA0B,CAAC,YAAY,CAAE,CAAC;QAC3E,YAAY,IAAI,CAAC,CAAC;QAClB,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC;IACF,OAAO;QACL,cAAc,EAAE,WAAW,CAAC,cAAc;QAC1C,QAAQ,EAAE;YACR,IAAI,EAAE,cAAc,EAAE;YACtB,KAAK,EAAE,cAAc,EAAE;YACvB,KAAK,EAAE,cAAc,EAAE;YACvB,SAAS,EAAE,cAAc,EAAE;YAC3B,YAAY,EAAE,cAAc,EAAE;SAC/B;QACD,IAAI,EAAE,8BAA8B,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;KAChE,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"close.js","sourceRoot":"","sources":["../../../../src/generated_clients/staking/instructions/close.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GAejB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAwB,MAAM,oBAAoB,CAAC;AAEjF,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;IACR,SAAS,EAAE,CAAC;IACZ,YAAY,EAAE,CAAC;CACP,CAAC;AAGX,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,UAAU,CAAC;IAChD,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE;CACpC,CAAC,CAAC;AAEH,MAAM,UAAU,0BAA0B;IACxC,OAAO,cAAc,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,C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EAAE,cAAc,EAAE;SAC/B;QACD,IAAI,EAAE,8BAA8B,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;KAChE,CAAC;AACJ,CAAC"}
@@ -5,9 +5,14 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from '@solana/kit';
9
- import { NOSANA_STAKING_PROGRAM_ADDRESS } from '../programs/index.js';
10
- export declare const EXTEND_DISCRIMINATOR: Uint8Array;
8
+ import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from "@solana/kit";
9
+ import { NOSANA_STAKING_PROGRAM_ADDRESS } from "../programs/index.js";
10
+ export declare const EXTEND_INSTRUCTION_ACCOUNTS: {
11
+ readonly stake: 0;
12
+ readonly authority: 1;
13
+ };
14
+ export type ExtendInstructionAccountName = keyof typeof EXTEND_INSTRUCTION_ACCOUNTS;
15
+ export declare const EXTEND_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
11
16
  export declare function getExtendDiscriminatorBytes(): ReadonlyUint8Array;
12
17
  export type ExtendInstruction<TProgram extends string = typeof NOSANA_STAKING_PROGRAM_ADDRESS, TAccountStake extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
13
18
  TAccountStake extends string ? WritableAccount<TAccountStake> : TAccountStake,
@@ -27,7 +32,7 @@ export declare function getExtendInstructionDataCodec(): FixedSizeCodec<ExtendIn
27
32
  export type ExtendInput<TAccountStake extends string = string, TAccountAuthority extends string = string> = {
28
33
  stake: Address<TAccountStake>;
29
34
  authority: TransactionSigner<TAccountAuthority>;
30
- duration: ExtendInstructionDataArgs['duration'];
35
+ duration: ExtendInstructionDataArgs["duration"];
31
36
  };
32
37
  export declare function getExtendInstruction<TAccountStake extends string, TAccountAuthority extends string, TProgramAddress extends Address = typeof NOSANA_STAKING_PROGRAM_ADDRESS>(input: ExtendInput<TAccountStake, TAccountAuthority>, config?: {
33
38
  programAddress?: TProgramAddress;
@@ -5,9 +5,13 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- import { combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, transformEncoder, } from '@solana/kit';
9
- import { NOSANA_STAKING_PROGRAM_ADDRESS } from '../programs/index.js';
10
- import { getAccountMetaFactory } from '../shared/index.js';
8
+ import { combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, transformEncoder, } from "@solana/kit";
9
+ import { NOSANA_STAKING_PROGRAM_ADDRESS } from "../programs/index.js";
10
+ import { getAccountMetaFactory } from "../shared/index.js";
11
+ export const EXTEND_INSTRUCTION_ACCOUNTS = {
12
+ stake: 0,
13
+ authority: 1,
14
+ };
11
15
  export const EXTEND_DISCRIMINATOR = new Uint8Array([
12
16
  228, 127, 0, 1, 227, 154, 54, 168,
13
17
  ]);
@@ -16,14 +20,14 @@ export function getExtendDiscriminatorBytes() {
16
20
  }
17
21
  export function getExtendInstructionDataEncoder() {
18
22
  return transformEncoder(getStructEncoder([
19
- ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],
20
- ['duration', getU64Encoder()],
23
+ ["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
24
+ ["duration", getU64Encoder()],
21
25
  ]), (value) => ({ ...value, discriminator: EXTEND_DISCRIMINATOR }));
22
26
  }
23
27
  export function getExtendInstructionDataDecoder() {
24
28
  return getStructDecoder([
25
- ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],
26
- ['duration', getU64Decoder()],
29
+ ["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
30
+ ["duration", getU64Decoder()],
27
31
  ]);
28
32
  }
29
33
  export function getExtendInstructionDataCodec() {
@@ -40,7 +44,7 @@ export function getExtendInstruction(input, config) {
40
44
  const accounts = originalAccounts;
41
45
  // Original args.
42
46
  const args = { ...input };
43
- const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');
47
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
44
48
  return Object.freeze({
45
49
  accounts: [
46
50
  getAccountMeta(accounts.stake),
@@ -53,7 +57,7 @@ export function getExtendInstruction(input, config) {
53
57
  export function parseExtendInstruction(instruction) {
54
58
  if (instruction.accounts.length < 2) {
55
59
  // TODO: Coded error.
56
- throw new Error('Not enough accounts');
60
+ throw new Error("Not enough accounts");
57
61
  }
58
62
  let accountIndex = 0;
59
63
  const getNextAccount = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"extend.js","sourceRoot":"","sources":["../../../../src/generated_clients/staking/instructions/extend.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,gBAAgB,GAcjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAwB,MAAM,oBAAoB,CAAC;AAEjF,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,UAAU,CAAC;IACjD,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG;CAClC,CAAC,CAAC;AAEH,MAA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C;IAE1B,MAAM,cAAc,GAAG,qBAAqB,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;IAC1E,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,QAAQ,EAAE;YACR,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC;YAC9B,cAAc,CAAC,QAAQ,CAAC,SAAS,CAAC;SACnC;QACD,IAAI,EAAE,+BAA+B,EAAE,CAAC,MAAM,CAC5C,IAAiC,CAClC;QACD,cAAc;KACyD,CAAC,CAAC;AAC7E,CAAC;AAcD,MAAM,UAAU,sBAAsB,CAIpC,WAEyC;IAEzC,IAAI,WAAW,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpC,qBAAqB;QACrB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACzC,CAAC;IACD,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,MAAM,WAAW,GAAI,WAAW,CAAC,QAA0B,CAAC,YAAY,CAAE,CAAC;QAC3E,YAAY,IAAI,CAAC,CAAC;QAClB,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC;IACF,OAAO;QACL,cAAc,EAAE,WAAW,CAAC,cAAc;QAC1C,QAAQ,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,EAAE;QAClE,IAAI,EAAE,+BAA+B,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;KACjE,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"extend.js","sourceRoot":"","sources":["../../../../src/generated_clients/staking/instructions/extend.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,gBAAgB,GAcjB,MAAM,aAAa,CAAC;AACrB,OAAO,EA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AClE,IAAI,EAAE,+BAA+B,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;KACjE,CAAC;AACJ,CAAC"}
@@ -5,13 +5,13 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- export * from './close.js';
9
- export * from './extend.js';
10
- export * from './init.js';
11
- export * from './restake.js';
12
- export * from './slash.js';
13
- export * from './stake.js';
14
- export * from './topup.js';
15
- export * from './unstake.js';
16
- export * from './updateSettings.js';
17
- export * from './withdraw.js';
8
+ export * from "./close.js";
9
+ export * from "./extend.js";
10
+ export * from "./init.js";
11
+ export * from "./restake.js";
12
+ export * from "./slash.js";
13
+ export * from "./stake.js";
14
+ export * from "./topup.js";
15
+ export * from "./unstake.js";
16
+ export * from "./updateSettings.js";
17
+ export * from "./withdraw.js";
@@ -5,14 +5,14 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- export * from './close.js';
9
- export * from './extend.js';
10
- export * from './init.js';
11
- export * from './restake.js';
12
- export * from './slash.js';
13
- export * from './stake.js';
14
- export * from './topup.js';
15
- export * from './unstake.js';
16
- export * from './updateSettings.js';
17
- export * from './withdraw.js';
8
+ export * from "./close.js";
9
+ export * from "./extend.js";
10
+ export * from "./init.js";
11
+ export * from "./restake.js";
12
+ export * from "./slash.js";
13
+ export * from "./stake.js";
14
+ export * from "./topup.js";
15
+ export * from "./unstake.js";
16
+ export * from "./updateSettings.js";
17
+ export * from "./withdraw.js";
18
18
  //# sourceMappingURL=index.js.map
@@ -5,11 +5,18 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from '@solana/kit';
9
- import { NOSANA_STAKING_PROGRAM_ADDRESS } from '../programs/index.js';
10
- export declare const INIT_DISCRIMINATOR: Uint8Array;
8
+ import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from "@solana/kit";
9
+ import { NOSANA_STAKING_PROGRAM_ADDRESS } from "../programs/index.js";
10
+ export declare const INIT_INSTRUCTION_ACCOUNTS: {
11
+ readonly settings: 0;
12
+ readonly authority: 1;
13
+ readonly systemProgram: 2;
14
+ readonly rent: 3;
15
+ };
16
+ export type InitInstructionAccountName = keyof typeof INIT_INSTRUCTION_ACCOUNTS;
17
+ export declare const INIT_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
11
18
  export declare function getInitDiscriminatorBytes(): ReadonlyUint8Array;
12
- export type InitInstruction<TProgram extends string = typeof NOSANA_STAKING_PROGRAM_ADDRESS, TAccountSettings extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TAccountRent extends string | AccountMeta<string> = 'SysvarRent111111111111111111111111111111111', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
19
+ export type InitInstruction<TProgram extends string = typeof NOSANA_STAKING_PROGRAM_ADDRESS, TAccountSettings extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TAccountRent extends string | AccountMeta<string> = "SysvarRent111111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
13
20
  TAccountSettings extends string ? WritableAccount<TAccountSettings> : TAccountSettings,
14
21
  TAccountAuthority extends string ? WritableSignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
15
22
  TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,