@nosana/kit 2.0.30 → 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.
- package/dist/NosanaClient.d.ts +2 -3
- package/dist/NosanaClient.js +5 -11
- package/dist/NosanaClient.js.map +1 -1
- package/dist/errors/NosanaError.d.ts +2 -2
- package/dist/generated_clients/jobs/accounts/index.d.ts +3 -3
- package/dist/generated_clients/jobs/accounts/index.js +3 -3
- package/dist/generated_clients/jobs/accounts/jobAccount.d.ts +2 -2
- package/dist/generated_clients/jobs/accounts/jobAccount.js +25 -25
- package/dist/generated_clients/jobs/accounts/marketAccount.d.ts +2 -2
- package/dist/generated_clients/jobs/accounts/marketAccount.js +25 -25
- package/dist/generated_clients/jobs/accounts/runAccount.d.ts +2 -2
- package/dist/generated_clients/jobs/accounts/runAccount.js +13 -13
- package/dist/generated_clients/jobs/errors/index.d.ts +1 -1
- package/dist/generated_clients/jobs/errors/index.js +1 -1
- package/dist/generated_clients/jobs/errors/nosanaJobs.d.ts +1 -1
- package/dist/generated_clients/jobs/errors/nosanaJobs.js +5 -5
- package/dist/generated_clients/jobs/index.d.ts +5 -5
- package/dist/generated_clients/jobs/index.js +5 -5
- package/dist/generated_clients/jobs/instructions/assign.d.ts +22 -6
- package/dist/generated_clients/jobs/instructions/assign.js +28 -13
- package/dist/generated_clients/jobs/instructions/assign.js.map +1 -1
- package/dist/generated_clients/jobs/instructions/claim.d.ts +16 -4
- package/dist/generated_clients/jobs/instructions/claim.js +19 -8
- package/dist/generated_clients/jobs/instructions/claim.js.map +1 -1
- package/dist/generated_clients/jobs/instructions/clean.d.ts +9 -3
- package/dist/generated_clients/jobs/instructions/clean.js +12 -7
- package/dist/generated_clients/jobs/instructions/clean.js.map +1 -1
- package/dist/generated_clients/jobs/instructions/cleanAdmin.d.ts +9 -3
- package/dist/generated_clients/jobs/instructions/cleanAdmin.js +12 -7
- package/dist/generated_clients/jobs/instructions/cleanAdmin.js.map +1 -1
- package/dist/generated_clients/jobs/instructions/close.d.ts +12 -4
- package/dist/generated_clients/jobs/instructions/close.js +15 -8
- package/dist/generated_clients/jobs/instructions/close.js.map +1 -1
- package/dist/generated_clients/jobs/instructions/closeAdmin.d.ts +12 -4
- package/dist/generated_clients/jobs/instructions/closeAdmin.js +15 -8
- package/dist/generated_clients/jobs/instructions/closeAdmin.js.map +1 -1
- package/dist/generated_clients/jobs/instructions/complete.d.ts +9 -4
- package/dist/generated_clients/jobs/instructions/complete.js +13 -9
- package/dist/generated_clients/jobs/instructions/complete.js.map +1 -1
- package/dist/generated_clients/jobs/instructions/delist.d.ts +14 -4
- package/dist/generated_clients/jobs/instructions/delist.js +17 -8
- package/dist/generated_clients/jobs/instructions/delist.js.map +1 -1
- package/dist/generated_clients/jobs/instructions/end.d.ts +16 -4
- package/dist/generated_clients/jobs/instructions/end.js +19 -8
- package/dist/generated_clients/jobs/instructions/end.js.map +1 -1
- package/dist/generated_clients/jobs/instructions/extend.d.ts +18 -5
- package/dist/generated_clients/jobs/instructions/extend.js +22 -10
- package/dist/generated_clients/jobs/instructions/extend.js.map +1 -1
- package/dist/generated_clients/jobs/instructions/finish.d.ts +19 -5
- package/dist/generated_clients/jobs/instructions/finish.js +23 -10
- package/dist/generated_clients/jobs/instructions/finish.js.map +1 -1
- package/dist/generated_clients/jobs/instructions/index.d.ts +19 -19
- package/dist/generated_clients/jobs/instructions/index.js +19 -19
- package/dist/generated_clients/jobs/instructions/list.d.ts +21 -6
- package/dist/generated_clients/jobs/instructions/list.js +27 -13
- package/dist/generated_clients/jobs/instructions/list.js.map +1 -1
- package/dist/generated_clients/jobs/instructions/open.d.ts +20 -9
- package/dist/generated_clients/jobs/instructions/open.js +30 -20
- package/dist/generated_clients/jobs/instructions/open.js.map +1 -1
- package/dist/generated_clients/jobs/instructions/quit.d.ts +10 -3
- package/dist/generated_clients/jobs/instructions/quit.js +13 -7
- package/dist/generated_clients/jobs/instructions/quit.js.map +1 -1
- package/dist/generated_clients/jobs/instructions/quitAdmin.d.ts +9 -3
- package/dist/generated_clients/jobs/instructions/quitAdmin.js +12 -7
- package/dist/generated_clients/jobs/instructions/quitAdmin.js.map +1 -1
- package/dist/generated_clients/jobs/instructions/recover.d.ts +14 -4
- package/dist/generated_clients/jobs/instructions/recover.js +17 -8
- package/dist/generated_clients/jobs/instructions/recover.js.map +1 -1
- package/dist/generated_clients/jobs/instructions/stop.d.ts +9 -3
- package/dist/generated_clients/jobs/instructions/stop.js +12 -7
- package/dist/generated_clients/jobs/instructions/stop.js.map +1 -1
- package/dist/generated_clients/jobs/instructions/update.d.ts +14 -8
- package/dist/generated_clients/jobs/instructions/update.js +22 -17
- package/dist/generated_clients/jobs/instructions/update.js.map +1 -1
- package/dist/generated_clients/jobs/instructions/work.d.ts +15 -4
- package/dist/generated_clients/jobs/instructions/work.js +18 -8
- package/dist/generated_clients/jobs/instructions/work.js.map +1 -1
- package/dist/generated_clients/jobs/programs/index.d.ts +1 -1
- package/dist/generated_clients/jobs/programs/index.js +1 -1
- package/dist/generated_clients/jobs/programs/nosanaJobs.d.ts +3 -3
- package/dist/generated_clients/jobs/programs/nosanaJobs.js +6 -6
- package/dist/generated_clients/jobs/shared/index.d.ts +2 -2
- package/dist/generated_clients/jobs/shared/index.js +9 -9
- package/dist/generated_clients/jobs/types/index.d.ts +3 -3
- package/dist/generated_clients/jobs/types/index.js +3 -3
- package/dist/generated_clients/jobs/types/jobState.d.ts +1 -1
- package/dist/generated_clients/jobs/types/jobState.js +1 -1
- package/dist/generated_clients/jobs/types/jobType.d.ts +1 -1
- package/dist/generated_clients/jobs/types/jobType.js +1 -1
- package/dist/generated_clients/jobs/types/queueType.d.ts +1 -1
- package/dist/generated_clients/jobs/types/queueType.js +1 -1
- package/dist/generated_clients/merkle_distributor/accounts/claimStatus.d.ts +2 -2
- package/dist/generated_clients/merkle_distributor/accounts/claimStatus.js +17 -17
- package/dist/generated_clients/merkle_distributor/accounts/index.d.ts +2 -2
- package/dist/generated_clients/merkle_distributor/accounts/index.js +2 -2
- package/dist/generated_clients/merkle_distributor/accounts/merkleDistributor.d.ts +2 -2
- package/dist/generated_clients/merkle_distributor/accounts/merkleDistributor.js +45 -45
- package/dist/generated_clients/merkle_distributor/errors/index.d.ts +1 -1
- package/dist/generated_clients/merkle_distributor/errors/index.js +1 -1
- package/dist/generated_clients/merkle_distributor/errors/merkleDistributor.d.ts +1 -1
- package/dist/generated_clients/merkle_distributor/errors/merkleDistributor.js +5 -5
- package/dist/generated_clients/merkle_distributor/index.d.ts +4 -4
- package/dist/generated_clients/merkle_distributor/index.js +4 -4
- package/dist/generated_clients/merkle_distributor/instructions/claimLocked.d.ts +13 -4
- package/dist/generated_clients/merkle_distributor/instructions/claimLocked.js +16 -8
- package/dist/generated_clients/merkle_distributor/instructions/claimLocked.js.map +1 -1
- package/dist/generated_clients/merkle_distributor/instructions/clawback.d.ts +13 -4
- package/dist/generated_clients/merkle_distributor/instructions/clawback.js +17 -9
- package/dist/generated_clients/merkle_distributor/instructions/clawback.js.map +1 -1
- package/dist/generated_clients/merkle_distributor/instructions/closeClaimStatus.d.ts +10 -3
- package/dist/generated_clients/merkle_distributor/instructions/closeClaimStatus.js +13 -7
- package/dist/generated_clients/merkle_distributor/instructions/closeClaimStatus.js.map +1 -1
- package/dist/generated_clients/merkle_distributor/instructions/closeDistributor.d.ts +12 -4
- package/dist/generated_clients/merkle_distributor/instructions/closeDistributor.js +15 -8
- package/dist/generated_clients/merkle_distributor/instructions/closeDistributor.js.map +1 -1
- package/dist/generated_clients/merkle_distributor/instructions/index.d.ts +9 -9
- package/dist/generated_clients/merkle_distributor/instructions/index.js +9 -9
- package/dist/generated_clients/merkle_distributor/instructions/newClaim.d.ts +17 -7
- package/dist/generated_clients/merkle_distributor/instructions/newClaim.js +24 -15
- package/dist/generated_clients/merkle_distributor/instructions/newClaim.js.map +1 -1
- package/dist/generated_clients/merkle_distributor/instructions/newDistributor.d.ts +24 -13
- package/dist/generated_clients/merkle_distributor/instructions/newDistributor.js +37 -27
- package/dist/generated_clients/merkle_distributor/instructions/newDistributor.js.map +1 -1
- package/dist/generated_clients/merkle_distributor/instructions/setAdmin.d.ts +9 -3
- package/dist/generated_clients/merkle_distributor/instructions/setAdmin.js +12 -7
- package/dist/generated_clients/merkle_distributor/instructions/setAdmin.js.map +1 -1
- package/dist/generated_clients/merkle_distributor/instructions/setClawbackReceiver.d.ts +9 -3
- package/dist/generated_clients/merkle_distributor/instructions/setClawbackReceiver.js +12 -7
- package/dist/generated_clients/merkle_distributor/instructions/setClawbackReceiver.js.map +1 -1
- package/dist/generated_clients/merkle_distributor/instructions/setEnableSlot.d.ts +9 -4
- package/dist/generated_clients/merkle_distributor/instructions/setEnableSlot.js +13 -9
- package/dist/generated_clients/merkle_distributor/instructions/setEnableSlot.js.map +1 -1
- package/dist/generated_clients/merkle_distributor/programs/index.d.ts +1 -1
- package/dist/generated_clients/merkle_distributor/programs/index.js +1 -1
- package/dist/generated_clients/merkle_distributor/programs/merkleDistributor.d.ts +3 -3
- package/dist/generated_clients/merkle_distributor/programs/merkleDistributor.js +6 -6
- package/dist/generated_clients/merkle_distributor/shared/index.d.ts +2 -2
- package/dist/generated_clients/merkle_distributor/shared/index.js +9 -9
- package/dist/generated_clients/staking/accounts/index.d.ts +2 -2
- package/dist/generated_clients/staking/accounts/index.js +2 -2
- package/dist/generated_clients/staking/accounts/settingsAccount.d.ts +2 -2
- package/dist/generated_clients/staking/accounts/settingsAccount.js +7 -7
- package/dist/generated_clients/staking/accounts/stakeAccount.d.ts +2 -2
- package/dist/generated_clients/staking/accounts/stakeAccount.js +17 -17
- package/dist/generated_clients/staking/errors/index.d.ts +1 -1
- package/dist/generated_clients/staking/errors/index.js +1 -1
- package/dist/generated_clients/staking/errors/nosanaStaking.d.ts +1 -1
- package/dist/generated_clients/staking/errors/nosanaStaking.js +5 -5
- package/dist/generated_clients/staking/index.d.ts +4 -4
- package/dist/generated_clients/staking/index.js +4 -4
- package/dist/generated_clients/staking/instructions/close.d.ts +12 -4
- package/dist/generated_clients/staking/instructions/close.js +15 -8
- package/dist/generated_clients/staking/instructions/close.js.map +1 -1
- package/dist/generated_clients/staking/instructions/extend.d.ts +9 -4
- package/dist/generated_clients/staking/instructions/extend.js +13 -9
- package/dist/generated_clients/staking/instructions/extend.js.map +1 -1
- package/dist/generated_clients/staking/instructions/index.d.ts +10 -10
- package/dist/generated_clients/staking/instructions/index.js +10 -10
- package/dist/generated_clients/staking/instructions/init.d.ts +11 -4
- package/dist/generated_clients/staking/instructions/init.js +15 -9
- package/dist/generated_clients/staking/instructions/init.js.map +1 -1
- package/dist/generated_clients/staking/instructions/restake.d.ts +9 -3
- package/dist/generated_clients/staking/instructions/restake.js +12 -7
- package/dist/generated_clients/staking/instructions/restake.js.map +1 -1
- package/dist/generated_clients/staking/instructions/slash.d.ts +14 -5
- package/dist/generated_clients/staking/instructions/slash.js +18 -10
- package/dist/generated_clients/staking/instructions/slash.js.map +1 -1
- package/dist/generated_clients/staking/instructions/stake.d.ts +17 -6
- package/dist/generated_clients/staking/instructions/stake.js +24 -14
- package/dist/generated_clients/staking/instructions/stake.js.map +1 -1
- package/dist/generated_clients/staking/instructions/topup.d.ts +13 -5
- package/dist/generated_clients/staking/instructions/topup.js +17 -10
- package/dist/generated_clients/staking/instructions/topup.js.map +1 -1
- package/dist/generated_clients/staking/instructions/unstake.d.ts +9 -3
- package/dist/generated_clients/staking/instructions/unstake.js +12 -7
- package/dist/generated_clients/staking/instructions/unstake.js.map +1 -1
- package/dist/generated_clients/staking/instructions/updateSettings.d.ts +10 -3
- package/dist/generated_clients/staking/instructions/updateSettings.js +13 -7
- package/dist/generated_clients/staking/instructions/updateSettings.js.map +1 -1
- package/dist/generated_clients/staking/instructions/withdraw.d.ts +12 -4
- package/dist/generated_clients/staking/instructions/withdraw.js +15 -8
- package/dist/generated_clients/staking/instructions/withdraw.js.map +1 -1
- package/dist/generated_clients/staking/programs/index.d.ts +1 -1
- package/dist/generated_clients/staking/programs/index.js +1 -1
- package/dist/generated_clients/staking/programs/nosanaStaking.d.ts +3 -3
- package/dist/generated_clients/staking/programs/nosanaStaking.js +6 -6
- package/dist/generated_clients/staking/shared/index.d.ts +2 -2
- package/dist/generated_clients/staking/shared/index.js +9 -9
- package/dist/index.d.ts +2 -2
- package/dist/index.js.map +1 -1
- package/dist/services/solana/SolanaService.js +2 -2
- package/dist/services/solana/SolanaService.js.map +1 -1
- package/dist/utils/createApiInstance.d.ts +13 -0
- package/dist/utils/createApiInstance.js +54 -0
- package/dist/utils/createApiInstance.js.map +1 -0
- package/package.json +24 -15
package/dist/NosanaClient.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NosanaNetwork } from '@nosana/types';
|
|
2
|
+
import { createNosanaApi } from '@nosana/api';
|
|
2
3
|
import { createIpfsClient } from '@nosana/ipfs';
|
|
3
|
-
import { type NosanaApi } from '@nosana/api';
|
|
4
4
|
import { type NosanaAuthorization } from '@nosana/authorization';
|
|
5
5
|
import { Logger } from './logger/Logger.js';
|
|
6
6
|
import { ClientConfig, PartialClientConfig } from './config/index.js';
|
|
@@ -22,7 +22,7 @@ export interface NosanaClient {
|
|
|
22
22
|
readonly merkleDistributor: MerkleDistributorProgram;
|
|
23
23
|
readonly solana: SolanaService;
|
|
24
24
|
readonly nos: TokenService;
|
|
25
|
-
readonly api:
|
|
25
|
+
readonly api: ReturnType<typeof createNosanaApi>;
|
|
26
26
|
readonly ipfs: ReturnType<typeof createIpfsClient>;
|
|
27
27
|
readonly authorization: NosanaAuthorization;
|
|
28
28
|
readonly logger: Logger;
|
|
@@ -43,7 +43,6 @@ export interface NosanaClient {
|
|
|
43
43
|
/**
|
|
44
44
|
* Creates a new Nosana client instance.
|
|
45
45
|
*
|
|
46
|
-
*
|
|
47
46
|
* @param network - The network to connect to (default: MAINNET)
|
|
48
47
|
* @param customConfig - Optional custom configuration to override defaults
|
|
49
48
|
* @returns A Nosana client instance with all services and programs
|
package/dist/NosanaClient.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { NosanaNetwork } from '@nosana/types';
|
|
2
2
|
import { createIpfsClient } from '@nosana/ipfs';
|
|
3
|
-
import { createNosanaApi } from '@nosana/api';
|
|
4
3
|
import { createNosanaAuthorization } from '@nosana/authorization';
|
|
5
4
|
import { Logger } from './logger/Logger.js';
|
|
6
5
|
import { getNosanaConfig } from './config/index.js';
|
|
@@ -9,11 +8,11 @@ import { createStakeProgram } from './services/programs/stake/index.js';
|
|
|
9
8
|
import { createMerkleDistributorProgram, } from './services/programs/merkleDistributor/index.js';
|
|
10
9
|
import { createSolanaService } from './services/solana/index.js';
|
|
11
10
|
import { createTokenService } from './services/token/index.js';
|
|
11
|
+
import { createApiInstance } from './utils/createApiInstance.js';
|
|
12
12
|
import { walletToAuthorizationSigner } from './utils/walletToAuthorizationSigner.js';
|
|
13
13
|
/**
|
|
14
14
|
* Creates a new Nosana client instance.
|
|
15
15
|
*
|
|
16
|
-
*
|
|
17
16
|
* @param network - The network to connect to (default: MAINNET)
|
|
18
17
|
* @param customConfig - Optional custom configuration to override defaults
|
|
19
18
|
* @returns A Nosana client instance with all services and programs
|
|
@@ -62,15 +61,10 @@ export function createNosanaClient(network = NosanaNetwork.MAINNET, customConfig
|
|
|
62
61
|
const authorization = wallet
|
|
63
62
|
? createNosanaAuthorization(walletToAuthorizationSigner(wallet))
|
|
64
63
|
: createNosanaAuthorization();
|
|
65
|
-
|
|
66
|
-
const api =
|
|
67
|
-
?
|
|
68
|
-
:
|
|
69
|
-
? createNosanaApi(network, {
|
|
70
|
-
identifier: wallet.address.toString(),
|
|
71
|
-
generate: authorization.generate,
|
|
72
|
-
})
|
|
73
|
-
: undefined;
|
|
64
|
+
const apiDeps = { authorization, solana, nos };
|
|
65
|
+
const api = wallet
|
|
66
|
+
? createApiInstance(network, config.api, wallet, apiDeps)
|
|
67
|
+
: createApiInstance(network, config.api, undefined, apiDeps);
|
|
74
68
|
return {
|
|
75
69
|
authorization,
|
|
76
70
|
api,
|
package/dist/NosanaClient.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NosanaClient.js","sourceRoot":"","sources":["../src/NosanaClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"NosanaClient.js","sourceRoot":"","sources":["../src/NosanaClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,yBAAyB,EAA4B,MAAM,uBAAuB,CAAC;AAE5F,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAgB,eAAe,EAAuB,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAoB,MAAM,mCAAmC,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAqB,MAAM,oCAAoC,CAAC;AAC3F,OAAO,EACL,8BAA8B,GAE/B,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAsB,MAAM,4BAA4B,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAqB,MAAM,2BAA2B,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAiB,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AAmCrF;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,kBAAkB,CAChC,UAAyB,aAAa,CAAC,OAAO,EAC9C,YAAkC;IAElC,MAAM,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IACtD,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;IAE9D,oBAAoB;IACpB,IAAI,MAAM,GAAuB,MAAM,CAAC,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,SAAS,EAAE,OAAO,CAAC,CAAC;QAE/D,OAAO;YACL,aAAa;YACb,GAAG;SACJ,CAAC;IACJ,CAAC,CAAC;IAEF,IAAI,qBAAqB,GAAG,2BAA2B,EAAE,CAAC;IAE1D,8BAA8B;IAC9B,OAAO;QACL,MAAM;QACN,MAAM;QACN,MAAM;QACN,GAAG;QACH,IAAI;QACJ,KAAK;QACL,iBAAiB;QACjB,IAAI;QACJ,IAAI,aAAa;YACf,OAAO,qBAAqB,CAAC,aAAa,CAAC;QAC7C,CAAC;QACD,IAAI,GAAG;YACL,OAAO,qBAAqB,CAAC,GAAG,CAAC;QACnC,CAAC;QACD,IAAI,MAAM;YACR,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,IAAI,MAAM,CAAC,KAAyB;YAClC,MAAM,GAAG,KAAK,CAAC;YACf,qBAAqB,GAAG,2BAA2B,EAAE,CAAC;QACxD,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -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
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
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
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
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
|
|
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
|
|
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
|
-
[
|
|
19
|
-
[
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
24
|
-
[
|
|
25
|
-
[
|
|
26
|
-
[
|
|
27
|
-
[
|
|
28
|
-
[
|
|
29
|
-
[
|
|
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
|
-
[
|
|
36
|
-
[
|
|
37
|
-
[
|
|
38
|
-
[
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
[
|
|
42
|
-
[
|
|
43
|
-
[
|
|
44
|
-
[
|
|
45
|
-
[
|
|
46
|
-
[
|
|
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
|
|
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
|
|
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
|
-
[
|
|
19
|
-
[
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
24
|
-
[
|
|
25
|
-
[
|
|
26
|
-
[
|
|
27
|
-
[
|
|
28
|
-
[
|
|
29
|
-
[
|
|
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
|
-
[
|
|
36
|
-
[
|
|
37
|
-
[
|
|
38
|
-
[
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
[
|
|
42
|
-
[
|
|
43
|
-
[
|
|
44
|
-
[
|
|
45
|
-
[
|
|
46
|
-
[
|
|
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
|
|
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
|
|
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
|
-
[
|
|
19
|
-
[
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
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
|
-
[
|
|
30
|
-
[
|
|
31
|
-
[
|
|
32
|
-
[
|
|
33
|
-
[
|
|
34
|
-
[
|
|
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,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
|
|
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
|
|
9
|
-
import { NOSANA_JOBS_PROGRAM_ADDRESS } from
|
|
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 !==
|
|
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 !==
|
|
73
|
+
if (process.env.NODE_ENV !== "production") {
|
|
74
74
|
return nosanaJobsErrorMessages[code];
|
|
75
75
|
}
|
|
76
|
-
return
|
|
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
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
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
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
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
|
|
9
|
-
import { NOSANA_JOBS_PROGRAM_ADDRESS } from
|
|
10
|
-
export declare const
|
|
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> =
|
|
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[
|
|
55
|
-
timeout: AssignInstructionDataArgs[
|
|
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
|
|
9
|
-
import { NOSANA_JOBS_PROGRAM_ADDRESS } from
|
|
10
|
-
import { getAccountMetaFactory } from
|
|
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
|
-
[
|
|
20
|
-
[
|
|
21
|
-
[
|
|
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
|
-
[
|
|
27
|
-
[
|
|
28
|
-
[
|
|
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
|
-
|
|
77
|
+
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
63
78
|
}
|
|
64
79
|
if (!accounts.systemProgram.value) {
|
|
65
80
|
accounts.systemProgram.value =
|
|
66
|
-
|
|
81
|
+
"11111111111111111111111111111111";
|
|
67
82
|
}
|
|
68
|
-
const getAccountMeta = getAccountMetaFactory(programAddress,
|
|
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(
|
|
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,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAwB,MAAM,oBAAoB,CAAC;AAEjF,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,UAAU,CAAC;IACjD,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG;CAClC,CAAC,CAAC;AAEH,MAAM,UAAU,2BAA2B;IACzC,OAAO,cAAc,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAC3E,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,EACf,eAAe,EACf,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,gBA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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
|
|
9
|
-
import { NOSANA_JOBS_PROGRAM_ADDRESS } from
|
|
10
|
-
export declare const
|
|
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> =
|
|
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,
|