@fedimint/react 0.0.4 → 0.2.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 CHANGED
@@ -11,7 +11,7 @@
11
11
  ## Install
12
12
 
13
13
  ```bash
14
- pnpm install @fedimint/core-web @fedimint/react
14
+ pnpm install @fedimint/core @fedimint/react
15
15
  ```
16
16
 
17
17
  ## Usage
@@ -1,7 +1,8 @@
1
- import { FedimintWallet } from '@fedimint/core-web';
1
+ import { FedimintWallet, Transport } from '@fedimint/core';
2
2
  type FedimintWalletConfig = {
3
3
  lazy?: boolean;
4
4
  debug?: boolean;
5
+ transport: Transport;
5
6
  };
6
7
  export type WalletStatus = 'open' | 'closed' | 'opening';
7
8
  export declare const setupFedimintWallet: (config: FedimintWalletConfig) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"FedimintWalletContext.d.ts","sourceRoot":"","sources":["../../lib/contexts/FedimintWalletContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAWnD,KAAK,oBAAoB,GAAG;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAA;AAExD,eAAO,MAAM,mBAAmB,GAAI,QAAQ,oBAAoB,SAK/D,CAAA;AAED,eAAO,MAAM,qBAAqB;YAEpB,cAAc;kBACR,YAAY;qBACT,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI;cAGzC,CAAA;AAEZ,MAAM,MAAM,2BAA2B,GAAG,EAAE,CAAA;AAE5C,eAAO,MAAM,sBAAsB,GACjC,YAAY,KAAK,CAAC,iBAAiB,CAAC,2BAA2B,CAAC;YAVpD,cAAc;kBACR,YAAY;qBACT,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI;eAsCpD,CAAA"}
