@joai/warps-adapter-fastset 1.0.0-beta.58
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 +38 -0
- package/dist/index.d.cts +41 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.js +2802 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2789 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +47 -0
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @joai/warps-adapter-fastset
|
|
2
|
+
|
|
3
|
+
Fastset blockchain adapter for the Warps SDK. Enables Warp execution on the Fastset network.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @joai/warps-adapter-fastset
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { WarpClient, withAdapterFallback } from '@joai/warps'
|
|
15
|
+
import { FastsetAdapter } from '@joai/warps-adapter-fastset'
|
|
16
|
+
import { MultiversxAdapter } from '@joai/warps-adapter-multiversx'
|
|
17
|
+
|
|
18
|
+
// Fastset adapter requires a fallback adapter
|
|
19
|
+
const client = new WarpClient(config, {
|
|
20
|
+
chains: [withAdapterFallback(FastsetAdapter, MultiversxAdapter)],
|
|
21
|
+
})
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Features
|
|
25
|
+
|
|
26
|
+
- Transaction creation and execution
|
|
27
|
+
- Smart contract interaction
|
|
28
|
+
- Token transfers
|
|
29
|
+
- Query contract state
|
|
30
|
+
- Transaction signing and broadcasting
|
|
31
|
+
- Explorer integration
|
|
32
|
+
|
|
33
|
+
## Wallet Providers
|
|
34
|
+
|
|
35
|
+
Supports multiple wallet providers:
|
|
36
|
+
- Private key
|
|
37
|
+
- Mnemonic
|
|
38
|
+
- Read-only (for queries)
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { WarpChainAsset, ChainAdapterFactory, AdapterWarpExecutor, WarpClientConfig, WarpChainInfo, WarpExecutable, WarpAdapterGenericTransaction, AdapterWarpWallet, WarpWalletDetails, WarpWalletProvider } from '@joai/warps';
|
|
2
|
+
|
|
3
|
+
declare const NativeTokenSet: WarpChainAsset;
|
|
4
|
+
declare const FastsetAdapter: ChainAdapterFactory;
|
|
5
|
+
|
|
6
|
+
declare class WarpFastsetExecutor implements AdapterWarpExecutor {
|
|
7
|
+
private readonly config;
|
|
8
|
+
private readonly chain;
|
|
9
|
+
private readonly client;
|
|
10
|
+
constructor(config: WarpClientConfig, chain: WarpChainInfo);
|
|
11
|
+
createTransaction(executable: WarpExecutable): Promise<any>;
|
|
12
|
+
createTransferTransaction(executable: WarpExecutable): Promise<WarpAdapterGenericTransaction>;
|
|
13
|
+
createContractCallTransaction(executable: WarpExecutable): Promise<any>;
|
|
14
|
+
executeQuery(executable: WarpExecutable): Promise<any>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare class WarpFastsetWallet implements AdapterWarpWallet {
|
|
18
|
+
private config;
|
|
19
|
+
private chain;
|
|
20
|
+
private client;
|
|
21
|
+
private walletProvider;
|
|
22
|
+
private cachedAddress;
|
|
23
|
+
private cachedPublicKey;
|
|
24
|
+
constructor(config: WarpClientConfig, chain: WarpChainInfo);
|
|
25
|
+
signTransaction(tx: WarpAdapterGenericTransaction): Promise<WarpAdapterGenericTransaction>;
|
|
26
|
+
signTransactions(txs: WarpAdapterGenericTransaction[]): Promise<WarpAdapterGenericTransaction[]>;
|
|
27
|
+
signMessage(message: string): Promise<string>;
|
|
28
|
+
sendTransaction(tx: WarpAdapterGenericTransaction): Promise<string>;
|
|
29
|
+
sendTransactions(txs: WarpAdapterGenericTransaction[]): Promise<string[]>;
|
|
30
|
+
importFromMnemonic(mnemonic: string): Promise<WarpWalletDetails>;
|
|
31
|
+
importFromPrivateKey(privateKey: string): Promise<WarpWalletDetails>;
|
|
32
|
+
export(provider: WarpWalletProvider): Promise<WarpWalletDetails>;
|
|
33
|
+
generate(provider: WarpWalletProvider): Promise<WarpWalletDetails>;
|
|
34
|
+
getAddress(): string | null;
|
|
35
|
+
getPublicKey(): string | null;
|
|
36
|
+
private createProvider;
|
|
37
|
+
private initializeCache;
|
|
38
|
+
private createProviderForOperation;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { FastsetAdapter, NativeTokenSet, WarpFastsetExecutor, WarpFastsetWallet };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { WarpChainAsset, ChainAdapterFactory, AdapterWarpExecutor, WarpClientConfig, WarpChainInfo, WarpExecutable, WarpAdapterGenericTransaction, AdapterWarpWallet, WarpWalletDetails, WarpWalletProvider } from '@joai/warps';
|
|
2
|
+
|
|
3
|
+
declare const NativeTokenSet: WarpChainAsset;
|
|
4
|
+
declare const FastsetAdapter: ChainAdapterFactory;
|
|
5
|
+
|
|
6
|
+
declare class WarpFastsetExecutor implements AdapterWarpExecutor {
|
|
7
|
+
private readonly config;
|
|
8
|
+
private readonly chain;
|
|
9
|
+
private readonly client;
|
|
10
|
+
constructor(config: WarpClientConfig, chain: WarpChainInfo);
|
|
11
|
+
createTransaction(executable: WarpExecutable): Promise<any>;
|
|
12
|
+
createTransferTransaction(executable: WarpExecutable): Promise<WarpAdapterGenericTransaction>;
|
|
13
|
+
createContractCallTransaction(executable: WarpExecutable): Promise<any>;
|
|
14
|
+
executeQuery(executable: WarpExecutable): Promise<any>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare class WarpFastsetWallet implements AdapterWarpWallet {
|
|
18
|
+
private config;
|
|
19
|
+
private chain;
|
|
20
|
+
private client;
|
|
21
|
+
private walletProvider;
|
|
22
|
+
private cachedAddress;
|
|
23
|
+
private cachedPublicKey;
|
|
24
|
+
constructor(config: WarpClientConfig, chain: WarpChainInfo);
|
|
25
|
+
signTransaction(tx: WarpAdapterGenericTransaction): Promise<WarpAdapterGenericTransaction>;
|
|
26
|
+
signTransactions(txs: WarpAdapterGenericTransaction[]): Promise<WarpAdapterGenericTransaction[]>;
|
|
27
|
+
signMessage(message: string): Promise<string>;
|
|
28
|
+
sendTransaction(tx: WarpAdapterGenericTransaction): Promise<string>;
|
|
29
|
+
sendTransactions(txs: WarpAdapterGenericTransaction[]): Promise<string[]>;
|
|
30
|
+
importFromMnemonic(mnemonic: string): Promise<WarpWalletDetails>;
|
|
31
|
+
importFromPrivateKey(privateKey: string): Promise<WarpWalletDetails>;
|
|
32
|
+
export(provider: WarpWalletProvider): Promise<WarpWalletDetails>;
|
|
33
|
+
generate(provider: WarpWalletProvider): Promise<WarpWalletDetails>;
|
|
34
|
+
getAddress(): string | null;
|
|
35
|
+
getPublicKey(): string | null;
|
|
36
|
+
private createProvider;
|
|
37
|
+
private initializeCache;
|
|
38
|
+
private createProviderForOperation;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { FastsetAdapter, NativeTokenSet, WarpFastsetExecutor, WarpFastsetWallet };
|