@rohan-protocol/sdk 0.8.1 → 0.8.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 +33 -99
- package/dist/client.d.ts +1 -8
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +68 -25
- package/dist/client.js.map +1 -1
- package/dist/identity/bundle.d.ts +68 -0
- package/dist/identity/bundle.d.ts.map +1 -0
- package/dist/identity/bundle.js +259 -0
- package/dist/identity/bundle.js.map +1 -0
- package/dist/identity/did.d.ts +6 -0
- package/dist/identity/did.d.ts.map +1 -1
- package/dist/identity/did.js +53 -0
- package/dist/identity/did.js.map +1 -1
- package/dist/identity/envelope.js +1 -1
- package/dist/identity/envelope.js.map +1 -1
- package/dist/identity/index.d.ts +5 -0
- package/dist/identity/index.d.ts.map +1 -0
- package/dist/identity/index.js +5 -0
- package/dist/identity/index.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/security/canonicalize.d.ts +2 -5
- package/dist/security/canonicalize.d.ts.map +1 -1
- package/dist/security/canonicalize.js +2 -24
- package/dist/security/canonicalize.js.map +1 -1
- package/dist/security/jcs.d.ts +6 -0
- package/dist/security/jcs.d.ts.map +1 -0
- package/dist/security/jcs.js +25 -0
- package/dist/security/jcs.js.map +1 -0
- package/dist/types.d.ts +6 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +6 -16
- package/dist/generated/compiler/contract-info.json +0 -84
- package/dist/generated/contract/index.d.ts +0 -66
- package/dist/generated/contract/index.js +0 -569
- package/dist/generated/contract/index.js.map +0 -8
- package/dist/generated/keys/initial_setup.prover +0 -0
- package/dist/generated/keys/initial_setup.verifier +0 -0
- package/dist/generated/keys/verify_batched_handshakes.prover +0 -0
- package/dist/generated/keys/verify_batched_handshakes.verifier +0 -0
- package/dist/generated/zkir/initial_setup.bzkir +0 -0
- package/dist/generated/zkir/initial_setup.zkir +0 -96
- package/dist/generated/zkir/verify_batched_handshakes.bzkir +0 -0
- package/dist/generated/zkir/verify_batched_handshakes.zkir +0 -155
- package/src/generated/compiler/contract-info.json +0 -84
- package/src/generated/contract/index.d.ts +0 -66
- package/src/generated/contract/index.js +0 -569
- package/src/generated/contract/index.js.map +0 -8
- package/src/generated/keys/initial_setup.prover +0 -0
- package/src/generated/keys/initial_setup.verifier +0 -0
- package/src/generated/keys/verify_batched_handshakes.prover +0 -0
- package/src/generated/keys/verify_batched_handshakes.verifier +0 -0
- package/src/generated/zkir/initial_setup.bzkir +0 -0
- package/src/generated/zkir/initial_setup.zkir +0 -96
- package/src/generated/zkir/verify_batched_handshakes.bzkir +0 -0
- package/src/generated/zkir/verify_batched_handshakes.zkir +0 -155
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rohan-protocol/sdk",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "Enterprise Node.js SDK for zero-knowledge agent handshakes on Midnight Blockchain",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -10,30 +10,20 @@
|
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
11
|
"import": "./dist/index.js"
|
|
12
12
|
},
|
|
13
|
-
"./
|
|
13
|
+
"./identity": {
|
|
14
|
+
"types": "./dist/identity/index.d.ts",
|
|
15
|
+
"import": "./dist/identity/index.js"
|
|
16
|
+
}
|
|
14
17
|
},
|
|
15
18
|
"files": [
|
|
16
19
|
"dist",
|
|
17
|
-
"src/generated",
|
|
18
20
|
"README.md"
|
|
19
21
|
],
|
|
20
22
|
"scripts": {
|
|
21
|
-
"build": "tsc
|
|
23
|
+
"build": "tsc",
|
|
22
24
|
"clean": "rm -rf dist",
|
|
23
25
|
"test": "node --test tests/*.test.js"
|
|
24
26
|
},
|
|
25
|
-
"dependencies": {
|
|
26
|
-
"@midnight-ntwrk/compact-js": "2.5.1",
|
|
27
|
-
"@midnight-ntwrk/compact-runtime": "0.15.0",
|
|
28
|
-
"@midnight-ntwrk/midnight-js-contracts": "4.1.1",
|
|
29
|
-
"@midnight-ntwrk/midnight-js-http-client-proof-provider": "4.1.1",
|
|
30
|
-
"@midnight-ntwrk/midnight-js-indexer-public-data-provider": "4.1.1",
|
|
31
|
-
"@midnight-ntwrk/midnight-js-level-private-state-provider": "4.1.1",
|
|
32
|
-
"@midnight-ntwrk/midnight-js-network-id": "4.1.1",
|
|
33
|
-
"@midnight-ntwrk/midnight-js-node-zk-config-provider": "4.1.1",
|
|
34
|
-
"@midnight-ntwrk/midnight-js-types": "4.1.1",
|
|
35
|
-
"rxjs": "^7.8.1"
|
|
36
|
-
},
|
|
37
27
|
"devDependencies": {
|
|
38
28
|
"@types/node": "^22.0.0",
|
|
39
29
|
"typescript": "^5.5.0"
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compiler-version": "0.30.0",
|
|
3
|
-
"language-version": "0.22.0",
|
|
4
|
-
"runtime-version": "0.15.0",
|
|
5
|
-
"circuits": [
|
|
6
|
-
{
|
|
7
|
-
"name": "initial_setup",
|
|
8
|
-
"pure": false,
|
|
9
|
-
"proof": true,
|
|
10
|
-
"arguments": [
|
|
11
|
-
{
|
|
12
|
-
"name": "initial_root",
|
|
13
|
-
"type": {
|
|
14
|
-
"type-name": "Bytes",
|
|
15
|
-
"length": 32
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"name": "relayer_identity",
|
|
20
|
-
"type": {
|
|
21
|
-
"type-name": "Bytes",
|
|
22
|
-
"length": 32
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
"result-type": {
|
|
27
|
-
"type-name": "Tuple",
|
|
28
|
-
"types": [
|
|
29
|
-
]
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"name": "verify_batched_handshakes",
|
|
34
|
-
"pure": false,
|
|
35
|
-
"proof": true,
|
|
36
|
-
"arguments": [
|
|
37
|
-
{
|
|
38
|
-
"name": "previous_root",
|
|
39
|
-
"type": {
|
|
40
|
-
"type-name": "Bytes",
|
|
41
|
-
"length": 32
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"name": "new_root",
|
|
46
|
-
"type": {
|
|
47
|
-
"type-name": "Bytes",
|
|
48
|
-
"length": 32
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"name": "proof_commitment",
|
|
53
|
-
"type": {
|
|
54
|
-
"type-name": "Bytes",
|
|
55
|
-
"length": 32
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"name": "caller_identity",
|
|
60
|
-
"type": {
|
|
61
|
-
"type-name": "Bytes",
|
|
62
|
-
"length": 32
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"name": "toll_amount",
|
|
67
|
-
"type": {
|
|
68
|
-
"type-name": "Uint",
|
|
69
|
-
"maxval": 18446744073709551615
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
],
|
|
73
|
-
"result-type": {
|
|
74
|
-
"type-name": "Tuple",
|
|
75
|
-
"types": [
|
|
76
|
-
]
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
],
|
|
80
|
-
"witnesses": [
|
|
81
|
-
],
|
|
82
|
-
"contracts": [
|
|
83
|
-
]
|
|
84
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type * as __compactRuntime from '@midnight-ntwrk/compact-runtime';
|
|
2
|
-
|
|
3
|
-
export type Witnesses<PS> = {
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export type ImpureCircuits<PS> = {
|
|
7
|
-
initial_setup(context: __compactRuntime.CircuitContext<PS>,
|
|
8
|
-
initial_root_0: Uint8Array,
|
|
9
|
-
relayer_identity_0: Uint8Array): __compactRuntime.CircuitResults<PS, []>;
|
|
10
|
-
verify_batched_handshakes(context: __compactRuntime.CircuitContext<PS>,
|
|
11
|
-
previous_root_0: Uint8Array,
|
|
12
|
-
new_root_0: Uint8Array,
|
|
13
|
-
proof_commitment_0: Uint8Array,
|
|
14
|
-
caller_identity_0: Uint8Array,
|
|
15
|
-
toll_amount_0: bigint): __compactRuntime.CircuitResults<PS, []>;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export type ProvableCircuits<PS> = {
|
|
19
|
-
initial_setup(context: __compactRuntime.CircuitContext<PS>,
|
|
20
|
-
initial_root_0: Uint8Array,
|
|
21
|
-
relayer_identity_0: Uint8Array): __compactRuntime.CircuitResults<PS, []>;
|
|
22
|
-
verify_batched_handshakes(context: __compactRuntime.CircuitContext<PS>,
|
|
23
|
-
previous_root_0: Uint8Array,
|
|
24
|
-
new_root_0: Uint8Array,
|
|
25
|
-
proof_commitment_0: Uint8Array,
|
|
26
|
-
caller_identity_0: Uint8Array,
|
|
27
|
-
toll_amount_0: bigint): __compactRuntime.CircuitResults<PS, []>;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export type PureCircuits = {
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export type Circuits<PS> = {
|
|
34
|
-
initial_setup(context: __compactRuntime.CircuitContext<PS>,
|
|
35
|
-
initial_root_0: Uint8Array,
|
|
36
|
-
relayer_identity_0: Uint8Array): __compactRuntime.CircuitResults<PS, []>;
|
|
37
|
-
verify_batched_handshakes(context: __compactRuntime.CircuitContext<PS>,
|
|
38
|
-
previous_root_0: Uint8Array,
|
|
39
|
-
new_root_0: Uint8Array,
|
|
40
|
-
proof_commitment_0: Uint8Array,
|
|
41
|
-
caller_identity_0: Uint8Array,
|
|
42
|
-
toll_amount_0: bigint): __compactRuntime.CircuitResults<PS, []>;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export type Ledger = {
|
|
46
|
-
readonly state_root: Uint8Array;
|
|
47
|
-
readonly sequence_number: bigint;
|
|
48
|
-
readonly total_toll: bigint;
|
|
49
|
-
readonly authorized_relayer: Uint8Array;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export type ContractReferenceLocations = any;
|
|
53
|
-
|
|
54
|
-
export declare const contractReferenceLocations : ContractReferenceLocations;
|
|
55
|
-
|
|
56
|
-
export declare class Contract<PS = any, W extends Witnesses<PS> = Witnesses<PS>> {
|
|
57
|
-
witnesses: W;
|
|
58
|
-
circuits: Circuits<PS>;
|
|
59
|
-
impureCircuits: ImpureCircuits<PS>;
|
|
60
|
-
provableCircuits: ProvableCircuits<PS>;
|
|
61
|
-
constructor(witnesses: W);
|
|
62
|
-
initialState(context: __compactRuntime.ConstructorContext<PS>): __compactRuntime.ConstructorResult<PS>;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export declare function ledger(state: __compactRuntime.StateValue | __compactRuntime.ChargedState): Ledger;
|
|
66
|
-
export declare const pureCircuits: PureCircuits;
|