@shelby-protocol/solana-kit 0.1.0 → 0.1.1
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/react/index.d.ts +4 -8
- package/dist/react/index.mjs +6 -6
- package/package.json +1 -1
package/dist/react/index.d.ts
CHANGED
|
@@ -14,11 +14,8 @@ type SignMessageFn = (message: Uint8Array) => Promise<Uint8Array>;
|
|
|
14
14
|
* Input type for signing and submitting transactions with the Solana wallet.
|
|
15
15
|
*/
|
|
16
16
|
type SignAndSubmitTransactionInput = {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
transactionSubmitter?: InputTransactionPluginData;
|
|
21
|
-
};
|
|
17
|
+
data: InputGenerateTransactionPayloadData;
|
|
18
|
+
} & InputTransactionPluginData;
|
|
22
19
|
/**
|
|
23
20
|
* Input type for signing transactions with the Solana wallet.
|
|
24
21
|
*/
|
|
@@ -30,9 +27,8 @@ type SignTransactionInput = {
|
|
|
30
27
|
*/
|
|
31
28
|
type SubmitTransactionInput = {
|
|
32
29
|
transaction: AnyRawTransaction;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
30
|
+
senderAuthenticator: AccountAuthenticatorAbstraction;
|
|
31
|
+
} & InputTransactionPluginData;
|
|
36
32
|
/**
|
|
37
33
|
* Parameters type for the useStorageAccount hook.
|
|
38
34
|
*/
|
package/dist/react/index.mjs
CHANGED
|
@@ -135,11 +135,11 @@ function useStorageAccount(params) {
|
|
|
135
135
|
if (!solanaAddress) {
|
|
136
136
|
throw new Error("Wallet not connected");
|
|
137
137
|
}
|
|
138
|
-
const { transaction,
|
|
138
|
+
const { transaction, senderAuthenticator, transactionSubmitter } = params2;
|
|
139
139
|
const transactionSubmitted = await client.aptos.transaction.submit.simple({
|
|
140
140
|
transaction,
|
|
141
|
-
senderAuthenticator
|
|
142
|
-
transactionSubmitter: transactionSubmitter
|
|
141
|
+
senderAuthenticator,
|
|
142
|
+
transactionSubmitter: transactionSubmitter ?? null
|
|
143
143
|
});
|
|
144
144
|
const committedTransaction = await client.aptos.waitForTransaction({
|
|
145
145
|
transactionHash: transactionSubmitted.hash
|
|
@@ -156,13 +156,13 @@ function useStorageAccount(params) {
|
|
|
156
156
|
if (!storageAccountAddress) {
|
|
157
157
|
throw new Error("Storage account address not found");
|
|
158
158
|
}
|
|
159
|
-
const {
|
|
159
|
+
const { data, transactionSubmitter } = params2;
|
|
160
160
|
const { authenticator, rawTransaction } = await signTransaction({
|
|
161
|
-
data
|
|
161
|
+
data
|
|
162
162
|
});
|
|
163
163
|
const hash = await submitTransaction({
|
|
164
164
|
transaction: rawTransaction,
|
|
165
|
-
authenticator,
|
|
165
|
+
senderAuthenticator: authenticator,
|
|
166
166
|
transactionSubmitter
|
|
167
167
|
});
|
|
168
168
|
return hash;
|