1
+ {"version":3,"file":"FedimintWalletContext.d.ts","sourceRoot":"","sources":["../../lib/contexts/FedimintWalletContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,cAAc,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAY1E,KAAK,oBAAoB,GAAG;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,SAAS,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAA;AAExD,eAAO,MAAM,mBAAmB,GAAI,QAAQ,oBAAoB,SAQ/D,CAAA;AAED,eAAO,MAAM,qBAAqB;YAEpB,cAAc;kBACR,YAAY;qBACT,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI;cAGzC,CAAA;AAEZ,MAAM,MAAM,2BAA2B,GAAG,EAAE,CAAA;AAE5C,eAAO,MAAM,sBAAsB,GACjC,YAAY,KAAK,CAAC,iBAAiB,CAAC,2BAA2B,CAAC;YAVpD,cAAc;kBACR,YAAY;qBACT,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI;eAsCpD,CAAA"}
@@ -1,2 +1,2 @@
1
- export declare const useFedimintWallet: () => import('@fedimint/core-web').FedimintWallet;
1
+ export declare const useFedimintWallet: () => import('@fedimint/core').FedimintWallet;
2
2
  //# sourceMappingURL=useFedimintWallet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFedimintWallet.d.ts","sourceRoot":"","sources":["../../lib/hooks/useFedimintWallet.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,mDAQ7B,CAAA"}
1
+ {"version":3,"file":"useFedimintWallet.d.ts","sourceRoot":"","sources":["../../lib/hooks/useFedimintWallet.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,+CAQ7B,CAAA"}
@@ -1,4 +1,4 @@
1
- import { ReissueExternalNotesState } from '@fedimint/core-web';
1
+ import { ReissueExternalNotesState } from '@fedimint/core';
2
2
  export declare const useReceiveEcash: () => {
3
3
  redeemEcash: (notes: string) => Promise<void>;
4
4
  state: "Error" | ReissueExternalNotesState | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"useReceiveEcash.d.ts","sourceRoot":"","sources":["../../lib/hooks/useReceiveEcash.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AAE9D,eAAO,MAAM,eAAe;yBA2BV,MAAM;;;CAkBvB,CAAA"}
1
+ {"version":3,"file":"useReceiveEcash.d.ts","sourceRoot":"","sources":["../../lib/hooks/useReceiveEcash.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAA;AAE1D,eAAO,MAAM,eAAe;yBA2BV,MAAM;;;CAkBvB,CAAA"}
@@ -1,4 +1,4 @@
1
- import { LnReceiveState } from '@fedimint/core-web';
1
+ import { LnReceiveState } from '@fedimint/core';
2
2
  export declare const useReceiveLightning: () => {
3
3
  generateInvoice: (amount: number, description: string) => Promise<string>;
4
4
  bolt11: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"useReceiveLightning.d.ts","sourceRoot":"","sources":["../../lib/hooks/useReceiveLightning.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAA6B,MAAM,oBAAoB,CAAA;AAE9E,eAAO,MAAM,mBAAmB;8BASb,MAAM,eAAe,MAAM;;;;CAgC7C,CAAA"}
1
+ {"version":3,"file":"useReceiveLightning.d.ts","sourceRoot":"","sources":["../../lib/hooks/useReceiveLightning.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAA6B,MAAM,gBAAgB,CAAA;AAE1E,eAAO,MAAM,mBAAmB;8BASb,MAAM,eAAe,MAAM;;;;CAgC7C,CAAA"}
@@ -1,4 +1,4 @@
1
- import { LnPayState, OutgoingLightningPayment } from '@fedimint/core-web';
1
+ import { LnPayState, OutgoingLightningPayment } from '@fedimint/core';
2
2
  export declare const useSendLightning: () => {
3
3
  payInvoice: (bolt11: string) => Promise<OutgoingLightningPayment>;
4
4
  payment: OutgoingLightningPayment | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"useSendLightning.d.ts","sourceRoot":"","sources":["../../lib/hooks/useSendLightning.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,wBAAwB,EAC9B,MAAM,oBAAoB,CAAA;AAE3B,eAAO,MAAM,gBAAgB;yBAQV,MAAM;;;;CAiCxB,CAAA"}
1
+ {"version":3,"file":"useSendLightning.d.ts","sourceRoot":"","sources":["../../lib/hooks/useSendLightning.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AAE/E,eAAO,MAAM,gBAAgB;yBAQV,MAAM;;;;CAiCxB,CAAA"}
@@ -1,4 +1,4 @@
1
- import { SpendNotesState } from '@fedimint/core-web';
1
+ import { SpendNotesState } from '@fedimint/core';
2
2
  export declare const useSpendEcash: () => {
3
3
  spendEcash: (amountSats: number, reclaimAfter?: number) => Promise<string>;
4
4
  notes: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"useSpendEcash.d.ts","sourceRoot":"","sources":["../../lib/hooks/useSpendEcash.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEzD,eAAO,MAAM,aAAa;6BA8BH,MAAM,iBAAiB,MAAM;;;;CAmBnD,CAAA"}
1
+ {"version":3,"file":"useSpendEcash.d.ts","sourceRoot":"","sources":["../../lib/hooks/useSpendEcash.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAErD,eAAO,MAAM,aAAa;6BA8BH,MAAM,iBAAiB,MAAM;;;;CAmBnD,CAAA"}
package/dist/index.js CHANGED
@@ -1,82 +1,84 @@
1
- import { useState as r, useEffect as h, createContext as y, useMemo as W, createElement as F, useContext as f, useCallback as m } from "react";
2
- import { FedimintWallet as I } from "@fedimint/core-web";
3
- const L = () => {
4
- const e = g(), { walletStatus: n } = E(), [t, o] = r();
5
- return h(() => {
6
- if (n !== "open") return;
1
+ import { useState as r, useEffect as m, createContext as y, useMemo as F, createElement as I, useContext as W, useCallback as w } from "react";
2
+ import { WalletDirector as P } from "@fedimint/core";
3
+ const R = () => {
4
+ const e = g(), { walletStatus: t } = E(), [n, o] = r();
5
+ return m(() => {
6
+ if (t !== "open") return;
7
7
  const a = e.balance.subscribeBalance((c) => {
8
8
  o(c);
9
9
  });
10
10
  return () => {
11
11
  a();
12
12
  };
13
- }, [n]), t;
13
+ }, [t]), n;
14
14
  };
15
- let w;
16
- const R = (e) => {
17
- w = new I(!!e.lazy), e.debug && w.setLogLevel("debug");
18
- }, v = y(void 0), O = (e) => {
19
- const [n, t] = r("closed"), { children: o } = e;
20
- if (!w)
15
+ let b, v;
16
+ const O = (e) => {
17
+ v = new P(e.transport), v.createWallet().then((t) => {
18
+ b = t;
19
+ }), e.debug && v.setLogLevel("debug");
20
+ }, f = y(void 0), C = (e) => {
21
+ const [t, n] = r("closed"), { children: o } = e;
22
+ if (!b)
21
23
  throw new Error(
22
24
  "You must call setupFedimintWallet() first. See the getting started guide."
23
25
  );
24
- const a = W(
26
+ const a = F(
25
27
  () => ({
26
- wallet: w,
27
- walletStatus: n,
28
- setWalletStatus: t
28
+ wallet: b,
29
+ walletStatus: t,
30
+ setWalletStatus: n
29
31
  }),
30
- [n]
32
+ [t]
31
33
  );
32
- return h(() => {
33
- w.waitForOpen().then(() => {
34
- t("open");
34
+ return m(() => {
35
+ b.waitForOpen().then(() => {
36
+ n("open");
35
37
  });
36
- }, [w]), F(
37
- v.Provider,
38
+ }, [b]), I(
39
+ f.Provider,
38
40
  { value: a },
39
41
  o
40
42
  );
41
43
  }, E = () => {
42
- const e = f(v);
44
+ const e = W(f);
43
45
  if (!e)
44
46
  throw new Error(
45
47
  "useOpenWallet must be used within a FedimintWalletProvider"
46
48
  );
47
- const { wallet: n, walletStatus: t, setWalletStatus: o } = e, a = m(() => {
48
- t !== "open" && (o("opening"), n.open().then((l) => {
49
+ const { wallet: t, walletStatus: n, setWalletStatus: o } = e, a = w(() => {
50
+ n !== "open" && (o("opening"), t.open().then((l) => {
49
51
  o(l ? "open" : "closed");
50
52
  }));
51
- }, [n]), c = m(
53
+ }, [t]), c = w(
52
54
  async (l) => {
53
- t !== "open" && (o("opening"), await n.joinFederation(l).then((u) => {
55
+ n !== "open" && (o("opening"), await t.joinFederation(l).then((u) => {
54
56
  o(u ? "open" : "closed");
55
57
  }));
56
58
  },
57
- [n]
59
+ [t]
58
60
  );
59
- return { walletStatus: t, openWallet: a, joinFederation: c };
61
+ return { walletStatus: n, openWallet: a, joinFederation: c };
60
62
  }, g = () => {
61
- const e = f(v);
63
+ const e = W(f);
62
64
  if (!(e != null && e.wallet))
63
65
  throw new Error(
64
66
  "useFedimintWallet must be used within a FedimintWalletProvider"
65
67
  );
66
68
  return e.wallet;
67
- }, C = () => {
68
- const e = g(), { walletStatus: n } = E(), [t, o] = r(), [a, c] = r(), [l, u] = r(), p = m(
69
+ }, N = () => {
70
+ const e = g(), { walletStatus: t } = E(), [n, o] = r(), [a, c] = r(), [l, u] = r(), p = w(
69
71
  async (i, s) => {
70
- if (n !== "open") throw new Error("Wallet is not open");
72
+ if (t !== "open") throw new Error("Wallet is not open");
71
73
  const d = await e.lightning.createInvoice(i, s);
72
74
  return o(d), d.invoice;
73
75
  },
74
- [e, n]
76
+ [e, t]
75
77
  );
76
- return h(() => {
77
- if (n !== "open" || !t) return;
78
+ return m(() => {
79
+ if (t !== "open" || !n) return;
78
80
  const i = e.lightning.subscribeLnReceive(
79
- t.operation_id,
81
+ n.operation_id,
80
82
  (s) => {
81
83
  c(s);
82
84
  },
@@ -87,26 +89,26 @@ const R = (e) => {
87
89
  return () => {
88
90
  i();
89
91
  };
90
- }, [n, t]), {
92
+ }, [t, n]), {
91
93
  generateInvoice: p,
92
- bolt11: t == null ? void 0 : t.invoice,
94
+ bolt11: n == null ? void 0 : n.invoice,
93
95
  invoiceStatus: a,
94
96
  error: l
95
97
  };
96
- }, N = () => {
97
- const e = g(), { walletStatus: n } = E(), [t, o] = r(), [a, c] = r(), [l, u] = r(), p = m(
98
+ }, B = () => {
99
+ const e = g(), { walletStatus: t } = E(), [n, o] = r(), [a, c] = r(), [l, u] = r(), p = w(
98
100
  async (i) => {
99
- if (n !== "open") throw new Error("Wallet is not open");
101
+ if (t !== "open") throw new Error("Wallet is not open");
100
102
  const s = await e.lightning.payInvoice(i);
101
103
  return o(s), s;
102
104
  },
103
- [e, n]
105
+ [e, t]
104
106
  );
105
- return h(() => {
106
- if (n !== "open" || !t) return;
107
+ return m(() => {
108
+ if (t !== "open" || !n) return;
107
109
  const i = e.lightning.subscribeLnPay(
108
110
  // @ts-ignore
109
- t.payment_type.lightning,
111
+ n.payment_type.lightning,
110
112
  (s) => {
111
113
  c(s);
112
114
  },
@@ -117,50 +119,50 @@ const R = (e) => {
117
119
  return () => {
118
120
  i();
119
121
  };
120
- }, [n, t]), {
122
+ }, [t, n]), {
121
123
  payInvoice: p,
122
- payment: t,
124
+ payment: n,
123
125
  paymentStatus: a,
124
126
  paymentError: l
125
127
  };
126
- }, B = () => {
127
- const e = g(), { walletStatus: n } = E(), [t, o] = r(), [a, c] = r(), [l, u] = r(), [p, i] = r();
128
- return h(() => {
129
- if (!t) return;
128
+ }, _ = () => {
129
+ const e = g(), { walletStatus: t } = E(), [n, o] = r(), [a, c] = r(), [l, u] = r(), [p, i] = r();
130
+ return m(() => {
131
+ if (!n) return;
130
132
  const d = e.mint.subscribeSpendNotes(
131
- t,
132
- (b) => {
133
- u(b);
133
+ n,
134
+ (h) => {
135
+ u(h);
134
136
  },
135
- (b) => {
136
- u("Error"), i(b);
137
+ (h) => {
138
+ u("Error"), i(h);
137
139
  }
138
140
  );
139
141
  return () => {
140
142
  d();
141
143
  };
142
- }, [t]), {
143
- spendEcash: m(
144
- async (d, b) => {
145
- if (n !== "open") throw new Error("Wallet is not open");
144
+ }, [n]), {
145
+ spendEcash: w(
146
+ async (d, h) => {
147
+ if (t !== "open") throw new Error("Wallet is not open");
146
148
  const S = await e.mint.spendNotes(
147
149
  d * 1e3,
148
- b
150
+ h
149
151
  );
150
152
  return o(S.operation_id), c(S.notes), S.notes;
151
153
  },
152
- [e, n]
154
+ [e, t]
153
155
  ),
154
156
  notes: a,
155
157
  state: l,
156
158
  error: p
157
159
  };
158
- }, _ = () => {
159
- const e = g(), { walletStatus: n } = E(), [t, o] = r(), [a, c] = r(), [l, u] = r();
160
- return h(() => {
161
- if (!t) return;
160
+ }, j = () => {
161
+ const e = g(), { walletStatus: t } = E(), [n, o] = r(), [a, c] = r(), [l, u] = r();
162
+ return m(() => {
163
+ if (!n) return;
162
164
  const i = e.mint.subscribeReissueExternalNotes(
163
- t,
165
+ n,
164
166
  (s) => {
165
167
  c(s);
166
168
  },
@@ -171,10 +173,10 @@ const R = (e) => {
171
173
  return () => {
172
174
  i();
173
175
  };
174
- }, [t]), {
175
- redeemEcash: m(
176
+ }, [n]), {
177
+ redeemEcash: w(
176
178
  async (i) => {
177
- if (n !== "open") throw new Error("Wallet is not open");
179
+ if (t !== "open") throw new Error("Wallet is not open");
178
180
  try {
179
181
  const s = await e.mint.redeemEcash(i);
180
182
  o(s);
@@ -182,21 +184,21 @@ const R = (e) => {
182
184
  c("Error"), u(s);
183
185
  }
184
186
  },
185
- [e, n]
187
+ [e, t]
186
188
  ),
187
189
  state: a,
188
190
  error: l
189
191
  };
190
192
  };
191
193
  export {
192
- v as FedimintWalletContext,
193
- O as FedimintWalletProvider,
194
- R as setupFedimintWallet,
195
- L as useBalance,
194
+ f as FedimintWalletContext,
195
+ C as FedimintWalletProvider,
196
+ O as setupFedimintWallet,
197
+ R as useBalance,
196
198
  g as useFedimintWallet,
197
199
  E as useOpenWallet,
198
- _ as useReceiveEcash,
199
- C as useReceiveLightning,
200
- N as useSendLightning,
201
- B as useSpendEcash
200
+ j as useReceiveEcash,
201
+ N as useReceiveLightning,
202
+ B as useSendLightning,
203
+ _ as useSpendEcash
202
204
  };
package/dist/init.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- export declare const initFedimintReact: (lazy?: boolean) => {};
1
+ import { Transport } from '@fedimint/core';
2
+ export declare const initFedimintReact: (lazy: boolean | undefined, transport: Transport) => {};
2
3
  //# sourceMappingURL=init.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../lib/init.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB,GAAI,OAAM,OAAe,OAMtD,CAAA"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../lib/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,SAAS,EAAkB,MAAM,gBAAgB,CAAA;AAM1E,eAAO,MAAM,iBAAiB,GAC5B,MAAM,OAAO,YAAQ,EACrB,WAAW,SAAS,OAUrB,CAAA"}
@@ -1,4 +1,4 @@
1
- import { FedimintWallet } from '@fedimint/core-web'
1
+ import { WalletDirector, FedimintWallet, Transport } from '@fedimint/core'
2
2
  import {
3
3
  createContext,
4
4
  createElement,
@@ -8,18 +8,23 @@ import {
8
8
  } from 'react'
9
9
 
10
10
  let wallet: FedimintWallet
11
+ let walletDirector: WalletDirector
11
12
 
12
13
  type FedimintWalletConfig = {
13
14
  lazy?: boolean
14
15
  debug?: boolean
16
+ transport: Transport
15
17
  }
16
18
 
17
19
  export type WalletStatus = 'open' | 'closed' | 'opening'
18
20
 
19
21
  export const setupFedimintWallet = (config: FedimintWalletConfig) => {
20
- wallet = new FedimintWallet(!!config.lazy)
22
+ walletDirector = new WalletDirector(config.transport)
23
+ walletDirector.createWallet().then((w) => {
24
+ wallet = w
25
+ })
21
26
  if (config.debug) {
22
- wallet.setLogLevel('debug')
27
+ walletDirector.setLogLevel('debug')
23
28
  }
24
29
  }
25
30
 
@@ -1,6 +1,6 @@
1
1
  import { useCallback, useEffect, useState } from 'react'
2
2
  import { useFedimintWallet, useOpenWallet } from '.'
3
- import { ReissueExternalNotesState } from '@fedimint/core-web'
3
+ import { ReissueExternalNotesState } from '@fedimint/core'
4
4
 
5
5
  export const useReceiveEcash = () => {
6
6
  const wallet = useFedimintWallet()
@@ -1,6 +1,6 @@
1
1
  import { useCallback, useEffect, useState } from 'react'
2
2
  import { useFedimintWallet, useOpenWallet } from '.'
3
- import { LnReceiveState, type CreateBolt11Response } from '@fedimint/core-web'
3
+ import { LnReceiveState, type CreateBolt11Response } from '@fedimint/core'
4
4
 
5
5
  export const useReceiveLightning = () => {
6
6
  const wallet = useFedimintWallet()
@@ -1,9 +1,6 @@
1
1
  import { useCallback, useEffect, useState } from 'react'
2
2
  import { useFedimintWallet, useOpenWallet } from '.'
3
- import {
4
- type LnPayState,
5
- type OutgoingLightningPayment,
6
- } from '@fedimint/core-web'
3
+ import { type LnPayState, type OutgoingLightningPayment } from '@fedimint/core'
7
4
 
8
5
  export const useSendLightning = () => {
9
6
  const wallet = useFedimintWallet()
@@ -1,6 +1,6 @@
1
1
  import { useCallback, useEffect, useState } from 'react'
2
2
  import { useFedimintWallet, useOpenWallet } from '.'
3
- import { type SpendNotesState } from '@fedimint/core-web'
3
+ import { type SpendNotesState } from '@fedimint/core'
4
4
 
5
5
  export const useSpendEcash = () => {
6
6
  const wallet = useFedimintWallet()
package/lib/init.ts CHANGED
@@ -1,10 +1,18 @@
1
- import { FedimintWallet } from '@fedimint/core-web'
1
+ import { FedimintWallet, Transport, WalletDirector } from '@fedimint/core'
2
2
 
3
3
  let wallet: FedimintWallet | undefined
4
4
 
5
- export const initFedimintReact = (lazy: boolean = false) => {
5
+ let walletDirector: WalletDirector
6
+
7
+ export const initFedimintReact = (
8
+ lazy: boolean = false,
9
+ transport: Transport,
10
+ ) => {
11
+ walletDirector = new WalletDirector(transport)
6
12
  if (!lazy) {
7
- wallet = new FedimintWallet(lazy)
13
+ walletDirector.createWallet().then((w) => {
14
+ wallet = w
15
+ })
8
16
  }
9
17
 
10
18
  return {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedimint/react",
3
- "version": "0.0.4",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -10,7 +10,7 @@
10
10
  "types": "./dist/index.d.ts",
11
11
  "peerDependencies": {
12
12
  "react": "^18.3.1",
13
- "@fedimint/core-web": "0.0.11"
13
+ "@fedimint/core": "0.1.1"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@types/react": ">=19.1.4",
@@ -23,7 +23,7 @@
23
23
  "eslint-plugin-react-refresh": "^0.4.20",
24
24
  "react-dom": ">=19.1.0",
25
25
  "typescript": "^5.8.3",
26
- "vite": "^5.4.19",
26
+ "vite": "^5.4.20",
27
27
  "vite-plugin-dts": "^4.5.4",
28
28
  "vite-plugin-wasm": "^3.4.1"
29
29
  },