@@ -85,6 +85,55 @@ networkClient.setHost("http://api.explorer.provable.com/v1");
85
85
86
86
---
87
87
88
+ ### ` setHeader(headerName, value) `
89
+
90
+ ![ modifier: public] ( images/badges/modifier-public.svg )
91
+
92
+ Set a header in the ` ; AleoNetworkClient` ; s header map
93
+
94
+ Parameters | Type | Description
95
+ --- | --- | ---
96
+ __ headerName__ | ` string ` | * The name of the header to set*
97
+ __ value__ | ` string ` | * The header value*
98
+
99
+ #### Examples
100
+
101
+ ``` javascript
102
+ import { AleoNetworkClient } from " @provablehq/sdk/mainnet.js" ;
103
+
104
+ // Create a networkClient
105
+ const networkClient = new AleoNetworkClient ();
106
+
107
+ // Set the value of the `Accept-Language` header to `en-US`
108
+ networkClient .setHeader (' Accept-Language' , ' en-US' );
109
+ ```
110
+
111
+ ---
112
+
113
+ ### ` removeHeader(headerName) `
114
+
115
+ ![ modifier: public] ( images/badges/modifier-public.svg )
116
+
117
+ Remove a header from the ` ; AleoNetworkClient` ; s header map
118
+
119
+ Parameters | Type | Description
120
+ --- | --- | ---
121
+ __ headerName__ | ` string ` | * The name of the header to be removed*
122
+
123
+ #### Examples
124
+
125
+ ``` javascript
126
+ import { AleoNetworkClient } from " @provablehq/sdk/mainnet.js" ;
127
+
128
+ // Create a networkClient
129
+ const networkClient = new AleoNetworkClient ();
130
+
131
+ // Remove the default `X-Aleo-SDK-Version` header
132
+ networkClient .removeHeader (' X-Aleo-SDK-Version' );
133
+ ```
134
+
135
+ ---
136
+
88
137
### ` fetchData(url) `
89
138
90
139
![ modifier: public] ( images/badges/modifier-public.svg )
@@ -956,6 +1005,20 @@ __*return*__ | `Promise.<string>` | *The solution id of the submitted solution o
956
1005
957
1006
---
958
1007
1008
+ ### ` submitProvingRequest (provingRequest, url) ► Promise .< ProvingResponse> `
1009
+
1010
+ 
1011
+
1012
+ Submit a `ProvingRequest` to the Aleo network.
1013
+
1014
+ Parameters | Type | Description
1015
+ --- | --- | ---
1016
+ __provingRequest__ | [ProvingRequest](sdk-src_wasm.md) | *The `ProvingRequest` to submit*
1017
+ __url__ | ` string` | *(Optional) The url of the proving service.*
1018
+ __*return*__ | ` Promise .< ProvingResponse> ` | *The solution id of the submitted solution or the resulting error.*
1019
+
1020
+ ---
1021
+
959
1022
### ` waitForTransactionConfirmation (transactionId, checkInterval, timeout) ► Promise .< Transaction> `
960
1023
961
1024

@@ -1058,6 +1121,55 @@ networkClient.setHost("http://api.explorer.provable.com/v1");
1058
1121
1059
1122
---
1060
1123
1124
+ ### ` setHeader (headerName, value)`
1125
+
1126
+ 
1127
+
1128
+ Set a header in the `AleoNetworkClient`s header map
1129
+
1130
+ Parameters | Type | Description
1131
+ --- | --- | ---
1132
+ __headerName__ | ` string` | *The name of the header to set*
1133
+ __value__ | ` string` | *The header value*
1134
+
1135
+ #### Examples
1136
+
1137
+ ` ` ` javascript
1138
+ import { AleoNetworkClient } from " @provablehq/sdk/mainnet.js" ;
1139
+
1140
+ // Create a networkClient
1141
+ const networkClient = new AleoNetworkClient ();
1142
+
1143
+ // Set the value of the `Accept-Language` header to `en-US`
1144
+ networkClient .setHeader (' Accept-Language' , ' en-US' );
1145
+ ` ` `
1146
+
1147
+ ---
1148
+
1149
+ ### ` removeHeader (headerName)`
1150
+
1151
+ 
1152
+
1153
+ Remove a header from the `AleoNetworkClient`s header map
1154
+
1155
+ Parameters | Type | Description
1156
+ --- | --- | ---
1157
+ __headerName__ | ` string` | *The name of the header to be removed*
1158
+
1159
+ #### Examples
1160
+
1161
+ ` ` ` javascript
1162
+ import { AleoNetworkClient } from " @provablehq/sdk/mainnet.js" ;
1163
+
1164
+ // Create a networkClient
1165
+ const networkClient = new AleoNetworkClient ();
1166
+
1167
+ // Remove the default `X-Aleo-SDK-Version` header
1168
+ networkClient .removeHeader (' X-Aleo-SDK-Version' );
1169
+ ` ` `
1170
+
1171
+ ---
1172
+
1061
1173
### ` fetchData (url) ► Promise .< Type> `
1062
1174
1063
1175

@@ -1931,6 +2043,20 @@ __*return*__ | `Promise.<string>` | *The solution id of the submitted solution o
1931
2043
1932
2044
---
1933
2045
2046
+ ### ` submitProvingRequest (provingRequest, url) ► Promise .< ProvingResponse> `
2047
+
2048
+ 
2049
+
2050
+ Submit a `ProvingRequest` to the Aleo network.
2051
+
2052
+ Parameters | Type | Description
2053
+ --- | --- | ---
2054
+ __provingRequest__ | [ProvingRequest](sdk-src_wasm.md) | *The `ProvingRequest` to submit*
2055
+ __url__ | ` string` | *(Optional) The url of the proving service.*
2056
+ __*return*__ | ` Promise .< ProvingResponse> ` | *The solution id of the submitted solution or the resulting error.*
2057
+
2058
+ ---
2059
+
1934
2060
### ` waitForTransactionConfirmation (transactionId, checkInterval, timeout) ► Promise .< Transaction> `
1935
2061
1936
2062

@@ -1967,3 +2093,31 @@ const transaction = await networkClient.waitForTransactionConfirmation(transacti
1967
2093
` ` `
1968
2094
1969
2095
---
2096
+
2097
+ ### ` _sendPost (url, options) ► `
2098
+
2099
+ 
2100
+
2101
+ Wrapper around the POST helper to allow mocking in tests. Not meant for use in production.
2102
+
2103
+ Parameters | Type | Description
2104
+ --- | --- | ---
2105
+ __url__ | ` undefined ` | *The URL to POST to.*
2106
+ __options__ | ` undefined ` | *The RequestInit options for the POST request.*
2107
+ __*return*__ | ` undefined ` | *The Response object from the POST request.*
2108
+
2109
+ ---
2110
+
2111
+ ### ` _sendPost (url, options) ► `
2112
+
2113
+ 
2114
+
2115
+ Wrapper around the POST helper to allow mocking in tests. Not meant for use in production.
2116
+
2117
+ Parameters | Type | Description
2118
+ --- | --- | ---
2119
+ __url__ | ` undefined ` | *The URL to POST to.*
2120
+ __options__ | ` undefined ` | *The RequestInit options for the POST request.*
2121
+ __*return*__ | ` undefined ` | *The Response object from the POST request.*
2122
+
2123
+ ---
0 commit comments