Skip to content

Commit 826ad35

Browse files
authored
Fix/reason onchain (#276)
* fixes according to spec * 1.21.0
1 parent a33feb4 commit 826ad35

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@0xpolygonid/js-sdk",
3-
"version": "1.20.3",
3+
"version": "1.21.0",
44
"description": "SDK to work with Polygon ID",
55
"main": "dist/node/cjs/index.js",
66
"module": "dist/node/esm/index.js",

src/iden3comm/handlers/contract-request.ts

-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ export class ContractRequestHandler
192192
to: request.from,
193193
body: {
194194
transaction_data: request.body.transaction_data,
195-
reason: request.body.reason,
196195
scope: []
197196
}
198197
};

src/iden3comm/types/protocol/contract-request.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { PROTOCOL_MESSAGE_TYPE } from '../../constants';
22
import { BasicMessage } from '../packer';
3-
import { ZeroKnowledgeProofRequest, ZeroKnowledgeProofResponse } from './auth';
3+
import { DIDDocument, ZeroKnowledgeProofRequest, ZeroKnowledgeProofResponse } from './auth';
44

55
/** ContractInvokeRequest represents structure of contract invoke request object */
66
export type ContractInvokeRequest = BasicMessage & {
@@ -10,9 +10,10 @@ export type ContractInvokeRequest = BasicMessage & {
1010

1111
/** ContractInvokeRequestBody represents structure of contract invoke request body object */
1212
export type ContractInvokeRequestBody = {
13-
reason: string;
13+
reason?: string;
1414
transaction_data: ContractInvokeTransactionData;
1515
scope: Array<ZeroKnowledgeProofRequest>;
16+
did_doc?: DIDDocument;
1617
};
1718

1819
/** ContractInvokeResponse represents structure of contract invoke response object */
@@ -25,7 +26,7 @@ export type ContractInvokeResponse = BasicMessage & {
2526
export type ContractInvokeResponseBody = {
2627
scope: Array<OnChainZeroKnowledgeProofResponse>;
2728
transaction_data: ContractInvokeTransactionData;
28-
reason: string;
29+
did_doc?: DIDDocument;
2930
};
3031

3132
/** OnChainZeroKnowledgeProofResponse represents structure of onchain zero knowledge proof response */

0 commit comments

Comments
 (0)