@vela-ventures/aosync-sdk-react 1.1.0 → 1.1.2

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/dist/types.d.ts CHANGED
@@ -17,10 +17,10 @@ export interface AOSyncSDKContext {
17
17
  getSupportedChains: () => ChainType[];
18
18
  getMultiChainAddresses: () => Promise<MultiChainWallet>;
19
19
  getAllAddresses: () => Promise<string[]>;
20
- getAddress: () => Promise<string | undefined>;
21
- signMessage: (message: string | Uint8Array) => Promise<string>;
22
- signTransaction: (transaction: any) => Promise<any>;
23
- sendTransaction: (transaction: any) => Promise<string>;
20
+ getAddress: (chain?: ChainType) => Promise<string | undefined>;
21
+ signMessage: (message: string | Uint8Array, chain?: ChainType) => Promise<string>;
22
+ signTransaction: (transaction: any, chain?: ChainType) => Promise<any>;
23
+ sendTransaction: (transaction: any, chain?: ChainType) => Promise<string>;
24
24
  signTypedData: (params: TypedDataParams) => Promise<string>;
25
25
  getWalletNames: () => Promise<{
26
26
  [addr: string]: string;
@@ -99,9 +99,9 @@ export function AOSyncProvider({ gatewayConfig = { host: "arweave.net", port: 44
99
99
  throw error;
100
100
  }
101
101
  });
102
- const getAddress = () => __awaiter(this, void 0, void 0, function* () {
102
+ const getAddress = (chain) => __awaiter(this, void 0, void 0, function* () {
103
103
  try {
104
- return yield walletRef.current.getActiveAddress();
104
+ return yield walletRef.current.getActiveAddress(chain);
105
105
  }
106
106
  catch (error) {
107
107
  console.error("Error getting address:", error);
@@ -260,27 +260,27 @@ export function AOSyncProvider({ gatewayConfig = { host: "arweave.net", port: 44
260
260
  }
261
261
  });
262
262
  // Universal signing methods
263
- const signMessage = (message) => __awaiter(this, void 0, void 0, function* () {
263
+ const signMessage = (message, chain) => __awaiter(this, void 0, void 0, function* () {
264
264
  try {
265
- return yield walletRef.current.signMessage(message);
265
+ return yield walletRef.current.signMessage(message, chain);
266
266
  }
267
267
  catch (error) {
268
268
  console.error("Error signing message:", error);
269
269
  throw error;
270
270
  }
271
271
  });
272
- const signTransaction = (transaction) => __awaiter(this, void 0, void 0, function* () {
272
+ const signTransaction = (transaction, chain) => __awaiter(this, void 0, void 0, function* () {
273
273
  try {
274
- return yield walletRef.current.signTransaction(transaction);
274
+ return yield walletRef.current.signTransaction(transaction, chain);
275
275
  }
276
276
  catch (error) {
277
277
  console.error("Error signing transaction:", error);
278
278
  throw error;
279
279
  }
280
280
  });
281
- const sendTransaction = (transaction) => __awaiter(this, void 0, void 0, function* () {
281
+ const sendTransaction = (transaction, chain) => __awaiter(this, void 0, void 0, function* () {
282
282
  try {
283
- return yield walletRef.current.sendTransaction(transaction);
283
+ return yield walletRef.current.sendTransaction(transaction, chain);
284
284
  }
285
285
  catch (error) {
286
286
  console.error("Error sending transaction:", error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vela-ventures/aosync-sdk-react",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist"
@@ -65,6 +65,6 @@
65
65
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0"
66
66
  },
67
67
  "dependencies": {
68
- "@vela-ventures/ao-sync-sdk": "^1.2.0"
68
+ "@vela-ventures/ao-sync-sdk": "^1.2.2"
69
69
  }
70
70
  }