@explorins/pers-sdk 2.1.11 → 2.1.15
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.
- package/dist/business/api/business-membership-api.d.ts +2 -2
- package/dist/chunks/{index-B-g2JPVK.cjs → index-CGaKfZNU.cjs} +279 -1
- package/dist/chunks/index-CGaKfZNU.cjs.map +1 -0
- package/dist/chunks/{index-CKm_V5XE.js → index-DgTEdUgC.js} +277 -2
- package/dist/chunks/index-DgTEdUgC.js.map +1 -0
- package/dist/chunks/{pers-sdk-CJo4CCTG.js → pers-sdk-BiP7UMJ3.js} +1695 -180
- package/dist/chunks/pers-sdk-BiP7UMJ3.js.map +1 -0
- package/dist/chunks/{pers-sdk-Bheg5mKX.cjs → pers-sdk-Cv7hM1I7.cjs} +1701 -180
- package/dist/chunks/pers-sdk-Cv7hM1I7.cjs.map +1 -0
- package/dist/chunks/tenant-manager-BUiFM33X.cjs +157 -0
- package/dist/chunks/tenant-manager-BUiFM33X.cjs.map +1 -0
- package/dist/chunks/tenant-manager-Bbj0bKoo.js +155 -0
- package/dist/chunks/tenant-manager-Bbj0bKoo.js.map +1 -0
- package/dist/chunks/{transaction-request.builder-DGTxGvc3.js → transaction-request.builder-C3C19kCx.js} +23 -2
- package/dist/chunks/{transaction-request.builder-DGTxGvc3.js.map → transaction-request.builder-C3C19kCx.js.map} +1 -1
- package/dist/chunks/{transaction-request.builder-Bjxi0C9F.cjs → transaction-request.builder-CW3Wwdi3.cjs} +23 -1
- package/dist/chunks/{transaction-request.builder-Bjxi0C9F.cjs.map → transaction-request.builder-CW3Wwdi3.cjs.map} +1 -1
- package/dist/chunks/{web3-chain-service-D68-0WaW.cjs → web3-chain-service-DcLiy3m2.cjs} +7 -7
- package/dist/chunks/{web3-chain-service-D68-0WaW.cjs.map → web3-chain-service-DcLiy3m2.cjs.map} +1 -1
- package/dist/chunks/{web3-chain-service-DuvxmKSj.js → web3-chain-service-nGntR60S.js} +3 -3
- package/dist/chunks/{web3-chain-service-DuvxmKSj.js.map → web3-chain-service-nGntR60S.js.map} +1 -1
- package/dist/chunks/{web3-manager-C_cFaMCm.cjs → web3-manager-B0OyjqJR.cjs} +89 -93
- package/dist/chunks/web3-manager-B0OyjqJR.cjs.map +1 -0
- package/dist/chunks/{web3-manager-OExwBWB7.js → web3-manager-Bnsvcz3Q.js} +89 -93
- package/dist/chunks/web3-manager-Bnsvcz3Q.js.map +1 -0
- package/dist/core/events/event-emitter.d.ts.map +1 -1
- package/dist/core/pers-config.d.ts +19 -0
- package/dist/core/pers-config.d.ts.map +1 -1
- package/dist/core.cjs +17 -14
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +5 -5
- package/dist/events/index.d.ts +13 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/pers-events-client.d.ts +143 -0
- package/dist/events/pers-events-client.d.ts.map +1 -0
- package/dist/events/types.d.ts +37 -0
- package/dist/events/types.d.ts.map +1 -0
- package/dist/index.cjs +41 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/managers/events-manager.d.ts +179 -0
- package/dist/managers/events-manager.d.ts.map +1 -0
- package/dist/managers/index.d.ts +2 -0
- package/dist/managers/index.d.ts.map +1 -1
- package/dist/managers/tenant-manager.d.ts +42 -1
- package/dist/managers/tenant-manager.d.ts.map +1 -1
- package/dist/managers/web3-manager.d.ts +12 -14
- package/dist/managers/web3-manager.d.ts.map +1 -1
- package/dist/managers/webhook-manager.d.ts +237 -0
- package/dist/managers/webhook-manager.d.ts.map +1 -0
- package/dist/node.cjs +4 -3
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +4 -3
- package/dist/node.js.map +1 -1
- package/dist/package.json +3 -2
- package/dist/pers-sdk.d.ts +110 -1
- package/dist/pers-sdk.d.ts.map +1 -1
- package/dist/transaction/index.d.ts +1 -1
- package/dist/transaction/index.d.ts.map +1 -1
- package/dist/transaction/models/transaction-request.builder.d.ts +16 -0
- package/dist/transaction/models/transaction-request.builder.d.ts.map +1 -1
- package/dist/transaction.cjs +2 -1
- package/dist/transaction.cjs.map +1 -1
- package/dist/transaction.js +1 -1
- package/dist/web3/application/web3-application.service.d.ts +6 -3
- package/dist/web3/application/web3-application.service.d.ts.map +1 -1
- package/dist/web3/domain/services/metadata-domain.service.d.ts +4 -2
- package/dist/web3/domain/services/metadata-domain.service.d.ts.map +1 -1
- package/dist/web3/domain/services/token-domain.service.d.ts +7 -3
- package/dist/web3/domain/services/token-domain.service.d.ts.map +1 -1
- package/dist/web3/infrastructure/api/ipfs-api.d.ts +22 -9
- package/dist/web3/infrastructure/api/ipfs-api.d.ts.map +1 -1
- package/dist/web3/utils/explorer.utils.d.ts +3 -3
- package/dist/web3/utils/explorer.utils.d.ts.map +1 -1
- package/dist/web3-chain/api/web3-chain-api.d.ts +3 -2
- package/dist/web3-chain/api/web3-chain-api.d.ts.map +1 -1
- package/dist/web3-chain/index.d.ts +0 -1
- package/dist/web3-chain/index.d.ts.map +1 -1
- package/dist/web3-chain/models/index.d.ts +5 -23
- package/dist/web3-chain/models/index.d.ts.map +1 -1
- package/dist/web3-chain/services/web3-chain-service.d.ts +2 -2
- package/dist/web3-chain/services/web3-chain-service.d.ts.map +1 -1
- package/dist/web3-chain.cjs +8 -14
- package/dist/web3-chain.cjs.map +1 -1
- package/dist/web3-chain.js +3 -16
- package/dist/web3-chain.js.map +1 -1
- package/dist/web3-manager.cjs +7 -4
- package/dist/web3-manager.cjs.map +1 -1
- package/dist/web3-manager.js +7 -4
- package/dist/web3-manager.js.map +1 -1
- package/dist/web3.cjs +7 -4
- package/dist/web3.cjs.map +1 -1
- package/dist/web3.js +7 -4
- package/dist/web3.js.map +1 -1
- package/dist/webhook/api/index.d.ts +2 -0
- package/dist/webhook/api/index.d.ts.map +1 -0
- package/dist/webhook/api/webhook-api.d.ts +73 -0
- package/dist/webhook/api/webhook-api.d.ts.map +1 -0
- package/dist/webhook/index.d.ts +35 -0
- package/dist/webhook/index.d.ts.map +1 -0
- package/dist/webhook/models/index.d.ts +58 -0
- package/dist/webhook/models/index.d.ts.map +1 -0
- package/dist/webhook/services/index.d.ts +2 -0
- package/dist/webhook/services/index.d.ts.map +1 -0
- package/dist/webhook/services/webhook-service.d.ts +98 -0
- package/dist/webhook/services/webhook-service.d.ts.map +1 -0
- package/package.json +3 -2
- package/dist/chunks/index-B-g2JPVK.cjs.map +0 -1
- package/dist/chunks/index-B6-bbNnd.cjs +0 -281
- package/dist/chunks/index-B6-bbNnd.cjs.map +0 -1
- package/dist/chunks/index-CKm_V5XE.js.map +0 -1
- package/dist/chunks/index-DBLskLuH.js +0 -277
- package/dist/chunks/index-DBLskLuH.js.map +0 -1
- package/dist/chunks/pers-sdk-Bheg5mKX.cjs.map +0 -1
- package/dist/chunks/pers-sdk-CJo4CCTG.js.map +0 -1
- package/dist/chunks/web3-manager-C_cFaMCm.cjs.map +0 -1
- package/dist/chunks/web3-manager-OExwBWB7.js.map +0 -1
|
@@ -65,15 +65,18 @@ export declare class Web3ApplicationService {
|
|
|
65
65
|
*/
|
|
66
66
|
getTokenCollection(request: TokenCollectionRequest): Promise<TokenCollection>;
|
|
67
67
|
/**
|
|
68
|
-
* Resolve IPFS URLs to HTTPS if needed
|
|
68
|
+
* Resolve IPFS URLs to HTTPS if needed.
|
|
69
|
+
*
|
|
70
|
+
* IPFS gateway is resolved from tenant configuration (chain-agnostic).
|
|
69
71
|
*/
|
|
70
|
-
resolveIPFSUrl(url: string
|
|
72
|
+
resolveIPFSUrl(url: string): Promise<string>;
|
|
71
73
|
/**
|
|
72
74
|
* Fetch and process metadata from any URI with IPFS conversion.
|
|
73
75
|
*
|
|
74
76
|
* Use this for ad-hoc metadata fetching when you have a tokenURI.
|
|
75
77
|
* Normalization happens at infrastructure layer.
|
|
78
|
+
* IPFS gateway is resolved from tenant configuration (chain-agnostic).
|
|
76
79
|
*/
|
|
77
|
-
fetchAndProcessMetadata(tokenUri: string
|
|
80
|
+
fetchAndProcessMetadata(tokenUri: string): Promise<TokenMetadata | null>;
|
|
78
81
|
}
|
|
79
82
|
//# sourceMappingURL=web3-application.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web3-application.service.d.ts","sourceRoot":"","sources":["../../../src/web3/application/web3-application.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,EACL,YAAY,EACZ,eAAe,EACf,aAAa,EACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,kFAAkF;AAClF,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,EAAE,GAAG,GAAG,EAAE,GAAG,MAAM,CAAC;AAGnE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,2EAA2E;IAC3E,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAGD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,2EAA2E;IAC3E,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,+EAA+E;IAC/E,KAAK,EAAE,QAAQ,CAAC;IAChB,kFAAkF;IAClF,WAAW,EAAE,SAAS,YAAY,EAAE,CAAC;IACrC,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC;CACpB;AAGD,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAErF;;;;GAIG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAqB;IACxD,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAwB;IAC9D,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAwB;gBAG5D,OAAO,EAAE,qBAAqB,EAC9B,OAAO,EAAE,qBAAqB;IAYhC;;OAEG;IACG,uBAAuB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC;IAUlF;;;;;;;;;;OAUG;IACG,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAYnF;;OAEG;IACG,kBAAkB,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,eAAe,CAAC;IAWnF
|
|
1
|
+
{"version":3,"file":"web3-application.service.d.ts","sourceRoot":"","sources":["../../../src/web3/application/web3-application.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,EACL,YAAY,EACZ,eAAe,EACf,aAAa,EACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,kFAAkF;AAClF,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,EAAE,GAAG,GAAG,EAAE,GAAG,MAAM,CAAC;AAGnE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,2EAA2E;IAC3E,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAGD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,2EAA2E;IAC3E,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,+EAA+E;IAC/E,KAAK,EAAE,QAAQ,CAAC;IAChB,kFAAkF;IAClF,WAAW,EAAE,SAAS,YAAY,EAAE,CAAC;IACrC,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC;CACpB;AAGD,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAErF;;;;GAIG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAqB;IACxD,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAwB;IAC9D,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAwB;gBAG5D,OAAO,EAAE,qBAAqB,EAC9B,OAAO,EAAE,qBAAqB;IAYhC;;OAEG;IACG,uBAAuB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC;IAUlF;;;;;;;;;;OAUG;IACG,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAYnF;;OAEG;IACG,kBAAkB,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,eAAe,CAAC;IAWnF;;;;OAIG;IACG,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIlD;;;;;;OAMG;IACG,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;CAG/E"}
|
|
@@ -2,13 +2,15 @@ import { TokenMetadata } from '../models';
|
|
|
2
2
|
import { IPFSInfrastructureApi } from '../../infrastructure';
|
|
3
3
|
/**
|
|
4
4
|
* MetadataDomainService - Clean IPFS metadata resolution with centralized caching
|
|
5
|
+
*
|
|
6
|
+
* IPFS gateway is resolved from tenant configuration (chain-agnostic).
|
|
5
7
|
*/
|
|
6
8
|
export declare class MetadataDomainService {
|
|
7
9
|
private ipfsApi;
|
|
8
10
|
private cache;
|
|
9
11
|
constructor(ipfsApi: IPFSInfrastructureApi);
|
|
10
|
-
fetchAndProcessMetadata(tokenUri: string
|
|
11
|
-
resolveIPFSUrl(url: string
|
|
12
|
+
fetchAndProcessMetadata(tokenUri: string): Promise<TokenMetadata | null>;
|
|
13
|
+
resolveIPFSUrl(url: string): Promise<string>;
|
|
12
14
|
/**
|
|
13
15
|
* Clear all cached metadata and URLs for this service
|
|
14
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata-domain.service.d.ts","sourceRoot":"","sources":["../../../../src/web3/domain/services/metadata-domain.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAG7D
|
|
1
|
+
{"version":3,"file":"metadata-domain.service.d.ts","sourceRoot":"","sources":["../../../../src/web3/domain/services/metadata-domain.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAG7D;;;;GAIG;AACH,qBAAa,qBAAqB;IAGpB,OAAO,CAAC,OAAO;IAF3B,OAAO,CAAC,KAAK,CAAkD;gBAE3C,OAAO,EAAE,qBAAqB;IAE5C,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAiBxE,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAUlD;;OAEG;IACI,UAAU,IAAI,IAAI;CAG1B"}
|
|
@@ -4,7 +4,12 @@ import { MetadataDomainService } from './metadata-domain.service';
|
|
|
4
4
|
import { ContractDomainService } from './contract-domain.service';
|
|
5
5
|
import type { AbiInput } from '../../application/web3-application.service';
|
|
6
6
|
/**
|
|
7
|
-
* TokenDomainService - Clean, focused token operations
|
|
7
|
+
* TokenDomainService - Clean, focused token operations
|
|
8
|
+
*
|
|
9
|
+
* Caching strategy:
|
|
10
|
+
* - Balance/ownership: NO CACHING - always fetch fresh from blockchain
|
|
11
|
+
* (event-based updates in consuming apps handle refresh)
|
|
12
|
+
* - Metadata: CACHED 24h - IPFS content is immutable
|
|
8
13
|
*/
|
|
9
14
|
export declare class TokenDomainService {
|
|
10
15
|
private web3Api;
|
|
@@ -53,9 +58,8 @@ export declare class TokenDomainService {
|
|
|
53
58
|
batchSize?: number;
|
|
54
59
|
}): Promise<TokenCollection>;
|
|
55
60
|
/**
|
|
56
|
-
*
|
|
61
|
+
* Enumerate token IDs owned by account (no caching - fresh data each call)
|
|
57
62
|
*/
|
|
58
|
-
private getCachedTokenOwnership;
|
|
59
63
|
private getTokenIdsByEnumeration;
|
|
60
64
|
private processTokenBatch;
|
|
61
65
|
private emptyCollection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-domain.service.d.ts","sourceRoot":"","sources":["../../../../src/web3/domain/services/token-domain.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGlE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AAK3E
|
|
1
|
+
{"version":3,"file":"token-domain.service.d.ts","sourceRoot":"","sources":["../../../../src/web3/domain/services/token-domain.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGlE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AAK3E;;;;;;;GAOG;AACH,qBAAa,kBAAkB;IAI3B,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,eAAe;IALzB,OAAO,CAAC,KAAK,CAAsD;gBAGzD,OAAO,EAAE,qBAAqB,EAC9B,eAAe,EAAE,qBAAqB,EACtC,eAAe,EAAE,qBAAqB;IAI1C,eAAe,CAAC,MAAM,EAAE;QAC5B,cAAc,EAAE,MAAM,CAAC;QACvB,eAAe,EAAE,MAAM,CAAC;QACxB,GAAG,EAAE,QAAQ,CAAC;QACd,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QACvB,OAAO,EAAE,MAAM,CAAC;KACjB,GAAG,OAAO,CAAC,YAAY,CAAC;IAYnB,gBAAgB,CAAC,MAAM,EAAE;QAC7B,eAAe,EAAE,MAAM,CAAC;QACxB,GAAG,EAAE,QAAQ,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,GAAG,OAAO,CAAC;QACV,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;QACxB,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;KAChC,CAAC;IAoBI,mBAAmB,CAAC,MAAM,EAAE;QAChC,cAAc,EAAE,MAAM,CAAC;QACvB,eAAe,EAAE,MAAM,CAAC;QACxB,GAAG,EAAE,QAAQ,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,GAAG,OAAO,CAAC,YAAY,CAAC;IAYnB,uBAAuB,CAAC,MAAM,EAAE;QACpC,cAAc,EAAE,MAAM,CAAC;QACvB,eAAe,EAAE,MAAM,CAAC;QACxB,GAAG,EAAE,QAAQ,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,GAAG,OAAO,CAAC,YAAY,CAAC;IAUnB,kBAAkB,CAAC,MAAM,EAAE;QAC/B,cAAc,EAAE,MAAM,CAAC;QACvB,eAAe,EAAE,MAAM,CAAC;QACxB,GAAG,EAAE,QAAQ,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC,eAAe,CAAC;IAsD5B;;OAEG;YACW,wBAAwB;YAexB,iBAAiB;IA+E/B,OAAO,CAAC,eAAe;IAcvB,UAAU,IAAI,IAAI;CAGnB"}
|
|
@@ -1,16 +1,30 @@
|
|
|
1
|
-
import { Web3ChainService } from '../../../web3-chain/services/web3-chain-service';
|
|
2
1
|
import type { TokenMetadata } from '../../domain/models';
|
|
2
|
+
import type { TenantManager } from '../../../managers/tenant-manager';
|
|
3
3
|
/**
|
|
4
4
|
* IPFSInfrastructureApi - Infrastructure implementation for IPFS operations
|
|
5
|
-
* Uses
|
|
5
|
+
* Uses TenantManager for IPFS gateway resolution with centralized caching
|
|
6
|
+
*
|
|
7
|
+
* IMPORTANT: IPFS gateway domain is now fetched from tenant configuration (TenantClientConfigDTO),
|
|
8
|
+
* not from chain data. This is the correct architecture since IPFS is chain-agnostic.
|
|
6
9
|
*/
|
|
7
10
|
export declare class IPFSInfrastructureApi {
|
|
8
|
-
private
|
|
9
|
-
private readonly defaultIpfsGatewayDomain;
|
|
11
|
+
private tenantManager;
|
|
10
12
|
private cache;
|
|
11
|
-
constructor(
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
constructor(tenantManager: TenantManager);
|
|
14
|
+
/**
|
|
15
|
+
* Get IPFS gateway domain from tenant configuration.
|
|
16
|
+
*
|
|
17
|
+
* @returns The IPFS gateway domain from tenant configuration
|
|
18
|
+
* @throws Error if tenant config is not found or ipfsGatewayDomain is not configured
|
|
19
|
+
*/
|
|
20
|
+
getIpfsGatewayDomain(): Promise<string>;
|
|
21
|
+
/**
|
|
22
|
+
* Resolve IPFS URL to HTTPS URL using tenant's configured gateway.
|
|
23
|
+
*
|
|
24
|
+
* @param url - The URL to resolve (can be ipfs:// or https://)
|
|
25
|
+
* @returns Resolved HTTPS URL
|
|
26
|
+
*/
|
|
27
|
+
resolveIPFSUrl(url: string): Promise<string>;
|
|
14
28
|
/**
|
|
15
29
|
* Fetch metadata from tokenURI, resolve all IPFS URLs, and normalize to SDK format.
|
|
16
30
|
*
|
|
@@ -19,10 +33,9 @@ export declare class IPFSInfrastructureApi {
|
|
|
19
33
|
* All downstream consumers receive normalized SDK format with resolved HTTPS URLs.
|
|
20
34
|
*
|
|
21
35
|
* @param tokenUri - Token URI (can be ipfs:// or https://)
|
|
22
|
-
* @param chainId - Chain ID for IPFS gateway selection
|
|
23
36
|
* @returns Normalized TokenMetadata with resolved HTTPS URLs, or null on error
|
|
24
37
|
*/
|
|
25
|
-
fetchAndProcessMetadata(tokenUri: string
|
|
38
|
+
fetchAndProcessMetadata(tokenUri: string): Promise<TokenMetadata | null>;
|
|
26
39
|
fetchFromUrl(url: string): Promise<unknown>;
|
|
27
40
|
/**
|
|
28
41
|
* Clear IPFS cache for this service
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ipfs-api.d.ts","sourceRoot":"","sources":["../../../../src/web3/infrastructure/api/ipfs-api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ipfs-api.d.ts","sourceRoot":"","sources":["../../../../src/web3/infrastructure/api/ipfs-api.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAEtE;;;;;;GAMG;AACH,qBAAa,qBAAqB;IAGpB,OAAO,CAAC,aAAa;IAFjC,OAAO,CAAC,KAAK,CAA8C;gBAEvC,aAAa,EAAE,aAAa;IAEhD;;;;;OAKG;IACG,oBAAoB,IAAI,OAAO,CAAC,MAAM,CAAC;IAqB7C;;;;;OAKG;IACG,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAQlD;;;;;;;;;OASG;IACG,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAyCxE,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAejD;;OAEG;IACI,UAAU,IAAI,IAAI;CAG1B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ChainDataDTO } from '@explorins/pers-shared';
|
|
2
2
|
/**
|
|
3
3
|
* Generate explorer URL for a given address or transaction
|
|
4
4
|
*
|
|
@@ -7,7 +7,7 @@ import type { ChainData } from '../../web3-chain';
|
|
|
7
7
|
* @param type - Type of explorer URL ('address' or 'tx')
|
|
8
8
|
* @returns Explorer URL string
|
|
9
9
|
*/
|
|
10
|
-
export declare function getExplorerUrl(chainData:
|
|
10
|
+
export declare function getExplorerUrl(chainData: ChainDataDTO | null, address: string, type: 'address' | 'tx'): string;
|
|
11
11
|
/**
|
|
12
12
|
* Generate explorer URL using chain ID (async version that fetches chain data)
|
|
13
13
|
*
|
|
@@ -17,5 +17,5 @@ export declare function getExplorerUrl(chainData: ChainData | null, address: str
|
|
|
17
17
|
* @param type - Type of explorer URL ('address' or 'tx')
|
|
18
18
|
* @returns Promise resolving to explorer URL string
|
|
19
19
|
*/
|
|
20
|
-
export declare function getExplorerUrlByChainId(getChainData: (chainId: number) => Promise<
|
|
20
|
+
export declare function getExplorerUrlByChainId(getChainData: (chainId: number) => Promise<ChainDataDTO | null>, chainId: number, address: string, type: 'address' | 'tx'): Promise<string>;
|
|
21
21
|
//# sourceMappingURL=explorer.utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explorer.utils.d.ts","sourceRoot":"","sources":["../../../src/web3/utils/explorer.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"explorer.utils.d.ts","sourceRoot":"","sources":["../../../src/web3/utils/explorer.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,SAAS,EAAE,YAAY,GAAG,IAAI,EAC9B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,SAAS,GAAG,IAAI,GACrB,MAAM,CAkCR;AAED;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAC3C,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,EAC/D,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,SAAS,GAAG,IAAI,GACrB,OAAO,CAAC,MAAM,CAAC,CAGjB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PersApiClient } from '../../core/pers-api-client';
|
|
2
|
-
import {
|
|
2
|
+
import type { ChainDataDTO } from '@explorins/pers-shared';
|
|
3
3
|
/**
|
|
4
4
|
* Platform-Agnostic Web3 Chain API Client
|
|
5
5
|
*
|
|
@@ -12,7 +12,8 @@ export declare class Web3ChainApi {
|
|
|
12
12
|
private basePath;
|
|
13
13
|
/**
|
|
14
14
|
* PUBLIC: Get chain data by chain ID
|
|
15
|
+
* Returns ChainDataDTO from the API (rpcUrl may be optional)
|
|
15
16
|
*/
|
|
16
|
-
getChainData(chainId: number): Promise<
|
|
17
|
+
getChainData(chainId: number): Promise<ChainDataDTO>;
|
|
17
18
|
}
|
|
18
19
|
//# sourceMappingURL=web3-chain-api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web3-chain-api.d.ts","sourceRoot":"","sources":["../../../src/web3-chain/api/web3-chain-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"web3-chain-api.d.ts","sourceRoot":"","sources":["../../../src/web3-chain/api/web3-chain-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D;;;;;GAKG;AACH,qBAAa,YAAY;IACX,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAE,aAAa;IAE5C,OAAO,CAAC,QAAQ,CAAa;IAM7B;;;OAGG;IACG,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;CAkB3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/web3-chain/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,cAAc,UAAU,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/web3-chain/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,cAAc,UAAU,CAAC"}
|
|
@@ -1,29 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Web3 Chain Domain Models
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* Local ChainData interface to avoid external dependency issues.
|
|
4
|
+
* Uses ChainDataDTO from @explorins/pers-shared as the canonical chain data type.
|
|
6
5
|
*/
|
|
6
|
+
import type { ChainDataDTO } from '@explorins/pers-shared';
|
|
7
|
+
import { ChainType, ChainTypes } from '@explorins/web3-types';
|
|
7
8
|
type Web3Instance = unknown;
|
|
8
|
-
export
|
|
9
|
-
name: string;
|
|
10
|
-
shortName?: string;
|
|
11
|
-
chain?: string;
|
|
12
|
-
network?: string;
|
|
13
|
-
chainId?: number;
|
|
14
|
-
networkId?: number | null;
|
|
15
|
-
rpcUrl: string;
|
|
16
|
-
explorerUrl?: string;
|
|
17
|
-
authHeader?: string;
|
|
18
|
-
nativeCurrency?: any;
|
|
19
|
-
chainType: ChainType;
|
|
20
|
-
ipfsGatewayDomain?: string;
|
|
21
|
-
}
|
|
22
|
-
export type ChainType = typeof ChainTypes[keyof typeof ChainTypes];
|
|
23
|
-
export declare const ChainTypes: {
|
|
24
|
-
readonly PUBLIC: "PUBLIC";
|
|
25
|
-
readonly PRIVATE: "PRIVATE";
|
|
26
|
-
};
|
|
9
|
+
export { ChainType, ChainTypes };
|
|
27
10
|
export interface CachedWeb3Instance {
|
|
28
11
|
instance: Web3Instance;
|
|
29
12
|
createdAt: number;
|
|
@@ -31,9 +14,8 @@ export interface CachedWeb3Instance {
|
|
|
31
14
|
}
|
|
32
15
|
export interface CachedChainInstance {
|
|
33
16
|
web3Instance: Web3Instance;
|
|
34
|
-
chainData:
|
|
17
|
+
chainData: ChainDataDTO;
|
|
35
18
|
createdAt: number;
|
|
36
19
|
chainId: number;
|
|
37
20
|
}
|
|
38
|
-
export {};
|
|
39
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/web3-chain/models/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/web3-chain/models/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAI9D,KAAK,YAAY,GAAG,OAAO,CAAC;AAG5B,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;AAEjC,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,YAAY,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,YAAY,CAAC;IAC3B,SAAS,EAAE,YAAY,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Web3ChainApi } from '../api/web3-chain-api';
|
|
2
|
-
import { ChainData } from '../models';
|
|
3
2
|
import { JsonRpcProvider } from '@explorins/web3-ts/ethers';
|
|
3
|
+
import { ChainDataDTO } from '@explorins/pers-shared';
|
|
4
4
|
export declare class Web3ChainService {
|
|
5
5
|
private web3ChainApi;
|
|
6
6
|
private cache;
|
|
7
7
|
constructor(web3ChainApi: Web3ChainApi);
|
|
8
8
|
getEthersProviderByChainId(chainId: number): Promise<JsonRpcProvider>;
|
|
9
9
|
private createProviderInstance;
|
|
10
|
-
getChainDataWithCache(chainId: number): Promise<
|
|
10
|
+
getChainDataWithCache(chainId: number): Promise<ChainDataDTO>;
|
|
11
11
|
private checkIsTokenExpired;
|
|
12
12
|
/**
|
|
13
13
|
* Clear all cached providers and chain data
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web3-chain-service.d.ts","sourceRoot":"","sources":["../../../src/web3-chain/services/web3-chain-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"web3-chain-service.d.ts","sourceRoot":"","sources":["../../../src/web3-chain/services/web3-chain-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAKrD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAStD,qBAAa,gBAAgB;IAKzB,OAAO,CAAC,YAAY;IAHtB,OAAO,CAAC,KAAK,CAAoD;gBAGvD,YAAY,EAAE,YAAY;IAG9B,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;YA+C7D,sBAAsB;IAYvB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAuB1E,OAAO,CAAC,mBAAmB;IAU3B;;;OAGG;IACI,UAAU,IAAI,IAAI;IAIzB;;;OAGG;IACI,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;CAKjD"}
|
package/dist/web3-chain.cjs
CHANGED
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var web3ChainService = require('./chunks/web3-chain-service-
|
|
4
|
-
require('
|
|
3
|
+
var web3ChainService = require('./chunks/web3-chain-service-DcLiy3m2.cjs');
|
|
4
|
+
var web3Types = require('@explorins/web3-types');
|
|
5
|
+
require('./chunks/index-CGaKfZNU.cjs');
|
|
5
6
|
require('@explorins/pers-shared');
|
|
6
|
-
require('./chunks/index-B6-bbNnd.cjs');
|
|
7
7
|
require('@explorins/web3-ts/ethers');
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
* Web3 Chain Domain Models
|
|
11
|
-
*
|
|
12
|
-
* Minimal interface definitions matching framework usage exactly.
|
|
13
|
-
* Local ChainData interface to avoid external dependency issues.
|
|
14
|
-
*/
|
|
15
|
-
const ChainTypes = {
|
|
16
|
-
PUBLIC: 'PUBLIC',
|
|
17
|
-
PRIVATE: 'PRIVATE'
|
|
18
|
-
};
|
|
9
|
+
|
|
19
10
|
|
|
20
11
|
exports.Web3ChainApi = web3ChainService.Web3ChainApi;
|
|
21
12
|
exports.Web3ChainService = web3ChainService.Web3ChainService;
|
|
22
|
-
exports
|
|
13
|
+
Object.defineProperty(exports, "ChainTypes", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return web3Types.ChainTypes; }
|
|
16
|
+
});
|
|
23
17
|
//# sourceMappingURL=web3-chain.cjs.map
|
package/dist/web3-chain.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web3-chain.cjs","sources":[
|
|
1
|
+
{"version":3,"file":"web3-chain.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
package/dist/web3-chain.js
CHANGED
|
@@ -1,19 +1,6 @@
|
|
|
1
|
-
export { W as Web3ChainApi, a as Web3ChainService } from './chunks/web3-chain-service-
|
|
2
|
-
|
|
1
|
+
export { W as Web3ChainApi, a as Web3ChainService } from './chunks/web3-chain-service-nGntR60S.js';
|
|
2
|
+
export { ChainTypes } from '@explorins/web3-types';
|
|
3
|
+
import './chunks/index-DgTEdUgC.js';
|
|
3
4
|
import '@explorins/pers-shared';
|
|
4
|
-
import './chunks/index-DBLskLuH.js';
|
|
5
5
|
import '@explorins/web3-ts/ethers';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Web3 Chain Domain Models
|
|
9
|
-
*
|
|
10
|
-
* Minimal interface definitions matching framework usage exactly.
|
|
11
|
-
* Local ChainData interface to avoid external dependency issues.
|
|
12
|
-
*/
|
|
13
|
-
const ChainTypes = {
|
|
14
|
-
PUBLIC: 'PUBLIC',
|
|
15
|
-
PRIVATE: 'PRIVATE'
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export { ChainTypes };
|
|
19
6
|
//# sourceMappingURL=web3-chain.js.map
|
package/dist/web3-chain.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web3-chain.js","sources":[
|
|
1
|
+
{"version":3,"file":"web3-chain.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/web3-manager.cjs
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var web3Manager = require('./chunks/web3-manager-
|
|
4
|
-
require('./chunks/web3-chain-service-
|
|
3
|
+
var web3Manager = require('./chunks/web3-manager-B0OyjqJR.cjs');
|
|
4
|
+
require('./chunks/web3-chain-service-DcLiy3m2.cjs');
|
|
5
|
+
require('@explorins/web3-types');
|
|
6
|
+
require('./chunks/tenant-manager-BUiFM33X.cjs');
|
|
5
7
|
require('@explorins/pers-shared');
|
|
6
8
|
require('@explorins/web3-ts/ethers');
|
|
7
|
-
require('./chunks/index-
|
|
8
|
-
require('./chunks/
|
|
9
|
+
require('./chunks/index-CGaKfZNU.cjs');
|
|
10
|
+
require('./chunks/tenant-service-fj-pkXTw.cjs');
|
|
11
|
+
require('./chunks/pagination-utils-B2jRHMSO.cjs');
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web3-manager.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"web3-manager.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
package/dist/web3-manager.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
export { W as Web3Manager } from './chunks/web3-manager-
|
|
2
|
-
import './chunks/web3-chain-service-
|
|
1
|
+
export { W as Web3Manager } from './chunks/web3-manager-Bnsvcz3Q.js';
|
|
2
|
+
import './chunks/web3-chain-service-nGntR60S.js';
|
|
3
|
+
import '@explorins/web3-types';
|
|
4
|
+
import './chunks/tenant-manager-Bbj0bKoo.js';
|
|
3
5
|
import '@explorins/pers-shared';
|
|
4
6
|
import '@explorins/web3-ts/ethers';
|
|
5
|
-
import './chunks/index-
|
|
6
|
-
import './chunks/
|
|
7
|
+
import './chunks/index-DgTEdUgC.js';
|
|
8
|
+
import './chunks/tenant-service-CsRA3O2V.js';
|
|
9
|
+
import './chunks/pagination-utils-9vQ-Npkr.js';
|
|
7
10
|
//# sourceMappingURL=web3-manager.js.map
|
package/dist/web3-manager.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web3-manager.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"web3-manager.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/dist/web3.cjs
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var web3Manager = require('./chunks/web3-manager-
|
|
3
|
+
var web3Manager = require('./chunks/web3-manager-B0OyjqJR.cjs');
|
|
4
4
|
require('@explorins/web3-ts/ethers');
|
|
5
|
-
require('./chunks/index-
|
|
6
|
-
require('./chunks/web3-chain-service-D68-0WaW.cjs');
|
|
7
|
-
require('./chunks/index-B-g2JPVK.cjs');
|
|
5
|
+
require('./chunks/index-CGaKfZNU.cjs');
|
|
8
6
|
require('@explorins/pers-shared');
|
|
7
|
+
require('./chunks/web3-chain-service-DcLiy3m2.cjs');
|
|
8
|
+
require('@explorins/web3-types');
|
|
9
|
+
require('./chunks/tenant-manager-BUiFM33X.cjs');
|
|
10
|
+
require('./chunks/tenant-service-fj-pkXTw.cjs');
|
|
11
|
+
require('./chunks/pagination-utils-B2jRHMSO.cjs');
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
|
package/dist/web3.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web3.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"web3.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
|
package/dist/web3.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
export { I as IPFSInfrastructureApi, a as Web3ApplicationService, b as Web3InfrastructureApi, W as Web3Manager, g as getExplorerUrl, c as getExplorerUrlByChainId } from './chunks/web3-manager-
|
|
1
|
+
export { I as IPFSInfrastructureApi, a as Web3ApplicationService, b as Web3InfrastructureApi, W as Web3Manager, g as getExplorerUrl, c as getExplorerUrlByChainId } from './chunks/web3-manager-Bnsvcz3Q.js';
|
|
2
2
|
import '@explorins/web3-ts/ethers';
|
|
3
|
-
import './chunks/index-
|
|
4
|
-
import './chunks/web3-chain-service-DuvxmKSj.js';
|
|
5
|
-
import './chunks/index-CKm_V5XE.js';
|
|
3
|
+
import './chunks/index-DgTEdUgC.js';
|
|
6
4
|
import '@explorins/pers-shared';
|
|
5
|
+
import './chunks/web3-chain-service-nGntR60S.js';
|
|
6
|
+
import '@explorins/web3-types';
|
|
7
|
+
import './chunks/tenant-manager-Bbj0bKoo.js';
|
|
8
|
+
import './chunks/tenant-service-CsRA3O2V.js';
|
|
9
|
+
import './chunks/pagination-utils-9vQ-Npkr.js';
|
|
7
10
|
//# sourceMappingURL=web3.js.map
|
package/dist/web3.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web3.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"web3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/webhook/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { PersApiClient } from '../../core/pers-api-client';
|
|
2
|
+
import { PaginatedResponseDTO, WebhookDTO, WebhookCreateRequestDTO, WebhookUpdateRequestDTO, WebhookExecutionDTO, WebhookCallbackDTO, WebhookTriggerResponseDTO } from '@explorins/pers-shared';
|
|
3
|
+
import { WebhookTriggerRequest, WebhookQueryOptions, WebhookExecutionQueryOptions } from '../models';
|
|
4
|
+
/**
|
|
5
|
+
* Webhook API - Low-level API client for webhook operations
|
|
6
|
+
*
|
|
7
|
+
* Backend routes:
|
|
8
|
+
* - Admin CRUD: /hooks (requires tenant auth)
|
|
9
|
+
* - Proxy/Trigger: /hooks/:projectKey/:hookId (public, identified by projectKey)
|
|
10
|
+
* - Callback: /hooks/:projectKey/executions/:executionId/callback (public)
|
|
11
|
+
*
|
|
12
|
+
* @internal Use WebhookService or WebhookManager for higher-level operations
|
|
13
|
+
*/
|
|
14
|
+
export declare class WebhookApi {
|
|
15
|
+
private apiClient;
|
|
16
|
+
private basePath;
|
|
17
|
+
constructor(apiClient: PersApiClient);
|
|
18
|
+
/**
|
|
19
|
+
* List all webhooks (Admin)
|
|
20
|
+
* GET /hooks
|
|
21
|
+
*/
|
|
22
|
+
listWebhooks(options?: WebhookQueryOptions): Promise<PaginatedResponseDTO<WebhookDTO>>;
|
|
23
|
+
/**
|
|
24
|
+
* Get webhook by ID (Admin)
|
|
25
|
+
* GET /hooks/:hookId
|
|
26
|
+
*/
|
|
27
|
+
getWebhookById(webhookId: string): Promise<WebhookDTO>;
|
|
28
|
+
/**
|
|
29
|
+
* Create a new webhook (Admin)
|
|
30
|
+
* POST /hooks
|
|
31
|
+
*/
|
|
32
|
+
createWebhook(webhook: WebhookCreateRequestDTO): Promise<WebhookDTO>;
|
|
33
|
+
/**
|
|
34
|
+
* Update a webhook (Admin)
|
|
35
|
+
* PUT /hooks/:hookId
|
|
36
|
+
*/
|
|
37
|
+
updateWebhook(webhookId: string, webhook: WebhookUpdateRequestDTO): Promise<WebhookDTO>;
|
|
38
|
+
/**
|
|
39
|
+
* Delete a webhook (Admin)
|
|
40
|
+
* DELETE /hooks/:hookId
|
|
41
|
+
*/
|
|
42
|
+
deleteWebhook(webhookId: string): Promise<{
|
|
43
|
+
message: string;
|
|
44
|
+
hookId: string;
|
|
45
|
+
}>;
|
|
46
|
+
/**
|
|
47
|
+
* Trigger a webhook programmatically
|
|
48
|
+
*
|
|
49
|
+
* Uses the proxy endpoint which requires projectKey in the URL path.
|
|
50
|
+
* The projectKey is obtained from SDK config.
|
|
51
|
+
*
|
|
52
|
+
* ALL /hooks/:projectKey/:hookId
|
|
53
|
+
*/
|
|
54
|
+
triggerWebhook(request: WebhookTriggerRequest, projectKey: string): Promise<WebhookTriggerResponseDTO>;
|
|
55
|
+
/**
|
|
56
|
+
* List webhook executions (Admin)
|
|
57
|
+
* GET /hooks/executions
|
|
58
|
+
*/
|
|
59
|
+
listExecutions(options?: WebhookExecutionQueryOptions): Promise<PaginatedResponseDTO<WebhookExecutionDTO>>;
|
|
60
|
+
/**
|
|
61
|
+
* Get execution by ID (Admin)
|
|
62
|
+
* Note: This endpoint doesn't exist in current backend - would need to filter by ID
|
|
63
|
+
*/
|
|
64
|
+
getExecutionById(executionId: string): Promise<WebhookExecutionDTO>;
|
|
65
|
+
/**
|
|
66
|
+
* Send callback result (for testing or manual callback trigger)
|
|
67
|
+
* This is normally called by external systems like n8n
|
|
68
|
+
*
|
|
69
|
+
* POST /hooks/:projectKey/executions/:executionId/callback
|
|
70
|
+
*/
|
|
71
|
+
sendCallback(executionId: string, callback: WebhookCallbackDTO, projectKey: string): Promise<WebhookExecutionDTO>;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=webhook-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook-api.d.ts","sourceRoot":"","sources":["../../../src/webhook/api/webhook-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EACL,oBAAoB,EACpB,UAAU,EACV,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EAClB,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,4BAA4B,EAC7B,MAAM,WAAW,CAAC;AAEnB;;;;;;;;;GASG;AACH,qBAAa,UAAU;IAGT,OAAO,CAAC,SAAS;IAF7B,OAAO,CAAC,QAAQ,CAAY;gBAER,SAAS,EAAE,aAAa;IAO5C;;;OAGG;IACG,YAAY,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;IAa5F;;;OAGG;IACG,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAI5D;;;OAGG;IACG,aAAa,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC;IAI1E;;;OAGG;IACG,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC;IAI7F;;;OAGG;IACG,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAUpF;;;;;;;OAOG;IACG,cAAc,CAAC,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAmC5G;;;OAGG;IACG,cAAc,CAAC,OAAO,CAAC,EAAE,4BAA4B,GAAG,OAAO,CAAC,oBAAoB,CAAC,mBAAmB,CAAC,CAAC;IAehH;;;OAGG;IACG,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAezE;;;;;OAKG;IACG,YAAY,CAChB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,kBAAkB,EAC5B,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,mBAAmB,CAAC;CAMhC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Webhook Module - External system integration via webhooks
|
|
3
|
+
*
|
|
4
|
+
* Provides functionality for:
|
|
5
|
+
* - Creating and managing webhook endpoints (admin)
|
|
6
|
+
* - Triggering webhooks programmatically (authenticated users)
|
|
7
|
+
* - Monitoring execution history
|
|
8
|
+
* - Async workflow support with callbacks
|
|
9
|
+
*
|
|
10
|
+
* @module webhook
|
|
11
|
+
* @category Webhook
|
|
12
|
+
*
|
|
13
|
+
* @example Basic Usage
|
|
14
|
+
* ```typescript
|
|
15
|
+
* // Admin: Create a webhook
|
|
16
|
+
* const webhook = await sdk.webhooks.create({
|
|
17
|
+
* name: 'Order Processing',
|
|
18
|
+
* targetUrl: 'https://n8n.example.com/webhook/orders',
|
|
19
|
+
* method: 'POST'
|
|
20
|
+
* });
|
|
21
|
+
*
|
|
22
|
+
* // Trigger the webhook
|
|
23
|
+
* const result = await sdk.webhooks.trigger('order-webhook', {
|
|
24
|
+
* orderId: 'order-123',
|
|
25
|
+
* items: [...]
|
|
26
|
+
* });
|
|
27
|
+
*
|
|
28
|
+
* // Or trigger and wait for async workflow completion
|
|
29
|
+
* const result = await sdk.webhooks.triggerAndWait('order-webhook', orderData);
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export type { WebhookTriggerRequest, WebhookQueryOptions, WebhookExecutionQueryOptions } from './models';
|
|
33
|
+
export { WebhookApi } from './api';
|
|
34
|
+
export { WebhookService } from './services';
|
|
35
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/webhook/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,YAAY,EACV,qBAAqB,EACrB,mBAAmB,EACnB,4BAA4B,EAC7B,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGnC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"}
|