@nosana/kit 2.0.32 → 2.0.38

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 (190) 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/dist/services/programs/merkleDistributor/MerkleDistributorProgram.js +0 -1
  189. package/dist/services/programs/merkleDistributor/MerkleDistributorProgram.js.map +1 -1
  190. package/package.json +36 -17
@@ -1,7 +1,7 @@
1
1
  export declare class NosanaError extends Error {
2
2
  readonly code: string;
3
- readonly details?: unknown;
4
- constructor(message: string, code: string, details?: unknown);
3
+ readonly details?: unknown | undefined;
4
+ constructor(message: string, code: string, details?: unknown | undefined);
5
5
  }
6
6
  export declare const ErrorCodes: {
7
7
  readonly INVALID_NETWORK: "INVALID_NETWORK";
@@ -5,6 +5,6 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- export * from './jobAccount.js';
9
- export * from './marketAccount.js';
10
- export * from './runAccount.js';
8
+ export * from "./jobAccount.js";
9
+ export * from "./marketAccount.js";
10
+ export * from "./runAccount.js";
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- export * from './jobAccount.js';
9
- export * from './marketAccount.js';
10
- export * from './runAccount.js';
8
+ export * from "./jobAccount.js";
9
+ export * from "./marketAccount.js";
10
+ export * from "./runAccount.js";
11
11
  //# 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 JOB_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 JOB_ACCOUNT_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
10
10
  export declare function getJobAccountDiscriminatorBytes(): ReadonlyUint8Array;
11
11
  /** The `JobAccount` struct holds all the information about any individual jobs. */
12
12
  export type JobAccount = {
@@ -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, 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, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, transformEncoder, } from "@solana/kit";
9
9
  export const JOB_ACCOUNT_DISCRIMINATOR = new Uint8Array([
10
10
  91, 16, 162, 5, 45, 210, 125, 65,
11
11
  ]);
@@ -15,35 +15,35 @@ export function getJobAccountDiscriminatorBytes() {
15
15
  /** Gets the encoder for {@link JobAccountArgs} account data. */
16
16
  export function getJobAccountEncoder() {
17
17
  return transformEncoder(getStructEncoder([
18
- ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],
19
- ['ipfsJob', fixEncoderSize(getBytesEncoder(), 32)],
20
- ['ipfsResult', fixEncoderSize(getBytesEncoder(), 32)],
21
- ['market', getAddressEncoder()],
22
- ['node', getAddressEncoder()],
23
- ['payer', getAddressEncoder()],
24
- ['price', getU64Encoder()],
25
- ['project', getAddressEncoder()],
26
- ['state', getU8Encoder()],
27
- ['timeEnd', getI64Encoder()],
28
- ['timeStart', getI64Encoder()],
29
- ['timeout', getI64Encoder()],
18
+ ["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
19
+ ["ipfsJob", fixEncoderSize(getBytesEncoder(), 32)],
20
+ ["ipfsResult", fixEncoderSize(getBytesEncoder(), 32)],
21
+ ["market", getAddressEncoder()],
22
+ ["node", getAddressEncoder()],
23
+ ["payer", getAddressEncoder()],
24
+ ["price", getU64Encoder()],
25
+ ["project", getAddressEncoder()],
26
+ ["state", getU8Encoder()],
27
+ ["timeEnd", getI64Encoder()],
28
+ ["timeStart", getI64Encoder()],
29
+ ["timeout", getI64Encoder()],
30
30
  ]), (value) => ({ ...value, discriminator: JOB_ACCOUNT_DISCRIMINATOR }));
31
31
  }
32
32
  /** Gets the decoder for {@link JobAccount} account data. */
33
33
  export function getJobAccountDecoder() {
34
34
  return getStructDecoder([
35
- ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],
36
- ['ipfsJob', fixDecoderSize(getBytesDecoder(), 32)],
37
- ['ipfsResult', fixDecoderSize(getBytesDecoder(), 32)],
38
- ['market', getAddressDecoder()],
39
- ['node', getAddressDecoder()],
40
- ['payer', getAddressDecoder()],
41
- ['price', getU64Decoder()],
42
- ['project', getAddressDecoder()],
43
- ['state', getU8Decoder()],
44
- ['timeEnd', getI64Decoder()],
45
- ['timeStart', getI64Decoder()],
46
- ['timeout', getI64Decoder()],
35
+ ["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
36
+ ["ipfsJob", fixDecoderSize(getBytesDecoder(), 32)],
37
+ ["ipfsResult", fixDecoderSize(getBytesDecoder(), 32)],
38
+ ["market", getAddressDecoder()],
39
+ ["node", getAddressDecoder()],
40
+ ["payer", getAddressDecoder()],
41
+ ["price", getU64Decoder()],
42
+ ["project", getAddressDecoder()],
43
+ ["state", getU8Decoder()],
44
+ ["timeEnd", getI64Decoder()],
45
+ ["timeStart", getI64Decoder()],
46
+ ["timeout", getI64Decoder()],
47
47
  ]);
48
48
  }
49
49
  /** Gets the codec for {@link JobAccount} 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 Codec, type Decoder, type EncodedAccount, type Encoder, type FetchAccountConfig, type FetchAccountsConfig, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from '@solana/kit';
9
- export declare const MARKET_ACCOUNT_DISCRIMINATOR: Uint8Array;
8
+ import { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type Codec, type Decoder, type EncodedAccount, type Encoder, type FetchAccountConfig, type FetchAccountsConfig, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from "@solana/kit";
9
+ export declare const MARKET_ACCOUNT_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
10
10
  export declare function getMarketAccountDiscriminatorBytes(): ReadonlyUint8Array;
11
11
  /** The `MarketAccount` struct holds all the information about jobs and the nodes queue. */
12
12
  export type MarketAccount = {
@@ -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, getArrayDecoder, getArrayEncoder, 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, getArrayDecoder, getArrayEncoder, getBytesDecoder, getBytesEncoder, getI64Decoder, getI64Encoder, getStructDecoder, getStructEncoder, getU128Decoder, getU128Encoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, transformEncoder, } from "@solana/kit";
9
9
  export const MARKET_ACCOUNT_DISCRIMINATOR = new Uint8Array([
10
10
  201, 78, 187, 225, 240, 198, 201, 251,
11
11
  ]);
@@ -15,35 +15,35 @@ export function getMarketAccountDiscriminatorBytes() {
15
15
  /** Gets the encoder for {@link MarketAccountArgs} account data. */
16
16
  export function getMarketAccountEncoder() {
17
17
  return transformEncoder(getStructEncoder([
18
- ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],
19
- ['authority', getAddressEncoder()],
20
- ['jobExpiration', getI64Encoder()],
21
- ['jobPrice', getU64Encoder()],
22
- ['jobTimeout', getI64Encoder()],
23
- ['jobType', getU8Encoder()],
24
- ['vault', getAddressEncoder()],
25
- ['vaultBump', getU8Encoder()],
26
- ['nodeAccessKey', getAddressEncoder()],
27
- ['nodeXnosMinimum', getU128Encoder()],
28
- ['queueType', getU8Encoder()],
29
- ['queue', getArrayEncoder(getAddressEncoder())],
18
+ ["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
19
+ ["authority", getAddressEncoder()],
20
+ ["jobExpiration", getI64Encoder()],
21
+ ["jobPrice", getU64Encoder()],
22
+ ["jobTimeout", getI64Encoder()],
23
+ ["jobType", getU8Encoder()],
24
+ ["vault", getAddressEncoder()],
25
+ ["vaultBump", getU8Encoder()],
26
+ ["nodeAccessKey", getAddressEncoder()],
27
+ ["nodeXnosMinimum", getU128Encoder()],
28
+ ["queueType", getU8Encoder()],
29
+ ["queue", getArrayEncoder(getAddressEncoder())],
30
30
  ]), (value) => ({ ...value, discriminator: MARKET_ACCOUNT_DISCRIMINATOR }));
31
31
  }
32
32
  /** Gets the decoder for {@link MarketAccount} account data. */
33
33
  export function getMarketAccountDecoder() {
34
34
  return getStructDecoder([
35
- ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],
36
- ['authority', getAddressDecoder()],
37
- ['jobExpiration', getI64Decoder()],
38
- ['jobPrice', getU64Decoder()],
39
- ['jobTimeout', getI64Decoder()],
40
- ['jobType', getU8Decoder()],
41
- ['vault', getAddressDecoder()],
42
- ['vaultBump', getU8Decoder()],
43
- ['nodeAccessKey', getAddressDecoder()],
44
- ['nodeXnosMinimum', getU128Decoder()],
45
- ['queueType', getU8Decoder()],
46
- ['queue', getArrayDecoder(getAddressDecoder())],
35
+ ["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
36
+ ["authority", getAddressDecoder()],
37
+ ["jobExpiration", getI64Decoder()],
38
+ ["jobPrice", getU64Decoder()],
39
+ ["jobTimeout", getI64Decoder()],
40
+ ["jobType", getU8Decoder()],
41
+ ["vault", getAddressDecoder()],
42
+ ["vaultBump", getU8Decoder()],
43
+ ["nodeAccessKey", getAddressDecoder()],
44
+ ["nodeXnosMinimum", getU128Decoder()],
45
+ ["queueType", getU8Decoder()],
46
+ ["queue", getArrayDecoder(getAddressDecoder())],
47
47
  ]);
48
48
  }
49
49
  /** Gets the codec for {@link MarketAccount} 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 RUN_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 RUN_ACCOUNT_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
10
10
  export declare function getRunAccountDiscriminatorBytes(): ReadonlyUint8Array;
11
11
  /** The `RunAccount` struct holds temporary information that matches nodes to jobs. */
12
12
  export type RunAccount = {
@@ -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, getU8Decoder, getU8Encoder, transformEncoder, } from '@solana/kit';
8
+ import { assertAccountExists, assertAccountsExist, combineCodec, decodeAccount, fetchEncodedAccount, fetchEncodedAccounts, fixDecoderSize, fixEncoderSize, getAddressDecoder, getAddressEncoder, getBytesDecoder, getBytesEncoder, getI64Decoder, getI64Encoder, getStructDecoder, getStructEncoder, getU8Decoder, getU8Encoder, transformEncoder, } from "@solana/kit";
9
9
  export const RUN_ACCOUNT_DISCRIMINATOR = new Uint8Array([
10
10
  194, 169, 110, 230, 235, 11, 225, 22,
11
11
  ]);
@@ -15,23 +15,23 @@ export function getRunAccountDiscriminatorBytes() {
15
15
  /** Gets the encoder for {@link RunAccountArgs} account data. */
16
16
  export function getRunAccountEncoder() {
17
17
  return transformEncoder(getStructEncoder([
18
- ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],
19
- ['job', getAddressEncoder()],
20
- ['node', getAddressEncoder()],
21
- ['payer', getAddressEncoder()],
22
- ['state', getU8Encoder()],
23
- ['time', getI64Encoder()],
18
+ ["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
19
+ ["job", getAddressEncoder()],
20
+ ["node", getAddressEncoder()],
21
+ ["payer", getAddressEncoder()],
22
+ ["state", getU8Encoder()],
23
+ ["time", getI64Encoder()],
24
24
  ]), (value) => ({ ...value, discriminator: RUN_ACCOUNT_DISCRIMINATOR }));
25
25
  }
26
26
  /** Gets the decoder for {@link RunAccount} account data. */
27
27
  export function getRunAccountDecoder() {
28
28
  return getStructDecoder([
29
- ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],
30
- ['job', getAddressDecoder()],
31
- ['node', getAddressDecoder()],
32
- ['payer', getAddressDecoder()],
33
- ['state', getU8Decoder()],
34
- ['time', getI64Decoder()],
29
+ ["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
30
+ ["job", getAddressDecoder()],
31
+ ["node", getAddressDecoder()],
32
+ ["payer", getAddressDecoder()],
33
+ ["state", getU8Decoder()],
34
+ ["time", getI64Decoder()],
35
35
  ]);
36
36
  }
37
37
  /** Gets the codec for {@link RunAccount} account data. */
@@ -5,4 +5,4 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- export * from './nosanaJobs.js';
8
+ export * from "./nosanaJobs.js";
@@ -5,5 +5,5 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- export * from './nosanaJobs.js';
8
+ export * from "./nosanaJobs.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
  /** InvalidMarketAccount: This market account is not valid. */
10
10
  export declare const NOSANA_JOBS_ERROR__INVALID_MARKET_ACCOUNT = 6000;
11
11
  /** MarketInWrongState: This market does not have the right status. */
@@ -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_JOBS_PROGRAM_ADDRESS } from '../programs/index.js';
8
+ import { isProgramError, } from "@solana/kit";
9
+ import { NOSANA_JOBS_PROGRAM_ADDRESS } from "../programs/index.js";
10
10
  /** InvalidMarketAccount: This market account is not valid. */
11
11
  export const NOSANA_JOBS_ERROR__INVALID_MARKET_ACCOUNT = 0x1770; // 6000
12
12
  /** MarketInWrongState: This market does not have the right status. */
@@ -46,7 +46,7 @@ export const NOSANA_JOBS_ERROR__NODE_NFT_INVALID_AMOUNT = 0x1781; // 6017
46
46
  /** NodeKeyInvalidCollection: This access key does not belong to a verified collection. */
47
47
  export const NOSANA_JOBS_ERROR__NODE_KEY_INVALID_COLLECTION = 0x1782; // 6018
48
48
  let nosanaJobsErrorMessages;
49
- if (process.env.NODE_ENV !== 'production') {
49
+ if (process.env.NODE_ENV !== "production") {
50
50
  nosanaJobsErrorMessages = {
51
51
  [NOSANA_JOBS_ERROR__INVALID_JOB_ACCOUNT]: `This job account is not valid.`,
52
52
  [NOSANA_JOBS_ERROR__INVALID_MARKET_ACCOUNT]: `This market account is not valid.`,
@@ -70,10 +70,10 @@ if (process.env.NODE_ENV !== 'production') {
70
70
  };
71
71
  }
72
72
  export function getNosanaJobsErrorMessage(code) {
73
- if (process.env.NODE_ENV !== 'production') {
73
+ if (process.env.NODE_ENV !== "production") {
74
74
  return nosanaJobsErrorMessages[code];
75
75
  }
76
- return 'Error message not available in production bundles.';
76
+ return "Error message not available in production bundles.";
77
77
  }
78
78
  export function isNosanaJobsError(error, transactionMessage, code) {
79
79
  return isProgramError(error, transactionMessage, NOSANA_JOBS_PROGRAM_ADDRESS, code);
@@ -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';
12
- export * from './types/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
+ export * from "./types/index.js";
@@ -5,9 +5,9 @@
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';
12
- export * from './types/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
+ export * from "./types/index.js";
13
13
  //# sourceMappingURL=index.js.map
@@ -5,11 +5,27 @@
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 ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from '@solana/kit';
9
- import { NOSANA_JOBS_PROGRAM_ADDRESS } from '../programs/index.js';
10
- export declare const ASSIGN_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 ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from "@solana/kit";
9
+ import { NOSANA_JOBS_PROGRAM_ADDRESS } from "../programs/index.js";
10
+ export declare const ASSIGN_INSTRUCTION_ACCOUNTS: {
11
+ readonly job: 0;
12
+ readonly market: 1;
13
+ readonly run: 2;
14
+ readonly node: 3;
15
+ readonly user: 4;
16
+ readonly vault: 5;
17
+ readonly payer: 6;
18
+ readonly rewardsReflection: 7;
19
+ readonly rewardsVault: 8;
20
+ readonly authority: 9;
21
+ readonly rewardsProgram: 10;
22
+ readonly tokenProgram: 11;
23
+ readonly systemProgram: 12;
24
+ };
25
+ export type AssignInstructionAccountName = keyof typeof ASSIGN_INSTRUCTION_ACCOUNTS;
26
+ export declare const ASSIGN_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
11
27
  export declare function getAssignDiscriminatorBytes(): ReadonlyUint8Array;
12
- export type AssignInstruction<TProgram extends string = typeof NOSANA_JOBS_PROGRAM_ADDRESS, TAccountJob extends string | AccountMeta<string> = string, TAccountMarket extends string | AccountMeta<string> = string, TAccountRun extends string | AccountMeta<string> = string, TAccountNode extends string | AccountMeta<string> = string, TAccountUser extends string | AccountMeta<string> = string, TAccountVault extends string | AccountMeta<string> = string, TAccountPayer extends string | AccountMeta<string> = string, TAccountRewardsReflection extends string | AccountMeta<string> = string, TAccountRewardsVault extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TAccountRewardsProgram extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
28
+ export type AssignInstruction<TProgram extends string = typeof NOSANA_JOBS_PROGRAM_ADDRESS, TAccountJob extends string | AccountMeta<string> = string, TAccountMarket extends string | AccountMeta<string> = string, TAccountRun extends string | AccountMeta<string> = string, TAccountNode extends string | AccountMeta<string> = string, TAccountUser extends string | AccountMeta<string> = string, TAccountVault extends string | AccountMeta<string> = string, TAccountPayer extends string | AccountMeta<string> = string, TAccountRewardsReflection extends string | AccountMeta<string> = string, TAccountRewardsVault extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TAccountRewardsProgram extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
13
29
  TAccountJob extends string ? WritableSignerAccount<TAccountJob> & AccountSignerMeta<TAccountJob> : TAccountJob,
14
30
  TAccountMarket extends string ? WritableAccount<TAccountMarket> : TAccountMarket,
15
31
  TAccountRun extends string ? WritableSignerAccount<TAccountRun> & AccountSignerMeta<TAccountRun> : TAccountRun,
@@ -51,8 +67,8 @@ export type AssignInput<TAccountJob extends string = string, TAccountMarket exte
51
67
  rewardsProgram: Address<TAccountRewardsProgram>;
52
68
  tokenProgram?: Address<TAccountTokenProgram>;
53
69
  systemProgram?: Address<TAccountSystemProgram>;
54
- ipfsJob: AssignInstructionDataArgs['ipfsJob'];
55
- timeout: AssignInstructionDataArgs['timeout'];
70
+ ipfsJob: AssignInstructionDataArgs["ipfsJob"];
71
+ timeout: AssignInstructionDataArgs["timeout"];
56
72
  };
57
73
  export declare function getAssignInstruction<TAccountJob extends string, TAccountMarket extends string, TAccountRun extends string, TAccountNode extends string, TAccountUser extends string, TAccountVault extends string, TAccountPayer extends string, TAccountRewardsReflection extends string, TAccountRewardsVault extends string, TAccountAuthority extends string, TAccountRewardsProgram extends string, TAccountTokenProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof NOSANA_JOBS_PROGRAM_ADDRESS>(input: AssignInput<TAccountJob, TAccountMarket, TAccountRun, TAccountNode, TAccountUser, TAccountVault, TAccountPayer, TAccountRewardsReflection, TAccountRewardsVault, TAccountAuthority, TAccountRewardsProgram, TAccountTokenProgram, TAccountSystemProgram>, config?: {
58
74
  programAddress?: TProgramAddress;
@@ -5,9 +5,24 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- import { combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getI64Decoder, getI64Encoder, getStructDecoder, getStructEncoder, transformEncoder, } from '@solana/kit';
9
- import { NOSANA_JOBS_PROGRAM_ADDRESS } from '../programs/index.js';
10
- import { getAccountMetaFactory } from '../shared/index.js';
8
+ import { combineCodec, fixDecoderSize, fixEncoderSize, getBytesDecoder, getBytesEncoder, getI64Decoder, getI64Encoder, getStructDecoder, getStructEncoder, transformEncoder, } from "@solana/kit";
9
+ import { NOSANA_JOBS_PROGRAM_ADDRESS } from "../programs/index.js";
10
+ import { getAccountMetaFactory } from "../shared/index.js";
11
+ export const ASSIGN_INSTRUCTION_ACCOUNTS = {
12
+ job: 0,
13
+ market: 1,
14
+ run: 2,
15
+ node: 3,
16
+ user: 4,
17
+ vault: 5,
18
+ payer: 6,
19
+ rewardsReflection: 7,
20
+ rewardsVault: 8,
21
+ authority: 9,
22
+ rewardsProgram: 10,
23
+ tokenProgram: 11,
24
+ systemProgram: 12,
25
+ };
11
26
  export const ASSIGN_DISCRIMINATOR = new Uint8Array([
12
27
  73, 66, 125, 203, 81, 41, 64, 135,
13
28
  ]);
@@ -16,16 +31,16 @@ export function getAssignDiscriminatorBytes() {
16
31
  }
17
32
  export function getAssignInstructionDataEncoder() {
18
33
  return transformEncoder(getStructEncoder([
19
- ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],
20
- ['ipfsJob', fixEncoderSize(getBytesEncoder(), 32)],
21
- ['timeout', getI64Encoder()],
34
+ ["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
35
+ ["ipfsJob", fixEncoderSize(getBytesEncoder(), 32)],
36
+ ["timeout", getI64Encoder()],
22
37
  ]), (value) => ({ ...value, discriminator: ASSIGN_DISCRIMINATOR }));
23
38
  }
24
39
  export function getAssignInstructionDataDecoder() {
25
40
  return getStructDecoder([
26
- ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],
27
- ['ipfsJob', fixDecoderSize(getBytesDecoder(), 32)],
28
- ['timeout', getI64Decoder()],
41
+ ["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
42
+ ["ipfsJob", fixDecoderSize(getBytesDecoder(), 32)],
43
+ ["timeout", getI64Decoder()],
29
44
  ]);
30
45
  }
31
46
  export function getAssignInstructionDataCodec() {
@@ -59,13 +74,13 @@ export function getAssignInstruction(input, config) {
59
74
  // Resolve default values.
60
75
  if (!accounts.tokenProgram.value) {
61
76
  accounts.tokenProgram.value =
62
- 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
77
+ "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
63
78
  }
64
79
  if (!accounts.systemProgram.value) {
65
80
  accounts.systemProgram.value =
66
- '11111111111111111111111111111111';
81
+ "11111111111111111111111111111111";
67
82
  }
68
- const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');
83
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
69
84
  return Object.freeze({
70
85
  accounts: [
71
86
  getAccountMeta(accounts.job),
@@ -89,7 +104,7 @@ export function getAssignInstruction(input, config) {
89
104
  export function parseAssignInstruction(instruction) {
90
105
  if (instruction.accounts.length < 13) {
91
106
  // TODO: Coded error.
92
- throw new Error('Not enough accounts');
107
+ throw new Error("Not enough accounts");
93
108
  }
94
109
  let accountIndex = 0;
95
110
  const getNextAccount = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"assign.js","sourceRoot":"","sources":["../../../../src/generated_clients/jobs/instructions/assign.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GAgBjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,2BA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ACD,IAAI,EAAE,+BAA+B,EAAE,CAAC,MAAM,CAC5C,IAAiC,CAClC;QACD,cAAc;KAgBf,CAAC,CAAC;AACL,CAAC;AAyBD,MAAM,UAAU,sBAAsB,CAIpC,WAEyC;IAEzC,IAAI,WAAW,CAAC,QAAQ,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;QACrC,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;YACR,GAAG,EAAE,cAAc,EAAE;YACrB,MAAM,EAAE,cAAc,EAAE;YACxB,GAAG,EAAE,cAAc,EAAE;YACrB,IAAI,EAAE,cAAc,EAAE;YACtB,IAAI,EAAE,cAAc,EAAE;YACtB,KAAK,EAAE,cAAc,EAAE;YACvB,KAAK,EAAE,cAAc,EAAE;YACvB,iBAAiB,EAAE,cAAc,EAAE;YACnC,YAAY,EAAE,cAAc,EAAE;YAC9B,SAAS,EAAE,cAAc,EAAE;YAC3B,cAAc,EAAE,cAAc,EAAE;YAChC,YAAY,EAAE,cAAc,EAAE;YAC9B,aAAa,EAAE,cAAc,EAAE;SAChC;QACD,IAAI,EAAE,+BAA+B,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;KACjE,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"assign.js","sourceRoot":"","sources":["../../../../src/generated_clients/jobs/instructions/assign.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,E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KAAK,EAAE,cAAc,EAAE;YACvB,iBAAiB,EAAE,cAAc,EAAE;YACnC,YAAY,EAAE,cAAc,EAAE;YAC9B,SAAS,EAAE,cAAc,EAAE;YAC3B,cAAc,EAAE,cAAc,EAAE;YAChC,YAAY,EAAE,cAAc,EAAE;YAC9B,aAAa,EAAE,cAAc,EAAE;SAChC;QACD,IAAI,EAAE,+BAA+B,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;KACjE,CAAC;AACJ,CAAC"}
@@ -5,11 +5,23 @@
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 ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from '@solana/kit';
9
- import { NOSANA_JOBS_PROGRAM_ADDRESS } from '../programs/index.js';
10
- export declare const CLAIM_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 ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from "@solana/kit";
9
+ import { NOSANA_JOBS_PROGRAM_ADDRESS } from "../programs/index.js";
10
+ export declare const CLAIM_INSTRUCTION_ACCOUNTS: {
11
+ readonly job: 0;
12
+ readonly run: 1;
13
+ readonly market: 2;
14
+ readonly stake: 3;
15
+ readonly nft: 4;
16
+ readonly metadata: 5;
17
+ readonly payer: 6;
18
+ readonly authority: 7;
19
+ readonly systemProgram: 8;
20
+ };
21
+ export type ClaimInstructionAccountName = keyof typeof CLAIM_INSTRUCTION_ACCOUNTS;
22
+ export declare const CLAIM_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
11
23
  export declare function getClaimDiscriminatorBytes(): ReadonlyUint8Array;
12
- export type ClaimInstruction<TProgram extends string = typeof NOSANA_JOBS_PROGRAM_ADDRESS, TAccountJob extends string | AccountMeta<string> = string, TAccountRun extends string | AccountMeta<string> = string, TAccountMarket extends string | AccountMeta<string> = string, TAccountStake extends string | AccountMeta<string> = string, TAccountNft extends string | AccountMeta<string> = string, TAccountMetadata extends string | AccountMeta<string> = string, TAccountPayer extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
24
+ export type ClaimInstruction<TProgram extends string = typeof NOSANA_JOBS_PROGRAM_ADDRESS, TAccountJob extends string | AccountMeta<string> = string, TAccountRun extends string | AccountMeta<string> = string, TAccountMarket extends string | AccountMeta<string> = string, TAccountStake extends string | AccountMeta<string> = string, TAccountNft extends string | AccountMeta<string> = string, TAccountMetadata extends string | AccountMeta<string> = string, TAccountPayer extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
13
25
  TAccountJob extends string ? WritableAccount<TAccountJob> : TAccountJob,
14
26
  TAccountRun extends string ? WritableSignerAccount<TAccountRun> & AccountSignerMeta<TAccountRun> : TAccountRun,
15
27
  TAccountMarket extends string ? ReadonlyAccount<TAccountMarket> : TAccountMarket,
@@ -5,9 +5,20 @@
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_JOBS_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_JOBS_PROGRAM_ADDRESS } from "../programs/index.js";
10
+ import { getAccountMetaFactory } from "../shared/index.js";
11
+ export const CLAIM_INSTRUCTION_ACCOUNTS = {
12
+ job: 0,
13
+ run: 1,
14
+ market: 2,
15
+ stake: 3,
16
+ nft: 4,
17
+ metadata: 5,
18
+ payer: 6,
19
+ authority: 7,
20
+ systemProgram: 8,
21
+ };
11
22
  export const CLAIM_DISCRIMINATOR = new Uint8Array([
12
23
  62, 198, 214, 193, 213, 159, 108, 210,
13
24
  ]);
@@ -15,11 +26,11 @@ export function getClaimDiscriminatorBytes() {
15
26
  return fixEncoderSize(getBytesEncoder(), 8).encode(CLAIM_DISCRIMINATOR);
16
27
  }
17
28
  export function getClaimInstructionDataEncoder() {
18
- return transformEncoder(getStructEncoder([['discriminator', fixEncoderSize(getBytesEncoder(), 8)]]), (value) => ({ ...value, discriminator: CLAIM_DISCRIMINATOR }));
29
+ return transformEncoder(getStructEncoder([["discriminator", fixEncoderSize(getBytesEncoder(), 8)]]), (value) => ({ ...value, discriminator: CLAIM_DISCRIMINATOR }));
19
30
  }
20
31
  export function getClaimInstructionDataDecoder() {
21
32
  return getStructDecoder([
22
- ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],
33
+ ["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
23
34
  ]);
24
35
  }
25
36
  export function getClaimInstructionDataCodec() {
@@ -44,9 +55,9 @@ export function getClaimInstruction(input, config) {
44
55
  // Resolve default values.
45
56
  if (!accounts.systemProgram.value) {
46
57
  accounts.systemProgram.value =
47
- '11111111111111111111111111111111';
58
+ "11111111111111111111111111111111";
48
59
  }
49
- const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');
60
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
50
61
  return Object.freeze({
51
62
  accounts: [
52
63
  getAccountMeta(accounts.job),
@@ -66,7 +77,7 @@ export function getClaimInstruction(input, config) {
66
77
  export function parseClaimInstruction(instruction) {
67
78
  if (instruction.accounts.length < 9) {
68
79
  // TODO: Coded error.
69
- throw new Error('Not enough accounts');
80
+ throw new Error("Not enough accounts");
70
81
  }
71
82
  let accountIndex = 0;
72
83
  const getNextAccount = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"claim.js","sourceRoot":"","sources":["../../../../src/generated_clients/jobs/instructions/claim.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GAgBjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAwB,MAAM,oBAAoB,CAAC;AAEjF,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,UAAU,CAAC;IAChD,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;CACtC,CAAC,CAAC;AAEH,MAAM,UAAU,0BAA0B;IACxC,OAAO,cAAc,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAC1E,CAAC;AAqDD,MAAM,UAAU,8BAA8B;IAC5C,OAAO,gBAAgB,CACrB,gBAAgB,CAAC,CAAC,CAAC,eAAe,EAAE,cAAc,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAC3E,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,CAAC,CAC9D,CAAC;AACJ,CAAC;AAED,MA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AY,IAAI,CAAC,CAAC;QAClB,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC;IACF,OAAO;QACL,cAAc,EAAE,WAAW,CAAC,cAAc;QAC1C,QAAQ,EAAE;YACR,GAAG,EAAE,cAAc,EAAE;YACrB,GAAG,EAAE,cAAc,EAAE;YACrB,MAAM,EAAE,cAAc,EAAE;YACxB,KAAK,EAAE,cAAc,EAAE;YACvB,GAAG,EAAE,cAAc,EAAE;YACrB,QAAQ,EAAE,cAAc,EAAE;YAC1B,KAAK,EAAE,cAAc,EAAE;YACvB,SAAS,EAAE,cAAc,EAAE;YAC3B,aAAa,EAAE,cAAc,EAAE;SAChC;QACD,IAAI,EAAE,8BAA8B,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;KAChE,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"claim.js","sourceRoot":"","sources":["../../../../src/generated_clients/jobs/instructions/claim.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GAgBjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAwB,MAAM,oBAAoB,CAAC;AAEjF,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,CAAC;IACN,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;IACR,GAAG,EAAE,CAAC;IACN,QAAQ,EAAE,CAAC;IACX,KAAK,EAAE,CAAC;IACR,SAAS,EAAE,CAAC;IACZ,aAAa,EAAE,CAAC;CACR,CAAC;AAGX,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,UAAU,CAAC;IAChD,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,E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