@megaeth-labs/wallet-sdk 0.1.5 → 0.1.6
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.cjs +2 -0
- package/dist/index.d.cts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +2 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -61,6 +61,8 @@ var getWalletUrl = (config) => {
|
|
|
61
61
|
const params = [
|
|
62
62
|
`network=${config.network}`,
|
|
63
63
|
...config.sponsorUrl ? [`sponsorUrl=${config.sponsorUrl}`] : [],
|
|
64
|
+
...config.sponsorMode ? [`sponsorMode=${config.sponsorMode}`] : [],
|
|
65
|
+
...config.sponsorToken ? [`sponsorToken=${config.sponsorToken}`] : [],
|
|
64
66
|
...config.debug ? [`debug=${config.debug}`] : [],
|
|
65
67
|
...config.logging ? [`logging=${config.logging}`] : []
|
|
66
68
|
];
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
type Network = 'mainnet' | 'testnet';
|
|
2
2
|
type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
3
|
+
type SponsorMode = 'everything' | 'app-only' | 'explicit';
|
|
4
|
+
type SponsorToken = 'native' | 'usdm';
|
|
3
5
|
interface Config {
|
|
4
6
|
network: Network;
|
|
5
7
|
logging?: LogLevel;
|
|
6
8
|
devMode?: boolean;
|
|
7
9
|
debug?: boolean;
|
|
8
10
|
sponsorUrl?: string;
|
|
11
|
+
sponsorMode?: SponsorMode;
|
|
12
|
+
sponsorToken?: SponsorToken;
|
|
9
13
|
}
|
|
10
14
|
type ConnectionStatus = {
|
|
11
15
|
status: 'connected' | 'disconnected' | 'cancelled';
|
|
@@ -17,6 +21,7 @@ interface TransferRequest {
|
|
|
17
21
|
type: 'native' | 'erc20' | 'erc721' | 'erc1155';
|
|
18
22
|
contractAddress?: string;
|
|
19
23
|
tokenId?: number;
|
|
24
|
+
sponsor?: boolean;
|
|
20
25
|
}
|
|
21
26
|
interface CallContractRequest {
|
|
22
27
|
address: `0x${string}`;
|
|
@@ -26,6 +31,7 @@ interface CallContractRequest {
|
|
|
26
31
|
data?: `0x${string}`;
|
|
27
32
|
silent?: boolean;
|
|
28
33
|
value?: bigint | string;
|
|
34
|
+
sponsor?: boolean;
|
|
29
35
|
}
|
|
30
36
|
interface GetFromContractRequest {
|
|
31
37
|
address: `0x${string}`;
|
|
@@ -100,6 +106,7 @@ interface Permission {
|
|
|
100
106
|
interface GrantPermissionsRequest {
|
|
101
107
|
permissions: Permission;
|
|
102
108
|
externalAddress?: `0x${string}`;
|
|
109
|
+
sponsor?: boolean;
|
|
103
110
|
}
|
|
104
111
|
type GrantPermissionsResponse = {
|
|
105
112
|
status: 'approved' | 'cancelled';
|
|
@@ -155,4 +162,4 @@ declare const mega: {
|
|
|
155
162
|
};
|
|
156
163
|
};
|
|
157
164
|
|
|
158
|
-
export { type BalancesRequest, type BaseTokenResponse, type CallContractRequest, type Config, type ConnectionStatus, type GetFromContractRequest, type GetPermissionsResponse, type GrantPermissionsRequest, type GrantPermissionsResponse, type LogLevel, type Network, type OwnedTokenResponse, type Permission, type RemoteAPI, type SignDataRequest, type SignDataResponse, type SignMessageResponse, type TransactionResult, type TransferRequest, mega };
|
|
165
|
+
export { type BalancesRequest, type BaseTokenResponse, type CallContractRequest, type Config, type ConnectionStatus, type GetFromContractRequest, type GetPermissionsResponse, type GrantPermissionsRequest, type GrantPermissionsResponse, type LogLevel, type Network, type OwnedTokenResponse, type Permission, type RemoteAPI, type SignDataRequest, type SignDataResponse, type SignMessageResponse, type SponsorMode, type SponsorToken, type TransactionResult, type TransferRequest, mega };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
type Network = 'mainnet' | 'testnet';
|
|
2
2
|
type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
3
|
+
type SponsorMode = 'everything' | 'app-only' | 'explicit';
|
|
4
|
+
type SponsorToken = 'native' | 'usdm';
|
|
3
5
|
interface Config {
|
|
4
6
|
network: Network;
|
|
5
7
|
logging?: LogLevel;
|
|
6
8
|
devMode?: boolean;
|
|
7
9
|
debug?: boolean;
|
|
8
10
|
sponsorUrl?: string;
|
|
11
|
+
sponsorMode?: SponsorMode;
|
|
12
|
+
sponsorToken?: SponsorToken;
|
|
9
13
|
}
|
|
10
14
|
type ConnectionStatus = {
|
|
11
15
|
status: 'connected' | 'disconnected' | 'cancelled';
|
|
@@ -17,6 +21,7 @@ interface TransferRequest {
|
|
|
17
21
|
type: 'native' | 'erc20' | 'erc721' | 'erc1155';
|
|
18
22
|
contractAddress?: string;
|
|
19
23
|
tokenId?: number;
|
|
24
|
+
sponsor?: boolean;
|
|
20
25
|
}
|
|
21
26
|
interface CallContractRequest {
|
|
22
27
|
address: `0x${string}`;
|
|
@@ -26,6 +31,7 @@ interface CallContractRequest {
|
|
|
26
31
|
data?: `0x${string}`;
|
|
27
32
|
silent?: boolean;
|
|
28
33
|
value?: bigint | string;
|
|
34
|
+
sponsor?: boolean;
|
|
29
35
|
}
|
|
30
36
|
interface GetFromContractRequest {
|
|
31
37
|
address: `0x${string}`;
|
|
@@ -100,6 +106,7 @@ interface Permission {
|
|
|
100
106
|
interface GrantPermissionsRequest {
|
|
101
107
|
permissions: Permission;
|
|
102
108
|
externalAddress?: `0x${string}`;
|
|
109
|
+
sponsor?: boolean;
|
|
103
110
|
}
|
|
104
111
|
type GrantPermissionsResponse = {
|
|
105
112
|
status: 'approved' | 'cancelled';
|
|
@@ -155,4 +162,4 @@ declare const mega: {
|
|
|
155
162
|
};
|
|
156
163
|
};
|
|
157
164
|
|
|
158
|
-
export { type BalancesRequest, type BaseTokenResponse, type CallContractRequest, type Config, type ConnectionStatus, type GetFromContractRequest, type GetPermissionsResponse, type GrantPermissionsRequest, type GrantPermissionsResponse, type LogLevel, type Network, type OwnedTokenResponse, type Permission, type RemoteAPI, type SignDataRequest, type SignDataResponse, type SignMessageResponse, type TransactionResult, type TransferRequest, mega };
|
|
165
|
+
export { type BalancesRequest, type BaseTokenResponse, type CallContractRequest, type Config, type ConnectionStatus, type GetFromContractRequest, type GetPermissionsResponse, type GrantPermissionsRequest, type GrantPermissionsResponse, type LogLevel, type Network, type OwnedTokenResponse, type Permission, type RemoteAPI, type SignDataRequest, type SignDataResponse, type SignMessageResponse, type SponsorMode, type SponsorToken, type TransactionResult, type TransferRequest, mega };
|
package/dist/index.js
CHANGED
|
@@ -25,6 +25,8 @@ var getWalletUrl = (config) => {
|
|
|
25
25
|
const params = [
|
|
26
26
|
`network=${config.network}`,
|
|
27
27
|
...config.sponsorUrl ? [`sponsorUrl=${config.sponsorUrl}`] : [],
|
|
28
|
+
...config.sponsorMode ? [`sponsorMode=${config.sponsorMode}`] : [],
|
|
29
|
+
...config.sponsorToken ? [`sponsorToken=${config.sponsorToken}`] : [],
|
|
28
30
|
...config.debug ? [`debug=${config.debug}`] : [],
|
|
29
31
|
...config.logging ? [`logging=${config.logging}`] : []
|
|
30
32
|
];
|