@compass-labs/api-sdk 2.2.18-rc.2 → 2.2.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -16
- package/codeSamples_typescript.yaml +0 -36
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/components/index.d.ts +0 -20
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +0 -20
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +0 -1
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +0 -1
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/sdk/sdk.d.ts +0 -3
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +0 -4
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/components/index.d.ts +0 -20
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +0 -20
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +0 -1
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +0 -1
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/sdk/sdk.d.ts +0 -3
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +0 -4
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/index.ts +0 -20
- package/src/models/operations/index.ts +0 -1
- package/src/sdk/sdk.ts +0 -6
- package/dist/commonjs/funcs/creditCreditBorrow.d.ts +0 -25
- package/dist/commonjs/funcs/creditCreditBorrow.d.ts.map +0 -1
- package/dist/commonjs/funcs/creditCreditBorrow.js +0 -125
- package/dist/commonjs/funcs/creditCreditBorrow.js.map +0 -1
- package/dist/commonjs/funcs/creditCreditBundle.d.ts +0 -21
- package/dist/commonjs/funcs/creditCreditBundle.d.ts.map +0 -1
- package/dist/commonjs/funcs/creditCreditBundle.js +0 -121
- package/dist/commonjs/funcs/creditCreditBundle.js.map +0 -1
- package/dist/commonjs/funcs/creditCreditCreateAccount.d.ts +0 -26
- package/dist/commonjs/funcs/creditCreditCreateAccount.d.ts.map +0 -1
- package/dist/commonjs/funcs/creditCreditCreateAccount.js +0 -126
- package/dist/commonjs/funcs/creditCreditCreateAccount.js.map +0 -1
- package/dist/commonjs/funcs/creditCreditPositions.d.ts +0 -22
- package/dist/commonjs/funcs/creditCreditPositions.d.ts.map +0 -1
- package/dist/commonjs/funcs/creditCreditPositions.js +0 -126
- package/dist/commonjs/funcs/creditCreditPositions.js.map +0 -1
- package/dist/commonjs/funcs/creditCreditRepay.d.ts +0 -26
- package/dist/commonjs/funcs/creditCreditRepay.d.ts.map +0 -1
- package/dist/commonjs/funcs/creditCreditRepay.js +0 -126
- package/dist/commonjs/funcs/creditCreditRepay.js.map +0 -1
- package/dist/commonjs/funcs/creditCreditTransfer.d.ts +0 -27
- package/dist/commonjs/funcs/creditCreditTransfer.d.ts.map +0 -1
- package/dist/commonjs/funcs/creditCreditTransfer.js +0 -127
- package/dist/commonjs/funcs/creditCreditTransfer.js.map +0 -1
- package/dist/commonjs/models/components/accountsummary.d.ts +0 -40
- package/dist/commonjs/models/components/accountsummary.d.ts.map +0 -1
- package/dist/commonjs/models/components/accountsummary.js +0 -66
- package/dist/commonjs/models/components/accountsummary.js.map +0 -1
- package/dist/commonjs/models/components/collateralposition.d.ts +0 -53
- package/dist/commonjs/models/components/collateralposition.d.ts.map +0 -1
- package/dist/commonjs/models/components/collateralposition.js +0 -71
- package/dist/commonjs/models/components/collateralposition.js.map +0 -1
- package/dist/commonjs/models/components/createcreditaccountrequest.d.ts +0 -39
- package/dist/commonjs/models/components/createcreditaccountrequest.d.ts.map +0 -1
- package/dist/commonjs/models/components/createcreditaccountrequest.js +0 -64
- package/dist/commonjs/models/components/createcreditaccountrequest.js.map +0 -1
- package/dist/commonjs/models/components/createcreditaccountresponse.d.ts +0 -21
- package/dist/commonjs/models/components/createcreditaccountresponse.d.ts.map +0 -1
- package/dist/commonjs/models/components/createcreditaccountresponse.js +0 -57
- package/dist/commonjs/models/components/createcreditaccountresponse.js.map +0 -1
- package/dist/commonjs/models/components/creditborrowparams.d.ts +0 -44
- package/dist/commonjs/models/components/creditborrowparams.d.ts.map +0 -1
- package/dist/commonjs/models/components/creditborrowparams.js +0 -65
- package/dist/commonjs/models/components/creditborrowparams.js.map +0 -1
- package/dist/commonjs/models/components/creditborrowrequest.d.ts +0 -108
- package/dist/commonjs/models/components/creditborrowrequest.d.ts.map +0 -1
- package/dist/commonjs/models/components/creditborrowrequest.js +0 -95
- package/dist/commonjs/models/components/creditborrowrequest.js.map +0 -1
- package/dist/commonjs/models/components/creditborrowresponse.d.ts +0 -23
- package/dist/commonjs/models/components/creditborrowresponse.d.ts.map +0 -1
- package/dist/commonjs/models/components/creditborrowresponse.js +0 -61
- package/dist/commonjs/models/components/creditborrowresponse.js.map +0 -1
- package/dist/commonjs/models/components/creditbundlerequest.d.ts +0 -35
- package/dist/commonjs/models/components/creditbundlerequest.d.ts.map +0 -1
- package/dist/commonjs/models/components/creditbundlerequest.js +0 -59
- package/dist/commonjs/models/components/creditbundlerequest.js.map +0 -1
- package/dist/commonjs/models/components/creditbundleresponse.d.ts +0 -23
- package/dist/commonjs/models/components/creditbundleresponse.d.ts.map +0 -1
- package/dist/commonjs/models/components/creditbundleresponse.js +0 -61
- package/dist/commonjs/models/components/creditbundleresponse.js.map +0 -1
- package/dist/commonjs/models/components/creditevent.d.ts +0 -53
- package/dist/commonjs/models/components/creditevent.d.ts.map +0 -1
- package/dist/commonjs/models/components/creditevent.js +0 -76
- package/dist/commonjs/models/components/creditevent.js.map +0 -1
- package/dist/commonjs/models/components/creditpositionsresponse.d.ts +0 -31
- package/dist/commonjs/models/components/creditpositionsresponse.d.ts.map +0 -1
- package/dist/commonjs/models/components/creditpositionsresponse.js +0 -64
- package/dist/commonjs/models/components/creditpositionsresponse.js.map +0 -1
- package/dist/commonjs/models/components/creditrepayparams.d.ts +0 -44
- package/dist/commonjs/models/components/creditrepayparams.d.ts.map +0 -1
- package/dist/commonjs/models/components/creditrepayparams.js +0 -65
- package/dist/commonjs/models/components/creditrepayparams.js.map +0 -1
- package/dist/commonjs/models/components/creditrepayrequest.d.ts +0 -108
- package/dist/commonjs/models/components/creditrepayrequest.d.ts.map +0 -1
- package/dist/commonjs/models/components/creditrepayrequest.js +0 -95
- package/dist/commonjs/models/components/creditrepayrequest.js.map +0 -1
- package/dist/commonjs/models/components/creditrepayresponse.d.ts +0 -23
- package/dist/commonjs/models/components/creditrepayresponse.d.ts.map +0 -1
- package/dist/commonjs/models/components/creditrepayresponse.js +0 -61
- package/dist/commonjs/models/components/creditrepayresponse.js.map +0 -1
- package/dist/commonjs/models/components/creditsupplyparams.d.ts +0 -34
- package/dist/commonjs/models/components/creditsupplyparams.d.ts.map +0 -1
- package/dist/commonjs/models/components/creditsupplyparams.js +0 -62
- package/dist/commonjs/models/components/creditsupplyparams.js.map +0 -1
- package/dist/commonjs/models/components/credittransferrequest.d.ts +0 -40
- package/dist/commonjs/models/components/credittransferrequest.d.ts.map +0 -1
- package/dist/commonjs/models/components/credittransferrequest.js +0 -59
- package/dist/commonjs/models/components/credittransferrequest.js.map +0 -1
- package/dist/commonjs/models/components/credittransferresponse.d.ts +0 -11
- package/dist/commonjs/models/components/credittransferresponse.d.ts.map +0 -1
- package/dist/commonjs/models/components/credittransferresponse.js +0 -56
- package/dist/commonjs/models/components/credittransferresponse.js.map +0 -1
- package/dist/commonjs/models/components/credituseroperation.d.ts +0 -28
- package/dist/commonjs/models/components/credituseroperation.d.ts.map +0 -1
- package/dist/commonjs/models/components/credituseroperation.js +0 -78
- package/dist/commonjs/models/components/credituseroperation.js.map +0 -1
- package/dist/commonjs/models/components/creditwithdrawparams.d.ts +0 -34
- package/dist/commonjs/models/components/creditwithdrawparams.d.ts.map +0 -1
- package/dist/commonjs/models/components/creditwithdrawparams.js +0 -62
- package/dist/commonjs/models/components/creditwithdrawparams.js.map +0 -1
- package/dist/commonjs/models/components/debtposition.d.ts +0 -49
- package/dist/commonjs/models/components/debtposition.d.ts.map +0 -1
- package/dist/commonjs/models/components/debtposition.js +0 -69
- package/dist/commonjs/models/components/debtposition.js.map +0 -1
- package/dist/commonjs/models/operations/v2creditpositions.d.ts +0 -26
- package/dist/commonjs/models/operations/v2creditpositions.d.ts.map +0 -1
- package/dist/commonjs/models/operations/v2creditpositions.js +0 -57
- package/dist/commonjs/models/operations/v2creditpositions.js.map +0 -1
- package/dist/commonjs/sdk/credit.d.ts +0 -86
- package/dist/commonjs/sdk/credit.d.ts.map +0 -1
- package/dist/commonjs/sdk/credit.js +0 -110
- package/dist/commonjs/sdk/credit.js.map +0 -1
- package/dist/esm/funcs/creditCreditBorrow.d.ts +0 -25
- package/dist/esm/funcs/creditCreditBorrow.d.ts.map +0 -1
- package/dist/esm/funcs/creditCreditBorrow.js +0 -89
- package/dist/esm/funcs/creditCreditBorrow.js.map +0 -1
- package/dist/esm/funcs/creditCreditBundle.d.ts +0 -21
- package/dist/esm/funcs/creditCreditBundle.d.ts.map +0 -1
- package/dist/esm/funcs/creditCreditBundle.js +0 -85
- package/dist/esm/funcs/creditCreditBundle.js.map +0 -1
- package/dist/esm/funcs/creditCreditCreateAccount.d.ts +0 -26
- package/dist/esm/funcs/creditCreditCreateAccount.d.ts.map +0 -1
- package/dist/esm/funcs/creditCreditCreateAccount.js +0 -90
- package/dist/esm/funcs/creditCreditCreateAccount.js.map +0 -1
- package/dist/esm/funcs/creditCreditPositions.d.ts +0 -22
- package/dist/esm/funcs/creditCreditPositions.d.ts.map +0 -1
- package/dist/esm/funcs/creditCreditPositions.js +0 -90
- package/dist/esm/funcs/creditCreditPositions.js.map +0 -1
- package/dist/esm/funcs/creditCreditRepay.d.ts +0 -26
- package/dist/esm/funcs/creditCreditRepay.d.ts.map +0 -1
- package/dist/esm/funcs/creditCreditRepay.js +0 -90
- package/dist/esm/funcs/creditCreditRepay.js.map +0 -1
- package/dist/esm/funcs/creditCreditTransfer.d.ts +0 -27
- package/dist/esm/funcs/creditCreditTransfer.d.ts.map +0 -1
- package/dist/esm/funcs/creditCreditTransfer.js +0 -91
- package/dist/esm/funcs/creditCreditTransfer.js.map +0 -1
- package/dist/esm/models/components/accountsummary.d.ts +0 -40
- package/dist/esm/models/components/accountsummary.d.ts.map +0 -1
- package/dist/esm/models/components/accountsummary.js +0 -29
- package/dist/esm/models/components/accountsummary.js.map +0 -1
- package/dist/esm/models/components/collateralposition.d.ts +0 -53
- package/dist/esm/models/components/collateralposition.d.ts.map +0 -1
- package/dist/esm/models/components/collateralposition.js +0 -34
- package/dist/esm/models/components/collateralposition.js.map +0 -1
- package/dist/esm/models/components/createcreditaccountrequest.d.ts +0 -39
- package/dist/esm/models/components/createcreditaccountrequest.d.ts.map +0 -1
- package/dist/esm/models/components/createcreditaccountrequest.js +0 -27
- package/dist/esm/models/components/createcreditaccountrequest.js.map +0 -1
- package/dist/esm/models/components/createcreditaccountresponse.d.ts +0 -21
- package/dist/esm/models/components/createcreditaccountresponse.d.ts.map +0 -1
- package/dist/esm/models/components/createcreditaccountresponse.js +0 -20
- package/dist/esm/models/components/createcreditaccountresponse.js.map +0 -1
- package/dist/esm/models/components/creditborrowparams.d.ts +0 -44
- package/dist/esm/models/components/creditborrowparams.d.ts.map +0 -1
- package/dist/esm/models/components/creditborrowparams.js +0 -27
- package/dist/esm/models/components/creditborrowparams.js.map +0 -1
- package/dist/esm/models/components/creditborrowrequest.d.ts +0 -108
- package/dist/esm/models/components/creditborrowrequest.d.ts.map +0 -1
- package/dist/esm/models/components/creditborrowrequest.js +0 -55
- package/dist/esm/models/components/creditborrowrequest.js.map +0 -1
- package/dist/esm/models/components/creditborrowresponse.d.ts +0 -23
- package/dist/esm/models/components/creditborrowresponse.d.ts.map +0 -1
- package/dist/esm/models/components/creditborrowresponse.js +0 -24
- package/dist/esm/models/components/creditborrowresponse.js.map +0 -1
- package/dist/esm/models/components/creditbundlerequest.d.ts +0 -35
- package/dist/esm/models/components/creditbundlerequest.d.ts.map +0 -1
- package/dist/esm/models/components/creditbundlerequest.js +0 -22
- package/dist/esm/models/components/creditbundlerequest.js.map +0 -1
- package/dist/esm/models/components/creditbundleresponse.d.ts +0 -23
- package/dist/esm/models/components/creditbundleresponse.d.ts.map +0 -1
- package/dist/esm/models/components/creditbundleresponse.js +0 -24
- package/dist/esm/models/components/creditbundleresponse.js.map +0 -1
- package/dist/esm/models/components/creditevent.d.ts +0 -53
- package/dist/esm/models/components/creditevent.d.ts.map +0 -1
- package/dist/esm/models/components/creditevent.js +0 -39
- package/dist/esm/models/components/creditevent.js.map +0 -1
- package/dist/esm/models/components/creditpositionsresponse.d.ts +0 -31
- package/dist/esm/models/components/creditpositionsresponse.d.ts.map +0 -1
- package/dist/esm/models/components/creditpositionsresponse.js +0 -27
- package/dist/esm/models/components/creditpositionsresponse.js.map +0 -1
- package/dist/esm/models/components/creditrepayparams.d.ts +0 -44
- package/dist/esm/models/components/creditrepayparams.d.ts.map +0 -1
- package/dist/esm/models/components/creditrepayparams.js +0 -27
- package/dist/esm/models/components/creditrepayparams.js.map +0 -1
- package/dist/esm/models/components/creditrepayrequest.d.ts +0 -108
- package/dist/esm/models/components/creditrepayrequest.d.ts.map +0 -1
- package/dist/esm/models/components/creditrepayrequest.js +0 -55
- package/dist/esm/models/components/creditrepayrequest.js.map +0 -1
- package/dist/esm/models/components/creditrepayresponse.d.ts +0 -23
- package/dist/esm/models/components/creditrepayresponse.d.ts.map +0 -1
- package/dist/esm/models/components/creditrepayresponse.js +0 -24
- package/dist/esm/models/components/creditrepayresponse.js.map +0 -1
- package/dist/esm/models/components/creditsupplyparams.d.ts +0 -34
- package/dist/esm/models/components/creditsupplyparams.d.ts.map +0 -1
- package/dist/esm/models/components/creditsupplyparams.js +0 -24
- package/dist/esm/models/components/creditsupplyparams.js.map +0 -1
- package/dist/esm/models/components/credittransferrequest.d.ts +0 -40
- package/dist/esm/models/components/credittransferrequest.d.ts.map +0 -1
- package/dist/esm/models/components/credittransferrequest.js +0 -21
- package/dist/esm/models/components/credittransferrequest.js.map +0 -1
- package/dist/esm/models/components/credittransferresponse.d.ts +0 -11
- package/dist/esm/models/components/credittransferresponse.d.ts.map +0 -1
- package/dist/esm/models/components/credittransferresponse.js +0 -19
- package/dist/esm/models/components/credittransferresponse.js.map +0 -1
- package/dist/esm/models/components/credituseroperation.d.ts +0 -28
- package/dist/esm/models/components/credituseroperation.d.ts.map +0 -1
- package/dist/esm/models/components/credituseroperation.js +0 -40
- package/dist/esm/models/components/credituseroperation.js.map +0 -1
- package/dist/esm/models/components/creditwithdrawparams.d.ts +0 -34
- package/dist/esm/models/components/creditwithdrawparams.d.ts.map +0 -1
- package/dist/esm/models/components/creditwithdrawparams.js +0 -24
- package/dist/esm/models/components/creditwithdrawparams.js.map +0 -1
- package/dist/esm/models/components/debtposition.d.ts +0 -49
- package/dist/esm/models/components/debtposition.d.ts.map +0 -1
- package/dist/esm/models/components/debtposition.js +0 -32
- package/dist/esm/models/components/debtposition.js.map +0 -1
- package/dist/esm/models/operations/v2creditpositions.d.ts +0 -26
- package/dist/esm/models/operations/v2creditpositions.d.ts.map +0 -1
- package/dist/esm/models/operations/v2creditpositions.js +0 -20
- package/dist/esm/models/operations/v2creditpositions.js.map +0 -1
- package/dist/esm/sdk/credit.d.ts +0 -86
- package/dist/esm/sdk/credit.d.ts.map +0 -1
- package/dist/esm/sdk/credit.js +0 -106
- package/dist/esm/sdk/credit.js.map +0 -1
- package/docs/models/components/accountsummary.md +0 -30
- package/docs/models/components/borrowamount.md +0 -19
- package/docs/models/components/collateralposition.md +0 -31
- package/docs/models/components/createcreditaccountrequest.md +0 -24
- package/docs/models/components/createcreditaccountrequestchain.md +0 -15
- package/docs/models/components/createcreditaccountresponse.md +0 -31
- package/docs/models/components/creditborrowparams.md +0 -24
- package/docs/models/components/creditborrowparamsamount.md +0 -19
- package/docs/models/components/creditborrowrequest.md +0 -38
- package/docs/models/components/creditborrowrequestamountin.md +0 -19
- package/docs/models/components/creditborrowrequestslippage.md +0 -19
- package/docs/models/components/creditborrowresponse.md +0 -17
- package/docs/models/components/creditbundlerequest.md +0 -25
- package/docs/models/components/creditbundleresponse.md +0 -19
- package/docs/models/components/creditevent.md +0 -29
- package/docs/models/components/creditpositionsresponse.md +0 -31
- package/docs/models/components/creditrepayparams.md +0 -24
- package/docs/models/components/creditrepayparamsamount.md +0 -19
- package/docs/models/components/creditrepayrequest.md +0 -37
- package/docs/models/components/creditrepayrequestslippage.md +0 -19
- package/docs/models/components/creditrepayresponse.md +0 -17
- package/docs/models/components/creditsupplyparams.md +0 -23
- package/docs/models/components/creditsupplyparamsamount.md +0 -19
- package/docs/models/components/credittransferrequest.md +0 -23
- package/docs/models/components/credittransferrequestamount.md +0 -19
- package/docs/models/components/credittransferresponse.md +0 -75
- package/docs/models/components/credituseroperation.md +0 -23
- package/docs/models/components/credituseroperationbody.md +0 -80
- package/docs/models/components/creditwithdrawparams.md +0 -23
- package/docs/models/components/creditwithdrawparamsamount.md +0 -19
- package/docs/models/components/debtposition.md +0 -30
- package/docs/models/components/eventtype.md +0 -17
- package/docs/models/components/repayamount.md +0 -19
- package/docs/models/components/withdrawamount.md +0 -19
- package/docs/models/operations/v2creditpositionschain.md +0 -15
- package/docs/models/operations/v2creditpositionsrequest.md +0 -19
- package/docs/sdks/credit/README.md +0 -562
- package/src/funcs/creditCreditBorrow.ts +0 -176
- package/src/funcs/creditCreditBundle.ts +0 -172
- package/src/funcs/creditCreditCreateAccount.ts +0 -178
- package/src/funcs/creditCreditPositions.ts +0 -178
- package/src/funcs/creditCreditRepay.ts +0 -177
- package/src/funcs/creditCreditTransfer.ts +0 -178
- package/src/models/components/accountsummary.ts +0 -77
- package/src/models/components/collateralposition.ts +0 -94
- package/src/models/components/createcreditaccountrequest.ts +0 -72
- package/src/models/components/createcreditaccountresponse.ts +0 -51
- package/src/models/components/creditborrowparams.ts +0 -89
- package/src/models/components/creditborrowrequest.ts +0 -198
- package/src/models/components/creditborrowresponse.ts +0 -59
- package/src/models/components/creditbundlerequest.ts +0 -66
- package/src/models/components/creditbundleresponse.ts +0 -59
- package/src/models/components/creditevent.ts +0 -92
- package/src/models/components/creditpositionsresponse.ts +0 -69
- package/src/models/components/creditrepayparams.ts +0 -89
- package/src/models/components/creditrepayrequest.ts +0 -190
- package/src/models/components/creditrepayresponse.ts +0 -59
- package/src/models/components/creditsupplyparams.ts +0 -74
- package/src/models/components/credittransferrequest.ts +0 -78
- package/src/models/components/credittransferresponse.ts +0 -40
- package/src/models/components/credituseroperation.ts +0 -133
- package/src/models/components/creditwithdrawparams.ts +0 -74
- package/src/models/components/debtposition.ts +0 -88
- package/src/models/operations/v2creditpositions.ts +0 -50
- package/src/sdk/credit.ts +0 -156
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# CreditEvent
|
|
2
|
-
|
|
3
|
-
A single historical event in a credit position.
|
|
4
|
-
|
|
5
|
-
## Example Usage
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
import { CreditEvent } from "@compass-labs/api-sdk/models/components";
|
|
9
|
-
|
|
10
|
-
let value: CreditEvent = {
|
|
11
|
-
eventType: "supply",
|
|
12
|
-
blockNumber: 349470,
|
|
13
|
-
blockTimestamp: new Date("2026-03-29T05:53:04.536Z"),
|
|
14
|
-
transactionHash: "<value>",
|
|
15
|
-
amount: "731.51",
|
|
16
|
-
symbol: "<value>",
|
|
17
|
-
};
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Fields
|
|
21
|
-
|
|
22
|
-
| Field | Type | Required | Description |
|
|
23
|
-
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
24
|
-
| `eventType` | [components.EventType](../../models/components/eventtype.md) | :heavy_check_mark: | Type of credit event. |
|
|
25
|
-
| `blockNumber` | *number* | :heavy_check_mark: | Block number when the event occurred |
|
|
26
|
-
| `blockTimestamp` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Timestamp when the event occurred |
|
|
27
|
-
| `transactionHash` | *string* | :heavy_check_mark: | Transaction hash of the event |
|
|
28
|
-
| `amount` | *string* | :heavy_check_mark: | Amount involved in the event |
|
|
29
|
-
| `symbol` | *string* | :heavy_check_mark: | Symbol of the token |
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# CreditPositionsResponse
|
|
2
|
-
|
|
3
|
-
Credit account positions response with per-reserve positions and account summary.
|
|
4
|
-
|
|
5
|
-
## Example Usage
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
import { CreditPositionsResponse } from "@compass-labs/api-sdk/models/components";
|
|
9
|
-
|
|
10
|
-
let value: CreditPositionsResponse = {
|
|
11
|
-
collateralPositions: [],
|
|
12
|
-
debtPositions: [],
|
|
13
|
-
accountSummary: {
|
|
14
|
-
healthFactor: "<value>",
|
|
15
|
-
totalCollateralUsd: "<value>",
|
|
16
|
-
totalDebtUsd: "<value>",
|
|
17
|
-
availableBorrowsUsd: "<value>",
|
|
18
|
-
ltv: "<value>",
|
|
19
|
-
emodeCategoryId: 0,
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Fields
|
|
25
|
-
|
|
26
|
-
| Field | Type | Required | Description | Example |
|
|
27
|
-
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
28
|
-
| `collateralPositions` | [components.CollateralPosition](../../models/components/collateralposition.md)[] | :heavy_minus_sign: | All collateral positions, one per reserve. | [] |
|
|
29
|
-
| `debtPositions` | [components.DebtPosition](../../models/components/debtposition.md)[] | :heavy_minus_sign: | All debt positions, one per reserve. | [] |
|
|
30
|
-
| `accountSummary` | [components.AccountSummary](../../models/components/accountsummary.md) | :heavy_check_mark: | Aave account-level summary from getUserAccountData(). | |
|
|
31
|
-
| `totalUsdValue` | *string* | :heavy_minus_sign: | Net position value in USD (total collateral - total debt). Null if prices unavailable. | |
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# CreditRepayParams
|
|
2
|
-
|
|
3
|
-
Repay debt to Aave via Credit Account.
|
|
4
|
-
|
|
5
|
-
## Example Usage
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
import { CreditRepayParams } from "@compass-labs/api-sdk/models/components";
|
|
9
|
-
|
|
10
|
-
let value: CreditRepayParams = {
|
|
11
|
-
actionType: "CREDIT_REPAY",
|
|
12
|
-
token: "<value>",
|
|
13
|
-
amount: 9432.03,
|
|
14
|
-
};
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Fields
|
|
18
|
-
|
|
19
|
-
| Field | Type | Required | Description | Example |
|
|
20
|
-
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
|
21
|
-
| `actionType` | *"CREDIT_REPAY"* | :heavy_check_mark: | N/A | CREDIT_REPAY |
|
|
22
|
-
| `token` | *string* | :heavy_check_mark: | Token to repay to Aave. | |
|
|
23
|
-
| `amount` | *components.CreditRepayParamsAmount* | :heavy_check_mark: | Amount in token units to repay. | |
|
|
24
|
-
| `interestRateMode` | [components.InterestRateMode](../../models/components/interestratemode.md) | :heavy_minus_sign: | On AAVE there are 2 different interest modes.<br/><br/>A stable (but typically higher rate), or a variable rate. | |
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# CreditRepayParamsAmount
|
|
2
|
-
|
|
3
|
-
Amount in token units to repay.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Supported Types
|
|
7
|
-
|
|
8
|
-
### `number`
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
const value: number = 1284.03;
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
### `string`
|
|
15
|
-
|
|
16
|
-
```typescript
|
|
17
|
-
const value: string = "<value>";
|
|
18
|
-
```
|
|
19
|
-
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# CreditRepayRequest
|
|
2
|
-
|
|
3
|
-
## Example Usage
|
|
4
|
-
|
|
5
|
-
```typescript
|
|
6
|
-
import { CreditRepayRequest } from "@compass-labs/api-sdk/models/components";
|
|
7
|
-
|
|
8
|
-
let value: CreditRepayRequest = {
|
|
9
|
-
owner: "0x831Ad0C52C77708DA5D49dc8278C966dfdD4ddA1",
|
|
10
|
-
chain: "base",
|
|
11
|
-
repayToken: "WETH",
|
|
12
|
-
repayAmount: 0.01,
|
|
13
|
-
interestRateMode: "variable",
|
|
14
|
-
withdrawToken: "USDC",
|
|
15
|
-
withdrawAmount: 100,
|
|
16
|
-
slippage: 0.5,
|
|
17
|
-
gasSponsorship: false,
|
|
18
|
-
};
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Fields
|
|
22
|
-
|
|
23
|
-
| Field | Type | Required | Description | Example |
|
|
24
|
-
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
25
|
-
| `owner` | *string* | :heavy_check_mark: | The address that owns the Credit Account. | 0x831Ad0C52C77708DA5D49dc8278C966dfdD4ddA1 |
|
|
26
|
-
| `chain` | [components.Chain](../../models/components/chain.md) | :heavy_check_mark: | The chain to use. | |
|
|
27
|
-
| `repayToken` | *string* | :heavy_check_mark: | The borrowed asset to repay (e.g. WETH). Must match the debt position's token. | WETH |
|
|
28
|
-
| `repayAmount` | *components.RepayAmount* | :heavy_check_mark: | Amount of repay_token to repay (in token units, not wei). | 0.01 |
|
|
29
|
-
| `interestRateMode` | [components.InterestRateMode](../../models/components/interestratemode.md) | :heavy_minus_sign: | On AAVE there are 2 different interest modes.<br/><br/>A stable (but typically higher rate), or a variable rate. | |
|
|
30
|
-
| `withdrawToken` | *string* | :heavy_check_mark: | Collateral token to withdraw from Aave after repaying debt. | USDC |
|
|
31
|
-
| `withdrawAmount` | *components.WithdrawAmount* | :heavy_check_mark: | Amount of collateral to withdraw (in token units, not wei). | 100 |
|
|
32
|
-
| `tokenOut` | *string* | :heavy_minus_sign: | Desired output token. If different from withdraw_token, a swap is performed after withdrawal. If None, the withdrawn collateral is kept as-is. | |
|
|
33
|
-
| `slippage` | *components.CreditRepayRequestSlippage* | :heavy_minus_sign: | Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). Only used when a swap is needed. | 0.5 |
|
|
34
|
-
| `gasSponsorship` | *boolean* | :heavy_minus_sign: | If true, returns EIP-712 signature data instead of an unsigned transaction. | false |
|
|
35
|
-
| `permit2Signature` | *string* | :heavy_minus_sign: | The EOA owner's signature of the Permit2 PermitTransferFrom typed data. When provided, the repay bundle will first pull repay_token from the owner's EOA into the Credit Account via Permit2. Obtain by calling /v2/credit/transfer and signing the returned EIP-712 data. | |
|
|
36
|
-
| `permit2Nonce` | *number* | :heavy_minus_sign: | The nonce used in the Permit2 signature (from the signed typed data). | |
|
|
37
|
-
| `permit2Deadline` | *number* | :heavy_minus_sign: | The deadline timestamp used in the Permit2 signature (from the signed typed data). | |
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# CreditRepayRequestSlippage
|
|
2
|
-
|
|
3
|
-
Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). Only used when a swap is needed.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Supported Types
|
|
7
|
-
|
|
8
|
-
### `number`
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
const value: number = 1284.03;
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
### `string`
|
|
15
|
-
|
|
16
|
-
```typescript
|
|
17
|
-
const value: string = "0.5";
|
|
18
|
-
```
|
|
19
|
-
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# CreditRepayResponse
|
|
2
|
-
|
|
3
|
-
## Example Usage
|
|
4
|
-
|
|
5
|
-
```typescript
|
|
6
|
-
import { CreditRepayResponse } from "@compass-labs/api-sdk/models/components";
|
|
7
|
-
|
|
8
|
-
let value: CreditRepayResponse = {};
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Fields
|
|
12
|
-
|
|
13
|
-
| Field | Type | Required | Description |
|
|
14
|
-
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
15
|
-
| `transaction` | [components.UnsignedTransaction](../../models/components/unsignedtransaction.md) | :heavy_minus_sign: | Unsigned transaction to execute the repay bundle. Present when gas_sponsorship is false. |
|
|
16
|
-
| `eip712` | [components.BatchedSafeOperationsResponseOutput](../../models/components/batchedsafeoperationsresponseoutput.md) | :heavy_minus_sign: | EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship is true. |
|
|
17
|
-
| `estimatedTokenOutAmount` | *string* | :heavy_minus_sign: | Estimated amount of token_out received from swap. Only present when token_out differs from withdraw_token. |
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# CreditSupplyParams
|
|
2
|
-
|
|
3
|
-
Supply collateral to Aave via Credit Account.
|
|
4
|
-
|
|
5
|
-
## Example Usage
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
import { CreditSupplyParams } from "@compass-labs/api-sdk/models/components";
|
|
9
|
-
|
|
10
|
-
let value: CreditSupplyParams = {
|
|
11
|
-
actionType: "CREDIT_SUPPLY",
|
|
12
|
-
token: "<value>",
|
|
13
|
-
amount: "271.94",
|
|
14
|
-
};
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Fields
|
|
18
|
-
|
|
19
|
-
| Field | Type | Required | Description | Example |
|
|
20
|
-
| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- |
|
|
21
|
-
| `actionType` | *"CREDIT_SUPPLY"* | :heavy_check_mark: | N/A | CREDIT_SUPPLY |
|
|
22
|
-
| `token` | *string* | :heavy_check_mark: | Collateral token to supply to Aave. | |
|
|
23
|
-
| `amount` | *components.CreditSupplyParamsAmount* | :heavy_check_mark: | Amount in token units to supply. | |
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# CreditSupplyParamsAmount
|
|
2
|
-
|
|
3
|
-
Amount in token units to supply.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Supported Types
|
|
7
|
-
|
|
8
|
-
### `number`
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
const value: number = 1284.03;
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
### `string`
|
|
15
|
-
|
|
16
|
-
```typescript
|
|
17
|
-
const value: string = "<value>";
|
|
18
|
-
```
|
|
19
|
-
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# CreditTransferRequest
|
|
2
|
-
|
|
3
|
-
## Example Usage
|
|
4
|
-
|
|
5
|
-
```typescript
|
|
6
|
-
import { CreditTransferRequest } from "@compass-labs/api-sdk/models/components";
|
|
7
|
-
|
|
8
|
-
let value: CreditTransferRequest = {
|
|
9
|
-
owner: "0x4A83fec8c6A9A25Be28f3242a16dBaD0ab00f3a6",
|
|
10
|
-
chain: "base",
|
|
11
|
-
token: "USDC",
|
|
12
|
-
amount: 100,
|
|
13
|
-
};
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
## Fields
|
|
17
|
-
|
|
18
|
-
| Field | Type | Required | Description | Example |
|
|
19
|
-
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
|
20
|
-
| `owner` | *string* | :heavy_check_mark: | The owner's wallet address (EOA). | 0x4A83fec8c6A9A25Be28f3242a16dBaD0ab00f3a6 |
|
|
21
|
-
| `chain` | [components.Chain](../../models/components/chain.md) | :heavy_check_mark: | The chain to use. | |
|
|
22
|
-
| `token` | *string* | :heavy_check_mark: | The token to transfer from the EOA to the Credit Account. | USDC |
|
|
23
|
-
| `amount` | *components.CreditTransferRequestAmount* | :heavy_check_mark: | The amount of tokens to transfer (in token units, not wei). | 100 |
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# CreditTransferRequestAmount
|
|
2
|
-
|
|
3
|
-
The amount of tokens to transfer (in token units, not wei).
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Supported Types
|
|
7
|
-
|
|
8
|
-
### `number`
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
const value: number = 100;
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
### `string`
|
|
15
|
-
|
|
16
|
-
```typescript
|
|
17
|
-
const value: string = "<value>";
|
|
18
|
-
```
|
|
19
|
-
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
# CreditTransferResponse
|
|
2
|
-
|
|
3
|
-
## Example Usage
|
|
4
|
-
|
|
5
|
-
```typescript
|
|
6
|
-
import { CreditTransferResponse } from "@compass-labs/api-sdk/models/components";
|
|
7
|
-
|
|
8
|
-
let value: CreditTransferResponse = {
|
|
9
|
-
eip712: {
|
|
10
|
-
types: {
|
|
11
|
-
eip712Domain: [
|
|
12
|
-
{
|
|
13
|
-
name: "name",
|
|
14
|
-
type: "string",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
name: "chainId",
|
|
18
|
-
type: "uint256",
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
name: "verifyingContract",
|
|
22
|
-
type: "address",
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
tokenPermissions: [
|
|
26
|
-
{
|
|
27
|
-
name: "token",
|
|
28
|
-
type: "address",
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: "amount",
|
|
32
|
-
type: "uint256",
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
|
-
permitTransferFrom: [
|
|
36
|
-
{
|
|
37
|
-
name: "permitted",
|
|
38
|
-
type: "TokenPermissions",
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: "spender",
|
|
42
|
-
type: "address",
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
name: "nonce",
|
|
46
|
-
type: "uint256",
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
name: "deadline",
|
|
50
|
-
type: "uint256",
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
},
|
|
54
|
-
domain: {
|
|
55
|
-
chainId: 659817,
|
|
56
|
-
verifyingContract: "<value>",
|
|
57
|
-
},
|
|
58
|
-
message: {
|
|
59
|
-
permitted: {
|
|
60
|
-
token: "<value>",
|
|
61
|
-
amount: 387057,
|
|
62
|
-
},
|
|
63
|
-
spender: "<value>",
|
|
64
|
-
nonce: 382019,
|
|
65
|
-
deadline: 22738,
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Fields
|
|
72
|
-
|
|
73
|
-
| Field | Type | Required | Description |
|
|
74
|
-
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
75
|
-
| `eip712` | [components.Permit2TypedDataOutput](../../models/components/permit2typeddataoutput.md) | :heavy_check_mark: | N/A |
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# CreditUserOperation
|
|
2
|
-
|
|
3
|
-
A single operation in a credit bundle.
|
|
4
|
-
|
|
5
|
-
## Example Usage
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
import { CreditUserOperation } from "@compass-labs/api-sdk/models/components";
|
|
9
|
-
|
|
10
|
-
let value: CreditUserOperation = {
|
|
11
|
-
body: {
|
|
12
|
-
actionType: "CREDIT_SUPPLY",
|
|
13
|
-
token: "<value>",
|
|
14
|
-
amount: "988.97",
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Fields
|
|
20
|
-
|
|
21
|
-
| Field | Type | Required | Description |
|
|
22
|
-
| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
|
|
23
|
-
| `body` | *components.CreditUserOperationBody* | :heavy_check_mark: | N/A |
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
# CreditUserOperationBody
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
## Supported Types
|
|
5
|
-
|
|
6
|
-
### `components.CreditBorrowParams`
|
|
7
|
-
|
|
8
|
-
```typescript
|
|
9
|
-
const value: components.CreditBorrowParams = {
|
|
10
|
-
actionType: "CREDIT_BORROW",
|
|
11
|
-
token: "<value>",
|
|
12
|
-
amount: "528.33",
|
|
13
|
-
};
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
### `components.CreditRepayParams`
|
|
17
|
-
|
|
18
|
-
```typescript
|
|
19
|
-
const value: components.CreditRepayParams = {
|
|
20
|
-
actionType: "CREDIT_REPAY",
|
|
21
|
-
token: "<value>",
|
|
22
|
-
amount: 9432.03,
|
|
23
|
-
};
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
### `components.CreditSupplyParams`
|
|
27
|
-
|
|
28
|
-
```typescript
|
|
29
|
-
const value: components.CreditSupplyParams = {
|
|
30
|
-
actionType: "CREDIT_SUPPLY",
|
|
31
|
-
token: "<value>",
|
|
32
|
-
amount: "271.94",
|
|
33
|
-
};
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### `components.CreditWithdrawParams`
|
|
37
|
-
|
|
38
|
-
```typescript
|
|
39
|
-
const value: components.CreditWithdrawParams = {
|
|
40
|
-
actionType: "CREDIT_WITHDRAW",
|
|
41
|
-
token: "<value>",
|
|
42
|
-
amount: 6714.86,
|
|
43
|
-
};
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### `components.EarnSwapParams`
|
|
47
|
-
|
|
48
|
-
```typescript
|
|
49
|
-
const value: components.EarnSwapParams = {
|
|
50
|
-
actionType: "V2_SWAP",
|
|
51
|
-
tokenIn: "<value>",
|
|
52
|
-
tokenOut: "<value>",
|
|
53
|
-
amountIn: 1543.87,
|
|
54
|
-
slippage: "0.5",
|
|
55
|
-
};
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### `components.EarnTransferFromEOAParams`
|
|
59
|
-
|
|
60
|
-
```typescript
|
|
61
|
-
const value: components.EarnTransferFromEOAParams = {
|
|
62
|
-
actionType: "V2_TRANSFER_FROM_EOA",
|
|
63
|
-
token: "<value>",
|
|
64
|
-
amount: 4305.68,
|
|
65
|
-
permit2Signature: "<value>",
|
|
66
|
-
permit2Nonce: 649287,
|
|
67
|
-
permit2Deadline: 645376,
|
|
68
|
-
};
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### `components.EarnTransferToEOAParams`
|
|
72
|
-
|
|
73
|
-
```typescript
|
|
74
|
-
const value: components.EarnTransferToEOAParams = {
|
|
75
|
-
actionType: "V2_TRANSFER_TO_EOA",
|
|
76
|
-
token: "<value>",
|
|
77
|
-
amount: 692.89,
|
|
78
|
-
};
|
|
79
|
-
```
|
|
80
|
-
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# CreditWithdrawParams
|
|
2
|
-
|
|
3
|
-
Withdraw collateral from Aave via Credit Account.
|
|
4
|
-
|
|
5
|
-
## Example Usage
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
import { CreditWithdrawParams } from "@compass-labs/api-sdk/models/components";
|
|
9
|
-
|
|
10
|
-
let value: CreditWithdrawParams = {
|
|
11
|
-
actionType: "CREDIT_WITHDRAW",
|
|
12
|
-
token: "<value>",
|
|
13
|
-
amount: 6714.86,
|
|
14
|
-
};
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Fields
|
|
18
|
-
|
|
19
|
-
| Field | Type | Required | Description | Example |
|
|
20
|
-
| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- |
|
|
21
|
-
| `actionType` | *"CREDIT_WITHDRAW"* | :heavy_check_mark: | N/A | CREDIT_WITHDRAW |
|
|
22
|
-
| `token` | *string* | :heavy_check_mark: | Collateral token to withdraw from Aave. | |
|
|
23
|
-
| `amount` | *components.CreditWithdrawParamsAmount* | :heavy_check_mark: | Amount in token units to withdraw. | |
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# CreditWithdrawParamsAmount
|
|
2
|
-
|
|
3
|
-
Amount in token units to withdraw.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Supported Types
|
|
7
|
-
|
|
8
|
-
### `number`
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
const value: number = 1284.03;
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
### `string`
|
|
15
|
-
|
|
16
|
-
```typescript
|
|
17
|
-
const value: string = "<value>";
|
|
18
|
-
```
|
|
19
|
-
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# DebtPosition
|
|
2
|
-
|
|
3
|
-
A per-reserve debt position.
|
|
4
|
-
|
|
5
|
-
## Example Usage
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
import { DebtPosition } from "@compass-labs/api-sdk/models/components";
|
|
9
|
-
|
|
10
|
-
let value: DebtPosition = {
|
|
11
|
-
token: "<value>",
|
|
12
|
-
symbol: "<value>",
|
|
13
|
-
amountBorrowed: "<value>",
|
|
14
|
-
events: [],
|
|
15
|
-
};
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Fields
|
|
19
|
-
|
|
20
|
-
| Field | Type | Required | Description | Example |
|
|
21
|
-
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
|
22
|
-
| `token` | *string* | :heavy_check_mark: | Address of the borrow token. | |
|
|
23
|
-
| `symbol` | *string* | :heavy_check_mark: | Symbol of the borrow token (e.g. WETH). | |
|
|
24
|
-
| `amountBorrowed` | *string* | :heavy_check_mark: | Current on-chain variable debt balance. | |
|
|
25
|
-
| `usdValue` | *string* | :heavy_minus_sign: | Debt value in USD. | |
|
|
26
|
-
| `borrowApy` | *string* | :heavy_minus_sign: | Current borrow APY in percentage (e.g. 4.5 means 4.5%). | |
|
|
27
|
-
| `totalBorrowed` | *string* | :heavy_minus_sign: | Total amount borrowed across all borrow events. | |
|
|
28
|
-
| `totalRepaid` | *string* | :heavy_minus_sign: | Total amount repaid across all repay events. | |
|
|
29
|
-
| `interestPaid` | *string* | :heavy_minus_sign: | Interest paid on debt: on_chain_balance + total_repaid - total_borrowed. | |
|
|
30
|
-
| `events` | [components.CreditEvent](../../models/components/creditevent.md)[] | :heavy_minus_sign: | All historical events for this debt reserve. | [] |
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# EventType
|
|
2
|
-
|
|
3
|
-
Type of credit event.
|
|
4
|
-
|
|
5
|
-
## Example Usage
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
import { EventType } from "@compass-labs/api-sdk/models/components";
|
|
9
|
-
|
|
10
|
-
let value: EventType = "withdraw";
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Values
|
|
14
|
-
|
|
15
|
-
```typescript
|
|
16
|
-
"supply" | "withdraw" | "borrow" | "repay" | "liquidation"
|
|
17
|
-
```
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# RepayAmount
|
|
2
|
-
|
|
3
|
-
Amount of repay_token to repay (in token units, not wei).
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Supported Types
|
|
7
|
-
|
|
8
|
-
### `number`
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
const value: number = 0.01;
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
### `string`
|
|
15
|
-
|
|
16
|
-
```typescript
|
|
17
|
-
const value: string = "<value>";
|
|
18
|
-
```
|
|
19
|
-
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# WithdrawAmount
|
|
2
|
-
|
|
3
|
-
Amount of collateral to withdraw (in token units, not wei).
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Supported Types
|
|
7
|
-
|
|
8
|
-
### `number`
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
const value: number = 100;
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
### `string`
|
|
15
|
-
|
|
16
|
-
```typescript
|
|
17
|
-
const value: string = "<value>";
|
|
18
|
-
```
|
|
19
|
-
|