@canton-network/core-splice-provider 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -7
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,MAAM,CAAC,EAAE,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,MAAM,CAAC,EAAE,cAAc,CAAA;KAC1B;CACJ;AAED,oBAAY,YAAY;IACpB,MAAM,IAAA;IACN,IAAI,IAAA;CACP;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,cAAc,GAAG,cAAc,CAS7E;AAED,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -7,15 +7,12 @@ export var ProviderType;
|
|
|
7
7
|
})(ProviderType || (ProviderType = {}));
|
|
8
8
|
export function injectSpliceProvider(provider) {
|
|
9
9
|
// Check if the provider is already injected
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return existing;
|
|
10
|
+
if (window.canton !== undefined)
|
|
11
|
+
return window.canton;
|
|
13
12
|
// Inject the SpliceProvider instance
|
|
14
|
-
window.
|
|
15
|
-
window.canton = window.splice; // For compatibility with Canton dApps
|
|
16
|
-
window.ethereum = window.splice; // For EIP-1193 compatibility
|
|
13
|
+
window.canton = provider;
|
|
17
14
|
console.log('Splice provider injected successfully.');
|
|
18
|
-
return window.
|
|
15
|
+
return window.canton;
|
|
19
16
|
}
|
|
20
17
|
export * from './SpliceProvider';
|
|
21
18
|
export * from './SpliceProviderHttp';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canton-network/core-splice-provider",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A JavaScript Splice Provider API (EIP-1193 compliant).",
|
|
6
6
|
"repository": "github:hyperledger-labs/splice-wallet-kernel",
|
|
@@ -12,14 +12,15 @@
|
|
|
12
12
|
"scripts": {
|
|
13
13
|
"build": "tsc -b",
|
|
14
14
|
"dev": "tsc -b --watch",
|
|
15
|
+
"flatpack": "yarn pack --out \"$FLATPACK_OUTDIR\"",
|
|
15
16
|
"clean": "tsc -b --clean; rm -rf dist"
|
|
16
17
|
},
|
|
17
18
|
"devDependencies": {
|
|
18
19
|
"typescript": "^5.8.3"
|
|
19
20
|
},
|
|
20
21
|
"dependencies": {
|
|
21
|
-
"@canton-network/core-types": "
|
|
22
|
-
"@canton-network/core-wallet-ui-components": "
|
|
22
|
+
"@canton-network/core-types": "",
|
|
23
|
+
"@canton-network/core-wallet-ui-components": "",
|
|
23
24
|
"socket.io-client": "^4.8.1"
|
|
24
25
|
},
|
|
25
26
|
"files": [
|