@compass-labs/api-sdk 2.1.26-rc.12 → 2.1.26-rc.14
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/codeSamples_typescript.yaml +6 -6
- package/docs/models/components/createaccountrequest.md +2 -2
- package/docs/models/components/earnmanagerequest.md +1 -1
- package/docs/models/components/earnswaprequest.md +1 -1
- package/docs/models/components/earntransferrequest.md +1 -1
- package/docs/models/components/v2bundlerequest.md +1 -1
- package/docs/models/operations/v2earnpositionsrequest.md +2 -2
- package/docs/sdks/earn/README.md +14 -14
- package/package.json +1 -1
|
@@ -506,37 +506,37 @@ actions:
|
|
|
506
506
|
"x-codeSamples":
|
|
507
507
|
- "lang": "typescript"
|
|
508
508
|
"label": "Typescript (SDK)"
|
|
509
|
-
"source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await compassApiSDK.earn.earnBundle({\n owner: \"
|
|
509
|
+
"source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await compassApiSDK.earn.earnBundle({\n owner: \"0x01E62835dd7F52173546A325294762143eE4a882\",\n chain: \"ethereum\",\n actions: [\n {\n body: {\n actionType: \"V2_SWAP\",\n tokenIn: \"USDC\",\n tokenOut: \"AUSD\",\n amountIn: \"100\",\n slippage: \"0.5\",\n },\n },\n {\n body: {\n actionType: \"V2_MANAGE\",\n venue: {\n type: \"VAULT\",\n vaultAddress: \"0x1B4cd53a1A8e5F50aB6320EF34E5fB4D3df7B6f6\",\n },\n action: \"DEPOSIT\",\n amount: \"ALL\",\n },\n },\n ],\n gasSponsorship: false,\n });\n\n console.log(result);\n}\n\nrun();"
|
|
510
510
|
- target: $["paths"]["/v2/earn/create_account"]["post"]
|
|
511
511
|
update:
|
|
512
512
|
"x-codeSamples":
|
|
513
513
|
- "lang": "typescript"
|
|
514
514
|
"label": "Typescript (SDK)"
|
|
515
|
-
"source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await compassApiSDK.earn.earnCreateAccount({\n chain: \"base\",\n sender: \"
|
|
515
|
+
"source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await compassApiSDK.earn.earnCreateAccount({\n chain: \"base\",\n sender: \"0x01E62835dd7F52173546A325294762143eE4a882\",\n owner: \"0x01E62835dd7F52173546A325294762143eE4a882\",\n });\n\n console.log(result);\n}\n\nrun();"
|
|
516
516
|
- target: $["paths"]["/v2/earn/manage"]["post"]
|
|
517
517
|
update:
|
|
518
518
|
"x-codeSamples":
|
|
519
519
|
- "lang": "typescript"
|
|
520
520
|
"label": "Typescript (SDK)"
|
|
521
|
-
"source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await compassApiSDK.earn.earnManage({\n venue: {\n type: \"VAULT\",\n vaultAddress: \"0x7BfA7C4f149E7415b73bdeDfe609237e29CBF34A\",\n },\n action: \"DEPOSIT\",\n amount: \"0.01\",\n owner: \"
|
|
521
|
+
"source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await compassApiSDK.earn.earnManage({\n venue: {\n type: \"VAULT\",\n vaultAddress: \"0x7BfA7C4f149E7415b73bdeDfe609237e29CBF34A\",\n },\n action: \"DEPOSIT\",\n amount: \"0.01\",\n owner: \"0x01E62835dd7F52173546A325294762143eE4a882\",\n chain: \"base\",\n gasSponsorship: false,\n });\n\n console.log(result);\n}\n\nrun();"
|
|
522
522
|
- target: $["paths"]["/v2/earn/positions"]["get"]
|
|
523
523
|
update:
|
|
524
524
|
"x-codeSamples":
|
|
525
525
|
- "lang": "typescript"
|
|
526
526
|
"label": "Typescript (SDK)"
|
|
527
|
-
"source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await compassApiSDK.earn.earnPositions({\n offset: 0,\n limit: 100,\n chain: \"base\",\n owner: \"
|
|
527
|
+
"source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await compassApiSDK.earn.earnPositions({\n offset: 0,\n limit: 100,\n chain: \"base\",\n owner: \"0x01E62835dd7F52173546A325294762143eE4a882\",\n });\n\n console.log(result);\n}\n\nrun();"
|
|
528
528
|
- target: $["paths"]["/v2/earn/swap"]["post"]
|
|
529
529
|
update:
|
|
530
530
|
"x-codeSamples":
|
|
531
531
|
- "lang": "typescript"
|
|
532
532
|
"label": "Typescript (SDK)"
|
|
533
|
-
"source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await compassApiSDK.earn.earnSwap({\n tokenIn: \"USDC\",\n tokenOut: \"USDT\",\n amountIn: \"0.01\",\n slippage: \"0.5\",\n owner: \"
|
|
533
|
+
"source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await compassApiSDK.earn.earnSwap({\n tokenIn: \"USDC\",\n tokenOut: \"USDT\",\n amountIn: \"0.01\",\n slippage: \"0.5\",\n owner: \"0x01E62835dd7F52173546A325294762143eE4a882\",\n chain: \"base\",\n gasSponsorship: false,\n });\n\n console.log(result);\n}\n\nrun();"
|
|
534
534
|
- target: $["paths"]["/v2/earn/transfer"]["post"]
|
|
535
535
|
update:
|
|
536
536
|
"x-codeSamples":
|
|
537
537
|
- "lang": "typescript"
|
|
538
538
|
"label": "Typescript (SDK)"
|
|
539
|
-
"source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await compassApiSDK.earn.earnTransfer({\n owner: \"
|
|
539
|
+
"source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await compassApiSDK.earn.earnTransfer({\n owner: \"0x01E62835dd7F52173546A325294762143eE4a882\",\n chain: \"base\",\n token: \"USDC\",\n amount: \"0.01\",\n action: \"DEPOSIT\",\n });\n\n console.log(result);\n}\n\nrun();"
|
|
540
540
|
- target: $["paths"]["/v2/earn/vaults"]["get"]
|
|
541
541
|
update:
|
|
542
542
|
"x-codeSamples":
|
|
@@ -9,8 +9,8 @@ import { CreateAccountRequest } from "@compass-labs/api-sdk/models/components";
|
|
|
9
9
|
|
|
10
10
|
let value: CreateAccountRequest = {
|
|
11
11
|
chain: "base",
|
|
12
|
-
sender: "
|
|
13
|
-
owner: "
|
|
12
|
+
sender: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
13
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
14
14
|
};
|
|
15
15
|
```
|
|
16
16
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { EarnTransferRequest } from "@compass-labs/api-sdk/models/components";
|
|
7
7
|
|
|
8
8
|
let value: EarnTransferRequest = {
|
|
9
|
-
owner: "
|
|
9
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
10
10
|
chain: "base",
|
|
11
11
|
token: "USDC",
|
|
12
12
|
amount: "0.01",
|
|
@@ -9,7 +9,7 @@ let value: V2EarnPositionsRequest = {
|
|
|
9
9
|
offset: 0,
|
|
10
10
|
limit: 100,
|
|
11
11
|
chain: "base",
|
|
12
|
-
owner: "
|
|
12
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
13
13
|
};
|
|
14
14
|
```
|
|
15
15
|
|
|
@@ -20,4 +20,4 @@ let value: V2EarnPositionsRequest = {
|
|
|
20
20
|
| `offset` | *number* | :heavy_minus_sign: | The offset of the first item to return. | 0 |
|
|
21
21
|
| `limit` | *number* | :heavy_minus_sign: | The number of items to return. | 100 |
|
|
22
22
|
| `chain` | [operations.V2EarnPositionsChain](../../models/operations/v2earnpositionschain.md) | :heavy_check_mark: | N/A | base |
|
|
23
|
-
| `owner` | *string* | :heavy_check_mark: | The address of the owner of the earn account to get positions for. |
|
|
23
|
+
| `owner` | *string* | :heavy_check_mark: | The address of the owner of the earn account to get positions for. | 0x01E62835dd7F52173546A325294762143eE4a882 |
|
package/docs/sdks/earn/README.md
CHANGED
|
@@ -32,7 +32,7 @@ async function run() {
|
|
|
32
32
|
offset: 0,
|
|
33
33
|
limit: 100,
|
|
34
34
|
chain: "base",
|
|
35
|
-
owner: "
|
|
35
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
console.log(result);
|
|
@@ -60,7 +60,7 @@ async function run() {
|
|
|
60
60
|
offset: 0,
|
|
61
61
|
limit: 100,
|
|
62
62
|
chain: "base",
|
|
63
|
-
owner: "
|
|
63
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
64
64
|
});
|
|
65
65
|
if (res.ok) {
|
|
66
66
|
const { value: result } = res;
|
|
@@ -281,8 +281,8 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
281
281
|
async function run() {
|
|
282
282
|
const result = await compassApiSDK.earn.earnCreateAccount({
|
|
283
283
|
chain: "base",
|
|
284
|
-
sender: "
|
|
285
|
-
owner: "
|
|
284
|
+
sender: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
285
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
286
286
|
});
|
|
287
287
|
|
|
288
288
|
console.log(result);
|
|
@@ -308,8 +308,8 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
308
308
|
async function run() {
|
|
309
309
|
const res = await earnEarnCreateAccount(compassApiSDK, {
|
|
310
310
|
chain: "base",
|
|
311
|
-
sender: "
|
|
312
|
-
owner: "
|
|
311
|
+
sender: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
312
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
313
313
|
});
|
|
314
314
|
if (res.ok) {
|
|
315
315
|
const { value: result } = res;
|
|
@@ -365,7 +365,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
365
365
|
|
|
366
366
|
async function run() {
|
|
367
367
|
const result = await compassApiSDK.earn.earnTransfer({
|
|
368
|
-
owner: "
|
|
368
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
369
369
|
chain: "base",
|
|
370
370
|
token: "USDC",
|
|
371
371
|
amount: "0.01",
|
|
@@ -394,7 +394,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
394
394
|
|
|
395
395
|
async function run() {
|
|
396
396
|
const res = await earnEarnTransfer(compassApiSDK, {
|
|
397
|
-
owner: "
|
|
397
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
398
398
|
chain: "base",
|
|
399
399
|
token: "USDC",
|
|
400
400
|
amount: "0.01",
|
|
@@ -470,7 +470,7 @@ async function run() {
|
|
|
470
470
|
},
|
|
471
471
|
action: "DEPOSIT",
|
|
472
472
|
amount: "0.01",
|
|
473
|
-
owner: "
|
|
473
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
474
474
|
chain: "base",
|
|
475
475
|
gasSponsorship: false,
|
|
476
476
|
});
|
|
@@ -503,7 +503,7 @@ async function run() {
|
|
|
503
503
|
},
|
|
504
504
|
action: "DEPOSIT",
|
|
505
505
|
amount: "0.01",
|
|
506
|
-
owner: "
|
|
506
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
507
507
|
chain: "base",
|
|
508
508
|
gasSponsorship: false,
|
|
509
509
|
});
|
|
@@ -558,7 +558,7 @@ async function run() {
|
|
|
558
558
|
tokenOut: "USDT",
|
|
559
559
|
amountIn: "0.01",
|
|
560
560
|
slippage: "0.5",
|
|
561
|
-
owner: "
|
|
561
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
562
562
|
chain: "base",
|
|
563
563
|
gasSponsorship: false,
|
|
564
564
|
});
|
|
@@ -589,7 +589,7 @@ async function run() {
|
|
|
589
589
|
tokenOut: "USDT",
|
|
590
590
|
amountIn: "0.01",
|
|
591
591
|
slippage: "0.5",
|
|
592
|
-
owner: "
|
|
592
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
593
593
|
chain: "base",
|
|
594
594
|
gasSponsorship: false,
|
|
595
595
|
});
|
|
@@ -653,7 +653,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
653
653
|
|
|
654
654
|
async function run() {
|
|
655
655
|
const result = await compassApiSDK.earn.earnBundle({
|
|
656
|
-
owner: "
|
|
656
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
657
657
|
chain: "ethereum",
|
|
658
658
|
actions: [
|
|
659
659
|
{
|
|
@@ -702,7 +702,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
702
702
|
|
|
703
703
|
async function run() {
|
|
704
704
|
const res = await earnEarnBundle(compassApiSDK, {
|
|
705
|
-
owner: "
|
|
705
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
706
706
|
chain: "ethereum",
|
|
707
707
|
actions: [
|
|
708
708
|
{
|