@canton-network/core-splice-provider 0.6.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 CHANGED
@@ -1,9 +1,7 @@
1
1
  import { SpliceProvider } from './SpliceProvider';
2
2
  declare global {
3
3
  interface Window {
4
- splice?: SpliceProvider;
5
4
  canton?: SpliceProvider;
6
- ethereum?: SpliceProvider;
7
5
  }
8
6
  }
9
7
  export declare enum ProviderType {
@@ -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;QACvB,MAAM,CAAC,EAAE,cAAc,CAAA;QACvB,QAAQ,CAAC,EAAE,cAAc,CAAA;KAC5B;CACJ;AAED,oBAAY,YAAY;IACpB,MAAM,IAAA;IACN,IAAI,IAAA;CACP;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,cAAc,GAAG,cAAc,CAa7E;AAED,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,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
- const existing = window.splice || window.canton || window.ethereum;
11
- if (existing)
12
- return existing;
10
+ if (window.canton !== undefined)
11
+ return window.canton;
13
12
  // Inject the SpliceProvider instance
14
- window.splice = provider;
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.splice;
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.6.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": "^0.6.0",
22
- "@canton-network/core-wallet-ui-components": "^0.6.0",
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": [