@compass-labs/api-sdk 1.0.4 → 1.0.6
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 +11 -0
- package/bin/mcp-server.js +2824 -1896
- package/bin/mcp-server.js.map +37 -19
- package/dist/commonjs/funcs/aaveV3AaveHistoricalTransactions.d.ts +4 -0
- package/dist/commonjs/funcs/aaveV3AaveHistoricalTransactions.d.ts.map +1 -1
- package/dist/commonjs/funcs/aaveV3AaveHistoricalTransactions.js +4 -0
- package/dist/commonjs/funcs/aaveV3AaveHistoricalTransactions.js.map +1 -1
- package/dist/commonjs/funcs/ethenaEthenaDeposit.d.ts +27 -0
- package/dist/commonjs/funcs/ethenaEthenaDeposit.d.ts.map +1 -0
- package/dist/commonjs/funcs/ethenaEthenaDeposit.js +127 -0
- package/dist/commonjs/funcs/ethenaEthenaDeposit.js.map +1 -0
- package/dist/commonjs/funcs/ethenaEthenaRequest.d.ts +34 -0
- package/dist/commonjs/funcs/ethenaEthenaRequest.d.ts.map +1 -0
- package/dist/commonjs/funcs/ethenaEthenaRequest.js +134 -0
- package/dist/commonjs/funcs/ethenaEthenaRequest.js.map +1 -0
- package/dist/commonjs/funcs/ethenaEthenaVault.d.ts +16 -0
- package/dist/commonjs/funcs/ethenaEthenaVault.d.ts.map +1 -0
- package/dist/commonjs/funcs/ethenaEthenaVault.js +121 -0
- package/dist/commonjs/funcs/ethenaEthenaVault.js.map +1 -0
- package/dist/commonjs/funcs/ethenaEthenaWithdraw.d.ts +29 -0
- package/dist/commonjs/funcs/ethenaEthenaWithdraw.d.ts.map +1 -0
- package/dist/commonjs/funcs/ethenaEthenaWithdraw.js +129 -0
- package/dist/commonjs/funcs/ethenaEthenaWithdraw.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +9 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/aaveV3AaveHistoricalTransactions.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/aaveV3AaveHistoricalTransactions.js +5 -1
- package/dist/commonjs/mcp-server/tools/aaveV3AaveHistoricalTransactions.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/ethenaEthenaDeposit.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/ethenaEthenaDeposit.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/ethenaEthenaDeposit.js +74 -0
- package/dist/commonjs/mcp-server/tools/ethenaEthenaDeposit.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/ethenaEthenaRequest.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/ethenaEthenaRequest.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/ethenaEthenaRequest.js +81 -0
- package/dist/commonjs/mcp-server/tools/ethenaEthenaRequest.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/ethenaEthenaVault.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/ethenaEthenaVault.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/ethenaEthenaVault.js +62 -0
- package/dist/commonjs/mcp-server/tools/ethenaEthenaVault.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/ethenaEthenaWithdraw.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/ethenaEthenaWithdraw.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/ethenaEthenaWithdraw.js +76 -0
- package/dist/commonjs/mcp-server/tools/ethenaEthenaWithdraw.js.map +1 -0
- package/dist/commonjs/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.d.ts +10 -4
- package/dist/commonjs/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.d.ts.map +1 -1
- package/dist/commonjs/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.js +8 -6
- package/dist/commonjs/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.js.map +1 -1
- package/dist/commonjs/models/components/cooldownposition.d.ts +66 -0
- package/dist/commonjs/models/components/cooldownposition.d.ts.map +1 -0
- package/dist/commonjs/models/components/cooldownposition.js +115 -0
- package/dist/commonjs/models/components/cooldownposition.js.map +1 -0
- package/dist/commonjs/models/components/ethenadepositparams.d.ts +63 -0
- package/dist/commonjs/models/components/ethenadepositparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/ethenadepositparams.js +105 -0
- package/dist/commonjs/models/components/ethenadepositparams.js.map +1 -0
- package/dist/commonjs/models/components/ethenadepositrequest.d.ts +93 -0
- package/dist/commonjs/models/components/ethenadepositrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/ethenadepositrequest.js +127 -0
- package/dist/commonjs/models/components/ethenadepositrequest.js.map +1 -0
- package/dist/commonjs/models/components/ethenagetvaultresponse.d.ts +80 -0
- package/dist/commonjs/models/components/ethenagetvaultresponse.d.ts.map +1 -0
- package/dist/commonjs/models/components/ethenagetvaultresponse.js +114 -0
- package/dist/commonjs/models/components/ethenagetvaultresponse.js.map +1 -0
- package/dist/commonjs/models/components/ethenarequesttowithdrawparams.d.ts +34 -0
- package/dist/commonjs/models/components/ethenarequesttowithdrawparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/ethenarequesttowithdrawparams.js +80 -0
- package/dist/commonjs/models/components/ethenarequesttowithdrawparams.js.map +1 -0
- package/dist/commonjs/models/components/ethenarequesttowithdrawrequest.d.ts +64 -0
- package/dist/commonjs/models/components/ethenarequesttowithdrawrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/ethenarequesttowithdrawrequest.js +102 -0
- package/dist/commonjs/models/components/ethenarequesttowithdrawrequest.js.map +1 -0
- package/dist/commonjs/models/components/ethenarequesttowithdrawtransactionresponse.d.ts +64 -0
- package/dist/commonjs/models/components/ethenarequesttowithdrawtransactionresponse.d.ts.map +1 -0
- package/dist/commonjs/models/components/ethenarequesttowithdrawtransactionresponse.js +122 -0
- package/dist/commonjs/models/components/ethenarequesttowithdrawtransactionresponse.js.map +1 -0
- package/dist/commonjs/models/components/ethenawithdrawparams.d.ts +39 -0
- package/dist/commonjs/models/components/ethenawithdrawparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/ethenawithdrawparams.js +82 -0
- package/dist/commonjs/models/components/ethenawithdrawparams.js.map +1 -0
- package/dist/commonjs/models/components/ethenawithdrawrequest.d.ts +69 -0
- package/dist/commonjs/models/components/ethenawithdrawrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/ethenawithdrawrequest.js +104 -0
- package/dist/commonjs/models/components/ethenawithdrawrequest.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +10 -1
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +10 -1
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/setallowanceparams.d.ts +3 -0
- package/dist/commonjs/models/components/setallowanceparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/setallowanceparams.js +1 -0
- package/dist/commonjs/models/components/setallowanceparams.js.map +1 -1
- package/dist/commonjs/models/components/setallowancerequest.d.ts +3 -0
- package/dist/commonjs/models/components/setallowancerequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/setallowancerequest.js +1 -0
- package/dist/commonjs/models/components/setallowancerequest.js.map +1 -1
- package/dist/commonjs/models/components/underlyingtoken.d.ts +35 -0
- package/dist/commonjs/models/components/underlyingtoken.d.ts.map +1 -0
- package/dist/commonjs/models/components/underlyingtoken.js +75 -0
- package/dist/commonjs/models/components/underlyingtoken.js.map +1 -0
- package/dist/commonjs/models/components/useroperation.d.ts +27 -0
- package/dist/commonjs/models/components/useroperation.d.ts.map +1 -1
- package/dist/commonjs/models/components/useroperation.js +27 -0
- package/dist/commonjs/models/components/useroperation.js.map +1 -1
- package/dist/commonjs/models/components/vaultgetvaultresponse.d.ts +3 -3
- package/dist/commonjs/models/components/vaultgetvaultresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/vaultgetvaultresponse.js +5 -3
- package/dist/commonjs/models/components/vaultgetvaultresponse.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/v1ethenavault.d.ts +62 -0
- package/dist/commonjs/models/operations/v1ethenavault.d.ts.map +1 -0
- package/dist/commonjs/models/operations/v1ethenavault.js +100 -0
- package/dist/commonjs/models/operations/v1ethenavault.js.map +1 -0
- package/dist/commonjs/models/operations/v1genericallowance.d.ts +3 -0
- package/dist/commonjs/models/operations/v1genericallowance.d.ts.map +1 -1
- package/dist/commonjs/models/operations/v1genericallowance.js +1 -0
- package/dist/commonjs/models/operations/v1genericallowance.js.map +1 -1
- package/dist/commonjs/sdk/aavev3.d.ts +4 -0
- package/dist/commonjs/sdk/aavev3.d.ts.map +1 -1
- package/dist/commonjs/sdk/aavev3.js +4 -0
- package/dist/commonjs/sdk/aavev3.js.map +1 -1
- package/dist/commonjs/sdk/ethena.d.ts +67 -0
- package/dist/commonjs/sdk/ethena.d.ts.map +1 -0
- package/dist/commonjs/sdk/ethena.js +85 -0
- package/dist/commonjs/sdk/ethena.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/aaveV3AaveHistoricalTransactions.d.ts +4 -0
- package/dist/esm/funcs/aaveV3AaveHistoricalTransactions.d.ts.map +1 -1
- package/dist/esm/funcs/aaveV3AaveHistoricalTransactions.js +4 -0
- package/dist/esm/funcs/aaveV3AaveHistoricalTransactions.js.map +1 -1
- package/dist/esm/funcs/ethenaEthenaDeposit.d.ts +27 -0
- package/dist/esm/funcs/ethenaEthenaDeposit.d.ts.map +1 -0
- package/dist/esm/funcs/ethenaEthenaDeposit.js +91 -0
- package/dist/esm/funcs/ethenaEthenaDeposit.js.map +1 -0
- package/dist/esm/funcs/ethenaEthenaRequest.d.ts +34 -0
- package/dist/esm/funcs/ethenaEthenaRequest.d.ts.map +1 -0
- package/dist/esm/funcs/ethenaEthenaRequest.js +98 -0
- package/dist/esm/funcs/ethenaEthenaRequest.js.map +1 -0
- package/dist/esm/funcs/ethenaEthenaVault.d.ts +16 -0
- package/dist/esm/funcs/ethenaEthenaVault.d.ts.map +1 -0
- package/dist/esm/funcs/ethenaEthenaVault.js +85 -0
- package/dist/esm/funcs/ethenaEthenaVault.js.map +1 -0
- package/dist/esm/funcs/ethenaEthenaWithdraw.d.ts +29 -0
- package/dist/esm/funcs/ethenaEthenaWithdraw.d.ts.map +1 -0
- package/dist/esm/funcs/ethenaEthenaWithdraw.js +93 -0
- package/dist/esm/funcs/ethenaEthenaWithdraw.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +9 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/aaveV3AaveHistoricalTransactions.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/aaveV3AaveHistoricalTransactions.js +5 -1
- package/dist/esm/mcp-server/tools/aaveV3AaveHistoricalTransactions.js.map +1 -1
- package/dist/esm/mcp-server/tools/ethenaEthenaDeposit.d.ts +8 -0
- package/dist/esm/mcp-server/tools/ethenaEthenaDeposit.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/ethenaEthenaDeposit.js +38 -0
- package/dist/esm/mcp-server/tools/ethenaEthenaDeposit.js.map +1 -0
- package/dist/esm/mcp-server/tools/ethenaEthenaRequest.d.ts +8 -0
- package/dist/esm/mcp-server/tools/ethenaEthenaRequest.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/ethenaEthenaRequest.js +45 -0
- package/dist/esm/mcp-server/tools/ethenaEthenaRequest.js.map +1 -0
- package/dist/esm/mcp-server/tools/ethenaEthenaVault.d.ts +8 -0
- package/dist/esm/mcp-server/tools/ethenaEthenaVault.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/ethenaEthenaVault.js +26 -0
- package/dist/esm/mcp-server/tools/ethenaEthenaVault.js.map +1 -0
- package/dist/esm/mcp-server/tools/ethenaEthenaWithdraw.d.ts +8 -0
- package/dist/esm/mcp-server/tools/ethenaEthenaWithdraw.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/ethenaEthenaWithdraw.js +40 -0
- package/dist/esm/mcp-server/tools/ethenaEthenaWithdraw.js.map +1 -0
- package/dist/esm/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.d.ts +10 -4
- package/dist/esm/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.d.ts.map +1 -1
- package/dist/esm/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.js +8 -6
- package/dist/esm/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.js.map +1 -1
- package/dist/esm/models/components/cooldownposition.d.ts +66 -0
- package/dist/esm/models/components/cooldownposition.d.ts.map +1 -0
- package/dist/esm/models/components/cooldownposition.js +75 -0
- package/dist/esm/models/components/cooldownposition.js.map +1 -0
- package/dist/esm/models/components/ethenadepositparams.d.ts +63 -0
- package/dist/esm/models/components/ethenadepositparams.d.ts.map +1 -0
- package/dist/esm/models/components/ethenadepositparams.js +65 -0
- package/dist/esm/models/components/ethenadepositparams.js.map +1 -0
- package/dist/esm/models/components/ethenadepositrequest.d.ts +93 -0
- package/dist/esm/models/components/ethenadepositrequest.d.ts.map +1 -0
- package/dist/esm/models/components/ethenadepositrequest.js +87 -0
- package/dist/esm/models/components/ethenadepositrequest.js.map +1 -0
- package/dist/esm/models/components/ethenagetvaultresponse.d.ts +80 -0
- package/dist/esm/models/components/ethenagetvaultresponse.d.ts.map +1 -0
- package/dist/esm/models/components/ethenagetvaultresponse.js +76 -0
- package/dist/esm/models/components/ethenagetvaultresponse.js.map +1 -0
- package/dist/esm/models/components/ethenarequesttowithdrawparams.d.ts +34 -0
- package/dist/esm/models/components/ethenarequesttowithdrawparams.d.ts.map +1 -0
- package/dist/esm/models/components/ethenarequesttowithdrawparams.js +42 -0
- package/dist/esm/models/components/ethenarequesttowithdrawparams.js.map +1 -0
- package/dist/esm/models/components/ethenarequesttowithdrawrequest.d.ts +64 -0
- package/dist/esm/models/components/ethenarequesttowithdrawrequest.d.ts.map +1 -0
- package/dist/esm/models/components/ethenarequesttowithdrawrequest.js +64 -0
- package/dist/esm/models/components/ethenarequesttowithdrawrequest.js.map +1 -0
- package/dist/esm/models/components/ethenarequesttowithdrawtransactionresponse.d.ts +64 -0
- package/dist/esm/models/components/ethenarequesttowithdrawtransactionresponse.d.ts.map +1 -0
- package/dist/esm/models/components/ethenarequesttowithdrawtransactionresponse.js +82 -0
- package/dist/esm/models/components/ethenarequesttowithdrawtransactionresponse.js.map +1 -0
- package/dist/esm/models/components/ethenawithdrawparams.d.ts +39 -0
- package/dist/esm/models/components/ethenawithdrawparams.d.ts.map +1 -0
- package/dist/esm/models/components/ethenawithdrawparams.js +44 -0
- package/dist/esm/models/components/ethenawithdrawparams.js.map +1 -0
- package/dist/esm/models/components/ethenawithdrawrequest.d.ts +69 -0
- package/dist/esm/models/components/ethenawithdrawrequest.d.ts.map +1 -0
- package/dist/esm/models/components/ethenawithdrawrequest.js +66 -0
- package/dist/esm/models/components/ethenawithdrawrequest.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +10 -1
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +10 -1
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/setallowanceparams.d.ts +3 -0
- package/dist/esm/models/components/setallowanceparams.d.ts.map +1 -1
- package/dist/esm/models/components/setallowanceparams.js +1 -0
- package/dist/esm/models/components/setallowanceparams.js.map +1 -1
- package/dist/esm/models/components/setallowancerequest.d.ts +3 -0
- package/dist/esm/models/components/setallowancerequest.d.ts.map +1 -1
- package/dist/esm/models/components/setallowancerequest.js +1 -0
- package/dist/esm/models/components/setallowancerequest.js.map +1 -1
- package/dist/esm/models/components/underlyingtoken.d.ts +35 -0
- package/dist/esm/models/components/underlyingtoken.d.ts.map +1 -0
- package/dist/esm/models/components/underlyingtoken.js +37 -0
- package/dist/esm/models/components/underlyingtoken.js.map +1 -0
- package/dist/esm/models/components/useroperation.d.ts +27 -0
- package/dist/esm/models/components/useroperation.d.ts.map +1 -1
- package/dist/esm/models/components/useroperation.js +27 -0
- package/dist/esm/models/components/useroperation.js.map +1 -1
- package/dist/esm/models/components/vaultgetvaultresponse.d.ts +3 -3
- package/dist/esm/models/components/vaultgetvaultresponse.d.ts.map +1 -1
- package/dist/esm/models/components/vaultgetvaultresponse.js +5 -3
- package/dist/esm/models/components/vaultgetvaultresponse.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/v1ethenavault.d.ts +62 -0
- package/dist/esm/models/operations/v1ethenavault.d.ts.map +1 -0
- package/dist/esm/models/operations/v1ethenavault.js +62 -0
- package/dist/esm/models/operations/v1ethenavault.js.map +1 -0
- package/dist/esm/models/operations/v1genericallowance.d.ts +3 -0
- package/dist/esm/models/operations/v1genericallowance.d.ts.map +1 -1
- package/dist/esm/models/operations/v1genericallowance.js +1 -0
- package/dist/esm/models/operations/v1genericallowance.js.map +1 -1
- package/dist/esm/sdk/aavev3.d.ts +4 -0
- package/dist/esm/sdk/aavev3.d.ts.map +1 -1
- package/dist/esm/sdk/aavev3.js +4 -0
- package/dist/esm/sdk/aavev3.js.map +1 -1
- package/dist/esm/sdk/ethena.d.ts +67 -0
- package/dist/esm/sdk/ethena.d.ts.map +1 -0
- package/dist/esm/sdk/ethena.js +81 -0
- package/dist/esm/sdk/ethena.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/docs/sdks/aavev3/README.md +4 -0
- package/docs/sdks/ethena/README.md +354 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/aaveV3AaveHistoricalTransactions.ts +4 -0
- package/src/funcs/ethenaEthenaDeposit.ts +178 -0
- package/src/funcs/ethenaEthenaRequest.ts +189 -0
- package/src/funcs/ethenaEthenaVault.ts +173 -0
- package/src/funcs/ethenaEthenaWithdraw.ts +180 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +9 -1
- package/src/mcp-server/tools/aaveV3AaveHistoricalTransactions.ts +5 -1
- package/src/mcp-server/tools/ethenaEthenaDeposit.ts +47 -0
- package/src/mcp-server/tools/ethenaEthenaRequest.ts +54 -0
- package/src/mcp-server/tools/ethenaEthenaVault.ts +35 -0
- package/src/mcp-server/tools/ethenaEthenaWithdraw.ts +49 -0
- package/src/models/components/compassapibackendmodelsvaultsreadresponsevaultuserposition.ts +18 -10
- package/src/models/components/cooldownposition.ts +151 -0
- package/src/models/components/ethenadepositparams.ts +142 -0
- package/src/models/components/ethenadepositrequest.ts +182 -0
- package/src/models/components/ethenagetvaultresponse.ts +188 -0
- package/src/models/components/ethenarequesttowithdrawparams.ts +88 -0
- package/src/models/components/ethenarequesttowithdrawrequest.ts +130 -0
- package/src/models/components/ethenarequesttowithdrawtransactionresponse.ts +208 -0
- package/src/models/components/ethenawithdrawparams.ts +89 -0
- package/src/models/components/ethenawithdrawrequest.ts +129 -0
- package/src/models/components/index.ts +10 -1
- package/src/models/components/setallowanceparams.ts +1 -0
- package/src/models/components/setallowancerequest.ts +1 -0
- package/src/models/components/underlyingtoken.ts +76 -0
- package/src/models/components/useroperation.ts +96 -0
- package/src/models/components/vaultgetvaultresponse.ts +12 -10
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/v1ethenavault.ts +116 -0
- package/src/models/operations/v1genericallowance.ts +1 -0
- package/src/sdk/aavev3.ts +4 -0
- package/src/sdk/ethena.ts +115 -0
- package/src/sdk/sdk.ts +6 -0
- package/dist/commonjs/models/components/compassapibackendmodelsvaultsreadresponsevaultasset.d.ts +0 -35
- package/dist/commonjs/models/components/compassapibackendmodelsvaultsreadresponsevaultasset.d.ts.map +0 -1
- package/dist/commonjs/models/components/compassapibackendmodelsvaultsreadresponsevaultasset.js +0 -75
- package/dist/commonjs/models/components/compassapibackendmodelsvaultsreadresponsevaultasset.js.map +0 -1
- package/dist/esm/models/components/compassapibackendmodelsvaultsreadresponsevaultasset.d.ts +0 -35
- package/dist/esm/models/components/compassapibackendmodelsvaultsreadresponsevaultasset.d.ts.map +0 -1
- package/dist/esm/models/components/compassapibackendmodelsvaultsreadresponsevaultasset.js +0 -37
- package/dist/esm/models/components/compassapibackendmodelsvaultsreadresponsevaultasset.js.map +0 -1
- package/src/models/components/compassapibackendmodelsvaultsreadresponsevaultasset.ts +0 -92
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
Apy,
|
|
12
|
+
Apy$inboundSchema,
|
|
13
|
+
Apy$Outbound,
|
|
14
|
+
Apy$outboundSchema,
|
|
15
|
+
} from "./apy.js";
|
|
16
|
+
import {
|
|
17
|
+
CompassApiBackendModelsVaultsReadResponseVaultUserPosition,
|
|
18
|
+
CompassApiBackendModelsVaultsReadResponseVaultUserPosition$inboundSchema,
|
|
19
|
+
CompassApiBackendModelsVaultsReadResponseVaultUserPosition$Outbound,
|
|
20
|
+
CompassApiBackendModelsVaultsReadResponseVaultUserPosition$outboundSchema,
|
|
21
|
+
} from "./compassapibackendmodelsvaultsreadresponsevaultuserposition.js";
|
|
22
|
+
import {
|
|
23
|
+
CooldownPosition,
|
|
24
|
+
CooldownPosition$inboundSchema,
|
|
25
|
+
CooldownPosition$Outbound,
|
|
26
|
+
CooldownPosition$outboundSchema,
|
|
27
|
+
} from "./cooldownposition.js";
|
|
28
|
+
import {
|
|
29
|
+
UnderlyingToken,
|
|
30
|
+
UnderlyingToken$inboundSchema,
|
|
31
|
+
UnderlyingToken$Outbound,
|
|
32
|
+
UnderlyingToken$outboundSchema,
|
|
33
|
+
} from "./underlyingtoken.js";
|
|
34
|
+
|
|
35
|
+
export type EthenaGetVaultResponse = {
|
|
36
|
+
/**
|
|
37
|
+
* Name of the vault.
|
|
38
|
+
*/
|
|
39
|
+
name: string;
|
|
40
|
+
/**
|
|
41
|
+
* Symbol of the vault.
|
|
42
|
+
*/
|
|
43
|
+
symbol: string;
|
|
44
|
+
/**
|
|
45
|
+
* Number of decimals used for the vault's share precision.
|
|
46
|
+
*/
|
|
47
|
+
decimals: number;
|
|
48
|
+
/**
|
|
49
|
+
* Total amount of assets deposited in the vault.
|
|
50
|
+
*/
|
|
51
|
+
totalAssets: string;
|
|
52
|
+
/**
|
|
53
|
+
* Total amount of shares issued from the vault.
|
|
54
|
+
*/
|
|
55
|
+
totalSupply: string;
|
|
56
|
+
/**
|
|
57
|
+
* The price of one vault share in terms of the underlying asset.
|
|
58
|
+
*/
|
|
59
|
+
sharePrice: string;
|
|
60
|
+
underlyingToken: UnderlyingToken;
|
|
61
|
+
apy: Apy;
|
|
62
|
+
/**
|
|
63
|
+
* The user's position in the vault.
|
|
64
|
+
*/
|
|
65
|
+
userPosition?:
|
|
66
|
+
| CompassApiBackendModelsVaultsReadResponseVaultUserPosition
|
|
67
|
+
| null
|
|
68
|
+
| undefined;
|
|
69
|
+
/**
|
|
70
|
+
* The duration of days that must pass before a position can be withdrawn from the Ethena vault after a request to withdraw has been made.
|
|
71
|
+
*/
|
|
72
|
+
cooldownDurationDays: number;
|
|
73
|
+
/**
|
|
74
|
+
* The user's cooldown position.
|
|
75
|
+
*/
|
|
76
|
+
cooldownPosition?: CooldownPosition | null | undefined;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
/** @internal */
|
|
80
|
+
export const EthenaGetVaultResponse$inboundSchema: z.ZodType<
|
|
81
|
+
EthenaGetVaultResponse,
|
|
82
|
+
z.ZodTypeDef,
|
|
83
|
+
unknown
|
|
84
|
+
> = z.object({
|
|
85
|
+
name: z.string(),
|
|
86
|
+
symbol: z.string(),
|
|
87
|
+
decimals: z.number().int(),
|
|
88
|
+
total_assets: z.string(),
|
|
89
|
+
total_supply: z.string(),
|
|
90
|
+
share_price: z.string(),
|
|
91
|
+
underlying_token: UnderlyingToken$inboundSchema,
|
|
92
|
+
apy: Apy$inboundSchema,
|
|
93
|
+
user_position: z.nullable(
|
|
94
|
+
CompassApiBackendModelsVaultsReadResponseVaultUserPosition$inboundSchema,
|
|
95
|
+
).optional(),
|
|
96
|
+
cooldown_duration_days: z.number().int(),
|
|
97
|
+
cooldown_position: z.nullable(CooldownPosition$inboundSchema).optional(),
|
|
98
|
+
}).transform((v) => {
|
|
99
|
+
return remap$(v, {
|
|
100
|
+
"total_assets": "totalAssets",
|
|
101
|
+
"total_supply": "totalSupply",
|
|
102
|
+
"share_price": "sharePrice",
|
|
103
|
+
"underlying_token": "underlyingToken",
|
|
104
|
+
"user_position": "userPosition",
|
|
105
|
+
"cooldown_duration_days": "cooldownDurationDays",
|
|
106
|
+
"cooldown_position": "cooldownPosition",
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
/** @internal */
|
|
111
|
+
export type EthenaGetVaultResponse$Outbound = {
|
|
112
|
+
name: string;
|
|
113
|
+
symbol: string;
|
|
114
|
+
decimals: number;
|
|
115
|
+
total_assets: string;
|
|
116
|
+
total_supply: string;
|
|
117
|
+
share_price: string;
|
|
118
|
+
underlying_token: UnderlyingToken$Outbound;
|
|
119
|
+
apy: Apy$Outbound;
|
|
120
|
+
user_position?:
|
|
121
|
+
| CompassApiBackendModelsVaultsReadResponseVaultUserPosition$Outbound
|
|
122
|
+
| null
|
|
123
|
+
| undefined;
|
|
124
|
+
cooldown_duration_days: number;
|
|
125
|
+
cooldown_position?: CooldownPosition$Outbound | null | undefined;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
/** @internal */
|
|
129
|
+
export const EthenaGetVaultResponse$outboundSchema: z.ZodType<
|
|
130
|
+
EthenaGetVaultResponse$Outbound,
|
|
131
|
+
z.ZodTypeDef,
|
|
132
|
+
EthenaGetVaultResponse
|
|
133
|
+
> = z.object({
|
|
134
|
+
name: z.string(),
|
|
135
|
+
symbol: z.string(),
|
|
136
|
+
decimals: z.number().int(),
|
|
137
|
+
totalAssets: z.string(),
|
|
138
|
+
totalSupply: z.string(),
|
|
139
|
+
sharePrice: z.string(),
|
|
140
|
+
underlyingToken: UnderlyingToken$outboundSchema,
|
|
141
|
+
apy: Apy$outboundSchema,
|
|
142
|
+
userPosition: z.nullable(
|
|
143
|
+
CompassApiBackendModelsVaultsReadResponseVaultUserPosition$outboundSchema,
|
|
144
|
+
).optional(),
|
|
145
|
+
cooldownDurationDays: z.number().int(),
|
|
146
|
+
cooldownPosition: z.nullable(CooldownPosition$outboundSchema).optional(),
|
|
147
|
+
}).transform((v) => {
|
|
148
|
+
return remap$(v, {
|
|
149
|
+
totalAssets: "total_assets",
|
|
150
|
+
totalSupply: "total_supply",
|
|
151
|
+
sharePrice: "share_price",
|
|
152
|
+
underlyingToken: "underlying_token",
|
|
153
|
+
userPosition: "user_position",
|
|
154
|
+
cooldownDurationDays: "cooldown_duration_days",
|
|
155
|
+
cooldownPosition: "cooldown_position",
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @internal
|
|
161
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
162
|
+
*/
|
|
163
|
+
export namespace EthenaGetVaultResponse$ {
|
|
164
|
+
/** @deprecated use `EthenaGetVaultResponse$inboundSchema` instead. */
|
|
165
|
+
export const inboundSchema = EthenaGetVaultResponse$inboundSchema;
|
|
166
|
+
/** @deprecated use `EthenaGetVaultResponse$outboundSchema` instead. */
|
|
167
|
+
export const outboundSchema = EthenaGetVaultResponse$outboundSchema;
|
|
168
|
+
/** @deprecated use `EthenaGetVaultResponse$Outbound` instead. */
|
|
169
|
+
export type Outbound = EthenaGetVaultResponse$Outbound;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export function ethenaGetVaultResponseToJSON(
|
|
173
|
+
ethenaGetVaultResponse: EthenaGetVaultResponse,
|
|
174
|
+
): string {
|
|
175
|
+
return JSON.stringify(
|
|
176
|
+
EthenaGetVaultResponse$outboundSchema.parse(ethenaGetVaultResponse),
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export function ethenaGetVaultResponseFromJSON(
|
|
181
|
+
jsonString: string,
|
|
182
|
+
): SafeParseResult<EthenaGetVaultResponse, SDKValidationError> {
|
|
183
|
+
return safeParse(
|
|
184
|
+
jsonString,
|
|
185
|
+
(x) => EthenaGetVaultResponse$inboundSchema.parse(JSON.parse(x)),
|
|
186
|
+
`Failed to parse 'EthenaGetVaultResponse' from JSON`,
|
|
187
|
+
);
|
|
188
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type EthenaRequestToWithdrawParams = {
|
|
12
|
+
actionType?: "ETHENA_REQUEST_WITHDRAW" | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* The amount of USDe to request to withdraw from Ethena's vault. If set to 'ALL', your total deposited USDe amount will be requested to be withdrawn.
|
|
15
|
+
*/
|
|
16
|
+
amount?: any | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const EthenaRequestToWithdrawParams$inboundSchema: z.ZodType<
|
|
21
|
+
EthenaRequestToWithdrawParams,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
unknown
|
|
24
|
+
> = z.object({
|
|
25
|
+
action_type: z.literal("ETHENA_REQUEST_WITHDRAW").default(
|
|
26
|
+
"ETHENA_REQUEST_WITHDRAW",
|
|
27
|
+
),
|
|
28
|
+
amount: z.any().optional(),
|
|
29
|
+
}).transform((v) => {
|
|
30
|
+
return remap$(v, {
|
|
31
|
+
"action_type": "actionType",
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export type EthenaRequestToWithdrawParams$Outbound = {
|
|
37
|
+
action_type: "ETHENA_REQUEST_WITHDRAW";
|
|
38
|
+
amount?: any | undefined;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const EthenaRequestToWithdrawParams$outboundSchema: z.ZodType<
|
|
43
|
+
EthenaRequestToWithdrawParams$Outbound,
|
|
44
|
+
z.ZodTypeDef,
|
|
45
|
+
EthenaRequestToWithdrawParams
|
|
46
|
+
> = z.object({
|
|
47
|
+
actionType: z.literal("ETHENA_REQUEST_WITHDRAW").default(
|
|
48
|
+
"ETHENA_REQUEST_WITHDRAW" as const,
|
|
49
|
+
),
|
|
50
|
+
amount: z.any().optional(),
|
|
51
|
+
}).transform((v) => {
|
|
52
|
+
return remap$(v, {
|
|
53
|
+
actionType: "action_type",
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @internal
|
|
59
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
60
|
+
*/
|
|
61
|
+
export namespace EthenaRequestToWithdrawParams$ {
|
|
62
|
+
/** @deprecated use `EthenaRequestToWithdrawParams$inboundSchema` instead. */
|
|
63
|
+
export const inboundSchema = EthenaRequestToWithdrawParams$inboundSchema;
|
|
64
|
+
/** @deprecated use `EthenaRequestToWithdrawParams$outboundSchema` instead. */
|
|
65
|
+
export const outboundSchema = EthenaRequestToWithdrawParams$outboundSchema;
|
|
66
|
+
/** @deprecated use `EthenaRequestToWithdrawParams$Outbound` instead. */
|
|
67
|
+
export type Outbound = EthenaRequestToWithdrawParams$Outbound;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function ethenaRequestToWithdrawParamsToJSON(
|
|
71
|
+
ethenaRequestToWithdrawParams: EthenaRequestToWithdrawParams,
|
|
72
|
+
): string {
|
|
73
|
+
return JSON.stringify(
|
|
74
|
+
EthenaRequestToWithdrawParams$outboundSchema.parse(
|
|
75
|
+
ethenaRequestToWithdrawParams,
|
|
76
|
+
),
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function ethenaRequestToWithdrawParamsFromJSON(
|
|
81
|
+
jsonString: string,
|
|
82
|
+
): SafeParseResult<EthenaRequestToWithdrawParams, SDKValidationError> {
|
|
83
|
+
return safeParse(
|
|
84
|
+
jsonString,
|
|
85
|
+
(x) => EthenaRequestToWithdrawParams$inboundSchema.parse(JSON.parse(x)),
|
|
86
|
+
`Failed to parse 'EthenaRequestToWithdrawParams' from JSON`,
|
|
87
|
+
);
|
|
88
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export const EthenaRequestToWithdrawRequestChain = {
|
|
13
|
+
Ethereum: "ethereum",
|
|
14
|
+
} as const;
|
|
15
|
+
export type EthenaRequestToWithdrawRequestChain = ClosedEnum<
|
|
16
|
+
typeof EthenaRequestToWithdrawRequestChain
|
|
17
|
+
>;
|
|
18
|
+
|
|
19
|
+
export type EthenaRequestToWithdrawRequest = {
|
|
20
|
+
actionType?: "ETHENA_REQUEST_WITHDRAW" | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* The amount of USDe to request to withdraw from Ethena's vault. If set to 'ALL', your total deposited USDe amount will be requested to be withdrawn.
|
|
23
|
+
*/
|
|
24
|
+
amount?: any | undefined;
|
|
25
|
+
chain: EthenaRequestToWithdrawRequestChain;
|
|
26
|
+
/**
|
|
27
|
+
* The address of the transaction sender.
|
|
28
|
+
*/
|
|
29
|
+
sender: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const EthenaRequestToWithdrawRequestChain$inboundSchema: z.ZodNativeEnum<
|
|
34
|
+
typeof EthenaRequestToWithdrawRequestChain
|
|
35
|
+
> = z.nativeEnum(EthenaRequestToWithdrawRequestChain);
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const EthenaRequestToWithdrawRequestChain$outboundSchema:
|
|
39
|
+
z.ZodNativeEnum<typeof EthenaRequestToWithdrawRequestChain> =
|
|
40
|
+
EthenaRequestToWithdrawRequestChain$inboundSchema;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @internal
|
|
44
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
45
|
+
*/
|
|
46
|
+
export namespace EthenaRequestToWithdrawRequestChain$ {
|
|
47
|
+
/** @deprecated use `EthenaRequestToWithdrawRequestChain$inboundSchema` instead. */
|
|
48
|
+
export const inboundSchema =
|
|
49
|
+
EthenaRequestToWithdrawRequestChain$inboundSchema;
|
|
50
|
+
/** @deprecated use `EthenaRequestToWithdrawRequestChain$outboundSchema` instead. */
|
|
51
|
+
export const outboundSchema =
|
|
52
|
+
EthenaRequestToWithdrawRequestChain$outboundSchema;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
export const EthenaRequestToWithdrawRequest$inboundSchema: z.ZodType<
|
|
57
|
+
EthenaRequestToWithdrawRequest,
|
|
58
|
+
z.ZodTypeDef,
|
|
59
|
+
unknown
|
|
60
|
+
> = z.object({
|
|
61
|
+
action_type: z.literal("ETHENA_REQUEST_WITHDRAW").default(
|
|
62
|
+
"ETHENA_REQUEST_WITHDRAW",
|
|
63
|
+
),
|
|
64
|
+
amount: z.any().optional(),
|
|
65
|
+
chain: EthenaRequestToWithdrawRequestChain$inboundSchema,
|
|
66
|
+
sender: z.string(),
|
|
67
|
+
}).transform((v) => {
|
|
68
|
+
return remap$(v, {
|
|
69
|
+
"action_type": "actionType",
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
/** @internal */
|
|
74
|
+
export type EthenaRequestToWithdrawRequest$Outbound = {
|
|
75
|
+
action_type: "ETHENA_REQUEST_WITHDRAW";
|
|
76
|
+
amount?: any | undefined;
|
|
77
|
+
chain: string;
|
|
78
|
+
sender: string;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/** @internal */
|
|
82
|
+
export const EthenaRequestToWithdrawRequest$outboundSchema: z.ZodType<
|
|
83
|
+
EthenaRequestToWithdrawRequest$Outbound,
|
|
84
|
+
z.ZodTypeDef,
|
|
85
|
+
EthenaRequestToWithdrawRequest
|
|
86
|
+
> = z.object({
|
|
87
|
+
actionType: z.literal("ETHENA_REQUEST_WITHDRAW").default(
|
|
88
|
+
"ETHENA_REQUEST_WITHDRAW" as const,
|
|
89
|
+
),
|
|
90
|
+
amount: z.any().optional(),
|
|
91
|
+
chain: EthenaRequestToWithdrawRequestChain$outboundSchema,
|
|
92
|
+
sender: z.string(),
|
|
93
|
+
}).transform((v) => {
|
|
94
|
+
return remap$(v, {
|
|
95
|
+
actionType: "action_type",
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @internal
|
|
101
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
102
|
+
*/
|
|
103
|
+
export namespace EthenaRequestToWithdrawRequest$ {
|
|
104
|
+
/** @deprecated use `EthenaRequestToWithdrawRequest$inboundSchema` instead. */
|
|
105
|
+
export const inboundSchema = EthenaRequestToWithdrawRequest$inboundSchema;
|
|
106
|
+
/** @deprecated use `EthenaRequestToWithdrawRequest$outboundSchema` instead. */
|
|
107
|
+
export const outboundSchema = EthenaRequestToWithdrawRequest$outboundSchema;
|
|
108
|
+
/** @deprecated use `EthenaRequestToWithdrawRequest$Outbound` instead. */
|
|
109
|
+
export type Outbound = EthenaRequestToWithdrawRequest$Outbound;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function ethenaRequestToWithdrawRequestToJSON(
|
|
113
|
+
ethenaRequestToWithdrawRequest: EthenaRequestToWithdrawRequest,
|
|
114
|
+
): string {
|
|
115
|
+
return JSON.stringify(
|
|
116
|
+
EthenaRequestToWithdrawRequest$outboundSchema.parse(
|
|
117
|
+
ethenaRequestToWithdrawRequest,
|
|
118
|
+
),
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function ethenaRequestToWithdrawRequestFromJSON(
|
|
123
|
+
jsonString: string,
|
|
124
|
+
): SafeParseResult<EthenaRequestToWithdrawRequest, SDKValidationError> {
|
|
125
|
+
return safeParse(
|
|
126
|
+
jsonString,
|
|
127
|
+
(x) => EthenaRequestToWithdrawRequest$inboundSchema.parse(JSON.parse(x)),
|
|
128
|
+
`Failed to parse 'EthenaRequestToWithdrawRequest' from JSON`,
|
|
129
|
+
);
|
|
130
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
UnsignedMulticallTransaction,
|
|
12
|
+
UnsignedMulticallTransaction$inboundSchema,
|
|
13
|
+
UnsignedMulticallTransaction$Outbound,
|
|
14
|
+
UnsignedMulticallTransaction$outboundSchema,
|
|
15
|
+
} from "./unsignedmulticalltransaction.js";
|
|
16
|
+
import {
|
|
17
|
+
UnsignedTransaction,
|
|
18
|
+
UnsignedTransaction$inboundSchema,
|
|
19
|
+
UnsignedTransaction$Outbound,
|
|
20
|
+
UnsignedTransaction$outboundSchema,
|
|
21
|
+
} from "./unsignedtransaction.js";
|
|
22
|
+
import {
|
|
23
|
+
UserOperationResponse,
|
|
24
|
+
UserOperationResponse$inboundSchema,
|
|
25
|
+
UserOperationResponse$Outbound,
|
|
26
|
+
UserOperationResponse$outboundSchema,
|
|
27
|
+
} from "./useroperationresponse.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The unsigned transaction data. User must sign and broadcast to network.
|
|
31
|
+
*/
|
|
32
|
+
export type EthenaRequestToWithdrawTransactionResponseTransaction =
|
|
33
|
+
| UnsignedTransaction
|
|
34
|
+
| UnsignedMulticallTransaction
|
|
35
|
+
| UserOperationResponse;
|
|
36
|
+
|
|
37
|
+
export type EthenaRequestToWithdrawTransactionResponse = {
|
|
38
|
+
/**
|
|
39
|
+
* The unsigned transaction data. User must sign and broadcast to network.
|
|
40
|
+
*/
|
|
41
|
+
transaction:
|
|
42
|
+
| UnsignedTransaction
|
|
43
|
+
| UnsignedMulticallTransaction
|
|
44
|
+
| UserOperationResponse;
|
|
45
|
+
/**
|
|
46
|
+
* The duration of days that must pass before a position can be withdrawn from the Ethena vault after a request to withdraw has been made.
|
|
47
|
+
*/
|
|
48
|
+
cooldownDurationDays: number;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const EthenaRequestToWithdrawTransactionResponseTransaction$inboundSchema:
|
|
53
|
+
z.ZodType<
|
|
54
|
+
EthenaRequestToWithdrawTransactionResponseTransaction,
|
|
55
|
+
z.ZodTypeDef,
|
|
56
|
+
unknown
|
|
57
|
+
> = z.union([
|
|
58
|
+
UnsignedTransaction$inboundSchema,
|
|
59
|
+
UnsignedMulticallTransaction$inboundSchema,
|
|
60
|
+
UserOperationResponse$inboundSchema,
|
|
61
|
+
]);
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export type EthenaRequestToWithdrawTransactionResponseTransaction$Outbound =
|
|
65
|
+
| UnsignedTransaction$Outbound
|
|
66
|
+
| UnsignedMulticallTransaction$Outbound
|
|
67
|
+
| UserOperationResponse$Outbound;
|
|
68
|
+
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const EthenaRequestToWithdrawTransactionResponseTransaction$outboundSchema:
|
|
71
|
+
z.ZodType<
|
|
72
|
+
EthenaRequestToWithdrawTransactionResponseTransaction$Outbound,
|
|
73
|
+
z.ZodTypeDef,
|
|
74
|
+
EthenaRequestToWithdrawTransactionResponseTransaction
|
|
75
|
+
> = z.union([
|
|
76
|
+
UnsignedTransaction$outboundSchema,
|
|
77
|
+
UnsignedMulticallTransaction$outboundSchema,
|
|
78
|
+
UserOperationResponse$outboundSchema,
|
|
79
|
+
]);
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
84
|
+
*/
|
|
85
|
+
export namespace EthenaRequestToWithdrawTransactionResponseTransaction$ {
|
|
86
|
+
/** @deprecated use `EthenaRequestToWithdrawTransactionResponseTransaction$inboundSchema` instead. */
|
|
87
|
+
export const inboundSchema =
|
|
88
|
+
EthenaRequestToWithdrawTransactionResponseTransaction$inboundSchema;
|
|
89
|
+
/** @deprecated use `EthenaRequestToWithdrawTransactionResponseTransaction$outboundSchema` instead. */
|
|
90
|
+
export const outboundSchema =
|
|
91
|
+
EthenaRequestToWithdrawTransactionResponseTransaction$outboundSchema;
|
|
92
|
+
/** @deprecated use `EthenaRequestToWithdrawTransactionResponseTransaction$Outbound` instead. */
|
|
93
|
+
export type Outbound =
|
|
94
|
+
EthenaRequestToWithdrawTransactionResponseTransaction$Outbound;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function ethenaRequestToWithdrawTransactionResponseTransactionToJSON(
|
|
98
|
+
ethenaRequestToWithdrawTransactionResponseTransaction:
|
|
99
|
+
EthenaRequestToWithdrawTransactionResponseTransaction,
|
|
100
|
+
): string {
|
|
101
|
+
return JSON.stringify(
|
|
102
|
+
EthenaRequestToWithdrawTransactionResponseTransaction$outboundSchema.parse(
|
|
103
|
+
ethenaRequestToWithdrawTransactionResponseTransaction,
|
|
104
|
+
),
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function ethenaRequestToWithdrawTransactionResponseTransactionFromJSON(
|
|
109
|
+
jsonString: string,
|
|
110
|
+
): SafeParseResult<
|
|
111
|
+
EthenaRequestToWithdrawTransactionResponseTransaction,
|
|
112
|
+
SDKValidationError
|
|
113
|
+
> {
|
|
114
|
+
return safeParse(
|
|
115
|
+
jsonString,
|
|
116
|
+
(x) =>
|
|
117
|
+
EthenaRequestToWithdrawTransactionResponseTransaction$inboundSchema.parse(
|
|
118
|
+
JSON.parse(x),
|
|
119
|
+
),
|
|
120
|
+
`Failed to parse 'EthenaRequestToWithdrawTransactionResponseTransaction' from JSON`,
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** @internal */
|
|
125
|
+
export const EthenaRequestToWithdrawTransactionResponse$inboundSchema:
|
|
126
|
+
z.ZodType<EthenaRequestToWithdrawTransactionResponse, z.ZodTypeDef, unknown> =
|
|
127
|
+
z.object({
|
|
128
|
+
transaction: z.union([
|
|
129
|
+
UnsignedTransaction$inboundSchema,
|
|
130
|
+
UnsignedMulticallTransaction$inboundSchema,
|
|
131
|
+
UserOperationResponse$inboundSchema,
|
|
132
|
+
]),
|
|
133
|
+
cooldown_duration_days: z.number().int(),
|
|
134
|
+
}).transform((v) => {
|
|
135
|
+
return remap$(v, {
|
|
136
|
+
"cooldown_duration_days": "cooldownDurationDays",
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
/** @internal */
|
|
141
|
+
export type EthenaRequestToWithdrawTransactionResponse$Outbound = {
|
|
142
|
+
transaction:
|
|
143
|
+
| UnsignedTransaction$Outbound
|
|
144
|
+
| UnsignedMulticallTransaction$Outbound
|
|
145
|
+
| UserOperationResponse$Outbound;
|
|
146
|
+
cooldown_duration_days: number;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
/** @internal */
|
|
150
|
+
export const EthenaRequestToWithdrawTransactionResponse$outboundSchema:
|
|
151
|
+
z.ZodType<
|
|
152
|
+
EthenaRequestToWithdrawTransactionResponse$Outbound,
|
|
153
|
+
z.ZodTypeDef,
|
|
154
|
+
EthenaRequestToWithdrawTransactionResponse
|
|
155
|
+
> = z.object({
|
|
156
|
+
transaction: z.union([
|
|
157
|
+
UnsignedTransaction$outboundSchema,
|
|
158
|
+
UnsignedMulticallTransaction$outboundSchema,
|
|
159
|
+
UserOperationResponse$outboundSchema,
|
|
160
|
+
]),
|
|
161
|
+
cooldownDurationDays: z.number().int(),
|
|
162
|
+
}).transform((v) => {
|
|
163
|
+
return remap$(v, {
|
|
164
|
+
cooldownDurationDays: "cooldown_duration_days",
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* @internal
|
|
170
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
171
|
+
*/
|
|
172
|
+
export namespace EthenaRequestToWithdrawTransactionResponse$ {
|
|
173
|
+
/** @deprecated use `EthenaRequestToWithdrawTransactionResponse$inboundSchema` instead. */
|
|
174
|
+
export const inboundSchema =
|
|
175
|
+
EthenaRequestToWithdrawTransactionResponse$inboundSchema;
|
|
176
|
+
/** @deprecated use `EthenaRequestToWithdrawTransactionResponse$outboundSchema` instead. */
|
|
177
|
+
export const outboundSchema =
|
|
178
|
+
EthenaRequestToWithdrawTransactionResponse$outboundSchema;
|
|
179
|
+
/** @deprecated use `EthenaRequestToWithdrawTransactionResponse$Outbound` instead. */
|
|
180
|
+
export type Outbound = EthenaRequestToWithdrawTransactionResponse$Outbound;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export function ethenaRequestToWithdrawTransactionResponseToJSON(
|
|
184
|
+
ethenaRequestToWithdrawTransactionResponse:
|
|
185
|
+
EthenaRequestToWithdrawTransactionResponse,
|
|
186
|
+
): string {
|
|
187
|
+
return JSON.stringify(
|
|
188
|
+
EthenaRequestToWithdrawTransactionResponse$outboundSchema.parse(
|
|
189
|
+
ethenaRequestToWithdrawTransactionResponse,
|
|
190
|
+
),
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export function ethenaRequestToWithdrawTransactionResponseFromJSON(
|
|
195
|
+
jsonString: string,
|
|
196
|
+
): SafeParseResult<
|
|
197
|
+
EthenaRequestToWithdrawTransactionResponse,
|
|
198
|
+
SDKValidationError
|
|
199
|
+
> {
|
|
200
|
+
return safeParse(
|
|
201
|
+
jsonString,
|
|
202
|
+
(x) =>
|
|
203
|
+
EthenaRequestToWithdrawTransactionResponse$inboundSchema.parse(
|
|
204
|
+
JSON.parse(x),
|
|
205
|
+
),
|
|
206
|
+
`Failed to parse 'EthenaRequestToWithdrawTransactionResponse' from JSON`,
|
|
207
|
+
);
|
|
208
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type EthenaWithdrawParams = {
|
|
12
|
+
actionType?: "ETHENA_WITHDRAW" | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* The amount of USDe to withdraw from Ethena's vault. If set to 'ALL', your total deposited USDe amount will be withdrawn.
|
|
15
|
+
*/
|
|
16
|
+
amount?: any | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* The address which will receive the USDe withdrawn. Defaults to the sender.
|
|
19
|
+
*/
|
|
20
|
+
receiver?: string | null | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const EthenaWithdrawParams$inboundSchema: z.ZodType<
|
|
25
|
+
EthenaWithdrawParams,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.object({
|
|
29
|
+
action_type: z.literal("ETHENA_WITHDRAW").default("ETHENA_WITHDRAW"),
|
|
30
|
+
amount: z.any().optional(),
|
|
31
|
+
receiver: z.nullable(z.string()).optional(),
|
|
32
|
+
}).transform((v) => {
|
|
33
|
+
return remap$(v, {
|
|
34
|
+
"action_type": "actionType",
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type EthenaWithdrawParams$Outbound = {
|
|
40
|
+
action_type: "ETHENA_WITHDRAW";
|
|
41
|
+
amount?: any | undefined;
|
|
42
|
+
receiver?: string | null | undefined;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const EthenaWithdrawParams$outboundSchema: z.ZodType<
|
|
47
|
+
EthenaWithdrawParams$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
EthenaWithdrawParams
|
|
50
|
+
> = z.object({
|
|
51
|
+
actionType: z.literal("ETHENA_WITHDRAW").default("ETHENA_WITHDRAW" as const),
|
|
52
|
+
amount: z.any().optional(),
|
|
53
|
+
receiver: z.nullable(z.string()).optional(),
|
|
54
|
+
}).transform((v) => {
|
|
55
|
+
return remap$(v, {
|
|
56
|
+
actionType: "action_type",
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
63
|
+
*/
|
|
64
|
+
export namespace EthenaWithdrawParams$ {
|
|
65
|
+
/** @deprecated use `EthenaWithdrawParams$inboundSchema` instead. */
|
|
66
|
+
export const inboundSchema = EthenaWithdrawParams$inboundSchema;
|
|
67
|
+
/** @deprecated use `EthenaWithdrawParams$outboundSchema` instead. */
|
|
68
|
+
export const outboundSchema = EthenaWithdrawParams$outboundSchema;
|
|
69
|
+
/** @deprecated use `EthenaWithdrawParams$Outbound` instead. */
|
|
70
|
+
export type Outbound = EthenaWithdrawParams$Outbound;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function ethenaWithdrawParamsToJSON(
|
|
74
|
+
ethenaWithdrawParams: EthenaWithdrawParams,
|
|
75
|
+
): string {
|
|
76
|
+
return JSON.stringify(
|
|
77
|
+
EthenaWithdrawParams$outboundSchema.parse(ethenaWithdrawParams),
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function ethenaWithdrawParamsFromJSON(
|
|
82
|
+
jsonString: string,
|
|
83
|
+
): SafeParseResult<EthenaWithdrawParams, SDKValidationError> {
|
|
84
|
+
return safeParse(
|
|
85
|
+
jsonString,
|
|
86
|
+
(x) => EthenaWithdrawParams$inboundSchema.parse(JSON.parse(x)),
|
|
87
|
+
`Failed to parse 'EthenaWithdrawParams' from JSON`,
|
|
88
|
+
);
|
|
89
|
+
}
|