@silvana-one/coordination 1.0.24 → 1.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/node/agent.d.ts +43 -15
  2. package/dist/node/agent.js +129 -31
  3. package/dist/node/agent.js.map +1 -1
  4. package/dist/node/app_instance.d.ts +58 -0
  5. package/dist/node/app_instance.js +203 -0
  6. package/dist/node/app_instance.js.map +1 -0
  7. package/dist/node/build.d.ts +5 -0
  8. package/dist/node/build.js +21 -0
  9. package/dist/node/build.js.map +1 -0
  10. package/dist/node/execute.d.ts +1 -0
  11. package/dist/node/execute.js +10 -2
  12. package/dist/node/execute.js.map +1 -1
  13. package/dist/node/faucet.d.ts +34 -0
  14. package/dist/node/faucet.js +91 -0
  15. package/dist/node/faucet.js.map +1 -0
  16. package/dist/node/index.cjs +1087 -31
  17. package/dist/node/index.d.ts +9 -0
  18. package/dist/node/index.js +9 -0
  19. package/dist/node/index.js.map +1 -1
  20. package/dist/node/ipfs.d.ts +13 -0
  21. package/dist/node/ipfs.js +88 -0
  22. package/dist/node/ipfs.js.map +1 -0
  23. package/dist/node/job.d.ts +57 -0
  24. package/dist/node/job.js +168 -0
  25. package/dist/node/job.js.map +1 -0
  26. package/dist/node/package.d.ts +1 -0
  27. package/dist/node/package.js +6 -0
  28. package/dist/node/package.js.map +1 -0
  29. package/dist/node/public-key.d.ts +24 -0
  30. package/dist/node/public-key.js +44 -0
  31. package/dist/node/public-key.js.map +1 -0
  32. package/dist/node/publish.js.map +1 -1
  33. package/dist/node/test.d.ts +48 -0
  34. package/dist/node/test.js +278 -0
  35. package/dist/node/test.js.map +1 -0
  36. package/dist/node/upgrade.js +1 -12
  37. package/dist/node/upgrade.js.map +1 -1
  38. package/dist/node/walrus.d.ts +12 -0
  39. package/dist/node/walrus.js +73 -0
  40. package/dist/node/walrus.js.map +1 -0
  41. package/dist/tsconfig.tsbuildinfo +1 -1
  42. package/dist/tsconfig.web.tsbuildinfo +1 -1
  43. package/dist/web/agent.d.ts +43 -15
  44. package/dist/web/agent.js +129 -31
  45. package/dist/web/agent.js.map +1 -1
  46. package/dist/web/app_instance.d.ts +58 -0
  47. package/dist/web/app_instance.js +203 -0
  48. package/dist/web/app_instance.js.map +1 -0
  49. package/dist/web/build.d.ts +5 -0
  50. package/dist/web/build.js +21 -0
  51. package/dist/web/build.js.map +1 -0
  52. package/dist/web/execute.d.ts +1 -0
  53. package/dist/web/execute.js +10 -2
  54. package/dist/web/execute.js.map +1 -1
  55. package/dist/web/faucet.d.ts +34 -0
  56. package/dist/web/faucet.js +91 -0
  57. package/dist/web/faucet.js.map +1 -0
  58. package/dist/web/index.d.ts +9 -0
  59. package/dist/web/index.js +9 -0
  60. package/dist/web/index.js.map +1 -1
  61. package/dist/web/ipfs.d.ts +13 -0
  62. package/dist/web/ipfs.js +88 -0
  63. package/dist/web/ipfs.js.map +1 -0
  64. package/dist/web/job.d.ts +57 -0
  65. package/dist/web/job.js +168 -0
  66. package/dist/web/job.js.map +1 -0
  67. package/dist/web/package.d.ts +1 -0
  68. package/dist/web/package.js +6 -0
  69. package/dist/web/package.js.map +1 -0
  70. package/dist/web/public-key.d.ts +24 -0
  71. package/dist/web/public-key.js +44 -0
  72. package/dist/web/public-key.js.map +1 -0
  73. package/dist/web/publish.js.map +1 -1
  74. package/dist/web/test.d.ts +48 -0
  75. package/dist/web/test.js +278 -0
  76. package/dist/web/test.js.map +1 -0
  77. package/dist/web/upgrade.js +1 -12
  78. package/dist/web/upgrade.js.map +1 -1
  79. package/dist/web/walrus.d.ts +12 -0
  80. package/dist/web/walrus.js +73 -0
  81. package/dist/web/walrus.js.map +1 -0
  82. package/package.json +7 -4
  83. package/src/agent.ts +204 -56
  84. package/src/app_instance.ts +264 -0
  85. package/src/build.ts +33 -0
  86. package/src/execute.ts +11 -2
  87. package/src/faucet.ts +145 -0
  88. package/src/index.ts +9 -0
  89. package/src/ipfs.ts +105 -0
  90. package/src/job.ts +223 -0
  91. package/src/package.ts +6 -0
  92. package/src/public-key.ts +66 -0
  93. package/src/publish.ts +0 -2
  94. package/src/test.ts +383 -0
  95. package/src/upgrade.ts +1 -18
  96. package/src/walrus.ts +96 -0
