on fe6d1db help sign in
bridge/src/lib/types/L2Transaction.ts
62 lines 1.2 kB history raw
1import RollerRPCAPI, { EthAddress, Proxy, Ship } from '@urbit/roller-api';
2import WalletConnect from '@walletconnect/client';
3import BridgeWallet from './BridgeWallet';
5export type TransactionType =
6 | 'transferPoint'
7 | 'spawn'
8 | 'configureKeys'
9 | 'escape'
10 | 'cancelEscape'
11 | 'adopt'
12 | 'detach'
13 | 'reject';
15export interface SendL2Params {
16 address?: string; // Destination address
17 breach?: boolean;
18 networkSeed?: any;
19 newSponsor?: Ship;
20 sponsee?: Ship;
21 nonce: number;
22 pointToSpawn?: number;
23 proxy: Proxy;
24 proxyAddressType?: string;
25 reset?: boolean;
26 ship: Ship;
27 type: TransactionType;
30export interface L2TransactionArgs extends SendL2Params {
31 api: RollerRPCAPI;
32 wallet: any;
33 walletType: symbol;
34 web3: any;
35 connector: WalletConnect | null;
38export interface TransactionData {
39 data: any;
40 method: Function;
43export interface ReticketProgressCallback {
44 ({
45 type,
46 state,
47 value,
48 }: {
49 type: string;
50 state: number;
51 value?: string;
52 }): void;
55export interface ReticketParams {
56 point: Ship;
57 to: EthAddress;
58 manager: EthAddress;
59 fromWallet: BridgeWallet;
60 toWallet: UrbitWallet;
61 onUpdate?: ReticketProgressCallback;