@vela-ventures/aosync-sdk-react 1.0.31 → 1.0.32
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 +2 -0
- package/dist/walletContext.js +20 -0
- package/package.json +2 -2
package/dist/types.d.ts
CHANGED
|
@@ -15,5 +15,7 @@ export interface AOSyncSDKContext {
|
|
|
15
15
|
getWallets: () => ReturnType<WalletClient['getWallets']>;
|
|
16
16
|
userTokens: () => Promise<UserTokensResult>;
|
|
17
17
|
signAOMessage: (dataItem: DataItem) => Promise<string>;
|
|
18
|
+
swapActiveWallet: (walletAddress: string) => Promise<string>;
|
|
19
|
+
getContacts: () => ReturnType<WalletClient['getContacts']>;
|
|
18
20
|
sign: (transaction: Transaction) => Promise<Transaction>;
|
|
19
21
|
}
|
package/dist/walletContext.js
CHANGED
|
@@ -169,6 +169,24 @@ export function AOSyncProvider({ gatewayConfig = { host: "arweave.net", port: 44
|
|
|
169
169
|
throw error;
|
|
170
170
|
}
|
|
171
171
|
});
|
|
172
|
+
const swapActiveWallet = (walletAddress) => __awaiter(this, void 0, void 0, function* () {
|
|
173
|
+
try {
|
|
174
|
+
return yield walletRef.current.swapActiveWallet(walletAddress);
|
|
175
|
+
}
|
|
176
|
+
catch (error) {
|
|
177
|
+
console.error("Error swapping wallet:", error);
|
|
178
|
+
throw error;
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
const getContacts = () => __awaiter(this, void 0, void 0, function* () {
|
|
182
|
+
try {
|
|
183
|
+
return yield walletRef.current.getContacts();
|
|
184
|
+
}
|
|
185
|
+
catch (error) {
|
|
186
|
+
console.error("Error getting contacts:", error);
|
|
187
|
+
throw error;
|
|
188
|
+
}
|
|
189
|
+
});
|
|
172
190
|
return (React.createElement(AOSyncContext.Provider, { value: {
|
|
173
191
|
isConnected,
|
|
174
192
|
isSessionActive,
|
|
@@ -181,6 +199,8 @@ export function AOSyncProvider({ gatewayConfig = { host: "arweave.net", port: 44
|
|
|
181
199
|
userTokens,
|
|
182
200
|
sendAR,
|
|
183
201
|
signAOMessage,
|
|
202
|
+
swapActiveWallet,
|
|
203
|
+
getContacts,
|
|
184
204
|
sign,
|
|
185
205
|
} }, children));
|
|
186
206
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vela-ventures/aosync-sdk-react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.32",
|
|
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.1.
|
|
68
|
+
"@vela-ventures/ao-sync-sdk": "^1.1.32"
|
|
69
69
|
}
|
|
70
70
|
}
|