@zksdk/solana 0.1.1
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/index.d.ts +40 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/package.json +54 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @zksdk/solana - Privacy Oracle integration for Solana
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```typescript
|
|
6
|
+
* import { TfheClient } from '@zksdk/core';
|
|
7
|
+
* import { createDevnetConfig } from '@zksdk/solana';
|
|
8
|
+
*
|
|
9
|
+
* const config = createDevnetConfig({
|
|
10
|
+
* programId: 'YOUR_PROGRAM_ID',
|
|
11
|
+
* workerUrl: 'https://fhe-worker.example.com',
|
|
12
|
+
* });
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export * from '@zksdk/core';
|
|
16
|
+
/** Solana-specific configuration */
|
|
17
|
+
export interface SolanaConfig {
|
|
18
|
+
/** Solana RPC URL */
|
|
19
|
+
rpcUrl: string;
|
|
20
|
+
/** Privacy Oracle program ID */
|
|
21
|
+
programId: string;
|
|
22
|
+
/** FHE Worker URL */
|
|
23
|
+
workerUrl: string;
|
|
24
|
+
/** Optional commitment level */
|
|
25
|
+
commitment?: 'processed' | 'confirmed' | 'finalized';
|
|
26
|
+
}
|
|
27
|
+
/** Create devnet configuration */
|
|
28
|
+
export declare function createDevnetConfig(options: {
|
|
29
|
+
programId: string;
|
|
30
|
+
workerUrl: string;
|
|
31
|
+
}): SolanaConfig;
|
|
32
|
+
/** Create mainnet configuration */
|
|
33
|
+
export declare function createMainnetConfig(options: {
|
|
34
|
+
programId: string;
|
|
35
|
+
workerUrl: string;
|
|
36
|
+
rpcUrl?: string;
|
|
37
|
+
}): SolanaConfig;
|
|
38
|
+
/** Package version */
|
|
39
|
+
export declare const VERSION = "0.1.0";
|
|
40
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,cAAc,aAAa,CAAC;AAE5B,oCAAoC;AACpC,MAAM,WAAW,YAAY;IAC3B,qBAAqB;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,UAAU,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;CACtD;AAED,kCAAkC;AAClC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,YAAY,CAOf;AAED,mCAAmC;AACnC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,YAAY,CAOf;AAED,sBAAsB;AACtB,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @zksdk/solana - Privacy Oracle integration for Solana
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```typescript
|
|
6
|
+
* import { TfheClient } from '@zksdk/core';
|
|
7
|
+
* import { createDevnetConfig } from '@zksdk/solana';
|
|
8
|
+
*
|
|
9
|
+
* const config = createDevnetConfig({
|
|
10
|
+
* programId: 'YOUR_PROGRAM_ID',
|
|
11
|
+
* workerUrl: 'https://fhe-worker.example.com',
|
|
12
|
+
* });
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
// Re-export core for convenience
|
|
16
|
+
export * from '@zksdk/core';
|
|
17
|
+
/** Create devnet configuration */
|
|
18
|
+
export function createDevnetConfig(options) {
|
|
19
|
+
return {
|
|
20
|
+
rpcUrl: 'https://api.devnet.solana.com',
|
|
21
|
+
programId: options.programId,
|
|
22
|
+
workerUrl: options.workerUrl,
|
|
23
|
+
commitment: 'confirmed',
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/** Create mainnet configuration */
|
|
27
|
+
export function createMainnetConfig(options) {
|
|
28
|
+
return {
|
|
29
|
+
rpcUrl: options.rpcUrl ?? 'https://api.mainnet-beta.solana.com',
|
|
30
|
+
programId: options.programId,
|
|
31
|
+
workerUrl: options.workerUrl,
|
|
32
|
+
commitment: 'finalized',
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/** Package version */
|
|
36
|
+
export const VERSION = '0.1.0';
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,iCAAiC;AACjC,cAAc,aAAa,CAAC;AAc5B,kCAAkC;AAClC,MAAM,UAAU,kBAAkB,CAAC,OAGlC;IACC,OAAO;QACL,MAAM,EAAE,+BAA+B;QACvC,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,UAAU,EAAE,WAAW;KACxB,CAAC;AACJ,CAAC;AAED,mCAAmC;AACnC,MAAM,UAAU,mBAAmB,CAAC,OAInC;IACC,OAAO;QACL,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,qCAAqC;QAC/D,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,UAAU,EAAE,WAAW;KACxB,CAAC;AACJ,CAAC;AAED,sBAAsB;AACtB,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zksdk/solana",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "ZKSDK Solana Client - Privacy Oracle integration for Solana",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc",
|
|
19
|
+
"clean": "rm -rf dist",
|
|
20
|
+
"prepublishOnly": "npm run build"
|
|
21
|
+
},
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public",
|
|
24
|
+
"registry": "https://registry.npmjs.org/"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@zksdk/core": "^0.1.1"
|
|
28
|
+
},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"@solana/web3.js": "^1.87.0"
|
|
31
|
+
},
|
|
32
|
+
"peerDependenciesMeta": {
|
|
33
|
+
"@solana/web3.js": {
|
|
34
|
+
"optional": true
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"zksdk",
|
|
39
|
+
"solana",
|
|
40
|
+
"privacy",
|
|
41
|
+
"fhe",
|
|
42
|
+
"blockchain"
|
|
43
|
+
],
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "git",
|
|
46
|
+
"url": "https://github.com/zksdk/privacy-oracle",
|
|
47
|
+
"directory": "packages/npm/solana"
|
|
48
|
+
},
|
|
49
|
+
"license": "MIT",
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/node": "^22.0.0",
|
|
52
|
+
"typescript": "^5.3.0"
|
|
53
|
+
}
|
|
54
|
+
}
|