Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/reason onchain #276

Merged
merged 4 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
vmidyllic marked this conversation as resolved.
Show resolved Hide resolved
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