@account-kit/react-native-signer 4.8.0 → 4.10.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/android/src/main/java/com/accountkit/reactnativesigner/core/TEKStamper.kt +84 -25
- package/lib/commonjs/client.js +67 -11
- package/lib/commonjs/client.js.map +1 -1
- package/lib/commonjs/errors.js +15 -0
- package/lib/commonjs/errors.js.map +1 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/signer.js +2 -0
- package/lib/commonjs/signer.js.map +1 -1
- package/lib/commonjs/utils/base64UrlEncode.js +12 -0
- package/lib/commonjs/utils/base64UrlEncode.js.map +1 -0
- package/lib/commonjs/utils/buffer-polyfill.js +7 -0
- package/lib/commonjs/utils/buffer-polyfill.js.map +1 -0
- package/lib/commonjs/utils/parseUrlParams.js +19 -0
- package/lib/commonjs/utils/parseUrlParams.js.map +1 -0
- package/lib/module/client.js +68 -12
- package/lib/module/client.js.map +1 -1
- package/lib/module/errors.js +10 -0
- package/lib/module/errors.js.map +1 -0
- package/lib/module/index.js +0 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/signer.js +1 -1
- package/lib/module/signer.js.map +1 -1
- package/lib/module/utils/base64UrlEncode.js +7 -0
- package/lib/module/utils/base64UrlEncode.js.map +1 -0
- package/lib/module/utils/buffer-polyfill.js +7 -0
- package/lib/module/utils/buffer-polyfill.js.map +1 -0
- package/lib/module/utils/parseUrlParams.js +14 -0
- package/lib/module/utils/parseUrlParams.js.map +1 -0
- package/lib/typescript/commonjs/src/client.d.ts +9 -3
- package/lib/typescript/commonjs/src/client.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/errors.d.ts +6 -0
- package/lib/typescript/commonjs/src/errors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/signer.d.ts +14 -1
- package/lib/typescript/commonjs/src/signer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/base64UrlEncode.d.ts +2 -0
- package/lib/typescript/commonjs/src/utils/base64UrlEncode.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/buffer-polyfill.d.ts +2 -0
- package/lib/typescript/commonjs/src/utils/buffer-polyfill.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/parseUrlParams.d.ts +2 -0
- package/lib/typescript/commonjs/src/utils/parseUrlParams.d.ts.map +1 -0
- package/lib/typescript/module/src/client.d.ts +9 -3
- package/lib/typescript/module/src/client.d.ts.map +1 -1
- package/lib/typescript/module/src/errors.d.ts +6 -0
- package/lib/typescript/module/src/errors.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +1 -1
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/signer.d.ts +14 -1
- package/lib/typescript/module/src/signer.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/base64UrlEncode.d.ts +2 -0
- package/lib/typescript/module/src/utils/base64UrlEncode.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/buffer-polyfill.d.ts +2 -0
- package/lib/typescript/module/src/utils/buffer-polyfill.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/parseUrlParams.d.ts +2 -0
- package/lib/typescript/module/src/utils/parseUrlParams.d.ts.map +1 -0
- package/package.json +6 -4
- package/src/client.ts +91 -15
- package/src/errors.ts +10 -0
- package/src/index.tsx +1 -2
- package/src/signer.ts +5 -2
- package/src/utils/base64UrlEncode.ts +11 -0
- package/src/utils/buffer-polyfill.ts +5 -0
- package/src/utils/parseUrlParams.ts +14 -0
package/src/index.tsx
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { RNAlchemySigner } from "./signer";
|
|
1
|
+
export { RNAlchemySigner, type RNAlchemySignerType } from "./signer.ts";
|
package/src/signer.ts
CHANGED
|
@@ -19,8 +19,8 @@ const RNAlchemySignerParamsSchema = z
|
|
|
19
19
|
|
|
20
20
|
export type RNAlchemySignerParams = z.input<typeof RNAlchemySignerParamsSchema>;
|
|
21
21
|
|
|
22
|
-
class RNAlchemySignerSingleton extends BaseAlchemySigner<RNSignerClient> {
|
|
23
|
-
private static instance:
|
|
22
|
+
export class RNAlchemySignerSingleton extends BaseAlchemySigner<RNSignerClient> {
|
|
23
|
+
private static instance: RNAlchemySignerSingleton;
|
|
24
24
|
|
|
25
25
|
private constructor(params: RNAlchemySignerParams) {
|
|
26
26
|
if (!!RNAlchemySignerSingleton.instance) {
|
|
@@ -37,6 +37,7 @@ class RNAlchemySignerSingleton extends BaseAlchemySigner<RNSignerClient> {
|
|
|
37
37
|
} else {
|
|
38
38
|
client = params_.client;
|
|
39
39
|
}
|
|
40
|
+
|
|
40
41
|
super({
|
|
41
42
|
client,
|
|
42
43
|
sessionConfig,
|
|
@@ -56,3 +57,5 @@ export function RNAlchemySigner(params: RNAlchemySignerParams) {
|
|
|
56
57
|
|
|
57
58
|
return instance;
|
|
58
59
|
}
|
|
60
|
+
|
|
61
|
+
export type RNAlchemySignerType = RNAlchemySignerSingleton;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const parseSearchParams = (url: string) => {
|
|
2
|
+
const regex = /[?&]([^=#]+)=([^&#]*)/g;
|
|
3
|
+
|
|
4
|
+
let params: Record<string, string> = {};
|
|
5
|
+
let match: RegExpExecArray | null;
|
|
6
|
+
|
|
7
|
+
while ((match = regex.exec(url))) {
|
|
8
|
+
if (match[1] !== undefined && match[2] !== undefined) {
|
|
9
|
+
params[match[1]] = match[2];
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return params;
|
|
14
|
+
};
|