@reown/appkit-common-react-native 2.0.0-alpha.2 → 2.0.0-alpha.4

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.
Files changed (237) hide show
  1. package/lib/commonjs/adapters/BlockchainAdapter.js +25 -12
  2. package/lib/commonjs/adapters/BlockchainAdapter.js.map +1 -1
  3. package/lib/commonjs/adapters/EvmAdapter.js +0 -11
  4. package/lib/commonjs/adapters/EvmAdapter.js.map +1 -1
  5. package/lib/commonjs/index.js +4 -4
  6. package/lib/commonjs/index.js.map +1 -1
  7. package/lib/commonjs/types/api/blockchain-api.js +15 -0
  8. package/lib/commonjs/types/api/blockchain-api.js.map +1 -0
  9. package/lib/commonjs/types/api/events.js +6 -0
  10. package/lib/commonjs/types/api/events.js.map +1 -0
  11. package/lib/commonjs/types/api/index.js +39 -0
  12. package/lib/commonjs/types/api/index.js.map +1 -0
  13. package/lib/commonjs/types/api/wallet-api.js +6 -0
  14. package/lib/commonjs/types/api/wallet-api.js.map +1 -0
  15. package/lib/commonjs/types/blockchain/adapter.js +6 -0
  16. package/lib/commonjs/types/blockchain/adapter.js.map +1 -0
  17. package/lib/commonjs/types/blockchain/balance.js +6 -0
  18. package/lib/commonjs/types/blockchain/balance.js.map +1 -0
  19. package/lib/commonjs/types/blockchain/index.js +50 -0
  20. package/lib/commonjs/types/blockchain/index.js.map +1 -0
  21. package/lib/commonjs/types/blockchain/network.js +6 -0
  22. package/lib/commonjs/types/blockchain/network.js.map +1 -0
  23. package/lib/commonjs/types/blockchain/transaction.js +2 -0
  24. package/lib/commonjs/types/blockchain/transaction.js.map +1 -0
  25. package/lib/commonjs/types/common.js +2 -0
  26. package/lib/commonjs/types/common.js.map +1 -0
  27. package/lib/commonjs/types/index.js +105 -0
  28. package/lib/commonjs/types/index.js.map +1 -0
  29. package/lib/commonjs/types/onramp/countries.js +2 -0
  30. package/lib/commonjs/types/onramp/countries.js.map +1 -0
  31. package/lib/commonjs/types/onramp/currencies.js +2 -0
  32. package/lib/commonjs/types/onramp/currencies.js.map +1 -0
  33. package/lib/commonjs/types/onramp/errors.js +22 -0
  34. package/lib/commonjs/types/onramp/errors.js.map +1 -0
  35. package/lib/commonjs/types/onramp/index.js +50 -0
  36. package/lib/commonjs/types/onramp/index.js.map +1 -0
  37. package/lib/commonjs/types/onramp/quotes.js +2 -0
  38. package/lib/commonjs/types/onramp/quotes.js.map +1 -0
  39. package/lib/commonjs/types/siwe/config.js +6 -0
  40. package/lib/commonjs/types/siwe/config.js.map +1 -0
  41. package/lib/commonjs/types/siwe/index.js +28 -0
  42. package/lib/commonjs/types/siwe/index.js.map +1 -0
  43. package/lib/commonjs/types/siwe/message.js +6 -0
  44. package/lib/commonjs/types/siwe/message.js.map +1 -0
  45. package/lib/commonjs/types/storage.js +2 -0
  46. package/lib/commonjs/types/storage.js.map +1 -0
  47. package/lib/commonjs/types/swap/index.js +17 -0
  48. package/lib/commonjs/types/swap/index.js.map +1 -0
  49. package/lib/commonjs/types/swap/tokens.js +6 -0
  50. package/lib/commonjs/types/swap/tokens.js.map +1 -0
  51. package/lib/commonjs/types/ui.js +6 -0
  52. package/lib/commonjs/types/ui.js.map +1 -0
  53. package/lib/commonjs/types/wallet/connection.js +6 -0
  54. package/lib/commonjs/types/wallet/connection.js.map +1 -0
  55. package/lib/commonjs/{utils/TypeUtil.js → types/wallet/connector.js} +1 -15
  56. package/lib/commonjs/types/wallet/connector.js.map +1 -0
  57. package/lib/commonjs/types/wallet/index.js +39 -0
  58. package/lib/commonjs/types/wallet/index.js.map +1 -0
  59. package/lib/commonjs/types/wallet/wallet-info.js +6 -0
  60. package/lib/commonjs/types/wallet/wallet-info.js.map +1 -0
  61. package/lib/commonjs/utils/ConstantsUtil.js +27 -7
  62. package/lib/commonjs/utils/ConstantsUtil.js.map +1 -1
  63. package/lib/commonjs/utils/NetworkUtil.js +3 -0
  64. package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
  65. package/lib/module/adapters/BlockchainAdapter.js +25 -12
  66. package/lib/module/adapters/BlockchainAdapter.js.map +1 -1
  67. package/lib/module/adapters/EvmAdapter.js +0 -11
  68. package/lib/module/adapters/EvmAdapter.js.map +1 -1
  69. package/lib/module/index.js +1 -1
  70. package/lib/module/index.js.map +1 -1
  71. package/lib/module/types/api/blockchain-api.js +10 -0
  72. package/lib/module/types/api/blockchain-api.js.map +1 -0
  73. package/lib/module/types/api/events.js +4 -0
  74. package/lib/module/types/api/events.js.map +1 -0
  75. package/lib/module/types/api/index.js +7 -0
  76. package/lib/module/types/api/index.js.map +1 -0
  77. package/lib/module/types/api/wallet-api.js +4 -0
  78. package/lib/module/types/api/wallet-api.js.map +1 -0
  79. package/lib/module/types/blockchain/adapter.js +4 -0
  80. package/lib/module/types/blockchain/adapter.js.map +1 -0
  81. package/lib/module/types/blockchain/balance.js +4 -0
  82. package/lib/module/types/blockchain/balance.js.map +1 -0
  83. package/lib/module/types/blockchain/index.js +8 -0
  84. package/lib/module/types/blockchain/index.js.map +1 -0
  85. package/lib/module/types/blockchain/network.js +4 -0
  86. package/lib/module/types/blockchain/network.js.map +1 -0
  87. package/lib/module/types/blockchain/transaction.js +2 -0
  88. package/lib/module/types/blockchain/transaction.js.map +1 -0
  89. package/lib/module/types/common.js +2 -0
  90. package/lib/module/types/common.js.map +1 -0
  91. package/lib/module/types/index.js +31 -0
  92. package/lib/module/types/index.js.map +1 -0
  93. package/lib/module/types/onramp/countries.js +2 -0
  94. package/lib/module/types/onramp/countries.js.map +1 -0
  95. package/lib/module/types/onramp/currencies.js +2 -0
  96. package/lib/module/types/onramp/currencies.js.map +1 -0
  97. package/lib/module/types/onramp/errors.js +18 -0
  98. package/lib/module/types/onramp/errors.js.map +1 -0
  99. package/lib/module/types/onramp/index.js +8 -0
  100. package/lib/module/types/onramp/index.js.map +1 -0
  101. package/lib/module/types/onramp/quotes.js +2 -0
  102. package/lib/module/types/onramp/quotes.js.map +1 -0
  103. package/lib/module/types/siwe/config.js +4 -0
  104. package/lib/module/types/siwe/config.js.map +1 -0
  105. package/lib/module/types/siwe/index.js +6 -0
  106. package/lib/module/types/siwe/index.js.map +1 -0
  107. package/lib/module/types/siwe/message.js +4 -0
  108. package/lib/module/types/siwe/message.js.map +1 -0
  109. package/lib/module/types/storage.js +2 -0
  110. package/lib/module/types/storage.js.map +1 -0
  111. package/lib/module/types/swap/index.js +5 -0
  112. package/lib/module/types/swap/index.js.map +1 -0
  113. package/lib/module/types/swap/tokens.js +4 -0
  114. package/lib/module/types/swap/tokens.js.map +1 -0
  115. package/lib/module/types/ui.js +4 -0
  116. package/lib/module/types/ui.js.map +1 -0
  117. package/lib/module/types/wallet/connection.js +4 -0
  118. package/lib/module/types/wallet/connection.js.map +1 -0
  119. package/lib/module/{utils/TypeUtil.js → types/wallet/connector.js} +1 -16
  120. package/lib/module/types/wallet/connector.js.map +1 -0
  121. package/lib/module/types/wallet/index.js +7 -0
  122. package/lib/module/types/wallet/index.js.map +1 -0
  123. package/lib/module/types/wallet/wallet-info.js +4 -0
  124. package/lib/module/types/wallet/wallet-info.js.map +1 -0
  125. package/lib/module/utils/ConstantsUtil.js +27 -7
  126. package/lib/module/utils/ConstantsUtil.js.map +1 -1
  127. package/lib/module/utils/NetworkUtil.js +3 -0
  128. package/lib/module/utils/NetworkUtil.js.map +1 -1
  129. package/lib/typescript/adapters/BlockchainAdapter.d.ts +5 -4
  130. package/lib/typescript/adapters/BlockchainAdapter.d.ts.map +1 -1
  131. package/lib/typescript/adapters/EvmAdapter.d.ts +1 -2
  132. package/lib/typescript/adapters/EvmAdapter.d.ts.map +1 -1
  133. package/lib/typescript/index.d.ts +1 -1
  134. package/lib/typescript/index.d.ts.map +1 -1
  135. package/lib/typescript/networks/bitcoin.d.ts +1 -1
  136. package/lib/typescript/networks/bitcoin.d.ts.map +1 -1
  137. package/lib/typescript/networks/solana.d.ts +1 -1
  138. package/lib/typescript/networks/solana.d.ts.map +1 -1
  139. package/lib/typescript/types/api/blockchain-api.d.ts +183 -0
  140. package/lib/typescript/types/api/blockchain-api.d.ts.map +1 -0
  141. package/lib/typescript/types/api/events.d.ts +304 -0
  142. package/lib/typescript/types/api/events.d.ts.map +1 -0
  143. package/lib/typescript/types/api/index.d.ts +4 -0
  144. package/lib/typescript/types/api/index.d.ts.map +1 -0
  145. package/lib/typescript/types/api/wallet-api.d.ts +50 -0
  146. package/lib/typescript/types/api/wallet-api.d.ts.map +1 -0
  147. package/lib/typescript/types/blockchain/adapter.d.ts +40 -0
  148. package/lib/typescript/types/blockchain/adapter.d.ts.map +1 -0
  149. package/lib/typescript/types/blockchain/balance.d.ts +28 -0
  150. package/lib/typescript/types/blockchain/balance.d.ts.map +1 -0
  151. package/lib/typescript/types/blockchain/index.d.ts +5 -0
  152. package/lib/typescript/types/blockchain/index.d.ts.map +1 -0
  153. package/lib/typescript/types/blockchain/network.d.ts +47 -0
  154. package/lib/typescript/types/blockchain/network.d.ts.map +1 -0
  155. package/lib/typescript/types/blockchain/transaction.d.ts +63 -0
  156. package/lib/typescript/types/blockchain/transaction.d.ts.map +1 -0
  157. package/lib/typescript/types/common.d.ts +24 -0
  158. package/lib/typescript/types/common.d.ts.map +1 -0
  159. package/lib/typescript/types/index.d.ts +10 -0
  160. package/lib/typescript/types/index.d.ts.map +1 -0
  161. package/lib/typescript/types/onramp/countries.d.ts +11 -0
  162. package/lib/typescript/types/onramp/countries.d.ts.map +1 -0
  163. package/lib/typescript/types/onramp/currencies.d.ts +30 -0
  164. package/lib/typescript/types/onramp/currencies.d.ts.map +1 -0
  165. package/lib/typescript/types/onramp/errors.d.ts +21 -0
  166. package/lib/typescript/types/onramp/errors.d.ts.map +1 -0
  167. package/lib/typescript/types/onramp/index.d.ts +5 -0
  168. package/lib/typescript/types/onramp/index.d.ts.map +1 -0
  169. package/lib/typescript/types/onramp/quotes.d.ts +45 -0
  170. package/lib/typescript/types/onramp/quotes.d.ts.map +1 -0
  171. package/lib/typescript/types/siwe/config.d.ts +31 -0
  172. package/lib/typescript/types/siwe/config.d.ts.map +1 -0
  173. package/lib/typescript/types/siwe/index.d.ts +3 -0
  174. package/lib/typescript/types/siwe/index.d.ts.map +1 -0
  175. package/lib/typescript/types/siwe/message.d.ts +57 -0
  176. package/lib/typescript/types/siwe/message.d.ts.map +1 -0
  177. package/lib/typescript/types/storage.d.ts +27 -0
  178. package/lib/typescript/types/storage.d.ts.map +1 -0
  179. package/lib/typescript/types/swap/index.d.ts +2 -0
  180. package/lib/typescript/types/swap/index.d.ts.map +1 -0
  181. package/lib/typescript/types/swap/tokens.d.ts +19 -0
  182. package/lib/typescript/types/swap/tokens.d.ts.map +1 -0
  183. package/lib/typescript/types/ui.d.ts +26 -0
  184. package/lib/typescript/types/ui.d.ts.map +1 -0
  185. package/lib/typescript/types/wallet/connection.d.ts +30 -0
  186. package/lib/typescript/types/wallet/connection.d.ts.map +1 -0
  187. package/lib/typescript/types/wallet/connector.d.ts +61 -0
  188. package/lib/typescript/types/wallet/connector.d.ts.map +1 -0
  189. package/lib/typescript/types/wallet/index.d.ts +4 -0
  190. package/lib/typescript/types/wallet/index.d.ts.map +1 -0
  191. package/lib/typescript/types/wallet/wallet-info.d.ts +36 -0
  192. package/lib/typescript/types/wallet/wallet-info.d.ts.map +1 -0
  193. package/lib/typescript/utils/ConstantsUtil.d.ts +25 -5
  194. package/lib/typescript/utils/ConstantsUtil.d.ts.map +1 -1
  195. package/lib/typescript/utils/NetworkUtil.d.ts +2 -0
  196. package/lib/typescript/utils/NetworkUtil.d.ts.map +1 -1
  197. package/package.json +1 -1
  198. package/src/adapters/BlockchainAdapter.ts +34 -15
  199. package/src/adapters/EvmAdapter.ts +1 -13
  200. package/src/adapters/__tests__/EvmAdapter.test.ts +2 -2
  201. package/src/index.ts +2 -1
  202. package/src/networks/bitcoin.ts +1 -1
  203. package/src/networks/solana.ts +1 -1
  204. package/src/types/api/blockchain-api.ts +213 -0
  205. package/src/types/api/events.ts +394 -0
  206. package/src/types/api/index.ts +4 -0
  207. package/src/types/api/wallet-api.ts +70 -0
  208. package/src/types/blockchain/adapter.ts +52 -0
  209. package/src/types/blockchain/balance.ts +31 -0
  210. package/src/types/blockchain/index.ts +5 -0
  211. package/src/types/blockchain/network.ts +39 -0
  212. package/src/types/blockchain/transaction.ts +71 -0
  213. package/src/types/common.ts +56 -0
  214. package/src/types/index.ts +28 -0
  215. package/src/types/onramp/countries.ts +11 -0
  216. package/src/types/onramp/currencies.ts +32 -0
  217. package/src/types/onramp/errors.ts +22 -0
  218. package/src/types/onramp/index.ts +5 -0
  219. package/src/types/onramp/quotes.ts +46 -0
  220. package/src/types/siwe/config.ts +44 -0
  221. package/src/types/siwe/index.ts +3 -0
  222. package/src/types/siwe/message.ts +62 -0
  223. package/src/types/storage.ts +30 -0
  224. package/src/types/swap/index.ts +2 -0
  225. package/src/types/swap/tokens.ts +21 -0
  226. package/src/types/ui.ts +26 -0
  227. package/src/types/wallet/connection.ts +33 -0
  228. package/src/types/wallet/connector.ts +85 -0
  229. package/src/types/wallet/index.ts +4 -0
  230. package/src/types/wallet/wallet-info.ts +41 -0
  231. package/src/utils/ConstantsUtil.ts +29 -9
  232. package/src/utils/NetworkUtil.ts +5 -0
  233. package/lib/commonjs/utils/TypeUtil.js.map +0 -1
  234. package/lib/module/utils/TypeUtil.js.map +0 -1
  235. package/lib/typescript/utils/TypeUtil.d.ts +0 -394
  236. package/lib/typescript/utils/TypeUtil.d.ts.map +0 -1
  237. package/src/utils/TypeUtil.ts +0 -493
