@ar.io/deploy 0.1.0-alpha.20260610213851.5857f96
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/LICENSE +21 -0
- package/README.md +753 -0
- package/bin/dev.js +5 -0
- package/bin/run.js +5 -0
- package/dist/chunks/cache-C1tEeUx2.js +6 -0
- package/dist/chunks/cache-C1tEeUx2.js.map +1 -0
- package/dist/chunks/display-DRcjDj9k.js +104 -0
- package/dist/chunks/display-DRcjDj9k.js.map +1 -0
- package/dist/chunks/upload-workflow-DSS5FIa5.js +204 -0
- package/dist/chunks/upload-workflow-DSS5FIa5.js.map +1 -0
- package/dist/chunks/uploader-B2tC-1Qw.js +472 -0
- package/dist/chunks/uploader-B2tC-1Qw.js.map +1 -0
- package/dist/commands/deploy.js +238 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/upload.js +126 -0
- package/dist/commands/upload.js.map +1 -0
- package/dist/constants/flags.js +268 -0
- package/dist/constants/flags.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/arns.js +86 -0
- package/dist/prompts/arns.js.map +1 -0
- package/dist/prompts/deployment.js +27 -0
- package/dist/prompts/deployment.js.map +1 -0
- package/dist/prompts/wallet.js +55 -0
- package/dist/prompts/wallet.js.map +1 -0
- package/dist/src/commands/deploy.d.ts +9 -0
- package/dist/src/commands/deploy.d.ts.map +1 -0
- package/dist/src/commands/upload.d.ts +9 -0
- package/dist/src/commands/upload.d.ts.map +1 -0
- package/dist/src/constants/cache.d.ts +4 -0
- package/dist/src/constants/cache.d.ts.map +1 -0
- package/dist/src/constants/flags.d.ts +132 -0
- package/dist/src/constants/flags.d.ts.map +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/prompts/arns.d.ts +14 -0
- package/dist/src/prompts/arns.d.ts.map +1 -0
- package/dist/src/prompts/deployment.d.ts +6 -0
- package/dist/src/prompts/deployment.d.ts.map +1 -0
- package/dist/src/prompts/wallet.d.ts +26 -0
- package/dist/src/prompts/wallet.d.ts.map +1 -0
- package/dist/src/types/index.d.ts +31 -0
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/src/utils/__tests__/cache.test.d.ts +2 -0
- package/dist/src/utils/__tests__/cache.test.d.ts.map +1 -0
- package/dist/src/utils/__tests__/constants.test.d.ts +2 -0
- package/dist/src/utils/__tests__/constants.test.d.ts.map +1 -0
- package/dist/src/utils/__tests__/display.test.d.ts +2 -0
- package/dist/src/utils/__tests__/display.test.d.ts.map +1 -0
- package/dist/src/utils/cache.d.ts +48 -0
- package/dist/src/utils/cache.d.ts.map +1 -0
- package/dist/src/utils/chalk.d.ts +9 -0
- package/dist/src/utils/chalk.d.ts.map +1 -0
- package/dist/src/utils/config-resolver.d.ts +72 -0
- package/dist/src/utils/config-resolver.d.ts.map +1 -0
- package/dist/src/utils/constants.d.ts +4 -0
- package/dist/src/utils/constants.d.ts.map +1 -0
- package/dist/src/utils/deploy-key.d.ts +15 -0
- package/dist/src/utils/deploy-key.d.ts.map +1 -0
- package/dist/src/utils/display.d.ts +7 -0
- package/dist/src/utils/display.d.ts.map +1 -0
- package/dist/src/utils/path.d.ts +5 -0
- package/dist/src/utils/path.d.ts.map +1 -0
- package/dist/src/utils/signer.d.ts +19 -0
- package/dist/src/utils/signer.d.ts.map +1 -0
- package/dist/src/utils/solana.d.ts +29 -0
- package/dist/src/utils/solana.d.ts.map +1 -0
- package/dist/src/utils/upload-types.d.ts +35 -0
- package/dist/src/utils/upload-types.d.ts.map +1 -0
- package/dist/src/utils/uploader.d.ts +50 -0
- package/dist/src/utils/uploader.d.ts.map +1 -0
- package/dist/src/utils/validators.d.ts +21 -0
- package/dist/src/utils/validators.d.ts.map +1 -0
- package/dist/src/workflows/upload-workflow.d.ts +28 -0
- package/dist/src/workflows/upload-workflow.d.ts.map +1 -0
- package/dist/tests/constants.d.ts +11 -0
- package/dist/tests/constants.d.ts.map +1 -0
- package/dist/tests/e2e/deploy-command.test.d.ts +2 -0
- package/dist/tests/e2e/deploy-command.test.d.ts.map +1 -0
- package/dist/tests/global-setup.d.ts +6 -0
- package/dist/tests/global-setup.d.ts.map +1 -0
- package/dist/tests/mocks/turbo-handlers.d.ts +106 -0
- package/dist/tests/mocks/turbo-handlers.d.ts.map +1 -0
- package/dist/tests/setup.d.ts +11 -0
- package/dist/tests/setup.d.ts.map +1 -0
- package/dist/tests/types/payment-service.d.ts +218 -0
- package/dist/tests/types/payment-service.d.ts.map +1 -0
- package/dist/tests/types/upload-service.d.ts +168 -0
- package/dist/tests/types/upload-service.d.ts.map +1 -0
- package/dist/tests/unit/deploy-key.test.d.ts +2 -0
- package/dist/tests/unit/deploy-key.test.d.ts.map +1 -0
- package/dist/tests/unit/signer.test.d.ts +2 -0
- package/dist/tests/unit/signer.test.d.ts.map +1 -0
- package/dist/tests/unit/solana.test.d.ts +2 -0
- package/dist/tests/unit/solana.test.d.ts.map +1 -0
- package/dist/tests/unit/uploader-tags.test.d.ts +2 -0
- package/dist/tests/unit/uploader-tags.test.d.ts.map +1 -0
- package/dist/tests/unit/validators.test.d.ts +2 -0
- package/dist/tests/unit/validators.test.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/config-resolver.js +39 -0
- package/dist/utils/config-resolver.js.map +1 -0
- package/dist/utils/constants.js +6 -0
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/path.js +15 -0
- package/dist/utils/path.js.map +1 -0
- package/dist/utils/signer.js +45 -0
- package/dist/utils/signer.js.map +1 -0
- package/dist/utils/uploader.js +5 -0
- package/dist/utils/uploader.js.map +1 -0
- package/dist/utils/validators.js +43 -0
- package/dist/utils/validators.js.map +1 -0
- package/dist/workflows/upload-workflow.js +9 -0
- package/dist/workflows/upload-workflow.js.map +1 -0
- package/package.json +111 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { type ResolvedConfig } from '../utils/config-resolver.js';
|
|
2
|
+
/**
|
|
3
|
+
* Global flag definitions - single source of truth for all flags
|
|
4
|
+
* Each flag includes its oclif definition and optional prompt function
|
|
5
|
+
*/
|
|
6
|
+
export declare const globalFlags: {
|
|
7
|
+
arnsName: import("../utils/config-resolver.js").FlagConfig<string, any>;
|
|
8
|
+
arnsPrivateKey: import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
9
|
+
arnsWallet: import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
10
|
+
cluster: import("../utils/config-resolver.js").FlagConfig<string, any>;
|
|
11
|
+
dedupeCacheMaxEntries: import("../utils/config-resolver.js").FlagConfig<number, any>;
|
|
12
|
+
deployFile: import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
13
|
+
deployFolder: import("../utils/config-resolver.js").FlagConfig<string, any>;
|
|
14
|
+
maxTokenAmount: import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
15
|
+
noDedupe: import("../utils/config-resolver.js").FlagConfig<boolean, any>;
|
|
16
|
+
onDemand: import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
17
|
+
privateKey: import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
18
|
+
rpcUrl: import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
19
|
+
sigType: import("../utils/config-resolver.js").FlagConfig<string, any>;
|
|
20
|
+
ttlSeconds: import("../utils/config-resolver.js").FlagConfig<string, any>;
|
|
21
|
+
undername: import("../utils/config-resolver.js").FlagConfig<string, any>;
|
|
22
|
+
uploader: import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
23
|
+
useArns: import("../utils/config-resolver.js").FlagConfig<boolean, any>;
|
|
24
|
+
wallet: import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Complete set of flags for the deploy command
|
|
28
|
+
*/
|
|
29
|
+
export declare const deployFlags: {
|
|
30
|
+
'arns-name': any;
|
|
31
|
+
'arns-private-key': any;
|
|
32
|
+
'arns-wallet': any;
|
|
33
|
+
cluster: any;
|
|
34
|
+
'dedupe-cache-max-entries': any;
|
|
35
|
+
'deploy-file': any;
|
|
36
|
+
'deploy-folder': any;
|
|
37
|
+
'max-token-amount': any;
|
|
38
|
+
'no-dedupe': any;
|
|
39
|
+
'on-demand': any;
|
|
40
|
+
'private-key': any;
|
|
41
|
+
'rpc-url': any;
|
|
42
|
+
'sig-type': any;
|
|
43
|
+
'ttl-seconds': any;
|
|
44
|
+
undername: any;
|
|
45
|
+
uploader: any;
|
|
46
|
+
'use-arns': any;
|
|
47
|
+
wallet: any;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* ArNS-specific flags (subset of deploy flags)
|
|
51
|
+
*/
|
|
52
|
+
export declare const arnsFlags: {
|
|
53
|
+
'arns-name': any;
|
|
54
|
+
'arns-private-key': any;
|
|
55
|
+
'arns-wallet': any;
|
|
56
|
+
cluster: any;
|
|
57
|
+
'rpc-url': any;
|
|
58
|
+
'ttl-seconds': any;
|
|
59
|
+
undername: any;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Wallet/authentication flags (subset of deploy flags)
|
|
63
|
+
*/
|
|
64
|
+
export declare const walletFlags: {
|
|
65
|
+
'private-key': any;
|
|
66
|
+
'sig-type': any;
|
|
67
|
+
wallet: any;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Deploy command configuration type
|
|
71
|
+
*/
|
|
72
|
+
export interface DeployConfig {
|
|
73
|
+
'arns-name'?: string;
|
|
74
|
+
'arns-private-key'?: string;
|
|
75
|
+
'arns-wallet'?: string;
|
|
76
|
+
cluster: string;
|
|
77
|
+
'dedupe-cache-max-entries': number;
|
|
78
|
+
'deploy-file'?: string;
|
|
79
|
+
'deploy-folder': string;
|
|
80
|
+
'max-token-amount'?: string;
|
|
81
|
+
'no-dedupe': boolean;
|
|
82
|
+
'on-demand'?: string;
|
|
83
|
+
'private-key'?: string;
|
|
84
|
+
'rpc-url'?: string;
|
|
85
|
+
'sig-type': string;
|
|
86
|
+
'ttl-seconds': string;
|
|
87
|
+
undername: string;
|
|
88
|
+
'use-arns': boolean;
|
|
89
|
+
uploader?: string;
|
|
90
|
+
wallet?: string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Deploy command flag configurations
|
|
94
|
+
* Maps kebab-case flag names to their camelCase globalFlags definitions
|
|
95
|
+
*/
|
|
96
|
+
export declare const deployFlagConfigs: {
|
|
97
|
+
readonly 'arns-name': import("../utils/config-resolver.js").FlagConfig<string, any>;
|
|
98
|
+
readonly 'arns-private-key': import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
99
|
+
readonly 'arns-wallet': import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
100
|
+
readonly cluster: import("../utils/config-resolver.js").FlagConfig<string, any>;
|
|
101
|
+
readonly 'dedupe-cache-max-entries': import("../utils/config-resolver.js").FlagConfig<number, any>;
|
|
102
|
+
readonly 'deploy-file': import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
103
|
+
readonly 'deploy-folder': import("../utils/config-resolver.js").FlagConfig<string, any>;
|
|
104
|
+
readonly 'max-token-amount': import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
105
|
+
readonly 'no-dedupe': import("../utils/config-resolver.js").FlagConfig<boolean, any>;
|
|
106
|
+
readonly 'on-demand': import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
107
|
+
readonly 'private-key': import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
108
|
+
readonly 'rpc-url': import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
109
|
+
readonly 'sig-type': import("../utils/config-resolver.js").FlagConfig<string, any>;
|
|
110
|
+
readonly 'ttl-seconds': import("../utils/config-resolver.js").FlagConfig<string, any>;
|
|
111
|
+
readonly undername: import("../utils/config-resolver.js").FlagConfig<string, any>;
|
|
112
|
+
readonly uploader: import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
113
|
+
readonly 'use-arns': import("../utils/config-resolver.js").FlagConfig<boolean, any>;
|
|
114
|
+
readonly wallet: import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Upload command — file/folder to Arweave via Turbo without updating ArNS
|
|
118
|
+
*/
|
|
119
|
+
export declare const uploadFlagConfigs: {
|
|
120
|
+
readonly 'dedupe-cache-max-entries': import("../utils/config-resolver.js").FlagConfig<number, any>;
|
|
121
|
+
readonly 'deploy-file': import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
122
|
+
readonly 'deploy-folder': import("../utils/config-resolver.js").FlagConfig<string, any>;
|
|
123
|
+
readonly 'max-token-amount': import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
124
|
+
readonly 'no-dedupe': import("../utils/config-resolver.js").FlagConfig<boolean, any>;
|
|
125
|
+
readonly 'on-demand': import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
126
|
+
readonly 'private-key': import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
127
|
+
readonly 'sig-type': import("../utils/config-resolver.js").FlagConfig<string, any>;
|
|
128
|
+
readonly uploader: import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
129
|
+
readonly wallet: import("../utils/config-resolver.js").FlagConfig<string | undefined, any>;
|
|
130
|
+
};
|
|
131
|
+
export type UploadConfig = ResolvedConfig<typeof uploadFlagConfigs>;
|
|
132
|
+
//# sourceMappingURL=flags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flags.d.ts","sourceRoot":"","sources":["../../../src/constants/flags.ts"],"names":[],"mappings":"AAKA,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAUnF;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;CAwMvB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;CAmBvB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;CAQrB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,WAAW;;;;CAIvB,CAAA;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,0BAA0B,EAAE,MAAM,CAAA;IAClC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,eAAe,EAAE,MAAM,CAAA;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,WAAW,EAAE,OAAO,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;CAmBpB,CAAA;AAEV;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;CAWpB,CAAA;AAEV,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface AdvancedOptions {
|
|
2
|
+
cluster: string;
|
|
3
|
+
maxTokenAmount?: string;
|
|
4
|
+
onDemand?: string;
|
|
5
|
+
ttlSeconds: string;
|
|
6
|
+
undername: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function promptUpdateArns(): Promise<boolean>;
|
|
9
|
+
export declare function promptArnsName(): Promise<string>;
|
|
10
|
+
export declare function promptUndername(): Promise<string>;
|
|
11
|
+
export declare function promptTtl(): Promise<string>;
|
|
12
|
+
export declare function promptCluster(): Promise<string>;
|
|
13
|
+
export declare function promptAdvancedOptions(): Promise<AdvancedOptions | null>;
|
|
14
|
+
//# sourceMappingURL=arns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arns.d.ts","sourceRoot":"","sources":["../../../src/prompts/arns.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC,CAKzD;AAED,wBAAsB,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAMtD;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CAKvD;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAMjD;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CASrD;AAED,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAoD7E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployment.d.ts","sourceRoot":"","sources":["../../../src/prompts/deployment.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAA;CACxB;AAED,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,YAAY,CAAC,CAwBhE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface WalletConfig {
|
|
2
|
+
method: 'env' | 'file' | 'string';
|
|
3
|
+
privateKey?: string;
|
|
4
|
+
wallet?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Describes which key is being collected so prompts can be explicit about
|
|
8
|
+
* purpose (e.g. the upload key that pays for the upload vs. the ArNS authority
|
|
9
|
+
* key that signs the record update).
|
|
10
|
+
*/
|
|
11
|
+
export interface KeyPromptOptions {
|
|
12
|
+
/** Short name for the key, e.g. 'upload key' or 'ArNS authority key' */
|
|
13
|
+
label: string;
|
|
14
|
+
/** What the key is used for, e.g. 'pays for the upload' */
|
|
15
|
+
purpose: string;
|
|
16
|
+
/** Environment variable that can supply this key, e.g. 'DEPLOY_KEY' */
|
|
17
|
+
envVar: string;
|
|
18
|
+
/** Default path shown in the file prompt */
|
|
19
|
+
fileDefault?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function promptWalletMethod(opts: KeyPromptOptions): Promise<string>;
|
|
22
|
+
export declare function promptWalletFile(opts: KeyPromptOptions): Promise<string>;
|
|
23
|
+
export declare function promptPrivateKey(opts: KeyPromptOptions): Promise<string>;
|
|
24
|
+
export declare function promptSignerType(): Promise<string>;
|
|
25
|
+
export declare function getWalletConfig(opts: KeyPromptOptions): Promise<WalletConfig>;
|
|
26
|
+
//# sourceMappingURL=wallet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../../src/prompts/wallet.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAA;IACjC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAA;IACb,2DAA2D;IAC3D,OAAO,EAAE,MAAM,CAAA;IACf,uEAAuE;IACvE,MAAM,EAAE,MAAM,CAAA;IACd,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAShF;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAM9E;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAK9E;AAMD,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,CAYxD;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC,CAYnF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Flag } from '@oclif/core/lib/interfaces';
|
|
2
|
+
export type SignerType = 'arweave' | 'ethereum' | 'kyve' | 'polygon' | 'solana';
|
|
3
|
+
export interface DeployOptions {
|
|
4
|
+
'arns-name'?: string;
|
|
5
|
+
cluster: string;
|
|
6
|
+
'deploy-file': string;
|
|
7
|
+
'deploy-folder': string;
|
|
8
|
+
'private-key': string;
|
|
9
|
+
'sig-type': SignerType;
|
|
10
|
+
'ttl-seconds': string;
|
|
11
|
+
undername: string;
|
|
12
|
+
wallet: string;
|
|
13
|
+
}
|
|
14
|
+
export type DeployFlags = Partial<Record<keyof DeployOptions, Flag<string>>>;
|
|
15
|
+
export interface UploadResult {
|
|
16
|
+
id: string;
|
|
17
|
+
manifest?: {
|
|
18
|
+
paths: Record<string, {
|
|
19
|
+
id: string;
|
|
20
|
+
}>;
|
|
21
|
+
};
|
|
22
|
+
manifestResponse?: {
|
|
23
|
+
id: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export interface ArnsRecord {
|
|
27
|
+
processId: string;
|
|
28
|
+
type: string;
|
|
29
|
+
undernames?: string[];
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAA;AAEtD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAA;AAE/E,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,MAAM,CAAA;IACrB,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,UAAU,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;AAE5E,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,CAAC,EAAE;QACT,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KACtC,CAAA;IACD,gBAAgB,CAAC,EAAE;QACjB,EAAE,EAAE,MAAM,CAAA;KACX,CAAA;CACF;AAED,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache.test.d.ts","sourceRoot":"","sources":["../../../../src/utils/__tests__/cache.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.test.d.ts","sourceRoot":"","sources":["../../../../src/utils/__tests__/constants.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"display.test.d.ts","sourceRoot":"","sources":["../../../../src/utils/__tests__/display.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export interface TransactionCacheEntry {
|
|
2
|
+
createdAtTimestamp: number;
|
|
3
|
+
lastUsedTimestamp: number;
|
|
4
|
+
transactionId: string;
|
|
5
|
+
}
|
|
6
|
+
export type TransactionCache = Record<string, TransactionCacheEntry>;
|
|
7
|
+
/**
|
|
8
|
+
* Get the path to the cache file in the current working directory
|
|
9
|
+
*/
|
|
10
|
+
export declare function getCachePath(): string;
|
|
11
|
+
/**
|
|
12
|
+
* Load the transaction cache from disk
|
|
13
|
+
* Returns an empty object if the cache file doesn't exist or is invalid
|
|
14
|
+
*/
|
|
15
|
+
export declare function loadCache(): TransactionCache;
|
|
16
|
+
/**
|
|
17
|
+
* Save the transaction cache to disk
|
|
18
|
+
* Creates the cache directory if it doesn't exist
|
|
19
|
+
*/
|
|
20
|
+
export declare function saveCache(cache: TransactionCache): void;
|
|
21
|
+
/**
|
|
22
|
+
* Compute the SHA-256 hash of a file using streaming
|
|
23
|
+
*/
|
|
24
|
+
export declare function hashFile(filePath: string): Promise<string>;
|
|
25
|
+
/**
|
|
26
|
+
* Recursively get all files in a directory
|
|
27
|
+
* Returns relative paths from the base directory
|
|
28
|
+
*/
|
|
29
|
+
export declare function getAllFiles(dirPath: string, basePath?: string): string[];
|
|
30
|
+
/**
|
|
31
|
+
* Get a cached transaction entry by its file hash
|
|
32
|
+
*/
|
|
33
|
+
export declare function getCachedTransaction(cache: TransactionCache, hash: string): TransactionCacheEntry | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Add or update a cache entry for a file hash
|
|
36
|
+
* Updates lastUsedTimestamp if the entry already exists
|
|
37
|
+
*/
|
|
38
|
+
export declare function setCachedTransaction(cache: TransactionCache, hash: string, transactionId: string): TransactionCache;
|
|
39
|
+
/**
|
|
40
|
+
* Update the lastUsedTimestamp for an existing cache entry
|
|
41
|
+
*/
|
|
42
|
+
export declare function touchCacheEntry(cache: TransactionCache, hash: string): TransactionCache;
|
|
43
|
+
/**
|
|
44
|
+
* Clean up the cache by keeping only the most recently used entries
|
|
45
|
+
* Entries are sorted by lastUsedTimestamp descending, keeping the newest maxEntries
|
|
46
|
+
*/
|
|
47
|
+
export declare function cleanupCache(cache: TransactionCache, maxEntries: number): TransactionCache;
|
|
48
|
+
//# sourceMappingURL=cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/utils/cache.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,qBAAqB;IACpC,kBAAkB,EAAE,MAAM,CAAA;IAC1B,iBAAiB,EAAE,MAAM,CAAA;IACzB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAA;AAEpE;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,gBAAgB,CAc5C;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,CASvD;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAShE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAgB,GAAG,MAAM,EAAE,CAgBjF;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,gBAAgB,EACvB,IAAI,EAAE,MAAM,GACX,qBAAqB,GAAG,SAAS,CAEnC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,gBAAgB,EACvB,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,GACpB,gBAAgB,CAYlB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,GAAG,gBAAgB,CAavF;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,GAAG,gBAAgB,CAc1F"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const colorCodes: readonly [readonly ["bold", "\u001B[1m"], readonly ["dim", "\u001B[2m"], readonly ["italic", "\u001B[3m"], readonly ["underline", "\u001B[4m"], readonly ["inverse", "\u001B[7m"], readonly ["strikethrough", "\u001B[9m"], readonly ["black", "\u001B[30m"], readonly ["red", "\u001B[31m"], readonly ["green", "\u001B[32m"], readonly ["yellow", "\u001B[33m"], readonly ["blue", "\u001B[34m"], readonly ["magenta", "\u001B[35m"], readonly ["cyan", "\u001B[36m"], readonly ["white", "\u001B[37m"], readonly ["gray", "\u001B[90m"], readonly ["grey", "\u001B[90m"], readonly ["blackBright", "\u001B[90m"], readonly ["redBright", "\u001B[91m"], readonly ["greenBright", "\u001B[92m"], readonly ["yellowBright", "\u001B[93m"], readonly ["blueBright", "\u001B[94m"], readonly ["magentaBright", "\u001B[95m"], readonly ["cyanBright", "\u001B[96m"], readonly ["whiteBright", "\u001B[97m"], readonly ["bgBlack", "\u001B[40m"], readonly ["bgRed", "\u001B[41m"], readonly ["bgGreen", "\u001B[42m"], readonly ["bgYellow", "\u001B[43m"], readonly ["bgBlue", "\u001B[44m"], readonly ["bgMagenta", "\u001B[45m"], readonly ["bgCyan", "\u001B[46m"], readonly ["bgWhite", "\u001B[47m"], readonly ["bgBlackBright", "\u001B[100m"]];
|
|
2
|
+
type ColorName = (typeof colorCodes)[number][0];
|
|
3
|
+
type ColorFunction = (text: unknown) => string;
|
|
4
|
+
type Chalk = {
|
|
5
|
+
highlight: ColorFunction;
|
|
6
|
+
} & Record<ColorName, ColorFunction>;
|
|
7
|
+
export declare const chalk: Chalk;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=chalk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chalk.d.ts","sourceRoot":"","sources":["../../../src/utils/chalk.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,UAAU,urCAqCN,CAAA;AAEV,KAAK,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;AAC/C,KAAK,aAAa,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,MAAM,CAAA;AAC9C,KAAK,KAAK,GAAG;IACX,SAAS,EAAE,aAAa,CAAA;CACzB,GAAG,MAAM,CAAC,SAAS,EAAE,aAAa,CAAC,CAAA;AAapC,eAAO,MAAM,KAAK,EAAE,KAElB,CAAA"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for a single flag with its associated prompt
|
|
3
|
+
*/
|
|
4
|
+
export type FlagConfig<T = any, F = any> = {
|
|
5
|
+
/** The oclif flag definition */
|
|
6
|
+
flag: F;
|
|
7
|
+
/** Optional prompt function to get the value interactively */
|
|
8
|
+
prompt?: () => Promise<T>;
|
|
9
|
+
/** Transform function to apply to the resolved value */
|
|
10
|
+
transform?: (value: T) => T;
|
|
11
|
+
/** Whether this flag triggers interactive mode when missing */
|
|
12
|
+
triggersInteractive?: boolean;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Map of flag configurations
|
|
16
|
+
*/
|
|
17
|
+
export type FlagConfigMap = Record<string, FlagConfig<any, any>>;
|
|
18
|
+
/**
|
|
19
|
+
* Extract the resolved config type from a FlagConfigMap
|
|
20
|
+
* Infers the actual type (string, number, boolean) and optionality from each FlagConfig
|
|
21
|
+
*/
|
|
22
|
+
export type ResolvedConfig<T extends FlagConfigMap> = {
|
|
23
|
+
[K in keyof T]: T[K] extends FlagConfig<infer U, any> ? U : any;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Options for resolveConfig
|
|
27
|
+
*/
|
|
28
|
+
export interface ResolveConfigOptions {
|
|
29
|
+
/** Whether to run in interactive mode */
|
|
30
|
+
interactive?: boolean;
|
|
31
|
+
/** Custom logic to determine if interactive mode should be enabled */
|
|
32
|
+
shouldBeInteractive?: (parsedFlags: Record<string, any>) => boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Resolves configuration by combining parsed CLI flags with interactive prompts
|
|
36
|
+
*
|
|
37
|
+
* @param flagConfigs - Map of flag names to their configurations
|
|
38
|
+
* @param parsedFlags - Parsed flags from this.parse()
|
|
39
|
+
* @param options - Resolution options
|
|
40
|
+
* @returns Fully resolved configuration object
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const config = await resolveConfig(
|
|
45
|
+
* {
|
|
46
|
+
* arnsName: {
|
|
47
|
+
* flag: globalFlags.arnsName,
|
|
48
|
+
* prompt: promptArnsName,
|
|
49
|
+
* triggersInteractive: true,
|
|
50
|
+
* },
|
|
51
|
+
* wallet: {
|
|
52
|
+
* flag: globalFlags.wallet,
|
|
53
|
+
* prompt: async () => (await getWalletConfig()).wallet,
|
|
54
|
+
* },
|
|
55
|
+
* },
|
|
56
|
+
* flags,
|
|
57
|
+
* {
|
|
58
|
+
* shouldBeInteractive: (flags) => !flags['arns-name'],
|
|
59
|
+
* }
|
|
60
|
+
* )
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
export declare function resolveConfig<T extends FlagConfigMap>(flagConfigs: T, parsedFlags: Record<string, any>, options?: ResolveConfigOptions): Promise<ResolvedConfig<T>>;
|
|
64
|
+
/**
|
|
65
|
+
* Helper to create a flag configuration with proper type inference
|
|
66
|
+
*/
|
|
67
|
+
export declare function createFlagConfig<T, F = any>(config: FlagConfig<T, F>): FlagConfig<T, F>;
|
|
68
|
+
/**
|
|
69
|
+
* Helper to extract just the flags from a FlagConfigMap for use in command static flags
|
|
70
|
+
*/
|
|
71
|
+
export declare function extractFlags<T extends FlagConfigMap>(flagConfigs: T): Record<string, any>;
|
|
72
|
+
//# sourceMappingURL=config-resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-resolver.d.ts","sourceRoot":"","sources":["../../../src/utils/config-resolver.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,IAAI;IACzC,gCAAgC;IAChC,IAAI,EAAE,CAAC,CAAA;IACP,8DAA8D;IAC9D,MAAM,CAAC,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,CAAA;IACzB,wDAAwD;IACxD,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAA;IAC3B,+DAA+D;IAC/D,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;AAEhE;;;GAGG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,aAAa,IAAI;KACnD,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,UAAU,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG;CAChE,CAAA;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,yCAAyC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,sEAAsE;IACtE,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAA;CACpE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,aAAa,CAAC,CAAC,SAAS,aAAa,EACzD,WAAW,EAAE,CAAC,EACd,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAChC,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAqC5B;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAEvF;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,aAAa,EAAE,WAAW,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAOzF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,QAAgB,CAAA;AAEhD,eAAO,MAAM,OAAO,KAAK,CAAA;AACzB,eAAO,MAAM,OAAO,QAAS,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Encode the contents of a wallet file into the deploy-key string used
|
|
3
|
+
* throughout the CLI, based on the signer type:
|
|
4
|
+
* - arweave: base64-encoded JWK JSON
|
|
5
|
+
* - solana: base58 secret key derived from a solana-keygen id.json byte array
|
|
6
|
+
* - ethereum/polygon/kyve: trimmed hex private key
|
|
7
|
+
*/
|
|
8
|
+
export declare function deployKeyFromWalletFile(sigType: string, content: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Encode a private-key string into the deploy-key string used throughout the
|
|
11
|
+
* CLI, based on the signer type (see {@link deployKeyFromWalletFile}). For
|
|
12
|
+
* Solana this is a base58-encoded secret key.
|
|
13
|
+
*/
|
|
14
|
+
export declare function deployKeyFromPrivateKey(sigType: string, privateKey: string): string;
|
|
15
|
+
//# sourceMappingURL=deploy-key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-key.d.ts","sourceRoot":"","sources":["../../../src/utils/deploy-key.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAUhF;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAUnF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { UploadCost, UploadSize } from './upload-types.js';
|
|
2
|
+
export type DisplayRow = [label: string, value: string];
|
|
3
|
+
export declare function formatUploadSize(size: UploadSize): string;
|
|
4
|
+
export declare function formatUploadCost(cost: UploadCost): string;
|
|
5
|
+
export declare function formatDisplayRows(rows: DisplayRow[]): string;
|
|
6
|
+
export declare function formatUploadError(message: string, title?: string): string;
|
|
7
|
+
//# sourceMappingURL=display.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../../src/utils/display.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE/D,MAAM,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;AAEvD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAEzD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAEzD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,MAAM,CAE5D;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,SAAkB,GAAG,MAAM,CAyBlF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../../src/utils/path.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAUnD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ArweaveSigner, EthereumSigner, HexSolanaSigner } from '@ardrive/turbo-sdk';
|
|
2
|
+
import type { SignerType } from '../types/index.js';
|
|
3
|
+
export declare function createSigner(sigType: SignerType, deployKey: string): {
|
|
4
|
+
signer: EthereumSigner;
|
|
5
|
+
token: "ethereum";
|
|
6
|
+
} | {
|
|
7
|
+
signer: EthereumSigner;
|
|
8
|
+
token: "pol";
|
|
9
|
+
} | {
|
|
10
|
+
signer: ArweaveSigner;
|
|
11
|
+
token: "arweave";
|
|
12
|
+
} | {
|
|
13
|
+
signer: EthereumSigner;
|
|
14
|
+
token: "kyve";
|
|
15
|
+
} | {
|
|
16
|
+
signer: HexSolanaSigner;
|
|
17
|
+
token: "solana";
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=signer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../../src/utils/signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEnF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD,wBAAgB,YAAY,CAAC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;EA4ClE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type Address, type KeyPairSigner } from '@solana/kit';
|
|
2
|
+
type ClusterProgramIds = Partial<Record<'antProgramId' | 'arnsProgramId' | 'coreProgramId' | 'garProgramId', Address>>;
|
|
3
|
+
export type SolanaCluster = 'devnet' | 'mainnet';
|
|
4
|
+
/**
|
|
5
|
+
* Normalize a Solana private key provided as a string. We accept a base58
|
|
6
|
+
* encoded 64-byte secret key (the format wallets like Phantom export), which is
|
|
7
|
+
* exactly what arbundles' HexSolanaSigner expects, so we just trim it.
|
|
8
|
+
*/
|
|
9
|
+
export declare function solanaDeployKeyFromString(input: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Convert a `solana-keygen` JSON wallet (a JSON array of 64 bytes, e.g.
|
|
12
|
+
* ~/.config/solana/id.json) into the base58 secret-key string used as the
|
|
13
|
+
* deploy key throughout the CLI.
|
|
14
|
+
*/
|
|
15
|
+
export declare function solanaDeployKeyFromFile(content: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Build a Solana `TransactionSigner` from the base58 deploy key, used to sign
|
|
18
|
+
* ArNS/ANT program transactions.
|
|
19
|
+
*/
|
|
20
|
+
export declare function createSolanaArnsSigner(deployKey: string): Promise<KeyPairSigner>;
|
|
21
|
+
export declare function createArioRpc(cluster: SolanaCluster, rpcUrl?: string): import("@solana/kit").Rpc<import("@solana/kit").RequestAirdropApi & import("@solana/kit").GetAccountInfoApi & import("@solana/kit").GetBalanceApi & import("@solana/kit").GetBlockApi & import("@solana/kit").GetBlockCommitmentApi & import("@solana/kit").GetBlockHeightApi & import("@solana/kit").GetBlockProductionApi & import("@solana/kit").GetBlocksApi & import("@solana/kit").GetBlocksWithLimitApi & import("@solana/kit").GetBlockTimeApi & import("@solana/kit").GetClusterNodesApi & import("@solana/kit").GetEpochInfoApi & import("@solana/kit").GetEpochScheduleApi & import("@solana/kit").GetFeeForMessageApi & import("@solana/kit").GetFirstAvailableBlockApi & import("@solana/kit").GetGenesisHashApi & import("@solana/kit").GetHealthApi & import("@solana/kit").GetHighestSnapshotSlotApi & import("@solana/kit").GetIdentityApi & import("@solana/kit").GetInflationGovernorApi & import("@solana/kit").GetInflationRateApi & import("@solana/kit").GetInflationRewardApi & import("@solana/kit").GetLargestAccountsApi & import("@solana/kit").GetLatestBlockhashApi & import("@solana/kit").GetLeaderScheduleApi & import("@solana/kit").GetMaxRetransmitSlotApi & import("@solana/kit").GetMaxShredInsertSlotApi & import("@solana/kit").GetMinimumBalanceForRentExemptionApi & import("@solana/kit").GetMultipleAccountsApi & import("@solana/kit").GetProgramAccountsApi & import("@solana/kit").GetRecentPerformanceSamplesApi & import("@solana/kit").GetRecentPrioritizationFeesApi & import("@solana/kit").GetSignaturesForAddressApi & import("@solana/kit").GetSignatureStatusesApi & import("@solana/kit").GetSlotApi & import("@solana/kit").GetSlotLeaderApi & import("@solana/kit").GetSlotLeadersApi & import("@solana/kit").GetStakeMinimumDelegationApi & import("@solana/kit").GetSupplyApi & import("@solana/kit").GetTokenAccountBalanceApi & import("@solana/kit").GetTokenAccountsByDelegateApi & import("@solana/kit").GetTokenAccountsByOwnerApi & import("@solana/kit").GetTokenLargestAccountsApi & import("@solana/kit").GetTokenSupplyApi & import("@solana/kit").GetTransactionApi & import("@solana/kit").GetTransactionCountApi & import("@solana/kit").GetVersionApi & import("@solana/kit").GetVoteAccountsApi & import("@solana/kit").IsBlockhashValidApi & import("@solana/kit").MinimumLedgerSlotApi & import("@solana/kit").SendTransactionApi & import("@solana/kit").SimulateTransactionApi>;
|
|
22
|
+
export declare function createArioRpcSubscriptions(cluster: SolanaCluster, rpcUrl?: string): import("@solana/kit").RpcSubscriptions<import("@solana/kit").SolanaRpcSubscriptionsApi>;
|
|
23
|
+
/**
|
|
24
|
+
* Program-id overrides to pass to `ARIO.init` / `SolanaANTWriteable`. Mainnet
|
|
25
|
+
* uses the SDK defaults (empty object); devnet must pass explicit ids.
|
|
26
|
+
*/
|
|
27
|
+
export declare function clusterProgramIds(cluster: SolanaCluster): ClusterProgramIds;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=solana.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../../src/utils/solana.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,OAAO,EAIZ,KAAK,aAAa,EACnB,MAAM,aAAa,CAAA;AAGpB,KAAK,iBAAiB,GAAG,OAAO,CAC9B,MAAM,CAAC,cAAc,GAAG,eAAe,GAAG,eAAe,GAAG,cAAc,EAAE,OAAO,CAAC,CACrF,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAA;AAEhD;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAe/D;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAEhF;AAcD,wBAAgB,aAAa,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,MAAM,o0EAEpE;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,MAAM,2FAEjF;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,aAAa,GAAG,iBAAiB,CAW3E"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared upload client/result types used by the Turbo upload path.
|
|
3
|
+
*
|
|
4
|
+
* These describe the minimal surface the uploader and workflow rely on,
|
|
5
|
+
* independent of any specific bundler implementation.
|
|
6
|
+
*/
|
|
7
|
+
export interface UploadFileArgs {
|
|
8
|
+
dataItemOpts?: {
|
|
9
|
+
tags?: Array<{
|
|
10
|
+
name: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
file?: string | Buffer;
|
|
15
|
+
fileSizeFactory?: () => number;
|
|
16
|
+
fileStreamFactory?: () => unknown;
|
|
17
|
+
fundingMode?: unknown;
|
|
18
|
+
}
|
|
19
|
+
export interface UploadClient {
|
|
20
|
+
uploadFile: (args: UploadFileArgs) => Promise<UploadClientResult>;
|
|
21
|
+
}
|
|
22
|
+
export interface UploadClientResult {
|
|
23
|
+
cost?: UploadCost;
|
|
24
|
+
id?: string;
|
|
25
|
+
size?: UploadSize;
|
|
26
|
+
}
|
|
27
|
+
export interface UploadCost {
|
|
28
|
+
amount: bigint;
|
|
29
|
+
token: string;
|
|
30
|
+
}
|
|
31
|
+
export interface UploadSize {
|
|
32
|
+
payloadBytes: number;
|
|
33
|
+
signedBytes?: number;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=upload-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-types.d.ts","sourceRoot":"","sources":["../../../src/utils/upload-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,cAAc;IAC7B,YAAY,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAA;IAChE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,eAAe,CAAC,EAAE,MAAM,MAAM,CAAA;IAC9B,iBAAiB,CAAC,EAAE,MAAM,OAAO,CAAA;IACjC,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAA;CAClE;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,UAAU,CAAA;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,UAAU;IACzB,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { OnDemandFunding } from '@ardrive/turbo-sdk';
|
|
2
|
+
import { type TransactionCache } from './cache.js';
|
|
3
|
+
import type { UploadClient, UploadCost, UploadSize } from './upload-types.js';
|
|
4
|
+
type DataItemTag = {
|
|
5
|
+
name: string;
|
|
6
|
+
value: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Provenance tags stamped on every uploaded data item. In CI (GitHub Actions)
|
|
10
|
+
* the deploying commit SHA is attached as a GIT-HASH tag; locally, where
|
|
11
|
+
* GITHUB_SHA is unset, it is omitted.
|
|
12
|
+
*/
|
|
13
|
+
export declare function provenanceTags(): DataItemTag[];
|
|
14
|
+
export interface UploadResult {
|
|
15
|
+
cacheHit: boolean;
|
|
16
|
+
cost?: UploadCost;
|
|
17
|
+
size?: UploadSize;
|
|
18
|
+
transactionId: string;
|
|
19
|
+
updatedCache?: TransactionCache;
|
|
20
|
+
}
|
|
21
|
+
export interface FolderUploadResult extends UploadResult {
|
|
22
|
+
/** Number of files that were cache hits (not re-uploaded) */
|
|
23
|
+
cacheHits: number;
|
|
24
|
+
/** Total number of files in the folder */
|
|
25
|
+
totalFiles: number;
|
|
26
|
+
/** Number of files that were uploaded */
|
|
27
|
+
uploaded: number;
|
|
28
|
+
}
|
|
29
|
+
export declare function uploadFile(turbo: UploadClient, filePath: string, options?: {
|
|
30
|
+
cache?: TransactionCache;
|
|
31
|
+
fundingMode?: OnDemandFunding;
|
|
32
|
+
}): Promise<UploadResult>;
|
|
33
|
+
/**
|
|
34
|
+
* Upload a folder with per-file deduplication.
|
|
35
|
+
* Each file is checked against the cache individually, and only uncached files are uploaded.
|
|
36
|
+
* A manifest is then constructed and uploaded to create the folder structure.
|
|
37
|
+
*
|
|
38
|
+
* @param turbo - Upload client used for file and manifest uploads.
|
|
39
|
+
* @param folderPath - Folder to upload.
|
|
40
|
+
* @param options - Upload options for caching, concurrency, funding, and failure handling.
|
|
41
|
+
* @returns Folder upload result including manifest transaction ID and cache stats.
|
|
42
|
+
*/
|
|
43
|
+
export declare function uploadFolder(turbo: UploadClient, folderPath: string, options?: {
|
|
44
|
+
cache?: TransactionCache;
|
|
45
|
+
concurrency?: number;
|
|
46
|
+
fundingMode?: OnDemandFunding;
|
|
47
|
+
throwOnFailure?: boolean;
|
|
48
|
+
}): Promise<FolderUploadResult>;
|
|
49
|
+
export {};
|
|
50
|
+
//# sourceMappingURL=uploader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uploader.d.ts","sourceRoot":"","sources":["../../../src/utils/uploader.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAIpD,OAAO,EAML,KAAK,gBAAgB,EACtB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE7E,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAElD;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,WAAW,EAAE,CAO9C;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,gBAAgB,CAAA;CAChC;AAED,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,6DAA6D;IAC7D,SAAS,EAAE,MAAM,CAAA;IACjB,0CAA0C;IAC1C,UAAU,EAAE,MAAM,CAAA;IAClB,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,wBAAsB,UAAU,CAC9B,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;IACR,KAAK,CAAC,EAAE,gBAAgB,CAAA;IACxB,WAAW,CAAC,EAAE,eAAe,CAAA;CAC9B,GACA,OAAO,CAAC,YAAY,CAAC,CA4DvB;AAYD;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAChC,KAAK,EAAE,YAAY,EACnB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE;IACR,KAAK,CAAC,EAAE,gBAAgB,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,eAAe,CAAA;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,GACA,OAAO,CAAC,kBAAkB,CAAC,CAiJ7B"}
|