@dcl/linker-dapp 0.2.1-2041668432.commit-33e3b3d → 0.2.2

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 (40) hide show
  1. package/package.json +2 -2
  2. package/types/components/Error.d.ts +5 -0
  3. package/types/components/IdentityPage/IdentityPage.container.d.ts +3 -0
  4. package/types/components/IdentityPage/IdentityPage.d.ts +4 -0
  5. package/types/components/IdentityPage/index.d.ts +2 -0
  6. package/types/components/IdentityPage/types.d.ts +16 -0
  7. package/types/components/LandInfo/LandInfo.d.ts +3 -0
  8. package/types/components/LandInfo/types.d.ts +5 -0
  9. package/types/components/LinkerPage/LinkerPage.container.d.ts +3 -0
  10. package/types/components/LinkerPage/LinkerPage.d.ts +4 -0
  11. package/types/components/LinkerPage/index.d.ts +2 -0
  12. package/types/components/LinkerPage/types.d.ts +25 -0
  13. package/types/components/RenderWalletData/RenderWalletData.d.ts +3 -0
  14. package/types/components/RenderWalletData/types.d.ts +11 -0
  15. package/types/components/Root.d.ts +3 -0
  16. package/types/config.d.ts +17 -0
  17. package/types/contracts.d.ts +3 -0
  18. package/types/index.d.ts +2 -0
  19. package/types/modules/authorization/actions.d.ts +16 -0
  20. package/types/modules/authorization/reducer.d.ts +9 -0
  21. package/types/modules/authorization/sagas.d.ts +1 -0
  22. package/types/modules/authorization/selectors.d.ts +6 -0
  23. package/types/modules/authorization/types.d.ts +4 -0
  24. package/types/modules/land/actions.d.ts +14 -0
  25. package/types/modules/land/reducer.d.ts +9 -0
  26. package/types/modules/land/sagas.d.ts +1 -0
  27. package/types/modules/land/selectors.d.ts +5 -0
  28. package/types/modules/land/types.d.ts +9 -0
  29. package/types/modules/land/utils.d.ts +3 -0
  30. package/types/modules/server/utils.d.ts +20 -0
  31. package/types/modules/signature/actions.d.ts +27 -0
  32. package/types/modules/signature/reducer.d.ts +11 -0
  33. package/types/modules/signature/sagas.d.ts +1 -0
  34. package/types/modules/signature/selectors.d.ts +5 -0
  35. package/types/modules/wallet/sagas.d.ts +1 -0
  36. package/types/modules/wallet/selectors.d.ts +5 -0
  37. package/types/reducer.d.ts +2 -0
  38. package/types/sagas.d.ts +1 -0
  39. package/types/store.d.ts +1 -0
  40. package/types/types.d.ts +14 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/linker-dapp",
3
- "version": "0.2.1-2041668432.commit-33e3b3d",
3
+ "version": "0.2.2",
4
4
  "description": "The website for decentraland's linker ",
5
5
  "main": "website.js",
6
6
  "scripts": {
@@ -16,5 +16,5 @@
16
16
  "url": "https://github.com/decentraland/linker-dapp/issues"
17
17
  },
18
18
  "homepage": "",
