@nevermined-io/core-kit 0.1.4 → 0.1.6

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 (145) hide show
  1. package/dist/Instantiable.abstract.d.ts +33 -0
  2. package/dist/Instantiable.abstract.d.ts.map +1 -0
  3. package/dist/Instantiable.abstract.js +98 -0
  4. package/dist/artifacts/generated.d.ts +39371 -0
  5. package/dist/artifacts/generated.d.ts.map +1 -0
  6. package/dist/artifacts/generated.js +21448 -0
  7. package/dist/contracts/AccessManager.d.ts +17 -0
  8. package/dist/contracts/AccessManager.d.ts.map +1 -0
  9. package/dist/contracts/AccessManager.js +15 -0
  10. package/dist/contracts/AssetRegistry.d.ts +105 -0
  11. package/dist/contracts/AssetRegistry.d.ts.map +1 -0
  12. package/dist/contracts/AssetRegistry.js +155 -0
  13. package/dist/contracts/ContractBase.d.ts +45 -0
  14. package/dist/contracts/ContractBase.d.ts.map +1 -0
  15. package/dist/contracts/ContractBase.js +519 -0
  16. package/dist/contracts/ContractsApi.d.ts +69 -0
  17. package/dist/contracts/ContractsApi.d.ts.map +1 -0
  18. package/dist/contracts/ContractsApi.js +73 -0
  19. package/dist/contracts/CryptoTemplateBase.d.ts +11 -0
  20. package/dist/contracts/CryptoTemplateBase.d.ts.map +1 -0
  21. package/dist/contracts/CryptoTemplateBase.js +49 -0
  22. package/dist/contracts/FiatPaymentTemplate.d.ts +10 -0
  23. package/dist/contracts/FiatPaymentTemplate.d.ts.map +1 -0
  24. package/dist/contracts/FiatPaymentTemplate.js +14 -0
  25. package/dist/contracts/FiatSettlementCondition.d.ts +11 -0
  26. package/dist/contracts/FiatSettlementCondition.d.ts.map +1 -0
  27. package/dist/contracts/FiatSettlementCondition.js +18 -0
  28. package/dist/contracts/FixedPaymentTemplate.d.ts +12 -0
  29. package/dist/contracts/FixedPaymentTemplate.d.ts.map +1 -0
  30. package/dist/contracts/FixedPaymentTemplate.js +62 -0
  31. package/dist/contracts/NFT1155Base.d.ts +50 -0
  32. package/dist/contracts/NFT1155Base.d.ts.map +1 -0
  33. package/dist/contracts/NFT1155Base.js +24 -0
  34. package/dist/contracts/NFT1155Credits.d.ts +6 -0
  35. package/dist/contracts/NFT1155Credits.d.ts.map +1 -0
  36. package/dist/contracts/NFT1155Credits.js +9 -0
  37. package/dist/contracts/NFT1155ExpirableCredits.d.ts +34 -0
  38. package/dist/contracts/NFT1155ExpirableCredits.d.ts.map +1 -0
  39. package/dist/contracts/NFT1155ExpirableCredits.js +18 -0
  40. package/dist/contracts/NVMConfig.d.ts +10 -0
  41. package/dist/contracts/NVMConfig.d.ts.map +1 -0
  42. package/dist/contracts/NVMConfig.js +18 -0
  43. package/dist/contracts/PayAsYouGoTemplate.d.ts +12 -0
  44. package/dist/contracts/PayAsYouGoTemplate.d.ts.map +1 -0
  45. package/dist/contracts/PayAsYouGoTemplate.js +62 -0
  46. package/dist/contracts/ProtocolStandardFees.d.ts +9 -0
  47. package/dist/contracts/ProtocolStandardFees.d.ts.map +1 -0
  48. package/dist/contracts/ProtocolStandardFees.js +15 -0
  49. package/dist/contracts/Roles.d.ts +13 -0
  50. package/dist/contracts/Roles.d.ts.map +1 -0
  51. package/dist/contracts/Roles.js +12 -0
  52. package/dist/contracts/index.d.ts +3 -0
  53. package/dist/contracts/index.d.ts.map +1 -0
  54. package/dist/contracts/index.js +2 -0
  55. package/dist/errors/NeverminedErrors.d.ts +74 -0
  56. package/dist/errors/NeverminedErrors.d.ts.map +1 -0
  57. package/dist/errors/NeverminedErrors.js +128 -0
  58. package/dist/errors/index.d.ts +2 -0
  59. package/dist/errors/index.d.ts.map +1 -0
  60. package/dist/errors/index.js +1 -0
  61. package/dist/index.d.ts +8 -0
  62. package/dist/index.d.ts.map +1 -0
  63. package/dist/index.js +8 -0
  64. package/dist/models/AgentAccessToken.d.ts +123 -0
  65. package/dist/models/AgentAccessToken.d.ts.map +1 -0
  66. package/dist/models/AgentAccessToken.js +164 -0
  67. package/dist/models/AgentX402AccessToken.d.ts +59 -0
  68. package/dist/models/AgentX402AccessToken.d.ts.map +1 -0
  69. package/dist/models/AgentX402AccessToken.js +78 -0
  70. package/dist/models/Logger.d.ts +9 -0
  71. package/dist/models/Logger.d.ts.map +1 -0
  72. package/dist/models/Logger.js +27 -0
  73. package/dist/models/NeverminedOptions.d.ts +30 -0
  74. package/dist/models/NeverminedOptions.d.ts.map +1 -0
  75. package/dist/models/NeverminedOptions.js +28 -0
  76. package/dist/models/NvmApiKey.d.ts +137 -0
  77. package/dist/models/NvmApiKey.d.ts.map +1 -0
  78. package/dist/models/NvmApiKey.js +235 -0
  79. package/dist/models/Transactions.d.ts +11 -0
  80. package/dist/models/Transactions.d.ts.map +1 -0
  81. package/dist/models/Transactions.js +1 -0
  82. package/dist/models/index.d.ts +7 -0
  83. package/dist/models/index.d.ts.map +1 -0
  84. package/dist/models/index.js +6 -0
  85. package/dist/nevermined/Nevermined.d.ts +48 -0
  86. package/dist/nevermined/Nevermined.d.ts.map +1 -0
  87. package/dist/nevermined/Nevermined.js +72 -0
  88. package/dist/nevermined/api/PaymentsApi.d.ts +24 -0
  89. package/dist/nevermined/api/PaymentsApi.d.ts.map +1 -0
  90. package/dist/nevermined/api/PaymentsApi.js +179 -0
  91. package/dist/nevermined/api/ServicesApi.d.ts +23 -0
  92. package/dist/nevermined/api/ServicesApi.d.ts.map +1 -0
  93. package/dist/nevermined/api/ServicesApi.js +27 -0
  94. package/dist/nevermined/api/UtilsApi.d.ts +28 -0
  95. package/dist/nevermined/api/UtilsApi.d.ts.map +1 -0
  96. package/dist/nevermined/api/UtilsApi.js +33 -0
  97. package/dist/nevermined/index.d.ts +3 -0
  98. package/dist/nevermined/index.d.ts.map +1 -0
  99. package/dist/nevermined/index.js +2 -0
  100. package/dist/nevermined/utils/AgentUtils.d.ts +8 -0
  101. package/dist/nevermined/utils/AgentUtils.d.ts.map +1 -0
  102. package/dist/nevermined/utils/AgentUtils.js +56 -0
  103. package/dist/nevermined/utils/BlockchainViemUtils.d.ts +280 -0
  104. package/dist/nevermined/utils/BlockchainViemUtils.d.ts.map +1 -0
  105. package/dist/nevermined/utils/BlockchainViemUtils.js +408 -0
  106. package/dist/nevermined/utils/JwtUtils.d.ts +27 -0
  107. package/dist/nevermined/utils/JwtUtils.d.ts.map +1 -0
  108. package/dist/nevermined/utils/JwtUtils.js +161 -0
  109. package/dist/nevermined/utils/SignatureUtils.d.ts +14 -0
  110. package/dist/nevermined/utils/SignatureUtils.d.ts.map +1 -0
  111. package/dist/nevermined/utils/SignatureUtils.js +99 -0
  112. package/dist/nevermined/utils/WebServiceConnector.d.ts +30 -0
  113. package/dist/nevermined/utils/WebServiceConnector.d.ts.map +1 -0
  114. package/dist/nevermined/utils/WebServiceConnector.js +170 -0
  115. package/dist/nevermined/utils/ZeroDevPolicies.d.ts +38 -0
  116. package/dist/nevermined/utils/ZeroDevPolicies.d.ts.map +1 -0
  117. package/dist/nevermined/utils/ZeroDevPolicies.js +196 -0
  118. package/dist/nevermined/utils/index.d.ts +7 -0
  119. package/dist/nevermined/utils/index.d.ts.map +1 -0
  120. package/dist/nevermined/utils/index.js +6 -0
  121. package/dist/services/Api.d.ts +7 -0
  122. package/dist/services/Api.d.ts.map +1 -0
  123. package/dist/services/Api.js +25 -0
  124. package/dist/services/Profiles.d.ts +16 -0
  125. package/dist/services/Profiles.d.ts.map +1 -0
  126. package/dist/services/Profiles.js +84 -0
  127. package/dist/services/index.d.ts +3 -0
  128. package/dist/services/index.d.ts.map +1 -0
  129. package/dist/services/index.js +2 -0
  130. package/dist/utils/ConversionTypeHelpers.d.ts +5 -0
  131. package/dist/utils/ConversionTypeHelpers.d.ts.map +1 -0
  132. package/dist/utils/ConversionTypeHelpers.js +30 -0
  133. package/dist/utils/DeploymentInfo.d.ts +15 -0
  134. package/dist/utils/DeploymentInfo.d.ts.map +1 -0
  135. package/dist/utils/DeploymentInfo.js +38 -0
  136. package/dist/utils/Network.d.ts +5 -0
  137. package/dist/utils/Network.d.ts.map +1 -0
  138. package/dist/utils/Network.js +224 -0
  139. package/dist/utils/helpers.d.ts +40 -0
  140. package/dist/utils/helpers.d.ts.map +1 -0
  141. package/dist/utils/helpers.js +189 -0
  142. package/dist/utils/index.d.ts +5 -0
  143. package/dist/utils/index.d.ts.map +1 -0
  144. package/dist/utils/index.js +4 -0
  145. package/package.json +3 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NeverminedErrors.d.ts","sourceRoot":"","sources":["../../src/errors/NeverminedErrors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAE9B,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM;CAG5B;AAED,qBAAa,UAAW,SAAQ,KAAK;gBACvB,OAAO,EAAE,MAAM;CAG5B;AAED,qBAAa,SAAU,SAAQ,KAAK;gBACtB,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;CAG1C;AAED,qBAAa,cAAe,SAAQ,KAAK;gBAC3B,OAAO,EAAE,MAAM;CAG5B;AAED,qBAAa,uBAAwB,SAAQ,KAAK;gBACpC,OAAO,EAAE,MAAM;CAG5B;AAED,qBAAa,SAAU,SAAQ,KAAK;gBACtB,OAAO,EAAE,MAAM;CAG5B;AAED,qBAAa,QAAS,SAAQ,KAAK;gBACrB,OAAO,EAAE,MAAM;CAG5B;AAED,qBAAa,QAAS,SAAQ,KAAK;gBACrB,OAAO,EAAE,MAAM;CAG5B;AAED,qBAAa,uBAAwB,SAAQ,QAAQ;gBACvC,OAAO,EAAE,MAAM;CAG5B;AAED,qBAAa,wBAAyB,SAAQ,QAAQ;gBACxC,OAAO,EAAE,MAAM;CAG5B;AAED,qBAAa,cAAe,SAAQ,KAAK;gBAC3B,OAAO,CAAC,EAAE,OAAO;CAG9B;AAED,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM;CAG5B;AAED,qBAAa,kBAAmB,SAAQ,KAAK;gBAC/B,OAAO,EAAE,MAAM;CAG5B;AAED,qBAAa,YAAa,SAAQ,KAAK;gBACzB,OAAO,EAAE,MAAM;CAG5B;AAED,qBAAa,aAAc,SAAQ,KAAK;gBAC1B,OAAO,EAAE,MAAM;CAG5B;AAED,qBAAa,UAAW,SAAQ,KAAK;gBACvB,OAAO,EAAE,MAAM;CAG5B;AAED,qBAAa,sBAAuB,SAAQ,KAAK;gBACnC,OAAO,EAAE,MAAM;CAG5B;AAED,qBAAa,QAAS,SAAQ,KAAK;gBACrB,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;CAW1C;AAED,qBAAa,uBAAwB,SAAQ,QAAQ;gBACvC,WAAW,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;CAG9C;AAED,qBAAa,uBAAwB,SAAQ,QAAQ;gBACvC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAG/C;AAED,qBAAa,yBAA0B,SAAQ,QAAQ;gBACzC,aAAa,EAAE,MAAM;CAGlC;AAED,qBAAa,qBAAsB,SAAQ,QAAQ;gBACrC,aAAa,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM;CAGtD;AAED,qBAAa,qBAAsB,SAAQ,QAAQ;gBACrC,WAAW,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;CAG9C;AAED,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM;CAG5B"}
