@farcaster/miniapp-sdk 0.2.3 → 0.3.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farcaster/miniapp-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"@farcaster/quick-auth": "^0.0.6",
|
|
23
23
|
"comlink": "^4.4.2",
|
|
24
24
|
"eventemitter3": "^5.0.1",
|
|
25
|
-
"ox": "^0.
|
|
26
|
-
"@farcaster/miniapp-core": "0.
|
|
25
|
+
"ox": "^0.14.0",
|
|
26
|
+
"@farcaster/miniapp-core": "0.6.0"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"clean": "rm -rf dist",
|
package/src/ethereumProvider.ts
CHANGED
|
@@ -45,10 +45,9 @@ function toProviderRpcError({
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
const providerConfig = {
|
|
49
49
|
...emitter,
|
|
50
50
|
async request(args) {
|
|
51
|
-
// @ts-expect-error
|
|
52
51
|
const request = store.prepare(args)
|
|
53
52
|
|
|
54
53
|
try {
|
|
@@ -82,7 +81,10 @@ export const ethereumProvider: Provider.Provider = Provider.from({
|
|
|
82
81
|
})
|
|
83
82
|
}
|
|
84
83
|
},
|
|
85
|
-
}
|
|
84
|
+
} satisfies Parameters<typeof Provider.from>[0]
|
|
85
|
+
|
|
86
|
+
export const ethereumProvider: ReturnType<typeof Provider.from> =
|
|
87
|
+
Provider.from(providerConfig)
|
|
86
88
|
|
|
87
89
|
export async function getEthereumProvider(): Promise<
|
|
88
90
|
Provider.Provider | undefined
|