Skip to content

Commit

Permalink
Fix/reason onchain (#276)
Browse files Browse the repository at this point in the history
* fixes according to spec

* 1.21.0
  • Loading branch information
vmidyllic authored Oct 18, 2024
1 parent a33feb4 commit 826ad35
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@0xpolygonid/js-sdk",
"version": "1.20.3",
"version": "1.21.0",
"description": "SDK to work with Polygon ID",
"main": "dist/node/cjs/index.js",
"module": "dist/node/esm/index.js",
Expand Down
1 change: 0 additions & 1 deletion src/iden3comm/handlers/contract-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ export class ContractRequestHandler
to: request.from,
body: {
transaction_data: request.body.transaction_data,
reason: request.body.reason,
scope: []
}
};
Expand Down
7 changes: 4 additions & 3 deletions src/iden3comm/types/protocol/contract-request.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PROTOCOL_MESSAGE_TYPE } from '../../constants';
import { BasicMessage } from '../packer';
import { ZeroKnowledgeProofRequest, ZeroKnowledgeProofResponse } from './auth';
import { DIDDocument, ZeroKnowledgeProofRequest, ZeroKnowledgeProofResponse } from './auth';

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

/** ContractInvokeRequestBody represents structure of contract invoke request body object */
export type ContractInvokeRequestBody = {
reason: string;
reason?: string;
transaction_data: ContractInvokeTransactionData;
scope: Array<ZeroKnowledgeProofRequest>;
did_doc?: DIDDocument;
};

/** ContractInvokeResponse represents structure of contract invoke response object */
Expand All @@ -25,7 +26,7 @@ export type ContractInvokeResponse = BasicMessage & {
export type ContractInvokeResponseBody = {
scope: Array<OnChainZeroKnowledgeProofResponse>;
transaction_data: ContractInvokeTransactionData;
reason: string;
did_doc?: DIDDocument;
};

/** OnChainZeroKnowledgeProofResponse represents structure of onchain zero knowledge proof response */
Expand Down

0 comments on commit 826ad35

Please sign in to comment.