@@ -0,0 +1,128 @@
1
+ export class NeverminedNodeError extends Error {
2
+ constructor(message) {
3
+ super(`Nevermined Node error: ${message}`);
4
+ }
5
+ }
6
+ export class GraphError extends Error {
7
+ constructor(message) {
8
+ super(`Graph error: ${message}`);
9
+ }
10
+ }
11
+ export class HttpError extends Error {
12
+ constructor(message, code) {
13
+ super(`Http error with code ${code}: ${message}`);
14
+ }
15
+ }
16
+ export class ContractsError extends Error {
17
+ constructor(message) {
18
+ super(`Contracts error: ${message}`);
19
+ }
20
+ }
21
+ export class ContractSimulationError extends Error {
22
+ constructor(message) {
23
+ super(`Contract simulation error: ${message}`);
24
+ }
25
+ }
26
+ export class Web3Error extends Error {
27
+ constructor(message) {
28
+ super(`Web3 error: ${message}`);
29
+ }
30
+ }
31
+ export class ApiError extends Error {
32
+ constructor(message) {
33
+ super(`Api error: ${message}`);
34
+ }
35
+ }
36
+ export class NFTError extends Error {
37
+ constructor(message) {
38
+ super(`NFT error: ${message}`);
39
+ }
40
+ }
41
+ export class DynamicCreditsOverLimit extends NFTError {
42
+ constructor(message) {
43
+ super(`DynamicCreditsOverLimit error: ${message}`);
44
+ }
45
+ }
46
+ export class DynamicCreditsUnderLimit extends NFTError {
47
+ constructor(message) {
48
+ super(`DynamicCreditsUnderLimit error: ${message}`);
49
+ }
50
+ }
51
+ export class InvalidAddress extends Error {
52
+ constructor(address) {
53
+ super(`Invalid Address ${address}`);
54
+ }
55
+ }
56
+ export class NotEnoughBalance extends Error {
57
+ constructor(message) {
58
+ super(`NotEnoughBalance: ${message}`);
59
+ }
60
+ }
61
+ export class MethodNotSupported extends Error {
62
+ constructor(message) {
63
+ super(`MethodNotSupported: ${message}`);
64
+ }
65
+ }
66
+ export class PlanNotFound extends Error {
67
+ constructor(message) {
68
+ super(`PlanNotFound: ${message}`);
69
+ }
70
+ }
71
+ export class AgentNotFound extends Error {
72
+ constructor(message) {
73
+ super(`AgentNotFound: ${message}`);
74
+ }
75
+ }
76
+ export class AssetError extends Error {
77
+ constructor(message) {
78
+ super(`Asset error: ${message}`);
79
+ }
80
+ }
81
+ export class PaymentFeesNotIncluded extends Error {
82
+ constructor(message) {
83
+ super(`PaymentFeesNotIncluded: ${message}`);
84
+ }
85
+ }
86
+ export class DDOError extends Error {
87
+ constructor(message, did) {
88
+ if (did) {
89
+ super(`DDO(${did}) error: ${message}`);
90
+ }
91
+ else {
92
+ super(`DDO error: ${message}`);
93
+ }
94
+ // from https://bobbyhadz.com/blog/typescript-extend-error-class
95
+ // 👇️ because we are extending a built-in class
96
+ Object.setPrototypeOf(this, DDOError.prototype);
97
+ }
98
+ }
99
+ export class DDOServiceNotFoundError extends DDOError {
100
+ constructor(serviceType, did) {
101
+ super(`Service with type "${serviceType}" not found`, did);
102
+ }
103
+ }
104
+ export class DDOServiceAlreadyExists extends DDOError {
105
+ constructor(serviceType, index) {
106
+ super(`Service with type "${serviceType}" and index ${index} already exists`);
107
+ }
108
+ }
109
+ export class DDOConditionNotFoundError extends DDOError {
110
+ constructor(conditionName) {
111
+ super(`Condition with name "${conditionName}" not found`);
112
+ }
113
+ }
114
+ export class DDOParamNotFoundError extends DDOError {
115
+ constructor(conditionName, paramName) {
116
+ super(`Parameter "${paramName}" not found on Condition with type "${conditionName}"`);
117
+ }
118
+ }
119
+ export class DDOPriceNotFoundError extends DDOError {
120
+ constructor(serviceType, did) {
121
+ super(`Service with type "${serviceType}" is not priced.`, did);
122
+ }
123
+ }
124
+ export class NvmAccountError extends Error {
125
+ constructor(message) {
126
+ super(`NVM Account error: ${message}`);
127
+ }
128
+ }
@@ -0,0 +1,2 @@
1
+ export * from './NeverminedErrors.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
@@ -0,0 +1 @@
1
+ export * from './NeverminedErrors.js';
@@ -0,0 +1,8 @@
1
+ export * from './contracts/index.js';
2
+ export * from './models/index.js';
3
+ export * from './nevermined/index.js';
4
+ export * from './nevermined/Nevermined.js';
5
+ export * from './errors/index.js';
6
+ export * from './Instantiable.abstract.js';
7
+ export * from './utils/index.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,mBAAmB,CAAA;AAEjC,cAAc,4BAA4B,CAAA;AAG1C,cAAc,kBAAkB,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ export * from './contracts/index.js';
2
+ export * from './models/index.js';
3
+ export * from './nevermined/index.js';
4
+ export * from './nevermined/Nevermined.js';
5
+ export * from './errors/index.js';
6
+ export * from './Instantiable.abstract.js';
7
+ // Utils
8
+ export * from './utils/index.js';
@@ -0,0 +1,123 @@
1
+ import { JWTPayload } from 'jose';
2
+ import { Account } from 'viem';
3
+ import { SmartAccount } from 'viem/account-abstraction';
4
+ import { SignatureUtils } from '../nevermined/utils/SignatureUtils.js';
5
+ /**
6
+ * The access to remote agents is granted through an authorization token.
7
+ * This token is generated using the AgentAccessToken JWT structure.
8
+ * AgentAccessToken:
9
+ * authToken: JWTAuthTokenParams
10
+ * proof: JWTRedemptionProofParams
11
+ */
12
+ export interface JWTAuthTokenParams {
13
+ /**
14
+ * The agent identifier related with the authorization token.
15
+ */
16
+ agentId: string;
17
+ /**
18
+ * The plan identifier related with the authorization token.
19
+ */
20
+ planId: string;
21
+ /**
22
+ * The public address of the account the key is issued for.
23
+ */
24
+ sub: `0x${string}`;
25
+ /**
26
+ * The public address of the account issuing the key.
27
+ */
28
+ iss?: `0x${string}`;
29
+ /**
30
+ * The chain id of the network the token is valid for. If zero the key is not having any network limitation
31
+ */
32
+ aud?: string;
33
+ /**
34
+ * JWT Expiration Time
35
+ *
36
+ * @see {@link https://www.rfc-editor.org/rfc/rfc7519#section-4.1.4 RFC7519#section-4.1.4}
37
+ */
38
+ exp?: number;
39
+ /**
40
+ * JWT Issued At
41
+ *
42
+ * @see {@link https://www.rfc-editor.org/rfc/rfc7519#section-4.1.6 RFC7519#section-4.1.6}
43
+ */
44
+ iat?: number;
45
+ [key: string]: unknown;
46
+ }
47
+ export interface JWTRedemptionProofParams {
48
+ keyspace: string;
49
+ nonce: string;
50
+ planIds: string[];
51
+ }
52
+ export declare class AgentAccessToken implements JWTPayload {
53
+ /**
54
+ * The version of the access token
55
+ */
56
+ ver?: string;
57
+ /**
58
+ * The authorization token used to query the agent.
59
+ * This token is validated by the agent or proxy to ensure the request is authorized
60
+ * {@see {@link AgentAuthTokenParams}}
61
+ */
62
+ authToken?: string;
63
+ /**
64
+ * The proof generated by the subscriber (sub) to prove the request to query the agent
65
+ * {@see {@link JWTRedemptionProofParams}
66
+ */
67
+ proof?: string;
68
+ iss?: string | undefined;
69
+ sub?: string | undefined;
70
+ aud?: string | string[] | undefined;
71
+ exp?: number;
72
+ iat?: number;
73
+ [propName: string]: unknown;
74
+ _signatureUtils: SignatureUtils;
75
+ _issuerAccount: Account | SmartAccount;
76
+ private constructor();
77
+ /**
78
+ * It generates a new serialized and encrypted NvmApiKey including the ZeroDev session key and the Marketplace auth token.
79
+ * The string representing this key can be used to authenticate against the Nevermined API.
80
+ * @param signatureUtils The SignatureUtils instance
81
+ * @param issuerAccount The account issuing the key
82
+
83
+ */
84
+ static generate(signatureUtils: SignatureUtils, issuerAccount: Account | SmartAccount, agentId: string | bigint, planId: string | bigint, subscriberAddress: `0x${string}`, expirationTime?: number | string, version?: string): Promise<AgentAccessToken>;
85
+ setRedemptionProof(keyspace: string, nonce: string): Promise<this>;
86
+ decodeAuthToken(): JWTAuthTokenParams;
87
+ /**
88
+ * It serializes the NVM Api Key into a string
89
+ * @returns a string representing the NVM API Key
90
+ */
91
+ serialize(): string;
92
+ /**
93
+ * It serializes the NVM Api Key into a string
94
+ * @returns a string representing the NVM API Key
95
+ */
96
+ toString(): string;
97
+ /**
98
+ * It generates a signed JWT from the NvmApiKey
99
+ * @param signatureUtils The SignatureUtils instance
100
+ * @param issuerAccount The account issuing the key
101
+ * @returns the string in JWT format represeting the NvmApiKey
102
+ */
103
+ toJWT(): Promise<string>;
104
+ static fromJWT(jwtString: string, signatureUtils: SignatureUtils, issuerAddress: Account | SmartAccount): AgentAccessToken;
105
+ /**
106
+ * It decodes a string JWT into a JWTPayload
107
+ * @param str jwt string
108
+ * @returns the JWTPayload
109
+ */
110
+ static decodeJWT(str: string): JWTPayload;
111
+ /**
112
+ * It generates the hash of the NvmApiKey
113
+ * @returns a string representing the hash of the NvmApiKey
114
+ */
115
+ hash(): string;
116
+ /**
117
+ * Given a serialized string, it generates the hash
118
+ * @param serialized the serialized string
119
+ * @returns the hash
120
+ */
121
+ static hash(serialized: string): string;
122
+ }
123
+ //# sourceMappingURL=AgentAccessToken.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentAccessToken.d.ts","sourceRoot":"","sources":["../../src/models/AgentAccessToken.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,MAAM,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGvD,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAA;AAEtE;;;;;;GAMG;AAEH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,GAAG,EAAE,KAAK,MAAM,EAAE,CAAA;IAClB;;OAEG;IACH,GAAG,CAAC,EAAE,KAAK,MAAM,EAAE,CAAA;IACnB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB;AAED,qBAAa,gBAAiB,YAAW,UAAU;IACjD;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAA;IACnC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAA;IAE3B,eAAe,EAAE,cAAc,CAAA;IAC/B,cAAc,EAAE,OAAO,GAAG,YAAY,CAAA;IAEtC,OAAO;IAMP;;;;;;OAMG;WACiB,QAAQ,CAC1B,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,OAAO,GAAG,YAAY,EACrC,OAAO,EAAE,MAAM,GAAG,MAAM,EACxB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,iBAAiB,EAAE,KAAK,MAAM,EAAE,EAChC,cAAc,GAAE,MAAM,GAAG,MAAa,EACtC,OAAO,SAAM,GACZ,OAAO,CAAC,gBAAgB,CAAC;IA8Bf,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAWxD,eAAe,IAAI,kBAAkB;IAiB5C;;;OAGG;IACI,SAAS,IAAI,MAAM;IAI1B;;;OAGG;IACI,QAAQ,IAAI,MAAM;IAUzB;;;;;OAKG;IACU,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC;WAYvB,OAAO,CACnB,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,OAAO,GAAG,YAAY,GACpC,gBAAgB;IAWnB;;;;OAIG;WACW,SAAS,CAAC,GAAG,EAAE,MAAM;IAInC;;;OAGG;IACI,IAAI;IAIX;;;;OAIG;IACH,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM;CAG/B"}
@@ -0,0 +1,164 @@
1
+ import { decodeJwt } from 'jose';
2
+ import { getChecksumAddress } from '../nevermined/utils/BlockchainViemUtils.js';
3
+ import { EthSignJWT } from '../nevermined/utils/JwtUtils.js';
4
+ import { SignatureUtils } from '../nevermined/utils/SignatureUtils.js';
5
+ export class AgentAccessToken {
6
+ /**
7
+ * The version of the access token
8
+ */
9
+ ver;
10
+ /**
11
+ * The authorization token used to query the agent.
12
+ * This token is validated by the agent or proxy to ensure the request is authorized
13
+ * {@see {@link AgentAuthTokenParams}}
14
+ */
15
+ authToken;
16
+ /**
17
+ * The proof generated by the subscriber (sub) to prove the request to query the agent
18
+ * {@see {@link JWTRedemptionProofParams}
19
+ */
20
+ proof;
21
+ iss;
22
+ sub;
23
+ aud;
24
+ exp;
25
+ iat;
26
+ _signatureUtils;
27
+ _issuerAccount;
28
+ constructor(signatureUtils, issuerAccount) {
29
+ this.ver = '1';
30
+ this._signatureUtils = signatureUtils;
31
+ this._issuerAccount = issuerAccount;
32
+ }
33
+ /**
34
+ * It generates a new serialized and encrypted NvmApiKey including the ZeroDev session key and the Marketplace auth token.
35
+ * The string representing this key can be used to authenticate against the Nevermined API.
36
+ * @param signatureUtils The SignatureUtils instance
37
+ * @param issuerAccount The account issuing the key
38
+
39
+ */
40
+ static async generate(signatureUtils, issuerAccount, agentId, planId, subscriberAddress, expirationTime = '1y', version = '1') {
41
+ const issuerAddress = getChecksumAddress(issuerAccount.address);
42
+ const chainId = signatureUtils.client.chain?.id || 0;
43
+ const sub = getChecksumAddress(subscriberAddress);
44
+ const jwtAuth = {
45
+ iss: issuerAddress,
46
+ aud: chainId.toString(),
47
+ sub,
48
+ agentId: typeof agentId === 'bigint' ? agentId.toString() : agentId,
49
+ planId: typeof planId === 'bigint' ? planId.toString() : planId,
50
+ };
51
+ const signedJWTAuth = await new EthSignJWT(jwtAuth)
52
+ .setProtectedHeader({ alg: 'ES256K' })
53
+ .setIssuedAt()
54
+ .setExpirationTime(expirationTime)
55
+ .ethSign(signatureUtils, issuerAccount);
56
+ // const jwtAccessToken: JWTAgentAccessToken = {
57
+ // ver: version,
58
+ // authToken: signedJWTAuth,
59
+ // proof: undefined, // This can be set later when the proof is generated
60
+ // }
61
+ const agentAccessToken = new AgentAccessToken(signatureUtils, issuerAccount);
62
+ agentAccessToken.ver = version;
63
+ agentAccessToken.authToken = signedJWTAuth;
64
+ agentAccessToken.proof = undefined; // This can be set later when the proof is generated
65
+ return agentAccessToken;
66
+ }
67
+ async setRedemptionProof(keyspace, nonce) {
68
+ const jwtPayload = decodeJwt(this.authToken);
69
+ const proofParams = {
70
+ keyspace,
71
+ nonce,
72
+ planIds: [String(jwtPayload.planId)],
73
+ };
74
+ this.proof = JSON.stringify(proofParams);
75
+ return this;
76
+ }
77
+ decodeAuthToken() {
78
+ if (!this.authToken) {
79
+ throw new Error('Auth token is not set');
80
+ }
81
+ const jwt = decodeJwt(this.authToken);
82
+ return {
83
+ agentId: jwt.agentId,
84
+ planId: jwt.planId,
85
+ sub: jwt.sub,
86
+ iss: jwt.iss,
87
+ aud: jwt.aud,
88
+ exp: jwt.exp,
89
+ iat: jwt.iat,
90
+ };
91
+ }
92
+ /**
93
+ * It serializes the NVM Api Key into a string
94
+ * @returns a string representing the NVM API Key
95
+ */
96
+ serialize() {
97
+ return this.toString();
98
+ }
99
+ /**
100
+ * It serializes the NVM Api Key into a string
101
+ * @returns a string representing the NVM API Key
102
+ */
103
+ toString() {
104
+ const params = {};
105
+ Object.keys(this)
106
+ .filter((val) => val !== undefined)
107
+ .forEach((key) => {
108
+ if (!key.startsWith('_'))
109
+ params[key] = this[key];
110
+ });
111
+ return JSON.stringify(params);
112
+ }
113
+ /**
114
+ * It generates a signed JWT from the NvmApiKey
115
+ * @param signatureUtils The SignatureUtils instance
116
+ * @param issuerAccount The account issuing the key
117
+ * @returns the string in JWT format represeting the NvmApiKey
118
+ */
119
+ async toJWT() {
120
+ const params = {};
121
+ Object.keys(this)
122
+ .filter((val) => val !== undefined)
123
+ .forEach((key) => {
124
+ if (!key.startsWith('_'))
125
+ params[key] = this[key];
126
+ });
127
+ const jwt = new EthSignJWT(params).setProtectedHeader({ alg: 'ES256K' });
128
+ return jwt.ethSign(this._signatureUtils, this._issuerAccount);
129
+ }
130
+ static fromJWT(jwtString, signatureUtils, issuerAddress) {
131
+ const jwt = AgentAccessToken.decodeJWT(jwtString);
132
+ const agentAccessToken = new AgentAccessToken(signatureUtils, issuerAddress);
133
+ Object.keys(jwt)
134
+ .filter((val) => val !== undefined)
135
+ .forEach((key) => {
136
+ if (!key.startsWith('_'))
137
+ agentAccessToken[key] = jwt[key];
138
+ });
139
+ return agentAccessToken;
140
+ }
141
+ /**
142
+ * It decodes a string JWT into a JWTPayload
143
+ * @param str jwt string
144
+ * @returns the JWTPayload
145
+ */
146
+ static decodeJWT(str) {
147
+ return decodeJwt(str);
148
+ }
149
+ /**
150
+ * It generates the hash of the NvmApiKey
151
+ * @returns a string representing the hash of the NvmApiKey
152
+ */
153
+ hash() {
154
+ return SignatureUtils.hash(this.serialize());
155
+ }
156
+ /**
157
+ * Given a serialized string, it generates the hash
158
+ * @param serialized the serialized string
159
+ * @returns the hash
160
+ */
161
+ static hash(serialized) {
162
+ return SignatureUtils.hash(serialized);
163
+ }
164
+ }
@@ -0,0 +1,59 @@
1
+ import { PublicClient } from 'viem';
2
+ import { SmartAccount } from 'viem/account-abstraction';
3
+ export type AgentX402AccessToken = {
4
+ x402Version: number;
5
+ scheme: string;
6
+ network: string;
7
+ payload: {
8
+ signature: `0x${string}`;
9
+ authorization: {
10
+ sessionKeysProvider: string;
11
+ sessionKeys: {
12
+ id: string;
13
+ data: string;
14
+ }[];
15
+ };
16
+ };
17
+ };
18
+ export type NeverminedTypedDataDomain = {
19
+ name: 'Nevermined';
20
+ version: '1';
21
+ chainId: number;
22
+ verifyingContract: `0x${string}`;
23
+ };
24
+ export type NeverminedTypedData = {
25
+ SessionKey: [{
26
+ name: 'id';
27
+ type: 'string';
28
+ }, {
29
+ name: 'data';
30
+ type: 'string';
31
+ }];
32
+ SessionKeys: [{
33
+ name: 'sessionKeys';
34
+ type: 'SessionKey[]';
35
+ }];
36
+ Authorization: [
37
+ {
38
+ name: 'sessionKeysProvider';
39
+ type: 'string';
40
+ },
41
+ {
42
+ name: 'sessionKeys';
43
+ type: 'SessionKey[]';
44
+ }
45
+ ];
46
+ };
47
+ export declare const NeverminedTypedDataTypes: NeverminedTypedData;
48
+ export type NeverminedTypedDataMessage = {
49
+ sessionKeysProvider: string;
50
+ sessionKeys: {
51
+ id: string;
52
+ data: string;
53
+ }[];
54
+ };
55
+ export declare const generateAgentX402AccessToken: (subscriber: SmartAccount, orderSessionKey: string, burnSessionKey: string, publicClient: PublicClient) => Promise<AgentX402AccessToken>;
56
+ export declare const verifyAgentX402AccessToken: (accessToken: AgentX402AccessToken, publicClient: PublicClient, subscriberAddress: `0x${string}`) => Promise<boolean>;
57
+ export declare const b64EncodeX402AccessToken: (accessToken: AgentX402AccessToken) => string;
58
+ export declare const b64DecodeX402AccessToken: (encoded: string) => AgentX402AccessToken;
59
+ //# sourceMappingURL=AgentX402AccessToken.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentX402AccessToken.d.ts","sourceRoot":"","sources":["../../src/models/AgentX402AccessToken.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAgC,MAAM,MAAM,CAAA;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEvD,MAAM,MAAM,oBAAoB,GAAG;IACjC,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE;QACP,SAAS,EAAE,KAAK,MAAM,EAAE,CAAA;QACxB,aAAa,EAAE;YACb,mBAAmB,EAAE,MAAM,CAAA;YAC3B,WAAW,EAAE;gBAAE,EAAE,EAAE,MAAM,CAAC;gBAAC,IAAI,EAAE,MAAM,CAAA;aAAE,EAAE,CAAA;SAC5C,CAAA;KACF,CAAA;CACF,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,EAAE,GAAG,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,iBAAiB,EAAE,KAAK,MAAM,EAAE,CAAA;CACjC,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,EAAE,CAAC;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,IAAI,EAAE,QAAQ,CAAA;KAAE,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,QAAQ,CAAA;KAAE,CAAC,CAAA;IAC9E,WAAW,EAAE,CAAC;QAAE,IAAI,EAAE,aAAa,CAAC;QAAC,IAAI,EAAE,cAAc,CAAA;KAAE,CAAC,CAAA;IAC5D,aAAa,EAAE;QACb;YAAE,IAAI,EAAE,qBAAqB,CAAC;YAAC,IAAI,EAAE,QAAQ,CAAA;SAAE;QAC/C;YAAE,IAAI,EAAE,aAAa,CAAC;YAAC,IAAI,EAAE,cAAc,CAAA;SAAE;KAC9C,CAAA;CACF,CAAA;AAED,eAAO,MAAM,wBAAwB,EAAE,mBAUtC,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,mBAAmB,EAAE,MAAM,CAAA;IAC3B,WAAW,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAC5C,CAAA;AAED,eAAO,MAAM,4BAA4B,GACvC,YAAY,YAAY,EACxB,iBAAiB,MAAM,EACvB,gBAAgB,MAAM,EACtB,cAAc,YAAY,KACzB,OAAO,CAAC,oBAAoB,CA+C9B,CAAA;AAED,eAAO,MAAM,0BAA0B,GACrC,aAAa,oBAAoB,EACjC,cAAc,YAAY,EAC1B,mBAAmB,KAAK,MAAM,EAAE,KAC/B,OAAO,CAAC,OAAO,CAiBjB,CAAA;AAED,eAAO,MAAM,wBAAwB,GAAI,aAAa,oBAAoB,KAAG,MAE5E,CAAA;AAED,eAAO,MAAM,wBAAwB,GAAI,SAAS,MAAM,KAAG,oBAE1D,CAAA"}
@@ -0,0 +1,78 @@
1
+ import { keccak256, toBytes } from 'viem';
2
+ export const NeverminedTypedDataTypes = {
3
+ SessionKey: [
4
+ { name: 'id', type: 'string' },
5
+ { name: 'data', type: 'string' },
6
+ ],
7
+ SessionKeys: [{ name: 'sessionKeys', type: 'SessionKey[]' }],
8
+ Authorization: [
9
+ { name: 'sessionKeysProvider', type: 'string' },
10
+ { name: 'sessionKeys', type: 'SessionKey[]' },
11
+ ],
12
+ };
13
+ export const generateAgentX402AccessToken = async (subscriber, orderSessionKey, burnSessionKey, publicClient) => {
14
+ // hash the session keys
15
+ const burnSessionKeyHash = keccak256(toBytes(burnSessionKey));
16
+ const orderSessionKeyHash = keccak256(toBytes(orderSessionKey));
17
+ // generate the message
18
+ const message = {
19
+ sessionKeysProvider: 'zerodev',
20
+ sessionKeys: [
21
+ {
22
+ id: 'order',
23
+ data: orderSessionKeyHash,
24
+ },
25
+ {
26
+ id: 'redeem',
27
+ data: burnSessionKeyHash,
28
+ },
29
+ ],
30
+ };
31
+ const domain = {
32
+ name: 'Nevermined',
33
+ version: '1',
34
+ chainId: publicClient.chain?.id,
35
+ verifyingContract: subscriber.address,
36
+ };
37
+ // generate the eip712 data
38
+ const eip712Data = {
39
+ domain,
40
+ types: NeverminedTypedDataTypes,
41
+ primaryType: 'Authorization',
42
+ message,
43
+ };
44
+ const signature = await subscriber.signTypedData(eip712Data);
45
+ return {
46
+ x402Version: 2,
47
+ scheme: 'contract',
48
+ network: publicClient.chain?.name,
49
+ payload: {
50
+ signature,
51
+ authorization: message,
52
+ },
53
+ };
54
+ };
55
+ export const verifyAgentX402AccessToken = async (accessToken, publicClient, subscriberAddress) => {
56
+ const domain = {
57
+ name: 'Nevermined',
58
+ version: '1',
59
+ chainId: publicClient.chain?.id,
60
+ verifyingContract: subscriberAddress,
61
+ };
62
+ const { signature, authorization } = accessToken.payload;
63
+ const isValid = await publicClient.verifyTypedData({
64
+ address: subscriberAddress,
65
+ signature,
66
+ types: NeverminedTypedDataTypes,
67
+ domain,
68
+ message: authorization,
69
+ primaryType: 'Authorization',
70
+ });
71
+ return isValid;
72
+ };
73
+ export const b64EncodeX402AccessToken = (accessToken) => {
74
+ return Buffer.from(JSON.stringify(accessToken)).toString('base64');
75
+ };
76
+ export const b64DecodeX402AccessToken = (encoded) => {
77
+ return JSON.parse(Buffer.from(encoded, 'base64').toString('utf-8'));
78
+ };
@@ -0,0 +1,9 @@
1
+ import { Logger as PinoLogger } from 'pino';
2
+ export type LogLevel = 'fatal' | 'error' | 'warn' | 'info' | 'debug' | 'trace' | 'silent';
3
+ export interface LoggerConfig {
4
+ level?: LogLevel;
5
+ pretty?: boolean;
6
+ }
7
+ export declare const createLogger: (config?: LoggerConfig) => PinoLogger<never, boolean>;
8
+ export declare const LoggerInstance: () => PinoLogger;
9
+ //# sourceMappingURL=Logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../src/models/Logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,MAAM,IAAI,UAAU,EAAE,MAAM,MAAM,CAAA;AAEjD,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEzF,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,QAAQ,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAID,eAAO,MAAM,YAAY,GAAI,SAAQ,YAAiB,+BAgBrD,CAAA;AAED,eAAO,MAAM,cAAc,kBAQ1B,CAAA"}
@@ -0,0 +1,27 @@
1
+ import { pino } from 'pino';
2
+ let loggerInstance;
3
+ export const createLogger = (config = {}) => {
4
+ const { level = 'info', pretty = false } = config;
5
+ return pino({
6
+ level,
7
+ transport: pretty
8
+ ? {
9
+ target: 'pino-pretty',
10
+ options: {
11
+ colorize: true,
12
+ translateTime: 'HH:MM:ss',
13
+ ignore: 'pid,hostname',
14
+ },
15
+ }
16
+ : undefined,
17
+ });
18
+ };
19
+ export const LoggerInstance = () => {
20
+ if (!loggerInstance) {
21
+ loggerInstance = createLogger({
22
+ level: 'debug',
23
+ pretty: true,
24
+ });
25
+ }
26
+ return loggerInstance;
27
+ };
@@ -0,0 +1,30 @@
1
+ import { Account } from 'viem';
2
+ export declare class NeverminedOptions {
3
+ chainId: number;
4
+ /**
5
+ * Ethereum Web3 Provider URL. This Url allows the SDK to connect to a blockchain.
6
+ * This provider depends on the network where you want to connect (Ethereum Mainnet, Rinkeby, Polygon Matic, etc).
7
+ * It's possible to use a public available provider or a private/paid one like Infura, Alchemy, etc.
8
+ */
9
+ web3ProviderUri?: string;
10
+ /**
11
+ * The Nevermined App URL.
12
+ */
13
+ appUrl?: string;
14
+ backendUrl?: string;
15
+ agentsProxy?: string;
16
+ /**
17
+ * Log level.
18
+ */
19
+ logLevel: string;
20
+ accounts?: Account[];
21
+ /**
22
+ * ZeroDev project id
23
+ */
24
+ zeroDevProjectId?: string;
25
+ /**
26
+ * Contracts version
27
+ */
28
+ contractsVersion?: string;
29
+ }
30
+ //# sourceMappingURL=NeverminedOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NeverminedOptions.d.ts","sourceRoot":"","sources":["../../src/models/NeverminedOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAE9B,qBAAa,iBAAiB;IACrB,OAAO,EAAE,MAAM,CAAA;IACtB;;;;OAIG;IACI,eAAe,CAAC,EAAE,MAAM,CAAA;IAE/B;;OAEG;IACI,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB,WAAW,CAAC,EAAE,MAAM,CAAA;IAE3B;;OAEG;IACI,QAAQ,SAAS;IAEjB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;IAE3B;;OAEG;IACI,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAEhC;;OAEG;IACI,gBAAgB,CAAC,EAAE,MAAM,CAAA;CACjC"}