@partylayer/provider 0.2.0 → 0.2.2
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/index.d.mts +21 -34
- package/dist/index.d.ts +21 -34
- package/dist/index.js +30 -52
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -46
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CIP0103Provider, CIP0103RequestPayload, CIP0103EventListener, PartyLayerError, CIP0103ConnectResult, CIP0103TxChangedEvent,
|
|
2
|
-
export { CIP0103Account, CIP0103AccountStatus, CIP0103ConnectResult, CIP0103Event, CIP0103EventListener, CIP0103LedgerApiRequest, CIP0103LedgerApiResponse, CIP0103Method, CIP0103Network, CIP0103Provider, CIP0103ProviderInfo, CIP0103ProviderRpcError, CIP0103ProviderType, CIP0103RequestParams, CIP0103RequestPayload, CIP0103SignMessageRequest, CIP0103StatusEvent, CIP0103TxChangedEvent, CIP0103TxExecutedPayload, CIP0103TxFailedPayload, CIP0103TxPendingPayload, CIP0103TxSignedPayload, CIP0103TxStatus, CIP0103_EVENTS, CIP0103_MANDATORY_METHODS, CIP0103_METHODS } from '@partylayer/core';
|
|
1
|
+
import { CIP0103Provider, CIP0103RequestPayload, CIP0103EventListener, PartyLayerError, CIP0103ConnectResult, CIP0103TxChangedEvent, CIP0103RequestParams } from '@partylayer/core';
|
|
2
|
+
export { CANTON_NETWORKS, CIP0103Account, CIP0103AccountStatus, CIP0103ConnectResult, CIP0103Event, CIP0103EventListener, CIP0103LedgerApiRequest, CIP0103LedgerApiResponse, CIP0103Method, CIP0103Network, CIP0103Provider, CIP0103ProviderInfo, CIP0103ProviderRpcError, CIP0103ProviderType, CIP0103RequestParams, CIP0103RequestPayload, CIP0103SignMessageRequest, CIP0103StatusEvent, CIP0103TxChangedEvent, CIP0103TxExecutedPayload, CIP0103TxFailedPayload, CIP0103TxPendingPayload, CIP0103TxSignedPayload, CIP0103TxStatus, CIP0103_EVENTS, CIP0103_MANDATORY_METHODS, CIP0103_METHODS, fromCAIP2Network, isValidCAIP2, toCAIP2Network } from '@partylayer/core';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* CIP-0103 Wallet Discovery
|
|
@@ -23,6 +23,24 @@ interface DiscoveredProvider {
|
|
|
23
23
|
name?: string;
|
|
24
24
|
/** Icon (data: URI or URL) — populated for announce-discovered wallets. */
|
|
25
25
|
icon?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Whether this entry's STABLE IDENTITY was resolved (additive; A2.1).
|
|
28
|
+
*
|
|
29
|
+
* - announce-discovered entries: always `true` — the announce `id` IS the
|
|
30
|
+
* wallet's real extension id (canonical provider.md: announce is the
|
|
31
|
+
* discovery path).
|
|
32
|
+
* - injected (`window.canton` scan) entries: `true` only when a sync
|
|
33
|
+
* `provider.id` or a `status().provider.id` probe yielded a real id;
|
|
34
|
+
* `false` when discovery fell back to the path id (an identity-LESS bare
|
|
35
|
+
* slot, e.g. Console's `{request,on,emit,removeListener,source}` with no id).
|
|
36
|
+
*
|
|
37
|
+
* LIVE INCIDENT (partylayer.xyz post-A2): an identity-less bare slot resolved
|
|
38
|
+
* to the path id `'canton'`; downstream that synthesized a phantom "Canton
|
|
39
|
+
* Wallet" (`browser:ext:canton`) picker entry whose provider was the slot
|
|
40
|
+
* itself. Consumers MUST drop unresolved injected entries rather than list
|
|
41
|
+
* them — correctness must not depend on probe timing.
|
|
42
|
+
*/
|
|
43
|
+
identityResolved?: boolean;
|
|
26
44
|
}
|
|
27
45
|
/**
|
|
28
46
|
* Check if an object implements the CIP-0103 Provider interface.
|
|
@@ -384,37 +402,6 @@ declare function handleAsyncConnect(walletProvider: CIP0103Provider, connectResu
|
|
|
384
402
|
*/
|
|
385
403
|
declare function handleAsyncPrepareExecute(walletProvider: CIP0103Provider, commandId: string, userUrl: string | undefined, options?: AsyncPrepareExecuteOptions): Promise<CIP0103TxChangedEvent>;
|
|
386
404
|
|
|
387
|
-
/**
|
|
388
|
-
* CAIP-2 Network Identity Utilities
|
|
389
|
-
*
|
|
390
|
-
* All CIP-0103 network identifiers use CAIP-2 format: "namespace:reference"
|
|
391
|
-
* e.g. "canton:da-mainnet", "canton:da-devnet"
|
|
392
|
-
*
|
|
393
|
-
* Reference: https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-2.md
|
|
394
|
-
*/
|
|
395
|
-
|
|
396
|
-
declare const CANTON_NETWORKS: Record<string, string>;
|
|
397
|
-
/**
|
|
398
|
-
* Convert a legacy PartyLayer NetworkId (e.g. "devnet") or already-CAIP-2
|
|
399
|
-
* string to a CIP-0103 Network object.
|
|
400
|
-
*
|
|
401
|
-
* @throws {Error} if the resulting network ID is not valid CAIP-2
|
|
402
|
-
*/
|
|
403
|
-
declare function toCAIP2Network(networkId: string): CIP0103Network;
|
|
404
|
-
/**
|
|
405
|
-
* Extract the short network name from a CAIP-2 ID.
|
|
406
|
-
* Returns the original string if no reverse mapping exists.
|
|
407
|
-
*/
|
|
408
|
-
declare function fromCAIP2Network(caip2: string): string;
|
|
409
|
-
/**
|
|
410
|
-
* Validate that a string conforms to CAIP-2 format.
|
|
411
|
-
*
|
|
412
|
-
* CAIP-2 format: namespace:reference
|
|
413
|
-
* - namespace: [-a-z0-9]{3,8}
|
|
414
|
-
* - reference: [-_a-zA-Z0-9]{1,32}
|
|
415
|
-
*/
|
|
416
|
-
declare function isValidCAIP2(networkId: string): boolean;
|
|
417
|
-
|
|
418
405
|
/**
|
|
419
406
|
* CIP-0103 Event Bus
|
|
420
407
|
*
|
|
@@ -468,4 +455,4 @@ declare class MethodRouter {
|
|
|
468
455
|
private registerDefaults;
|
|
469
456
|
}
|
|
470
457
|
|
|
471
|
-
export { type AnnounceDiscoveryOptions, type AnnouncedWallet, type AsyncConnectOptions, type AsyncPrepareExecuteOptions, type BridgeableClient,
|
|
458
|
+
export { type AnnounceDiscoveryOptions, type AnnouncedWallet, type AsyncConnectOptions, type AsyncPrepareExecuteOptions, type BridgeableClient, CIP0103EventBus, type DiscoveredProvider, type ExtensionChannelOptions, JSON_RPC_ERRORS, type MethodHandler, MethodRouter, PartyLayerProvider, type PartyLayerProviderOptions, ProviderRpcError, RPC_ERRORS, chainDisconnected, createExtensionChannelProvider, createProviderBridge, disconnected, discoverAnnouncedProviders, discoverInjectedProviders, discoverProviders, handleAsyncConnect, handleAsyncPrepareExecute, internalError, invalidParams, isCIP0103Provider, methodNotFound, resourceNotFound, resourceUnavailable, toPartyLayerError, toProviderRpcError, transactionRejected, unauthorized, unsupportedMethod, userRejected, waitForProvider };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CIP0103Provider, CIP0103RequestPayload, CIP0103EventListener, PartyLayerError, CIP0103ConnectResult, CIP0103TxChangedEvent,
|
|
2
|
-
export { CIP0103Account, CIP0103AccountStatus, CIP0103ConnectResult, CIP0103Event, CIP0103EventListener, CIP0103LedgerApiRequest, CIP0103LedgerApiResponse, CIP0103Method, CIP0103Network, CIP0103Provider, CIP0103ProviderInfo, CIP0103ProviderRpcError, CIP0103ProviderType, CIP0103RequestParams, CIP0103RequestPayload, CIP0103SignMessageRequest, CIP0103StatusEvent, CIP0103TxChangedEvent, CIP0103TxExecutedPayload, CIP0103TxFailedPayload, CIP0103TxPendingPayload, CIP0103TxSignedPayload, CIP0103TxStatus, CIP0103_EVENTS, CIP0103_MANDATORY_METHODS, CIP0103_METHODS } from '@partylayer/core';
|
|
1
|
+
import { CIP0103Provider, CIP0103RequestPayload, CIP0103EventListener, PartyLayerError, CIP0103ConnectResult, CIP0103TxChangedEvent, CIP0103RequestParams } from '@partylayer/core';
|
|
2
|
+
export { CANTON_NETWORKS, CIP0103Account, CIP0103AccountStatus, CIP0103ConnectResult, CIP0103Event, CIP0103EventListener, CIP0103LedgerApiRequest, CIP0103LedgerApiResponse, CIP0103Method, CIP0103Network, CIP0103Provider, CIP0103ProviderInfo, CIP0103ProviderRpcError, CIP0103ProviderType, CIP0103RequestParams, CIP0103RequestPayload, CIP0103SignMessageRequest, CIP0103StatusEvent, CIP0103TxChangedEvent, CIP0103TxExecutedPayload, CIP0103TxFailedPayload, CIP0103TxPendingPayload, CIP0103TxSignedPayload, CIP0103TxStatus, CIP0103_EVENTS, CIP0103_MANDATORY_METHODS, CIP0103_METHODS, fromCAIP2Network, isValidCAIP2, toCAIP2Network } from '@partylayer/core';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* CIP-0103 Wallet Discovery
|
|
@@ -23,6 +23,24 @@ interface DiscoveredProvider {
|
|
|
23
23
|
name?: string;
|
|
24
24
|
/** Icon (data: URI or URL) — populated for announce-discovered wallets. */
|
|
25
25
|
icon?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Whether this entry's STABLE IDENTITY was resolved (additive; A2.1).
|
|
28
|
+
*
|
|
29
|
+
* - announce-discovered entries: always `true` — the announce `id` IS the
|
|
30
|
+
* wallet's real extension id (canonical provider.md: announce is the
|
|
31
|
+
* discovery path).
|
|
32
|
+
* - injected (`window.canton` scan) entries: `true` only when a sync
|
|
33
|
+
* `provider.id` or a `status().provider.id` probe yielded a real id;
|
|
34
|
+
* `false` when discovery fell back to the path id (an identity-LESS bare
|
|
35
|
+
* slot, e.g. Console's `{request,on,emit,removeListener,source}` with no id).
|
|
36
|
+
*
|
|
37
|
+
* LIVE INCIDENT (partylayer.xyz post-A2): an identity-less bare slot resolved
|
|
38
|
+
* to the path id `'canton'`; downstream that synthesized a phantom "Canton
|
|
39
|
+
* Wallet" (`browser:ext:canton`) picker entry whose provider was the slot
|
|
40
|
+
* itself. Consumers MUST drop unresolved injected entries rather than list
|
|
41
|
+
* them — correctness must not depend on probe timing.
|
|
42
|
+
*/
|
|
43
|
+
identityResolved?: boolean;
|
|
26
44
|
}
|
|
27
45
|
/**
|
|
28
46
|
* Check if an object implements the CIP-0103 Provider interface.
|
|
@@ -384,37 +402,6 @@ declare function handleAsyncConnect(walletProvider: CIP0103Provider, connectResu
|
|
|
384
402
|
*/
|
|
385
403
|
declare function handleAsyncPrepareExecute(walletProvider: CIP0103Provider, commandId: string, userUrl: string | undefined, options?: AsyncPrepareExecuteOptions): Promise<CIP0103TxChangedEvent>;
|
|
386
404
|
|
|
387
|
-
/**
|
|
388
|
-
* CAIP-2 Network Identity Utilities
|
|
389
|
-
*
|
|
390
|
-
* All CIP-0103 network identifiers use CAIP-2 format: "namespace:reference"
|
|
391
|
-
* e.g. "canton:da-mainnet", "canton:da-devnet"
|
|
392
|
-
*
|
|
393
|
-
* Reference: https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-2.md
|
|
394
|
-
*/
|
|
395
|
-
|
|
396
|
-
declare const CANTON_NETWORKS: Record<string, string>;
|
|
397
|
-
/**
|
|
398
|
-
* Convert a legacy PartyLayer NetworkId (e.g. "devnet") or already-CAIP-2
|
|
399
|
-
* string to a CIP-0103 Network object.
|
|
400
|
-
*
|
|
401
|
-
* @throws {Error} if the resulting network ID is not valid CAIP-2
|
|
402
|
-
*/
|
|
403
|
-
declare function toCAIP2Network(networkId: string): CIP0103Network;
|
|
404
|
-
/**
|
|
405
|
-
* Extract the short network name from a CAIP-2 ID.
|
|
406
|
-
* Returns the original string if no reverse mapping exists.
|
|
407
|
-
*/
|
|
408
|
-
declare function fromCAIP2Network(caip2: string): string;
|
|
409
|
-
/**
|
|
410
|
-
* Validate that a string conforms to CAIP-2 format.
|
|
411
|
-
*
|
|
412
|
-
* CAIP-2 format: namespace:reference
|
|
413
|
-
* - namespace: [-a-z0-9]{3,8}
|
|
414
|
-
* - reference: [-_a-zA-Z0-9]{1,32}
|
|
415
|
-
*/
|
|
416
|
-
declare function isValidCAIP2(networkId: string): boolean;
|
|
417
|
-
|
|
418
405
|
/**
|
|
419
406
|
* CIP-0103 Event Bus
|
|
420
407
|
*
|
|
@@ -468,4 +455,4 @@ declare class MethodRouter {
|
|
|
468
455
|
private registerDefaults;
|
|
469
456
|
}
|
|
470
457
|
|
|
471
|
-
export { type AnnounceDiscoveryOptions, type AnnouncedWallet, type AsyncConnectOptions, type AsyncPrepareExecuteOptions, type BridgeableClient,
|
|
458
|
+
export { type AnnounceDiscoveryOptions, type AnnouncedWallet, type AsyncConnectOptions, type AsyncPrepareExecuteOptions, type BridgeableClient, CIP0103EventBus, type DiscoveredProvider, type ExtensionChannelOptions, JSON_RPC_ERRORS, type MethodHandler, MethodRouter, PartyLayerProvider, type PartyLayerProviderOptions, ProviderRpcError, RPC_ERRORS, chainDisconnected, createExtensionChannelProvider, createProviderBridge, disconnected, discoverAnnouncedProviders, discoverInjectedProviders, discoverProviders, handleAsyncConnect, handleAsyncPrepareExecute, internalError, invalidParams, isCIP0103Provider, methodNotFound, resourceNotFound, resourceUnavailable, toPartyLayerError, toProviderRpcError, transactionRejected, unauthorized, unsupportedMethod, userRejected, waitForProvider };
|
package/dist/index.js
CHANGED
|
@@ -165,6 +165,7 @@ var ERROR_CODE_TO_RPC = {
|
|
|
165
165
|
REGISTRY_VERIFICATION_FAILED: JSON_RPC_ERRORS.INTERNAL_ERROR,
|
|
166
166
|
REGISTRY_SCHEMA_INVALID: JSON_RPC_ERRORS.INTERNAL_ERROR,
|
|
167
167
|
INTERNAL_ERROR: JSON_RPC_ERRORS.INTERNAL_ERROR,
|
|
168
|
+
NETWORK_MISMATCH: JSON_RPC_ERRORS.INVALID_INPUT,
|
|
168
169
|
TIMEOUT: JSON_RPC_ERRORS.INVALID_INPUT
|
|
169
170
|
};
|
|
170
171
|
var RPC_TO_ERROR_CODE = {
|
|
@@ -504,43 +505,8 @@ var PartyLayerProvider = class {
|
|
|
504
505
|
}
|
|
505
506
|
};
|
|
506
507
|
|
|
507
|
-
// src/network.ts
|
|
508
|
-
var CANTON_NETWORKS = {
|
|
509
|
-
mainnet: "canton:da-mainnet",
|
|
510
|
-
testnet: "canton:da-testnet",
|
|
511
|
-
devnet: "canton:da-devnet",
|
|
512
|
-
local: "canton:da-local"
|
|
513
|
-
};
|
|
514
|
-
var CAIP2_TO_SHORT = Object.fromEntries(
|
|
515
|
-
Object.entries(CANTON_NETWORKS).map(([short, full]) => [full, short])
|
|
516
|
-
);
|
|
517
|
-
function toCAIP2Network(networkId) {
|
|
518
|
-
let result;
|
|
519
|
-
if (networkId.includes(":")) {
|
|
520
|
-
result = networkId;
|
|
521
|
-
} else {
|
|
522
|
-
const caip2 = CANTON_NETWORKS[networkId];
|
|
523
|
-
result = caip2 ?? `canton:${networkId}`;
|
|
524
|
-
}
|
|
525
|
-
if (!isValidCAIP2(result)) {
|
|
526
|
-
throw new Error(
|
|
527
|
-
`Invalid CAIP-2 network identifier: "${result}". Expected format: "namespace:reference"`
|
|
528
|
-
);
|
|
529
|
-
}
|
|
530
|
-
return { networkId: result };
|
|
531
|
-
}
|
|
532
|
-
function fromCAIP2Network(caip2) {
|
|
533
|
-
const short = CAIP2_TO_SHORT[caip2];
|
|
534
|
-
if (short) return short;
|
|
535
|
-
const colonIndex = caip2.indexOf(":");
|
|
536
|
-
return colonIndex >= 0 ? caip2.slice(colonIndex + 1) : caip2;
|
|
537
|
-
}
|
|
538
|
-
function isValidCAIP2(networkId) {
|
|
539
|
-
return /^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$/.test(networkId);
|
|
540
|
-
}
|
|
541
|
-
|
|
542
508
|
// src/bridge.ts
|
|
543
|
-
var PROVIDER_VERSION = "0.2.
|
|
509
|
+
var PROVIDER_VERSION = "0.2.2" ;
|
|
544
510
|
function createProviderBridge(client) {
|
|
545
511
|
const eventBus = new CIP0103EventBus();
|
|
546
512
|
const pendingEmitted = /* @__PURE__ */ new Set();
|
|
@@ -596,7 +562,7 @@ async function handleRequest(client, args, eventBus, pendingEmitted) {
|
|
|
596
562
|
version: PROVIDER_VERSION,
|
|
597
563
|
providerType: "browser"
|
|
598
564
|
},
|
|
599
|
-
network: session ? toCAIP2Network(session.network) : void 0,
|
|
565
|
+
network: session ? core.toCAIP2Network(session.network) : void 0,
|
|
600
566
|
session: session ? {
|
|
601
567
|
accessToken: "",
|
|
602
568
|
userId: String(session.partyId)
|
|
@@ -605,7 +571,7 @@ async function handleRequest(client, args, eventBus, pendingEmitted) {
|
|
|
605
571
|
}
|
|
606
572
|
case "getActiveNetwork": {
|
|
607
573
|
const session = await client.getActiveSession();
|
|
608
|
-
return toCAIP2Network(
|
|
574
|
+
return core.toCAIP2Network(
|
|
609
575
|
session?.network ?? "devnet"
|
|
610
576
|
);
|
|
611
577
|
}
|
|
@@ -715,7 +681,7 @@ function wireEvents(client, eventBus, pendingEmitted) {
|
|
|
715
681
|
version: PROVIDER_VERSION,
|
|
716
682
|
providerType: "browser"
|
|
717
683
|
},
|
|
718
|
-
network: toCAIP2Network(session.network),
|
|
684
|
+
network: core.toCAIP2Network(session.network),
|
|
719
685
|
session: {
|
|
720
686
|
accessToken: "",
|
|
721
687
|
userId: String(session.partyId)
|
|
@@ -729,7 +695,7 @@ function wireEvents(client, eventBus, pendingEmitted) {
|
|
|
729
695
|
hint: "",
|
|
730
696
|
publicKey: "",
|
|
731
697
|
namespace: "",
|
|
732
|
-
networkId: toCAIP2Network(session.network).networkId,
|
|
698
|
+
networkId: core.toCAIP2Network(session.network).networkId,
|
|
733
699
|
signingProviderId: ""
|
|
734
700
|
}
|
|
735
701
|
]);
|
|
@@ -814,7 +780,7 @@ function sessionToAccount(session) {
|
|
|
814
780
|
hint: "",
|
|
815
781
|
publicKey: "",
|
|
816
782
|
namespace: "",
|
|
817
|
-
networkId: toCAIP2Network(session.network).networkId,
|
|
783
|
+
networkId: core.toCAIP2Network(session.network).networkId,
|
|
818
784
|
signingProviderId: ""
|
|
819
785
|
};
|
|
820
786
|
}
|
|
@@ -985,7 +951,7 @@ function findById(id) {
|
|
|
985
951
|
var CANTON_REQUEST_PROVIDER_EVENT = "canton:requestProvider";
|
|
986
952
|
var CANTON_ANNOUNCE_PROVIDER_EVENT = "canton:announceProvider";
|
|
987
953
|
function defaultAnnounceProvider(announced) {
|
|
988
|
-
return createExtensionChannelProvider({ target: announced.target });
|
|
954
|
+
return createExtensionChannelProvider({ target: announced.target ?? announced.id });
|
|
989
955
|
}
|
|
990
956
|
async function discoverAnnouncedProviders(options = {}) {
|
|
991
957
|
if (typeof window === "undefined") return [];
|
|
@@ -1048,17 +1014,17 @@ function raceTimeout(promise, ms) {
|
|
|
1048
1014
|
}
|
|
1049
1015
|
async function resolveInjectedKey(d) {
|
|
1050
1016
|
const sync = d.provider.id;
|
|
1051
|
-
if (typeof sync === "string" && sync.length > 0) return sync;
|
|
1017
|
+
if (typeof sync === "string" && sync.length > 0) return { key: sync, resolved: true };
|
|
1052
1018
|
try {
|
|
1053
1019
|
const status = await raceTimeout(
|
|
1054
1020
|
d.provider.request({ method: "status" }),
|
|
1055
1021
|
INJECTED_ID_PROBE_TIMEOUT_MS
|
|
1056
1022
|
);
|
|
1057
1023
|
const pid = status?.provider?.id;
|
|
1058
|
-
if (typeof pid === "string" && pid.length > 0) return pid;
|
|
1024
|
+
if (typeof pid === "string" && pid.length > 0) return { key: pid, resolved: true };
|
|
1059
1025
|
} catch {
|
|
1060
1026
|
}
|
|
1061
|
-
return d.id;
|
|
1027
|
+
return { key: d.id, resolved: false };
|
|
1062
1028
|
}
|
|
1063
1029
|
async function discoverProviders(options = {}) {
|
|
1064
1030
|
const injected = discoverInjectedProviders();
|
|
@@ -1067,19 +1033,23 @@ async function discoverProviders(options = {}) {
|
|
|
1067
1033
|
const out = [];
|
|
1068
1034
|
const seen = /* @__PURE__ */ new Set();
|
|
1069
1035
|
injected.forEach((d, i) => {
|
|
1070
|
-
const key = injectedKeys[i];
|
|
1036
|
+
const { key, resolved } = injectedKeys[i];
|
|
1071
1037
|
if (seen.has(key)) return;
|
|
1072
1038
|
seen.add(key);
|
|
1073
|
-
out.push(d);
|
|
1039
|
+
out.push({ ...d, id: resolved ? key : d.id, identityResolved: resolved });
|
|
1074
1040
|
});
|
|
1075
1041
|
for (const d of announcedResults) {
|
|
1076
1042
|
if (seen.has(d.id)) continue;
|
|
1077
1043
|
seen.add(d.id);
|
|
1078
|
-
out.push(d);
|
|
1044
|
+
out.push({ ...d, identityResolved: true });
|
|
1079
1045
|
}
|
|
1080
1046
|
return out;
|
|
1081
1047
|
}
|
|
1082
1048
|
|
|
1049
|
+
Object.defineProperty(exports, "CANTON_NETWORKS", {
|
|
1050
|
+
enumerable: true,
|
|
1051
|
+
get: function () { return core.CANTON_NETWORKS; }
|
|
1052
|
+
});
|
|
1083
1053
|
Object.defineProperty(exports, "CIP0103_EVENTS", {
|
|
1084
1054
|
enumerable: true,
|
|
1085
1055
|
get: function () { return core.CIP0103_EVENTS; }
|
|
@@ -1092,7 +1062,18 @@ Object.defineProperty(exports, "CIP0103_METHODS", {
|
|
|
1092
1062
|
enumerable: true,
|
|
1093
1063
|
get: function () { return core.CIP0103_METHODS; }
|
|
1094
1064
|
});
|
|
1095
|
-
exports
|
|
1065
|
+
Object.defineProperty(exports, "fromCAIP2Network", {
|
|
1066
|
+
enumerable: true,
|
|
1067
|
+
get: function () { return core.fromCAIP2Network; }
|
|
1068
|
+
});
|
|
1069
|
+
Object.defineProperty(exports, "isValidCAIP2", {
|
|
1070
|
+
enumerable: true,
|
|
1071
|
+
get: function () { return core.isValidCAIP2; }
|
|
1072
|
+
});
|
|
1073
|
+
Object.defineProperty(exports, "toCAIP2Network", {
|
|
1074
|
+
enumerable: true,
|
|
1075
|
+
get: function () { return core.toCAIP2Network; }
|
|
1076
|
+
});
|
|
1096
1077
|
exports.CIP0103EventBus = CIP0103EventBus;
|
|
1097
1078
|
exports.JSON_RPC_ERRORS = JSON_RPC_ERRORS;
|
|
1098
1079
|
exports.MethodRouter = MethodRouter;
|
|
@@ -1106,17 +1087,14 @@ exports.disconnected = disconnected;
|
|
|
1106
1087
|
exports.discoverAnnouncedProviders = discoverAnnouncedProviders;
|
|
1107
1088
|
exports.discoverInjectedProviders = discoverInjectedProviders;
|
|
1108
1089
|
exports.discoverProviders = discoverProviders;
|
|
1109
|
-
exports.fromCAIP2Network = fromCAIP2Network;
|
|
1110
1090
|
exports.handleAsyncConnect = handleAsyncConnect;
|
|
1111
1091
|
exports.handleAsyncPrepareExecute = handleAsyncPrepareExecute;
|
|
1112
1092
|
exports.internalError = internalError;
|
|
1113
1093
|
exports.invalidParams = invalidParams;
|
|
1114
1094
|
exports.isCIP0103Provider = isCIP0103Provider;
|
|
1115
|
-
exports.isValidCAIP2 = isValidCAIP2;
|
|
1116
1095
|
exports.methodNotFound = methodNotFound;
|
|
1117
1096
|
exports.resourceNotFound = resourceNotFound;
|
|
1118
1097
|
exports.resourceUnavailable = resourceUnavailable;
|
|
1119
|
-
exports.toCAIP2Network = toCAIP2Network;
|
|
1120
1098
|
exports.toPartyLayerError = toPartyLayerError;
|
|
1121
1099
|
exports.toProviderRpcError = toProviderRpcError;
|
|
1122
1100
|
exports.transactionRejected = transactionRejected;
|