@@ -93,7 +93,12 @@ extern "C" {
9393#endif
9494
9595extern GoUint8 PLGNAuthV2InputsMarshal (char * * jsonResponse , char * in , PLGNStatus * * status );
96+
97+ // Deprecated: Use PLGNNewGenesisID instead. It supports environment
98+ // configuration, giving the ability to register custom DID methods.
99+ //
96100extern GoUint8 PLGNCalculateGenesisID (char * * jsonResponse , char * in , PLGNStatus * * status );
101+ extern GoUint8 PLGNNewGenesisID (char * * jsonResponse , char * in , char * cfg , PLGNStatus * * status );
97102extern GoUint8 PLGNCreateClaim (char * * jsonResponse , char * in , PLGNStatus * * status );
98103
99104// PLGNIDToInt returns the ID as a big int string
@@ -110,13 +115,9 @@ extern GoUint8 PLGNProfileID(char** jsonResponse, char* in, PLGNStatus** status)
110115// Additional configuration may be required for Reverse Hash Service
111116// revocation validation. In other case cfg may be nil.
112117//
113- // Sample configuration:
118+ // The configuration example may be found in the [README.md] file.
114119//
115- // {
116- // "ethereumUrl": "http://localhost:8545",
117- // "stateContractAddr": "0xEA9aF2088B4a9770fC32A12fD42E61BDD317E655",
118- // "reverseHashServiceUrl": "http://localhost:8003"
119- // }
120+ // [README.md]: https://github.com/0xPolygonID/c-polygonid/blob/main/README.md#configuration
120121//
121122extern GoUint8 PLGNAtomicQuerySigV2Inputs (char * * jsonResponse , char * in , char * cfg , PLGNStatus * * status );
122123
@@ -134,13 +135,9 @@ extern GoUint8 PLGNSigV2Inputs(char** jsonResponse, char* in, PLGNStatus** statu
134135// Additional configuration may be required for Reverse Hash Service
135136// revocation validation. In other case cfg may be nil.
136137//
137- // Sample configuration:
138+ // The configuration example may be found in the [README.md] file.
138139//
139- // {
140- // "ethereumUrl": "http://localhost:8545",
141- // "stateContractAddr": "0xEA9aF2088B4a9770fC32A12fD42E61BDD317E655",
142- // "reverseHashServiceUrl": "http://localhost:8003"
143- // }
140+ // [README.md]: https://github.com/0xPolygonID/c-polygonid/blob/main/README.md#configuration
144141//
145142extern GoUint8 PLGNAtomicQueryMtpV2Inputs (char * * jsonResponse , char * in , char * cfg , PLGNStatus * * status );
146143
@@ -158,13 +155,9 @@ extern GoUint8 PLGNMtpV2Inputs(char** jsonResponse, char* in, PLGNStatus** statu
158155// Additional configuration may be required for Reverse Hash Service
159156// revocation validation. In other case cfg may be nil.
160157//
161- // Sample configuration:
158+ // The configuration example may be found in the [README.md] file.
162159//
163- // {
164- // "ethereumUrl": "http://localhost:8545",
165- // "stateContractAddr": "0xEA9aF2088B4a9770fC32A12fD42E61BDD317E655",
166- // "reverseHashServiceUrl": "http://localhost:8003"
167- // }
160+ // [README.md]: https://github.com/0xPolygonID/c-polygonid/blob/main/README.md#configuration
168161//
169162extern GoUint8 PLGNAtomicQuerySigV2OnChainInputs (char * * jsonResponse , char * in , char * cfg , PLGNStatus * * status );
170163
@@ -174,13 +167,9 @@ extern GoUint8 PLGNAtomicQuerySigV2OnChainInputs(char** jsonResponse, char* in,
174167// Additional configuration may be required for Reverse Hash Service
175168// revocation validation. In other case cfg may be nil.
176169//
177- // Sample configuration:
170+ // The configuration example may be found in the [README.md] file.
178171//
179- // {
180- // "ethereumUrl": "http://localhost:8545",
181- // "stateContractAddr": "0xEA9aF2088B4a9770fC32A12fD42E61BDD317E655",
182- // "reverseHashServiceUrl": "http://localhost:8003"
183- // }
172+ // [README.md]: https://github.com/0xPolygonID/c-polygonid/blob/main/README.md#configuration
184173//
185174extern GoUint8 PLGNAtomicQueryMtpV2OnChainInputs (char * * jsonResponse , char * in , char * cfg , PLGNStatus * * status );
186175
@@ -197,6 +186,42 @@ extern void PLGNFreeStatus(PLGNStatus* status);
197186extern GoUint8 PLGNCleanCache (PLGNStatus * * status );
198187extern GoUint8 PLGNCacheCredentials (char * in , char * cfg , PLGNStatus * * status );
199188
189+ // PLGNW3CCredentialFromOnchainHex returns a verifiable credential from an onchain data hex string.
190+ //
191+ // Sample input:
192+ //
193+ // {
194+ // "issuerDID": "did:polygonid:polygon:mumbai:2qCU58EJgrEMJvPfhUCnFCwuKQTkX8VmJX2sJCH6C8",
195+ // "hexdata": "0x0...",
196+ // "version": "0.0.1"
197+ // }
198+ //
199+ // The configuration example may be found in the [README.md] file.
200+ //
201+ // [README.md]: https://github.com/0xPolygonID/c-polygonid/blob/main/README.md#configuration
202+ //
203+ extern GoUint8 PLGNW3CCredentialFromOnchainHex (char * * jsonResponse , char * in , char * cfg , PLGNStatus * * status );
204+
205+ // PLGNDescribeID parses ID and return it in different representations.
206+ // Request example:
207+ //
208+ // {"id":"31Akw5AB2xBrwqmbDUA2XoSGCfTepz52q9jmFE4mXA"}
209+ //
210+ // {"idAsInt":"24460059377712687587111979692736628604804094576108957842967948238113620738"}
211+ //
212+ // There is possible to pass both id & idAsInt fields in the request. But if the
213+ // resulted ID would not be equal, error returns.
214+ //
215+ // Response example:
216+ //
217+ // {
218+ // "did": "did:polygonid:linea:testnet:31Akw5AB2xBrwqmbDUA2XoSGCfTepz52q9jmFE4mXA",
219+ // "id": "31Akw5AB2xBrwqmbDUA2XoSGCfTepz52q9jmFE4mXA",
220+ // "idAsInt": "24460059377712687587111979692736628604804094576108957842967948238113620738",
221+ // }
222+ //
223+ extern GoUint8 PLGNDescribeID (char * * jsonResponse , char * in , char * cfg , PLGNStatus * * status );
224+
200225#ifdef __cplusplus
201226}
202227#endif
0 commit comments