@nosana/types 2.2.20 → 2.7.3
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/Common/index.d.ts +16 -0
- package/dist/Common/index.d.ts.map +1 -1
- package/dist/Common/index.js +36 -0
- package/dist/Common/index.js.map +1 -1
- package/dist/Jobs/JobDefinition/execution/index.d.ts +3 -9
- package/dist/Jobs/JobDefinition/execution/index.d.ts.map +1 -1
- package/dist/Jobs/JobDefinition/execution/index.js +12 -69
- package/dist/Jobs/JobDefinition/execution/index.js.map +1 -1
- package/dist/Jobs/JobDefinition/operations/index.js +104 -218
- package/dist/Jobs/JobDefinition/operations/index.js.map +1 -1
- package/dist/Jobs/index.js +62 -119
- package/dist/Jobs/index.js.map +1 -1
- package/dist/Schemas/job.js +2 -23
- package/dist/Schemas/job.js.map +1 -1
- package/package.json +8 -3
package/dist/Common/index.d.ts
CHANGED
|
@@ -4,4 +4,20 @@ export declare const NosanaNetwork: {
|
|
|
4
4
|
readonly LOCALNET: "localnet";
|
|
5
5
|
};
|
|
6
6
|
export type NosanaNetwork = (typeof NosanaNetwork)[keyof typeof NosanaNetwork];
|
|
7
|
+
/**
|
|
8
|
+
* The NOS token mint address per network. Single source of truth for all
|
|
9
|
+
* packages; localnet uses the devnet mint (pre-baked in @nosana/localnet).
|
|
10
|
+
*/
|
|
11
|
+
export declare const NOS_MINT_ADDRESSES: Record<NosanaNetwork, string>;
|
|
12
|
+
/**
|
|
13
|
+
* Nosana program addresses per network. Single source of truth for all
|
|
14
|
+
* packages; localnet runs the devnet programs (pre-baked in @nosana/localnet).
|
|
15
|
+
*/
|
|
16
|
+
export declare const NOSANA_PROGRAM_ADDRESSES: Record<NosanaNetwork, {
|
|
17
|
+
jobs: string;
|
|
18
|
+
rewards: string;
|
|
19
|
+
stake: string;
|
|
20
|
+
pools: string;
|
|
21
|
+
merkleDistributor: string;
|
|
22
|
+
}>;
|
|
7
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Common/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Common/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE/E;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAInD,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAC3C,aAAa,EACb;IACE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAuBO,CAAC"}
|
package/dist/Common/index.js
CHANGED
|
@@ -3,4 +3,40 @@ export const NosanaNetwork = {
|
|
|
3
3
|
DEVNET: 'devnet',
|
|
4
4
|
LOCALNET: 'localnet',
|
|
5
5
|
};
|
|
6
|
+
/**
|
|
7
|
+
* The NOS token mint address per network. Single source of truth for all
|
|
8
|
+
* packages; localnet uses the devnet mint (pre-baked in @nosana/localnet).
|
|
9
|
+
*/
|
|
10
|
+
export const NOS_MINT_ADDRESSES = {
|
|
11
|
+
[NosanaNetwork.MAINNET]: 'nosXBVoaCTtYdLvKY6Csb4AC8JCdQKKAaWYtx2ZMoo7',
|
|
12
|
+
[NosanaNetwork.DEVNET]: 'devr1BGQndEW5k5zfvG5FsLyZv1Ap73vNgAHcQ9sUVP',
|
|
13
|
+
[NosanaNetwork.LOCALNET]: 'devr1BGQndEW5k5zfvG5FsLyZv1Ap73vNgAHcQ9sUVP',
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Nosana program addresses per network. Single source of truth for all
|
|
17
|
+
* packages; localnet runs the devnet programs (pre-baked in @nosana/localnet).
|
|
18
|
+
*/
|
|
19
|
+
export const NOSANA_PROGRAM_ADDRESSES = {
|
|
20
|
+
[NosanaNetwork.MAINNET]: {
|
|
21
|
+
jobs: 'nosJhNRqr2bc9g1nfGDcXXTXvYUmxD4cVwy2pMWhrYM',
|
|
22
|
+
rewards: 'nosRB8DUV67oLNrL45bo2pFLrmsWPiewe2Lk2DRNYCp',
|
|
23
|
+
stake: 'nosScmHY2uR24Zh751PmGj9ww9QRNHewh9H59AfrTJE',
|
|
24
|
+
pools: 'nosPdZrfDzND1LAR28FLMDEATUPK53K8xbRBXAirevD',
|
|
25
|
+
merkleDistributor: 'merkp8F8f5EgYSYKadk3YiuQQdo3JPdnJWKviaaF425',
|
|
26
|
+
},
|
|
27
|
+
[NosanaNetwork.DEVNET]: {
|
|
28
|
+
jobs: 'nosJTmGQxvwXy23vng5UjkTbfv91Bzf9jEuro78dAGR',
|
|
29
|
+
rewards: 'nosRB8DUV67oLNrL45bo2pFLrmsWPiewe2Lk2DRNYCp',
|
|
30
|
+
stake: 'nosScmHY2uR24Zh751PmGj9ww9QRNHewh9H59AfrTJE',
|
|
31
|
+
pools: 'nosPdZrfDzND1LAR28FLMDEATUPK53K8xbRBXAirevD',
|
|
32
|
+
merkleDistributor: 'merkp8F8f5EgYSYKadk3YiuQQdo3JPdnJWKviaaF425',
|
|
33
|
+
},
|
|
34
|
+
[NosanaNetwork.LOCALNET]: {
|
|
35
|
+
jobs: 'nosJTmGQxvwXy23vng5UjkTbfv91Bzf9jEuro78dAGR',
|
|
36
|
+
rewards: 'nosRB8DUV67oLNrL45bo2pFLrmsWPiewe2Lk2DRNYCp',
|
|
37
|
+
stake: 'nosScmHY2uR24Zh751PmGj9ww9QRNHewh9H59AfrTJE',
|
|
38
|
+
pools: 'nosPdZrfDzND1LAR28FLMDEATUPK53K8xbRBXAirevD',
|
|
39
|
+
merkleDistributor: 'merkp8F8f5EgYSYKadk3YiuQQdo3JPdnJWKviaaF425',
|
|
40
|
+
},
|
|
41
|
+
};
|
|
6
42
|
//# sourceMappingURL=index.js.map
|
package/dist/Common/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Common/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;CACZ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Common/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;CACZ,CAAC;AAIX;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAkC;IAC/D,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,6CAA6C;IACtE,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,6CAA6C;IACrE,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,6CAA6C;CAC/D,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GASjC;IACF,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE;QACvB,IAAI,EAAE,6CAA6C;QACnD,OAAO,EAAE,6CAA6C;QACtD,KAAK,EAAE,6CAA6C;QACpD,KAAK,EAAE,6CAA6C;QACpD,iBAAiB,EAAE,6CAA6C;KACjE;IACD,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE;QACtB,IAAI,EAAE,6CAA6C;QACnD,OAAO,EAAE,6CAA6C;QACtD,KAAK,EAAE,6CAA6C;QACpD,KAAK,EAAE,6CAA6C;QACpD,iBAAiB,EAAE,6CAA6C;KACjE;IACD,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE;QACxB,IAAI,EAAE,6CAA6C;QACnD,OAAO,EAAE,6CAA6C;QACtD,KAAK,EAAE,6CAA6C;QACpD,KAAK,EAAE,6CAA6C;QACpD,iBAAiB,EAAE,6CAA6C;KACjE;CACO,CAAC"}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import { type IValidation } from "typia";
|
|
2
|
-
type GroupDependencies = {
|
|
3
|
-
depends_on?: never;
|
|
4
|
-
stop_if_dependent_stops?: never;
|
|
5
|
-
} | {
|
|
6
|
-
depends_on: string[];
|
|
7
|
-
stop_if_dependent_stops?: boolean;
|
|
8
|
-
};
|
|
9
2
|
export type Execution = {
|
|
10
3
|
group?: string;
|
|
11
4
|
timeout?: number;
|
|
12
|
-
|
|
5
|
+
depends_on?: string[];
|
|
6
|
+
stop_if_dependent_stops?: boolean;
|
|
7
|
+
};
|
|
13
8
|
export declare const validateExecution: (input: unknown) => IValidation<Execution>;
|
|
14
|
-
export {};
|
|
15
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/execution/index.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,WAAW,EAAE,MAAM,OAAO,CAAC;AAEhD,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/execution/index.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,WAAW,EAAE,MAAM,OAAO,CAAC;AAEhD,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,WAAW,CAAC,SAAS,CAChC,CAAC"}
|
|
@@ -2,66 +2,14 @@ import * as __typia_transform__accessExpressionAsString from "typia/lib/internal
|
|
|
2
2
|
import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport.js";
|
|
3
3
|
import * as __typia_transform__createStandardSchema from "typia/lib/internal/_createStandardSchema.js";
|
|
4
4
|
import typia from "typia";
|
|
5
|
-
export const validateExecution = (() => { const _io0 = (input, _exceptionable = true) => (undefined === input.group || "string" === typeof input.group) && (undefined === input.timeout || "number" === typeof input.timeout) && (
|
|
5
|
+
export const validateExecution = (() => { const _io0 = (input, _exceptionable = true) => (undefined === input.group || "string" === typeof input.group) && (undefined === input.timeout || "number" === typeof input.timeout) && (undefined === input.depends_on || Array.isArray(input.depends_on) && input.depends_on.every((elem, _index1) => "string" === typeof elem)) && (undefined === input.stop_if_dependent_stops || "boolean" === typeof input.stop_if_dependent_stops) && (0 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
6
6
|
if (["group", "timeout", "depends_on", "stop_if_dependent_stops"].some(prop => key === prop))
|
|
7
7
|
return true;
|
|
8
8
|
const value = input[key];
|
|
9
9
|
if (undefined === value)
|
|
10
10
|
return true;
|
|
11
11
|
return false;
|
|
12
|
-
})); const
|
|
13
|
-
if (["group", "timeout", "depends_on", "stop_if_dependent_stops"].some(prop => key === prop))
|
|
14
|
-
return true;
|
|
15
|
-
const value = input[key];
|
|
16
|
-
if (undefined === value)
|
|
17
|
-
return true;
|
|
18
|
-
return false;
|
|
19
|
-
})); const _iu0 = (input, _exceptionable = true) => (() => {
|
|
20
|
-
if (Array.isArray(input.depends_on) && input.depends_on.every((elem, _index2) => "string" === typeof elem))
|
|
21
|
-
return _io1(input, true && _exceptionable);
|
|
22
|
-
else
|
|
23
|
-
return _io0(input, true && _exceptionable);
|
|
24
|
-
})(); const _vo0 = (input, _path, _exceptionable = true) => [undefined === input.group || "string" === typeof input.group || _report(_exceptionable, {
|
|
25
|
-
path: _path + ".group",
|
|
26
|
-
expected: "(string | undefined)",
|
|
27
|
-
value: input.group
|
|
28
|
-
}), undefined === input.timeout || "number" === typeof input.timeout || _report(_exceptionable, {
|
|
29
|
-
path: _path + ".timeout",
|
|
30
|
-
expected: "(number | undefined)",
|
|
31
|
-
value: input.timeout
|
|
32
|
-
}), (null !== input.depends_on || _report(_exceptionable, {
|
|
33
|
-
path: _path + ".depends_on",
|
|
34
|
-
expected: "undefined",
|
|
35
|
-
value: input.depends_on
|
|
36
|
-
})) && (undefined === input.depends_on || _report(_exceptionable, {
|
|
37
|
-
path: _path + ".depends_on",
|
|
38
|
-
expected: "undefined",
|
|
39
|
-
value: input.depends_on
|
|
40
|
-
})), (null !== input.stop_if_dependent_stops || _report(_exceptionable, {
|
|
41
|
-
path: _path + ".stop_if_dependent_stops",
|
|
42
|
-
expected: "undefined",
|
|
43
|
-
value: input.stop_if_dependent_stops
|
|
44
|
-
})) && (undefined === input.stop_if_dependent_stops || _report(_exceptionable, {
|
|
45
|
-
path: _path + ".stop_if_dependent_stops",
|
|
46
|
-
expected: "undefined",
|
|
47
|
-
value: input.stop_if_dependent_stops
|
|
48
|
-
})), 0 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
49
|
-
if (["group", "timeout", "depends_on", "stop_if_dependent_stops"].some(prop => key === prop))
|
|
50
|
-
return true;
|
|
51
|
-
const value = input[key];
|
|
52
|
-
if (undefined === value)
|
|
53
|
-
return true;
|
|
54
|
-
return _report(_exceptionable, {
|
|
55
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
56
|
-
expected: "undefined",
|
|
57
|
-
value: value,
|
|
58
|
-
description: [
|
|
59
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
60
|
-
"",
|
|
61
|
-
"Please remove the property next time."
|
|
62
|
-
].join("\n")
|
|
63
|
-
});
|
|
64
|
-
}).every(flag => flag))].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [undefined === input.group || "string" === typeof input.group || _report(_exceptionable, {
|
|
12
|
+
})); const _vo0 = (input, _path, _exceptionable = true) => [undefined === input.group || "string" === typeof input.group || _report(_exceptionable, {
|
|
65
13
|
path: _path + ".group",
|
|
66
14
|
expected: "(string | undefined)",
|
|
67
15
|
value: input.group
|
|
@@ -69,23 +17,23 @@ export const validateExecution = (() => { const _io0 = (input, _exceptionable =
|
|
|
69
17
|
path: _path + ".timeout",
|
|
70
18
|
expected: "(number | undefined)",
|
|
71
19
|
value: input.timeout
|
|
72
|
-
}), (Array.isArray(input.depends_on) || _report(_exceptionable, {
|
|
20
|
+
}), undefined === input.depends_on || (Array.isArray(input.depends_on) || _report(_exceptionable, {
|
|
73
21
|
path: _path + ".depends_on",
|
|
74
|
-
expected: "Array<string>",
|
|
22
|
+
expected: "(Array<string> | undefined)",
|
|
75
23
|
value: input.depends_on
|
|
76
|
-
})) && input.depends_on.map((elem,
|
|
77
|
-
path: _path + ".depends_on[" +
|
|
24
|
+
})) && input.depends_on.map((elem, _index2) => "string" === typeof elem || _report(_exceptionable, {
|
|
25
|
+
path: _path + ".depends_on[" + _index2 + "]",
|
|
78
26
|
expected: "string",
|
|
79
27
|
value: elem
|
|
80
28
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
81
29
|
path: _path + ".depends_on",
|
|
82
|
-
expected: "Array<string>",
|
|
30
|
+
expected: "(Array<string> | undefined)",
|
|
83
31
|
value: input.depends_on
|
|
84
32
|
}), undefined === input.stop_if_dependent_stops || "boolean" === typeof input.stop_if_dependent_stops || _report(_exceptionable, {
|
|
85
33
|
path: _path + ".stop_if_dependent_stops",
|
|
86
34
|
expected: "(boolean | undefined)",
|
|
87
35
|
value: input.stop_if_dependent_stops
|
|
88
|
-
}),
|
|
36
|
+
}), 0 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
89
37
|
if (["group", "timeout", "depends_on", "stop_if_dependent_stops"].some(prop => key === prop))
|
|
90
38
|
return true;
|
|
91
39
|
const value = input[key];
|
|
@@ -101,22 +49,17 @@ export const validateExecution = (() => { const _io0 = (input, _exceptionable =
|
|
|
101
49
|
"Please remove the property next time."
|
|
102
50
|
].join("\n")
|
|
103
51
|
});
|
|
104
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
105
|
-
if (Array.isArray(input.depends_on) && input.depends_on.map((elem, _index4) => "string" === typeof elem).every(flag => flag))
|
|
106
|
-
return _vo1(input, _path, true && _exceptionable);
|
|
107
|
-
else
|
|
108
|
-
return _vo0(input, _path, true && _exceptionable);
|
|
109
|
-
})(); const __is = (input, _exceptionable = true) => "object" === typeof input && null !== input && false === Array.isArray(input) && _iu0(input, true); let errors; let _report; return __typia_transform__createStandardSchema._createStandardSchema(input => {
|
|
52
|
+
}).every(flag => flag))].every(flag => flag); const __is = (input, _exceptionable = true) => "object" === typeof input && null !== input && false === Array.isArray(input) && _io0(input, true); let errors; let _report; return __typia_transform__createStandardSchema._createStandardSchema(input => {
|
|
110
53
|
if (false === __is(input)) {
|
|
111
54
|
errors = [];
|
|
112
55
|
_report = __typia_transform__validateReport._validateReport(errors);
|
|
113
56
|
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input && false === Array.isArray(input) || _report(true, {
|
|
114
57
|
path: _path + "",
|
|
115
|
-
expected: "
|
|
58
|
+
expected: "Execution",
|
|
116
59
|
value: input
|
|
117
|
-
})) &&
|
|
60
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
118
61
|
path: _path + "",
|
|
119
|
-
expected: "
|
|
62
|
+
expected: "Execution",
|
|
120
63
|
value: input
|
|
121
64
|
}))(input, "$input", true);
|
|
122
65
|
const success = 0 === errors.length;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/execution/index.ts"],"names":[],"mappings":";;;AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/execution/index.ts"],"names":[],"mappings":";;;AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAShD,MAAM,CAAC,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QACW,CAAC"}
|