@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.
@@ -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
- transactionPayload: {
18
- data: InputGenerateTransactionPayloadData;
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
- authenticator: AccountAuthenticatorAbstraction;
34
- transactionSubmitter?: InputTransactionPluginData;
35
- };
30
+ senderAuthenticator: AccountAuthenticatorAbstraction;
31
+ } & InputTransactionPluginData;
36
32
  /**
37
33
  * Parameters type for the useStorageAccount hook.
38
34
  */
@@ -135,11 +135,11 @@ function useStorageAccount(params) {
135
135
  if (!solanaAddress) {
136
136
  throw new Error("Wallet not connected");
137
137
  }
138
- const { transaction, authenticator, transactionSubmitter } = params2;
138
+ const { transaction, senderAuthenticator, transactionSubmitter } = params2;
139
139
  const transactionSubmitted = await client.aptos.transaction.submit.simple({
140
140
  transaction,
141
- senderAuthenticator: authenticator,
142
- transactionSubmitter: transactionSubmitter?.transactionSubmitter ?? null
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 { transactionPayload, transactionSubmitter } = params2;
159
+ const { data, transactionSubmitter } = params2;
160
160
  const { authenticator, rawTransaction } = await signTransaction({
161
- data: transactionPayload.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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shelby-protocol/solana-kit",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"