package/src/faucet.ts ADDED
@@ -0,0 +1,145 @@
1
+ "use server";
2
+
3
+ import { Ed25519Keypair } from "@mysten/sui/keypairs/ed25519";
4
+
5
+ export async function silvanaFaucet(params: {
6
+ address: string;
7
+ amount?: number;
8
+ }): Promise<{
9
+ message: string;
10
+ success: true;
11
+ transaction_hash: string;
12
+ }> {
13
+ const { address, amount = 1 } = params;
14
+ const response = await fetch(`${silvanaFaucetEndpoint()}/fund`, {
15
+ method: "POST",
16
+ headers: {
17
+ "Content-Type": "application/json",
18
+ },
19
+ body: JSON.stringify({
20
+ address,
21
+ amount,
22
+ }),
23
+ });
24
+
25
+ if (!response.ok) {
26
+ throw new Error(
27
+ `Failed to fund address: ${address} ${amount} ${response.status} ${response.statusText}`
28
+ );
29
+ }
30
+
31
+ return response.json();
32
+ }
33
+
34
+ export async function silvanaFaucetGetKey(
35
+ params: {
36
+ autoReturn: boolean;
37
+ } = {
38
+ autoReturn: false,
39
+ }
40
+ ): Promise<{
41
+ key_pair: {
42
+ address: string;
43
+ issued_at: string;
44
+ private_key_bech32: string;
45
+ private_key_hex: string;
46
+ public_key: string;
47
+ };
48
+ message: string;
49
+ success: true;
50
+ }> {
51
+ const response = await fetch(`${silvanaFaucetEndpoint()}/get_key`, {
52
+ method: "POST",
53
+ headers: {
54
+ "Content-Type": "application/json",
55
+ },
56
+ body: JSON.stringify({
57
+ auto_return: params.autoReturn,
58
+ }),
59
+ });
60
+
61
+ if (!response.ok) {
62
+ throw new Error(
63
+ `Failed to get key: ${response.status} ${response.statusText}`
64
+ );
65
+ }
66
+
67
+ return response.json();
68
+ }
69
+
70
+ export async function silvanaFaucetPingKey(params: {
71
+ address: string;
72
+ }): Promise<{
73
+ message: string;
74
+ success: boolean;
75
+ }> {
76
+ const { address } = params;
77
+ if (!address) {
78
+ return {
79
+ message: "Address is required",
80
+ success: false,
81
+ };
82
+ }
83
+ const response = await fetch(`${silvanaFaucetEndpoint()}/ping_key`, {
84
+ method: "POST",
85
+ headers: {
86
+ "Content-Type": "application/json",
87
+ },
88
+ body: JSON.stringify({
89
+ address,
90
+ }),
91
+ });
92
+
93
+ if (!response.ok) {
94
+ throw new Error(
95
+ `Failed to return key: ${response.status} ${response.statusText}`
96
+ );
97
+ }
98
+
99
+ return response.json();
100
+ }
101
+
102
+ export async function silvanaFaucetReturnKey(params: {
103
+ address?: string;
104
+ secretKey?: string;
105
+ }): Promise<{
106
+ message: string;
107
+ success: boolean;
108
+ }> {
109
+ const address =
110
+ params.address ??
111
+ (params.secretKey
112
+ ? Ed25519Keypair.fromSecretKey(params.secretKey).toSuiAddress()
113
+ : undefined);
114
+ if (!address) {
115
+ return {
116
+ message: "Address or secret key is required",
117
+ success: false,
118
+ };
119
+ }
120
+ const response = await fetch(`${silvanaFaucetEndpoint()}/return_key`, {
121
+ method: "POST",
122
+ headers: {
123
+ "Content-Type": "application/json",
124
+ },
125
+ body: JSON.stringify({
126
+ address,
127
+ }),
128
+ });
129
+
130
+ if (!response.ok) {
131
+ throw new Error(
132
+ `Failed to return key: ${response.status} ${response.statusText}`
133
+ );
134
+ }
135
+
136
+ return response.json();
137
+ }
138
+
139
+ function silvanaFaucetEndpoint(): string {
140
+ const silvanaFaucetEndpoint = process.env.SILVANA_FAUCET_ENDPOINT!;
141
+ if (!silvanaFaucetEndpoint) {
142
+ throw new Error("SILVANA_FAUCET_ENDPOINT is not set");
143
+ }
144
+ return silvanaFaucetEndpoint;
145
+ }
package/src/index.ts CHANGED
@@ -7,3 +7,12 @@ export * from "./upgrade.js";
7
7
  export * from "./mvr.js";
