@vela-ventures/aosync-sdk-react 1.0.11 → 1.0.12

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/README.md CHANGED
@@ -92,17 +92,16 @@ export default WalletComponent;
92
92
 
93
93
  The `useWallet` hook provides the following methods and properties:
94
94
 
95
- | Method/Property | Description |
96
- | ----------------------------------- | ---------------------------------------------- |
97
- | `isConnected` | Boolean indicating if the wallet is connected. |
98
- | `connect()` | Connects to the wallet. |
99
- | `disconnect()` | Disconnects from the wallet. |
100
- | `getAddress()` | Returns the currently active wallet address. |
101
- | `getAllAddresses()` | Returns all wallet addresses. |
102
- | `sendAR(recipient, quantity)` | Sends AR to the specified address. |
103
- | `sign(transaction)` | Signs a transaction using the wallet. |
104
- | `signAOMessage(target, tags, data)` | Signs an ANS-104 Data Item. |
105
- | `signAODataItem(dataItem)` | Signs an ANS-104 Data Item. |
95
+ | Method/Property | Description |
96
+ | ----------------------------- | ---------------------------------------------- |
97
+ | `isConnected` | Boolean indicating if the wallet is connected. |
98
+ | `connect()` | Connects to the wallet. |
99
+ | `disconnect()` | Disconnects from the wallet. |
100
+ | `getAddress()` | Returns the currently active wallet address. |
101
+ | `getAllAddresses()` | Returns all wallet addresses. |
102
+ | `sendAR(recipient, quantity)` | Sends AR to the specified address. |
103
+ | `sign(transaction)` | Signs a transaction using the wallet. |
104
+ | `signAOMessage(dataItem)` | Signs an ANS-104 Data Item. |
106
105
 
107
106
  ## License
108
107
 
package/dist/types.d.ts CHANGED
@@ -7,10 +7,6 @@ export interface AOSyncSDKContext {
7
7
  getAllAddresses: () => Promise<string[]>;
8
8
  getAddress: () => Promise<string | undefined>;
9
9
  sendAR: (recipient: string, quantity: string) => Promise<any>;
10
- signAOMessage: (target: string, tags: {
11
- name: string;
12
- value: string;
13
- }[], data: string) => Promise<any>;
14
- signAODataItem: (dataItem: DataItem) => Promise<any>;
10
+ signAOMessage: (dataItem: DataItem) => Promise<any>;
15
11
  sign: (transaction: Transaction) => Promise<Transaction>;
16
12
  }
@@ -82,7 +82,7 @@ export function AOSyncProvider({ gatewayConfig = { host: "arweave.net", port: 44
82
82
  throw error;
83
83
  }
84
84
  });
85
- const signAODataItem = (dataItem) => __awaiter(this, void 0, void 0, function* () {
85
+ const signAOMessage = (dataItem) => __awaiter(this, void 0, void 0, function* () {
86
86
  try {
87
87
  const signedDataItem = yield walletRef.current.signDataItem(dataItem);
88
88
  const response = yield fetch(muUrl, {
@@ -102,38 +102,6 @@ export function AOSyncProvider({ gatewayConfig = { host: "arweave.net", port: 44
102
102
  throw error;
103
103
  }
104
104
  });
105
- const signAOMessage = (target, tags, data) => __awaiter(this, void 0, void 0, function* () {
106
- try {
107
- const dataItem = {
108
- data: data,
109
- target,
110
- tags: [
111
- { name: "Action", value: "Transfer" },
112
- { name: "SDK", value: "Beacon Wallet" },
113
- { name: "Data-Protocol", value: "ao" },
114
- { name: "Variant", value: "ao.TN.1" },
115
- { name: "Type", value: "Message" },
116
- ...tags,
117
- ],
118
- };
119
- const signedDataItem = yield walletRef.current.signDataItem(dataItem);
120
- const response = yield fetch(muUrl, {
121
- method: "POST",
122
- headers: {
123
- "Content-Type": "application/octet-stream",
124
- },
125
- body: signedDataItem,
126
- });
127
- if (!response.ok) {
128
- throw new Error("Network response was not ok");
129
- }
130
- return signedDataItem;
131
- }
132
- catch (error) {
133
- console.error("Error signing AO message:", error);
134
- throw error;
135
- }
136
- });
137
105
  const sign = (transaction) => __awaiter(this, void 0, void 0, function* () {
138
106
  try {
139
107
  return yield walletRef.current.sign(transaction);
@@ -151,7 +119,6 @@ export function AOSyncProvider({ gatewayConfig = { host: "arweave.net", port: 44
151
119
  getAllAddresses,
152
120
  sendAR,
153
121
  signAOMessage,
154
- signAODataItem,
155
122
  sign,
156
123
  } }, children));
157
124
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vela-ventures/aosync-sdk-react",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist"