@vleap/warps-adapter-fastset 0.1.0-alpha.30 → 0.1.0-alpha.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/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -21,7 +21,9 @@ declare class WarpFastsetWallet implements AdapterWarpWallet {
|
|
|
21
21
|
constructor(config: WarpClientConfig, chain: WarpChainInfo);
|
|
22
22
|
signTransaction(tx: WarpAdapterGenericTransaction): Promise<WarpAdapterGenericTransaction>;
|
|
23
23
|
signMessage(message: string): Promise<string>;
|
|
24
|
+
signTransactions(txs: WarpAdapterGenericTransaction[]): Promise<WarpAdapterGenericTransaction[]>;
|
|
24
25
|
sendTransaction(tx: WarpAdapterGenericTransaction): Promise<string>;
|
|
26
|
+
sendTransactions(txs: WarpAdapterGenericTransaction[]): Promise<string[]>;
|
|
25
27
|
create(mnemonic: string): WarpWalletDetails;
|
|
26
28
|
generate(): WarpWalletDetails;
|
|
27
29
|
getAddress(): string | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -21,7 +21,9 @@ declare class WarpFastsetWallet implements AdapterWarpWallet {
|
|
|
21
21
|
constructor(config: WarpClientConfig, chain: WarpChainInfo);
|
|
22
22
|
signTransaction(tx: WarpAdapterGenericTransaction): Promise<WarpAdapterGenericTransaction>;
|
|
23
23
|
signMessage(message: string): Promise<string>;
|
|
24
|
+
signTransactions(txs: WarpAdapterGenericTransaction[]): Promise<WarpAdapterGenericTransaction[]>;
|
|
24
25
|
sendTransaction(tx: WarpAdapterGenericTransaction): Promise<string>;
|
|
26
|
+
sendTransactions(txs: WarpAdapterGenericTransaction[]): Promise<string[]>;
|
|
25
27
|
create(mnemonic: string): WarpWalletDetails;
|
|
26
28
|
generate(): WarpWalletDetails;
|
|
27
29
|
getAddress(): string | null;
|
package/dist/index.js
CHANGED
|
@@ -1824,7 +1824,7 @@ var WarpFastsetResults = class {
|
|
|
1824
1824
|
this.chain = chain2;
|
|
1825
1825
|
this.serializer = new WarpFastsetSerializer();
|
|
1826
1826
|
}
|
|
1827
|
-
async
|
|
1827
|
+
async getActionExecution(warp, actionIndex, tx) {
|
|
1828
1828
|
const success = this.isTransactionSuccessful(tx);
|
|
1829
1829
|
const transactionHash = this.extractTransactionHash(tx);
|
|
1830
1830
|
const blockNumber = this.extractBlockNumber(tx);
|
|
@@ -2899,11 +2899,17 @@ var WarpFastsetWallet = class {
|
|
|
2899
2899
|
const signature = ed25519_exports.sign(messageBytes, privateKeyBytes);
|
|
2900
2900
|
return uint8ArrayToHex(signature);
|
|
2901
2901
|
}
|
|
2902
|
+
async signTransactions(txs) {
|
|
2903
|
+
return Promise.all(txs.map(async (tx) => this.signTransaction(tx)));
|
|
2904
|
+
}
|
|
2902
2905
|
async sendTransaction(tx) {
|
|
2903
2906
|
const { signature, ...transactionWithoutSignature } = tx;
|
|
2904
2907
|
const _cert = await this.client.submitTransaction(transactionWithoutSignature, signature);
|
|
2905
2908
|
return "TODO";
|
|
2906
2909
|
}
|
|
2910
|
+
async sendTransactions(txs) {
|
|
2911
|
+
return Promise.all(txs.map(async (tx) => this.sendTransaction(tx)));
|
|
2912
|
+
}
|
|
2907
2913
|
create(mnemonic) {
|
|
2908
2914
|
const seed = bip39.mnemonicToSeedSync(mnemonic);
|
|
2909
2915
|
const privateKey = seed.slice(0, 32);
|
|
@@ -2912,7 +2918,7 @@ var WarpFastsetWallet = class {
|
|
|
2912
2918
|
return { address, privateKey: uint8ArrayToHex(privateKey), mnemonic };
|
|
2913
2919
|
}
|
|
2914
2920
|
generate() {
|
|
2915
|
-
const privateKey = ed25519_exports.utils.
|
|
2921
|
+
const privateKey = ed25519_exports.utils.randomSecretKey();
|
|
2916
2922
|
const publicKey = ed25519_exports.getPublicKey(privateKey);
|
|
2917
2923
|
const address = FastsetClient.encodeBech32Address(publicKey);
|
|
2918
2924
|
return { address, privateKey: uint8ArrayToHex(privateKey), mnemonic: null };
|