@0xpolygonid/js-sdk 1.32.4 → 1.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/browser/esm/index.js +8 -4
  2. package/dist/browser/esm/index.js.map +1 -1
  3. package/dist/browser/umd/index.global.js +2 -2
  4. package/dist/browser/umd/index.global.js.map +1 -1
  5. package/dist/node/cjs/index.cjs +8 -4
  6. package/dist/node/cjs/index.cjs.map +1 -1
  7. package/dist/node/esm/index.js +8 -4
  8. package/dist/node/esm/index.js.map +1 -1
  9. package/dist/types/iden3comm/handlers/auth.d.ts +2 -1
  10. package/dist/types/iden3comm/handlers/auth.d.ts.map +1 -1
  11. package/dist/types/iden3comm/handlers/credential-proposal.d.ts +6 -3
  12. package/dist/types/iden3comm/handlers/credential-proposal.d.ts.map +1 -1
  13. package/dist/types/iden3comm/types/index.d.ts +2 -0
  14. package/dist/types/iden3comm/types/index.d.ts.map +1 -1
  15. package/dist/types/iden3comm/types/packer.d.ts +4 -1
  16. package/dist/types/iden3comm/types/packer.d.ts.map +1 -1
  17. package/dist/types/iden3comm/types/protocol/attachment.d.ts +11 -0
  18. package/dist/types/iden3comm/types/protocol/attachment.d.ts.map +1 -0
  19. package/dist/types/iden3comm/types/protocol/common.d.ts +11 -0
  20. package/dist/types/iden3comm/types/protocol/common.d.ts.map +1 -0
  21. package/dist/types/iden3comm/types/protocol/payment.d.ts +2 -4
  22. package/dist/types/iden3comm/types/protocol/payment.d.ts.map +1 -1
  23. package/dist/types/iden3comm/types/protocol/proposal-request.d.ts +4 -10
  24. package/dist/types/iden3comm/types/protocol/proposal-request.d.ts.map +1 -1
  25. package/package.json +1 -1
  26. package/src/iden3comm/handlers/auth.ts +5 -2
  27. package/src/iden3comm/handlers/credential-proposal.ts +14 -5
  28. package/src/iden3comm/types/index.ts +2 -0
  29. package/src/iden3comm/types/packer.ts +7 -1
  30. package/src/iden3comm/types/protocol/attachment.ts +12 -0
  31. package/src/iden3comm/types/protocol/common.ts +10 -0
  32. package/src/iden3comm/types/protocol/payment.ts +2 -4
  33. package/src/iden3comm/types/protocol/proposal-request.ts +5 -8
  34. package/src/storage/blockchain/errors.ts +1 -1
  35. package/src/verifiable/constants.ts +1 -1
@@ -1,6 +1,6 @@
1
1
  import { MediaType } from '../constants';
2
2
  import { IProofService } from '../../proof/proof-service';
3
- import { StateVerificationOpts, AuthorizationRequestMessage, AuthorizationResponseMessage, BasicMessage, IPackageManager, JWSPackerParams, ZeroKnowledgeProofRequest } from '../types';
3
+ import { StateVerificationOpts, AuthorizationRequestMessage, AuthorizationResponseMessage, BasicMessage, IPackageManager, JWSPackerParams, ZeroKnowledgeProofRequest, Attachment } from '../types';
4
4
  import { DID } from '@iden3/js-iden3-core';
5
5
  import { AbstractMessageHandler, BasicHandlerOptions, IProtocolMessageHandler } from './message-handler';
6
6
  /**
@@ -11,6 +11,7 @@ export type AuthorizationRequestCreateOptions = {
11
11
  accept?: string[];
12
12
  scope?: ZeroKnowledgeProofRequest[];
13
13
  expires_time?: Date;
14
+ attachments?: Attachment[];
14
15
  };
15
16
  /**
16
17
  * createAuthorizationRequest is a function to create protocol authorization request
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../src/iden3comm/handlers/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG1D,OAAO,EACL,qBAAqB,EACrB,2BAA2B,EAC3B,4BAA4B,EAC5B,YAAY,EACZ,eAAe,EACf,eAAe,EACf,yBAAyB,EAE1B,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,GAAG,EAAoB,MAAM,sBAAsB,CAAC;AAQ7D,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,mBAAmB,CAAC;AAG3B;;;GAGG;AACH,MAAM,MAA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AEF;;;;;;;;GAQG;AACH,qBAAa,WACX,SAAQ,sBACR,YAAW,YAAY,EAAE,uBAAuB;IAe9C,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAdhC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAKjC;IACF;;;;;OAKG;gBAEgB,UAAU,EAAE,eAAe,EAC3B,aAAa,EAAE,aAAa;IAK/C,MAAM,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAiB3F;;OAEG;IACG,yBAAyB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,2BAA2B,CAAC;YAU5E,iBAAiB;IA6C/B;;OAEG;IACG,0BAA0B,CAC9B,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,UAAU,EACnB,IAAI,CAAC,EAAE,kBAAkB,GACxB,OAAO,CAAC;QACT,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,2BAA2B,CAAC;QACzC,YAAY,EAAE,4BAA4B,CAAC;KAC5C,CAAC;YAuCY,kBAAkB;IAyFhC;;OAEG;IACG,2BAA2B,CAC/B,QAAQ,EAAE,4BAA4B,EACtC,OAAO,EAAE,2BAA2B,EACpC,IAAI,CAAC,EAAE,0BAA0B,GAAG,SAAS,GAC5C,OAAO,CAAC;QACT,OAAO,EAAE,2BAA2B,CAAC;QACrC,QAAQ,EAAE,4BAA4B,CAAC;KACxC,CAAC;IAaF,OAAO,CAAC,iBAAiB;IAkCzB,OAAO,CAAC,8BAA8B;CA6BvC"}
@@ -1,6 +1,6 @@
1
- import { BasicMessage, DIDDocument, IPackageManager, PackerParams } from '../types';
1
+ import { Attachment, BasicMessage, DIDDocument, IPackageManager, PackerParams } from '../types';
2
2
  import { DID } from '@iden3/js-iden3-core';
3
- import { Proposal, ProposalRequestCredential, ProposalRequestMessage, ProposalMessage } from '../types/protocol/proposal-request';
3
+ import { Proposal, ProposalRequestMessage, ProposalMessage, ProposalRequestCredential } from '../types/protocol/proposal-request';
4
4
  import { IIdentityWallet } from '../../identity';
5
5
  import { AbstractMessageHandler, BasicHandlerOptions, IProtocolMessageHandler } from './message-handler';
6
6
  /** @beta ProposalRequestCreationOptions represents proposal-request creation options */
