File tree Expand file tree Collapse file tree 5 files changed +390
-229
lines changed
Expand file tree Collapse file tree 5 files changed +390
-229
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ async function signTransactions(txns) {
5757 " [LuteWallet] Error signing transactions: " +
5858 (err instanceof SignTxnsError
5959 ? ` ${err .message } (code: ${err .code }) `
60- : err .message )
60+ : err .message ),
6161 );
6262 throw err ;
6363 }
@@ -95,7 +95,35 @@ async function authenticate() {
9595 " [LuteWallet] Error signing data: " +
9696 (err instanceof SignDataError
9797 ? ` ${err .message } (code: ${err .code }) `
98- : err .message )
98+ : err .message ),
99+ );
100+ throw err ;
101+ }
102+ }
103+ ```
104+
105+ ### Add Network
106+
107+ ``` ts
108+ // Warning: Browser will block pop-up if user doesn't trigger lute.addNetwork() with a button click
109+ async function addCustomNetwork() {
110+ try {
111+ const customNetwork: Network = {
112+ name: " ExampleNet" ,
113+ algod: {
114+ url: " https://examplenet-api.4160.nodely.dev" ,
115+ port: " " ,
116+ token: " " ,
117+ },
118+ genesisID: " examplenet-v1.0" ,
119+ };
120+ await lute .addNetwork (customNetwork );
121+ } catch (err ) {
122+ console .error (
123+ " [LuteWallet] Error adding network: " +
124+ (err instanceof AddNetworkError
125+ ? ` ${err .message } (code: ${err .code }) `
126+ : err .message ),
99127 );
100128 throw err ;
101129 }
Original file line number Diff line number Diff line change 11{
22 "name" : " lute-connect" ,
3- "version" : " 1.6.3 " ,
3+ "version" : " 1.7.0 " ,
44 "description" : " Enables dApps to communicate with Lute, an Algorand wallet" ,
55 "main" : " ./dist/main.cjs.js" ,
66 "module" : " ./dist/main.esm.js" ,
2424 },
2525 "homepage" : " https://github.com/GalaxyPay/lute-connect#readme" ,
2626 "devDependencies" : {
27- "@rollup/plugin-typescript" : " ^11.1.6 " ,
28- "rollup" : " ^4.40.0 " ,
27+ "@rollup/plugin-typescript" : " ^12.3.0 " ,
28+ "rollup" : " ^4.57.1 " ,
2929 "tslib" : " ^2.8.1" ,
30- "typescript" : " ^5.8 .3"
30+ "typescript" : " ^5.9 .3"
3131 }
3232}
You can’t perform that action at this time.
0 commit comments