@rocketh/signer 0.11.21 → 0.11.22-testing.1
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 +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -5
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":""}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,sBAAsB,EAAC,MAAM,mCAAmC,CAAC;AAEzE,eAAO,MAAM,UAAU,EAAE,sBASxB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { handleSignerProtocol } from 'rocketh';
|
|
2
1
|
import { EIP1193LocalSigner } from 'eip-1193-signer';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
2
|
+
export const privateKey = async (protocolString) => {
|
|
3
|
+
if (!protocolString.startsWith('0x')) {
|
|
4
|
+
throw new Error(`Private key must start with 0x, got: ${protocolString}`);
|
|
5
|
+
}
|
|
6
|
+
const privateKey = protocolString;
|
|
7
|
+
return {
|
|
8
|
+
type: 'signerOnly',
|
|
9
|
+
signer: new EIP1193LocalSigner(privateKey),
|
|
10
|
+
};
|
|
11
|
+
};
|
|
7
12
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAGnD,MAAM,CAAC,MAAM,UAAU,GAA2B,KAAK,EAAE,cAAsB,EAAE,EAAE;IAClF,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACtC,MAAM,IAAI,KAAK,CAAC,wCAAwC,cAAc,EAAE,CAAC,CAAC;IAC3E,CAAC;IACD,MAAM,UAAU,GAAG,cAA+B,CAAC;IACnD,OAAO;QACN,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,IAAI,kBAAkB,CAAC,UAAU,CAAC;KAC1C,CAAC;AACH,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rocketh/signer",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.22-testing.1",
|
|
4
4
|
"description": "add signer to rocketh",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -26,10 +26,7 @@
|
|
|
26
26
|
"eip-1193": "^0.6.2",
|
|
27
27
|
"rimraf": "^6.0.1",
|
|
28
28
|
"typescript": "^5.8.2",
|
|
29
|
-
"rocketh": "0.11.
|
|
30
|
-
},
|
|
31
|
-
"peerDependencies": {
|
|
32
|
-
"rocketh": "0.11.21"
|
|
29
|
+
"rocketh": "0.11.22-testing.1"
|
|
33
30
|
},
|
|
34
31
|
"scripts": {
|
|
35
32
|
"build": "tsc --project tsconfig.json",
|