@@ -8,6 +8,7 @@ export type ProposalRequestCreationOptions = {
8
8
  credentials: ProposalRequestCredential[];
9
9
  did_doc?: DIDDocument;
10
10
  expires_time?: Date;
11
+ attachments?: Attachment[];
11
12
  };
12
13
  /** @beta ProposalCreationOptions represents proposal creation options */
13
14
  export type ProposalCreationOptions = {
@@ -75,7 +76,9 @@ export type ProposalHandlerOptions = BasicHandlerOptions & {
75
76
  /** @beta CredentialProposalHandlerParams represents credential proposal handler params */
76
77
  export type CredentialProposalHandlerParams = {
77
78
  agentUrl: string;
78
- proposalResolverFn: (context: string, type: string) => Promise<Proposal>;
79
+ proposalResolverFn: (context: string, type: string, opts?: {
80
+ msg?: BasicMessage;
81
+ }) => Promise<Proposal>;
79
82
  packerParams: PackerParams;
80
83
  };
81
84
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"credential-proposal.d.ts","sourceRoot":"","sources":["../../../../src/iden3comm/handlers/credential-proposal.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EAGZ,WAAW,EACX,eAAe,EACf,YAAY,EACb,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,GAAG,EAAoB,MAAM,sBAAsB,CAAC;AAG7D,OAAO,EACL,QAAQ,EACR,yBAAyB,EACzB,sBAAsB,EACtB,eAAe,EAChB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,mBAAmB,CAAC;AAG3B,wFAAwF;AACxF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,WAAW,EAAE,yBAAyB,EAAE,CA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AAE,MAAM,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IACzE,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF;;;;;;GAMG;AACH,qBAAa,yBACX,SAAQ,sBACR,YAAW,0BAA0B,EAAE,uBAAuB;IAW5D,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO;IAX1B;;;;;;OAMG;gBAGgB,UAAU,EAAE,eAAe,EAC3B,eAAe,EAAE,eAAe,EAChC,OAAO,EAAE,+BAA+B;IAK9C,MAAM,CACjB,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAY/B;;OAEG;IACG,oBAAoB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,sBAAsB,CAAC;YASlE,4BAA4B;IA8F1C;;OAEG;IACG,qBAAqB,CACzB,OAAO,EAAE,UAAU,EAEnB,IAAI,CAAC,EAAE,6BAA6B,GACnC,OAAO,CAAC,UAAU,CAAC;IAiCtB;;OAEG;IACG,cAAc,CAAC,QAAQ,EAAE,eAAe,EAAE,IAAI,CAAC,EAAE,sBAAsB;;;CAW9E"}
1
+ {"version":3,"file":"credential-proposal.d.ts","sourceRoot":"","sources":["../../../../src/iden3comm/handlers/credential-proposal.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,YAAY,EAGZ,WAAW,EACX,eAAe,EACf,YAAY,EACb,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,GAAG,EAAoB,MAAM,sBAAsB,CAAC;AAG7D,OAAO,EACL,QAAQ,EACR,sBAAsB,EACtB,eAAe,EACf,yBAAyB,EAC1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,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;CAC1C,CAAC;AAEF,0FAA0F;AAC1F,MAAM,MAAM,+BAA+B,GAAG;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,CAClB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,YAAY,CAAA;KAAE,KAC1B,OAAO,CAAC,QAAQ,CAAC,CAAC;IACvB,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF;;;;;;GAMG;AACH,qBAAa,yBACX,SAAQ,sBACR,YAAW,0BAA0B,EAAE,uBAAuB;IAW5D,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO;IAX1B;;;;;;OAMG;gBAGgB,UAAU,EAAE,eAAe,EAC3B,eAAe,EAAE,eAAe,EAChC,OAAO,EAAE,+BAA+B;IAK9C,MAAM,CACjB,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAY/B;;OAEG;IACG,oBAAoB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,sBAAsB,CAAC;YASlE,4BAA4B;IAgG1C;;OAEG;IACG,qBAAqB,CACzB,OAAO,EAAE,UAAU,EAEnB,IAAI,CAAC,EAAE,6BAA6B,GACnC,OAAO,CAAC,UAAU,CAAC;IAiCtB;;OAEG;IACG,cAAc,CAAC,QAAQ,EAAE,eAAe,EAAE,IAAI,CAAC,EAAE,sBAAsB;;;CAW9E"}
@@ -9,6 +9,8 @@ export * from './protocol/payment';
9
9
  export * from './protocol/accept-profile';
10
10
  export * from './protocol/discovery-protocol';
11
11
  export * from './protocol/problem-report';
12
+ export * from './protocol/attachment';
13
+ export * from './protocol/common';
12
14
  export * from './packer';
13
15
  export * from './models';
14
16
  export * from './packageManager';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/iden3comm/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAE1C,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/iden3comm/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAE1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC"}
@@ -5,6 +5,7 @@ import { CircuitId } from '../../circuits';
5
5
  import { MediaType, PROTOCOL_MESSAGE_TYPE } from '../constants';
6
6
  import { DIDDocument, VerificationMethod } from 'did-resolver';
7
7
  import { StateVerificationOpts } from './models';
8
+ import { Attachment } from './protocol/attachment';
8
9
  /**
9
10
  * Protocol message type
10
11
  */
@@ -42,13 +43,15 @@ export type BasicMessage = {
42
43
  to?: string;
43
44
  created_time?: number;
44
45
  expires_time?: number;
46
+ attachments?: Attachment[];
45
47
  };
46
48
  /**
47
49
  * Basic message with all possible fields required
48
50
  */
49
- export type RequiredBasicMessage = Omit<Required<BasicMessage>, 'created_time' | 'expires_time'> & {
51
+ export type RequiredBasicMessage = Omit<Required<BasicMessage>, 'created_time' | 'expires_time' | 'attachments'> & {
50
52
  created_time?: number;
51
53
  expires_time?: number;
54
+ attachments?: Attachment[];
52
55
  };
53
56
  /**
54
57
  * parameters for any packer
@@ -1 +1 @@
1
- {"version":3,"file":"packer.d.ts","sourceRoot":"","sources":["../../../../src/iden3comm/types/packer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAEjG;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,uBAAuB,CAAA;CAAE,CAAC;AAE5E;;GA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,MAAM,MAAM,mBAAmB,GAAG,CAChC,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,KACjB,OAAO,CAAC,UAAU,CAAC,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAClC,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,EACzB,IAAI,CAAC,EAAE,qBAAqB,KACzB,OAAO,CAAC,OAAO,CAAC,CAAC;AAEtB;;;;;GAKG;AACH,MAAM,WAAW,OAAO;IACtB;;;;;OAKG;IACH,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAEpE;;;;;OAKG;IACH,WAAW,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAEzE;;;;OAIG;IACH,MAAM,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAEpD;;;OAGG;IACH,SAAS,IAAI,SAAS,CAAC;IAEvB;;;;OAIG;IACH,oBAAoB,IAAI,MAAM,EAAE,CAAC;IAEjC;;;;;OAKG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;CAC9C;AACD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,GAAG,EAAE,UAAU,CAAC;IAChB,cAAc,EAAE,uBAAuB,CAAC;CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,YAAY,EAAE,sBAAsB,CAAC;IACrC,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { JsonDocumentObject } from '../packer';
2
+ export type Attachment = {
3
+ id: string;
4
+ description?: string;
5
+ media_type?: string;
6
+ data: AttachData;
7
+ };
8
+ export type AttachData = {
9
+ json: JsonDocumentObject;
10
+ };
11
+ //# sourceMappingURL=attachment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../../../../src/iden3comm/types/protocol/attachment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,kBAAkB,CAAC;CAC1B,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Represents information about a credential schema.
3
+ *
4
+ * @property {string} type - The type of the credential schema.
5
+ * @property {string} context - The context in which the credential schema is used.
6
+ */
7
+ export type CredentialSchemaInfo = {
8
+ type: string;
9
+ context: string;
10
+ };
11
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/iden3comm/types/protocol/common.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { BasicMessage } from '../';
2
2
  import { PaymentFeatures, PaymentRequestDataType, SupportedCurrencies, SupportedPaymentProofType } from '../../../verifiable';
3
3
  import { PROTOCOL_MESSAGE_TYPE } from '../../constants';
4
+ import { CredentialSchemaInfo } from './common';
4
5
  /** @beta PaymentRequestMessage is struct the represents payment-request message */
5
6
  export type PaymentRequestMessage = BasicMessage & {
6
7
  body: PaymentRequestMessageBody;
@@ -15,10 +16,7 @@ export type PaymentRequestMessageBody = {
15
16
  };
16
17
  /** @beta PaymentRequestInfo is struct the represents payment info for payment-request */
17
18
  export type PaymentRequestInfo = {
18
- credentials: {
19
- type: string;
20
- context: string;
21
- }[];
19
+ credentials: CredentialSchemaInfo[];
22
20
  data: Iden3PaymentRequestCryptoV1 | (Iden3PaymentRequestCryptoV1 | Iden3PaymentRailsRequestV1 | Iden3PaymentRailsERC20RequestV1)[];
23
21
  description?: string;
24
22
  };
@@ -1 +1 @@
1
- {"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../../../../src/iden3comm/types/protocol/payment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,mFAAmF;AACnF,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG;IACjD,IAAI,EAAE,yBAAyB,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,OAAO,qBAAqB,CAAC,4BAA4B,CAAC;CACjE,CAAC;AAEF,wFAAwF;AACxF,MAAM,MAAM,yBAAyB,GAAG;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,kBAAkB,EAAE,CAAC;CAChC,CAAC;AAEF,yFAAyF;AACzF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,EAAE,CAAC;IACJ,IAAI,EACA,2BAA2B,GAC3B,CACI,2BAA2B,GAC3B,0BAA0B,GAC1B,+BAA+B,CAClC,EAAE,CAAC;IACR,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,uGAAuG;AACvG,MAAM,MAAM,2BAA2B,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AAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;CACH,CAAC;AAEF,kHAAkH;AAClH,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EACA,sBAAsB,CAAC,0BAA0B,GACjD,sBAAsB,CAAC,+BAA+B,CAAC;QAC3D,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;KAC9B,EAAE,CAAC;CACL,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAC/B,2BAA2B,GAC3B,0BAA0B,GAC1B,+BAA+B,CAAC;AAEpC;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GACxB,oBAAoB,GACpB,mBAAmB,GACnB,wBAAwB,CAAC"}
1
+ {"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../../../../src/iden3comm/types/protocol/payment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,mFAAmF;AACnF,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG;IACjD,IAAI,EAAE,yBAAyB,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,OAAO,qBAAqB,CAAC,4BAA4B,CAAC;CACjE,CAAC;AAEF,wFAAwF;AACxF,MAAM,MAAM,yBAAy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CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACzC,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,+GAA+G;AAC/G,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,0BAA0B,CAAC;IACjC,UAAU,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACzC,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;CACH,CAAC;AAEF,kHAAkH;AAClH,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EACA,sBAAsB,CAAC,0BAA0B,GACjD,sBAAsB,CAAC,+BAA+B,CAAC;QAC3D,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;KAC9B,EAAE,CAAC;CACL,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAC/B,2BAA2B,GAC3B,0BAA0B,GAC1B,+BAA+B,CAAC;AAEpC;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GACxB,oBAAoB,GACpB,mBAAmB,GACnB,wBAAwB,CAAC"}
@@ -1,17 +1,16 @@
1
- import { BasicMessage, DIDDocument, JsonDocumentObject } from '../';
1
+ import { BasicMessage, DIDDocument } from '../';
2
2
  import { PROTOCOL_MESSAGE_TYPE } from '../../constants';
3
+ import { CredentialSchemaInfo } from './common';
3
4
  /** @beta ProposalRequestMessage is struct the represents proposal-request message */
4
5
  export type ProposalRequestMessage = BasicMessage & {
5
6
  body: ProposalRequestMessageBody;
6
7
  type: typeof PROTOCOL_MESSAGE_TYPE.PROPOSAL_REQUEST_MESSAGE_TYPE;
7
8
  };
9
+ /** @beta ProposalRequestCredential is struct the represents proposal request credential */
10
+ export type ProposalRequestCredential = CredentialSchemaInfo;
8
11
  /** @beta ProposalRequestMessageBody is struct the represents body for proposal-request */
9
12
  export type ProposalRequestMessageBody = {
10
13
  credentials: ProposalRequestCredential[];
11
- metadata?: {
12
- type: string;
13
- data?: JsonDocumentObject;
14
- };
15
14
  did_doc?: DIDDocument;
16
15
  };
17
16
  /** @beta ProposalMessage is struct the represents proposal message */
@@ -23,11 +22,6 @@ export type ProposalMessage = BasicMessage & {
23
22
  export type ProposalMessageBody = {
24
23
  proposals: Proposal[];
25
24
  };
26
- /** @beta ProposalRequestCredential is struct the represents proposal request credential */
27
- export type ProposalRequestCredential = {
28
- type: string;
29
- context: string;
30
- };
31
25
  /** @beta Proposal is struct the represents proposal inside proposal protocol message */
32
26
  export type Proposal = {
33
27
  credentials: ProposalRequestCredential[];
@@ -1 +1 @@
1
- {"version":3,"file":"proposal-request.d.ts","sourceRoot":"","sources":["../../../../../src/iden3comm/types/protocol/proposal-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,KAAK,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,qFAAqF;AACrF,MAAM,MAAM,sBAAsB,GAAG,YAAY,GAAG;IAClD,IAAI,EAAE,0BAA0B,CAAC;IACjC,IAAI,EAAE,OAAO,qBAAqB,CAAC,6BAA6B,CAAC;CAClE,CAAC;AAEF,0FAA0F;AAC1F,MAAM,MAAM,0BAA0B,GAAG;IACvC,WAAW,EAAE,yBAAyB,EAAE,CAAC;IACzC,QAAQ,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,kBAAkB,CAAA;KAAE,CAAC;IACvD,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,CAAC;AAEF,uEAAuE;AACvE,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG;IAC3C,IAAI,EAAE,mBAAmB,CAAC;IAC1B,IAAI,EAAE,OAAO,qBAAqB,CAAC,qBAAqB,CAAC;CAC1D,CAAC;AAEF,oFAAoF;AACpF,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB,CAAC;AAEF,4FAA4F;AAC5F,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wFAAwF;AACxF,MAAM,MAAM,QAAQ,GAAG;IACrB,WAAW,EAAE,yBAAyB,EAAE,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
1
+ {"version":3,"file":"proposal-request.d.ts","sourceRoot":"","sources":["../../../../../src/iden3comm/types/protocol/proposal-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,qFAAqF;AACrF,MAAM,MAAM,sBAAsB,GAAG,YAAY,GAAG;IAClD,IAAI,EAAE,0BAA0B,CAAC;IACjC,IAAI,EAAE,OAAO,qBAAqB,CAAC,6BAA6B,CAAC;CAClE,CAAC;AAEF,4FAA4F;AAC5F,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,CAAC;AAE7D,0FAA0F;AAC1F,MAAM,MAAM,0BAA0B,GAAG;IACvC,WAAW,EAAE,yBAAyB,EAAE,CAAC;IACzC,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,CAAC;AAEF,uEAAuE;AACvE,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG;IAC3C,IAAI,EAAE,mBAAmB,CAAC;IAC1B,IAAI,EAAE,OAAO,qBAAqB,CAAC,qBAAqB,CAAC;CAC1D,CAAC;AAEF,oFAAoF;AACpF,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB,CAAC;AAEF,wFAAwF;AACxF,MAAM,MAAM,QAAQ,GAAG;IACrB,WAAW,EAAE,yBAAyB,EAAE,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xpolygonid/js-sdk",
3
- "version": "1.32.4",
3
+ "version": "1.33.0",
4
4
  "description": "SDK to work with Polygon ID",
5
5
  "source": "./src/index.ts",
6
6
  "exports": {
@@ -10,7 +10,8 @@ import {
10
10
  IPackageManager,
11
11
  JWSPackerParams,
12
12
  ZeroKnowledgeProofRequest,
13
- JSONObject
13
+ JSONObject,
14
+ Attachment
14
15
  } from '../types';
15
16
  import { DID, getUnixTimestamp } from '@iden3/js-iden3-core';
16
17
  import { proving } from '@iden3/js-jwz';
@@ -35,6 +36,7 @@ export type AuthorizationRequestCreateOptions = {
35
36
  accept?: string[];
36
37
  scope?: ZeroKnowledgeProofRequest[];
37
38
  expires_time?: Date;
39
+ attachments?: Attachment[];
38
40
  };
39
41
 
40
42
  /**
@@ -84,7 +86,8 @@ export function createAuthorizationRequestWithMessage(
84
86
  scope: opts?.scope ?? []
85
87
  },
86
88
  created_time: getUnixTimestamp(new Date()),
87
- expires_time: opts?.expires_time ? getUnixTimestamp(opts.expires_time) : undefined
89
+ expires_time: opts?.expires_time ? getUnixTimestamp(opts.expires_time) : undefined,
90
+ attachments: opts?.attachments
88
91
  };
89
92
  return request;
90
93
  }
@@ -1,5 +1,6 @@
1
1
  import { PROTOCOL_MESSAGE_TYPE, MediaType } from '../constants';
2
2
  import {
3
+ Attachment,
3
4
  BasicMessage,
4
5
  CredentialOffer,
5
6
  CredentialsOfferMessage,
@@ -13,9 +14,9 @@ import * as uuid from 'uuid';
13
14
  import { proving } from '@iden3/js-jwz';
14
15
  import {
15
16
  Proposal,
16
- ProposalRequestCredential,
17
17
  ProposalRequestMessage,
18
- ProposalMessage
18
+ ProposalMessage,
19
+ ProposalRequestCredential
19
20
  } from '../types/protocol/proposal-request';
20
21
  import { IIdentityWallet } from '../../identity';
21
22
  import { byteEncoder } from '../../utils';
@@ -32,6 +33,7 @@ export type ProposalRequestCreationOptions = {
32
33
  credentials: ProposalRequestCredential[];
33
34
  did_doc?: DIDDocument;
34
35
  expires_time?: Date;
36
+ attachments?: Attachment[];
35
37
  };
36
38
 
37
39
  /** @beta ProposalCreationOptions represents proposal creation options */
@@ -62,7 +64,8 @@ export function createProposalRequest(
62
64
  type: PROTOCOL_MESSAGE_TYPE.PROPOSAL_REQUEST_MESSAGE_TYPE,
63
65
  body: opts,
64
66
  created_time: getUnixTimestamp(new Date()),
65
- expires_time: opts?.expires_time ? getUnixTimestamp(opts.expires_time) : undefined
67
+ expires_time: opts?.expires_time ? getUnixTimestamp(opts.expires_time) : undefined,
68
+ attachments: opts.attachments
66
69
  };
67
70
  return request;
68
71
  }
@@ -153,7 +156,11 @@ export type ProposalHandlerOptions = BasicHandlerOptions & {
153
156
  /** @beta CredentialProposalHandlerParams represents credential proposal handler params */
154
157
  export type CredentialProposalHandlerParams = {
155
158
  agentUrl: string;
156
- proposalResolverFn: (context: string, type: string) => Promise<Proposal>;
159
+ proposalResolverFn: (
160
+ context: string,
161
+ type: string,
162
+ opts?: { msg?: BasicMessage }
163
+ ) => Promise<Proposal>;
157
164
  packerParams: PackerParams;
158
165
  };
159
166
 
@@ -281,7 +288,9 @@ export class CredentialProposalHandler
281
288
  }
282
289
 
283
290
  // credential not found in the wallet, prepare proposal protocol message
284
- const proposal = await this._params.proposalResolverFn(cred.context, cred.type);
291
+ const proposal = await this._params.proposalResolverFn(cred.context, cred.type, {
292
+ msg: proposalRequest
293
+ });
285
294
  if (!proposal) {
286
295
  throw new Error(`can't resolve Proposal for type: ${cred.type}, context: ${cred.context}`);
287
296
  }
@@ -10,6 +10,8 @@ export * from './protocol/accept-profile';
10
10
  export * from './protocol/discovery-protocol';
11
11
  export * from './protocol/problem-report';
12
12
 
13
+ export * from './protocol/attachment';
14
+ export * from './protocol/common';
13
15
  export * from './packer';
14
16
  export * from './models';
15
17
  export * from './packageManager';
@@ -5,6 +5,7 @@ import { CircuitId } from '../../circuits';
5
5
  import { MediaType, PROTOCOL_MESSAGE_TYPE } from '../constants';
6
6
  import { DIDDocument, VerificationMethod } from 'did-resolver';
7
7
  import { StateVerificationOpts } from './models';
8
+ import { Attachment } from './protocol/attachment';
8
9
 
9
10
  /**
10
11
  * Protocol message type
@@ -51,14 +52,19 @@ export type BasicMessage = {
51
52
  to?: string;
52
53
  created_time?: number;
53
54
  expires_time?: number;
55
+ attachments?: Attachment[];
54
56
  };
55
57
 
56
58
  /**
57
59
  * Basic message with all possible fields required
58
60
  */
59
- export type RequiredBasicMessage = Omit<Required<BasicMessage>, 'created_time' | 'expires_time'> & {
61
+ export type RequiredBasicMessage = Omit<
62
+ Required<BasicMessage>,
63
+ 'created_time' | 'expires_time' | 'attachments'
64
+ > & {
60
65
  created_time?: number;
61
66
  expires_time?: number;
67
+ attachments?: Attachment[];
62
68
  };
63
69
 
64
70
  /**
@@ -0,0 +1,12 @@
1
+ import { JsonDocumentObject } from '../packer';
2
+
3
+ export type Attachment = {
4
+ id: string;
5
+ description?: string;
6
+ media_type?: string;
7
+ data: AttachData;
8
+ };
9
+
10
+ export type AttachData = {
11
+ json: JsonDocumentObject;
12
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Represents information about a credential schema.
3
+ *
4
+ * @property {string} type - The type of the credential schema.
5
+ * @property {string} context - The context in which the credential schema is used.
6
+ */
7
+ export type CredentialSchemaInfo = {
8
+ type: string;
9
+ context: string;
10
+ };
@@ -6,6 +6,7 @@ import {
6
6
  SupportedPaymentProofType
7
7
  } from '../../../verifiable';
8
8
  import { PROTOCOL_MESSAGE_TYPE } from '../../constants';
9
+ import { CredentialSchemaInfo } from './common';
9
10
 
10
11
  /** @beta PaymentRequestMessage is struct the represents payment-request message */
11
12
  export type PaymentRequestMessage = BasicMessage & {
@@ -23,10 +24,7 @@ export type PaymentRequestMessageBody = {
23
24
 
24
25
  /** @beta PaymentRequestInfo is struct the represents payment info for payment-request */
25
26
  export type PaymentRequestInfo = {
26
- credentials: {
27
- type: string;
28
- context: string;
29
- }[];
27
+ credentials: CredentialSchemaInfo[];
30
28
  data:
31
29
  | Iden3PaymentRequestCryptoV1
32
30
  | (
@@ -1,5 +1,6 @@
1
- import { BasicMessage, DIDDocument, JsonDocumentObject } from '../';
1
+ import { BasicMessage, DIDDocument } from '../';
2
2
  import { PROTOCOL_MESSAGE_TYPE } from '../../constants';
3
+ import { CredentialSchemaInfo } from './common';
3
4
 
4
5
  /** @beta ProposalRequestMessage is struct the represents proposal-request message */
5
6
  export type ProposalRequestMessage = BasicMessage & {
@@ -7,10 +8,12 @@ export type ProposalRequestMessage = BasicMessage & {
7
8
  type: typeof PROTOCOL_MESSAGE_TYPE.PROPOSAL_REQUEST_MESSAGE_TYPE;
8
9
  };
9
10
 
11
+ /** @beta ProposalRequestCredential is struct the represents proposal request credential */
12
+ export type ProposalRequestCredential = CredentialSchemaInfo;
13
+
10
14
  /** @beta ProposalRequestMessageBody is struct the represents body for proposal-request */
11
15
  export type ProposalRequestMessageBody = {
12
16
  credentials: ProposalRequestCredential[];
13
- metadata?: { type: string; data?: JsonDocumentObject };
14
17
  did_doc?: DIDDocument;
15
18
  };
16
19
 
@@ -25,12 +28,6 @@ export type ProposalMessageBody = {
25
28
  proposals: Proposal[];
26
29
  };
27
30
 
28
- /** @beta ProposalRequestCredential is struct the represents proposal request credential */
29
- export type ProposalRequestCredential = {
30
- type: string;
31
- context: string;
32
- };
33
-
34
31
  /** @beta Proposal is struct the represents proposal inside proposal protocol message */
35
32
  export type Proposal = {
36
33
  credentials: ProposalRequestCredential[];
@@ -9,7 +9,7 @@ function isErrorWithArgs(error: unknown): error is ErrorWithArgs {
9
9
  typeof error === 'object' &&
10
10
  error !== null &&
11
11
  'errorArgs' in error &&
12
- Array.isArray((error as any).errorArgs)
12
+ Array.isArray((error as ErrorWithArgs).errorArgs)
13
13
  );
14
14
  }
15
15
 
@@ -61,7 +61,7 @@ export const VerifiableConstants = Object.freeze({
61
61
  // JSONLDSchemaW3CCredential2018 is a schema for context with VerifiableCredential type
62
62
  W3C_CREDENTIAL_2018: 'https://www.w3.org/2018/credentials/v1',
63
63
  W3C_VC_DOCUMENT_2018: `{"@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","VerifiableCredential":{"@id":"https://www.w3.org/2018/credentials#VerifiableCredential","@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","cred":"https://www.w3.org/2018/credentials#","sec":"https://w3id.org/security#","xsd":"http://www.w3.org/2001/XMLSchema#","credentialSchema":{"@id":"cred:credentialSchema","@type":"@id","@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","cred":"https://www.w3.org/2018/credentials#","JsonSchemaValidator2018":"cred:JsonSchemaValidator2018"}},"credentialStatus":{"@id":"cred:credentialStatus","@type":"@id"},"credentialSubject":{"@id":"cred:credentialSubject","@type":"@id"},"evidence":{"@id":"cred:evidence","@type":"@id"},"expirationDate":{"@id":"cred:expirationDate","@type":"xsd:dateTime"},"holder":{"@id":"cred:holder","@type":"@id"},"issued":{"@id":"cred:issued","@type":"xsd:dateTime"},"issuer":{"@id":"cred:issuer","@type":"@id"},"issuanceDate":{"@id":"cred:issuanceDate","@type":"xsd:dateTime"},"proof":{"@id":"sec:proof","@type":"@id","@container":"@graph"},"refreshService":{"@id":"cred:refreshService","@type":"@id","@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","cred":"https://www.w3.org/2018/credentials#","ManualRefreshService2018":"cred:ManualRefreshService2018"}},"termsOfUse":{"@id":"cred:termsOfUse","@type":"@id"},"validFrom":{"@id":"cred:validFrom","@type":"xsd:dateTime"},"validUntil":{"@id":"cred:validUntil","@type":"xsd:dateTime"}}},"VerifiablePresentation":{"@id":"https://www.w3.org/2018/credentials#VerifiablePresentation","@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","cred":"https://www.w3.org/2018/credentials#","sec":"https://w3id.org/security#","holder":{"@id":"cred:holder","@type":"@id"},"proof":{"@id":"sec:proof","@type":"@id","@container":"@graph"},"verifiableCredential":{"@id":"cred:verifiableCredential","@type":"@id","@container":"@graph"}}},"EcdsaSecp256k1Signature2019":{"@id":"https://w3id.org/security#EcdsaSecp256k1Signature2019","@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","sec":"https://w3id.org/security#","xsd":"http://www.w3.org/2001/XMLSchema#","challenge":"sec:challenge","created":{"@id":"http://purl.org/dc/terms/created","@type":"xsd:dateTime"},"domain":"sec:domain","expires":{"@id":"sec:expiration","@type":"xsd:dateTime"},"jws":"sec:jws","nonce":"sec:nonce","proofPurpose":{"@id":"sec:proofPurpose","@type":"@vocab","@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","sec":"https://w3id.org/security#","assertionMethod":{"@id":"sec:assertionMethod","@type":"@id","@container":"@set"},"authentication":{"@id":"sec:authenticationMethod","@type":"@id","@container":"@set"}}},"proofValue":"sec:proofValue","verificationMethod":{"@id":"sec:verificationMethod","@type":"@id"}}},"EcdsaSecp256r1Signature2019":{"@id":"https://w3id.org/security#EcdsaSecp256r1Signature2019","@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","sec":"https://w3id.org/security#","xsd":"http://www.w3.org/2001/XMLSchema#","challenge":"sec:challenge","created":{"@id":"http://purl.org/dc/terms/created","@type":"xsd:dateTime"},"domain":"sec:domain","expires":{"@id":"sec:expiration","@type":"xsd:dateTime"},"jws":"sec:jws","nonce":"sec:nonce","proofPurpose":{"@id":"sec:proofPurpose","@type":"@vocab","@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","sec":"https://w3id.org/security#","assertionMethod":{"@id":"sec:assertionMethod","@type":"@id","@container":"@set"},"authentication":{"@id":"sec:authenticationMethod","@type":"@id","@container":"@set"}}},"proofValue":"sec:proofValue","verificationMethod":{"@id":"sec:verificationMethod","@type":"@id"}}},"Ed25519Signature2018":{"@id":"https://w3id.org/security#Ed25519Signature2018","@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","sec":"https://w3id.org/security#","xsd":"http://www.w3.org/2001/XMLSchema#","challenge":"sec:challenge","created":{"@id":"http://purl.org/dc/terms/created","@type":"xsd:dateTime"},"domain":"sec:domain","expires":{"@id":"sec:expiration","@type":"xsd:dateTime"},"jws":"sec:jws","nonce":"sec:nonce","proofPurpose":{"@id":"sec:proofPurpose","@type":"@vocab","@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","sec":"https://w3id.org/security#","assertionMethod":{"@id":"sec:assertionMethod","@type":"@id","@container":"@set"},"authentication":{"@id":"sec:authenticationMethod","@type":"@id","@container":"@set"}}},"proofValue":"sec:proofValue","verificationMethod":{"@id":"sec:verificationMethod","@type":"@id"}}},"RsaSignature2018":{"@id":"https://w3id.org/security#RsaSignature2018","@context":{"@version":1.1,"@protected":true,"challenge":"sec:challenge","created":{"@id":"http://purl.org/dc/terms/created","@type":"xsd:dateTime"},"domain":"sec:domain","expires":{"@id":"sec:expiration","@type":"xsd:dateTime"},"jws":"sec:jws","nonce":"sec:nonce","proofPurpose":{"@id":"sec:proofPurpose","@type":"@vocab","@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","sec":"https://w3id.org/security#","assertionMethod":{"@id":"sec:assertionMethod","@type":"@id","@container":"@set"},"authentication":{"@id":"sec:authenticationMethod","@type":"@id","@container":"@set"}}},"proofValue":"sec:proofValue","verificationMethod":{"@id":"sec:verificationMethod","@type":"@id"}}},"proof":{"@id":"https://w3id.org/security#proof","@type":"@id","@container":"@graph"}}}`,
64
- IDEN3_PROOFS_DEFINITION_DOCUMENT: `{"@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","Iden3SparseMerkleTreeProof":{"@id":"https://schema.iden3.io/core/jsonld/iden3proofs.jsonld#Iden3SparseMerkleTreeProof","@context":{"@version":1.1,"@protected":true,"@propagate":true,"id":"@id","type":"@type","sec":"https://w3id.org/security#","@vocab":"https://schema.iden3.io/core/vocab/Iden3SparseMerkleTreeProof.md#","xsd":"http://www.w3.org/2001/XMLSchema#","mtp":{"@id":"https://schema.iden3.io/core/jsonld/iden3proofs.jsonld#SparseMerkleTreeProof","@type":"SparseMerkleTreeProof"},"coreClaim":{"@id":"coreClaim","@type":"xsd:string"},"issuerData":{"@id":"issuerData","@context":{"@version":1.1,"state":{"@id":"state","@context":{"txId":{"@id":"txId","@type":"xsd:string"},"blockTimestamp":{"@id":"blockTimestamp","@type":"xsd:integer"},"blockNumber":{"@id":"blockNumber","@type":"xsd:integer"},"rootOfRoots":{"@id":"rootOfRoots","@type":"xsd:string"},"claimsTreeRoot":{"@id":"claimsTreeRoot","@type":"xsd:string"},"revocationTreeRoot":{"@id":"revocationTreeRoot","@type":"xsd:string"},"authCoreClaim":{"@id":"authCoreClaim","@type":"xsd:string"},"value":{"@id":"value","@type":"xsd:string"}}}}}}},"SparseMerkleTreeProof":{"@id":"https://schema.iden3.io/core/jsonld/iden3proofs.jsonld#SparseMerkleTreeProof","@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","sec":"https://w3id.org/security#","smt-proof-vocab":"https://schema.iden3.io/core/vocab/SparseMerkleTreeProof.md#","xsd":"http://www.w3.org/2001/XMLSchema#","existence":{"@id":"smt-proof-vocab:existence","@type":"xsd:boolean"},"revocationNonce":{"@id":"smt-proof-vocab:revocationNonce","@type":"xsd:number"},"siblings":{"@id":"smt-proof-vocab:siblings","@container":"@list"},"nodeAux":"@nest","hIndex":{"@id":"smt-proof-vocab:hIndex","@nest":"nodeAux","@type":"xsd:string"},"hValue":{"@id":"smt-proof-vocab:hValue","@nest":"nodeAux","@type":"xsd:string"}}},"BJJSignature2021":{"@id":"https://schema.iden3.io/core/jsonld/iden3proofs.jsonld#BJJSignature2021","@context":{"@version":1.1,"@protected":true,"id":"@id","@vocab":"https://schema.iden3.io/core/vocab/BJJSignature2021.md#","@propagate":true,"type":"@type","xsd":"http://www.w3.org/2001/XMLSchema#","coreClaim":{"@id":"coreClaim","@type":"xsd:string"},"issuerData":{"@id":"issuerData","@context":{"@version":1.1,"authCoreClaim":{"@id":"authCoreClaim","@type":"xsd:string"},"mtp":{"@id":"https://schema.iden3.io/core/jsonld/iden3proofs.jsonld#SparseMerkleTreeProof","@type":"SparseMerkleTreeProof"},"revocationStatus":{"@id":"revocationStatus","@type":"@id"},"state":{"@id":"state","@context":{"@version":1.1,"rootOfRoots":{"@id":"rootOfRoots","@type":"xsd:string"},"claimsTreeRoot":{"@id":"claimsTreeRoot","@type":"xsd:string"},"revocationTreeRoot":{"@id":"revocationTreeRoot","@type":"xsd:string"},"value":{"@id":"value","@type":"xsd:string"}}}}},"signature":{"@id":"signature","@type":"https://w3id.org/security#multibase"},"domain":"https://w3id.org/security#domain","creator":{"@id":"creator","@type":"http://www.w3.org/2001/XMLSchema#string"},"challenge":"https://w3id.org/security#challenge","created":{"@id":"created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},"expires":{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},"nonce":"https://w3id.org/security#nonce","proofPurpose":{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":true,"id":"@id","type":"@type","assertionMethod":{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},"authentication":{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},"capabilityInvocation":{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},"capabilityDelegation":{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},"keyAgreement":{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},"proofValue":{"@id":"https://w3id.org/security#proofValue","@type":"https://w3id.org/security#multibase"},"verificationMethod":{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}},"Iden3ReverseSparseMerkleTreeProof":{"@id":"https://schema.iden3.io/core/jsonld/iden3proofs.jsonld#Iden3ReverseSparseMerkleTreeProof","@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","iden3-reverse-sparse-merkle-tree-proof-vocab":"https://schema.iden3.io/core/vocab/Iden3ReverseSparseMerkleTreeProof.md#","revocationNonce":"iden3-reverse-sparse-merkle-tree-proof-vocab:revocationNonce","statusIssuer":{"@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type"},"@id":"iden3-reverse-sparse-merkle-tree-proof-vocab:statusIssuer"}}},"Iden3commRevocationStatusV1.0":{"@id":"https://schema.iden3.io/core/jsonld/iden3proofs.jsonld#Iden3commRevocationStatusV1.0","@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","iden3-comm-revocation-statusV1.0-vocab":"https://schema.iden3.io/core/vocab/Iden3commRevocationStatusV1.0.md#","revocationNonce":"iden3-comm-revocation-statusV1.0-vocab:revocationNonce","statusIssuer":{"@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type"},"@id":"iden3-comm-revocation-statusV1.0-vocab:statusIssuer"}}},"Iden3OnchainSparseMerkleTreeProof2023":{"@id":"https://schema.iden3.io/core/jsonld/iden3proofs.jsonld#Iden3OnchainSparseMerkleTreeProof2023","@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","iden3-onchain-sparse-merkle-tree-proof-2023-vocab":"https://schema.iden3.io/core/vocab/Iden3OnchainSparseMerkleTreeProof2023.md#","revocationNonce":"iden3-onchain-sparse-merkle-tree-proof-2023-vocab:revocationNonce","statusIssuer":{"@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type"},"@id":"iden3-onchain-sparse-merkle-tree-proof-2023-vocab:statusIssuer"}}},"JsonSchema2023":"https://www.w3.org/ns/credentials#JsonSchema2023","Iden3RefreshService2023":"https://schema.iden3.io/core/jsonld/iden3proofs.jsonld#Iden3RefreshService2023"}}`,
64
+ IDEN3_PROOFS_DEFINITION_DOCUMENT: `{"@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","Iden3SparseMerkleTreeProof":{"@id":"https://schema.iden3.io/core/jsonld/iden3proofs.jsonld#Iden3SparseMerkleTreeProof","@context":{"@version":1.1,"@protected":true,"@propagate":true,"id":"@id","type":"@type","sec":"https://w3id.org/security#","@vocab":"https://schema.iden3.io/core/vocab/Iden3SparseMerkleTreeProof.md#","xsd":"http://www.w3.org/2001/XMLSchema#","mtp":{"@id":"https://schema.iden3.io/core/jsonld/iden3proofs.jsonld#SparseMerkleTreeProof","@type":"SparseMerkleTreeProof"},"coreClaim":{"@id":"coreClaim","@type":"xsd:string"},"issuerData":{"@id":"issuerData","@context":{"@version":1.1,"state":{"@id":"state","@context":{"txId":{"@id":"txId","@type":"xsd:string"},"blockTimestamp":{"@id":"blockTimestamp","@type":"xsd:integer"},"blockNumber":{"@id":"blockNumber","@type":"xsd:integer"},"rootOfRoots":{"@id":"rootOfRoots","@type":"xsd:string"},"claimsTreeRoot":{"@id":"claimsTreeRoot","@type":"xsd:string"},"revocationTreeRoot":{"@id":"revocationTreeRoot","@type":"xsd:string"},"authCoreClaim":{"@id":"authCoreClaim","@type":"xsd:string"},"value":{"@id":"value","@type":"xsd:string"}}}}}}},"SparseMerkleTreeProof":{"@id":"https://schema.iden3.io/core/jsonld/iden3proofs.jsonld#SparseMerkleTreeProof","@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","sec":"https://w3id.org/security#","smt-proof-vocab":"https://schema.iden3.io/core/vocab/SparseMerkleTreeProof.md#","xsd":"http://www.w3.org/2001/XMLSchema#","existence":{"@id":"smt-proof-vocab:existence","@type":"xsd:boolean"},"revocationNonce":{"@id":"smt-proof-vocab:revocationNonce","@type":"xsd:number"},"siblings":{"@id":"smt-proof-vocab:siblings","@container":"@list"},"nodeAux":"@nest","hIndex":{"@id":"smt-proof-vocab:hIndex","@nest":"nodeAux","@type":"xsd:string"},"hValue":{"@id":"smt-proof-vocab:hValue","@nest":"nodeAux","@type":"xsd:string"}}},"BJJSignature2021":{"@id":"https://schema.iden3.io/core/jsonld/iden3proofs.jsonld#BJJSignature2021","@context":{"@version":1.1,"@protected":true,"id":"@id","@vocab":"https://schema.iden3.io/core/vocab/BJJSignature2021.md#","@propagate":true,"type":"@type","xsd":"http://www.w3.org/2001/XMLSchema#","coreClaim":{"@id":"coreClaim","@type":"xsd:string"},"issuerData":{"@id":"issuerData","@context":{"@version":1.1,"authCoreClaim":{"@id":"authCoreClaim","@type":"xsd:string"},"mtp":{"@id":"https://schema.iden3.io/core/jsonld/iden3proofs.jsonld#SparseMerkleTreeProof","@type":"SparseMerkleTreeProof"},"revocationStatus":{"@id":"revocationStatus","@type":"@id"},"state":{"@id":"state","@context":{"@version":1.1,"rootOfRoots":{"@id":"rootOfRoots","@type":"xsd:string"},"claimsTreeRoot":{"@id":"claimsTreeRoot","@type":"xsd:string"},"revocationTreeRoot":{"@id":"revocationTreeRoot","@type":"xsd:string"},"value":{"@id":"value","@type":"xsd:string"}}}}},"signature":{"@id":"signature","@type":"https://w3id.org/security#multibase"},"domain":"https://w3id.org/security#domain","creator":{"@id":"creator","@type":"http://www.w3.org/2001/XMLSchema#string"},"challenge":"https://w3id.org/security#challenge","created":{"@id":"created","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},"expires":{"@id":"https://w3id.org/security#expiration","@type":"http://www.w3.org/2001/XMLSchema#dateTime"},"nonce":"https://w3id.org/security#nonce","proofPurpose":{"@id":"https://w3id.org/security#proofPurpose","@type":"@vocab","@context":{"@protected":true,"id":"@id","type":"@type","assertionMethod":{"@id":"https://w3id.org/security#assertionMethod","@type":"@id","@container":"@set"},"authentication":{"@id":"https://w3id.org/security#authenticationMethod","@type":"@id","@container":"@set"},"capabilityInvocation":{"@id":"https://w3id.org/security#capabilityInvocationMethod","@type":"@id","@container":"@set"},"capabilityDelegation":{"@id":"https://w3id.org/security#capabilityDelegationMethod","@type":"@id","@container":"@set"},"keyAgreement":{"@id":"https://w3id.org/security#keyAgreementMethod","@type":"@id","@container":"@set"}}},"proofValue":{"@id":"https://w3id.org/security#proofValue","@type":"https://w3id.org/security#multibase"},"verificationMethod":{"@id":"https://w3id.org/security#verificationMethod","@type":"@id"}}},"Iden3ReverseSparseMerkleTreeProof":{"@id":"https://schema.iden3.io/core/jsonld/iden3proofs.jsonld#Iden3ReverseSparseMerkleTreeProof","@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","iden3-reverse-sparse-merkle-tree-proof-vocab":"https://schema.iden3.io/core/vocab/Iden3ReverseSparseMerkleTreeProof.md#","xsd":"http://www.w3.org/2001/XMLSchema#","revocationNonce":{"@id":"iden3-reverse-sparse-merkle-tree-proof-vocab:revocationNonce","@type":"xsd:integer"},"statusIssuer":{"@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type"},"@id":"iden3-reverse-sparse-merkle-tree-proof-vocab:statusIssuer"}}},"Iden3commRevocationStatusV1.0":{"@id":"https://schema.iden3.io/core/jsonld/iden3proofs.jsonld#Iden3commRevocationStatusV1.0","@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","iden3-comm-revocation-statusV1.0-vocab":"https://schema.iden3.io/core/vocab/Iden3commRevocationStatusV1.0.md#","xsd":"http://www.w3.org/2001/XMLSchema#","revocationNonce":{"@id":"iden3-comm-revocation-statusV1.0-vocab:revocationNonce","@type":"xsd:integer"},"statusIssuer":{"@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type"},"@id":"iden3-comm-revocation-statusV1.0-vocab:statusIssuer"}}},"Iden3OnchainSparseMerkleTreeProof2023":{"@id":"https://schema.iden3.io/core/jsonld/iden3proofs.jsonld#Iden3OnchainSparseMerkleTreeProof2023","@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","iden3-onchain-sparse-merkle-tree-proof-2023-vocab":"https://schema.iden3.io/core/vocab/Iden3OnchainSparseMerkleTreeProof2023.md#","xsd":"http://www.w3.org/2001/XMLSchema#","revocationNonce":{"@id":"iden3-onchain-sparse-merkle-tree-proof-2023-vocab:revocationNonce","@type":"xsd:integer"},"statusIssuer":{"@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type"},"@id":"iden3-onchain-sparse-merkle-tree-proof-2023-vocab:statusIssuer"}}},"JsonSchema2023":"https://www.w3.org/ns/credentials#JsonSchema2023","Iden3RefreshService2023":"https://schema.iden3.io/core/jsonld/iden3proofs.jsonld#Iden3RefreshService2023"}}`,
65
65
  IDEN3_DISPLAY_METHOD_DEFINITION_DOCUMENT: `{"@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","displayMethod":{"@id":"https://schema.iden3.io/core/vocab/displayMethod.md#displayMethod","@type":"@id","@context":{"@version":1.1,"@protected":true,"id":"@id","type":"@type","Iden3BasicDisplayMethodV1":"https://schema.iden3.io/core/vocab/displayMethod.md#Iden3BasicDisplayMethodV1"}}}}`
66
66
  },
67
67
  // JsonSchema2023 JSON schema for verification of Iden3Credential