@coinbase/cdp-api-client 0.0.17 → 0.0.19
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.js +117 -94
- package/dist/esm/index2.js +70 -27
- package/dist/esm/index3.js +235 -148
- package/dist/types/index.d.ts +519 -123
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,98 +1,121 @@
|
|
|
1
|
-
import { createEndUserEvmAccount as r,
|
|
2
|
-
import { AbiFunctionType as
|
|
3
|
-
import { configureCdpApiClient as
|
|
4
|
-
import { APIError as
|
|
1
|
+
import { createEndUserEvmAccount as r, createEndUserEvmSmartAccount as n, exportEndUserEvmAccount as i, getAuthenticatedEndUser as o, getUserOperationWithEndUserAccount as a, initiateAuthentication as s, logOutEndUser as p, refreshAccessToken as c, registerTemporaryWalletSecret as m, sendEvmTransactionWithEndUserAccount as d, sendUserOperationWithEndUserAccount as u, signEvmHashWithEndUserAccount as y, signEvmMessageWithEndUserAccount as l, signEvmTransactionWithEndUserAccount as T, signEvmTypedDataWithEndUserAccount as E, signSolanaHashWithEndUserAccount as S, verifyEmailAuthentication as A, verifySmsAuthentication as v } from "./index2.js";
|
|
2
|
+
import { AbiFunctionType as g, AbiInputType as h, AbiStateMutability as C, DeveloperJWTAuthenticationType as R, EmailAuthenticationType as U, ErrorType as k, EthValueCriterionOperator as P, EthValueCriterionType as N, EvmAddressCriterionOperator as w, EvmAddressCriterionType as f, EvmDataCriterionType as D, EvmDataParameterConditionListOperator as M, EvmDataParameterConditionOperator as I, EvmMessageCriterionType as W, EvmNetworkCriterionNetworksItem as V, EvmNetworkCriterionOperator as X, EvmNetworkCriterionType as x, EvmSwapsNetwork as b, EvmTypedAddressConditionOperator as H, EvmTypedNumericalConditionOperator as q, EvmUserOperationNetwork as B, EvmUserOperationStatus as F, FeeType as L, InitiateEmailAuthenticationNextStepType as K, InitiateEmailAuthenticationRequestType as G, InitiateSmsAuthenticationNextStepType as J, InitiateSmsAuthenticationRequestType as j, KnownAbiType as z, ListEvmTokenBalancesNetwork as Q, ListSolanaTokenBalancesNetwork as Y, MintAddressCriterionOperator as Z, MintAddressCriterionType as _, NetUSDChangeCriterionOperator as $, NetUSDChangeCriterionType as ee, OnchainDataResultSchemaColumnsItemType as te, OnrampOrderFeeType as re, OnrampOrderStatus as ne, OnrampPaymentLinkType as ie, OnrampPaymentMethodTypeId as oe, PaymentMethodType as ae, PaymentRailAction as se, PolicyScope as pe, PrepareUserOperationRuleAction as ce, PrepareUserOperationRuleOperation as me, RefreshAccessTokenBodyGrantType as de, SendEvmTransactionRuleAction as ue, SendEvmTransactionRuleOperation as ye, SendEvmTransactionWithEndUserAccountBodyNetwork as le, SendSolTransactionRuleAction as Te, SendSolTransactionRuleOperation as Ee, SendUserOperationRuleAction as Se, SendUserOperationRuleOperation as Ae, SignEvmHashRuleAction as ve, SignEvmHashRuleOperation as Oe, SignEvmMessageRuleAction as ge, SignEvmMessageRuleOperation as he, SignEvmTransactionRuleAction as Ce, SignEvmTransactionRuleOperation as Re, SignEvmTypedDataFieldCriterionType as Ue, SignEvmTypedDataRuleAction as ke, SignEvmTypedDataRuleOperation as Pe, SignEvmTypedDataVerifyingContractCriterionOperator as Ne, SignEvmTypedDataVerifyingContractCriterionType as we, SignSolMessageRuleAction as fe, SignSolMessageRuleOperation as De, SignSolTransactionRuleAction as Me, SignSolTransactionRuleOperation as Ie, SmsAuthenticationType as We, SolAddressCriterionOperator as Ve, SolAddressCriterionType as Xe, SolMessageCriterionType as xe, SolValueCriterionOperator as be, SolValueCriterionType as He, SplAddressCriterionOperator as qe, SplAddressCriterionType as Be, SplValueCriterionOperator as Fe, SplValueCriterionType as Le, TransferSourceType as Ke, TransferStatus as Ge, TransferTargetType as Je, X402DiscoveryResourceType as je, X402PaymentPayloadNetwork as ze, X402PaymentPayloadScheme as Qe, X402PaymentRequirementsNetwork as Ye, X402PaymentRequirementsScheme as Ze, X402SettleErrorReason as _e, X402SupportedPaymentKindNetwork as $e, X402SupportedPaymentKindScheme as et, X402VerifyInvalidReason as tt, X402Version as rt } from "./index3.js";
|
|
3
|
+
import { configureCdpApiClient as it, setAuthManager as ot } from "./index4.js";
|
|
4
|
+
import { APIError as st, HttpErrorType as pt, UnknownApiError as ct, UnknownError as mt, isOpenAPIError as dt } from "./index5.js";
|
|
5
5
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
6
|
+
st as APIError,
|
|
7
|
+
g as AbiFunctionType,
|
|
8
|
+
h as AbiInputType,
|
|
9
|
+
C as AbiStateMutability,
|
|
10
|
+
R as DeveloperJWTAuthenticationType,
|
|
11
|
+
U as EmailAuthenticationType,
|
|
12
|
+
k as ErrorType,
|
|
13
|
+
P as EthValueCriterionOperator,
|
|
14
|
+
N as EthValueCriterionType,
|
|
15
|
+
w as EvmAddressCriterionOperator,
|
|
16
|
+
f as EvmAddressCriterionType,
|
|
17
|
+
D as EvmDataCriterionType,
|
|
18
|
+
M as EvmDataParameterConditionListOperator,
|
|
19
|
+
I as EvmDataParameterConditionOperator,
|
|
20
|
+
W as EvmMessageCriterionType,
|
|
21
|
+
V as EvmNetworkCriterionNetworksItem,
|
|
22
22
|
X as EvmNetworkCriterionOperator,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
23
|
+
x as EvmNetworkCriterionType,
|
|
24
|
+
b as EvmSwapsNetwork,
|
|
25
|
+
H as EvmTypedAddressConditionOperator,
|
|
26
|
+
q as EvmTypedNumericalConditionOperator,
|
|
27
|
+
B as EvmUserOperationNetwork,
|
|
28
|
+
F as EvmUserOperationStatus,
|
|
29
|
+
L as FeeType,
|
|
30
|
+
pt as HttpErrorType,
|
|
31
|
+
K as InitiateEmailAuthenticationNextStepType,
|
|
32
|
+
G as InitiateEmailAuthenticationRequestType,
|
|
33
|
+
J as InitiateSmsAuthenticationNextStepType,
|
|
34
|
+
j as InitiateSmsAuthenticationRequestType,
|
|
35
|
+
z as KnownAbiType,
|
|
36
|
+
Q as ListEvmTokenBalancesNetwork,
|
|
37
|
+
Y as ListSolanaTokenBalancesNetwork,
|
|
38
|
+
Z as MintAddressCriterionOperator,
|
|
39
|
+
_ as MintAddressCriterionType,
|
|
40
|
+
$ as NetUSDChangeCriterionOperator,
|
|
41
|
+
ee as NetUSDChangeCriterionType,
|
|
42
|
+
te as OnchainDataResultSchemaColumnsItemType,
|
|
43
|
+
re as OnrampOrderFeeType,
|
|
44
|
+
ne as OnrampOrderStatus,
|
|
45
|
+
ie as OnrampPaymentLinkType,
|
|
46
|
+
oe as OnrampPaymentMethodTypeId,
|
|
47
|
+
ae as PaymentMethodType,
|
|
48
|
+
se as PaymentRailAction,
|
|
49
|
+
pe as PolicyScope,
|
|
50
|
+
ce as PrepareUserOperationRuleAction,
|
|
51
|
+
me as PrepareUserOperationRuleOperation,
|
|
52
|
+
de as RefreshAccessTokenBodyGrantType,
|
|
53
|
+
ue as SendEvmTransactionRuleAction,
|
|
54
|
+
ye as SendEvmTransactionRuleOperation,
|
|
55
|
+
le as SendEvmTransactionWithEndUserAccountBodyNetwork,
|
|
56
|
+
Te as SendSolTransactionRuleAction,
|
|
57
|
+
Ee as SendSolTransactionRuleOperation,
|
|
58
|
+
Se as SendUserOperationRuleAction,
|
|
59
|
+
Ae as SendUserOperationRuleOperation,
|
|
60
|
+
ve as SignEvmHashRuleAction,
|
|
61
|
+
Oe as SignEvmHashRuleOperation,
|
|
62
|
+
ge as SignEvmMessageRuleAction,
|
|
63
|
+
he as SignEvmMessageRuleOperation,
|
|
64
|
+
Ce as SignEvmTransactionRuleAction,
|
|
65
|
+
Re as SignEvmTransactionRuleOperation,
|
|
66
|
+
Ue as SignEvmTypedDataFieldCriterionType,
|
|
67
|
+
ke as SignEvmTypedDataRuleAction,
|
|
68
|
+
Pe as SignEvmTypedDataRuleOperation,
|
|
69
|
+
Ne as SignEvmTypedDataVerifyingContractCriterionOperator,
|
|
70
|
+
we as SignEvmTypedDataVerifyingContractCriterionType,
|
|
71
|
+
fe as SignSolMessageRuleAction,
|
|
72
|
+
De as SignSolMessageRuleOperation,
|
|
73
|
+
Me as SignSolTransactionRuleAction,
|
|
74
|
+
Ie as SignSolTransactionRuleOperation,
|
|
75
|
+
We as SmsAuthenticationType,
|
|
76
|
+
Ve as SolAddressCriterionOperator,
|
|
77
|
+
Xe as SolAddressCriterionType,
|
|
78
|
+
xe as SolMessageCriterionType,
|
|
79
|
+
be as SolValueCriterionOperator,
|
|
80
|
+
He as SolValueCriterionType,
|
|
81
|
+
qe as SplAddressCriterionOperator,
|
|
82
|
+
Be as SplAddressCriterionType,
|
|
83
|
+
Fe as SplValueCriterionOperator,
|
|
84
|
+
Le as SplValueCriterionType,
|
|
85
|
+
Ke as TransferSourceType,
|
|
86
|
+
Ge as TransferStatus,
|
|
87
|
+
Je as TransferTargetType,
|
|
88
|
+
ct as UnknownApiError,
|
|
89
|
+
mt as UnknownError,
|
|
90
|
+
je as X402DiscoveryResourceType,
|
|
91
|
+
ze as X402PaymentPayloadNetwork,
|
|
92
|
+
Qe as X402PaymentPayloadScheme,
|
|
93
|
+
Ye as X402PaymentRequirementsNetwork,
|
|
94
|
+
Ze as X402PaymentRequirementsScheme,
|
|
95
|
+
_e as X402SettleErrorReason,
|
|
96
|
+
$e as X402SupportedPaymentKindNetwork,
|
|
97
|
+
et as X402SupportedPaymentKindScheme,
|
|
98
|
+
tt as X402VerifyInvalidReason,
|
|
99
|
+
rt as X402Version,
|
|
100
|
+
it as configureCdpApiClient,
|
|
83
101
|
r as createEndUserEvmAccount,
|
|
84
|
-
n as
|
|
85
|
-
i as
|
|
86
|
-
o as
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
102
|
+
n as createEndUserEvmSmartAccount,
|
|
103
|
+
i as exportEndUserEvmAccount,
|
|
104
|
+
o as getAuthenticatedEndUser,
|
|
105
|
+
a as getUserOperationWithEndUserAccount,
|
|
106
|
+
s as initiateAuthentication,
|
|
107
|
+
dt as isOpenAPIError,
|
|
108
|
+
p as logOutEndUser,
|
|
109
|
+
c as refreshAccessToken,
|
|
110
|
+
m as registerTemporaryWalletSecret,
|
|
111
|
+
d as sendEvmTransactionWithEndUserAccount,
|
|
112
|
+
u as sendUserOperationWithEndUserAccount,
|
|
113
|
+
ot as setAuthManager,
|
|
114
|
+
y as signEvmHashWithEndUserAccount,
|
|
115
|
+
l as signEvmMessageWithEndUserAccount,
|
|
116
|
+
T as signEvmTransactionWithEndUserAccount,
|
|
117
|
+
E as signEvmTypedDataWithEndUserAccount,
|
|
118
|
+
S as signSolanaHashWithEndUserAccount,
|
|
119
|
+
A as verifyEmailAuthentication,
|
|
120
|
+
v as verifySmsAuthentication
|
|
98
121
|
};
|
package/dist/esm/index2.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cdpApiClient as
|
|
2
|
-
const
|
|
1
|
+
import { cdpApiClient as s } from "./index4.js";
|
|
2
|
+
const o = (e, t, n) => s(
|
|
3
3
|
{
|
|
4
4
|
url: `/v2/embedded-wallet-api/projects/${e}/auth/init`,
|
|
5
5
|
method: "POST",
|
|
@@ -7,7 +7,7 @@ const d = (e, t, n) => r(
|
|
|
7
7
|
data: t
|
|
8
8
|
},
|
|
9
9
|
n
|
|
10
|
-
),
|
|
10
|
+
), i = (e, t, n) => s(
|
|
11
11
|
{
|
|
12
12
|
url: `/v2/embedded-wallet-api/projects/${e}/auth/verify/email`,
|
|
13
13
|
method: "POST",
|
|
@@ -15,7 +15,15 @@ const d = (e, t, n) => r(
|
|
|
15
15
|
data: t
|
|
16
16
|
},
|
|
17
17
|
n
|
|
18
|
-
),
|
|
18
|
+
), c = (e, t, n) => s(
|
|
19
|
+
{
|
|
20
|
+
url: `/v2/embedded-wallet-api/projects/${e}/auth/verify/sms`,
|
|
21
|
+
method: "POST",
|
|
22
|
+
headers: { "Content-Type": "application/json" },
|
|
23
|
+
data: t
|
|
24
|
+
},
|
|
25
|
+
n
|
|
26
|
+
), p = (e, t, n) => s(
|
|
19
27
|
{
|
|
20
28
|
url: `/v2/embedded-wallet-api/projects/${e}/auth/refresh`,
|
|
21
29
|
method: "POST",
|
|
@@ -23,13 +31,13 @@ const d = (e, t, n) => r(
|
|
|
23
31
|
data: t
|
|
24
32
|
},
|
|
25
33
|
n
|
|
26
|
-
),
|
|
34
|
+
), l = (e, t) => s(
|
|
27
35
|
{ url: `/v2/embedded-wallet-api/projects/${e}/auth/logout`, method: "POST" },
|
|
28
36
|
t
|
|
29
|
-
),
|
|
37
|
+
), u = (e, t, n) => s(
|
|
30
38
|
{ url: `/v2/embedded-wallet-api/projects/${e}/end-users/${t}`, method: "GET" },
|
|
31
39
|
n
|
|
32
|
-
),
|
|
40
|
+
), m = (e, t, n, a) => s(
|
|
33
41
|
{
|
|
34
42
|
url: `/v2/embedded-wallet-api/projects/${e}/end-users/${t}/wallet-secrets`,
|
|
35
43
|
method: "PUT",
|
|
@@ -37,7 +45,7 @@ const d = (e, t, n) => r(
|
|
|
37
45
|
data: n
|
|
38
46
|
},
|
|
39
47
|
a
|
|
40
|
-
),
|
|
48
|
+
), h = (e, t, n, a) => s(
|
|
41
49
|
{
|
|
42
50
|
url: `/v2/embedded-wallet-api/projects/${e}/end-users/${t}/evm`,
|
|
43
51
|
method: "POST",
|
|
@@ -45,7 +53,7 @@ const d = (e, t, n) => r(
|
|
|
45
53
|
data: n
|
|
46
54
|
},
|
|
47
55
|
a
|
|
48
|
-
),
|
|
56
|
+
), v = (e, t, n, a) => s(
|
|
49
57
|
{
|
|
50
58
|
url: `/v2/embedded-wallet-api/projects/${e}/end-users/${t}/evm/sign`,
|
|
51
59
|
method: "POST",
|
|
@@ -53,7 +61,7 @@ const d = (e, t, n) => r(
|
|
|
53
61
|
data: n
|
|
54
62
|
},
|
|
55
63
|
a
|
|
56
|
-
),
|
|
64
|
+
), T = (e, t, n, a) => s(
|
|
57
65
|
{
|
|
58
66
|
url: `/v2/embedded-wallet-api/projects/${e}/end-users/${t}/evm/sign/transaction`,
|
|
59
67
|
method: "POST",
|
|
@@ -61,7 +69,7 @@ const d = (e, t, n) => r(
|
|
|
61
69
|
data: n
|
|
62
70
|
},
|
|
63
71
|
a
|
|
64
|
-
),
|
|
72
|
+
), $ = (e, t, n, a) => s(
|
|
65
73
|
{
|
|
66
74
|
url: `/v2/embedded-wallet-api/projects/${e}/end-users/${t}/evm/send/transaction`,
|
|
67
75
|
method: "POST",
|
|
@@ -69,7 +77,7 @@ const d = (e, t, n) => r(
|
|
|
69
77
|
data: n
|
|
70
78
|
},
|
|
71
79
|
a
|
|
72
|
-
),
|
|
80
|
+
), j = (e, t, n, a) => s(
|
|
73
81
|
{
|
|
74
82
|
url: `/v2/embedded-wallet-api/projects/${e}/end-users/${t}/evm/sign/message`,
|
|
75
83
|
method: "POST",
|
|
@@ -77,7 +85,7 @@ const d = (e, t, n) => r(
|
|
|
77
85
|
data: n
|
|
78
86
|
},
|
|
79
87
|
a
|
|
80
|
-
),
|
|
88
|
+
), E = (e, t, n, a) => s(
|
|
81
89
|
{
|
|
82
90
|
url: `/v2/embedded-wallet-api/projects/${e}/end-users/${t}/evm/sign/typed-data`,
|
|
83
91
|
method: "POST",
|
|
@@ -85,7 +93,7 @@ const d = (e, t, n) => r(
|
|
|
85
93
|
data: n
|
|
86
94
|
},
|
|
87
95
|
a
|
|
88
|
-
),
|
|
96
|
+
), y = (e, t, n, a) => s(
|
|
89
97
|
{
|
|
90
98
|
url: `/v2/embedded-wallet-api/projects/${e}/end-users/${t}/evm/export`,
|
|
91
99
|
method: "POST",
|
|
@@ -93,19 +101,54 @@ const d = (e, t, n) => r(
|
|
|
93
101
|
data: n
|
|
94
102
|
},
|
|
95
103
|
a
|
|
104
|
+
), w = (e, t, n, a) => s(
|
|
105
|
+
{
|
|
106
|
+
url: `/v2/embedded-wallet-api/projects/${e}/end-users/${t}/evm/smart-accounts`,
|
|
107
|
+
method: "POST",
|
|
108
|
+
headers: { "Content-Type": "application/json" },
|
|
109
|
+
data: n
|
|
110
|
+
},
|
|
111
|
+
a
|
|
112
|
+
), S = (e, t, n, a, r) => s(
|
|
113
|
+
{
|
|
114
|
+
url: `/v2/embedded-wallet-api/projects/${e}/end-users/${t}/evm/smart-accounts/${n}/user-operations/${a}`,
|
|
115
|
+
method: "GET"
|
|
116
|
+
},
|
|
117
|
+
r
|
|
118
|
+
), b = (e, t, n, a, r) => s(
|
|
119
|
+
{
|
|
120
|
+
url: `/v2/embedded-wallet-api/projects/${e}/end-users/${t}/evm/smart-accounts/${n}/send`,
|
|
121
|
+
method: "POST",
|
|
122
|
+
headers: { "Content-Type": "application/json" },
|
|
123
|
+
data: a
|
|
124
|
+
},
|
|
125
|
+
r
|
|
126
|
+
), O = (e, t, n, a) => s(
|
|
127
|
+
{
|
|
128
|
+
url: `/v2/embedded-wallet-api/projects/${e}/end-users/${t}/solana/sign`,
|
|
129
|
+
method: "POST",
|
|
130
|
+
headers: { "Content-Type": "application/json" },
|
|
131
|
+
data: n
|
|
132
|
+
},
|
|
133
|
+
a
|
|
96
134
|
);
|
|
97
135
|
export {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
l as
|
|
105
|
-
|
|
106
|
-
m as
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
136
|
+
h as createEndUserEvmAccount,
|
|
137
|
+
w as createEndUserEvmSmartAccount,
|
|
138
|
+
y as exportEndUserEvmAccount,
|
|
139
|
+
u as getAuthenticatedEndUser,
|
|
140
|
+
S as getUserOperationWithEndUserAccount,
|
|
141
|
+
o as initiateAuthentication,
|
|
142
|
+
l as logOutEndUser,
|
|
143
|
+
p as refreshAccessToken,
|
|
144
|
+
m as registerTemporaryWalletSecret,
|
|
145
|
+
$ as sendEvmTransactionWithEndUserAccount,
|
|
146
|
+
b as sendUserOperationWithEndUserAccount,
|
|
147
|
+
v as signEvmHashWithEndUserAccount,
|
|
148
|
+
j as signEvmMessageWithEndUserAccount,
|
|
149
|
+
T as signEvmTransactionWithEndUserAccount,
|
|
150
|
+
E as signEvmTypedDataWithEndUserAccount,
|
|
151
|
+
O as signSolanaHashWithEndUserAccount,
|
|
152
|
+
i as verifyEmailAuthentication,
|
|
153
|
+
c as verifySmsAuthentication
|
|
111
154
|
};
|