@@ -0,0 +1,30 @@
1
+ export type OnRampFiatCurrency = {
2
+ currencyCode: string;
3
+ name: string;
4
+ symbolImageUrl: string;
5
+ };
6
+ export type OnRampCryptoCurrency = {
7
+ currencyCode: string;
8
+ name: string;
9
+ chainCode: string;
10
+ chainName: string;
11
+ chainId: string;
12
+ contractAddress: string | null;
13
+ symbolImageUrl: string;
14
+ };
15
+ export type OnRampFiatLimit = {
16
+ currencyCode: string;
17
+ defaultAmount: number | null;
18
+ minimumAmount: number;
19
+ maximumAmount: number;
20
+ };
21
+ export type OnRampTransactionResult = {
22
+ purchaseCurrency: string | null;
23
+ purchaseAmount: string | null;
24
+ purchaseImageUrl: string | null;
25
+ paymentCurrency: string | null;
26
+ paymentAmount: string | null;
27
+ status: string | null;
28
+ network: string | null;
29
+ };
30
+ //# sourceMappingURL=currencies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currencies.d.ts","sourceRoot":"","sources":["../../../../src/types/onramp/currencies.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB,CAAC"}
@@ -0,0 +1,21 @@
1
+ export declare const OnRampErrorType: {
2
+ readonly AMOUNT_TOO_LOW: "INVALID_AMOUNT_TOO_LOW";
3
+ readonly AMOUNT_TOO_HIGH: "INVALID_AMOUNT_TOO_HIGH";
4
+ readonly INVALID_AMOUNT: "INVALID_AMOUNT";
5
+ readonly INCOMPATIBLE_REQUEST: "INCOMPATIBLE_REQUEST";
6
+ readonly BAD_REQUEST: "BAD_REQUEST";
7
+ readonly NO_VALID_QUOTES: "NO_VALID_QUOTES";
8
+ readonly FAILED_TO_LOAD: "FAILED_TO_LOAD";
9
+ readonly FAILED_TO_LOAD_COUNTRIES: "FAILED_TO_LOAD_COUNTRIES";
10
+ readonly FAILED_TO_LOAD_PROVIDERS: "FAILED_TO_LOAD_PROVIDERS";
11
+ readonly FAILED_TO_LOAD_METHODS: "FAILED_TO_LOAD_METHODS";
12
+ readonly FAILED_TO_LOAD_CURRENCIES: "FAILED_TO_LOAD_CURRENCIES";
13
+ readonly FAILED_TO_LOAD_LIMITS: "FAILED_TO_LOAD_LIMITS";
14
+ readonly UNKNOWN: "UNKNOWN_ERROR";
15
+ };
16
+ export type OnRampErrorTypeValues = (typeof OnRampErrorType)[keyof typeof OnRampErrorType];
17
+ export interface OnRampError {
18
+ type: OnRampErrorTypeValues;
19
+ message: string;
20
+ }
21
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/types/onramp/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;CAclB,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAE3F,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,5 @@
1
+ export * from './countries';
2
+ export * from './currencies';
3
+ export * from './quotes';
4
+ export * from './errors';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/onramp/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
@@ -0,0 +1,45 @@
1
+ export type OnRampPaymentMethod = {
2
+ logos: {
3
+ dark: string;
4
+ light: string;
5
+ };
6
+ name: string;
7
+ paymentMethod: string;
8
+ paymentType: string;
9
+ };
10
+ export type OnRampQuote = {
11
+ countryCode: string;
12
+ customerScore: number;
13
+ destinationAmount: number;
14
+ destinationAmountWithoutFees: number;
15
+ destinationCurrencyCode: string;
16
+ exchangeRate: number;
17
+ fiatAmountWithoutFees: number;
18
+ lowKyc: boolean;
19
+ networkFee: number;
20
+ paymentMethodType: string;
21
+ serviceProvider: string;
22
+ sourceAmount: number;
23
+ sourceAmountWithoutFees: number;
24
+ sourceCurrencyCode: string;
25
+ totalFee: number;
26
+ transactionFee: number;
27
+ transactionType: string;
28
+ };
29
+ export type OnRampServiceProvider = {
30
+ categories: string[];
31
+ categoryStatuses: {
32
+ additionalProp: string;
33
+ };
34
+ logos: {
35
+ dark: string;
36
+ darkShort: string;
37
+ light: string;
38
+ lightShort: string;
39
+ };
40
+ name: string;
41
+ serviceProvider: string;
42
+ status: string;
43
+ websiteUrl: string;
44
+ };
45
+ //# sourceMappingURL=quotes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quotes.d.ts","sourceRoot":"","sources":["../../../../src/types/onramp/quotes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,4BAA4B,EAAE,MAAM,CAAC;IACrC,uBAAuB,EAAE,MAAM,CAAC;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,uBAAuB,EAAE,MAAM,CAAC;IAChC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,gBAAgB,EAAE;QAChB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { SIWESession, SIWECreateMessageArgs, SIWEMessageArgs, SIWEVerifyMessageArgs } from './message';
2
+ export interface SIWEClientMethods {
3
+ getNonce: (address?: string) => Promise<string>;
4
+ createMessage: (args: SIWECreateMessageArgs) => string;
5
+ verifyMessage: (args: SIWEVerifyMessageArgs) => Promise<boolean>;
6
+ getSession: () => Promise<SIWESession | null>;
7
+ signOut: () => Promise<boolean>;
8
+ getMessageParams?: () => Promise<SIWEMessageArgs>;
9
+ onSignIn?: (session?: SIWESession) => void;
10
+ onSignOut?: () => void;
11
+ }
12
+ export interface SIWEConfig extends SIWEClientMethods {
13
+ enabled?: boolean;
14
+ nonceRefetchIntervalMs?: number;
15
+ sessionRefetchIntervalMs?: number;
16
+ signOutOnDisconnect?: boolean;
17
+ signOutOnAccountChange?: boolean;
18
+ signOutOnNetworkChange?: boolean;
19
+ }
20
+ export interface AppKitSIWEClient extends SIWEClientMethods {
21
+ signIn: () => Promise<SIWESession | undefined>;
22
+ options: {
23
+ enabled: boolean;
24
+ nonceRefetchIntervalMs: number;
25
+ sessionRefetchIntervalMs: number;
26
+ signOutOnDisconnect: boolean;
27
+ signOutOnAccountChange: boolean;
28
+ signOutOnNetworkChange: boolean;
29
+ };
30
+ }
31
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/types/siwe/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACtB,MAAM,WAAW,CAAC;AAEnB,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAChD,aAAa,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,MAAM,CAAC;IACvD,aAAa,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACjE,UAAU,EAAE,MAAM,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC9C,OAAO,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAChC,gBAAgB,CAAC,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,CAAC;IAClD,QAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,WAAW,KAAK,IAAI,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,UAAW,SAAQ,iBAAiB;IAEnD,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,MAAM,EAAE,MAAM,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CAAC;IAC/C,OAAO,EAAE;QACP,OAAO,EAAE,OAAO,CAAC;QACjB,sBAAsB,EAAE,MAAM,CAAC;QAC/B,wBAAwB,EAAE,MAAM,CAAC;QACjC,mBAAmB,EAAE,OAAO,CAAC;QAC7B,sBAAsB,EAAE,OAAO,CAAC;QAChC,sBAAsB,EAAE,OAAO,CAAC;KACjC,CAAC;CACH"}
@@ -0,0 +1,3 @@
1
+ export * from './config';
2
+ export * from './message';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/siwe/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
@@ -0,0 +1,57 @@
1
+ import type { CaipAddress, CaipNetworkId } from '../common';
2
+ export interface SIWESession {
3
+ address: string;
4
+ chainId: number;
5
+ }
6
+ interface CacaoHeader {
7
+ t: 'caip122';
8
+ }
9
+ export interface SIWECreateMessageArgs {
10
+ domain: string;
11
+ nonce: string;
12
+ uri: string;
13
+ address: CaipAddress;
14
+ version: '1';
15
+ type?: CacaoHeader['t'];
16
+ nbf?: string;
17
+ exp?: string;
18
+ statement?: string;
19
+ requestId?: string;
20
+ resources?: string[];
21
+ expiry?: number;
22
+ iat?: string;
23
+ }
24
+ export type SIWEMessageArgs = {
25
+ chains: CaipNetworkId[];
26
+ methods?: string[];
27
+ } & Omit<SIWECreateMessageArgs, 'address' | 'nonce' | 'version'>;
28
+ interface CacaoPayload {
29
+ domain: string;
30
+ aud: string;
31
+ nonce: string;
32
+ iss: string;
33
+ version?: string;
34
+ iat?: string;
35
+ nbf?: string;
36
+ exp?: string;
37
+ statement?: string;
38
+ requestId?: string;
39
+ resources?: string[];
40
+ type?: string;
41
+ }
42
+ interface Cacao {
43
+ h: CacaoHeader;
44
+ p: CacaoPayload;
45
+ s: {
46
+ t: 'eip191' | 'eip1271';
47
+ s: string;
48
+ m?: string;
49
+ };
50
+ }
51
+ export interface SIWEVerifyMessageArgs {
52
+ message: string;
53
+ signature: string;
54
+ cacao?: Cacao;
55
+ }
56
+ export {};
57
+ //# sourceMappingURL=message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../src/types/siwe/message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE5D,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,WAAW;IACnB,CAAC,EAAE,SAAS,CAAC;CACd;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,GAAG,IAAI,CAAC,qBAAqB,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;AAEjE,UAAU,YAAY;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,UAAU,KAAK;IACb,CAAC,EAAE,WAAW,CAAC;IACf,CAAC,EAAE,YAAY,CAAC;IAChB,CAAC,EAAE;QACD,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;QACxB,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,CAAC,EAAE,MAAM,CAAC;KACZ,CAAC;CACH;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf"}
@@ -0,0 +1,27 @@
1
+ export interface Storage {
2
+ /**
3
+ * Returns all keys in storage.
4
+ */
5
+ getKeys(): Promise<string[]>;
6
+ /**
7
+ * Returns all key-value entries in storage.
8
+ */
9
+ getEntries<T = any>(): Promise<[string, T][]>;
10
+ /**
11
+ * Get an item from storage for a given key.
12
+ * @param key The key to retrieve.
13
+ */
14
+ getItem<T = any>(key: string): Promise<T | undefined>;
15
+ /**
16
+ * Set an item in storage for a given key.
17
+ * @param key The key to set.
18
+ * @param value The value to set.
19
+ */
20
+ setItem<T = any>(key: string, value: T): Promise<void>;
21
+ /**
22
+ * Remove an item from storage for a given key.
23
+ * @param key The key to remove.
24
+ */
25
+ removeItem(key: string): Promise<void>;
26
+ }
27
+ //# sourceMappingURL=storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../src/types/storage.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAE7B;;OAEG;IACH,UAAU,CAAC,CAAC,GAAG,GAAG,KAAK,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IAE9C;;;OAGG;IACH,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IAEtD;;;;OAIG;IACH,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvD;;;OAGG;IACH,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxC"}
@@ -0,0 +1,2 @@
1
+ export * from './tokens';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/swap/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { CaipAddress } from '../common';
2
+ export type SwapToken = {
3
+ name: string;
4
+ symbol: string;
5
+ address: CaipAddress;
6
+ decimals: number;
7
+ logoUri: string;
8
+ eip2612?: boolean;
9
+ };
10
+ export type SwapTokenWithBalance = SwapToken & {
11
+ quantity: {
12
+ decimals: string;
13
+ numeric: string;
14
+ };
15
+ price: number;
16
+ value: number;
17
+ };
18
+ export type SwapInputTarget = 'sourceToken' | 'toToken';
19
+ //# sourceMappingURL=tokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../../src/types/swap/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG;IAC7C,QAAQ,EAAE;QACR,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,aAAa,GAAG,SAAS,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { SocialProvider } from './common';
2
+ type EnabledSocials = SocialProvider;
3
+ export type Features = {
4
+ /**
5
+ * @description Enable or disable the swaps feature. Enabled by default.
6
+ * @type {boolean}
7
+ */
8
+ swaps?: boolean;
9
+ /**
10
+ * @description Enable or disable the onramp feature. Enabled by default.
11
+ * @type {boolean}
12
+ */
13
+ onramp?: boolean;
14
+ /**
15
+ * @description Show or hide the regular wallet options when socials are enabled. Enabled by default.
16
+ * @type {boolean}
17
+ */
18
+ showWallets?: boolean;
19
+ /**
20
+ * @description Enable or disable the socials feature. Enabled by default.
21
+ * @type {EnabledSocials[]}
22
+ */
23
+ socials?: EnabledSocials[] | false;
24
+ };
25
+ export {};
26
+ //# sourceMappingURL=ui.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../src/types/ui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,KAAK,cAAc,GAAG,cAAc,CAAC;AAErC,MAAM,MAAM,QAAQ,GAAG;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;CACpC,CAAC"}
@@ -0,0 +1,30 @@
1
+ import type { CaipAddress, CaipNetworkId, SocialProvider, AccountType } from '../common';
2
+ import type { Balance } from '../blockchain/balance';
3
+ import type { WalletInfo, Identity } from './wallet-info';
4
+ import type { BlockchainAdapter } from '../../adapters/BlockchainAdapter';
5
+ export interface Connection {
6
+ accounts: CaipAddress[];
7
+ balances: Map<CaipAddress, Balance[]>;
8
+ adapter: BlockchainAdapter;
9
+ caipNetwork: CaipNetworkId;
10
+ wallet?: WalletInfo;
11
+ properties?: ConnectionProperties;
12
+ type?: AccountType;
13
+ identities?: Map<CaipAddress, Identity>;
14
+ }
15
+ export interface ConnectionProperties {
16
+ email?: string;
17
+ username?: string;
18
+ smartAccounts?: CaipAddress[];
19
+ provider?: SocialProvider;
20
+ sessionTopic?: string;
21
+ }
22
+ export interface LinkingRecord {
23
+ redirect: string;
24
+ href: string;
25
+ }
26
+ export interface WalletDeepLink {
27
+ href: string;
28
+ name: string;
29
+ }
30
+ //# sourceMappingURL=connection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../../../src/types/wallet/connection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACzF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE1E,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,QAAQ,EAAE,GAAG,CAAC,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC;IACtC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,WAAW,EAAE,aAAa,CAAC;IAC3B,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,UAAU,CAAC,EAAE,GAAG,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;CACzC;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,WAAW,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -0,0 +1,61 @@
1
+ /// <reference types="node" />
2
+ import { EventEmitter } from 'events';
3
+ import type { ChainNamespace, CaipAddress, CaipNetworkId } from '../common';
4
+ import type { AppKitNetwork } from '../blockchain/network';
5
+ import type { Provider } from '../blockchain/adapter';
6
+ import type { WalletInfo, Metadata } from './wallet-info';
7
+ import type { ConnectionProperties } from './connection';
8
+ import type { AppKitSIWEClient } from '../siwe';
9
+ import type { Storage } from '../storage';
10
+ import type { WcWallet } from '../api/wallet-api';
11
+ export type ConnectorType = 'walletconnect' | 'coinbase' | 'phantom' | 'solflare';
12
+ export interface BaseNamespace {
13
+ chains?: CaipNetworkId[];
14
+ accounts: CaipAddress[];
15
+ methods: string[];
16
+ events: string[];
17
+ }
18
+ type Namespace = BaseNamespace;
19
+ export type Namespaces = Record<string, Namespace>;
20
+ export type ProposalNamespaces = Record<string, Omit<Namespace, 'accounts'> & Required<Pick<Namespace, 'chains'>> & {
21
+ rpcMap: Record<string, string>;
22
+ }>;
23
+ export type ConnectOptions = {
24
+ namespaces?: ProposalNamespaces;
25
+ defaultNetwork?: AppKitNetwork;
26
+ universalLink?: string;
27
+ siweConfig?: AppKitSIWEClient;
28
+ };
29
+ export type ConnectorInitOptions = {
30
+ storage: Storage;
31
+ metadata: Metadata;
32
+ };
33
+ export declare abstract class WalletConnector extends EventEmitter {
34
+ type: ConnectorType;
35
+ protected provider?: Provider;
36
+ protected namespaces?: Namespaces;
37
+ protected wallet?: WalletInfo;
38
+ protected storage?: Storage;
39
+ protected metadata?: Metadata;
40
+ protected properties?: ConnectionProperties;
41
+ constructor({ type }: {
42
+ type: ConnectorType;
43
+ });
44
+ init(ops: ConnectorInitOptions): Promise<void>;
45
+ setProvider(provider: Provider): void;
46
+ disconnect(): Promise<void>;
47
+ abstract connect(opts: ConnectOptions): Promise<Namespaces | undefined>;
48
+ abstract getProvider(namespace?: ChainNamespace): Provider;
49
+ abstract getNamespaces(): Namespaces;
50
+ abstract getChainId(namespace: ChainNamespace): CaipNetworkId | undefined;
51
+ abstract getWalletInfo(): WalletInfo | undefined;
52
+ abstract getProperties(): ConnectionProperties | undefined;
53
+ abstract switchNetwork(network: AppKitNetwork): Promise<void>;
54
+ abstract restoreSession(): Promise<boolean>;
55
+ }
56
+ export type AppKitConnectOptions = {
57
+ walletId?: string;
58
+ wallet?: WcWallet;
59
+ };
60
+ export {};
61
+ //# sourceMappingURL=connector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connector.d.ts","sourceRoot":"","sources":["../../../../src/types/wallet/connector.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,4 @@
1
+ export * from './connector';
2
+ export * from './connection';
3
+ export * from './wallet-info';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/wallet/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,36 @@
1
+ import type { CaipNetworkId } from '../common';
2
+ export interface WalletInfo {
3
+ name?: string;
4
+ icon?: string;
5
+ description?: string;
6
+ url?: string;
7
+ icons?: string[];
8
+ redirect?: {
9
+ native?: string;
10
+ universal?: string;
11
+ linkMode?: boolean;
12
+ };
13
+ [key: string]: unknown;
14
+ }
15
+ export type Metadata = {
16
+ name: string;
17
+ description: string;
18
+ url: string;
19
+ icons: string[];
20
+ redirect?: {
21
+ native?: string;
22
+ universal?: string;
23
+ linkMode?: boolean;
24
+ };
25
+ };
26
+ export interface Token {
27
+ address: string;
28
+ image?: string;
29
+ }
30
+ export type Tokens = Record<CaipNetworkId, Token>;
31
+ export interface Identity {
32
+ name: string;
33
+ avatar?: string;
34
+ }
35
+ export type ConnectedWalletInfo = WalletInfo | undefined;
36
+ //# sourceMappingURL=wallet-info.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet-info.d.ts","sourceRoot":"","sources":["../../../../src/types/wallet/wallet-info.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,CAAC,EAAE;QACT,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC;IACF,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE;QACT,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC;CACH,CAAC;AAEF,MAAM,WAAW,KAAK;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;AAElD,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,SAAS,CAAC"}
@@ -11,22 +11,42 @@ export declare const ConstantsUtil: {
11
11
  WEB_WALLET_URL: string;
12
12
  SECURE_SITE_DASHBOARD: string;
13
13
  SECURE_SITE_ICON: string;
14
- COINBASE_EXPLORER_ID: string;
15
- PHANTOM_EXPLORER_ID: string;
16
- WALLET_CONNECT_IMAGE_ID: string;
14
+ REOWN_URL: string;
17
15
  USDT_CONTRACT_ADDRESSES: string[];
18
16
  PHANTOM_CUSTOM_WALLET: {
19
17
  id: string;
20
18
  name: string;
21
19
  image_id: string;
22
20
  mobile_link: string;
21
+ play_store: string;
22
+ app_store: string;
23
+ android_app_id: string;
24
+ ios_schema: string;
25
+ };
26
+ COINBASE_CUSTOM_WALLET: {
27
+ id: string;
28
+ name: string;
29
+ image_id: string;
30
+ mobile_link: string;
31
+ play_store: string;
32
+ app_store: string;
33
+ android_app_id: string;
34
+ ios_schema: string;
35
+ };
36
+ SOLFLARE_CUSTOM_WALLET: {
37
+ id: string;
38
+ name: string;
39
+ image_id: string;
40
+ mobile_link: string;
41
+ play_store: string;
42
+ app_store: string;
43
+ android_app_id: string;
44
+ ios_schema: string;
23
45
  };
24
46
  STORAGE_KEYS: {
25
47
  WC_DEEPLINK: string;
26
48
  RECENT_WALLET: string;
27
- CONNECTED_WALLET_IMAGE_URL: string;
28
49
  CONNECTED_CONNECTORS: string;
29
- CONNECTED_SOCIAL: string;
30
50
  ONRAMP_PREFERRED_COUNTRY: string;
31
51
  ONRAMP_COUNTRIES: string;
32
52
  ONRAMP_SERVICE_PROVIDERS: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ConstantsUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/ConstantsUtil.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+DzB,CAAC"}
1
+ {"version":3,"file":"ConstantsUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/ConstantsUtil.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmFzB,CAAC"}
@@ -1,4 +1,6 @@
1
+ import type { CaipAddress } from '../types';
1
2
  export declare const NetworkUtil: {
2
3
  caipNetworkIdToNumber(caipnetworkId?: `${string}:${string}`): number | undefined;
4
+ getPlainAddress(caipAddress?: CaipAddress): string | undefined;
3
5
  };
4
6
  //# sourceMappingURL=NetworkUtil.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NetworkUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/NetworkUtil.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;0CACgB,GAAG,MAAM,IAAI,MAAM,EAAE;CAG5D,CAAC"}
1
+ {"version":3,"file":"NetworkUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/NetworkUtil.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,eAAO,MAAM,WAAW;0CACgB,GAAG,MAAM,IAAI,MAAM,EAAE;kCAG7B,WAAW;CAG1C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reown/appkit-common-react-native",
3
- "version": "2.0.0-alpha.2",
3
+ "version": "2.0.0-alpha.4",
4
4
  "main": "lib/commonjs/index.js",
5
5
  "types": "lib/typescript/index.d.ts",
6
6
  "module": "lib/module/index.js",