19
- "commit": "33e3b3d1840cd802b0f0a7457346072607460141"
19
+ "commit": "84b70630628528476189db9d9d0104c7aa5b6f90"
20
20
  }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ declare const _default: React.MemoExoticComponent<({ children }: {
3
+ children: string;
4
+ }) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import IdentityPage from './IdentityPage';
2
+ declare const _default: import("react-redux").ConnectedComponent<typeof IdentityPage, import("react-redux").Omit<import("./types").Props, "wallet" | "isConnected" | "isConnecting" | "signed" | "isSigning" | "onConnectWallet" | "onRequestIdentity">>;
3
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import './style.css';
3
+ import { Props } from './types';
4
+ export default function IdentityPage(props: Props): JSX.Element;
@@ -0,0 +1,2 @@
1
+ import IdentityPage from './IdentityPage.container';
2
+ export default IdentityPage;
@@ -0,0 +1,16 @@
1
+ import { EnableWalletRequestAction } from 'decentraland-dapps/dist/modules/wallet/actions';
2
+ import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types';
3
+ import { Transaction } from 'decentraland-dapps/dist/modules/transaction/types';
4
+ import { CreateIdentityRequestAction } from '../../modules/signature/actions';
5
+ export declare type Props = {
6
+ wallet: Partial<Wallet>;
7
+ transaction?: Transaction;
8
+ isConnected: boolean;
9
+ isConnecting: boolean;
10
+ isSigning: boolean;
11
+ signed: boolean;
12
+ onConnectWallet: () => EnableWalletRequestAction;
13
+ onRequestIdentity: () => CreateIdentityRequestAction;
14
+ };
15
+ export declare type MapStateProps = Pick<Props, 'wallet' | 'isConnected' | 'isConnecting' | 'signed' | 'isSigning'>;
16
+ export declare type MapDispatchProps = Pick<Props, 'onConnectWallet' | 'onRequestIdentity'>;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { Props } from './types';
3
+ export default function LandInfo({ deployUrl, base }: Props): JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { LANDMeta } from '../../modules/land/types';
2
+ export declare type Props = {
3
+ base: LANDMeta;
4
+ deployUrl: string;
5
+ };
@@ -0,0 +1,3 @@
1
+ import LinkerPage from './LinkerPage';
2
+ declare const _default: import("react-redux").ConnectedComponent<typeof LinkerPage, import("react-redux").Omit<import("./types").Props, "isUpdateAuthorized" | "wallet" | "isConnected" | "isConnecting" | "signed" | "isSigning" | "onConnectWallet" | "base" | "authorizations" | "isLandLoading" | "error" | "isAuthorizationLoading" | "onSignContent">>;
3
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import './style.css';
3
+ import { Props } from './types';
4
+ export default function LinkScenePage(props: Props): JSX.Element;
@@ -0,0 +1,2 @@
1
+ import LinkerPage from './LinkerPage.container';
2
+ export default LinkerPage;
@@ -0,0 +1,25 @@
1
+ import { EnableWalletRequestAction } from 'decentraland-dapps/dist/modules/wallet/actions';
2
+ import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types';
3
+ import { Transaction } from 'decentraland-dapps/dist/modules/transaction/types';
4
+ import { LANDMeta } from '../../modules/land/types';
5
+ import { SignContentRequestAction } from '../../modules/signature/actions';
6
+ import { Authorization } from '../../modules/authorization/types';
7
+ export declare type Props = {
8
+ sceneOwner?: string;
9
+ base: LANDMeta;
10
+ wallet: Partial<Wallet>;
11
+ transaction?: Transaction;
12
+ isLandLoading: boolean;
13
+ isConnected: boolean;
14
+ isConnecting: boolean;
15
+ isSigning: boolean;
16
+ error: string;
17
+ signed: boolean;
18
+ isUpdateAuthorized: boolean;
19
+ authorizations: Authorization[];
20
+ isAuthorizationLoading: boolean;
21
+ onConnectWallet: () => EnableWalletRequestAction;
22
+ onSignContent: (cid: string) => SignContentRequestAction;
23
+ };
24
+ export declare type MapStateProps = Pick<Props, 'base' | 'wallet' | 'isLandLoading' | 'isConnected' | 'isConnecting' | 'error' | 'signed' | 'isUpdateAuthorized' | 'authorizations' | 'isAuthorizationLoading' | 'isSigning'>;
25
+ export declare type MapDispatchProps = Pick<Props, 'onConnectWallet' | 'onSignContent'>;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { Props } from './types';
3
+ export default function RenderWalletData({ isConnected, isConnecting, wallet, authorizations, isUpdateAuthorized, onConnectWallet }: Props): JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types';
2
+ import { Authorization } from '../../modules/authorization/types';
3
+ import { EnableWalletRequestAction } from 'decentraland-dapps/dist/modules/wallet/actions';
4
+ export declare type Props = {
5
+ wallet: Partial<Wallet>;
6
+ isConnecting: boolean;
7
+ isConnected: boolean;
8
+ isUpdateAuthorized: boolean;
9
+ authorizations?: Authorization[];
10
+ onConnectWallet: () => EnableWalletRequestAction;
11
+ };
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const Root: (props: any) => JSX.Element;
3
+ export default Root;
@@ -0,0 +1,17 @@
1
+ import { ChainId } from '@dcl/schemas';
2
+ import { Coords } from './modules/land/types';
3
+ declare type Config = {
4
+ baseParcel: Coords;
5
+ parcels: Coords[];
6
+ rootCID: string;
7
+ debug: boolean;
8
+ estateRegistry?: string;
9
+ landRegistry?: string;
10
+ chainId: ChainId;
11
+ wearableId?: string;
12
+ };
13
+ export declare function init(): void;
14
+ export declare function isRopsten(): boolean;
15
+ export declare function isDevelopment(): boolean;
16
+ export declare function getConfig<T extends keyof Config>(key: T): Config[T];
17
+ export {};
@@ -0,0 +1,3 @@
1
+ import { Contract } from '@ethersproject/contracts';
2
+ export declare function getLandContract(): Promise<Contract | undefined>;
3
+ export declare function getEstateContract(): Promise<Contract | undefined>;
@@ -0,0 +1,2 @@
1
+ import 'decentraland-ui/lib/styles.css';
2
+ import 'decentraland-ui/lib/dark-theme.css';
@@ -0,0 +1,16 @@
1
+ import { Authorization } from './types';
2
+ export declare const FETCH_AUTHORIZATIONS_REQUEST = "[Request] Fetch LAND Authorizations";
3
+ export declare const FETCH_AUTHORIZATIONS_SUCCESS = "[Success] Fetch LAND Authorizations";
4
+ export declare const FETCH_AUTHORIZATIONS_FAILURE = "[Failure] Fetch LAND Authorizations";
5
+ export declare const fetchAuthorizationsRequest: (owner: string) => import("typesafe-actions/dist/types").PayloadAction<"[Request] Fetch LAND Authorizations", {
6
+ owner: string;
7
+ }>;
8
+ export declare const fetchAuthorizationsSuccess: (authorizations: Authorization[]) => import("typesafe-actions/dist/types").PayloadAction<"[Success] Fetch LAND Authorizations", {
9
+ authorizations: Authorization[];
10
+ }>;
11
+ export declare const fetchAuthorizationsFailure: (error: string) => import("typesafe-actions/dist/types").PayloadAction<"[Failure] Fetch LAND Authorizations", {
12
+ error: string;
13
+ }>;
14
+ export declare type FetchAuthorizationsRequestAction = ReturnType<typeof fetchAuthorizationsRequest>;
15
+ export declare type FetchAuthorizationsSuccessAction = ReturnType<typeof fetchAuthorizationsSuccess>;
16
+ export declare type FetchAuthorizationsFailureAction = ReturnType<typeof fetchAuthorizationsFailure>;
@@ -0,0 +1,9 @@
1
+ import { LoadingState } from 'decentraland-dapps/dist/modules/loading/reducer';
2
+ import { FetchAuthorizationsRequestAction, FetchAuthorizationsSuccessAction, FetchAuthorizationsFailureAction } from './actions';
3
+ export declare type AuthorizationState = {
4
+ data: any;
5
+ loading: LoadingState;
6
+ error: string | null;
7
+ };
8
+ export declare type AuthorizationReducerAction = FetchAuthorizationsRequestAction | FetchAuthorizationsSuccessAction | FetchAuthorizationsFailureAction;
9
+ export declare const authorizationReducer: (state: AuthorizationState | undefined, action: AuthorizationReducerAction) => AuthorizationState;
@@ -0,0 +1 @@
1
+ export declare function authorizationSaga(): Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>;
@@ -0,0 +1,6 @@
1
+ import { RootState } from '../../types';
2
+ export declare const getState: (state: RootState) => import("./reducer").AuthorizationState;
3
+ export declare const getData: import("reselect").OutputSelector<RootState, any, (res: import("./reducer").AuthorizationState) => any>;
4
+ export declare const isLoading: import("reselect").OutputSelector<RootState, boolean, (res: import("./reducer").AuthorizationState) => boolean>;
5
+ export declare const getError: import("reselect").OutputSelector<RootState, string | null, (res: import("./reducer").AuthorizationState) => string | null>;
6
+ export declare const isUpdateAuthorized: import("reselect").OutputSelector<RootState, any, (res: any) => any>;
@@ -0,0 +1,4 @@
1
+ import { Coords } from '../land/types';
2
+ export declare type Authorization = Coords & {
3
+ isUpdateAuthorized: boolean;
4
+ };
@@ -0,0 +1,14 @@
1
+ import { LANDMeta, Coords } from './types';
2
+ export declare const FETCH_LAND_REQUEST = "[Request] Fetch LAND";
3
+ export declare const FETCH_LAND_SUCCESS = "[Success] Fetch LAND";
4
+ export declare const FETCH_LAND_FAILURE = "[Failure] Fetch LAND";
5
+ export declare const fetchLandRequest: (coords: Coords) => import("typesafe-actions/dist/types").PayloadAction<"[Request] Fetch LAND", Coords>;
6
+ export declare const fetchLandSuccess: (land: LANDMeta) => import("typesafe-actions/dist/types").PayloadAction<"[Success] Fetch LAND", {
7
+ land: LANDMeta;
8
+ }>;
9
+ export declare const fetchLandFailure: (error: string) => import("typesafe-actions/dist/types").PayloadAction<"[Failure] Fetch LAND", {
10
+ error: string;
11
+ }>;
12
+ export declare type FetchLandRequestAction = ReturnType<typeof fetchLandRequest>;
13
+ export declare type FetchLandSuccessAction = ReturnType<typeof fetchLandSuccess>;
14
+ export declare type FetchLandFailureAction = ReturnType<typeof fetchLandFailure>;
@@ -0,0 +1,9 @@
1
+ import { LoadingState } from 'decentraland-dapps/dist/modules/loading/reducer';
2
+ import { FetchLandRequestAction, FetchLandSuccessAction, FetchLandFailureAction } from './actions';
3
+ export declare type LandState = {
4
+ data: any;
5
+ loading: LoadingState;
6
+ error: string | null;
7
+ };
8
+ export declare type LandReducerAction = FetchLandRequestAction | FetchLandSuccessAction | FetchLandFailureAction;
9
+ export declare const landReducer: (state: LandState | undefined, action: LandReducerAction) => LandState;
@@ -0,0 +1 @@
1
+ export declare function landSaga(): Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>;
@@ -0,0 +1,5 @@
1
+ import { RootState } from '../../types';
2
+ export declare const getState: (state: RootState) => import("./reducer").LandState;
3
+ export declare const getData: import("reselect").OutputSelector<RootState, any, (res: import("./reducer").LandState) => any>;
4
+ export declare const isLoading: import("reselect").OutputSelector<RootState, boolean, (res: import("./reducer").LandState) => boolean>;
5
+ export declare const getError: import("reselect").OutputSelector<RootState, string | null, (res: import("./reducer").LandState) => string | null>;
@@ -0,0 +1,9 @@
1
+ export declare type Coords = {
2
+ x: number;
3
+ y: number;
4
+ };
5
+ export declare type LANDMeta = {
6
+ version: number;
7
+ name: string;
8
+ description: string;
9
+ };
@@ -0,0 +1,3 @@
1
+ import { LANDMeta, Coords } from './types';
2
+ export declare function getEmptyLandData(): LANDMeta;
3
+ export declare function coordsToString({ x, y }: Coords): string;
@@ -0,0 +1,20 @@
1
+ import { ChainId } from '@dcl/schemas';
2
+ import { AuthIdentity } from 'dcl-crypto';
3
+ export declare type LinkerResponseScenenDeploy = {
4
+ responseType: 'scene-deploy';
5
+ payload: {
6
+ address: string;
7
+ signature: string;
8
+ chainId: ChainId;
9
+ };
10
+ };
11
+ export declare type LinkerResponseIdentity = {
12
+ responseType: 'identity';
13
+ payload: {
14
+ address: string;
15
+ chainId: ChainId;
16
+ identity: AuthIdentity;
17
+ };
18
+ };
19
+ export declare type LinkerResponse = LinkerResponseScenenDeploy | LinkerResponseIdentity;
20
+ export declare function closeServer(ok: boolean, message: LinkerResponse): Promise<void>;
@@ -0,0 +1,27 @@
1
+ import { AuthIdentity } from 'dcl-crypto';
2
+ export declare const SIGN_CONTENT_REQUEST = "[Request] Sign Content";
3
+ export declare const SIGN_CONTENT_SUCCESS = "[Success] Sign Content";
4
+ export declare const SIGN_CONTENT_FAILURE = "[Failure] Sign Content";
5
+ export declare const signContentRequest: (cid: string) => import("typesafe-actions/dist/types").PayloadAction<"[Request] Sign Content", string>;
6
+ export declare const signContentSuccess: (signature: string) => import("typesafe-actions/dist/types").PayloadAction<"[Success] Sign Content", {
7
+ signature: string;
8
+ }>;
9
+ export declare const signContentFailure: (error: string) => import("typesafe-actions/dist/types").PayloadAction<"[Failure] Sign Content", {
10
+ error: string;
11
+ }>;
12
+ export declare type SignContentRequestAction = ReturnType<typeof signContentRequest>;
13
+ export declare type SignContentSuccessAction = ReturnType<typeof signContentSuccess>;
14
+ export declare type SignContentFailureAction = ReturnType<typeof signContentFailure>;
15
+ export declare const CREATE_IDENTITY_REQUEST = "[Request] Create Identity";
16
+ export declare const CREATE_IDENTITY_SUCCESS = "[Success] Create Identity";
17
+ export declare const CREATE_IDENTITY_FAILURE = "[Failure] Create Identity";
18
+ export declare const createIdentityRequest: () => import("typesafe-actions/dist/types").PayloadAction<"[Request] Create Identity", {}>;
19
+ export declare const createIdentitySuccess: (identity: AuthIdentity) => import("typesafe-actions/dist/types").PayloadAction<"[Success] Create Identity", {
20
+ identity: AuthIdentity;
21
+ }>;
22
+ export declare const createIdentityFailure: (error: string) => import("typesafe-actions/dist/types").PayloadAction<"[Failure] Create Identity", {
23
+ error: string;
24
+ }>;
25
+ export declare type CreateIdentityRequestAction = ReturnType<typeof createIdentityRequest>;
26
+ export declare type CreateIdentitySuccessAction = ReturnType<typeof createIdentitySuccess>;
27
+ export declare type CreateIdentityFailureAction = ReturnType<typeof createIdentityFailure>;
@@ -0,0 +1,11 @@
1
+ import { AuthIdentity } from 'dcl-crypto';
2
+ import { LoadingState } from 'decentraland-dapps/dist/modules/loading/reducer';
3
+ import { SignContentRequestAction, SignContentSuccessAction, SignContentFailureAction, CreateIdentityRequestAction, CreateIdentitySuccessAction, CreateIdentityFailureAction } from './actions';
4
+ export declare type SignatureState = {
5
+ data: any;
6
+ identity: AuthIdentity | null;
7
+ loading: LoadingState;
8
+ error: string | null;
9
+ };
10
+ export declare type SignatureReducerAction = SignContentRequestAction | SignContentSuccessAction | SignContentFailureAction | CreateIdentityRequestAction | CreateIdentitySuccessAction | CreateIdentityFailureAction;
11
+ export declare const signatureReducer: (state: SignatureState | undefined, action: SignatureReducerAction) => SignatureState;
@@ -0,0 +1 @@
1
+ export declare function signatureSaga(): Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>;
@@ -0,0 +1,5 @@
1
+ import { RootState } from '../../types';
2
+ export declare const getState: (state: RootState) => import("./reducer").SignatureState;
3
+ export declare const getData: import("reselect").OutputSelector<RootState, any, (res: import("./reducer").SignatureState) => any>;
4
+ export declare const isLoading: import("reselect").OutputSelector<RootState, boolean, (res: import("./reducer").SignatureState) => boolean>;
5
+ export declare const getError: import("reselect").OutputSelector<RootState, string | null, (res: import("./reducer").SignatureState) => string | null>;
@@ -0,0 +1 @@
1
+ export declare function walletSaga(): Generator<import("redux-saga/effects").AllEffect<Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown> | Generator<import("redux-saga/effects").AllEffect<import("redux-saga/effects").ForkEffect<never>>, void, unknown>>, void, unknown>;
@@ -0,0 +1,5 @@
1
+ import { RootState } from '../../types';
2
+ export declare const getState: (state: RootState) => import("../signature/reducer").SignatureState;
3
+ export declare const getData: import("reselect").OutputSelector<RootState, any, (res: import("../signature/reducer").SignatureState) => any>;
4
+ export declare const isLoading: import("reselect").OutputSelector<RootState, boolean, (res: import("../signature/reducer").SignatureState) => boolean>;
5
+ export declare const getError: import("reselect").OutputSelector<RootState, string | null, (res: import("../signature/reducer").SignatureState) => string | null>;
@@ -0,0 +1,2 @@
1
+ import { RootState } from './types';
2
+ export declare const rootReducer: import("redux").Reducer<import("redux").CombinedState<RootState>, import("redux").AnyAction>;
@@ -0,0 +1 @@
1
+ export declare function rootSaga(): () => Generator<import("redux-saga/effects").AllEffect<Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown> | Generator<import("redux-saga/effects").AllEffect<Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown> | Generator<import("redux-saga/effects").AllEffect<import("redux-saga/effects").ForkEffect<never>>, void, unknown>>, void, unknown>>, void, unknown>;
@@ -0,0 +1 @@
1
+ export declare function initStore(): import("redux").Store<import("redux").EmptyObject & import("./types").RootState, import("redux").AnyAction>;
@@ -0,0 +1,14 @@
1
+ import { Reducer, Store } from 'redux';
2
+ import { WalletState } from 'decentraland-dapps/dist/modules/wallet/reducer';
3
+ import { TransactionState } from 'decentraland-dapps/dist/modules/transaction/reducer';
4
+ import { LandState } from './modules/land/reducer';
5
+ import { SignatureState } from './modules/signature/reducer';
6
+ import { AuthorizationState } from './modules/authorization/reducer';
7
+ export declare type RootState = {
8
+ wallet: WalletState;
9
+ transaction: TransactionState;
10
+ land: LandState;
11
+ authorization: AuthorizationState;
12
+ signature: SignatureState;
13
+ };
14
+ export declare type RootReducer = Reducer<Store<RootState>>;