8
8
  export * from "./agent.js";
9
9
  export * from "./fetch.js";
10
+ export * from "./build.js";
11
+ export * from "./walrus.js";
12
+ export * from "./faucet.js";
13
+ export * from "./ipfs.js";
14
+ export * from "./public-key.js";
15
+ export * from "./job.js";
16
+ export * from "./app_instance.js";
17
+ export * from "./package.js";
18
+ export * from "./test.js";
package/src/ipfs.ts ADDED
@@ -0,0 +1,105 @@
1
+ import { PinataSDK } from "pinata";
2
+
3
+ // IPFS
4
+ const pinataJwt = process.env.PINATA_JWT;
5
+ const pinataGateway = process.env.PINATA_GATEWAY_URL;
6
+ const pinataGatewayKey = process.env.PINATA_GATEWAY_API_KEY;
7
+
8
+ const pinata = new PinataSDK({
9
+ pinataJwt,
10
+ pinataGateway,
11
+ pinataGatewayKey,
12
+ });
13
+
14
+ export async function saveToIPFS(params: {
15
+ data: string;
16
+ filename?: string;
17
+ owner?: string;
18
+ days?: number;
19
+ description?: string;
20
+ }): Promise<string | undefined> {
21
+ try {
22
+ if (!pinataJwt || !pinataGateway || !pinataGatewayKey) {
23
+ throw new Error(
24
+ "PINATA_JWT, PINATA_GATEWAY_URL, or PINATA_GATEWAY_API_KEY is not set"
25
+ );
26
+ }
27
+ const { data, filename, owner, days, description } = params;
28
+ if (data === undefined || data === null) throw new Error("data is not set");
29
+ if (typeof data !== "string") throw new Error("data is not a string");
30
+ if (data.length === 0) throw new Error("data is empty");
31
+
32
+ const file = new File([data], filename ?? "da", {
33
+ type: "text/plain",
34
+ });
35
+ const expiry = days ? Date.now() + days * 24 * 60 * 60 * 1000 : undefined;
36
+ const keyvalues = {
37
+ app: "dex:devnet",
38
+ owner: owner ?? "",
39
+ expires: expiry ? new Date(expiry).toISOString() : "never",
40
+ expiry: expiry ? expiry.toString() : "0",
41
+ description: description ?? "",
42
+ type: "text/plain",
43
+ mime_type: "text/plain",
44
+ };
45
+
46
+ const upload = await pinata.upload.public
47
+ .file(file, {
48
+ metadata: {
49
+ name: filename ?? "da",
50
+ keyvalues,
51
+ },
52
+ })
53
+ .name(filename ?? "da");
54
+
55
+ console.log("IPFS: ", upload.cid);
56
+ return upload.cid;
57
+ } catch (error: any) {
58
+ console.error("Save to IPFS failed", error.message);
59
+ return undefined;
60
+ }
61
+ }
62
+
63
+ export async function readFromIPFS(params: {
64
+ blobId: string;
65
+ }): Promise<string | undefined> {
66
+ const { blobId } = params;
67
+ if (!blobId) {
68
+ throw new Error("blobId is not set");
69
+ }
70
+ try {
71
+ if (!pinataJwt || !pinataGateway || !pinataGatewayKey) {
72
+ throw new Error(
73
+ "PINATA_JWT, PINATA_GATEWAY_URL, or PINATA_GATEWAY_API_KEY is not set"
74
+ );
75
+ }
76
+ const url = await getIPFSUrl({ blobId });
77
+ const response = await fetch(url);
78
+ if (!response.ok) {
79
+ throw new Error("Failed to fetch from IPFS");
80
+ }
81
+ const data = await response.text();
82
+ return data;
83
+ } catch (error: any) {
84
+ console.error("Read from IPFS failed", error);
85
+ return undefined;
86
+ }
87
+ }
88
+
89
+ export async function getIPFSUrl(params: { blobId: string }): Promise<string> {
90
+ const { blobId } = params;
91
+ if (!blobId) {
92
+ throw new Error("blobId is not set");
93
+ }
94
+ const gateway =
95
+ process.env.PINATA_GATEWAY_URL ?? "https://gateway.pinata.cloud/ipfs/";
96
+ const apiToken = process.env.PINATA_GATEWAY_API_KEY;
97
+
98
+ const url =
99
+ "https://" +
100
+ gateway +
101
+ "/ipfs/" +
102
+ blobId +
103
+ (apiToken ? "?pinataGatewayToken=" + apiToken : "");
104
+ return url;
105
+ }
package/src/job.ts ADDED
@@ -0,0 +1,223 @@
1
+ import { Transaction } from "@mysten/sui/transactions";
2
+ import { SUI_CLOCK_OBJECT_ID } from "@mysten/sui/utils";
3
+ import { silvanaRegistryPackage } from "./package.js";
4
+ import { fetchSuiDynamicField, fetchSuiObject } from "./fetch.js";
5
+
6
+ export type JobStatus =
7
+ | { type: "Pending" }
8
+ | { type: "Running" }
9
+ | { type: "Failed"; error: string };
10
+
11
+ export interface Job {
12
+ id: string;
13
+ jobId: number;
14
+ description?: string;
15
+ developer: string;
16
+ agent: string;
17
+ agentMethod: string;
18
+ app: string;
19
+ appInstance: string;
20
+ appInstanceMethod: string;
21
+ sequences?: number[];
22
+ data: Uint8Array;
23
+ status: JobStatus;
24
+ attempts: number;
25
+ createdAt: number;
26
+ updatedAt: number;
27
+ }
28
+
29
+ export interface CreateJobParams {
30
+ jobs: string; // Jobs object ID
31
+ description?: string;
32
+ developer: string;
33
+ agent: string;
34
+ agentMethod: string;
35
+ app: string;
36
+ appInstance: string;
37
+ appInstanceMethod: string;
38
+ sequences?: number[];
39
+ data: Uint8Array;
40
+ }
41
+
42
+ export class JobManager {
43
+ private readonly jobs: string;
44
+
45
+ constructor(params: { jobs: string }) {
46
+ this.jobs = params.jobs;
47
+ }
48
+
49
+ static createJobs(maxAttempts?: number): Transaction {
50
+ const tx = new Transaction();
51
+ tx.moveCall({
52
+ target: `${silvanaRegistryPackage}::jobs::create_jobs`,
53
+ arguments: [
54
+ tx.pure.option("u8", maxAttempts ?? null),
55
+ ],
56
+ });
57
+ return tx;
58
+ }
59
+
60
+ createJob(params: CreateJobParams): Transaction {
61
+ const {
62
+ description,
63
+ developer,
64
+ agent,
65
+ agentMethod,
66
+ app,
67
+ appInstance,
68
+ appInstanceMethod,
69
+ sequences,
70
+ data,
71
+ } = params;
72
+
73
+ const tx = new Transaction();
74
+ tx.moveCall({
75
+ target: `${silvanaRegistryPackage}::jobs::create_job`,
76
+ arguments: [
77
+ tx.object(this.jobs),
78
+ tx.pure.option("string", description ?? null),
79
+ tx.pure.string(developer),
80
+ tx.pure.string(agent),
81
+ tx.pure.string(agentMethod),
82
+ tx.pure.string(app),
83
+ tx.pure.string(appInstance),
84
+ tx.pure.string(appInstanceMethod),
85
+ tx.pure.option("vector<u64>", sequences ?? null),
86
+ tx.pure.vector("u8", Array.from(data)),
87
+ tx.object(SUI_CLOCK_OBJECT_ID),
88
+ ],
89
+ });
90
+ return tx;
91
+ }
92
+
93
+ startJob(jobId: number): Transaction {
94
+ const tx = new Transaction();
95
+ tx.moveCall({
96
+ target: `${silvanaRegistryPackage}::jobs::start_job`,
97
+ arguments: [
98
+ tx.object(this.jobs),
99
+ tx.pure.u64(jobId),
100
+ tx.object(SUI_CLOCK_OBJECT_ID),
101
+ ],
102
+ });
103
+ return tx;
104
+ }
105
+
106
+ completeJob(jobId: number): Transaction {
107
+ const tx = new Transaction();
108
+ tx.moveCall({
109
+ target: `${silvanaRegistryPackage}::jobs::complete_job`,
110
+ arguments: [
111
+ tx.object(this.jobs),
112
+ tx.pure.u64(jobId),
113
+ ],
114
+ });
115
+ return tx;
116
+ }
117
+
118
+ failJob(params: { jobId: number; error: string }): Transaction {
119
+ const { jobId, error } = params;
120
+ const tx = new Transaction();
121
+ tx.moveCall({
122
+ target: `${silvanaRegistryPackage}::jobs::fail_job`,
123
+ arguments: [
124
+ tx.object(this.jobs),
125
+ tx.pure.u64(jobId),
126
+ tx.pure.string(error),
127
+ tx.object(SUI_CLOCK_OBJECT_ID),
128
+ ],
129
+ });
130
+ return tx;
131
+ }
132
+
133
+ updateMaxAttempts(maxAttempts: number): Transaction {
134
+ const tx = new Transaction();
135
+ tx.moveCall({
136
+ target: `${silvanaRegistryPackage}::jobs::update_max_attempts`,
137
+ arguments: [
138
+ tx.object(this.jobs),
139
+ tx.pure.u64(maxAttempts),
140
+ ],
141
+ });
142
+ return tx;
143
+ }
144
+
145
+ async getJob(jobId: number): Promise<Job | undefined> {
146
+ try {
147
+ const jobsObject = await fetchSuiObject(this.jobs);
148
+ if (!jobsObject) return undefined;
149
+
150
+ const jobsTableId = (jobsObject as any)?.jobs?.fields?.id?.id;
151
+ if (!jobsTableId) return undefined;
152
+
153
+ const job = await fetchSuiDynamicField({
154
+ parentID: jobsTableId,
155
+ fieldName: "jobs",
156
+ type: "u64",
157
+ key: String(jobId),
158
+ });
159
+
160
+ if (!job) return undefined;
161
+
162
+ const parseStatus = (status: any): JobStatus => {
163
+ if (status?.Pending !== undefined) return { type: "Pending" };
164
+ if (status?.Running !== undefined) return { type: "Running" };
165
+ if (status?.Failed !== undefined) return { type: "Failed", error: status.Failed };
166
+ return { type: "Pending" };
167
+ };
168
+
169
+ return {
170
+ id: (job as any)?.id?.id,
171
+ jobId: Number((job as any).job_id),
172
+ description: (job as any)?.description ?? undefined,
173
+ developer: (job as any).developer,
174
+ agent: (job as any).agent,
175
+ agentMethod: (job as any).agent_method,
176
+ app: (job as any).app,
177
+ appInstance: (job as any).app_instance,
178
+ appInstanceMethod: (job as any).app_instance_method,
179
+ sequences: (job as any)?.sequences?.map((s: string) => Number(s)) ?? undefined,
180
+ data: new Uint8Array((job as any).data),
181
+ status: parseStatus((job as any).status),
182
+ attempts: Number((job as any).attempts),
183
+ createdAt: Number((job as any).created_at),
184
+ updatedAt: Number((job as any).updated_at),
185
+ };
186
+ } catch (error) {
187
+ console.error("Error fetching job:", error);
188
+ return undefined;
189
+ }
190
+ }
191
+
192
+ async getPendingJobs(): Promise<number[]> {
193
+ try {
194
+ const jobsObject = await fetchSuiObject(this.jobs);
195
+ if (!jobsObject) return [];
196
+
197
+ const pendingJobs = (jobsObject as any)?.pending_jobs?.fields?.contents;
198
+ if (!Array.isArray(pendingJobs)) return [];
199
+
200
+ return pendingJobs.map((id: string) => Number(id));
201
+ } catch (error) {
202
+ console.error("Error fetching pending jobs:", error);
203
+ return [];
204
+ }
205
+ }
206
+
207
+ async getNextPendingJob(): Promise<number | undefined> {
208
+ const pendingJobs = await this.getPendingJobs();
209
+ return pendingJobs.length > 0 ? pendingJobs[0] : undefined;
210
+ }
211
+
212
+ async getMaxAttempts(): Promise<number> {
213
+ try {
214
+ const jobsObject = await fetchSuiObject(this.jobs);
215
+ if (!jobsObject) return 3; // default value
216
+
217
+ return Number((jobsObject as any)?.max_attempts ?? 3);
218
+ } catch (error) {
219
+ console.error("Error fetching max attempts:", error);
220
+ return 3;
221
+ }
222
+ }
223
+ }
package/src/package.ts ADDED
@@ -0,0 +1,6 @@
1
+ // Get Silvana registry package address from environment variables
2
+ // Compatible with both Node.js and Next.js environments
3
+ export const silvanaRegistryPackage =
4
+ process.env.SILVANA_REGISTRY_PACKAGE ??
5
+ process.env.NEXT_PUBLIC_SILVANA_REGISTRY_PACKAGE ??
6
+ "@silvana/agent";
@@ -0,0 +1,66 @@
1
+ import Client from "mina-signer";
2
+ import { convertFieldsToPublicKey } from "./base58/public-key.js";
3
+
4
+ const client = new Client({
5
+ network: "testnet",
6
+ });
7
+
8
+ export function publicKeyToU256(publicKey: string): bigint {
9
+ const raw = client.publicKeyToRaw(publicKey);
10
+ const swappedRaw =
11
+ raw
12
+ .match(/.{1,2}/g)
13
+ ?.reverse()
14
+ .join("") || "";
15
+ const u256 = BigInt("0x" + swappedRaw);
16
+ return u256;
17
+ }
18
+
19
+ const MAX_BIT: bigint = 2n ** 255n;
20
+
21
+ export function u256ToFields(u256: bigint): {
22
+ x: bigint;
23
+ isOdd: boolean;
24
+ } {
25
+ const isOdd = (u256 & MAX_BIT) != 0n;
26
+ const x = u256 - (isOdd ? MAX_BIT : 0n);
27
+ return { x, isOdd };
28
+ }
29
+
30
+ export function u256ToPublicKey(u256: bigint): string {
31
+ const { x, isOdd } = u256ToFields(u256);
32
+ return convertFieldsToPublicKey({ x, isOdd });
33
+ }
34
+
35
+ export function convertMinaPublicKey(publicKey: string): {
36
+ x: bigint;
37
+ isOdd: boolean;
38
+ } {
39
+ const u256 = publicKeyToU256(publicKey);
40
+ return u256ToFields(u256);
41
+ }
42
+
43
+ export function convertMinaPublicKeyToFields(publicKey?: string): bigint[] {
44
+ if (!publicKey) return [];
45
+ const { x, isOdd } = convertMinaPublicKey(publicKey);
46
+ return [x, isOdd ? 1n : 0n];
47
+ }
48
+
49
+ export function signFields(params: { privateKey: string; fields: bigint[] }): {
50
+ signature: string;
51
+ data: bigint[];
52
+ publicKey: string;
53
+ } {
54
+ const { privateKey, fields } = params;
55
+ const signedData = client.signFields(fields.map(BigInt), privateKey);
56
+ return signedData;
57
+ }
58
+
59
+ export function verifyFields(params: {
60
+ publicKey: string;
61
+ fields: bigint[];
62
+ signature: string;
63
+ }): boolean {
64
+ const { publicKey, fields, signature } = params;
65
+ return client.verifyFields({ data: fields, publicKey, signature });
66
+ }
package/src/publish.ts CHANGED
@@ -1,7 +1,5 @@
1
1
  import { Secp256k1Keypair } from "@mysten/sui/keypairs/secp256k1";
2
2
  import { Transaction } from "@mysten/sui/transactions";
3
- import { SignatureWithBytes } from "@mysten/sui/cryptography";
4
- import { suiClient } from "./sui-client.js";
5
3
 
6
4
  export async function buildPublishTx(params: {
7
5
  modules: string[];