@coinbase/cdp-core 0.0.117 → 0.0.119
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/esm/index.web10.js +49 -44
- package/dist/esm/index.web107.js +3 -3
- package/dist/esm/index.web110.js +2 -2
- package/dist/esm/index.web114.js +3 -3
- package/dist/esm/index.web126.js +12 -12
- package/dist/esm/index.web127.js +13 -373
- package/dist/esm/index.web128.js +25 -2
- package/dist/esm/index.web129.js +48 -63
- package/dist/esm/index.web130.js +189 -177
- package/dist/esm/index.web131.js +2 -31
- package/dist/esm/index.web132.js +65 -28
- package/dist/esm/index.web133.js +360 -12
- package/dist/esm/index.web134.js +28 -22
- package/dist/esm/index.web135.js +28 -50
- package/dist/esm/index.web138.js +1 -1
- package/dist/esm/index.web139.js +1 -1
- package/dist/esm/index.web140.js +12 -4
- package/dist/esm/index.web141.js +11 -54
- package/dist/esm/index.web142.js +54 -10
- package/dist/esm/index.web143.js +11 -2
- package/dist/esm/index.web144.js +2 -45
- package/dist/esm/index.web145.js +44 -13
- package/dist/esm/index.web146.js +13 -12
- package/dist/esm/index.web147.js +4 -11
- package/dist/esm/index.web148.js +1 -1
- package/dist/esm/index.web150.js +13 -14
- package/dist/esm/index.web151.js +54 -27
- package/dist/esm/index.web152.js +6 -7
- package/dist/esm/index.web153.js +21 -3
- package/dist/esm/index.web154.js +16 -27
- package/dist/esm/index.web155.js +45 -8
- package/dist/esm/index.web156.js +3 -7
- package/dist/esm/index.web157.js +3 -80
- package/dist/esm/index.web158.js +32 -26
- package/dist/esm/index.web159.js +12 -3
- package/dist/esm/index.web160.js +4 -15
- package/dist/esm/index.web161.js +28 -4
- package/dist/esm/index.web162.js +6 -14
- package/dist/esm/index.web163.js +31 -18
- package/dist/esm/index.web164.js +9 -58
- package/dist/esm/index.web165.js +55 -17
- package/dist/esm/index.web166.js +41 -22
- package/dist/esm/index.web167.js +127 -8
- package/dist/esm/index.web168.js +102 -40
- package/dist/esm/index.web169.js +6 -7
- package/dist/esm/index.web170.js +3 -21
- package/dist/esm/index.web171.js +79 -2
- package/dist/esm/index.web172.js +2 -2
- package/dist/esm/index.web173.js +2 -14
- package/dist/esm/index.web174.js +33 -51
- package/dist/esm/index.web175.js +6 -6
- package/dist/esm/index.web176.js +32 -19
- package/dist/esm/index.web177.js +14 -17
- package/dist/esm/index.web178.js +30 -41
- package/dist/esm/index.web179.js +18 -3
- package/dist/esm/index.web180.js +8 -3
- package/dist/esm/index.web181.js +9 -33
- package/dist/esm/index.web182.js +11 -12
- package/dist/esm/index.web183.js +13 -4
- package/dist/esm/index.web184.js +5 -28
- package/dist/esm/index.web185.js +5 -7
- package/dist/esm/index.web186.js +10 -32
- package/dist/esm/index.web187.js +2 -13
- package/dist/esm/index.web188.js +2 -56
- package/dist/esm/index.web189.js +14 -42
- package/dist/esm/index.web190.js +27 -126
- package/dist/esm/index.web191.js +7 -104
- package/dist/esm/index.web192.js +3 -6
- package/dist/esm/index.web193.js +29 -3
- package/dist/esm/index.web194.js +8 -78
- package/dist/esm/index.web195.js +8 -2
- package/dist/esm/index.web196.js +81 -2
- package/dist/esm/index.web197.js +26 -35
- package/dist/esm/index.web198.js +3 -6
- package/dist/esm/index.web199.js +15 -34
- package/dist/esm/index.web200.js +4 -14
- package/dist/esm/index.web201.js +14 -34
- package/dist/esm/index.web202.js +18 -17
- package/dist/esm/index.web203.js +61 -8
- package/dist/esm/index.web204.js +17 -10
- package/dist/esm/index.web205.js +23 -11
- package/dist/esm/index.web206.js +8 -13
- package/dist/esm/index.web207.js +42 -5
- package/dist/esm/index.web208.js +8 -5
- package/dist/esm/index.web209.js +20 -10
- package/dist/esm/index.web21.js +16 -5
- package/dist/esm/index.web210.js +104 -2
- package/dist/esm/index.web211.js +77 -107
- package/dist/esm/index.web212.js +79 -2
- package/dist/esm/index.web213.js +1 -1
- package/dist/esm/index.web217.js +1 -1
- package/dist/esm/index.web219.js +106 -101
- package/dist/esm/index.web220.js +2 -79
- package/dist/esm/index.web221.js +2 -79
- package/dist/esm/index.web222.js +20 -7
- package/dist/esm/index.web223.js +2 -2
- package/dist/esm/index.web224.js +19 -360
- package/dist/esm/index.web225.js +32 -852
- package/dist/esm/index.web226.js +6 -38
- package/dist/esm/index.web227.js +39 -2
- package/dist/esm/index.web228.js +2 -70
- package/dist/esm/index.web229.js +66 -31
- package/dist/esm/index.web230.js +33 -13
- package/dist/esm/index.web231.js +12 -18
- package/dist/esm/index.web232.js +8 -2
- package/dist/esm/index.web233.js +2 -20
- package/dist/esm/index.web234.js +356 -28
- package/dist/esm/index.web235.js +852 -6
- package/dist/esm/index.web236.js +1 -1
- package/dist/esm/index.web239.js +1 -1
- package/dist/esm/index.web244.js +1 -1
- package/dist/esm/index.web245.js +1 -1
- package/dist/esm/index.web246.js +2 -2
- package/dist/esm/index.web247.js +2 -2
- package/dist/esm/index.web248.js +2 -2
- package/dist/esm/index.web3.js +1 -1
- package/dist/esm/index.web64.js +24 -22
- package/dist/esm/index.web65.js +13 -17
- package/dist/esm/index.web8.js +26 -12
- package/dist/esm/index.web9.js +1 -1
- package/dist/native/index.native11.js +1 -1
- package/dist/native/index.native112.js +2 -2
- package/dist/native/index.native116.js +3 -3
- package/dist/native/index.native12.js +50 -45
- package/dist/native/index.native129.js +371 -100
- package/dist/native/index.native130.js +2 -379
- package/dist/native/index.native131.js +65 -28
- package/dist/native/index.native132.js +364 -28
- package/dist/native/index.native133.js +108 -2
- package/dist/native/index.native134.js +28 -65
- package/dist/native/index.native135.js +28 -364
- package/dist/native/index.native136.js +1 -1
- package/dist/native/index.native138.js +4 -4
- package/dist/native/index.native141.js +1 -1
- package/dist/native/index.native142.js +1 -1
- package/dist/native/index.native143.js +1 -1
- package/dist/native/index.native145.js +5 -2
- package/dist/native/index.native146.js +13 -2
- package/dist/native/index.native147.js +11 -4
- package/dist/native/index.native148.js +53 -11
- package/dist/native/index.native149.js +10 -11
- package/dist/native/index.native150.js +2 -55
- package/dist/native/index.native151.js +45 -11
- package/dist/native/index.native152.js +14 -2
- package/dist/native/index.native153.js +2 -45
- package/dist/native/index.native154.js +2 -14
- package/dist/native/index.native162.js +1 -1
- package/dist/native/index.native174.js +1 -1
- package/dist/native/index.native199.js +2 -2
- package/dist/native/index.native207.js +2 -2
- package/dist/native/index.native221.js +1 -1
- package/dist/native/index.native23.js +16 -5
- package/dist/native/index.native241.js +46 -3
- package/dist/native/index.native242.js +3 -46
- package/dist/native/index.native249.js +1 -1
- package/dist/native/index.native252.js +1 -1
- package/dist/native/index.native255.js +78 -14
- package/dist/native/index.native256.js +14 -78
- package/dist/native/index.native66.js +24 -22
- package/dist/native/index.native67.js +15 -19
- package/dist/native/index.native8.js +16 -3
- package/dist/native/index.native86.js +1 -1
- package/dist/native/index.native9.js +21 -8
- package/dist/native-types/actions/createBitcoinAccount.d.ts +5 -2
- package/dist/native-types/actions/getCurrentUser.d.ts +18 -1
- package/dist/native-types/actions/signBitcoinHash.d.ts +7 -5
- package/dist/native-types/core.d.ts +1 -1
- package/dist/native-types/platform/types.d.ts +25 -0
- package/dist/native-types/types.d.ts +2 -2
- package/dist/native-types/version.d.ts +1 -1
- package/dist/types/actions/createBitcoinAccount.d.ts +5 -2
- package/dist/types/actions/getCurrentUser.d.ts +18 -1
- package/dist/types/actions/signBitcoinHash.d.ts +7 -5
- package/dist/types/core.d.ts +1 -1
- package/dist/types/platform/types.d.ts +25 -0
- package/dist/types/types.d.ts +2 -2
- package/dist/types/version.d.ts +1 -1
- package/dist/web/index.web10.js +49 -44
- package/dist/web/index.web107.js +3 -3
- package/dist/web/index.web110.js +2 -2
- package/dist/web/index.web114.js +3 -3
- package/dist/web/index.web126.js +12 -12
- package/dist/web/index.web127.js +13 -373
- package/dist/web/index.web128.js +25 -2
- package/dist/web/index.web129.js +48 -63
- package/dist/web/index.web130.js +189 -177
- package/dist/web/index.web131.js +2 -31
- package/dist/web/index.web132.js +65 -28
- package/dist/web/index.web133.js +360 -12
- package/dist/web/index.web134.js +28 -22
- package/dist/web/index.web135.js +28 -50
- package/dist/web/index.web138.js +1 -1
- package/dist/web/index.web139.js +1 -1
- package/dist/web/index.web140.js +12 -4
- package/dist/web/index.web141.js +11 -54
- package/dist/web/index.web142.js +54 -10
- package/dist/web/index.web143.js +11 -2
- package/dist/web/index.web144.js +2 -45
- package/dist/web/index.web145.js +44 -13
- package/dist/web/index.web146.js +13 -12
- package/dist/web/index.web147.js +4 -11
- package/dist/web/index.web148.js +1 -1
- package/dist/web/index.web150.js +13 -14
- package/dist/web/index.web151.js +54 -27
- package/dist/web/index.web152.js +6 -7
- package/dist/web/index.web153.js +21 -3
- package/dist/web/index.web154.js +16 -27
- package/dist/web/index.web155.js +45 -8
- package/dist/web/index.web156.js +3 -7
- package/dist/web/index.web157.js +3 -80
- package/dist/web/index.web158.js +32 -26
- package/dist/web/index.web159.js +12 -3
- package/dist/web/index.web160.js +4 -15
- package/dist/web/index.web161.js +28 -4
- package/dist/web/index.web162.js +6 -14
- package/dist/web/index.web163.js +31 -18
- package/dist/web/index.web164.js +9 -58
- package/dist/web/index.web165.js +55 -17
- package/dist/web/index.web166.js +41 -22
- package/dist/web/index.web167.js +127 -8
- package/dist/web/index.web168.js +102 -40
- package/dist/web/index.web169.js +6 -7
- package/dist/web/index.web170.js +3 -21
- package/dist/web/index.web171.js +79 -2
- package/dist/web/index.web172.js +2 -2
- package/dist/web/index.web173.js +2 -14
- package/dist/web/index.web174.js +33 -51
- package/dist/web/index.web175.js +6 -6
- package/dist/web/index.web176.js +32 -19
- package/dist/web/index.web177.js +14 -17
- package/dist/web/index.web178.js +30 -41
- package/dist/web/index.web179.js +18 -3
- package/dist/web/index.web180.js +8 -3
- package/dist/web/index.web181.js +9 -33
- package/dist/web/index.web182.js +11 -12
- package/dist/web/index.web183.js +13 -4
- package/dist/web/index.web184.js +5 -28
- package/dist/web/index.web185.js +5 -7
- package/dist/web/index.web186.js +10 -32
- package/dist/web/index.web187.js +2 -13
- package/dist/web/index.web188.js +2 -56
- package/dist/web/index.web189.js +14 -42
- package/dist/web/index.web190.js +27 -126
- package/dist/web/index.web191.js +7 -104
- package/dist/web/index.web192.js +3 -6
- package/dist/web/index.web193.js +29 -3
- package/dist/web/index.web194.js +8 -78
- package/dist/web/index.web195.js +8 -2
- package/dist/web/index.web196.js +81 -2
- package/dist/web/index.web197.js +26 -35
- package/dist/web/index.web198.js +3 -6
- package/dist/web/index.web199.js +15 -34
- package/dist/web/index.web200.js +4 -14
- package/dist/web/index.web201.js +14 -34
- package/dist/web/index.web202.js +18 -17
- package/dist/web/index.web203.js +61 -8
- package/dist/web/index.web204.js +17 -10
- package/dist/web/index.web205.js +23 -11
- package/dist/web/index.web206.js +8 -13
- package/dist/web/index.web207.js +42 -5
- package/dist/web/index.web208.js +8 -5
- package/dist/web/index.web209.js +20 -10
- package/dist/web/index.web21.js +16 -5
- package/dist/web/index.web210.js +104 -2
- package/dist/web/index.web211.js +77 -107
- package/dist/web/index.web212.js +79 -2
- package/dist/web/index.web213.js +1 -1
- package/dist/web/index.web217.js +1 -1
- package/dist/web/index.web219.js +106 -101
- package/dist/web/index.web220.js +2 -79
- package/dist/web/index.web221.js +2 -79
- package/dist/web/index.web222.js +20 -7
- package/dist/web/index.web223.js +2 -2
- package/dist/web/index.web224.js +19 -360
- package/dist/web/index.web225.js +32 -852
- package/dist/web/index.web226.js +6 -38
- package/dist/web/index.web227.js +39 -2
- package/dist/web/index.web228.js +2 -70
- package/dist/web/index.web229.js +66 -31
- package/dist/web/index.web230.js +33 -13
- package/dist/web/index.web231.js +12 -18
- package/dist/web/index.web232.js +8 -2
- package/dist/web/index.web233.js +2 -20
- package/dist/web/index.web234.js +356 -28
- package/dist/web/index.web235.js +852 -6
- package/dist/web/index.web236.js +1 -1
- package/dist/web/index.web239.js +1 -1
- package/dist/web/index.web244.js +1 -1
- package/dist/web/index.web245.js +1 -1
- package/dist/web/index.web246.js +2 -2
- package/dist/web/index.web247.js +2 -2
- package/dist/web/index.web248.js +2 -2
- package/dist/web/index.web3.js +1 -1
- package/dist/web/index.web64.js +24 -22
- package/dist/web/index.web65.js +13 -17
- package/dist/web/index.web8.js +26 -12
- package/dist/web/index.web9.js +1 -1
- package/dist/web-types/actions/createBitcoinAccount.d.ts +5 -2
- package/dist/web-types/actions/getCurrentUser.d.ts +18 -1
- package/dist/web-types/actions/signBitcoinHash.d.ts +7 -5
- package/dist/web-types/core.d.ts +1 -1
- package/dist/web-types/platform/types.d.ts +25 -0
- package/dist/web-types/types.d.ts +2 -2
- package/dist/web-types/version.d.ts +1 -1
- package/package.json +2 -2
|
@@ -8,15 +8,28 @@ const n = {
|
|
|
8
8
|
* @returns Promise that resolves to the stored value or null if not found.
|
|
9
9
|
*/
|
|
10
10
|
async getItem(t) {
|
|
11
|
+
return (await this.getItemWithOutcome(t)).value;
|
|
12
|
+
},
|
|
13
|
+
/**
|
|
14
|
+
* Retrieves a value from secure storage with read outcome metadata.
|
|
15
|
+
*
|
|
16
|
+
* @param key - The storage key.
|
|
17
|
+
* @returns Promise that resolves to the stored value and read outcome.
|
|
18
|
+
*/
|
|
19
|
+
async getItemWithOutcome(t) {
|
|
11
20
|
try {
|
|
12
|
-
const { getItemAsync: e } = await import("expo-secure-store");
|
|
13
|
-
return
|
|
21
|
+
const { getItemAsync: e } = await import("expo-secure-store"), r = await e(t);
|
|
22
|
+
return r === null ? { value: null, outcome: "not_found" } : { value: r, outcome: "found" };
|
|
14
23
|
} catch (e) {
|
|
15
24
|
if (e instanceof Error && e.message.includes("Cannot resolve module"))
|
|
16
25
|
throw new Error(
|
|
17
26
|
"SecureStore is not available. Please install expo-secure-store and ensure it's properly configured in your React Native project."
|
|
18
27
|
);
|
|
19
|
-
return console.warn(`Failed to get item from SecureStore: ${e}`),
|
|
28
|
+
return console.warn(`Failed to get item from SecureStore: ${e}`), {
|
|
29
|
+
value: null,
|
|
30
|
+
outcome: "error",
|
|
31
|
+
errorMessage: e instanceof Error ? e.message : String(e)
|
|
32
|
+
};
|
|
20
33
|
}
|
|
21
34
|
},
|
|
22
35
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createSolanaKeyExportIframe as t, createEvmKeyExportIframe as m } from "./index.
|
|
1
|
+
import { createSolanaKeyExportIframe as t, createEvmKeyExportIframe as m } from "./index.native133.js";
|
|
2
2
|
import { signBitcoinHash as i } from "./index.native67.js";
|
|
3
3
|
import "@coinbase/cdp-api-client";
|
|
4
4
|
import "./index.native2.js";
|
|
@@ -8,15 +8,28 @@ const n = {
|
|
|
8
8
|
* @returns Promise that resolves to the value.
|
|
9
9
|
*/
|
|
10
10
|
async getItem(t) {
|
|
11
|
+
return (await this.getItemWithOutcome(t)).value;
|
|
12
|
+
},
|
|
13
|
+
/**
|
|
14
|
+
* Retrieves a value from AsyncStorage with read outcome metadata.
|
|
15
|
+
*
|
|
16
|
+
* @param key - The storage key.
|
|
17
|
+
* @returns Promise that resolves to the stored value and read outcome.
|
|
18
|
+
*/
|
|
19
|
+
async getItemWithOutcome(t) {
|
|
11
20
|
try {
|
|
12
|
-
const { default: e } = await import("@react-native-async-storage/async-storage");
|
|
13
|
-
return
|
|
21
|
+
const { default: e } = await import("@react-native-async-storage/async-storage"), r = await e.getItem(t);
|
|
22
|
+
return r === null ? { value: null, outcome: "not_found" } : { value: r, outcome: "found" };
|
|
14
23
|
} catch (e) {
|
|
15
24
|
if (e instanceof Error && e.message.includes("Cannot resolve module"))
|
|
16
25
|
throw new Error(
|
|
17
26
|
"AsyncStorage is not available. Please install @react-native-async-storage/async-storage and ensure it's properly linked in your React Native project."
|
|
18
27
|
);
|
|
19
|
-
return console.warn(`Failed to get item from AsyncStorage: ${e}`),
|
|
28
|
+
return console.warn(`Failed to get item from AsyncStorage: ${e}`), {
|
|
29
|
+
value: null,
|
|
30
|
+
outcome: "error",
|
|
31
|
+
errorMessage: e instanceof Error ? e.message : String(e)
|
|
32
|
+
};
|
|
20
33
|
}
|
|
21
34
|
},
|
|
22
35
|
/**
|
|
@@ -27,12 +40,12 @@ const n = {
|
|
|
27
40
|
*/
|
|
28
41
|
async setItem(t, e) {
|
|
29
42
|
try {
|
|
30
|
-
const { default:
|
|
31
|
-
await
|
|
32
|
-
} catch (
|
|
33
|
-
throw
|
|
43
|
+
const { default: r } = await import("@react-native-async-storage/async-storage");
|
|
44
|
+
await r.setItem(t, e);
|
|
45
|
+
} catch (r) {
|
|
46
|
+
throw r instanceof Error && r.message.includes("Cannot resolve module") ? new Error(
|
|
34
47
|
"AsyncStorage is not available. Please install @react-native-async-storage/async-storage and ensure it's properly linked in your React Native project."
|
|
35
|
-
) : (console.warn(`Failed to set item in AsyncStorage: ${
|
|
48
|
+
) : (console.warn(`Failed to set item in AsyncStorage: ${r}`), r);
|
|
36
49
|
}
|
|
37
50
|
},
|
|
38
51
|
/**
|
|
@@ -11,9 +11,12 @@ export type CreateBitcoinAccountOptions = {
|
|
|
11
11
|
idempotencyKey?: string;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
|
-
* The result of creating a Bitcoin HD account.
|
|
14
|
+
* The result of creating a Bitcoin HD account. The extended public key (xpub) is always present,
|
|
15
|
+
* since the create response includes it and the caller needs it to derive child addresses.
|
|
15
16
|
*/
|
|
16
|
-
export type CreateBitcoinAccountResult = EndUserBtcAccount
|
|
17
|
+
export type CreateBitcoinAccountResult = EndUserBtcAccount & {
|
|
18
|
+
xpub: string;
|
|
19
|
+
};
|
|
17
20
|
/**
|
|
18
21
|
* Creates a Bitcoin HD (Hierarchical Deterministic) account for the current user.
|
|
19
22
|
* The account uses BIP-84 derivation (segwit) and returns an extended public key (xpub)
|
|
@@ -1,11 +1,28 @@
|
|
|
1
1
|
import { User } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Options for getting the current user.
|
|
4
|
+
*/
|
|
5
|
+
export type GetCurrentUserOptions = {
|
|
6
|
+
/**
|
|
7
|
+
* When true, re-fetches the user from the API with each Bitcoin account's raw extended public
|
|
8
|
+
* key (xpub) included in `btcAccountObjects`. By default the xpubs are omitted (hash-only), so
|
|
9
|
+
* request this when you need to derive child addresses. Ignored if no user is signed in.
|
|
10
|
+
*/
|
|
11
|
+
includeBtcXpubs?: boolean;
|
|
12
|
+
};
|
|
2
13
|
/**
|
|
3
14
|
* Gets the currently signed-in user, if any.
|
|
4
15
|
*
|
|
5
16
|
* @example
|
|
6
17
|
* ```typescript lines
|
|
7
18
|
* const user = await getCurrentUser();
|
|
19
|
+
*
|
|
20
|
+
* // Include Bitcoin xpubs so addresses can be derived:
|
|
21
|
+
* const userWithXpubs = await getCurrentUser({ includeBtcXpubs: true });
|
|
8
22
|
* ```
|
|
23
|
+
* @param options - Optional settings controlling what is returned.
|
|
9
24
|
* @returns The currently signed-in user, or null if no user is signed in.
|
|
25
|
+
* @throws When `includeBtcXpubs` is true and the network request to re-fetch the user fails.
|
|
26
|
+
* The default (cached) read never throws.
|
|
10
27
|
*/
|
|
11
|
-
export declare const getCurrentUser: () => Promise<User | null>;
|
|
28
|
+
export declare const getCurrentUser: (options?: GetCurrentUserOptions) => Promise<User | null>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SignBtcHashWithEndUserAccountBodyChange } from '@coinbase/cdp-api-client';
|
|
2
2
|
/**
|
|
3
3
|
* Options for signing a Bitcoin sighash.
|
|
4
4
|
*/
|
|
5
5
|
export type SignBitcoinHashOptions = {
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Selects which Bitcoin account to sign with, as the `xpubHash` from the account's entry in
|
|
8
|
+
* `btcAccountObjects`. Resolved server-side against the user's own accounts; an unmatched hash
|
|
9
|
+
* fails with a not-found error (there is no fallback to a default account).
|
|
10
|
+
*/
|
|
11
|
+
xpubHash: string;
|
|
10
12
|
/** BIP-32 change level: 0 for external (receive) addresses, 1 for internal (change) addresses. */
|
|
11
13
|
change: SignBtcHashWithEndUserAccountBodyChange;
|
|
12
14
|
/** BIP-32 address index — must match the index used to derive the address controlling the UTXO. */
|
|
@@ -9,7 +9,7 @@ export { verifyOAuth } from './actions/verifyOAuth.js';
|
|
|
9
9
|
export { verifySiweSignature, type VerifySiweSignatureOptions, type VerifySiweSignatureResult, } from './actions/verifySiweSignature.js';
|
|
10
10
|
export { verifyTelegramOAuth } from './actions/verifyTelegramOAuth.js';
|
|
11
11
|
export { authenticateWithJWT } from './actions/authenticateWithJWT.js';
|
|
12
|
-
export { getCurrentUser } from './actions/getCurrentUser.js';
|
|
12
|
+
export { getCurrentUser, type GetCurrentUserOptions } from './actions/getCurrentUser.js';
|
|
13
13
|
export { isSignedIn } from './actions/isSignedIn.js';
|
|
14
14
|
export { signOut } from './actions/signOut.js';
|
|
15
15
|
export { getAccessToken } from './actions/getAccessToken.js';
|
|
@@ -58,6 +58,13 @@ export interface PlatformStorage {
|
|
|
58
58
|
* @returns Promise that resolves to the stored value or null if not found.
|
|
59
59
|
*/
|
|
60
60
|
getItem(key: string): Promise<string | null>;
|
|
61
|
+
/**
|
|
62
|
+
* Retrieves a value from storage with read outcome metadata.
|
|
63
|
+
*
|
|
64
|
+
* @param key - The storage key.
|
|
65
|
+
* @returns Promise that resolves to the stored value and read outcome.
|
|
66
|
+
*/
|
|
67
|
+
getItemWithOutcome(key: string): Promise<StorageReadResult>;
|
|
61
68
|
/**
|
|
62
69
|
* Stores a value in storage.
|
|
63
70
|
*
|
|
@@ -94,6 +101,13 @@ export interface PlatformSecureStorage {
|
|
|
94
101
|
* @returns Promise that resolves to the stored value or null if not found.
|
|
95
102
|
*/
|
|
96
103
|
getItem(key: string): Promise<string | null>;
|
|
104
|
+
/**
|
|
105
|
+
* Retrieves a value from secure storage with read outcome metadata.
|
|
106
|
+
*
|
|
107
|
+
* @param key - The storage key.
|
|
108
|
+
* @returns Promise that resolves to the stored value and read outcome.
|
|
109
|
+
*/
|
|
110
|
+
getItemWithOutcome(key: string): Promise<StorageReadResult>;
|
|
97
111
|
/**
|
|
98
112
|
* Stores a value in secure storage.
|
|
99
113
|
*
|
|
@@ -116,6 +130,17 @@ export interface PlatformSecureStorage {
|
|
|
116
130
|
*/
|
|
117
131
|
clear(): Promise<void>;
|
|
118
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* Result of reading a value from storage.
|
|
135
|
+
*/
|
|
136
|
+
export interface StorageReadResult {
|
|
137
|
+
/** The stored value, or null if not found or on error. */
|
|
138
|
+
value: string | null;
|
|
139
|
+
/** The outcome of the read: found, not found, or error. */
|
|
140
|
+
outcome: "found" | "not_found" | "error";
|
|
141
|
+
/** The error message when the read failed. */
|
|
142
|
+
errorMessage?: string;
|
|
143
|
+
}
|
|
119
144
|
/**
|
|
120
145
|
* Credential returned by a native Apple Sign In flow.
|
|
121
146
|
*/
|
|
@@ -23,7 +23,7 @@ type MFAMethods,
|
|
|
23
23
|
type EndUserEvmAccount,
|
|
24
24
|
/** Solana account object with address and createdAt */
|
|
25
25
|
type EndUserSolanaAccount,
|
|
26
|
-
/** Bitcoin HD account object with
|
|
26
|
+
/** Bitcoin HD account object with xpubHash, network, addressType, and optional xpub */
|
|
27
27
|
type EndUserBtcAccount,
|
|
28
28
|
/** Bitcoin network for account creation */
|
|
29
29
|
type CreateEndUserBtcAccountBodyNetwork,
|
|
@@ -203,7 +203,7 @@ export type User = {
|
|
|
203
203
|
evmSmartAccountObjects?: EndUserEvmSmartAccount[];
|
|
204
204
|
/** The Solana account objects associated with the user. Users can have up to 10 Solana accounts. */
|
|
205
205
|
solanaAccountObjects?: EndUserSolanaAccount[];
|
|
206
|
-
/** The Bitcoin HD account objects associated with the user.
|
|
206
|
+
/** The Bitcoin HD account objects associated with the user. Up to 10 per user. */
|
|
207
207
|
btcAccountObjects?: EndUserBtcAccount[];
|
|
208
208
|
/** The MFA methods enrolled for the user. */
|
|
209
209
|
mfaMethods?: MFAMethods;
|
|
@@ -11,9 +11,12 @@ export type CreateBitcoinAccountOptions = {
|
|
|
11
11
|
idempotencyKey?: string;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
|
-
* The result of creating a Bitcoin HD account.
|
|
14
|
+
* The result of creating a Bitcoin HD account. The extended public key (xpub) is always present,
|
|
15
|
+
* since the create response includes it and the caller needs it to derive child addresses.
|
|
15
16
|
*/
|
|
16
|
-
export type CreateBitcoinAccountResult = EndUserBtcAccount
|
|
17
|
+
export type CreateBitcoinAccountResult = EndUserBtcAccount & {
|
|
18
|
+
xpub: string;
|
|
19
|
+
};
|
|
17
20
|
/**
|
|
18
21
|
* Creates a Bitcoin HD (Hierarchical Deterministic) account for the current user.
|
|
19
22
|
* The account uses BIP-84 derivation (segwit) and returns an extended public key (xpub)
|
|
@@ -1,11 +1,28 @@
|
|
|
1
1
|
import { User } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Options for getting the current user.
|
|
4
|
+
*/
|
|
5
|
+
export type GetCurrentUserOptions = {
|
|
6
|
+
/**
|
|
7
|
+
* When true, re-fetches the user from the API with each Bitcoin account's raw extended public
|
|
8
|
+
* key (xpub) included in `btcAccountObjects`. By default the xpubs are omitted (hash-only), so
|
|
9
|
+
* request this when you need to derive child addresses. Ignored if no user is signed in.
|
|
10
|
+
*/
|
|
11
|
+
includeBtcXpubs?: boolean;
|
|
12
|
+
};
|
|
2
13
|
/**
|
|
3
14
|
* Gets the currently signed-in user, if any.
|
|
4
15
|
*
|
|
5
16
|
* @example
|
|
6
17
|
* ```typescript lines
|
|
7
18
|
* const user = await getCurrentUser();
|
|
19
|
+
*
|
|
20
|
+
* // Include Bitcoin xpubs so addresses can be derived:
|
|
21
|
+
* const userWithXpubs = await getCurrentUser({ includeBtcXpubs: true });
|
|
8
22
|
* ```
|
|
23
|
+
* @param options - Optional settings controlling what is returned.
|
|
9
24
|
* @returns The currently signed-in user, or null if no user is signed in.
|
|
25
|
+
* @throws When `includeBtcXpubs` is true and the network request to re-fetch the user fails.
|
|
26
|
+
* The default (cached) read never throws.
|
|
10
27
|
*/
|
|
11
|
-
export declare const getCurrentUser: () => Promise<User | null>;
|
|
28
|
+
export declare const getCurrentUser: (options?: GetCurrentUserOptions) => Promise<User | null>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SignBtcHashWithEndUserAccountBodyChange } from '@coinbase/cdp-api-client';
|
|
2
2
|
/**
|
|
3
3
|
* Options for signing a Bitcoin sighash.
|
|
4
4
|
*/
|
|
5
5
|
export type SignBitcoinHashOptions = {
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Selects which Bitcoin account to sign with, as the `xpubHash` from the account's entry in
|
|
8
|
+
* `btcAccountObjects`. Resolved server-side against the user's own accounts; an unmatched hash
|
|
9
|
+
* fails with a not-found error (there is no fallback to a default account).
|
|
10
|
+
*/
|
|
11
|
+
xpubHash: string;
|
|
10
12
|
/** BIP-32 change level: 0 for external (receive) addresses, 1 for internal (change) addresses. */
|
|
11
13
|
change: SignBtcHashWithEndUserAccountBodyChange;
|
|
12
14
|
/** BIP-32 address index — must match the index used to derive the address controlling the UTXO. */
|
package/dist/types/core.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { verifyOAuth } from './actions/verifyOAuth.js';
|
|
|
9
9
|
export { verifySiweSignature, type VerifySiweSignatureOptions, type VerifySiweSignatureResult, } from './actions/verifySiweSignature.js';
|
|
10
10
|
export { verifyTelegramOAuth } from './actions/verifyTelegramOAuth.js';
|
|
11
11
|
export { authenticateWithJWT } from './actions/authenticateWithJWT.js';
|
|
12
|
-
export { getCurrentUser } from './actions/getCurrentUser.js';
|
|
12
|
+
export { getCurrentUser, type GetCurrentUserOptions } from './actions/getCurrentUser.js';
|
|
13
13
|
export { isSignedIn } from './actions/isSignedIn.js';
|
|
14
14
|
export { signOut } from './actions/signOut.js';
|
|
15
15
|
export { getAccessToken } from './actions/getAccessToken.js';
|
|
@@ -58,6 +58,13 @@ export interface PlatformStorage {
|
|
|
58
58
|
* @returns Promise that resolves to the stored value or null if not found.
|
|
59
59
|
*/
|
|
60
60
|
getItem(key: string): Promise<string | null>;
|
|
61
|
+
/**
|
|
62
|
+
* Retrieves a value from storage with read outcome metadata.
|
|
63
|
+
*
|
|
64
|
+
* @param key - The storage key.
|
|
65
|
+
* @returns Promise that resolves to the stored value and read outcome.
|
|
66
|
+
*/
|
|
67
|
+
getItemWithOutcome(key: string): Promise<StorageReadResult>;
|
|
61
68
|
/**
|
|
62
69
|
* Stores a value in storage.
|
|
63
70
|
*
|
|
@@ -94,6 +101,13 @@ export interface PlatformSecureStorage {
|
|
|
94
101
|
* @returns Promise that resolves to the stored value or null if not found.
|
|
95
102
|
*/
|
|
96
103
|
getItem(key: string): Promise<string | null>;
|
|
104
|
+
/**
|
|
105
|
+
* Retrieves a value from secure storage with read outcome metadata.
|
|
106
|
+
*
|
|
107
|
+
* @param key - The storage key.
|
|
108
|
+
* @returns Promise that resolves to the stored value and read outcome.
|
|
109
|
+
*/
|
|
110
|
+
getItemWithOutcome(key: string): Promise<StorageReadResult>;
|
|
97
111
|
/**
|
|
98
112
|
* Stores a value in secure storage.
|
|
99
113
|
*
|
|
@@ -116,6 +130,17 @@ export interface PlatformSecureStorage {
|
|
|
116
130
|
*/
|
|
117
131
|
clear(): Promise<void>;
|
|
118
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* Result of reading a value from storage.
|
|
135
|
+
*/
|
|
136
|
+
export interface StorageReadResult {
|
|
137
|
+
/** The stored value, or null if not found or on error. */
|
|
138
|
+
value: string | null;
|
|
139
|
+
/** The outcome of the read: found, not found, or error. */
|
|
140
|
+
outcome: "found" | "not_found" | "error";
|
|
141
|
+
/** The error message when the read failed. */
|
|
142
|
+
errorMessage?: string;
|
|
143
|
+
}
|
|
119
144
|
/**
|
|
120
145
|
* Credential returned by a native Apple Sign In flow.
|
|
121
146
|
*/
|
package/dist/types/types.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ type MFAMethods,
|
|
|
23
23
|
type EndUserEvmAccount,
|
|
24
24
|
/** Solana account object with address and createdAt */
|
|
25
25
|
type EndUserSolanaAccount,
|
|
26
|
-
/** Bitcoin HD account object with
|
|
26
|
+
/** Bitcoin HD account object with xpubHash, network, addressType, and optional xpub */
|
|
27
27
|
type EndUserBtcAccount,
|
|
28
28
|
/** Bitcoin network for account creation */
|
|
29
29
|
type CreateEndUserBtcAccountBodyNetwork,
|
|
@@ -203,7 +203,7 @@ export type User = {
|
|
|
203
203
|
evmSmartAccountObjects?: EndUserEvmSmartAccount[];
|
|
204
204
|
/** The Solana account objects associated with the user. Users can have up to 10 Solana accounts. */
|
|
205
205
|
solanaAccountObjects?: EndUserSolanaAccount[];
|
|
206
|
-
/** The Bitcoin HD account objects associated with the user.
|
|
206
|
+
/** The Bitcoin HD account objects associated with the user. Up to 10 per user. */
|
|
207
207
|
btcAccountObjects?: EndUserBtcAccount[];
|
|
208
208
|
/** The MFA methods enrolled for the user. */
|
|
209
209
|
mfaMethods?: MFAMethods;
|
package/dist/types/version.d.ts
CHANGED
package/dist/web/index.web10.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { configureCdpApiClient as j, setAuthManager as
|
|
2
|
-
import { Analytics as
|
|
1
|
+
import { configureCdpApiClient as j, setAuthManager as v, getMfaConfig as C, APIError as g, getProjectConfig as S } from "@coinbase/cdp-api-client";
|
|
2
|
+
import { Analytics as c } from "./index.web2.js";
|
|
3
3
|
import "./index.web3.js";
|
|
4
|
-
import { createAuthManager as
|
|
5
|
-
import { OAuthManager as
|
|
6
|
-
import { MockAuthManager as
|
|
4
|
+
import { createAuthManager as y } from "./index.web115.js";
|
|
5
|
+
import { OAuthManager as M } from "./index.web116.js";
|
|
6
|
+
import { MockAuthManager as w } from "./index.web117.js";
|
|
7
7
|
import { MockOAuthManager as P } from "./index.web118.js";
|
|
8
8
|
import { getPlatformServices as m } from "./index.web5.js";
|
|
9
|
-
import { getConfig as
|
|
9
|
+
import { getConfig as i, setCoreAuthManager as h, setCoreOAuthManager as I, setMfaConfig as A, setProjectConfig as k, getCoreAuthManager as _, setConfig as O } from "./index.web74.js";
|
|
10
10
|
import "viem";
|
|
11
11
|
const x = async (t) => {
|
|
12
12
|
if (!t.projectId)
|
|
13
13
|
throw new Error("Project ID is required");
|
|
14
|
-
t.disableAnalytics === void 0 || t.disableAnalytics === !1 ? (
|
|
15
|
-
let
|
|
14
|
+
t.disableAnalytics === void 0 || t.disableAnalytics === !1 ? (c.developerIdentifier = t.projectId, c.isUsingMocks = t.useMock === !0, c.isProduction = !t.basePath || t.basePath === "https://api.cdp.coinbase.com/platform") : c.enabled = !1;
|
|
15
|
+
let a;
|
|
16
16
|
try {
|
|
17
|
-
|
|
17
|
+
a = i().projectId !== t.projectId;
|
|
18
18
|
} catch {
|
|
19
|
-
|
|
19
|
+
a = !0;
|
|
20
20
|
}
|
|
21
|
-
if (
|
|
22
|
-
h(new
|
|
23
|
-
projectId:
|
|
21
|
+
if (O(t), i().useMock) {
|
|
22
|
+
h(new w(i().projectId)), I(new P()), A({
|
|
23
|
+
projectId: i().projectId,
|
|
24
24
|
enabled: !1,
|
|
25
25
|
totpConfig: { enabled: !1 },
|
|
26
26
|
smsConfig: { enabled: !1 },
|
|
@@ -29,57 +29,59 @@ const x = async (t) => {
|
|
|
29
29
|
requireVerificationOnLogin: !1,
|
|
30
30
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
31
31
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
32
|
-
}),
|
|
33
|
-
projectId:
|
|
32
|
+
}), k({
|
|
33
|
+
projectId: i().projectId,
|
|
34
34
|
name: "Mock Project",
|
|
35
35
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
36
36
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
37
37
|
});
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
40
|
-
let
|
|
40
|
+
let o, s = !1;
|
|
41
41
|
try {
|
|
42
42
|
const e = m();
|
|
43
|
-
e.secureStorage ? (
|
|
43
|
+
e.secureStorage ? (s = !0, o = {
|
|
44
44
|
getRefreshToken: () => e.secureStorage.getItem("cdp_refresh_token"),
|
|
45
|
-
|
|
45
|
+
getRefreshTokenWithOutcome: () => b(e.secureStorage),
|
|
46
|
+
setRefreshToken: (n) => e.secureStorage.setItem("cdp_refresh_token", n),
|
|
46
47
|
removeRefreshToken: () => e.secureStorage.removeItem("cdp_refresh_token")
|
|
47
|
-
}) :
|
|
48
|
+
}) : o = {
|
|
48
49
|
getRefreshToken: () => e.storage.getItem("cdp_refresh_token"),
|
|
49
|
-
|
|
50
|
+
getRefreshTokenWithOutcome: () => b(e.storage),
|
|
51
|
+
setRefreshToken: (n) => e.storage.setItem("cdp_refresh_token", n),
|
|
50
52
|
removeRefreshToken: () => e.storage.removeItem("cdp_refresh_token")
|
|
51
53
|
};
|
|
52
54
|
} catch {
|
|
53
|
-
|
|
55
|
+
c.sendSessionRefreshEvent({
|
|
54
56
|
name: "refresh_token_storage_not_initialized"
|
|
55
|
-
}),
|
|
57
|
+
}), o = void 0;
|
|
56
58
|
}
|
|
57
|
-
let r,
|
|
59
|
+
let r, d, p;
|
|
58
60
|
try {
|
|
59
61
|
const e = m();
|
|
60
|
-
|
|
62
|
+
p = e.deviceInfo?.getPlatform?.(), e.attestation && (r = e.attestation, d = e.deviceInfo?.getAppBundleId?.());
|
|
61
63
|
} catch {
|
|
62
64
|
r = void 0;
|
|
63
65
|
}
|
|
64
66
|
if (j({
|
|
65
|
-
debugging:
|
|
66
|
-
basePath:
|
|
67
|
-
refreshTokenStorage:
|
|
68
|
-
retryTokenReads:
|
|
69
|
-
platform:
|
|
67
|
+
debugging: i().debugging,
|
|
68
|
+
basePath: i().basePath,
|
|
69
|
+
refreshTokenStorage: o,
|
|
70
|
+
retryTokenReads: s,
|
|
71
|
+
platform: p,
|
|
70
72
|
appAttestation: r && {
|
|
71
73
|
isEnabled: () => r.isEnabled,
|
|
72
|
-
appIdentifier:
|
|
74
|
+
appIdentifier: d,
|
|
73
75
|
generateAssertion: r.generateAssertion.bind(r)
|
|
74
76
|
}
|
|
75
|
-
}),
|
|
76
|
-
const e = new
|
|
77
|
+
}), a) {
|
|
78
|
+
const e = new M();
|
|
77
79
|
I(e);
|
|
78
|
-
const
|
|
79
|
-
h(
|
|
80
|
+
const n = y(i().projectId);
|
|
81
|
+
h(n), v(n);
|
|
80
82
|
}
|
|
81
83
|
const [, f, l] = await Promise.allSettled([
|
|
82
|
-
|
|
84
|
+
_().ensureInitialized(),
|
|
83
85
|
(async () => {
|
|
84
86
|
try {
|
|
85
87
|
return await C(t.projectId);
|
|
@@ -89,7 +91,7 @@ const x = async (t) => {
|
|
|
89
91
|
})(),
|
|
90
92
|
(async () => {
|
|
91
93
|
try {
|
|
92
|
-
return await
|
|
94
|
+
return await S(t.projectId);
|
|
93
95
|
} catch (e) {
|
|
94
96
|
return (!(e instanceof g) || e.statusCode !== 404) && console.warn("Failed to get project config", e), null;
|
|
95
97
|
}
|
|
@@ -97,21 +99,24 @@ const x = async (t) => {
|
|
|
97
99
|
]);
|
|
98
100
|
if (f.status === "fulfilled" && f.value && A(f.value), l.status === "fulfilled" && l.value) {
|
|
99
101
|
const e = l.value;
|
|
100
|
-
if (
|
|
101
|
-
const
|
|
102
|
-
|
|
102
|
+
if (k(e), e.appAttestation && r && d) {
|
|
103
|
+
const n = R(e.appAttestation, d);
|
|
104
|
+
n !== null && (console.warn(
|
|
103
105
|
"[Attestation] Project config has attestation enabled for this app, but no attestation provider is registered. Install @coinbase/cdp-app-attest and add `import '@coinbase/cdp-app-attest'` to your app's entry point."
|
|
104
|
-
), r.isEnabled = !0, r.cloudProjectNumber =
|
|
106
|
+
), r.isEnabled = !0, r.cloudProjectNumber = n.cloudProjectNumber, r.initialize().catch((u) => {
|
|
105
107
|
console.error(
|
|
106
108
|
"[Attestation] Background initialization failed:",
|
|
107
|
-
|
|
109
|
+
u instanceof Error ? u.message : String(u)
|
|
108
110
|
);
|
|
109
111
|
}));
|
|
110
112
|
}
|
|
111
113
|
}
|
|
112
|
-
},
|
|
113
|
-
const a = t.
|
|
114
|
-
return
|
|
114
|
+
}, b = async (t) => {
|
|
115
|
+
const { value: a, outcome: o, errorMessage: s } = await t.getItemWithOutcome("cdp_refresh_token");
|
|
116
|
+
return { token: a, outcome: o, errorMessage: s };
|
|
117
|
+
}, R = (t, a) => {
|
|
118
|
+
const o = t.android?.find((r) => r.identifier === a);
|
|
119
|
+
return o ? { cloudProjectNumber: o.googleProjectNumber } : t.ios?.find((r) => r.identifier === a) ? {} : null;
|
|
115
120
|
};
|
|
116
121
|
export {
|
|
117
122
|
x as initialize
|
package/dist/web/index.web107.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CompactSign as i } from "./index.
|
|
2
|
-
import { JWTInvalid as r } from "./index.
|
|
3
|
-
import { JWTClaimsBuilder as n } from "./index.
|
|
1
|
+
import { CompactSign as i } from "./index.web127.js";
|
|
2
|
+
import { JWTInvalid as r } from "./index.web128.js";
|
|
3
|
+
import { JWTClaimsBuilder as n } from "./index.web129.js";
|
|
4
4
|
class d {
|
|
5
5
|
#s;
|
|
6
6
|
#t;
|
package/dist/web/index.web110.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InvalidAddressError as s } from "./index.
|
|
2
|
-
import { isAddress as a } from "./index.
|
|
1
|
+
import { InvalidAddressError as s } from "./index.web140.js";
|
|
2
|
+
import { isAddress as a } from "./index.web141.js";
|
|
3
3
|
function r(n) {
|
|
4
4
|
if (typeof n == "string") {
|
|
5
5
|
if (!a(n, { strict: !1 }))
|
package/dist/web/index.web114.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DisconnectedError as l, from as d } from "./index.
|
|
1
|
+
import { DisconnectedError as l, from as d } from "./index.web130.js";
|
|
2
2
|
import { validateRequest as h, EIP1193ProviderError as m, STANDARD_ERROR_CODES as _ } from "./index.web91.js";
|
|
3
|
-
import { createEOAHandlers as p } from "./index.
|
|
4
|
-
import { createSmartAccountHandlers as g } from "./index.
|
|
3
|
+
import { createEOAHandlers as p } from "./index.web134.js";
|
|
4
|
+
import { createSmartAccountHandlers as g } from "./index.web135.js";
|
|
5
5
|
import "viem";
|
|
6
6
|
import "zustand";
|
|
7
7
|
import "@coinbase/cdp-api-client";
|
package/dist/web/index.web126.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { serializeAuthorizationList as v } from "./index.
|
|
2
|
-
import { blobsToCommitments as H } from "./index.
|
|
3
|
-
import { blobsToProofs as V } from "./index.
|
|
4
|
-
import { commitmentsToVersionedHashes as k } from "./index.
|
|
5
|
-
import { toBlobSidecars as B } from "./index.
|
|
6
|
-
import { concatHex as T } from "./index.
|
|
7
|
-
import { trim as F } from "./index.
|
|
8
|
-
import { numberToHex as s, bytesToHex as S } from "./index.
|
|
9
|
-
import { toRlp as b } from "./index.
|
|
10
|
-
import { assertTransactionEIP1559 as _, assertTransactionEIP2930 as C, assertTransactionEIP4844 as R, assertTransactionEIP7702 as Y, assertTransactionLegacy as j } from "./index.
|
|
11
|
-
import { getTransactionType as q } from "./index.
|
|
12
|
-
import { serializeAccessList as h } from "./index.
|
|
1
|
+
import { serializeAuthorizationList as v } from "./index.web154.js";
|
|
2
|
+
import { blobsToCommitments as H } from "./index.web180.js";
|
|
3
|
+
import { blobsToProofs as V } from "./index.web181.js";
|
|
4
|
+
import { commitmentsToVersionedHashes as k } from "./index.web182.js";
|
|
5
|
+
import { toBlobSidecars as B } from "./index.web183.js";
|
|
6
|
+
import { concatHex as T } from "./index.web156.js";
|
|
7
|
+
import { trim as F } from "./index.web162.js";
|
|
8
|
+
import { numberToHex as s, bytesToHex as S } from "./index.web155.js";
|
|
9
|
+
import { toRlp as b } from "./index.web166.js";
|
|
10
|
+
import { assertTransactionEIP1559 as _, assertTransactionEIP2930 as C, assertTransactionEIP4844 as R, assertTransactionEIP7702 as Y, assertTransactionLegacy as j } from "./index.web171.js";
|
|
11
|
+
import { getTransactionType as q } from "./index.web177.js";
|
|
12
|
+
import { serializeAccessList as h } from "./index.web179.js";
|
|
13
13
|
function re(e, t) {
|
|
14
14
|
const i = q(e);
|
|
15
15
|
return i === "eip1559" ? J(e, t) : i === "eip2930" ? K(e, t) : i === "eip4844" ? D(e, t) : i === "eip7702" ? w(e, t) : M(e);
|