@skalenetwork/privacy-sdk 0.1.0-develop.1 → 0.1.0-develop.2
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/README.md +60 -8
- package/dist/actions/index.cjs +1678 -1731
- package/dist/actions/index.cjs.map +1 -1
- package/dist/actions/index.d.cts +16 -18
- package/dist/actions/index.d.ts +16 -18
- package/dist/actions/index.js +5 -9
- package/dist/chunk-PMT6KSGL.js +2934 -0
- package/dist/chunk-PMT6KSGL.js.map +1 -0
- package/dist/index.cjs +1692 -1698
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +17 -18
- package/dist/index.js.map +1 -1
- package/dist/types-CPLzL9IK.d.ts +13 -0
- package/dist/types-T84pCSPm.d.cts +13 -0
- package/package.json +6 -9
- package/dist/chunk-D3OIZD5L.js +0 -2953
- package/dist/chunk-D3OIZD5L.js.map +0 -1
- package/dist/types-CBDYydn0.d.cts +0 -60
- package/dist/types-Gn0F4pQf.d.ts +0 -60
package/dist/actions/index.d.cts
CHANGED
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
import { Hex } from 'viem';
|
|
2
|
-
import { A as ActionConfig
|
|
3
|
-
import { T as TransferData } from '../types-WaeCtQlG.cjs';
|
|
2
|
+
import { A as ActionConfig } from '../types-T84pCSPm.cjs';
|
|
4
3
|
import '@skalenetwork/bite';
|
|
4
|
+
import '../types-WaeCtQlG.cjs';
|
|
5
5
|
|
|
6
|
-
declare function approve(config: ActionConfig,
|
|
7
|
-
declare function transfer(config: ActionConfig,
|
|
8
|
-
declare function wrap(config: ActionConfig,
|
|
9
|
-
declare function unwrap(config: ActionConfig,
|
|
6
|
+
declare function approve(config: ActionConfig, spender: Hex, amount: bigint): Promise<Hex>;
|
|
7
|
+
declare function transfer(config: ActionConfig, to: Hex, amount: bigint): Promise<Hex>;
|
|
8
|
+
declare function wrap(config: ActionConfig, receiver: Hex, amount: bigint): Promise<Hex>;
|
|
9
|
+
declare function unwrap(config: ActionConfig, receiver: Hex, amount: bigint): Promise<Hex>;
|
|
10
10
|
|
|
11
11
|
declare function getCtxBalance(config: ActionConfig): Promise<bigint>;
|
|
12
|
-
declare function
|
|
13
|
-
declare function
|
|
14
|
-
declare function getValueForCtx(config: ActionConfig): Promise<bigint>;
|
|
12
|
+
declare function getCtxRawCost(config: ActionConfig): Promise<bigint>;
|
|
13
|
+
declare function getCtxOperationCost(config: ActionConfig): Promise<bigint>;
|
|
15
14
|
|
|
16
|
-
declare function decryptTokenBalance(config: ActionConfig,
|
|
17
|
-
declare function
|
|
18
|
-
declare function getTransferId(config: ActionConfig, params: GetTransferIdParams): Promise<bigint>;
|
|
15
|
+
declare function decryptTokenBalance(config: ActionConfig, viewerKey: Hex): Promise<bigint>;
|
|
16
|
+
declare function getTransferId(config: ActionConfig, ctxHash: Hex): Promise<bigint>;
|
|
19
17
|
|
|
20
|
-
declare function registerViewerKey(config: ActionConfig,
|
|
21
|
-
declare function authorizeHistoricViewForRange(config: ActionConfig,
|
|
22
|
-
declare function authorizeHistoricViewForTransfer(config: ActionConfig,
|
|
23
|
-
declare function revokeHistoricView(config: ActionConfig,
|
|
24
|
-
declare function requestTransferDecryption(config: ActionConfig,
|
|
18
|
+
declare function registerViewerKey(config: ActionConfig, publicKey: Hex): Promise<Hex>;
|
|
19
|
+
declare function authorizeHistoricViewForRange(config: ActionConfig, address: Hex, fromTimestamp: bigint, toTimestamp: bigint): Promise<Hex>;
|
|
20
|
+
declare function authorizeHistoricViewForTransfer(config: ActionConfig, address: Hex, transferId: bigint): Promise<Hex>;
|
|
21
|
+
declare function revokeHistoricView(config: ActionConfig, address: Hex): Promise<Hex>;
|
|
22
|
+
declare function requestTransferDecryption(config: ActionConfig, ctxHash: Hex): Promise<Hex>;
|
|
25
23
|
|
|
26
|
-
export { ActionConfig,
|
|
24
|
+
export { ActionConfig, approve, authorizeHistoricViewForRange, authorizeHistoricViewForTransfer, decryptTokenBalance, getCtxBalance, getCtxRawCost as getCtxFee, getTransferId, getCtxOperationCost as getValueForCtx, registerViewerKey, requestTransferDecryption, revokeHistoricView, transfer, unwrap, wrap };
|
package/dist/actions/index.d.ts
CHANGED
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
import { Hex } from 'viem';
|
|
2
|
-
import { A as ActionConfig
|
|
3
|
-
import { T as TransferData } from '../types-WaeCtQlG.js';
|
|
2
|
+
import { A as ActionConfig } from '../types-CPLzL9IK.js';
|
|
4
3
|
import '@skalenetwork/bite';
|
|
4
|
+
import '../types-WaeCtQlG.js';
|
|
5
5
|
|
|
6
|
-
declare function approve(config: ActionConfig,
|
|
7
|
-
declare function transfer(config: ActionConfig,
|
|
8
|
-
declare function wrap(config: ActionConfig,
|
|
9
|
-
declare function unwrap(config: ActionConfig,
|
|
6
|
+
declare function approve(config: ActionConfig, spender: Hex, amount: bigint): Promise<Hex>;
|
|
7
|
+
declare function transfer(config: ActionConfig, to: Hex, amount: bigint): Promise<Hex>;
|
|
8
|
+
declare function wrap(config: ActionConfig, receiver: Hex, amount: bigint): Promise<Hex>;
|
|
9
|
+
declare function unwrap(config: ActionConfig, receiver: Hex, amount: bigint): Promise<Hex>;
|
|
10
10
|
|
|
11
11
|
declare function getCtxBalance(config: ActionConfig): Promise<bigint>;
|
|
12
|
-
declare function
|
|
13
|
-
declare function
|
|
14
|
-
declare function getValueForCtx(config: ActionConfig): Promise<bigint>;
|
|
12
|
+
declare function getCtxRawCost(config: ActionConfig): Promise<bigint>;
|
|
13
|
+
declare function getCtxOperationCost(config: ActionConfig): Promise<bigint>;
|
|
15
14
|
|
|
16
|
-
declare function decryptTokenBalance(config: ActionConfig,
|
|
17
|
-
declare function
|
|
18
|
-
declare function getTransferId(config: ActionConfig, params: GetTransferIdParams): Promise<bigint>;
|
|
15
|
+
declare function decryptTokenBalance(config: ActionConfig, viewerKey: Hex): Promise<bigint>;
|
|
16
|
+
declare function getTransferId(config: ActionConfig, ctxHash: Hex): Promise<bigint>;
|
|
19
17
|
|
|
20
|
-
declare function registerViewerKey(config: ActionConfig,
|
|
21
|
-
declare function authorizeHistoricViewForRange(config: ActionConfig,
|
|
22
|
-
declare function authorizeHistoricViewForTransfer(config: ActionConfig,
|
|
23
|
-
declare function revokeHistoricView(config: ActionConfig,
|
|
24
|
-
declare function requestTransferDecryption(config: ActionConfig,
|
|
18
|
+
declare function registerViewerKey(config: ActionConfig, publicKey: Hex): Promise<Hex>;
|
|
19
|
+
declare function authorizeHistoricViewForRange(config: ActionConfig, address: Hex, fromTimestamp: bigint, toTimestamp: bigint): Promise<Hex>;
|
|
20
|
+
declare function authorizeHistoricViewForTransfer(config: ActionConfig, address: Hex, transferId: bigint): Promise<Hex>;
|
|
21
|
+
declare function revokeHistoricView(config: ActionConfig, address: Hex): Promise<Hex>;
|
|
22
|
+
declare function requestTransferDecryption(config: ActionConfig, ctxHash: Hex): Promise<Hex>;
|
|
25
23
|
|
|
26
|
-
export { ActionConfig,
|
|
24
|
+
export { ActionConfig, approve, authorizeHistoricViewForRange, authorizeHistoricViewForTransfer, decryptTokenBalance, getCtxBalance, getCtxRawCost as getCtxFee, getTransferId, getCtxOperationCost as getValueForCtx, registerViewerKey, requestTransferDecryption, revokeHistoricView, transfer, unwrap, wrap };
|
package/dist/actions/index.js
CHANGED
|
@@ -2,32 +2,28 @@ import {
|
|
|
2
2
|
approve,
|
|
3
3
|
authorizeHistoricViewForRange,
|
|
4
4
|
authorizeHistoricViewForTransfer,
|
|
5
|
-
decryptHistoricTransferData,
|
|
6
5
|
decryptTokenBalance,
|
|
7
|
-
fundCtxBalance,
|
|
8
6
|
getCtxBalance,
|
|
9
|
-
|
|
7
|
+
getCtxOperationCost,
|
|
8
|
+
getCtxRawCost,
|
|
10
9
|
getTransferId,
|
|
11
|
-
getValueForCtx,
|
|
12
10
|
registerViewerKey,
|
|
13
11
|
requestTransferDecryption,
|
|
14
12
|
revokeHistoricView,
|
|
15
13
|
transfer,
|
|
16
14
|
unwrap,
|
|
17
15
|
wrap
|
|
18
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-PMT6KSGL.js";
|
|
19
17
|
import "../chunk-K5WS3F4Q.js";
|
|
20
18
|
export {
|
|
21
19
|
approve,
|
|
22
20
|
authorizeHistoricViewForRange,
|
|
23
21
|
authorizeHistoricViewForTransfer,
|
|
24
|
-
decryptHistoricTransferData,
|
|
25
22
|
decryptTokenBalance,
|
|
26
|
-
fundCtxBalance,
|
|
27
23
|
getCtxBalance,
|
|
28
|
-
getCtxFee,
|
|
24
|
+
getCtxRawCost as getCtxFee,
|
|
29
25
|
getTransferId,
|
|
30
|
-
getValueForCtx,
|
|
26
|
+
getCtxOperationCost as getValueForCtx,
|
|
31
27
|
registerViewerKey,
|
|
32
28
|
requestTransferDecryption,
|
|
33
29
|
revokeHistoricView,
|