-
Notifications
You must be signed in to change notification settings - Fork 453
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement new Fuel Wallet Connector (#959)
- Loading branch information
1 parent
53f9664
commit 1da4011
Showing
24 changed files
with
2,230 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Fuel Wallet SDK version 2.0 | ||
|
||
> This is a work in progress version of the new Fuel Wallet SDK. Please only use this version if you are actively looking to test it. This version is not compatible with the current versions of Fuel Wallet and Fuel Wallet Development. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import type { JestConfigWithTsJest } from 'ts-jest'; | ||
import { defaultsESM as tsjPreset } from 'ts-jest/presets'; | ||
|
||
import pkg from './package.json'; | ||
|
||
const config: JestConfigWithTsJest = { | ||
displayName: pkg.name, | ||
extensionsToTreatAsEsm: ['.ts', '.tsx'], | ||
modulePathIgnorePatterns: ['dist'], | ||
rootDir: __dirname, | ||
transform: tsjPreset.transform, | ||
setupFilesAfterEnv: ['./jest.setup.ts'], | ||
clearMocks: true, | ||
moduleFileExtensions: ['js', 'ts'], | ||
testEnvironment: 'jsdom', | ||
preset: 'ts-jest', | ||
testMatch: ['./**/*.test.ts'], | ||
testRunner: 'jest-circus/runner', | ||
verbose: true, | ||
globals: { | ||
window: {}, | ||
}, | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// This is needed bc of this error https://github.com/jestjs/jest/issues/2549 | ||
Object.defineProperty(Uint8Array, Symbol.hasInstance, { | ||
value(potentialInstance: unknown) { | ||
return this === Uint8Array | ||
? Object.prototype.toString.call(potentialInstance) === | ||
'[object Uint8Array]' | ||
: Uint8Array[Symbol.hasInstance].call(this, potentialInstance); | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"name": "@fuel-wallet/sdk-v2", | ||
"private": true, | ||
"description": "Integrate DApps with Fuel Network compatible Wallets.", | ||
"version": "0.13.5", | ||
"license": "Apache-2.0", | ||
"main": "src/index.ts", | ||
"publishConfig": { | ||
"access": "public", | ||
"main": "dist/index.js", | ||
"module": "dist/index.mjs", | ||
"types": "dist/index.d.ts", | ||
"typings": "dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"require": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.mjs" | ||
} | ||
} | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "pnpm ts:check && tsup", | ||
"ts:check": "tsc --noEmit", | ||
"test": "jest --verbose" | ||
}, | ||
"dependencies": { | ||
"@fuels/assets": "0.0.11", | ||
"events": "^3.3.0" | ||
}, | ||
"peerDependencies": { | ||
"fuels": ">=0.63.0" | ||
}, | ||
"devDependencies": { | ||
"@fuel-ts/wallet": "0.63.0", | ||
"fuels": "0.63.0", | ||
"jest-environment-jsdom": "29.6.2", | ||
"tsup": "^7.2.0" | ||
} | ||
} |
Oops, something went wrong.