@nevermined-io/core-kit 0.1.32 → 0.1.33

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.
@@ -23,10 +23,12 @@ export declare class NFT1155ExpirableCredits extends NFT1155Base {
23
23
  data?: string;
24
24
  txParams?: TxParameters;
25
25
  }): Promise<import("viem").TransactionReceipt | import("viem/account-abstraction").UserOperationReceipt>;
26
- burn({ from, planId, amount, owner, txParams, }: {
26
+ burn({ from, planId, amount, keyspace, signature, owner, txParams, }: {
27
27
  from: Address;
28
28
  planId: bigint;
29
29
  amount: bigint;
30
+ keyspace?: bigint;
31
+ signature?: string;
30
32
  owner: Account | SmartAccount;
31
33
  txParams?: TxParameters;
32
34
  }): Promise<import("viem").TransactionReceipt | import("viem/account-abstraction").UserOperationReceipt>;
@@ -1 +1 @@
1
- {"version":3,"file":"NFT1155ExpirableCredits.d.ts","sourceRoot":"","sources":["../../src/contracts/NFT1155ExpirableCredits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,qBAAa,uBAAwB,SAAQ,WAAW;WACzB,WAAW,CACtC,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,uBAAuB,CAAC;IASb,IAAI,CAAC,EACzB,EAAE,EACF,MAAM,EACN,MAAM,EACN,YAAiB,EACjB,IAAW,EACX,KAAK,EACL,QAAQ,GACT,EAAE;QACD,EAAE,EAAE,OAAO,CAAA;QACX,MAAM,EAAE,MAAM,CAAA;QACd,MAAM,EAAE,MAAM,CAAA;QACd,YAAY,CAAC,EAAE,MAAM,CAAA;QACr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;IASb,IAAI,CAAC,EACzB,EAAE,EACF,MAAM,EACN,MAAM,EACN,YAAiB,EACjB,IAAW,EACX,KAAK,EACL,QAAQ,GACT,EAAE;QACD,EAAE,EAAE,OAAO,CAAA;QACX,MAAM,EAAE,MAAM,CAAA;QACd,MAAM,EAAE,MAAM,CAAA;QACd,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,KAAK,EAAE,OAAO,GAAG,YAAY,CAAA;QAC7B,QAAQ,CAAC,EAAE,YAAY,CAAA;KACxB;IAIqB,SAAS,CAAC,EAC9B,EAAE,EACF,OAAO,EACP,OAAO,EACP,YAAY,EACZ,IAAW,EACX,KAAK,EACL,QAAQ,GACT,EAAE;QACD,EAAE,EAAE,OAAO,EAAE,CAAA;QACb,OAAO,EAAE,MAAM,EAAE,CAAA;QACjB,OAAO,EAAE,MAAM,EAAE,CAAA;QACjB,YAAY,EAAE,MAAM,EAAE,CAAA;QACtB,KAAK,EAAE,OAAO,GAAG,YAAY,CAAA;QAC7B,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,QAAQ,CAAC,EAAE,YAAY,CAAA;KACxB;IAIqB,IAAI,CAAC,EACzB,IAAI,EACJ,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAS,EACT,KAAK,EACL,QAAQ,GACT,EAAE;QACD,IAAI,EAAE,OAAO,CAAA;QACb,MAAM,EAAE,MAAM,CAAA;QACd,MAAM,EAAE,MAAM,CAAA;QACd,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,KAAK,EAAE,OAAO,GAAG,YAAY,CAAA;QAC7B,QAAQ,CAAC,EAAE,YAAY,CAAA;KACxB;CAQF"}
@@ -12,7 +12,7 @@ export class NFT1155ExpirableCredits extends NFT1155Base {
12
12
  async mintBatch({ to, planIds, amounts, secsDuration, data = '0x', owner, txParams, }) {
13
13
  return this.send('mintBatch', owner, [to, planIds, amounts, secsDuration, data], txParams);
14
14
  }
15
- async burn({ from, planId, amount, owner, txParams, }) {
16
- return this.send('burn', owner, [from, planId, amount], txParams);
15
+ async burn({ from, planId, amount, keyspace, signature, owner, txParams, }) {
16
+ return this.send('burn', owner, [from, planId, amount, keyspace ?? 0n, signature ?? '0x'], txParams);
17
17
  }
18
18
  }
@@ -2,6 +2,5 @@ export * from './Logger.js';
2
2
  export * from './NeverminedOptions.js';
3
3
  export * from './NvmApiKey.js';
4
4
  export * from './Transactions.js';
5
- export * from './AgentAccessToken.js';
6
5
  export * from './AgentX402AccessToken.js';
7
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,wBAAwB,CAAA;AACtC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,wBAAwB,CAAA;AACtC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,2BAA2B,CAAA"}
@@ -2,5 +2,4 @@ export * from './Logger.js';
2
2
  export * from './NeverminedOptions.js';
3
3
  export * from './NvmApiKey.js';
4
4
  export * from './Transactions.js';
5
- export * from './AgentAccessToken.js';
6
5
  export * from './AgentX402AccessToken.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nevermined-io/core-kit",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -1,123 +0,0 @@
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
@@ -1 +0,0 @@
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,EAA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B,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"}
@@ -1,164 +0,0 @@
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
- }