@coinbase/cdp-sdk 1.7.0 → 1.8.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/CHANGELOG.md +10 -0
- package/README.md +222 -1
- package/_cjs/accounts/evm/toEvmServerAccount.js +4 -2
- package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_cjs/accounts/solana/toSolanaAccount.js +1 -0
- package/_cjs/accounts/solana/toSolanaAccount.js.map +1 -1
- package/_cjs/analytics.js +68 -8
- package/_cjs/analytics.js.map +1 -1
- package/_cjs/client/cdp.js +9 -3
- package/_cjs/client/cdp.js.map +1 -1
- package/_cjs/client/evm/evm.js +133 -15
- package/_cjs/client/evm/evm.js.map +1 -1
- package/_cjs/client/policies/index.js +6 -0
- package/_cjs/client/policies/index.js.map +1 -0
- package/_cjs/client/policies/policies.js +232 -0
- package/_cjs/client/policies/policies.js.map +1 -0
- package/_cjs/client/policies/policies.types.js +3 -0
- package/_cjs/client/policies/policies.types.js.map +1 -0
- package/_cjs/client/solana/solana.js +76 -19
- package/_cjs/client/solana/solana.js.map +1 -1
- package/_cjs/index.js +4 -1
- package/_cjs/index.js.map +1 -1
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js +27 -1
- package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.msw.js +56 -1
- package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.msw.js.map +1 -1
- package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +3 -1
- package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/index.msw.js +1 -1
- package/_cjs/openapi-client/generated/index.msw.js.map +1 -1
- package/_cjs/openapi-client/generated/solana-accounts/solana-accounts.js +14 -1
- package/_cjs/openapi-client/generated/solana-accounts/solana-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/solana-accounts/solana-accounts.msw.js +42 -1
- package/_cjs/openapi-client/generated/solana-accounts/solana-accounts.msw.js.map +1 -1
- package/_cjs/openapi-client/index.js +6 -1
- package/_cjs/openapi-client/index.js.map +1 -1
- package/_cjs/policies/schema.js +186 -0
- package/_cjs/policies/schema.js.map +1 -0
- package/_cjs/policies/types.js +3 -0
- package/_cjs/policies/types.js.map +1 -0
- package/_cjs/version.js +1 -1
- package/_esm/accounts/evm/toEvmServerAccount.js +4 -2
- package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
- package/_esm/accounts/solana/toSolanaAccount.js +1 -0
- package/_esm/accounts/solana/toSolanaAccount.js.map +1 -1
- package/_esm/analytics.js +68 -7
- package/_esm/analytics.js.map +1 -1
- package/_esm/client/cdp.js +10 -4
- package/_esm/client/cdp.js.map +1 -1
- package/_esm/client/evm/evm.js +133 -15
- package/_esm/client/evm/evm.js.map +1 -1
- package/_esm/client/policies/index.js +2 -0
- package/_esm/client/policies/index.js.map +1 -0
- package/_esm/client/policies/policies.js +228 -0
- package/_esm/client/policies/policies.js.map +1 -0
- package/_esm/client/policies/policies.types.js +2 -0
- package/_esm/client/policies/policies.types.js.map +1 -0
- package/_esm/client/solana/solana.js +76 -19
- package/_esm/client/solana/solana.js.map +1 -1
- package/_esm/index.js +1 -0
- package/_esm/index.js.map +1 -1
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js +24 -0
- package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/evm-accounts/evm-accounts.msw.js +51 -0
- package/_esm/openapi-client/generated/evm-accounts/evm-accounts.msw.js.map +1 -1
- package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +3 -1
- package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/index.msw.js +1 -1
- package/_esm/openapi-client/generated/index.msw.js.map +1 -1
- package/_esm/openapi-client/generated/solana-accounts/solana-accounts.js +12 -0
- package/_esm/openapi-client/generated/solana-accounts/solana-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/solana-accounts/solana-accounts.msw.js +39 -0
- package/_esm/openapi-client/generated/solana-accounts/solana-accounts.msw.js.map +1 -1
- package/_esm/openapi-client/index.js +5 -0
- package/_esm/openapi-client/index.js.map +1 -1
- package/_esm/policies/schema.js +183 -0
- package/_esm/policies/schema.js.map +1 -0
- package/_esm/policies/types.js +2 -0
- package/_esm/policies/types.js.map +1 -0
- package/_esm/version.js +1 -1
- package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
- package/_types/accounts/evm/types.d.ts +6 -3
- package/_types/accounts/evm/types.d.ts.map +1 -1
- package/_types/accounts/solana/toSolanaAccount.d.ts.map +1 -1
- package/_types/actions/evm/transfer/types.d.ts +1 -2
- package/_types/actions/evm/transfer/types.d.ts.map +1 -1
- package/_types/analytics.d.ts +14 -5
- package/_types/analytics.d.ts.map +1 -1
- package/_types/client/cdp.d.ts +3 -0
- package/_types/client/cdp.d.ts.map +1 -1
- package/_types/client/evm/evm.d.ts +89 -1
- package/_types/client/evm/evm.d.ts.map +1 -1
- package/_types/client/evm/evm.types.d.ts +33 -3
- package/_types/client/evm/evm.types.d.ts.map +1 -1
- package/_types/client/policies/index.d.ts +2 -0
- package/_types/client/policies/index.d.ts.map +1 -0
- package/_types/client/policies/policies.d.ts +216 -0
- package/_types/client/policies/policies.d.ts.map +1 -0
- package/_types/client/policies/policies.types.d.ts +96 -0
- package/_types/client/policies/policies.types.d.ts.map +1 -0
- package/_types/client/solana/solana.d.ts +43 -1
- package/_types/client/solana/solana.d.ts.map +1 -1
- package/_types/client/solana/solana.types.d.ts +14 -2
- package/_types/client/solana/solana.types.d.ts.map +1 -1
- package/_types/index.d.ts +2 -0
- package/_types/index.d.ts.map +1 -1
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +81 -0
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts +13 -1
- package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-accounts/evm-accounts.msw.d.ts +5 -1
- package/_types/openapi-client/generated/evm-accounts/evm-accounts.msw.d.ts.map +1 -1
- package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts +3 -1
- package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/index.msw.d.ts +1 -1
- package/_types/openapi-client/generated/index.msw.d.ts.map +1 -1
- package/_types/openapi-client/generated/solana-accounts/solana-accounts.d.ts +7 -1
- package/_types/openapi-client/generated/solana-accounts/solana-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/solana-accounts/solana-accounts.msw.d.ts +2 -0
- package/_types/openapi-client/generated/solana-accounts/solana-accounts.msw.d.ts.map +1 -1
- package/_types/openapi-client/index.d.ts +18 -0
- package/_types/openapi-client/index.d.ts.map +1 -1
- package/_types/policies/schema.d.ts +922 -0
- package/_types/policies/schema.d.ts.map +1 -0
- package/_types/policies/types.d.ts +19 -0
- package/_types/policies/types.d.ts.map +1 -0
- package/_types/types/misc.d.ts +39 -0
- package/_types/types/misc.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/accounts/evm/toEvmServerAccount.ts +6 -3
- package/accounts/evm/types.ts +6 -8
- package/accounts/solana/toSolanaAccount.ts +1 -0
- package/actions/evm/transfer/types.ts +1 -1
- package/analytics.ts +84 -11
- package/client/cdp.ts +11 -4
- package/client/evm/evm.ts +159 -17
- package/client/evm/evm.types.ts +38 -1
- package/client/policies/index.ts +1 -0
- package/client/policies/policies.ts +246 -0
- package/client/policies/policies.types.ts +109 -0
- package/client/solana/solana.ts +94 -20
- package/client/solana/solana.types.ts +16 -1
- package/index.ts +7 -0
- package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +86 -0
- package/openapi-client/generated/evm-accounts/evm-accounts.msw.ts +102 -0
- package/openapi-client/generated/evm-accounts/evm-accounts.ts +43 -0
- package/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.ts +3 -1
- package/openapi-client/generated/index.msw.ts +1 -1
- package/openapi-client/generated/solana-accounts/solana-accounts.msw.ts +75 -0
- package/openapi-client/generated/solana-accounts/solana-accounts.ts +23 -0
- package/openapi-client/index.ts +6 -0
- package/package.json +3 -2
- package/policies/schema.ts +266 -0
- package/policies/types.ts +19 -0
- package/types/misc.ts +41 -0
- package/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# CDP SDK Changelog
|
|
2
2
|
|
|
3
|
+
## 1.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#124](https://github.com/coinbase/cdp-sdk/pull/124) [`9b874f8`](https://github.com/coinbase/cdp-sdk/commit/9b874f85b8b21fa8f5ab2b724413cdd41a5423ea) Thanks [@sammccord](https://github.com/sammccord)! - Added all Policy Engine functionality; CRUD operations and zod schemas
|
|
8
|
+
|
|
9
|
+
- [#130](https://github.com/coinbase/cdp-sdk/pull/130) [`3274e09`](https://github.com/coinbase/cdp-sdk/commit/3274e099612209daf756e0c06857ea29f880318c) Thanks [@sammccord](https://github.com/sammccord)! - Added updateAccount for evm and solana namespaces, as well as account.policies on response types
|
|
10
|
+
|
|
11
|
+
- [#129](https://github.com/coinbase/cdp-sdk/pull/129) [`b4f6b43`](https://github.com/coinbase/cdp-sdk/commit/b4f6b43d936a9e87eed488ea236bf74851241d65) Thanks [@sddioulde](https://github.com/sddioulde)! - Added support for eip-712 signing
|
|
12
|
+
|
|
3
13
|
## 1.7.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
- [Installation](#installation)
|
|
8
8
|
- [API Keys](#api-keys)
|
|
9
9
|
- [Usage](#usage)
|
|
10
|
+
- [Policy Management](#policy-management)
|
|
10
11
|
- [Authentication tools](#authentication-tools)
|
|
11
12
|
- [Error Reporting](#error-reporting)
|
|
12
13
|
- [License](#license)
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
|
|
21
22
|
## CDP SDK
|
|
22
23
|
|
|
23
|
-
This module contains the TypeScript CDP SDK, which is a library that provides a client for interacting with the [Coinbase Developer Platform (CDP)](https://docs.cdp.coinbase.com/). It includes a CDP Client for interacting with EVM and Solana APIs to create accounts and send transactions, as well as authentication tools for interacting directly with the CDP APIs.
|
|
24
|
+
This module contains the TypeScript CDP SDK, which is a library that provides a client for interacting with the [Coinbase Developer Platform (CDP)](https://docs.cdp.coinbase.com/). It includes a CDP Client for interacting with EVM and Solana APIs to create accounts and send transactions, policy APIs to govern transaction permissions, as well as authentication tools for interacting directly with the CDP APIs.
|
|
24
25
|
|
|
25
26
|
## Documentation
|
|
26
27
|
|
|
@@ -127,6 +128,32 @@ const account = await cdp.solana.getOrCreateAccount({
|
|
|
127
128
|
});
|
|
128
129
|
```
|
|
129
130
|
|
|
131
|
+
### Updating EVM or Solana accounts
|
|
132
|
+
|
|
133
|
+
#### Update an EVM account as follows:
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
const account = await cdp.evm.updateAccount({
|
|
137
|
+
addresss: account.address,
|
|
138
|
+
update: {
|
|
139
|
+
name: "Updated name",
|
|
140
|
+
accountPolicy: "1622d4b7-9d60-44a2-9a6a-e9bbb167e412"
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
#### Update a Solana account as follows:
|
|
146
|
+
|
|
147
|
+
```typescript
|
|
148
|
+
const account = await cdp.solana.updateAccount({
|
|
149
|
+
addresss: account.address,
|
|
150
|
+
update: {
|
|
151
|
+
name: "Updated name",
|
|
152
|
+
accountPolicy: "1622d4b7-9d60-44a2-9a6a-e9bbb167e412"
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
```
|
|
156
|
+
|
|
130
157
|
### Testnet faucet
|
|
131
158
|
|
|
132
159
|
You can use the faucet function to request testnet ETH or SOL from the CDP.
|
|
@@ -454,6 +481,200 @@ SolanaAccount supports the following actions:
|
|
|
454
481
|
- `signMessage`
|
|
455
482
|
- `signTransaction`
|
|
456
483
|
|
|
484
|
+
|
|
485
|
+
## Policy Management
|
|
486
|
+
|
|
487
|
+
You can use the policies SDK to manage sets of rules that govern the behavior of accounts and projects, such as enforce allowlists and denylists.
|
|
488
|
+
|
|
489
|
+
### Create a Project-level policy that applies to all accounts
|
|
490
|
+
|
|
491
|
+
This policy will accept any account sending less than a specific amount of ETH to a specific address.
|
|
492
|
+
|
|
493
|
+
```typescript
|
|
494
|
+
const policy = await cdp.policies.createPolicy({
|
|
495
|
+
policy: {
|
|
496
|
+
scope: 'project',
|
|
497
|
+
description: 'Project-wide Allowlist Policy',
|
|
498
|
+
rules: [
|
|
499
|
+
{
|
|
500
|
+
action: 'accept',
|
|
501
|
+
operation: 'signEvmTransaction',
|
|
502
|
+
criteria: [
|
|
503
|
+
{
|
|
504
|
+
type: 'ethValue',
|
|
505
|
+
ethValue: '1000000000000000000',
|
|
506
|
+
operator: '<='
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
type: 'evmAddress',
|
|
510
|
+
addresses: ["0x000000000000000000000000000000000000dEaD"],
|
|
511
|
+
operator: 'in'
|
|
512
|
+
}
|
|
513
|
+
]
|
|
514
|
+
}
|
|
515
|
+
]
|
|
516
|
+
}
|
|
517
|
+
});
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
### Create an Account-level policy
|
|
521
|
+
|
|
522
|
+
This policy will accept any transaction with a value less than or equal to 1 ETH to a specific address.
|
|
523
|
+
|
|
524
|
+
```typescript
|
|
525
|
+
const policy = await cdp.policies.createPolicy({
|
|
526
|
+
policy: {
|
|
527
|
+
scope: 'account',
|
|
528
|
+
description: 'Account Allowlist Policy',
|
|
529
|
+
rules: [
|
|
530
|
+
{
|
|
531
|
+
action: 'accept',
|
|
532
|
+
operation: 'signEvmTransaction',
|
|
533
|
+
criteria: [
|
|
534
|
+
{
|
|
535
|
+
type: 'ethValue',
|
|
536
|
+
ethValue: '1000000000000000000',
|
|
537
|
+
operator: '<='
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
type: 'evmAddress',
|
|
541
|
+
addresses: ["0x000000000000000000000000000000000000dEaD"],
|
|
542
|
+
operator: 'in'
|
|
543
|
+
}
|
|
544
|
+
]
|
|
545
|
+
}
|
|
546
|
+
]
|
|
547
|
+
}
|
|
548
|
+
});
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
### Create a Solana Allowlist Policy
|
|
552
|
+
|
|
553
|
+
```typescript
|
|
554
|
+
const policy = await cdp.policies.createPolicy({
|
|
555
|
+
policy: {
|
|
556
|
+
scope: 'account',
|
|
557
|
+
description: 'Account Allowlist Policy',
|
|
558
|
+
rules: [
|
|
559
|
+
{
|
|
560
|
+
action: 'accept',
|
|
561
|
+
operation: 'signSolTransaction',
|
|
562
|
+
criteria: [
|
|
563
|
+
{
|
|
564
|
+
type: 'solAddress',
|
|
565
|
+
addresses: ["DtdSSG8ZJRZVv5Jx7K1MeWp7Zxcu19GD5wQRGRpQ9uMF"],
|
|
566
|
+
operator: 'in'
|
|
567
|
+
}
|
|
568
|
+
]
|
|
569
|
+
}
|
|
570
|
+
]
|
|
571
|
+
}
|
|
572
|
+
});
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
### List Policies
|
|
576
|
+
|
|
577
|
+
You can filter by account:
|
|
578
|
+
|
|
579
|
+
```typescript
|
|
580
|
+
const policy = await cdp.policies.listPolicies({
|
|
581
|
+
scope: 'account'
|
|
582
|
+
});
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
You can also filter by project:
|
|
586
|
+
|
|
587
|
+
```typescript
|
|
588
|
+
const policy = await cdp.policies.listPolicies({
|
|
589
|
+
scope: 'project'
|
|
590
|
+
});
|
|
591
|
+
```
|
|
592
|
+
|
|
593
|
+
### Retrieve a Policy
|
|
594
|
+
|
|
595
|
+
```typescript
|
|
596
|
+
const policy = await cdp.policies.getPolicyById({
|
|
597
|
+
id: '__POLICY_ID__'
|
|
598
|
+
});
|
|
599
|
+
```
|
|
600
|
+
|
|
601
|
+
### Update a Policy
|
|
602
|
+
|
|
603
|
+
This policy will update an existing policy to accept transactions to any address except one.
|
|
604
|
+
|
|
605
|
+
```typescript
|
|
606
|
+
const policy = await cdp.policies.updatePolicy({
|
|
607
|
+
id: '__POLICY_ID__',
|
|
608
|
+
policy: {
|
|
609
|
+
description: 'Updated Account Denylist Policy',
|
|
610
|
+
rules: [
|
|
611
|
+
{
|
|
612
|
+
action: 'accept',
|
|
613
|
+
operation: 'signEvmTransaction',
|
|
614
|
+
criteria: [
|
|
615
|
+
{
|
|
616
|
+
type: 'evmAddress',
|
|
617
|
+
addresses: ["0x000000000000000000000000000000000000dEaD"],
|
|
618
|
+
operator: 'not in'
|
|
619
|
+
}
|
|
620
|
+
]
|
|
621
|
+
}
|
|
622
|
+
]
|
|
623
|
+
}
|
|
624
|
+
});
|
|
625
|
+
```
|
|
626
|
+
|
|
627
|
+
### Delete a Policy
|
|
628
|
+
|
|
629
|
+
> [!WARNING]
|
|
630
|
+
> Attempting to delete an account-level policy in-use by at least one account will fail.
|
|
631
|
+
|
|
632
|
+
```typescript
|
|
633
|
+
const policy = await cdp.policies.deletePolicy({
|
|
634
|
+
id: '__POLICY_ID__'
|
|
635
|
+
});
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
### Validate a Policy
|
|
639
|
+
|
|
640
|
+
If you're integrating policy editing into your application, you may find it useful to validate policies ahead of time to provide a user with feedback. The `CreatePolicyBodySchema` and `UpdatePolicyBodySchema` can be used to get actionable structured information about any issues with a policy. Read more about [handling ZodErrors](https://zod.dev/ERROR_HANDLING).
|
|
641
|
+
|
|
642
|
+
```ts
|
|
643
|
+
import { CreatePolicyBodySchema, UpdatePolicyBodySchema } from "@coinbase/cdp-sdk";
|
|
644
|
+
|
|
645
|
+
// Validate a new Policy with many issues, will throw a ZodError with actionable validation errors
|
|
646
|
+
try {
|
|
647
|
+
CreatePolicyBodySchema.parse({
|
|
648
|
+
description: 'Bad description with !#@ characters, also is wayyyyy toooooo long!!',
|
|
649
|
+
rules: [
|
|
650
|
+
{
|
|
651
|
+
action: 'acept',
|
|
652
|
+
operation: 'unknownOperation',
|
|
653
|
+
criteria: [
|
|
654
|
+
{
|
|
655
|
+
type: 'ethValue',
|
|
656
|
+
ethValue: 'not a number',
|
|
657
|
+
operator: '<='
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
type: 'evmAddress',
|
|
661
|
+
addresses: ["not an address"],
|
|
662
|
+
operator: 'in'
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
type: 'evmAddress',
|
|
666
|
+
addresses: ["not an address"],
|
|
667
|
+
operator: 'invalid operator'
|
|
668
|
+
}
|
|
669
|
+
]
|
|
670
|
+
},
|
|
671
|
+
]
|
|
672
|
+
})
|
|
673
|
+
} catch(e) {
|
|
674
|
+
console.error(e)
|
|
675
|
+
}
|
|
676
|
+
````
|
|
677
|
+
|
|
457
678
|
## Authentication tools
|
|
458
679
|
|
|
459
680
|
This SDK also contains simple tools for authenticating REST API requests to the [Coinbase Developer Platform (CDP)](https://docs.cdp.coinbase.com/). See the [Auth README](src/auth/README.md) for more details.
|
|
@@ -37,8 +37,9 @@ function toEvmServerAccount(apiClient, options) {
|
|
|
37
37
|
});
|
|
38
38
|
return result.signedTransaction;
|
|
39
39
|
},
|
|
40
|
-
async signTypedData() {
|
|
41
|
-
|
|
40
|
+
async signTypedData(message) {
|
|
41
|
+
const result = await apiClient.signEvmTypedData(options.account.address, message);
|
|
42
|
+
return result.signature;
|
|
42
43
|
},
|
|
43
44
|
async transfer(transferArgs) {
|
|
44
45
|
return (0, transfer_js_1.transfer)(apiClient, account, transferArgs, accountTransferStrategy_js_1.accountTransferStrategy);
|
|
@@ -63,6 +64,7 @@ function toEvmServerAccount(apiClient, options) {
|
|
|
63
64
|
},
|
|
64
65
|
name: options.account.name,
|
|
65
66
|
type: "evm-server",
|
|
67
|
+
policies: options.account.policies,
|
|
66
68
|
};
|
|
67
69
|
return account;
|
|
68
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toEvmServerAccount.js","sourceRoot":"","sources":["../../../accounts/evm/toEvmServerAccount.ts"],"names":[],"mappings":";;AAuCA,
|
|
1
|
+
{"version":3,"file":"toEvmServerAccount.js","sourceRoot":"","sources":["../../../accounts/evm/toEvmServerAccount.ts"],"names":[],"mappings":";;AAuCA,gDA+DC;AAtGD,+BAAoF;AAEpF,iFAIgD;AAChD,yEAI4C;AAC5C,6EAAuE;AACvE,sGAAgG;AAChG,wEAAkE;AAgBlE;;;;;;;;GAQG;AACH,SAAgB,kBAAkB,CAChC,SAA+B,EAC/B,OAAkC;IAElC,MAAM,OAAO,GAAqB;QAChC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,OAAkB;QAC3C,KAAK,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE;YAC3B,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE;gBACrE,OAAO,EAAE,OAAO,CAAC,QAAQ,EAAE;aAC5B,CAAC,CAAC;YACH,OAAO,MAAM,CAAC,SAAgB,CAAC;QACjC,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,UAA0B;YACnC,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE;gBAClE,IAAI,EAAE,UAAU,CAAC,IAAI;aACtB,CAAC,CAAC;YACH,OAAO,MAA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AQ;KACnC,CAAC;IAEF,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toSolanaAccount.js","sourceRoot":"","sources":["../../../accounts/solana/toSolanaAccount.ts"],"names":[],"mappings":";;AA4BA,
|
|
1
|
+
{"version":3,"file":"toSolanaAccount.js","sourceRoot":"","sources":["../../../accounts/solana/toSolanaAccount.ts"],"names":[],"mappings":";;AA4BA,0CA+BC;AA1DD,4EAAsE;AACtE,wEAAkE;AAClE,gFAA0E;AAgB1E;;;;;;;;GAQG;AACH,SAAgB,eAAe,CAC7B,SAA+B,EAC/B,OAA+B;IAE/B,MAAM,OAAO,GAAkB;QAC7B,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO;QAChC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,IAAI;QAC1B,KAAK,CAAC,aAAa,CAAC,OAA8C;YAChE,OAAO,IAAA,gCAAa,EAAC,SAAS,EAAE;gBAC9B,GAAG,OAAO;gBACV,OAAO,EAAE,OAAO,CAAC,OAAO;aACzB,CAAC,CAAC;QACL,CAAC;QACD,KAAK,CAAC,WAAW,CAAC,OAA4C;YAC5D,OAAO,IAAA,4BAAW,EAAC,SAAS,EAAE;gBAC5B,GAAG,OAAO;gBACV,OAAO,EAAE,OAAO,CAAC,OAAO;aACzB,CAAC,CAAC;QACL,CAAC;QACD,KAAK,CAAC,eAAe,CACnB,OAAgD;YAEhD,OAAO,IAAA,oCAAe,EAAC,SAAS,EAAE;gBAChC,GAAG,OAAO;gBACV,OAAO,EAAE,OAAO,CAAC,OAAO;aACzB,CAAC,CAAC;QACL,CAAC;QACD,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ;KACnC,CAAC;IAEF,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/_cjs/analytics.js
CHANGED
|
@@ -3,11 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
exports.wrapClassWithErrorTracking = wrapClassWithErrorTracking;
|
|
6
|
+
exports.Analytics = void 0;
|
|
8
7
|
const md5_1 = __importDefault(require("md5"));
|
|
8
|
+
const errors_js_1 = require("./openapi-client/errors.js");
|
|
9
9
|
// This is a public client id for the analytics service
|
|
10
10
|
const publicClientId = "54f2ee2fb3d2b901a829940d70fbfc13";
|
|
11
|
+
exports.Analytics = {
|
|
12
|
+
identifier: "", // set in cdp.ts
|
|
13
|
+
wrapClassWithErrorTracking,
|
|
14
|
+
wrapObjectMethodsWithErrorTracking,
|
|
15
|
+
sendEvent,
|
|
16
|
+
};
|
|
11
17
|
/**
|
|
12
18
|
* Sends an analytics event to the default endpoint
|
|
13
19
|
*
|
|
@@ -15,9 +21,12 @@ const publicClientId = "54f2ee2fb3d2b901a829940d70fbfc13";
|
|
|
15
21
|
* @returns Promise that resolves when the event is sent
|
|
16
22
|
*/
|
|
17
23
|
async function sendEvent(event) {
|
|
24
|
+
if (process.env.DISABLE_CDP_ERROR_REPORTING === "true") {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
18
27
|
const timestamp = Date.now();
|
|
19
28
|
const enhancedEvent = {
|
|
20
|
-
user_id:
|
|
29
|
+
user_id: exports.Analytics.identifier,
|
|
21
30
|
event_type: event.name,
|
|
22
31
|
platform: "server",
|
|
23
32
|
timestamp,
|
|
@@ -52,10 +61,12 @@ async function sendEvent(event) {
|
|
|
52
61
|
* Wraps all methods of a class with error tracking.
|
|
53
62
|
*
|
|
54
63
|
* @param ClassToWrap - The class whose prototype methods should be wrapped.
|
|
55
|
-
* @param apiKeyId - The API key ID to use for the error tracking.
|
|
56
64
|
*/
|
|
57
65
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
58
|
-
function wrapClassWithErrorTracking(ClassToWrap
|
|
66
|
+
function wrapClassWithErrorTracking(ClassToWrap) {
|
|
67
|
+
if (process.env.DISABLE_CDP_ERROR_REPORTING === "true") {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
59
70
|
const methods = Object.getOwnPropertyNames(ClassToWrap.prototype).filter(name => name !== "constructor" && typeof ClassToWrap.prototype[name] === "function");
|
|
60
71
|
for (const method of methods) {
|
|
61
72
|
const originalMethod = ClassToWrap.prototype[method];
|
|
@@ -64,12 +75,46 @@ function wrapClassWithErrorTracking(ClassToWrap, apiKeyId) {
|
|
|
64
75
|
return await originalMethod.apply(this, args);
|
|
65
76
|
}
|
|
66
77
|
catch (error) {
|
|
67
|
-
if (!(error
|
|
68
|
-
|
|
78
|
+
if (!shouldTrackError(error)) {
|
|
79
|
+
throw error;
|
|
80
|
+
}
|
|
81
|
+
const { message, stack } = error;
|
|
82
|
+
sendEvent({
|
|
83
|
+
method,
|
|
84
|
+
message,
|
|
85
|
+
stack,
|
|
86
|
+
name: "error",
|
|
87
|
+
}).catch(() => {
|
|
88
|
+
// ignore error
|
|
89
|
+
});
|
|
90
|
+
throw error;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Wraps all methods of an object with error tracking.
|
|
97
|
+
*
|
|
98
|
+
* @param object - The object whose methods should be wrapped.
|
|
99
|
+
*/
|
|
100
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
101
|
+
function wrapObjectMethodsWithErrorTracking(object) {
|
|
102
|
+
if (process.env.DISABLE_CDP_ERROR_REPORTING === "true") {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const methods = Object.getOwnPropertyNames(object).filter(name => name !== "constructor" && typeof object[name] === "function");
|
|
106
|
+
for (const method of methods) {
|
|
107
|
+
const originalMethod = object[method];
|
|
108
|
+
object[method] = async function (...args) {
|
|
109
|
+
try {
|
|
110
|
+
return await originalMethod.apply(this, args);
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
if (!shouldTrackError(error)) {
|
|
114
|
+
throw error;
|
|
69
115
|
}
|
|
70
116
|
const { message, stack } = error;
|
|
71
117
|
sendEvent({
|
|
72
|
-
apiKeyId,
|
|
73
118
|
method,
|
|
74
119
|
message,
|
|
75
120
|
stack,
|
|
@@ -82,4 +127,19 @@ function wrapClassWithErrorTracking(ClassToWrap, apiKeyId) {
|
|
|
82
127
|
};
|
|
83
128
|
}
|
|
84
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* Filters out non-errors and API errors
|
|
132
|
+
*
|
|
133
|
+
* @param error - The error to check.
|
|
134
|
+
* @returns True if the error should be tracked, false otherwise.
|
|
135
|
+
*/
|
|
136
|
+
function shouldTrackError(error) {
|
|
137
|
+
if (!(error instanceof Error)) {
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
if (error instanceof errors_js_1.APIError) {
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
return true;
|
|
144
|
+
}
|
|
85
145
|
//# sourceMappingURL=analytics.js.map
|
package/_cjs/analytics.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.js","sourceRoot":"","sources":["../analytics.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"analytics.js","sourceRoot":"","sources":["../analytics.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AAEtB,0DAAsD;AA0BtD,uDAAuD;AACvD,MAAM,cAAc,GAAG,kCAAkC,CAAC;AAE7C,QAAA,SAAS,GAAG;IACvB,UAAU,EAAE,EAAE,EAAE,gBAAgB;IAChC,0BAA0B;IAC1B,kCAAkC;IAClC,SAAS;CACV,CAAC;AAEF;;;;;GAKG;AACH,KAAK,UAAU,SAAS,CAAC,KAAgB;IACvC,IAAI,OAAO,CAAC,GAAG,CAAC,2BAA2B,KAAK,MAAM,EAAE,CAAC;QACvD,OAAO;IACT,CAAC;IAED,MAAM,SAAS,GAAG,IAAI,CAAC,GA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C,CAAC;QACtC,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,WAAW,GAAG,IAAe;YACjD,IAAI,CAAC;gBACH,OAAO,MAAM,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YAChD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;oBAC7B,MAAM,KAAK,CAAC;gBACd,CAAC;gBAED,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAc,CAAC;gBAE1C,SAAS,CAAC;oBACR,MAAM;oBACN,OAAO;oBACP,KAAK;oBACL,IAAI,EAAE,OAAO;iBACd,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE;oBACZ,eAAe;gBACjB,CAAC,CAAC,CAAC;gBAEH,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,SAAS,gBAAgB,CAAC,KAAc;IACtC,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,KAAK,YAAY,oBAAQ,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/_cjs/client/cdp.js
CHANGED
|
@@ -5,6 +5,7 @@ const analytics_js_1 = require("../analytics.js");
|
|
|
5
5
|
const index_js_1 = require("../openapi-client/index.js");
|
|
6
6
|
const version_js_1 = require("../version.js");
|
|
7
7
|
const evm_js_1 = require("./evm/evm.js");
|
|
8
|
+
const policies_js_1 = require("./policies/policies.js");
|
|
8
9
|
const solana_js_1 = require("./solana/solana.js");
|
|
9
10
|
/**
|
|
10
11
|
* The main client for interacting with the CDP API.
|
|
@@ -14,6 +15,8 @@ class CdpClient {
|
|
|
14
15
|
evm;
|
|
15
16
|
/** Namespace containing all Solana methods. */
|
|
16
17
|
solana;
|
|
18
|
+
/** Namespace containing all Policies methods. */
|
|
19
|
+
policies;
|
|
17
20
|
/**
|
|
18
21
|
* The CdpClient is the main class for interacting with the CDP API.
|
|
19
22
|
*
|
|
@@ -93,12 +96,15 @@ For more information, see: https://github.com/coinbase/cdp-sdk/blob/main/typescr
|
|
|
93
96
|
sourceVersion: version_js_1.version,
|
|
94
97
|
});
|
|
95
98
|
if (process.env.DISABLE_CDP_ERROR_REPORTING !== "true") {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
+
analytics_js_1.Analytics.identifier = apiKeyId;
|
|
100
|
+
analytics_js_1.Analytics.wrapClassWithErrorTracking(CdpClient);
|
|
101
|
+
analytics_js_1.Analytics.wrapClassWithErrorTracking(evm_js_1.EvmClient);
|
|
102
|
+
analytics_js_1.Analytics.wrapClassWithErrorTracking(solana_js_1.SolanaClient);
|
|
103
|
+
analytics_js_1.Analytics.wrapClassWithErrorTracking(policies_js_1.PoliciesClient);
|
|
99
104
|
}
|
|
100
105
|
this.evm = new evm_js_1.EvmClient();
|
|
101
106
|
this.solana = new solana_js_1.SolanaClient();
|
|
107
|
+
this.policies = new policies_js_1.PoliciesClient();
|
|
102
108
|
}
|
|
103
109
|
}
|
|
104
110
|
exports.CdpClient = CdpClient;
|
package/_cjs/client/cdp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdp.js","sourceRoot":"","sources":["../../client/cdp.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"cdp.js","sourceRoot":"","sources":["../../client/cdp.ts"],"names":[],"mappings":";;;AAAA,kDAA4C;AAC5C,yDAA8D;AAC9D,8CAAwC;AACxC,yCAAyC;AACzC,wDAAwD;AACxD,kDAAkD;AAelD;;GAEG;AACH,MAAa,SAAS;IACpB,4CAA4C;IACrC,GAAG,CAAY;IAEtB,+CAA+C;IACxC,MAAM,CAAe;IAE5B,iDAAiD;IAC1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