From 32b87c66250aed5f78c0881ed509a85c0464525b Mon Sep 17 00:00:00 2001 From: Husien Vora Date: Tue, 10 Dec 2024 14:22:29 +0530 Subject: [PATCH 1/3] adding new chains --- CHANGELOG.md | 4 ++++ package-lock.json | 4 ++-- package.json | 2 +- src/chains/index.js | 5 +++++ src/lib/test/keyring.test.js | 30 ++++++++++++++++++++++++++++++ src/lib/test/vault.test.js | 17 +++++++++++------ 6 files changed, 53 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae6b9dc..47a0a3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -675,3 +675,7 @@ -Integrated vault-evm-controller -Resolved issue for unarchival of a wallet -Adding test for bitcoin + +### 2.9.2 (2024-12-10) + +-Adding new default EVM chains diff --git a/package-lock.json b/package-lock.json index 095f333..f2a9a52 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@getsafle/safle-vault", - "version": "2.9.1", + "version": "2.9.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@getsafle/safle-vault", - "version": "2.9.1", + "version": "2.9.2", "license": "MIT", "dependencies": { "@getsafle/safle-identity-wallet": "^1.3.0", diff --git a/package.json b/package.json index 8942819..f969175 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@getsafle/safle-vault", - "version": "2.9.1", + "version": "2.9.2", "description": "Safle Vault is a non-custodial, flexible and highly available crypto wallet which can be used to access dapps, send/receive crypto and store identity. Vault SDK is used to manage the vault and provide methods to generate vault, add new accounts, update the state and also enable the user to perform several vault related operations.", "main": "src/index.js", "scripts": { diff --git a/src/chains/index.js b/src/chains/index.js index 8ac2dc2..e16c336 100644 --- a/src/chains/index.js +++ b/src/chains/index.js @@ -16,6 +16,11 @@ const evmChains = { zkEVM: { symbol: "ZKEVM", txType: 2 }, bevm: { symbol: "BTC", txType: 0 }, rootstock: { symbol: "RBTC", txType: 0 }, + opbnb: { symbol: "BNB", txType: 0 }, + sei: { symbol: "SEI", txType: 0 }, + ronin: { symbol: "RON", txType: 0 }, + nebula: { symbol: "sFUEL", txType: 0 }, + immutable: { symbol: "IMX", txType: 0 }, }; const nonEvmChains = { diff --git a/src/lib/test/keyring.test.js b/src/lib/test/keyring.test.js index c295e6a..10b0dd9 100644 --- a/src/lib/test/keyring.test.js +++ b/src/lib/test/keyring.test.js @@ -57,6 +57,26 @@ let NETWORKS = { URL: "https://public-node.testnet.rsk.co", CHAIN_ID: 31, }, + opbnb: { + URL: "https://opbnb-rpc.publicnode.com", + CHAIN_ID: 204, + }, + sei: { + URL: "https://evm-rpc.sei-apis.com", + CHAIN_ID: 1329, + }, + ronin: { + URL: "https://ronin.lgns.net/rpc", + CHAIN_ID: 2020, + }, + nebula: { + URL: "https://mainnet.skalenodes.com/v1/green-giddy-denebola", + CHAIN_ID: 1482601649, + }, + immutable: { + URL: "https://rpc.immutable.com", + CHAIN_ID: 13371, + }, }; //uncomment the below if statement to run test for bitcoin and make sure you override the balance check in bitcoin controller @@ -84,6 +104,11 @@ const chainConfigs = { bevm: { symbol: "BTC", txType: 0 }, rootstock: { symbol: "RBTC", txType: 0 }, bitcoin: { symbol: "BTC", txType: 0 }, + opbnb: { symbol: "BNB", txType: 0 }, + sei: { symbol: "SEI", txType: 0 }, + ronin: { symbol: "RON", txType: 0 }, + nebula: { symbol: "sFUEL", txType: 0 }, + immutable: { symbol: "IMX", txType: 0 }, }; // Add the helper function @@ -322,6 +347,11 @@ describe("getActiveChains", () => { { chain: "zkEVM", symbol: "ZKEVM" }, { chain: "bevm", symbol: "BTC" }, { chain: "rootstock", symbol: "RBTC" }, + { chain: "opbnb", symbol: "BNB" }, + { chain: "sei", symbol: "SEI" }, + { chain: "ronin", symbol: "RON" }, + { chain: "nebula", symbol: "sFUEL" }, + { chain: "immutable", symbol: "IMX" }, ], }).toMatchObject(result); }); diff --git a/src/lib/test/vault.test.js b/src/lib/test/vault.test.js index 7cf5e61..85785ee 100644 --- a/src/lib/test/vault.test.js +++ b/src/lib/test/vault.test.js @@ -17,7 +17,7 @@ const logs = [ action: "add-account", timestamp: 1000000000001, platform: "web", - address: "0xF8919220F674a553F0F0F6e86481612A2bEd44EB", + address: "0x6bbc122fa843f3ed30d23f8cdd9a430d1f898d07", storage: ["mobile"], _id: "64e881b05b04774ca85aee51", }, @@ -25,7 +25,7 @@ const logs = [ action: "add-account", timestamp: 1000000000002, platform: "web", - address: "0x627437E29e7363C0F53896e84467EF6F8f9D0247", + address: "0x9dd2f739d2713dbf5135a94c3f65e565e781ce15", storage: ["mobile"], _id: "64e881e3bae0e048dfaefc46", }, @@ -33,7 +33,7 @@ const logs = [ action: "add-account", timestamp: 1000000000003, platform: "web", - address: "0xa1F77e4D8306000639D1d44a6013ad53b992182E", + address: "0xe390b170db2f84b48ab761f3071a4bbb3741b713", storage: ["mobile"], _id: "64ec3339a58abcbf66a9b34a", }, @@ -41,7 +41,7 @@ const logs = [ action: "add-account", timestamp: 1000000000004, platform: "web", - address: "0x9e6627384a3E6453b9EC061e4DaeD4cE0223bbdc", + address: "0x7010f6139c52ba3d3767a0a3d87d114f81122ed8", storage: ["mobile"], _id: "64ec333ca58abcbf66a9b354", }, @@ -49,7 +49,7 @@ const logs = [ action: "add-account", timestamp: 1000000000005, platform: "mobile", - address: "0xCccbD31ea19acE5688731148a4f63907F273BEe0", + address: "0xcdc7d5c379b3ccc2c874dfb965a2db7fb34e6e5a", storage: ["mobile"], _id: "64e87e9e72e00ccf96bce1fc", }, @@ -57,7 +57,7 @@ const logs = [ action: "delete-account", timestamp: 1000000000006, platform: "web", - address: "0x9e6627384a3E6453b9EC061e4DaeD4cE0223bbdc", + address: "0x6f6c301eed3835ad5dfc1340ae59f7f1a47846f5", storage: ["mobile"], _id: "64ec3339a58abcbf66a9b34a", }, @@ -80,6 +80,11 @@ describe("getSupportedChains", () => { zkEVM: "ZKEVM", bevm: "BTC", rootstock: "RBTC", + opbnb: "BNB", + sei: "SEI", + ronin: "RON", + nebula: "sFUEL", + immutable: "IMX", }, nonEvmChains: { bitcoin: "BTC", stacks: "STX", solana: "SOL" }, }).toMatchObject(result.response); From 8460e5f9abd5df7d32d05b195b529c5a191d1eda Mon Sep 17 00:00:00 2001 From: Husien Vora Date: Tue, 10 Dec 2024 17:03:05 +0530 Subject: [PATCH 2/3] updates with new chain --- .env | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 .env diff --git a/.env b/.env deleted file mode 100644 index 4bc9b9c..0000000 --- a/.env +++ /dev/null @@ -1,9 +0,0 @@ -OLD_MNEMONIC= "fun rough treat scan glimpse region century purpose expire video remind second" -MNEMONIC="vintage reflect pass input polar enlist giggle judge render position also document" -PIN="696969" -PRIVATE_KEY_EVM="0x7a9633b8103fec11c9e855a6b6c8c072e9af311a69b92ab0ad8186b1fb57371f" -PRIVATE_KEY_BTC= "KzQfcdjDRUwpVmKKev6k2aAeJFJ359Ht9Umxdg77MTzf2E3bzGsC" -EVM_ADDRESS_1='0x6bbc122fa843f3ed30d23f8cdd9a430d1f898d07' -EVM_ADDRESS_2="0xbae949ddb4d8ac763c12f206db842b9b2d49a464" -BITCOIN_ADDRESS_1="bc1qugw5q5yrzw86wnw3lgldm8en0c736k4hvceuzl" -BITCOIN_ADDRESS_2="bc1qta5f6q32cphxt5rck3kuspukac7keqvxyuk4cl" \ No newline at end of file From 6c04269a890ee0cb993bf7f16c73479ea80b031e Mon Sep 17 00:00:00 2001 From: Husien Vora Date: Tue, 10 Dec 2024 17:07:03 +0530 Subject: [PATCH 3/3] updating changelogs --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69633d7..85526a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -679,4 +679,4 @@ ### 2.9.3 (2024-12-10) --Adding new chains +-Integrated the following chains to safle-vault opBNB, Ronin, Sei Skale - Nebula, Immutable zk-EVM