@sudobility/contracts 0.15.1 → 1.10.0
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 +2 -3
- package/artifacts/contracts/Mailer.sol/Mailer.d.ts +2 -185
- package/artifacts/contracts/Mailer.sol/Mailer.dbg.json +1 -1
- package/artifacts/contracts/Mailer.sol/Mailer.json +2 -185
- package/artifacts/contracts/MockUSDC.sol/MockUSDC.dbg.json +1 -1
- package/artifacts/contracts/interfaces/IERC20.sol/IERC20.dbg.json +1 -1
- package/dist/evm/src/evm/index.d.ts +1 -1
- package/dist/evm/src/evm/index.d.ts.map +1 -1
- package/dist/evm/src/evm/index.js +4 -4
- package/dist/evm/src/evm/index.js.map +1 -1
- package/dist/evm/src/evm/mailer-client.d.ts +210 -0
- package/dist/evm/src/evm/mailer-client.d.ts.map +1 -0
- package/dist/evm/src/evm/mailer-client.js +417 -0
- package/dist/evm/src/evm/mailer-client.js.map +1 -0
- package/dist/evm/typechain-types/Mailer.d.ts +10 -128
- package/dist/evm/typechain-types/Mailer.d.ts.map +1 -1
- package/dist/evm/typechain-types/factories/Mailer__factory.d.ts +1 -145
- package/dist/evm/typechain-types/factories/Mailer__factory.d.ts.map +1 -1
- package/dist/evm/typechain-types/factories/Mailer__factory.js +1 -184
- package/dist/evm/typechain-types/factories/Mailer__factory.js.map +1 -1
- package/dist/solana/solana/index.d.ts +1 -1
- package/dist/solana/solana/index.d.ts.map +1 -1
- package/dist/solana/solana/index.js +1 -4
- package/dist/solana/solana/index.js.map +1 -1
- package/dist/solana/solana/mailer-client.d.ts +209 -0
- package/dist/solana/solana/mailer-client.d.ts.map +1 -0
- package/dist/solana/solana/mailer-client.js +728 -0
- package/dist/solana/solana/mailer-client.js.map +1 -0
- package/dist/solana/solana/types.d.ts +2 -3
- package/dist/solana/solana/types.d.ts.map +1 -1
- package/dist/solana/solana/types.js.map +1 -1
- package/dist/unified/src/evm/index.d.ts +1 -1
- package/dist/unified/src/evm/index.d.ts.map +1 -1
- package/dist/unified/src/evm/index.js +4 -4
- package/dist/unified/src/evm/index.js.map +1 -1
- package/dist/unified/src/evm/mailer-client.d.ts +210 -0
- package/dist/unified/src/evm/mailer-client.d.ts.map +1 -0
- package/dist/unified/src/evm/mailer-client.js +417 -0
- package/dist/unified/src/evm/mailer-client.js.map +1 -0
- package/dist/unified/src/react/context/MailerProvider.d.ts +20 -26
- package/dist/unified/src/react/context/MailerProvider.d.ts.map +1 -1
- package/dist/unified/src/react/context/MailerProvider.js +26 -26
- package/dist/unified/src/react/context/MailerProvider.js.map +1 -1
- package/dist/unified/src/react/hooks/useMailerMutations.d.ts +192 -225
- package/dist/unified/src/react/hooks/useMailerMutations.d.ts.map +1 -1
- package/dist/unified/src/react/hooks/useMailerMutations.js +266 -263
- package/dist/unified/src/react/hooks/useMailerMutations.js.map +1 -1
- package/dist/unified/src/react/hooks/useMailerQueries.d.ts +63 -117
- package/dist/unified/src/react/hooks/useMailerQueries.d.ts.map +1 -1
- package/dist/unified/src/react/hooks/useMailerQueries.js +104 -239
- package/dist/unified/src/react/hooks/useMailerQueries.js.map +1 -1
- package/dist/unified/src/react/index.d.ts +3 -5
- package/dist/unified/src/react/index.d.ts.map +1 -1
- package/dist/unified/src/react/index.js +26 -41
- package/dist/unified/src/react/index.js.map +1 -1
- package/dist/unified/src/solana/index.d.ts +1 -1
- package/dist/unified/src/solana/index.d.ts.map +1 -1
- package/dist/unified/src/solana/index.js +1 -4
- package/dist/unified/src/solana/index.js.map +1 -1
- package/dist/unified/src/solana/mailer-client.d.ts +209 -0
- package/dist/unified/src/solana/mailer-client.d.ts.map +1 -0
- package/dist/unified/src/solana/mailer-client.js +728 -0
- package/dist/unified/src/solana/mailer-client.js.map +1 -0
- package/dist/unified/src/solana/types.d.ts +2 -3
- package/dist/unified/src/solana/types.d.ts.map +1 -1
- package/dist/unified/src/solana/types.js.map +1 -1
- package/dist/unified/src/unified/index.d.ts +1 -1
- package/dist/unified/src/unified/index.d.ts.map +1 -1
- package/dist/unified/src/unified/onchain-mailer-client.d.ts +247 -192
- package/dist/unified/src/unified/onchain-mailer-client.d.ts.map +1 -1
- package/dist/unified/src/unified/onchain-mailer-client.js +1462 -551
- package/dist/unified/src/unified/onchain-mailer-client.js.map +1 -1
- package/dist/unified/src/unified/types.d.ts +6 -23
- package/dist/unified/src/unified/types.d.ts.map +1 -1
- package/dist/unified/src/utils/chain-config.d.ts +2 -4
- package/dist/unified/src/utils/chain-config.d.ts.map +1 -1
- package/dist/unified/src/utils/chain-config.js +36 -46
- package/dist/unified/src/utils/chain-config.js.map +1 -1
- package/dist/unified/typechain-types/Mailer.d.ts +10 -128
- package/dist/unified/typechain-types/Mailer.d.ts.map +1 -1
- package/dist/unified/typechain-types/factories/Mailer__factory.d.ts +1 -145
- package/dist/unified/typechain-types/factories/Mailer__factory.d.ts.map +1 -1
- package/dist/unified/typechain-types/factories/Mailer__factory.js +1 -184
- package/dist/unified/typechain-types/factories/Mailer__factory.js.map +1 -1
- package/dist/unified-esm/src/evm/index.d.ts +1 -1
- package/dist/unified-esm/src/evm/index.d.ts.map +1 -1
- package/dist/unified-esm/src/evm/index.js +2 -2
- package/dist/unified-esm/src/evm/index.js.map +1 -1
- package/dist/unified-esm/src/evm/mailer-client.d.ts +210 -0
- package/dist/unified-esm/src/evm/mailer-client.d.ts.map +1 -0
- package/dist/unified-esm/src/evm/mailer-client.js +413 -0
- package/dist/unified-esm/src/evm/mailer-client.js.map +1 -0
- package/dist/unified-esm/src/react/context/MailerProvider.d.ts +20 -26
- package/dist/unified-esm/src/react/context/MailerProvider.d.ts.map +1 -1
- package/dist/unified-esm/src/react/context/MailerProvider.js +26 -25
- package/dist/unified-esm/src/react/context/MailerProvider.js.map +1 -1
- package/dist/unified-esm/src/react/hooks/useMailerMutations.d.ts +192 -225
- package/dist/unified-esm/src/react/hooks/useMailerMutations.d.ts.map +1 -1
- package/dist/unified-esm/src/react/hooks/useMailerMutations.js +262 -254
- package/dist/unified-esm/src/react/hooks/useMailerMutations.js.map +1 -1
- package/dist/unified-esm/src/react/hooks/useMailerQueries.d.ts +63 -117
- package/dist/unified-esm/src/react/hooks/useMailerQueries.d.ts.map +1 -1
- package/dist/unified-esm/src/react/hooks/useMailerQueries.js +102 -232
- package/dist/unified-esm/src/react/hooks/useMailerQueries.js.map +1 -1
- package/dist/unified-esm/src/react/index.d.ts +3 -5
- package/dist/unified-esm/src/react/index.d.ts.map +1 -1
- package/dist/unified-esm/src/react/index.js +5 -9
- package/dist/unified-esm/src/react/index.js.map +1 -1
- package/dist/unified-esm/src/solana/index.d.ts +1 -1
- package/dist/unified-esm/src/solana/index.d.ts.map +1 -1
- package/dist/unified-esm/src/solana/index.js +1 -2
- package/dist/unified-esm/src/solana/index.js.map +1 -1
- package/dist/unified-esm/src/solana/mailer-client.d.ts +209 -0
- package/dist/unified-esm/src/solana/mailer-client.d.ts.map +1 -0
- package/dist/unified-esm/src/solana/mailer-client.js +724 -0
- package/dist/unified-esm/src/solana/mailer-client.js.map +1 -0
- package/dist/unified-esm/src/solana/types.d.ts +2 -3
- package/dist/unified-esm/src/solana/types.d.ts.map +1 -1
- package/dist/unified-esm/src/solana/types.js.map +1 -1
- package/dist/unified-esm/src/unified/index.d.ts +1 -1
- package/dist/unified-esm/src/unified/index.d.ts.map +1 -1
- package/dist/unified-esm/src/unified/onchain-mailer-client.d.ts +247 -192
- package/dist/unified-esm/src/unified/onchain-mailer-client.d.ts.map +1 -1
- package/dist/unified-esm/src/unified/onchain-mailer-client.js +1462 -551
- package/dist/unified-esm/src/unified/onchain-mailer-client.js.map +1 -1
- package/dist/unified-esm/src/unified/types.d.ts +6 -23
- package/dist/unified-esm/src/unified/types.d.ts.map +1 -1
- package/dist/unified-esm/src/utils/chain-config.d.ts +2 -4
- package/dist/unified-esm/src/utils/chain-config.d.ts.map +1 -1
- package/dist/unified-esm/src/utils/chain-config.js +35 -46
- package/dist/unified-esm/src/utils/chain-config.js.map +1 -1
- package/dist/unified-esm/typechain-types/Mailer.d.ts +10 -128
- package/dist/unified-esm/typechain-types/Mailer.d.ts.map +1 -1
- package/dist/unified-esm/typechain-types/factories/Mailer__factory.d.ts +1 -145
- package/dist/unified-esm/typechain-types/factories/Mailer__factory.d.ts.map +1 -1
- package/dist/unified-esm/typechain-types/factories/Mailer__factory.js +1 -184
- package/dist/unified-esm/typechain-types/factories/Mailer__factory.js.map +1 -1
- package/package.json +10 -17
- package/programs/mailer/src/lib.rs +145 -764
- package/programs/mailer/tests/integration_tests.rs +65 -586
- package/typechain-types/Mailer.ts +8 -215
- package/typechain-types/factories/Mailer__factory.ts +1 -184
- package/dist/evm/src/evm/evm-mailer-client.d.ts +0 -1062
- package/dist/evm/src/evm/evm-mailer-client.d.ts.map +0 -1
- package/dist/evm/src/evm/evm-mailer-client.js +0 -924
- package/dist/evm/src/evm/evm-mailer-client.js.map +0 -1
- package/dist/solana/solana/solana-mailer-client.d.ts +0 -209
- package/dist/solana/solana/solana-mailer-client.d.ts.map +0 -1
- package/dist/solana/solana/solana-mailer-client.js +0 -1004
- package/dist/solana/solana/solana-mailer-client.js.map +0 -1
- package/dist/unified/src/evm/evm-mailer-client.d.ts +0 -1062
- package/dist/unified/src/evm/evm-mailer-client.d.ts.map +0 -1
- package/dist/unified/src/evm/evm-mailer-client.js +0 -924
- package/dist/unified/src/evm/evm-mailer-client.js.map +0 -1
- package/dist/unified/src/solana/solana-mailer-client.d.ts +0 -209
- package/dist/unified/src/solana/solana-mailer-client.d.ts.map +0 -1
- package/dist/unified/src/solana/solana-mailer-client.js +0 -1004
- package/dist/unified/src/solana/solana-mailer-client.js.map +0 -1
- package/dist/unified-esm/src/evm/evm-mailer-client.d.ts +0 -1062
- package/dist/unified-esm/src/evm/evm-mailer-client.d.ts.map +0 -1
- package/dist/unified-esm/src/evm/evm-mailer-client.js +0 -920
- package/dist/unified-esm/src/evm/evm-mailer-client.js.map +0 -1
- package/dist/unified-esm/src/solana/solana-mailer-client.d.ts +0 -209
- package/dist/unified-esm/src/solana/solana-mailer-client.d.ts.map +0 -1
- package/dist/unified-esm/src/solana/solana-mailer-client.js +0 -1000
- package/dist/unified-esm/src/solana/solana-mailer-client.js.map +0 -1
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.mailerQueryKeys = void 0;
|
|
4
|
-
exports.useFees = useFees;
|
|
5
|
-
exports.useClaimableAmounts = useClaimableAmounts;
|
|
6
|
-
exports.useDelegationAndPermissions = useDelegationAndPermissions;
|
|
7
|
-
exports.useContractState = useContractState;
|
|
8
|
-
exports.useWalletAddress = useWalletAddress;
|
|
9
|
-
exports.useChainType = useChainType;
|
|
10
4
|
exports.useGetSendFee = useGetSendFee;
|
|
11
5
|
exports.useGetDelegationFee = useGetDelegationFee;
|
|
12
6
|
exports.useGetClaimableAmount = useGetClaimableAmount;
|
|
13
7
|
exports.useGetOwnerClaimable = useGetOwnerClaimable;
|
|
14
8
|
exports.useGetDelegation = useGetDelegation;
|
|
15
9
|
exports.useIsPaused = useIsPaused;
|
|
16
|
-
exports.
|
|
10
|
+
exports.useWalletAddress = useWalletAddress;
|
|
11
|
+
exports.useChainType = useChainType;
|
|
17
12
|
const react_query_1 = require("@tanstack/react-query");
|
|
18
|
-
const
|
|
13
|
+
const MailerProvider_1 = require("../context/MailerProvider");
|
|
19
14
|
/**
|
|
20
15
|
* Query keys for React Query cache management
|
|
21
16
|
*/
|
|
@@ -27,306 +22,176 @@ exports.mailerQueryKeys = {
|
|
|
27
22
|
ownerClaimable: () => [...exports.mailerQueryKeys.all, 'ownerClaimable'],
|
|
28
23
|
delegation: (address) => [...exports.mailerQueryKeys.all, 'delegation', address],
|
|
29
24
|
isPaused: () => [...exports.mailerQueryKeys.all, 'isPaused'],
|
|
30
|
-
permissions: (contractAddress, walletAddress) => [...exports.mailerQueryKeys.all, 'permissions', contractAddress, walletAddress],
|
|
31
25
|
};
|
|
32
26
|
/**
|
|
33
|
-
* Hook
|
|
27
|
+
* Hook to get the current send fee
|
|
34
28
|
*
|
|
35
29
|
* @example
|
|
36
30
|
* ```tsx
|
|
37
31
|
* function FeeDisplay() {
|
|
38
|
-
* const {
|
|
32
|
+
* const { data: fee, isLoading } = useGetSendFee();
|
|
39
33
|
*
|
|
40
|
-
* if (
|
|
41
|
-
*
|
|
42
|
-
* return (
|
|
43
|
-
* <div>
|
|
44
|
-
* Send Fee: {Number(sendFee.data) / 1_000_000} USDC
|
|
45
|
-
* Delegation Fee: {Number(delegationFee.data) / 1_000_000} USDC
|
|
46
|
-
* </div>
|
|
47
|
-
* );
|
|
34
|
+
* if (isLoading) return <div>Loading...</div>;
|
|
35
|
+
* return <div>Send Fee: {Number(fee) / 1_000_000} USDC</div>;
|
|
48
36
|
* }
|
|
49
37
|
* ```
|
|
50
38
|
*/
|
|
51
|
-
function
|
|
52
|
-
const
|
|
39
|
+
function useGetSendFee(options) {
|
|
40
|
+
const client = (0, MailerProvider_1.useMailerClient)();
|
|
41
|
+
return (0, react_query_1.useQuery)({
|
|
53
42
|
queryKey: exports.mailerQueryKeys.sendFee(),
|
|
54
|
-
queryFn: () =>
|
|
55
|
-
if (chainInfo.chainType === types_1.ChainType.EVM) {
|
|
56
|
-
return client.getSendFee(chainInfo, publicClientOrConnection);
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
return client.getSendFee(chainInfo, undefined, publicClientOrConnection);
|
|
60
|
-
}
|
|
61
|
-
},
|
|
43
|
+
queryFn: () => client.getSendFee(),
|
|
62
44
|
staleTime: 5 * 60 * 1000, // 5 minutes - fees don't change often
|
|
63
|
-
...options
|
|
45
|
+
...options,
|
|
64
46
|
});
|
|
65
|
-
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Hook to get the current delegation fee
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```tsx
|
|
53
|
+
* function DelegationFeeDisplay() {
|
|
54
|
+
* const { data: fee, isLoading } = useGetDelegationFee();
|
|
55
|
+
*
|
|
56
|
+
* if (isLoading) return <div>Loading...</div>;
|
|
57
|
+
* return <div>Delegation Fee: {Number(fee) / 1_000_000} USDC</div>;
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
function useGetDelegationFee(options) {
|
|
62
|
+
const client = (0, MailerProvider_1.useMailerClient)();
|
|
63
|
+
return (0, react_query_1.useQuery)({
|
|
66
64
|
queryKey: exports.mailerQueryKeys.delegationFee(),
|
|
67
|
-
queryFn: () =>
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
return client.getDelegationFee(chainInfo, undefined, publicClientOrConnection);
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
staleTime: 5 * 60 * 1000,
|
|
76
|
-
...options?.delegationFee,
|
|
65
|
+
queryFn: () => client.getDelegationFee(),
|
|
66
|
+
staleTime: 5 * 60 * 1000, // 5 minutes
|
|
67
|
+
...options,
|
|
77
68
|
});
|
|
78
|
-
return {
|
|
79
|
-
sendFee,
|
|
80
|
-
delegationFee,
|
|
81
|
-
};
|
|
82
69
|
}
|
|
83
70
|
/**
|
|
84
|
-
* Hook
|
|
71
|
+
* Hook to get claimable amount for an address
|
|
85
72
|
*
|
|
73
|
+
* @param address - Address to check (defaults to connected wallet)
|
|
86
74
|
* @example
|
|
87
75
|
* ```tsx
|
|
88
|
-
* function
|
|
89
|
-
* const {
|
|
90
|
-
* client,
|
|
91
|
-
* chainInfo,
|
|
92
|
-
* address
|
|
93
|
-
* );
|
|
76
|
+
* function ClaimableBalance() {
|
|
77
|
+
* const { data: amount, isLoading } = useGetClaimableAmount();
|
|
94
78
|
*
|
|
95
|
-
* return
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
* Owner Claimable: {Number(ownerClaimable.data) / 1_000_000} USDC
|
|
99
|
-
* </div>
|
|
100
|
-
* );
|
|
79
|
+
* if (isLoading) return <div>Loading...</div>;
|
|
80
|
+
* if (!amount || amount === 0n) return <div>No claimable balance</div>;
|
|
81
|
+
* return <div>Claimable: {Number(amount) / 1_000_000} USDC</div>;
|
|
101
82
|
* }
|
|
102
83
|
* ```
|
|
103
84
|
*/
|
|
104
|
-
function
|
|
105
|
-
const
|
|
85
|
+
function useGetClaimableAmount(address, options) {
|
|
86
|
+
const client = (0, MailerProvider_1.useMailerClient)();
|
|
87
|
+
return (0, react_query_1.useQuery)({
|
|
106
88
|
queryKey: exports.mailerQueryKeys.claimableAmount(address),
|
|
107
|
-
queryFn:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
let result;
|
|
111
|
-
if (chainInfo.chainType === types_1.ChainType.EVM) {
|
|
112
|
-
result = await client.getRecipientClaimable(address, chainInfo, publicClientOrConnection);
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
115
|
-
result = await client.getRecipientClaimable(address, chainInfo, undefined, publicClientOrConnection);
|
|
116
|
-
}
|
|
117
|
-
// Extract just the amount from the result
|
|
118
|
-
return result ? result.amount : BigInt(0);
|
|
119
|
-
},
|
|
120
|
-
enabled: Boolean(address),
|
|
121
|
-
staleTime: 30 * 1000, // 30 seconds
|
|
122
|
-
...options?.claimableAmount,
|
|
89
|
+
queryFn: () => client.getClaimableAmount(address),
|
|
90
|
+
staleTime: 30 * 1000, // 30 seconds - balances change more frequently
|
|
91
|
+
...options,
|
|
123
92
|
});
|
|
124
|
-
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Hook to get owner's claimable fee balance
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```tsx
|
|
99
|
+
* function OwnerDashboard() {
|
|
100
|
+
* const { data: amount, isLoading } = useGetOwnerClaimable();
|
|
101
|
+
*
|
|
102
|
+
* if (isLoading) return <div>Loading...</div>;
|
|
103
|
+
* return <div>Owner Fees: {Number(amount) / 1_000_000} USDC</div>;
|
|
104
|
+
* }
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
function useGetOwnerClaimable(options) {
|
|
108
|
+
const client = (0, MailerProvider_1.useMailerClient)();
|
|
109
|
+
return (0, react_query_1.useQuery)({
|
|
125
110
|
queryKey: exports.mailerQueryKeys.ownerClaimable(),
|
|
126
|
-
queryFn: () =>
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
else {
|
|
131
|
-
return client.getOwnerClaimable(chainInfo, undefined, publicClientOrConnection);
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
staleTime: 30 * 1000,
|
|
135
|
-
...options?.ownerClaimable,
|
|
111
|
+
queryFn: () => client.getOwnerClaimable(),
|
|
112
|
+
staleTime: 30 * 1000, // 30 seconds
|
|
113
|
+
...options,
|
|
136
114
|
});
|
|
137
|
-
return {
|
|
138
|
-
claimableAmount,
|
|
139
|
-
ownerClaimable,
|
|
140
|
-
};
|
|
141
115
|
}
|
|
142
116
|
/**
|
|
143
|
-
* Hook
|
|
117
|
+
* Hook to get delegation information for an address
|
|
144
118
|
*
|
|
119
|
+
* @param address - Address to check delegation for (defaults to connected wallet)
|
|
145
120
|
* @example
|
|
146
121
|
* ```tsx
|
|
147
|
-
* function DelegationStatus(
|
|
148
|
-
* const {
|
|
149
|
-
* client,
|
|
150
|
-
* chainInfo,
|
|
151
|
-
* {
|
|
152
|
-
* delegationAddress: address,
|
|
153
|
-
* contractAddress: '0xContract...',
|
|
154
|
-
* walletAddress: address
|
|
155
|
-
* }
|
|
156
|
-
* );
|
|
122
|
+
* function DelegationStatus() {
|
|
123
|
+
* const { data: delegate, isLoading } = useGetDelegation();
|
|
157
124
|
*
|
|
158
|
-
* return
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
* Has Permission: {hasPermission.data ? 'Yes' : 'No'}
|
|
162
|
-
* </div>
|
|
163
|
-
* );
|
|
125
|
+
* if (isLoading) return <div>Loading...</div>;
|
|
126
|
+
* if (!delegate) return <div>No delegation set</div>;
|
|
127
|
+
* return <div>Delegated to: {delegate}</div>;
|
|
164
128
|
* }
|
|
165
129
|
* ```
|
|
166
130
|
*/
|
|
167
|
-
function
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
return client.getDelegation(params.delegationAddress, chainInfo, publicClientOrConnection);
|
|
175
|
-
}
|
|
176
|
-
else {
|
|
177
|
-
return client.getDelegation(params.delegationAddress, chainInfo, undefined, publicClientOrConnection);
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
enabled: Boolean(params?.delegationAddress),
|
|
181
|
-
staleTime: 30 * 1000,
|
|
182
|
-
...options?.delegation,
|
|
183
|
-
});
|
|
184
|
-
const hasPermission = (0, react_query_1.useQuery)({
|
|
185
|
-
queryKey: exports.mailerQueryKeys.permissions(params?.contractAddress, params?.walletAddress),
|
|
186
|
-
queryFn: async () => {
|
|
187
|
-
if (!params?.contractAddress || !params?.walletAddress) {
|
|
188
|
-
return false;
|
|
189
|
-
}
|
|
190
|
-
return client.hasPermission(chainInfo, params.contractAddress, params.walletAddress, publicClientOrConnection);
|
|
191
|
-
},
|
|
192
|
-
enabled: Boolean(params?.contractAddress && params?.walletAddress),
|
|
193
|
-
staleTime: 30 * 1000,
|
|
194
|
-
...options?.hasPermission,
|
|
131
|
+
function useGetDelegation(address, options) {
|
|
132
|
+
const client = (0, MailerProvider_1.useMailerClient)();
|
|
133
|
+
return (0, react_query_1.useQuery)({
|
|
134
|
+
queryKey: exports.mailerQueryKeys.delegation(address),
|
|
135
|
+
queryFn: () => client.getDelegation(address),
|
|
136
|
+
staleTime: 1 * 60 * 1000, // 1 minute
|
|
137
|
+
...options,
|
|
195
138
|
});
|
|
196
|
-
return {
|
|
197
|
-
delegation,
|
|
198
|
-
hasPermission,
|
|
199
|
-
};
|
|
200
139
|
}
|
|
201
140
|
/**
|
|
202
|
-
* Hook
|
|
141
|
+
* Hook to check if contract is currently paused
|
|
203
142
|
*
|
|
204
143
|
* @example
|
|
205
144
|
* ```tsx
|
|
206
|
-
* function
|
|
207
|
-
* const { isPaused } =
|
|
145
|
+
* function PauseStatus() {
|
|
146
|
+
* const { data: isPaused, isLoading } = useIsPaused();
|
|
208
147
|
*
|
|
148
|
+
* if (isLoading) return <div>Loading...</div>;
|
|
209
149
|
* return (
|
|
210
150
|
* <div>
|
|
211
|
-
* Contract: {isPaused
|
|
151
|
+
* Contract Status: {isPaused ? '⏸️ Paused' : '✅ Active'}
|
|
212
152
|
* </div>
|
|
213
153
|
* );
|
|
214
154
|
* }
|
|
215
155
|
* ```
|
|
216
156
|
*/
|
|
217
|
-
function
|
|
218
|
-
const
|
|
157
|
+
function useIsPaused(options) {
|
|
158
|
+
const client = (0, MailerProvider_1.useMailerClient)();
|
|
159
|
+
return (0, react_query_1.useQuery)({
|
|
219
160
|
queryKey: exports.mailerQueryKeys.isPaused(),
|
|
220
|
-
queryFn: () =>
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
else {
|
|
225
|
-
return client.isPaused(chainInfo, undefined, publicClientOrConnection);
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
staleTime: 30 * 1000,
|
|
229
|
-
...options?.isPaused,
|
|
161
|
+
queryFn: () => client.isPaused(),
|
|
162
|
+
staleTime: 10 * 1000, // 10 seconds - pause status is critical
|
|
163
|
+
refetchInterval: 30 * 1000, // Refetch every 30 seconds
|
|
164
|
+
...options,
|
|
230
165
|
});
|
|
231
|
-
return {
|
|
232
|
-
isPaused,
|
|
233
|
-
};
|
|
234
166
|
}
|
|
235
167
|
/**
|
|
236
|
-
*
|
|
168
|
+
* Hook to get wallet address from the client
|
|
237
169
|
*
|
|
238
170
|
* @example
|
|
239
171
|
* ```tsx
|
|
240
|
-
* function
|
|
241
|
-
* const address = useWalletAddress(
|
|
242
|
-
* return <div>
|
|
172
|
+
* function WalletAddress() {
|
|
173
|
+
* const address = useWalletAddress();
|
|
174
|
+
* return <div>Connected: {address}</div>;
|
|
243
175
|
* }
|
|
244
176
|
* ```
|
|
245
177
|
*/
|
|
246
|
-
function useWalletAddress(
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
// For EVM wallets
|
|
250
|
-
if ('walletClient' in wallet && wallet.walletClient) {
|
|
251
|
-
return wallet.walletClient.account?.address;
|
|
252
|
-
}
|
|
253
|
-
// For Solana wallets
|
|
254
|
-
if ('wallet' in wallet && wallet.wallet) {
|
|
255
|
-
return wallet.wallet.publicKey?.toString();
|
|
256
|
-
}
|
|
257
|
-
return undefined;
|
|
178
|
+
function useWalletAddress() {
|
|
179
|
+
const client = (0, MailerProvider_1.useMailerClient)();
|
|
180
|
+
return client.getWalletAddress();
|
|
258
181
|
}
|
|
259
182
|
/**
|
|
260
|
-
*
|
|
183
|
+
* Hook to get chain type (EVM or Solana)
|
|
261
184
|
*
|
|
262
185
|
* @example
|
|
263
186
|
* ```tsx
|
|
264
|
-
* function ChainBadge(
|
|
265
|
-
* const chainType = useChainType(
|
|
187
|
+
* function ChainBadge() {
|
|
188
|
+
* const chainType = useChainType();
|
|
266
189
|
* return <div>Chain: {chainType}</div>;
|
|
267
190
|
* }
|
|
268
191
|
* ```
|
|
269
192
|
*/
|
|
270
|
-
function useChainType(
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
// ========== Legacy individual hooks for backward compatibility ==========
|
|
274
|
-
// These use context for convenience but the grouped hooks above are preferred
|
|
275
|
-
const MailerProvider_1 = require("../context/MailerProvider");
|
|
276
|
-
/**
|
|
277
|
-
* @deprecated Use useFees() instead
|
|
278
|
-
*/
|
|
279
|
-
function useGetSendFee(options) {
|
|
280
|
-
const { client, chainInfo } = (0, MailerProvider_1.useMailerContext)();
|
|
281
|
-
const { sendFee } = useFees(client, chainInfo, undefined, { sendFee: options });
|
|
282
|
-
return sendFee;
|
|
283
|
-
}
|
|
284
|
-
/**
|
|
285
|
-
* @deprecated Use useFees() instead
|
|
286
|
-
*/
|
|
287
|
-
function useGetDelegationFee(options) {
|
|
288
|
-
const { client, chainInfo } = (0, MailerProvider_1.useMailerContext)();
|
|
289
|
-
const { delegationFee } = useFees(client, chainInfo, undefined, { delegationFee: options });
|
|
290
|
-
return delegationFee;
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* @deprecated Use useClaimableAmounts() instead
|
|
294
|
-
*/
|
|
295
|
-
function useGetClaimableAmount(address, options) {
|
|
296
|
-
const { client, chainInfo } = (0, MailerProvider_1.useMailerContext)();
|
|
297
|
-
const { claimableAmount } = useClaimableAmounts(client, chainInfo, address, undefined, { claimableAmount: options });
|
|
298
|
-
return claimableAmount;
|
|
299
|
-
}
|
|
300
|
-
/**
|
|
301
|
-
* @deprecated Use useClaimableAmounts() instead
|
|
302
|
-
*/
|
|
303
|
-
function useGetOwnerClaimable(options) {
|
|
304
|
-
const { client, chainInfo } = (0, MailerProvider_1.useMailerContext)();
|
|
305
|
-
const { ownerClaimable } = useClaimableAmounts(client, chainInfo, undefined, undefined, { ownerClaimable: options });
|
|
306
|
-
return ownerClaimable;
|
|
307
|
-
}
|
|
308
|
-
/**
|
|
309
|
-
* @deprecated Use useDelegationAndPermissions() instead
|
|
310
|
-
*/
|
|
311
|
-
function useGetDelegation(address, options) {
|
|
312
|
-
const { client, chainInfo } = (0, MailerProvider_1.useMailerContext)();
|
|
313
|
-
const { delegation } = useDelegationAndPermissions(client, chainInfo, { delegationAddress: address }, undefined, { delegation: options });
|
|
314
|
-
return delegation;
|
|
315
|
-
}
|
|
316
|
-
/**
|
|
317
|
-
* @deprecated Use useContractState() instead
|
|
318
|
-
*/
|
|
319
|
-
function useIsPaused(options) {
|
|
320
|
-
const { client, chainInfo } = (0, MailerProvider_1.useMailerContext)();
|
|
321
|
-
const { isPaused } = useContractState(client, chainInfo, undefined, { isPaused: options });
|
|
322
|
-
return isPaused;
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* @deprecated Use useDelegationAndPermissions() instead
|
|
326
|
-
*/
|
|
327
|
-
function useHasPermission(contractAddress, walletAddress, options) {
|
|
328
|
-
const { client, chainInfo } = (0, MailerProvider_1.useMailerContext)();
|
|
329
|
-
const { hasPermission } = useDelegationAndPermissions(client, chainInfo, { contractAddress, walletAddress }, undefined, { hasPermission: options });
|
|
330
|
-
return hasPermission;
|
|
193
|
+
function useChainType() {
|
|
194
|
+
const client = (0, MailerProvider_1.useMailerClient)();
|
|
195
|
+
return client.getChainType();
|
|
331
196
|
}
|
|
332
197
|
//# sourceMappingURL=useMailerQueries.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMailerQueries.js","sourceRoot":"","sources":["../../../../../src/react/hooks/useMailerQueries.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"useMailerQueries.js","sourceRoot":"","sources":["../../../../../src/react/hooks/useMailerQueries.ts"],"names":[],"mappings":"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"}
|
|
@@ -30,10 +30,8 @@
|
|
|
30
30
|
* }
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
|
-
export { MailerProvider, useMailerClient,
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
36
|
-
export { useGetSendFee, useGetDelegationFee, useGetClaimableAmount, useGetOwnerClaimable, useGetDelegation, useIsPaused, useWalletAddress, useChainType, useHasPermission, } from './hooks/useMailerQueries';
|
|
37
|
-
export { useSendMessage, useSendPrepared, useClaimRevenue, useClaimOwnerShare, useClaimExpiredShares, useDelegateTo, useRejectDelegation, useSetFees, useSetPermission, useRemovePermission, usePause, useUnpause, useEmergencyUnpause, useDistributeClaimableFunds, } from './hooks/useMailerMutations';
|
|
33
|
+
export { MailerProvider, useMailerClient, QueryClient, QueryClientProvider } from './context/MailerProvider';
|
|
34
|
+
export { useGetSendFee, useGetDelegationFee, useGetClaimableAmount, useGetOwnerClaimable, useGetDelegation, useIsPaused, useWalletAddress, useChainType, mailerQueryKeys, } from './hooks/useMailerQueries';
|
|
35
|
+
export { useSendMessage, useSendPrepared, useSendToEmail, useSendPreparedToEmail, useClaimRevenue, useClaimOwnerShare, useClaimExpiredShares, useDelegateTo, useRejectDelegation, useSetFee, useSetDelegationFee, usePause, useUnpause, useEmergencyUnpause, useDistributeClaimableFunds, } from './hooks/useMailerMutations';
|
|
38
36
|
export type { ChainConfig, MessageResult, UnifiedTransaction } from '../unified/types';
|
|
39
37
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/react/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/react/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAG7G,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,eAAe,GAChB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,cAAc,EACd,eAAe,EACf,cAAc,EACd,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACb,mBAAmB,EACnB,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACR,UAAU,EACV,mBAAmB,EACnB,2BAA2B,GAC5B,MAAM,4BAA4B,CAAC;AAGpC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -32,54 +32,39 @@
|
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.useDistributeClaimableFunds = exports.useEmergencyUnpause = exports.useUnpause = exports.usePause = exports.
|
|
35
|
+
exports.useDistributeClaimableFunds = exports.useEmergencyUnpause = exports.useUnpause = exports.usePause = exports.useSetDelegationFee = exports.useSetFee = exports.useRejectDelegation = exports.useDelegateTo = exports.useClaimExpiredShares = exports.useClaimOwnerShare = exports.useClaimRevenue = exports.useSendPreparedToEmail = exports.useSendToEmail = exports.useSendPrepared = exports.useSendMessage = exports.mailerQueryKeys = exports.useChainType = exports.useWalletAddress = exports.useIsPaused = exports.useGetDelegation = exports.useGetOwnerClaimable = exports.useGetClaimableAmount = exports.useGetDelegationFee = exports.useGetSendFee = exports.QueryClientProvider = exports.QueryClient = exports.useMailerClient = exports.MailerProvider = void 0;
|
|
36
36
|
// Context and Provider
|
|
37
37
|
var MailerProvider_1 = require("./context/MailerProvider");
|
|
38
38
|
Object.defineProperty(exports, "MailerProvider", { enumerable: true, get: function () { return MailerProvider_1.MailerProvider; } });
|
|
39
39
|
Object.defineProperty(exports, "useMailerClient", { enumerable: true, get: function () { return MailerProvider_1.useMailerClient; } });
|
|
40
|
-
Object.defineProperty(exports, "useMailerContext", { enumerable: true, get: function () { return MailerProvider_1.useMailerContext; } });
|
|
41
40
|
Object.defineProperty(exports, "QueryClient", { enumerable: true, get: function () { return MailerProvider_1.QueryClient; } });
|
|
42
41
|
Object.defineProperty(exports, "QueryClientProvider", { enumerable: true, get: function () { return MailerProvider_1.QueryClientProvider; } });
|
|
43
|
-
//
|
|
42
|
+
// Query Hooks (Read Operations)
|
|
44
43
|
var useMailerQueries_1 = require("./hooks/useMailerQueries");
|
|
45
|
-
Object.defineProperty(exports, "
|
|
46
|
-
Object.defineProperty(exports, "
|
|
47
|
-
Object.defineProperty(exports, "
|
|
48
|
-
Object.defineProperty(exports, "
|
|
44
|
+
Object.defineProperty(exports, "useGetSendFee", { enumerable: true, get: function () { return useMailerQueries_1.useGetSendFee; } });
|
|
45
|
+
Object.defineProperty(exports, "useGetDelegationFee", { enumerable: true, get: function () { return useMailerQueries_1.useGetDelegationFee; } });
|
|
46
|
+
Object.defineProperty(exports, "useGetClaimableAmount", { enumerable: true, get: function () { return useMailerQueries_1.useGetClaimableAmount; } });
|
|
47
|
+
Object.defineProperty(exports, "useGetOwnerClaimable", { enumerable: true, get: function () { return useMailerQueries_1.useGetOwnerClaimable; } });
|
|
48
|
+
Object.defineProperty(exports, "useGetDelegation", { enumerable: true, get: function () { return useMailerQueries_1.useGetDelegation; } });
|
|
49
|
+
Object.defineProperty(exports, "useIsPaused", { enumerable: true, get: function () { return useMailerQueries_1.useIsPaused; } });
|
|
50
|
+
Object.defineProperty(exports, "useWalletAddress", { enumerable: true, get: function () { return useMailerQueries_1.useWalletAddress; } });
|
|
51
|
+
Object.defineProperty(exports, "useChainType", { enumerable: true, get: function () { return useMailerQueries_1.useChainType; } });
|
|
49
52
|
Object.defineProperty(exports, "mailerQueryKeys", { enumerable: true, get: function () { return useMailerQueries_1.mailerQueryKeys; } });
|
|
50
|
-
//
|
|
53
|
+
// Mutation Hooks (Write Operations)
|
|
51
54
|
var useMailerMutations_1 = require("./hooks/useMailerMutations");
|
|
52
|
-
Object.defineProperty(exports, "
|
|
53
|
-
Object.defineProperty(exports, "
|
|
54
|
-
Object.defineProperty(exports, "
|
|
55
|
-
Object.defineProperty(exports, "
|
|
56
|
-
Object.defineProperty(exports, "
|
|
57
|
-
Object.defineProperty(exports, "
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
Object.defineProperty(exports, "
|
|
61
|
-
Object.defineProperty(exports, "
|
|
62
|
-
Object.defineProperty(exports, "
|
|
63
|
-
Object.defineProperty(exports, "
|
|
64
|
-
Object.defineProperty(exports, "
|
|
65
|
-
Object.defineProperty(exports, "
|
|
66
|
-
Object.defineProperty(exports, "
|
|
67
|
-
Object.defineProperty(exports, "useChainType", { enumerable: true, get: function () { return useMailerQueries_2.useChainType; } });
|
|
68
|
-
Object.defineProperty(exports, "useHasPermission", { enumerable: true, get: function () { return useMailerQueries_2.useHasPermission; } });
|
|
69
|
-
// Legacy Individual Mutation Hooks (Deprecated - use grouped hooks above)
|
|
70
|
-
var useMailerMutations_2 = require("./hooks/useMailerMutations");
|
|
71
|
-
Object.defineProperty(exports, "useSendMessage", { enumerable: true, get: function () { return useMailerMutations_2.useSendMessage; } });
|
|
72
|
-
Object.defineProperty(exports, "useSendPrepared", { enumerable: true, get: function () { return useMailerMutations_2.useSendPrepared; } });
|
|
73
|
-
Object.defineProperty(exports, "useClaimRevenue", { enumerable: true, get: function () { return useMailerMutations_2.useClaimRevenue; } });
|
|
74
|
-
Object.defineProperty(exports, "useClaimOwnerShare", { enumerable: true, get: function () { return useMailerMutations_2.useClaimOwnerShare; } });
|
|
75
|
-
Object.defineProperty(exports, "useClaimExpiredShares", { enumerable: true, get: function () { return useMailerMutations_2.useClaimExpiredShares; } });
|
|
76
|
-
Object.defineProperty(exports, "useDelegateTo", { enumerable: true, get: function () { return useMailerMutations_2.useDelegateTo; } });
|
|
77
|
-
Object.defineProperty(exports, "useRejectDelegation", { enumerable: true, get: function () { return useMailerMutations_2.useRejectDelegation; } });
|
|
78
|
-
Object.defineProperty(exports, "useSetFees", { enumerable: true, get: function () { return useMailerMutations_2.useSetFees; } });
|
|
79
|
-
Object.defineProperty(exports, "useSetPermission", { enumerable: true, get: function () { return useMailerMutations_2.useSetPermission; } });
|
|
80
|
-
Object.defineProperty(exports, "useRemovePermission", { enumerable: true, get: function () { return useMailerMutations_2.useRemovePermission; } });
|
|
81
|
-
Object.defineProperty(exports, "usePause", { enumerable: true, get: function () { return useMailerMutations_2.usePause; } });
|
|
82
|
-
Object.defineProperty(exports, "useUnpause", { enumerable: true, get: function () { return useMailerMutations_2.useUnpause; } });
|
|
83
|
-
Object.defineProperty(exports, "useEmergencyUnpause", { enumerable: true, get: function () { return useMailerMutations_2.useEmergencyUnpause; } });
|
|
84
|
-
Object.defineProperty(exports, "useDistributeClaimableFunds", { enumerable: true, get: function () { return useMailerMutations_2.useDistributeClaimableFunds; } });
|
|
55
|
+
Object.defineProperty(exports, "useSendMessage", { enumerable: true, get: function () { return useMailerMutations_1.useSendMessage; } });
|
|
56
|
+
Object.defineProperty(exports, "useSendPrepared", { enumerable: true, get: function () { return useMailerMutations_1.useSendPrepared; } });
|
|
57
|
+
Object.defineProperty(exports, "useSendToEmail", { enumerable: true, get: function () { return useMailerMutations_1.useSendToEmail; } });
|
|
58
|
+
Object.defineProperty(exports, "useSendPreparedToEmail", { enumerable: true, get: function () { return useMailerMutations_1.useSendPreparedToEmail; } });
|
|
59
|
+
Object.defineProperty(exports, "useClaimRevenue", { enumerable: true, get: function () { return useMailerMutations_1.useClaimRevenue; } });
|
|
60
|
+
Object.defineProperty(exports, "useClaimOwnerShare", { enumerable: true, get: function () { return useMailerMutations_1.useClaimOwnerShare; } });
|
|
61
|
+
Object.defineProperty(exports, "useClaimExpiredShares", { enumerable: true, get: function () { return useMailerMutations_1.useClaimExpiredShares; } });
|
|
62
|
+
Object.defineProperty(exports, "useDelegateTo", { enumerable: true, get: function () { return useMailerMutations_1.useDelegateTo; } });
|
|
63
|
+
Object.defineProperty(exports, "useRejectDelegation", { enumerable: true, get: function () { return useMailerMutations_1.useRejectDelegation; } });
|
|
64
|
+
Object.defineProperty(exports, "useSetFee", { enumerable: true, get: function () { return useMailerMutations_1.useSetFee; } });
|
|
65
|
+
Object.defineProperty(exports, "useSetDelegationFee", { enumerable: true, get: function () { return useMailerMutations_1.useSetDelegationFee; } });
|
|
66
|
+
Object.defineProperty(exports, "usePause", { enumerable: true, get: function () { return useMailerMutations_1.usePause; } });
|
|
67
|
+
Object.defineProperty(exports, "useUnpause", { enumerable: true, get: function () { return useMailerMutations_1.useUnpause; } });
|
|
68
|
+
Object.defineProperty(exports, "useEmergencyUnpause", { enumerable: true, get: function () { return useMailerMutations_1.useEmergencyUnpause; } });
|
|
69
|
+
Object.defineProperty(exports, "useDistributeClaimableFunds", { enumerable: true, get: function () { return useMailerMutations_1.useDistributeClaimableFunds; } });
|
|
85
70
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/react/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;;;AAEH,uBAAuB;AACvB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/react/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;;;AAEH,uBAAuB;AACvB,2DAA6G;AAApG,gHAAA,cAAc,OAAA;AAAE,iHAAA,eAAe,OAAA;AAAE,6GAAA,WAAW,OAAA;AAAE,qHAAA,mBAAmB,OAAA;AAE1E,gCAAgC;AAChC,6DAUkC;AAThC,iHAAA,aAAa,OAAA;AACb,uHAAA,mBAAmB,OAAA;AACnB,yHAAA,qBAAqB,OAAA;AACrB,wHAAA,oBAAoB,OAAA;AACpB,oHAAA,gBAAgB,OAAA;AAChB,+GAAA,WAAW,OAAA;AACX,oHAAA,gBAAgB,OAAA;AAChB,gHAAA,YAAY,OAAA;AACZ,mHAAA,eAAe,OAAA;AAGjB,oCAAoC;AACpC,iEAgBoC;AAflC,oHAAA,cAAc,OAAA;AACd,qHAAA,eAAe,OAAA;AACf,oHAAA,cAAc,OAAA;AACd,4HAAA,sBAAsB,OAAA;AACtB,qHAAA,eAAe,OAAA;AACf,wHAAA,kBAAkB,OAAA;AAClB,2HAAA,qBAAqB,OAAA;AACrB,mHAAA,aAAa,OAAA;AACb,yHAAA,mBAAmB,OAAA;AACnB,+GAAA,SAAS,OAAA;AACT,yHAAA,mBAAmB,OAAA;AACnB,8GAAA,QAAQ,OAAA;AACR,gHAAA,UAAU,OAAA;AACV,yHAAA,mBAAmB,OAAA;AACnB,iIAAA,2BAA2B,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/solana/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/solana/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC"}
|
|
@@ -14,9 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports
|
|
18
|
-
// Export stateless client and types
|
|
19
|
-
var solana_mailer_client_js_1 = require("./solana-mailer-client");
|
|
20
|
-
Object.defineProperty(exports, "SolanaMailerClient", { enumerable: true, get: function () { return solana_mailer_client_js_1.SolanaMailerClient; } });
|
|
17
|
+
__exportStar(require("./mailer-client"), exports);
|
|
21
18
|
__exportStar(require("./types"), exports);
|
|
22
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/solana/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/solana/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,6CAA2B"}
|