@vleap/warps-adapter-fastset 0.1.0-alpha.24 → 0.1.0-alpha.26
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 +5 -98
- package/dist/index.d.ts +5 -98
- package/dist/index.js +1897 -318
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1896 -319
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,116 +1,24 @@
|
|
|
1
|
-
import { WarpChainAsset, AdapterFactory,
|
|
1
|
+
import { WarpChainAsset, AdapterFactory, AdapterWarpExecutor, WarpClientConfig, WarpChainInfo, WarpExecutable, WarpAdapterGenericTransaction, AdapterWarpWallet, WarpWalletDetails } from '@vleap/warps';
|
|
2
2
|
|
|
3
3
|
declare const NativeTokenSet: WarpChainAsset;
|
|
4
4
|
declare const getFastsetAdapter: AdapterFactory;
|
|
5
5
|
|
|
6
|
-
interface TransactionData {
|
|
7
|
-
sender: number[] | Uint8Array;
|
|
8
|
-
recipient: any;
|
|
9
|
-
nonce: number;
|
|
10
|
-
timestamp_nanos: bigint;
|
|
11
|
-
claim: any;
|
|
12
|
-
}
|
|
13
|
-
declare class Transaction {
|
|
14
|
-
private sender;
|
|
15
|
-
private recipient;
|
|
16
|
-
private nonce;
|
|
17
|
-
private claim;
|
|
18
|
-
private timestamp;
|
|
19
|
-
constructor(sender: Uint8Array, recipient: {
|
|
20
|
-
FastSet: Uint8Array;
|
|
21
|
-
} | {
|
|
22
|
-
External: Uint8Array;
|
|
23
|
-
}, nonce: number, claim: any, timestamp?: bigint);
|
|
24
|
-
toTransaction(): {
|
|
25
|
-
sender: Uint8Array<ArrayBufferLike>;
|
|
26
|
-
recipient: {
|
|
27
|
-
FastSet: Uint8Array;
|
|
28
|
-
} | {
|
|
29
|
-
External: Uint8Array;
|
|
30
|
-
};
|
|
31
|
-
nonce: number;
|
|
32
|
-
timestamp_nanos: bigint;
|
|
33
|
-
claim: any;
|
|
34
|
-
};
|
|
35
|
-
getRecipientAddress(): {
|
|
36
|
-
FastSet: Uint8Array;
|
|
37
|
-
} | {
|
|
38
|
-
External: Uint8Array;
|
|
39
|
-
};
|
|
40
|
-
getAmount(): any;
|
|
41
|
-
getUserData(): any;
|
|
42
|
-
}
|
|
43
|
-
interface AccountInfoResponse {
|
|
44
|
-
sender: number[];
|
|
45
|
-
balance: string;
|
|
46
|
-
next_nonce: number;
|
|
47
|
-
pending_confirmation?: any;
|
|
48
|
-
requested_certificate?: any;
|
|
49
|
-
requested_validated_transaction?: any;
|
|
50
|
-
requested_received_transfers: any[];
|
|
51
|
-
token_balance: Array<[number[], string]>;
|
|
52
|
-
requested_claim_by_id?: any;
|
|
53
|
-
requested_claims: any[];
|
|
54
|
-
}
|
|
55
|
-
interface AccountInfoResponse {
|
|
56
|
-
sender: number[];
|
|
57
|
-
balance: string;
|
|
58
|
-
next_nonce: number;
|
|
59
|
-
pending_confirmation?: any;
|
|
60
|
-
requested_certificate?: any;
|
|
61
|
-
requested_validated_transaction?: any;
|
|
62
|
-
requested_received_transfers: any[];
|
|
63
|
-
token_balance: Array<[number[], string]>;
|
|
64
|
-
requested_claim_by_id?: any;
|
|
65
|
-
requested_claims: any[];
|
|
66
|
-
}
|
|
67
|
-
declare class FastsetClient {
|
|
68
|
-
private proxyUrl;
|
|
69
|
-
constructor(config?: WarpClientConfig | {
|
|
70
|
-
proxyUrl: string;
|
|
71
|
-
}, chain?: any);
|
|
72
|
-
private makeRequest;
|
|
73
|
-
getAccountInfo(address: number[]): Promise<AccountInfoResponse>;
|
|
74
|
-
getNextNonce(address: string | number[]): Promise<number>;
|
|
75
|
-
submitTransaction(transaction: TransactionData, signature: number[] | Uint8Array): Promise<string>;
|
|
76
|
-
faucetDrip(recipient: number[] | Uint8Array, amount: string): Promise<any>;
|
|
77
|
-
private addressToBytes;
|
|
78
|
-
generateNewWallet(): Wallet;
|
|
79
|
-
createWallet(privateKeyHex: string): Wallet;
|
|
80
|
-
static decodeBech32Address(address: string): Uint8Array;
|
|
81
|
-
static encodeBech32Address(publicKey: Uint8Array): string;
|
|
82
|
-
}
|
|
83
|
-
declare class Wallet {
|
|
84
|
-
readonly publicKey: Uint8Array;
|
|
85
|
-
private readonly privateKey;
|
|
86
|
-
constructor(privateKeyHex: string);
|
|
87
|
-
toBech32(): string;
|
|
88
|
-
signTransactionRaw(data: Uint8Array): Uint8Array;
|
|
89
|
-
getPrivateKey(): Uint8Array;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
6
|
declare class WarpFastsetExecutor implements AdapterWarpExecutor {
|
|
93
7
|
private readonly config;
|
|
94
8
|
private readonly chain;
|
|
95
|
-
private readonly
|
|
9
|
+
private readonly client;
|
|
96
10
|
constructor(config: WarpClientConfig, chain: WarpChainInfo);
|
|
97
11
|
createTransaction(executable: WarpExecutable): Promise<any>;
|
|
98
|
-
createTransferTransaction(executable: WarpExecutable): Promise<
|
|
12
|
+
createTransferTransaction(executable: WarpExecutable): Promise<WarpAdapterGenericTransaction>;
|
|
99
13
|
createContractCallTransaction(executable: WarpExecutable): Promise<any>;
|
|
100
14
|
executeQuery(executable: WarpExecutable): Promise<any>;
|
|
101
|
-
executeTransfer(executable: WarpExecutable): Promise<any>;
|
|
102
|
-
executeTransferWithKey(executable: WarpExecutable, privateKey: string): Promise<any>;
|
|
103
|
-
private signTransaction;
|
|
104
|
-
private serializeTransaction;
|
|
105
|
-
private executeFastsetQuery;
|
|
106
|
-
private fromBase64;
|
|
107
15
|
}
|
|
108
16
|
|
|
109
17
|
declare class WarpFastsetWallet implements AdapterWarpWallet {
|
|
110
18
|
private config;
|
|
111
19
|
private chain;
|
|
112
|
-
private wallet;
|
|
113
20
|
private client;
|
|
21
|
+
private privateKey;
|
|
114
22
|
constructor(config: WarpClientConfig, chain: WarpChainInfo);
|
|
115
23
|
signTransaction(tx: WarpAdapterGenericTransaction): Promise<WarpAdapterGenericTransaction>;
|
|
116
24
|
signMessage(message: string): Promise<string>;
|
|
@@ -118,7 +26,6 @@ declare class WarpFastsetWallet implements AdapterWarpWallet {
|
|
|
118
26
|
create(mnemonic: string): WarpWalletDetails;
|
|
119
27
|
generate(): WarpWalletDetails;
|
|
120
28
|
getAddress(): string | null;
|
|
121
|
-
private serializeTransaction;
|
|
122
29
|
}
|
|
123
30
|
|
|
124
|
-
export {
|
|
31
|
+
export { NativeTokenSet, WarpFastsetExecutor, WarpFastsetWallet, getFastsetAdapter };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,116 +1,24 @@
|
|
|
1
|
-
import { WarpChainAsset, AdapterFactory,
|
|
1
|
+
import { WarpChainAsset, AdapterFactory, AdapterWarpExecutor, WarpClientConfig, WarpChainInfo, WarpExecutable, WarpAdapterGenericTransaction, AdapterWarpWallet, WarpWalletDetails } from '@vleap/warps';
|
|
2
2
|
|
|
3
3
|
declare const NativeTokenSet: WarpChainAsset;
|
|
4
4
|
declare const getFastsetAdapter: AdapterFactory;
|
|
5
5
|
|
|
6
|
-
interface TransactionData {
|
|
7
|
-
sender: number[] | Uint8Array;
|
|
8
|
-
recipient: any;
|
|
9
|
-
nonce: number;
|
|
10
|
-
timestamp_nanos: bigint;
|
|
11
|
-
claim: any;
|
|
12
|
-
}
|
|
13
|
-
declare class Transaction {
|
|
14
|
-
private sender;
|
|
15
|
-
private recipient;
|
|
16
|
-
private nonce;
|
|
17
|
-
private claim;
|
|
18
|
-
private timestamp;
|
|
19
|
-
constructor(sender: Uint8Array, recipient: {
|
|
20
|
-
FastSet: Uint8Array;
|
|
21
|
-
} | {
|
|
22
|
-
External: Uint8Array;
|
|
23
|
-
}, nonce: number, claim: any, timestamp?: bigint);
|
|
24
|
-
toTransaction(): {
|
|
25
|
-
sender: Uint8Array<ArrayBufferLike>;
|
|
26
|
-
recipient: {
|
|
27
|
-
FastSet: Uint8Array;
|
|
28
|
-
} | {
|
|
29
|
-
External: Uint8Array;
|
|
30
|
-
};
|
|
31
|
-
nonce: number;
|
|
32
|
-
timestamp_nanos: bigint;
|
|
33
|
-
claim: any;
|
|
34
|
-
};
|
|
35
|
-
getRecipientAddress(): {
|
|
36
|
-
FastSet: Uint8Array;
|
|
37
|
-
} | {
|
|
38
|
-
External: Uint8Array;
|
|
39
|
-
};
|
|
40
|
-
getAmount(): any;
|
|
41
|
-
getUserData(): any;
|
|
42
|
-
}
|
|
43
|
-
interface AccountInfoResponse {
|
|
44
|
-
sender: number[];
|
|
45
|
-
balance: string;
|
|
46
|
-
next_nonce: number;
|
|
47
|
-
pending_confirmation?: any;
|
|
48
|
-
requested_certificate?: any;
|
|
49
|
-
requested_validated_transaction?: any;
|
|
50
|
-
requested_received_transfers: any[];
|
|
51
|
-
token_balance: Array<[number[], string]>;
|
|
52
|
-
requested_claim_by_id?: any;
|
|
53
|
-
requested_claims: any[];
|
|
54
|
-
}
|
|
55
|
-
interface AccountInfoResponse {
|
|
56
|
-
sender: number[];
|
|
57
|
-
balance: string;
|
|
58
|
-
next_nonce: number;
|
|
59
|
-
pending_confirmation?: any;
|
|
60
|
-
requested_certificate?: any;
|
|
61
|
-
requested_validated_transaction?: any;
|
|
62
|
-
requested_received_transfers: any[];
|
|
63
|
-
token_balance: Array<[number[], string]>;
|
|
64
|
-
requested_claim_by_id?: any;
|
|
65
|
-
requested_claims: any[];
|
|
66
|
-
}
|
|
67
|
-
declare class FastsetClient {
|
|
68
|
-
private proxyUrl;
|
|
69
|
-
constructor(config?: WarpClientConfig | {
|
|
70
|
-
proxyUrl: string;
|
|
71
|
-
}, chain?: any);
|
|
72
|
-
private makeRequest;
|
|
73
|
-
getAccountInfo(address: number[]): Promise<AccountInfoResponse>;
|
|
74
|
-
getNextNonce(address: string | number[]): Promise<number>;
|
|
75
|
-
submitTransaction(transaction: TransactionData, signature: number[] | Uint8Array): Promise<string>;
|
|
76
|
-
faucetDrip(recipient: number[] | Uint8Array, amount: string): Promise<any>;
|
|
77
|
-
private addressToBytes;
|
|
78
|
-
generateNewWallet(): Wallet;
|
|
79
|
-
createWallet(privateKeyHex: string): Wallet;
|
|
80
|
-
static decodeBech32Address(address: string): Uint8Array;
|
|
81
|
-
static encodeBech32Address(publicKey: Uint8Array): string;
|
|
82
|
-
}
|
|
83
|
-
declare class Wallet {
|
|
84
|
-
readonly publicKey: Uint8Array;
|
|
85
|
-
private readonly privateKey;
|
|
86
|
-
constructor(privateKeyHex: string);
|
|
87
|
-
toBech32(): string;
|
|
88
|
-
signTransactionRaw(data: Uint8Array): Uint8Array;
|
|
89
|
-
getPrivateKey(): Uint8Array;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
6
|
declare class WarpFastsetExecutor implements AdapterWarpExecutor {
|
|
93
7
|
private readonly config;
|
|
94
8
|
private readonly chain;
|
|
95
|
-
private readonly
|
|
9
|
+
private readonly client;
|
|
96
10
|
constructor(config: WarpClientConfig, chain: WarpChainInfo);
|
|
97
11
|
createTransaction(executable: WarpExecutable): Promise<any>;
|
|
98
|
-
createTransferTransaction(executable: WarpExecutable): Promise<
|
|
12
|
+
createTransferTransaction(executable: WarpExecutable): Promise<WarpAdapterGenericTransaction>;
|
|
99
13
|
createContractCallTransaction(executable: WarpExecutable): Promise<any>;
|
|
100
14
|
executeQuery(executable: WarpExecutable): Promise<any>;
|
|
101
|
-
executeTransfer(executable: WarpExecutable): Promise<any>;
|
|
102
|
-
executeTransferWithKey(executable: WarpExecutable, privateKey: string): Promise<any>;
|
|
103
|
-
private signTransaction;
|
|
104
|
-
private serializeTransaction;
|
|
105
|
-
private executeFastsetQuery;
|
|
106
|
-
private fromBase64;
|
|
107
15
|
}
|
|
108
16
|
|
|
109
17
|
declare class WarpFastsetWallet implements AdapterWarpWallet {
|
|
110
18
|
private config;
|
|
111
19
|
private chain;
|
|
112
|
-
private wallet;
|
|
113
20
|
private client;
|
|
21
|
+
private privateKey;
|
|
114
22
|
constructor(config: WarpClientConfig, chain: WarpChainInfo);
|
|
115
23
|
signTransaction(tx: WarpAdapterGenericTransaction): Promise<WarpAdapterGenericTransaction>;
|
|
116
24
|
signMessage(message: string): Promise<string>;
|
|
@@ -118,7 +26,6 @@ declare class WarpFastsetWallet implements AdapterWarpWallet {
|
|
|
118
26
|
create(mnemonic: string): WarpWalletDetails;
|
|
119
27
|
generate(): WarpWalletDetails;
|
|
120
28
|
getAddress(): string | null;
|
|
121
|
-
private serializeTransaction;
|
|
122
29
|
}
|
|
123
30
|
|
|
124
|
-
export {
|
|
31
|
+
export { NativeTokenSet, WarpFastsetExecutor, WarpFastsetWallet, getFastsetAdapter };
|