@pooflabs/core 0.0.20 → 0.0.21
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/client/operations.d.ts +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -1
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.ts +14 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Transaction, VersionedTransaction } from '@solana/web3.js';
|
|
1
|
+
import { PublicKey, Transaction, VersionedTransaction } from '@solana/web3.js';
|
|
2
2
|
export type SetOptions = {
|
|
3
3
|
shouldSubmitTx?: boolean;
|
|
4
4
|
_overrides?: {
|
|
@@ -54,3 +54,4 @@ export declare function getFiles(path: string): Promise<any>;
|
|
|
54
54
|
export declare function setFile(path: string, file: File | null): Promise<boolean>;
|
|
55
55
|
export declare function signMessage(message: string): Promise<string>;
|
|
56
56
|
export declare function signTransaction(transaction: Transaction | VersionedTransaction): Promise<Transaction | VersionedTransaction>;
|
|
57
|
+
export declare function signAndSubmitTransaction(transaction: Transaction | VersionedTransaction, feePayer?: PublicKey): Promise<string>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { init } from './client/config';
|
|
2
2
|
export { getConfig, ClientConfig } from './client/config';
|
|
3
|
-
export { get, set, setMany, setFile, getFiles, runQuery, runQueryMany, runExpression, runExpressionMany, signMessage, signTransaction, SetOptions, RunExpressionOptions, RunExpressionResult } from './client/operations';
|
|
3
|
+
export { get, set, setMany, setFile, getFiles, runQuery, runQueryMany, runExpression, runExpressionMany, signMessage, signTransaction, signAndSubmitTransaction, SetOptions, RunExpressionOptions, RunExpressionResult } from './client/operations';
|
|
4
4
|
export { subscribe } from './client/subscription';
|
|
5
5
|
export * from './types';
|
|
6
6
|
export { getIdToken } from './utils/utils';
|
package/dist/index.js
CHANGED
|
@@ -3672,6 +3672,13 @@ async function signTransaction(transaction) {
|
|
|
3672
3672
|
}
|
|
3673
3673
|
return config.authProvider.signTransaction(transaction);
|
|
3674
3674
|
}
|
|
3675
|
+
async function signAndSubmitTransaction(transaction, feePayer) {
|
|
3676
|
+
const config = await getConfig();
|
|
3677
|
+
if (!config.authProvider) {
|
|
3678
|
+
throw new Error('Auth provider not initialized. Please call init() first.');
|
|
3679
|
+
}
|
|
3680
|
+
return config.authProvider.signAndSubmitTransaction(transaction, feePayer);
|
|
3681
|
+
}
|
|
3675
3682
|
|
|
3676
3683
|
const activeConnections = {};
|
|
3677
3684
|
const responseCache = {};
|
|
@@ -3893,6 +3900,7 @@ exports.runQueryMany = runQueryMany;
|
|
|
3893
3900
|
exports.set = set;
|
|
3894
3901
|
exports.setFile = setFile;
|
|
3895
3902
|
exports.setMany = setMany;
|
|
3903
|
+
exports.signAndSubmitTransaction = signAndSubmitTransaction;
|
|
3896
3904
|
exports.signMessage = signMessage;
|
|
3897
3905
|
exports.signSessionCreateMessage = signSessionCreateMessage;
|
|
3898
3906
|
exports.signTransaction = signTransaction;
|