@antigane/wallet-adapters 0.0.2 → 0.0.3

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/App.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ declare function App(): import("react/jsx-runtime").JSX.Element;
2
+ export default App;
@@ -0,0 +1 @@
1
+ export declare function ConnectButton(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { SignState } from '../types/sign';
2
+ type Props = {
3
+ open: boolean;
4
+ onClose: () => void;
5
+ onSigned: (state: SignState) => Promise<void> | void;
6
+ };
7
+ export declare const ConnectModal: ({ open, onClose, onSigned }: Props) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface WalletButtonContainerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
3
+ children: React.ReactNode;
4
+ }
5
+ export declare const WalletButtonContainer: ({ children, className, ...props }: WalletButtonContainerProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
package/dist/index.d.ts CHANGED
@@ -1 +1,3 @@
1
- export {}
1
+ export { ConnectButton } from './ConnectButton';
2
+ export * from './services/index';
3
+ export * from './types/index';
package/dist/main.d.ts ADDED
File without changes
@@ -0,0 +1,2 @@
1
+ export * from './metamask.ts';
2
+ export * from './phantom.ts';
@@ -0,0 +1,12 @@
1
+ import { SignState } from '../types/sign';
2
+ export declare class Metamask {
3
+ /**
4
+ * Signs a login message via MetaMask using personal_sign.
5
+ * Note: returning Promise<SignState> is required because wallet calls are async.
6
+ */
7
+ Login(message: string): Promise<SignState>;
8
+ /**
9
+ * Returns true if MetaMask is installed (or detectable among injected providers).
10
+ */
11
+ isMetamaskInstalled(): boolean;
12
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ import { SignState } from '../types/sign';
2
+ export declare class Phantom {
3
+ /**
4
+ * Signs a login message via Phantom.
5
+ * Note: returning Promise<SignState> is required because wallet calls are async.
6
+ */
7
+ Login(message: string): Promise<SignState>;
8
+ /**
9
+ * Returns true if Phantom is installed (or detectable among injected providers).
10
+ */
11
+ isPhantomInstalled(): boolean;
12
+ }
@@ -0,0 +1 @@
1
+ export * from './sign.ts';
@@ -0,0 +1,6 @@
1
+ export type SignState = {
2
+ signature?: string;
3
+ message?: string;
4
+ accountId?: string;
5
+ accountType?: string;
6
+ };
@@ -0,0 +1,9 @@
1
+ export type WalletItem = {
2
+ name: string;
3
+ title: string;
4
+ logoUrl: string;
5
+ downloadUrl: string;
6
+ onClick: () => void;
7
+ detected: boolean;
8
+ disabled?: boolean;
9
+ };
@@ -0,0 +1 @@
1
+ export declare function buildChallenge(message: string): string;
@@ -0,0 +1,4 @@
1
+ export declare function bytesToBase64(bytes: Uint8Array): string;
2
+ export declare function base64ToBytes(b64: string): Uint8Array;
3
+ export declare function toArrayBuffer(bytes: Uint8Array): ArrayBuffer;
4
+ export declare function toNumberArray(u8: Uint8Array): number[];
@@ -0,0 +1 @@
1
+ export declare function short(v?: string, head?: number, tail?: number): string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@antigane/wallet-adapters",
3
3
  "private": false,
4
- "version": "0.0.2",
4
+ "version": "0.0.3",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",