@lifi/perps-sdk-provider-ondo 0.0.0-preview-7ff840c
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/LICENSE +201 -0
- package/README.md +38 -0
- package/dist/cjs/OndoProvider.d.ts +8 -0
- package/dist/cjs/OndoProvider.d.ts.map +1 -0
- package/dist/cjs/OndoProvider.js +338 -0
- package/dist/cjs/OndoProvider.js.map +1 -0
- package/dist/cjs/accountConfig.d.ts +3 -0
- package/dist/cjs/accountConfig.d.ts.map +1 -0
- package/dist/cjs/accountConfig.js +59 -0
- package/dist/cjs/accountConfig.js.map +1 -0
- package/dist/cjs/accountSummary.d.ts +3 -0
- package/dist/cjs/accountSummary.d.ts.map +1 -0
- package/dist/cjs/accountSummary.js +8 -0
- package/dist/cjs/accountSummary.js.map +1 -0
- package/dist/cjs/auth/OndoTokenStore.d.ts +13 -0
- package/dist/cjs/auth/OndoTokenStore.d.ts.map +1 -0
- package/dist/cjs/auth/OndoTokenStore.js +53 -0
- package/dist/cjs/auth/OndoTokenStore.js.map +1 -0
- package/dist/cjs/auth/completeSiweLogin.d.ts +13 -0
- package/dist/cjs/auth/completeSiweLogin.d.ts.map +1 -0
- package/dist/cjs/auth/completeSiweLogin.js +15 -0
- package/dist/cjs/auth/completeSiweLogin.js.map +1 -0
- package/dist/cjs/auth/index.d.ts +4 -0
- package/dist/cjs/auth/index.d.ts.map +1 -0
- package/dist/cjs/auth/index.js +11 -0
- package/dist/cjs/auth/index.js.map +1 -0
- package/dist/cjs/auth/signActions.d.ts +13 -0
- package/dist/cjs/auth/signActions.d.ts.map +1 -0
- package/dist/cjs/auth/signActions.js +86 -0
- package/dist/cjs/auth/signActions.js.map +1 -0
- package/dist/cjs/constants.d.ts +9 -0
- package/dist/cjs/constants.d.ts.map +1 -0
- package/dist/cjs/constants.js +12 -0
- package/dist/cjs/constants.js.map +1 -0
- package/dist/cjs/index.d.ts +9 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +37 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/types/auth.d.ts +16 -0
- package/dist/cjs/types/auth.d.ts.map +1 -0
- package/dist/cjs/types/auth.js +3 -0
- package/dist/cjs/types/auth.js.map +1 -0
- package/dist/cjs/types/index.d.ts +4 -0
- package/dist/cjs/types/index.d.ts.map +1 -0
- package/dist/cjs/types/index.js +3 -0
- package/dist/cjs/types/index.js.map +1 -0
- package/dist/cjs/types/wire.d.ts +154 -0
- package/dist/cjs/types/wire.d.ts.map +1 -0
- package/dist/cjs/types/wire.js +3 -0
- package/dist/cjs/types/wire.js.map +1 -0
- package/dist/cjs/types/ws.d.ts +92 -0
- package/dist/cjs/types/ws.d.ts.map +1 -0
- package/dist/cjs/types/ws.js +3 -0
- package/dist/cjs/types/ws.js.map +1 -0
- package/dist/cjs/utils/activityCursor.d.ts +9 -0
- package/dist/cjs/utils/activityCursor.d.ts.map +1 -0
- package/dist/cjs/utils/activityCursor.js +79 -0
- package/dist/cjs/utils/activityCursor.js.map +1 -0
- package/dist/cjs/utils/apiClient.d.ts +43 -0
- package/dist/cjs/utils/apiClient.d.ts.map +1 -0
- package/dist/cjs/utils/apiClient.js +134 -0
- package/dist/cjs/utils/apiClient.js.map +1 -0
- package/dist/cjs/utils/index.d.ts +11 -0
- package/dist/cjs/utils/index.d.ts.map +1 -0
- package/dist/cjs/utils/index.js +39 -0
- package/dist/cjs/utils/index.js.map +1 -0
- package/dist/cjs/utils/liquidation.d.ts +4 -0
- package/dist/cjs/utils/liquidation.d.ts.map +1 -0
- package/dist/cjs/utils/liquidation.js +16 -0
- package/dist/cjs/utils/liquidation.js.map +1 -0
- package/dist/cjs/utils/mapActivity.d.ts +5 -0
- package/dist/cjs/utils/mapActivity.d.ts.map +1 -0
- package/dist/cjs/utils/mapActivity.js +34 -0
- package/dist/cjs/utils/mapActivity.js.map +1 -0
- package/dist/cjs/utils/mapFill.d.ts +4 -0
- package/dist/cjs/utils/mapFill.d.ts.map +1 -0
- package/dist/cjs/utils/mapFill.js +36 -0
- package/dist/cjs/utils/mapFill.js.map +1 -0
- package/dist/cjs/utils/mapOrder.d.ts +16 -0
- package/dist/cjs/utils/mapOrder.d.ts.map +1 -0
- package/dist/cjs/utils/mapOrder.js +135 -0
- package/dist/cjs/utils/mapOrder.js.map +1 -0
- package/dist/cjs/utils/mapPosition.d.ts +5 -0
- package/dist/cjs/utils/mapPosition.d.ts.map +1 -0
- package/dist/cjs/utils/mapPosition.js +26 -0
- package/dist/cjs/utils/mapPosition.js.map +1 -0
- package/dist/cjs/utils/ohlcvInterval.d.ts +4 -0
- package/dist/cjs/utils/ohlcvInterval.d.ts.map +1 -0
- package/dist/cjs/utils/ohlcvInterval.js +49 -0
- package/dist/cjs/utils/ohlcvInterval.js.map +1 -0
- package/dist/cjs/utils/ondoAsset.d.ts +3 -0
- package/dist/cjs/utils/ondoAsset.d.ts.map +1 -0
- package/dist/cjs/utils/ondoAsset.js +12 -0
- package/dist/cjs/utils/ondoAsset.js.map +1 -0
- package/dist/cjs/utils/orderFormatting.d.ts +4 -0
- package/dist/cjs/utils/orderFormatting.d.ts.map +1 -0
- package/dist/cjs/utils/orderFormatting.js +40 -0
- package/dist/cjs/utils/orderFormatting.js.map +1 -0
- package/dist/cjs/websocket/OndoWsProvider.d.ts +56 -0
- package/dist/cjs/websocket/OndoWsProvider.d.ts.map +1 -0
- package/dist/cjs/websocket/OndoWsProvider.js +515 -0
- package/dist/cjs/websocket/OndoWsProvider.js.map +1 -0
- package/dist/esm/OndoProvider.d.ts +39 -0
- package/dist/esm/OndoProvider.d.ts.map +1 -0
- package/dist/esm/OndoProvider.js +366 -0
- package/dist/esm/OndoProvider.js.map +1 -0
- package/dist/esm/accountConfig.d.ts +13 -0
- package/dist/esm/accountConfig.d.ts.map +1 -0
- package/dist/esm/accountConfig.js +77 -0
- package/dist/esm/accountConfig.js.map +1 -0
- package/dist/esm/accountSummary.d.ts +12 -0
- package/dist/esm/accountSummary.d.ts.map +1 -0
- package/dist/esm/accountSummary.js +14 -0
- package/dist/esm/accountSummary.js.map +1 -0
- package/dist/esm/auth/OndoTokenStore.d.ts +20 -0
- package/dist/esm/auth/OndoTokenStore.d.ts.map +1 -0
- package/dist/esm/auth/OndoTokenStore.js +61 -0
- package/dist/esm/auth/OndoTokenStore.js.map +1 -0
- package/dist/esm/auth/completeSiweLogin.d.ts +28 -0
- package/dist/esm/auth/completeSiweLogin.d.ts.map +1 -0
- package/dist/esm/auth/completeSiweLogin.js +21 -0
- package/dist/esm/auth/completeSiweLogin.js.map +1 -0
- package/dist/esm/auth/index.d.ts +4 -0
- package/dist/esm/auth/index.d.ts.map +1 -0
- package/dist/esm/auth/index.js +5 -0
- package/dist/esm/auth/index.js.map +1 -0
- package/dist/esm/auth/signActions.d.ts +35 -0
- package/dist/esm/auth/signActions.d.ts.map +1 -0
- package/dist/esm/auth/signActions.js +103 -0
- package/dist/esm/auth/signActions.js.map +1 -0
- package/dist/esm/constants.d.ts +35 -0
- package/dist/esm/constants.d.ts.map +1 -0
- package/dist/esm/constants.js +35 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/esm/index.d.ts +19 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +21 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/types/auth.d.ts +32 -0
- package/dist/esm/types/auth.d.ts.map +1 -0
- package/dist/esm/types/auth.js +2 -0
- package/dist/esm/types/auth.js.map +1 -0
- package/dist/esm/types/index.d.ts +4 -0
- package/dist/esm/types/index.d.ts.map +1 -0
- package/dist/esm/types/index.js +3 -0
- package/dist/esm/types/index.js.map +1 -0
- package/dist/esm/types/wire.d.ts +195 -0
- package/dist/esm/types/wire.d.ts.map +1 -0
- package/dist/esm/types/wire.js +7 -0
- package/dist/esm/types/wire.js.map +1 -0
- package/dist/esm/types/ws.d.ts +108 -0
- package/dist/esm/types/ws.d.ts.map +1 -0
- package/dist/esm/types/ws.js +7 -0
- package/dist/esm/types/ws.js.map +1 -0
- package/dist/esm/utils/activityCursor.d.ts +47 -0
- package/dist/esm/utils/activityCursor.d.ts.map +1 -0
- package/dist/esm/utils/activityCursor.js +93 -0
- package/dist/esm/utils/activityCursor.js.map +1 -0
- package/dist/esm/utils/apiClient.d.ts +90 -0
- package/dist/esm/utils/apiClient.d.ts.map +1 -0
- package/dist/esm/utils/apiClient.js +169 -0
- package/dist/esm/utils/apiClient.js.map +1 -0
- package/dist/esm/utils/index.d.ts +11 -0
- package/dist/esm/utils/index.d.ts.map +1 -0
- package/dist/esm/utils/index.js +12 -0
- package/dist/esm/utils/index.js.map +1 -0
- package/dist/esm/utils/liquidation.d.ts +20 -0
- package/dist/esm/utils/liquidation.d.ts.map +1 -0
- package/dist/esm/utils/liquidation.js +29 -0
- package/dist/esm/utils/liquidation.js.map +1 -0
- package/dist/esm/utils/mapActivity.d.ts +21 -0
- package/dist/esm/utils/mapActivity.d.ts.map +1 -0
- package/dist/esm/utils/mapActivity.js +45 -0
- package/dist/esm/utils/mapActivity.js.map +1 -0
- package/dist/esm/utils/mapFill.d.ts +12 -0
- package/dist/esm/utils/mapFill.d.ts.map +1 -0
- package/dist/esm/utils/mapFill.js +37 -0
- package/dist/esm/utils/mapFill.js.map +1 -0
- package/dist/esm/utils/mapOrder.d.ts +50 -0
- package/dist/esm/utils/mapOrder.d.ts.map +1 -0
- package/dist/esm/utils/mapOrder.js +155 -0
- package/dist/esm/utils/mapOrder.js.map +1 -0
- package/dist/esm/utils/mapPosition.d.ts +19 -0
- package/dist/esm/utils/mapPosition.d.ts.map +1 -0
- package/dist/esm/utils/mapPosition.js +32 -0
- package/dist/esm/utils/mapPosition.js.map +1 -0
- package/dist/esm/utils/ohlcvInterval.d.ts +11 -0
- package/dist/esm/utils/ohlcvInterval.d.ts.map +1 -0
- package/dist/esm/utils/ohlcvInterval.js +59 -0
- package/dist/esm/utils/ohlcvInterval.js.map +1 -0
- package/dist/esm/utils/ondoAsset.d.ts +4 -0
- package/dist/esm/utils/ondoAsset.d.ts.map +1 -0
- package/dist/esm/utils/ondoAsset.js +9 -0
- package/dist/esm/utils/ondoAsset.js.map +1 -0
- package/dist/esm/utils/orderFormatting.d.ts +33 -0
- package/dist/esm/utils/orderFormatting.d.ts.map +1 -0
- package/dist/esm/utils/orderFormatting.js +62 -0
- package/dist/esm/utils/orderFormatting.js.map +1 -0
- package/dist/esm/websocket/OndoWsProvider.d.ts +122 -0
- package/dist/esm/websocket/OndoWsProvider.d.ts.map +1 -0
- package/dist/esm/websocket/OndoWsProvider.js +591 -0
- package/dist/esm/websocket/OndoWsProvider.js.map +1 -0
- package/dist/types/OndoProvider.d.ts +39 -0
- package/dist/types/OndoProvider.d.ts.map +1 -0
- package/dist/types/accountConfig.d.ts +13 -0
- package/dist/types/accountConfig.d.ts.map +1 -0
- package/dist/types/accountSummary.d.ts +12 -0
- package/dist/types/accountSummary.d.ts.map +1 -0
- package/dist/types/auth/OndoTokenStore.d.ts +20 -0
- package/dist/types/auth/OndoTokenStore.d.ts.map +1 -0
- package/dist/types/auth/completeSiweLogin.d.ts +28 -0
- package/dist/types/auth/completeSiweLogin.d.ts.map +1 -0
- package/dist/types/auth/index.d.ts +4 -0
- package/dist/types/auth/index.d.ts.map +1 -0
- package/dist/types/auth/signActions.d.ts +35 -0
- package/dist/types/auth/signActions.d.ts.map +1 -0
- package/dist/types/constants.d.ts +35 -0
- package/dist/types/constants.d.ts.map +1 -0
- package/dist/types/index.d.ts +19 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/types/auth.d.ts +32 -0
- package/dist/types/types/auth.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +4 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/wire.d.ts +195 -0
- package/dist/types/types/wire.d.ts.map +1 -0
- package/dist/types/types/ws.d.ts +108 -0
- package/dist/types/types/ws.d.ts.map +1 -0
- package/dist/types/utils/activityCursor.d.ts +47 -0
- package/dist/types/utils/activityCursor.d.ts.map +1 -0
- package/dist/types/utils/apiClient.d.ts +90 -0
- package/dist/types/utils/apiClient.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +11 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/liquidation.d.ts +20 -0
- package/dist/types/utils/liquidation.d.ts.map +1 -0
- package/dist/types/utils/mapActivity.d.ts +21 -0
- package/dist/types/utils/mapActivity.d.ts.map +1 -0
- package/dist/types/utils/mapFill.d.ts +12 -0
- package/dist/types/utils/mapFill.d.ts.map +1 -0
- package/dist/types/utils/mapOrder.d.ts +50 -0
- package/dist/types/utils/mapOrder.d.ts.map +1 -0
- package/dist/types/utils/mapPosition.d.ts +19 -0
- package/dist/types/utils/mapPosition.d.ts.map +1 -0
- package/dist/types/utils/ohlcvInterval.d.ts +11 -0
- package/dist/types/utils/ohlcvInterval.d.ts.map +1 -0
- package/dist/types/utils/ondoAsset.d.ts +4 -0
- package/dist/types/utils/ondoAsset.d.ts.map +1 -0
- package/dist/types/utils/orderFormatting.d.ts +33 -0
- package/dist/types/utils/orderFormatting.d.ts.map +1 -0
- package/dist/types/websocket/OndoWsProvider.d.ts +122 -0
- package/dist/types/websocket/OndoWsProvider.d.ts.map +1 -0
- package/package.json +64 -0
- package/src/OndoProvider.ts +635 -0
- package/src/accountConfig.ts +105 -0
- package/src/accountSummary.ts +22 -0
- package/src/auth/OndoTokenStore.ts +83 -0
- package/src/auth/completeSiweLogin.ts +43 -0
- package/src/auth/index.ts +12 -0
- package/src/auth/signActions.ts +160 -0
- package/src/constants.ts +38 -0
- package/src/index.ts +36 -0
- package/src/types/auth.ts +32 -0
- package/src/types/index.ts +5 -0
- package/src/types/wire.ts +228 -0
- package/src/types/ws.ts +79 -0
- package/src/utils/activityCursor.ts +140 -0
- package/src/utils/apiClient.ts +257 -0
- package/src/utils/index.ts +35 -0
- package/src/utils/liquidation.ts +37 -0
- package/src/utils/mapActivity.ts +61 -0
- package/src/utils/mapFill.ts +47 -0
- package/src/utils/mapOrder.ts +201 -0
- package/src/utils/mapPosition.ts +44 -0
- package/src/utils/ohlcvInterval.ts +69 -0
- package/src/utils/ondoAsset.ts +10 -0
- package/src/utils/orderFormatting.ts +70 -0
- package/src/websocket/OndoWsProvider.ts +752 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sign a SIWE challenge with the user's wallet and exchange it for an Ondo
|
|
3
|
+
* session token, directly against Ondo — the returned JWT never transits the
|
|
4
|
+
* LI.FI backend. viem's `signMessage` performs the EIP-191 `personal_sign`
|
|
5
|
+
* encoding Ondo verifies against. The signature is returned alongside the
|
|
6
|
+
* token so callers can hand it back as a `SiweSignedActionStep`.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export async function completeSiweLogin(client, signer, challenge) {
|
|
11
|
+
const signature = await signer.signMessage({
|
|
12
|
+
account: signer.account,
|
|
13
|
+
message: challenge.message,
|
|
14
|
+
});
|
|
15
|
+
const token = await client.post('/v1/auth/erc-4361/login/complete_challenge', {
|
|
16
|
+
id: challenge.id,
|
|
17
|
+
signature,
|
|
18
|
+
});
|
|
19
|
+
return { token, signature };
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=completeSiweLogin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"completeSiweLogin.js","sourceRoot":"","sources":["../../../src/auth/completeSiweLogin.ts"],"names":[],"mappings":"AAgBA;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,MAAqB,EACrB,MAAyB,EACzB,SAA4B;IAE5B,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC;QACzC,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,OAAO,EAAE,SAAS,CAAC,OAAO;KAC3B,CAAC,CAAA;IACF,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,IAAI,CAC7B,4CAA4C,EAC5C;QACE,EAAE,EAAE,SAAS,CAAC,EAAE;QAChB,SAAS;KACV,CACF,CAAA;IACD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAA;AAC7B,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { completeSiweLogin, type OndoSiweChallenge, } from './completeSiweLogin.js';
|
|
2
|
+
export { OndoTokenStore } from './OndoTokenStore.js';
|
|
3
|
+
export { executeOndoRestCallActions, type OndoSignActionsDeps, ondoSignActions, } from './signActions.js';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,iBAAiB,EACjB,KAAK,iBAAiB,GACvB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EACL,0BAA0B,EAC1B,KAAK,mBAAmB,EACxB,eAAe,GAChB,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// biome-ignore-all lint/performance/noBarrelFile: module public entry point.
|
|
2
|
+
export { completeSiweLogin, } from './completeSiweLogin.js';
|
|
3
|
+
export { OndoTokenStore } from './OndoTokenStore.js';
|
|
4
|
+
export { executeOndoRestCallActions, ondoSignActions, } from './signActions.js';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth/index.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAE7E,OAAO,EACL,iBAAiB,GAElB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EACL,0BAA0B,EAE1B,eAAe,GAChB,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type SignActionsContext } from '@lifi/perps-sdk';
|
|
2
|
+
import type { ActionResult, ActionStep, RestCallSignedActionStep, SignedActionStep } from '@lifi/perps-types';
|
|
3
|
+
import { SigningMethod } from '@lifi/perps-types';
|
|
4
|
+
import type { Address } from 'viem';
|
|
5
|
+
import { type OndoApiClient } from '../utils/apiClient.js';
|
|
6
|
+
import type { OndoTokenStore } from './OndoTokenStore.js';
|
|
7
|
+
/** @internal */
|
|
8
|
+
export interface OndoSignActionsDeps {
|
|
9
|
+
client: OndoApiClient;
|
|
10
|
+
tokenStore: OndoTokenStore;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Ondo's `signActions` arms.
|
|
14
|
+
*
|
|
15
|
+
* `SIWE` signs the backend-built ERC-4361 challenge with the user's wallet
|
|
16
|
+
* and completes the login directly against Ondo — the returned session JWT is
|
|
17
|
+
* persisted in the token store and never transits the LI.FI backend.
|
|
18
|
+
*
|
|
19
|
+
* `AUTH_TOKEN` attaches the stored session JWT as an `Authorization: Bearer`
|
|
20
|
+
* header on each REST-call step; an absent or expired token throws
|
|
21
|
+
* {@link OndoSessionExpiredError} so callers re-run the SIWE login.
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
export declare function ondoSignActions(deps: OndoSignActionsDeps, method: SigningMethod, steps: ActionStep[], address: Address, ctx?: SignActionsContext): Promise<SignedActionStep[]>;
|
|
26
|
+
/**
|
|
27
|
+
* Execute credential-bearing REST-call steps directly against Ondo,
|
|
28
|
+
* sequentially — later steps in a batch may depend on earlier ones (e.g.
|
|
29
|
+
* leverage update before order placement), so after the first failure the
|
|
30
|
+
* remainder is skipped rather than executed out of order.
|
|
31
|
+
*
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
export declare function executeOndoRestCallActions(client: OndoApiClient, steps: RestCallSignedActionStep[]): Promise<ActionResult[]>;
|
|
35
|
+
//# sourceMappingURL=signActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signActions.d.ts","sourceRoot":"","sources":["../../../src/auth/signActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACrE,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,wBAAwB,EACxB,gBAAgB,EAEjB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAkB,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEzD,gBAAgB;AAChB,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,aAAa,CAAA;IACrB,UAAU,EAAE,cAAc,CAAA;CAC3B;AAQD;;;;;;;;;;;;GAYG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,mBAAmB,EACzB,MAAM,EAAE,aAAa,EACrB,KAAK,EAAE,UAAU,EAAE,EACnB,OAAO,EAAE,OAAO,EAChB,GAAG,CAAC,EAAE,kBAAkB,GACvB,OAAO,CAAC,gBAAgB,EAAE,CAAC,CA0D7B;AAED;;;;;;;GAOG;AACH,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,aAAa,EACrB,KAAK,EAAE,wBAAwB,EAAE,GAChC,OAAO,CAAC,YAAY,EAAE,CAAC,CAuCzB"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { PerpsError } from '@lifi/perps-sdk';
|
|
2
|
+
import { PerpsErrorCode, SigningMethod } from '@lifi/perps-types';
|
|
3
|
+
import { OndoSessionExpiredError, } from '../utils/apiClient.js';
|
|
4
|
+
import { completeSiweLogin } from './completeSiweLogin.js';
|
|
5
|
+
const isSiweStep = (step) => 'siwe' in step;
|
|
6
|
+
const hasRequest = (step) => 'request' in step;
|
|
7
|
+
/**
|
|
8
|
+
* Ondo's `signActions` arms.
|
|
9
|
+
*
|
|
10
|
+
* `SIWE` signs the backend-built ERC-4361 challenge with the user's wallet
|
|
11
|
+
* and completes the login directly against Ondo — the returned session JWT is
|
|
12
|
+
* persisted in the token store and never transits the LI.FI backend.
|
|
13
|
+
*
|
|
14
|
+
* `AUTH_TOKEN` attaches the stored session JWT as an `Authorization: Bearer`
|
|
15
|
+
* header on each REST-call step; an absent or expired token throws
|
|
16
|
+
* {@link OndoSessionExpiredError} so callers re-run the SIWE login.
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export async function ondoSignActions(deps, method, steps, address, ctx) {
|
|
21
|
+
switch (method) {
|
|
22
|
+
case SigningMethod.SIWE: {
|
|
23
|
+
const userWallet = ctx?.userWallet;
|
|
24
|
+
if (userWallet === undefined) {
|
|
25
|
+
throw new PerpsError(PerpsErrorCode.SDKError, 'Ondo SIWE login requires the user wallet. Pass `userWallet` when ' +
|
|
26
|
+
'creating the perps client.');
|
|
27
|
+
}
|
|
28
|
+
const signed = [];
|
|
29
|
+
for (const step of steps) {
|
|
30
|
+
if (!isSiweStep(step)) {
|
|
31
|
+
throw new PerpsError(PerpsErrorCode.SDKError, `Ondo received a non-SIWE step ('${step.action}') under the SIWE signing method.`);
|
|
32
|
+
}
|
|
33
|
+
const { token, signature } = await completeSiweLogin(deps.client, userWallet, { id: step.siwe.challengeId, message: step.siwe.message });
|
|
34
|
+
await deps.tokenStore.set(address, token);
|
|
35
|
+
signed.push({ action: step.action, siwe: step.siwe, signature });
|
|
36
|
+
}
|
|
37
|
+
return signed;
|
|
38
|
+
}
|
|
39
|
+
case SigningMethod.AUTH_TOKEN: {
|
|
40
|
+
const token = await deps.tokenStore.get(address);
|
|
41
|
+
if (token === null) {
|
|
42
|
+
throw new OndoSessionExpiredError(`No valid Ondo session token stored for ${address}. Run the SIWE login first.`);
|
|
43
|
+
}
|
|
44
|
+
return steps.map((step) => {
|
|
45
|
+
if (!hasRequest(step)) {
|
|
46
|
+
throw new PerpsError(PerpsErrorCode.SDKError, `Ondo received a non-REST step ('${step.action}') under the AUTH_TOKEN signing method.`);
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
action: step.action,
|
|
50
|
+
request: step.request,
|
|
51
|
+
headers: { Authorization: `Bearer ${token.token}` },
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
default:
|
|
56
|
+
throw new PerpsError(PerpsErrorCode.SDKError, `Ondo does not sign via '${method}'. Supported methods: siwe, authToken.`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Execute credential-bearing REST-call steps directly against Ondo,
|
|
61
|
+
* sequentially — later steps in a batch may depend on earlier ones (e.g.
|
|
62
|
+
* leverage update before order placement), so after the first failure the
|
|
63
|
+
* remainder is skipped rather than executed out of order.
|
|
64
|
+
*
|
|
65
|
+
* @public
|
|
66
|
+
*/
|
|
67
|
+
export async function executeOndoRestCallActions(client, steps) {
|
|
68
|
+
const results = [];
|
|
69
|
+
let failed = false;
|
|
70
|
+
for (const step of steps) {
|
|
71
|
+
if (failed) {
|
|
72
|
+
results.push({
|
|
73
|
+
action: step.action,
|
|
74
|
+
success: false,
|
|
75
|
+
error: 'Skipped: a preceding step in the batch failed.',
|
|
76
|
+
});
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
try {
|
|
80
|
+
const result = await client.send(step.request.method, step.request.path, { body: step.request.body, headers: step.headers });
|
|
81
|
+
const orderId = typeof result === 'object' &&
|
|
82
|
+
result !== null &&
|
|
83
|
+
typeof result.orderId === 'string'
|
|
84
|
+
? result.orderId
|
|
85
|
+
: undefined;
|
|
86
|
+
results.push({
|
|
87
|
+
action: step.action,
|
|
88
|
+
success: true,
|
|
89
|
+
...(orderId === undefined ? {} : { orderId }),
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
catch (err) {
|
|
93
|
+
failed = true;
|
|
94
|
+
results.push({
|
|
95
|
+
action: step.action,
|
|
96
|
+
success: false,
|
|
97
|
+
error: err instanceof Error ? err.message : String(err),
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return results;
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=signActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signActions.js","sourceRoot":"","sources":["../../../src/auth/signActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA2B,MAAM,iBAAiB,CAAA;AAQrE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjE,OAAO,EAGL,uBAAuB,GACxB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAS1D,MAAM,UAAU,GAAG,CAAC,IAAgB,EAA0B,EAAE,CAAC,MAAM,IAAI,IAAI,CAAA;AAE/E,MAAM,UAAU,GAAG,CACjB,IAAgB,EACmC,EAAE,CAAC,SAAS,IAAI,IAAI,CAAA;AAEzE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,IAAyB,EACzB,MAAqB,EACrB,KAAmB,EACnB,OAAgB,EAChB,GAAwB;IAExB,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;YACxB,MAAM,UAAU,GAAG,GAAG,EAAE,UAAU,CAAA;YAClC,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;gBAC7B,MAAM,IAAI,UAAU,CAClB,cAAc,CAAC,QAAQ,EACvB,mEAAmE;oBACjE,4BAA4B,CAC/B,CAAA;YACH,CAAC;YACD,MAAM,MAAM,GAAuB,EAAE,CAAA;YACrC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACzB,IAAI,CAAC,UAAU,CAAC,I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A;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,GAAG,IAAI,CAAA;YACb,OAAO,CAAC,IAAI,CAAC;gBACX,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;aACxD,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ondo provider key as it appears on `Provider.key` from the backend.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare const ONDO_PROVIDER_KEY = "ondo";
|
|
7
|
+
/**
|
|
8
|
+
* Default (production) REST base URL for Ondo Perps.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export declare const DEFAULT_ONDO_API_URL = "https://api.ondoperps.xyz";
|
|
13
|
+
/**
|
|
14
|
+
* Sandbox REST base URL for Ondo Perps.
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export declare const ONDO_SANDBOX_API_URL = "https://api.ondoperps-sandbox.xyz";
|
|
19
|
+
/**
|
|
20
|
+
* Default (production) WebSocket URL for Ondo Perps.
|
|
21
|
+
*
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export declare const DEFAULT_ONDO_WS_URL = "wss://api.ondoperps.xyz/ws";
|
|
25
|
+
/**
|
|
26
|
+
* Ondo's public base fee schedule (2 bps maker / 5 bps taker). Ondo exposes no
|
|
27
|
+
* per-account fee endpoint, so quotes and account snapshots use this schedule.
|
|
28
|
+
*
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export declare const ONDO_BASE_FEE_TIER: {
|
|
32
|
+
maker: string;
|
|
33
|
+
taker: string;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,SAAS,CAAA;AAEvC;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,8BAA8B,CAAA;AAE/D;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,sCAAsC,CAAA;AAEvE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,+BAA+B,CAAA;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;CAG9B,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ondo provider key as it appears on `Provider.key` from the backend.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export const ONDO_PROVIDER_KEY = 'ondo';
|
|
7
|
+
/**
|
|
8
|
+
* Default (production) REST base URL for Ondo Perps.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export const DEFAULT_ONDO_API_URL = 'https://api.ondoperps.xyz';
|
|
13
|
+
/**
|
|
14
|
+
* Sandbox REST base URL for Ondo Perps.
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export const ONDO_SANDBOX_API_URL = 'https://api.ondoperps-sandbox.xyz';
|
|
19
|
+
/**
|
|
20
|
+
* Default (production) WebSocket URL for Ondo Perps.
|
|
21
|
+
*
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export const DEFAULT_ONDO_WS_URL = 'wss://api.ondoperps.xyz/ws';
|
|
25
|
+
/**
|
|
26
|
+
* Ondo's public base fee schedule (2 bps maker / 5 bps taker). Ondo exposes no
|
|
27
|
+
* per-account fee endpoint, so quotes and account snapshots use this schedule.
|
|
28
|
+
*
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export const ONDO_BASE_FEE_TIER = {
|
|
32
|
+
maker: '0.0002',
|
|
33
|
+
taker: '0.0005',
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAA;AAEvC;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,2BAA2B,CAAA;AAE/D;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,mCAAmC,CAAA;AAEvE;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,4BAA4B,CAAA;AAE/D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;CAChB,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ondo Perps provider plugin for `@lifi/perps-sdk`. Ondo authenticates with a
|
|
3
|
+
* client-held session JWT obtained through a SIWE (ERC-4361) login — this
|
|
4
|
+
* package owns the venue HTTP boundary (`OndoApiClient`), the login completion
|
|
5
|
+
* (`completeSiweLogin`), and browser-side persistence of the session token
|
|
6
|
+
* (`OndoTokenStore`). The JWT never transits the LI.FI backend.
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export { projectOndoConfigSettings } from './accountConfig.js';
|
|
12
|
+
export { getAccountSummary } from './accountSummary.js';
|
|
13
|
+
export * from './auth/index.js';
|
|
14
|
+
export { DEFAULT_ONDO_API_URL, DEFAULT_ONDO_WS_URL, ONDO_BASE_FEE_TIER, ONDO_PROVIDER_KEY, ONDO_SANDBOX_API_URL, } from './constants.js';
|
|
15
|
+
export { Ondo, type OndoProviderOptions, ondoProvider, } from './OndoProvider.js';
|
|
16
|
+
export * from './types/index.js';
|
|
17
|
+
export * from './utils/index.js';
|
|
18
|
+
export { OndoWsProvider, type OndoWsProviderOptions, ondoWsProvider, } from './websocket/OndoWsProvider.js';
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,cAAc,iBAAiB,CAAA;AAC/B,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,IAAI,EACJ,KAAK,mBAAmB,EACxB,YAAY,GACb,MAAM,mBAAmB,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,OAAO,EACL,cAAc,EACd,KAAK,qBAAqB,EAC1B,cAAc,GACf,MAAM,+BAA+B,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// biome-ignore-all lint/performance/noBarrelFile: package public entry point.
|
|
2
|
+
// biome-ignore-all lint/performance/noReExportAll: package public entry point.
|
|
3
|
+
/**
|
|
4
|
+
* Ondo Perps provider plugin for `@lifi/perps-sdk`. Ondo authenticates with a
|
|
5
|
+
* client-held session JWT obtained through a SIWE (ERC-4361) login — this
|
|
6
|
+
* package owns the venue HTTP boundary (`OndoApiClient`), the login completion
|
|
7
|
+
* (`completeSiweLogin`), and browser-side persistence of the session token
|
|
8
|
+
* (`OndoTokenStore`). The JWT never transits the LI.FI backend.
|
|
9
|
+
*
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export { projectOndoConfigSettings } from './accountConfig.js';
|
|
14
|
+
export { getAccountSummary } from './accountSummary.js';
|
|
15
|
+
export * from './auth/index.js';
|
|
16
|
+
export { DEFAULT_ONDO_API_URL, DEFAULT_ONDO_WS_URL, ONDO_BASE_FEE_TIER, ONDO_PROVIDER_KEY, ONDO_SANDBOX_API_URL, } from './constants.js';
|
|
17
|
+
export { Ondo, ondoProvider, } from './OndoProvider.js';
|
|
18
|
+
export * from './types/index.js';
|
|
19
|
+
export * from './utils/index.js';
|
|
20
|
+
export { OndoWsProvider, ondoWsProvider, } from './websocket/OndoWsProvider.js';
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,+EAA+E;AAE/E;;;;;;;;;GASG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,cAAc,iBAAiB,CAAA;AAC/B,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,IAAI,EAEJ,YAAY,GACb,MAAM,mBAAmB,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,OAAO,EACL,cAAc,EAEd,cAAc,GACf,MAAM,+BAA+B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type": "module","sideEffects":false}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Envelope wrapping every Ondo REST response: `result` is present on
|
|
3
|
+
* success, `error`/`error_code` on failure.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface OndoGenericResponse<T> {
|
|
8
|
+
success: boolean;
|
|
9
|
+
error?: string;
|
|
10
|
+
/** Machine-readable failure discriminator (per-endpoint enum). */
|
|
11
|
+
error_code?: string;
|
|
12
|
+
result?: T;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Ondo session credential returned by `complete_challenge`. `token` is the
|
|
16
|
+
* JWT presented as `Authorization: Bearer` on subsequent calls.
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export interface OndoAuthToken {
|
|
21
|
+
identifier: string;
|
|
22
|
+
authType: string;
|
|
23
|
+
accountId: string;
|
|
24
|
+
/** Absolute unix timestamp (seconds). */
|
|
25
|
+
issuedAtSecs: number;
|
|
26
|
+
/** Absolute unix timestamp (seconds) — not a duration. */
|
|
27
|
+
expirationSecs: number;
|
|
28
|
+
token: string;
|
|
29
|
+
/** True when this login created the Ondo account. */
|
|
30
|
+
newAccount: boolean;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/types/auth.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB,CAAC,CAAC;IACpC,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,CAAC,CAAA;CACX;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAA;IACpB,0DAA0D;IAC1D,cAAc,EAAE,MAAM,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,qDAAqD;IACrD,UAAU,EAAE,OAAO,CAAA;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/types/auth.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAA;AACnE,mBAAmB,WAAW,CAAA;AAC9B,mBAAmB,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,6EAA6E"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ondo REST wire types (`Ondo*`), mirroring the Ondo Perps OpenAPI schemas.
|
|
3
|
+
* All numeric quantities arrive as strings; timestamps are ISO 8601 strings
|
|
4
|
+
* unless a field says otherwise.
|
|
5
|
+
*/
|
|
6
|
+
/** Cursor pair Ondo returns as a sibling of `result` on paginated endpoints. */
|
|
7
|
+
export interface OndoPageInfo {
|
|
8
|
+
prevCursor?: string;
|
|
9
|
+
nextCursor?: string;
|
|
10
|
+
}
|
|
11
|
+
/** @public */
|
|
12
|
+
export type OndoPositionDirection = 'long' | 'short' | 'neutral';
|
|
13
|
+
/** Mirrors Ondo's `ApiPosition`. @public */
|
|
14
|
+
export interface OndoPosition {
|
|
15
|
+
market: string;
|
|
16
|
+
direction: OndoPositionDirection;
|
|
17
|
+
/** Position size in base currency (unsigned magnitude). */
|
|
18
|
+
netQuantity: string;
|
|
19
|
+
averageEntryPrice: string;
|
|
20
|
+
usedMargin: string;
|
|
21
|
+
unrealizedPnl: string;
|
|
22
|
+
markPrice: string;
|
|
23
|
+
liquidationPrice: string;
|
|
24
|
+
bankruptcyPrice: string;
|
|
25
|
+
maintenanceMargin: string;
|
|
26
|
+
notionalValue: string;
|
|
27
|
+
leverage: string;
|
|
28
|
+
netFundingSinceNeutral: string;
|
|
29
|
+
returnOnEquity: string;
|
|
30
|
+
stopLossTriggerPrice?: string;
|
|
31
|
+
takeProfitTriggerPrice?: string;
|
|
32
|
+
}
|
|
33
|
+
/** @public */
|
|
34
|
+
export type OndoOrderSide = 'buy' | 'sell';
|
|
35
|
+
/** @public */
|
|
36
|
+
export type OndoOrderStatus = 'open' | 'fullyfilled' | 'canceled' | 'pending' | 'untriggered';
|
|
37
|
+
/** @public */
|
|
38
|
+
export type OndoOrderType = 'limit' | 'market' | 'stopMarket' | 'takeProfitMarket';
|
|
39
|
+
/** @public */
|
|
40
|
+
export type OndoTimeInForce = 'GTC' | 'IOC';
|
|
41
|
+
/** @public */
|
|
42
|
+
export type OndoStopOrderType = 'stopLoss' | 'takeProfit';
|
|
43
|
+
/** Mirrors Ondo's `ApiOrder`. @public */
|
|
44
|
+
export interface OndoOrder {
|
|
45
|
+
orderId: string;
|
|
46
|
+
side: OndoOrderSide;
|
|
47
|
+
price: string;
|
|
48
|
+
size: string;
|
|
49
|
+
market: string;
|
|
50
|
+
filledSize: string;
|
|
51
|
+
lastFillSize: string;
|
|
52
|
+
filledCost: string;
|
|
53
|
+
fee: string;
|
|
54
|
+
status: OndoOrderStatus;
|
|
55
|
+
createdAt: string;
|
|
56
|
+
type: OndoOrderType;
|
|
57
|
+
clientOrderId?: string;
|
|
58
|
+
parentOrderId?: string;
|
|
59
|
+
realizedPnl?: string;
|
|
60
|
+
feeRebate?: string;
|
|
61
|
+
filledAt?: string;
|
|
62
|
+
canceledAt?: string;
|
|
63
|
+
cancelReason?: string;
|
|
64
|
+
/** Not returned for market orders. */
|
|
65
|
+
timeInForce?: OndoTimeInForce;
|
|
66
|
+
reduceOnly?: boolean;
|
|
67
|
+
liquidationId?: string;
|
|
68
|
+
/** Position-level TP/SL flag. */
|
|
69
|
+
closePosition?: boolean;
|
|
70
|
+
stopOrderType?: OndoStopOrderType;
|
|
71
|
+
triggerPrice?: string;
|
|
72
|
+
}
|
|
73
|
+
/** @public */
|
|
74
|
+
export type OndoFillDirection = 'openLong' | 'openShort' | 'closeLong' | 'closeShort' | 'flipLongToShort' | 'flipShortToLong';
|
|
75
|
+
/** Mirrors Ondo's `ApiFill`. @public */
|
|
76
|
+
export interface OndoFill {
|
|
77
|
+
id: string;
|
|
78
|
+
orderId: string;
|
|
79
|
+
market: string;
|
|
80
|
+
price: string;
|
|
81
|
+
size: string;
|
|
82
|
+
side: OndoOrderSide;
|
|
83
|
+
filledCost: string;
|
|
84
|
+
fee: string;
|
|
85
|
+
time: string;
|
|
86
|
+
isMaker: boolean;
|
|
87
|
+
clientOrderId?: string;
|
|
88
|
+
parentOrderID?: string;
|
|
89
|
+
direction?: OndoFillDirection;
|
|
90
|
+
feeRebate?: string;
|
|
91
|
+
pnl?: string;
|
|
92
|
+
isADL?: boolean;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Mirrors Ondo's `MarginAccountBalanceSummary`. Invariants per the docs:
|
|
96
|
+
* `marginBalance = walletBalance + unrealizedPnl`,
|
|
97
|
+
* `availableMargin = marginBalance − usedMargin`.
|
|
98
|
+
* @public
|
|
99
|
+
*/
|
|
100
|
+
export interface OndoBalanceSummary {
|
|
101
|
+
walletBalance: string;
|
|
102
|
+
realizedPnl: string;
|
|
103
|
+
unrealizedPnl: string;
|
|
104
|
+
marginBalance: string;
|
|
105
|
+
usedMargin: string;
|
|
106
|
+
availableMargin: string;
|
|
107
|
+
withdrawableMargin: string;
|
|
108
|
+
maintenanceMarginRequirement: string;
|
|
109
|
+
totalMaintenanceMargin: string;
|
|
110
|
+
marginRatio: string;
|
|
111
|
+
leverage: string;
|
|
112
|
+
underLiquidation: boolean;
|
|
113
|
+
totalFundingPayments: string;
|
|
114
|
+
totalTradingFees: string;
|
|
115
|
+
totalPnL: string;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* `GET /v1/account/referral` result: the referral applied to the account.
|
|
119
|
+
* The endpoint is absent from Ondo's published OpenAPI spec; shape mirrors the
|
|
120
|
+
* venue web app. `result` is `null` when no referral is applied.
|
|
121
|
+
* @public
|
|
122
|
+
*/
|
|
123
|
+
export interface OndoAccountReferral {
|
|
124
|
+
/** The referrer's code applied to this account. */
|
|
125
|
+
code: string;
|
|
126
|
+
/** Rebate share of trading fees returned to the referred account. */
|
|
127
|
+
rebate?: number;
|
|
128
|
+
}
|
|
129
|
+
/** Mirrors Ondo's `Contract` (perps contract ticker row). @public */
|
|
130
|
+
export interface OndoContract {
|
|
131
|
+
market: string;
|
|
132
|
+
productType: string;
|
|
133
|
+
contractType: string;
|
|
134
|
+
baseCurrency: string;
|
|
135
|
+
quoteCurrency: string;
|
|
136
|
+
disabled: boolean;
|
|
137
|
+
displayName?: string;
|
|
138
|
+
lastPrice?: string;
|
|
139
|
+
indexPrice?: string;
|
|
140
|
+
fundingRate?: string;
|
|
141
|
+
nextFundingRate?: string;
|
|
142
|
+
nextFundingRateTimestamp?: string;
|
|
143
|
+
makerFee?: string;
|
|
144
|
+
takerFee?: string;
|
|
145
|
+
openInterest?: string;
|
|
146
|
+
openInterestUsd?: string;
|
|
147
|
+
priceChangePercent?: string;
|
|
148
|
+
isClosed?: boolean;
|
|
149
|
+
}
|
|
150
|
+
/** Mirrors Ondo's `FundingFeeTransfer`. Carries no id — callers synthesize one. @public */
|
|
151
|
+
export interface OndoFundingFeeTransfer {
|
|
152
|
+
market: string;
|
|
153
|
+
time: string;
|
|
154
|
+
markPrice: string;
|
|
155
|
+
positionSize: string;
|
|
156
|
+
positionDirection: OndoPositionDirection;
|
|
157
|
+
rate: string;
|
|
158
|
+
/** Which side paid this interval. */
|
|
159
|
+
payer: OndoPositionDirection;
|
|
160
|
+
/** Signed: positive = earned, negative = paid. */
|
|
161
|
+
amount: string;
|
|
162
|
+
}
|
|
163
|
+
/** @public */
|
|
164
|
+
export type OndoLiquidationStatus = 'queued' | 'start' | 'retry' | 'stop';
|
|
165
|
+
/** Mirrors Ondo's `LiquidationEvent`. @public */
|
|
166
|
+
export interface OndoLiquidationEvent {
|
|
167
|
+
id: string;
|
|
168
|
+
time: string;
|
|
169
|
+
initiatedAt: string;
|
|
170
|
+
accountId: string;
|
|
171
|
+
status: OndoLiquidationStatus;
|
|
172
|
+
insuranceFundUsed: string;
|
|
173
|
+
adl: boolean;
|
|
174
|
+
retryCount: number;
|
|
175
|
+
triggeringPositions?: OndoPosition[];
|
|
176
|
+
filledQuoteSize?: string;
|
|
177
|
+
filledQuantity?: string;
|
|
178
|
+
reclaimOrderMargin?: boolean;
|
|
179
|
+
}
|
|
180
|
+
/** @public */
|
|
181
|
+
export type OndoAccountState = 'open' | 'disabled' | 'offboarding' | 'closed';
|
|
182
|
+
/** Mirrors Ondo's `AccountInfo` (the `/v1/account` result). @public */
|
|
183
|
+
export interface OndoAccountInfo {
|
|
184
|
+
accountID: string;
|
|
185
|
+
identifier: string;
|
|
186
|
+
authType: string;
|
|
187
|
+
accountState: OndoAccountState;
|
|
188
|
+
withdrawalFeeUSD: string;
|
|
189
|
+
termsVersion: number;
|
|
190
|
+
termsUnixSecs: number;
|
|
191
|
+
privacyVersion: number;
|
|
192
|
+
privacyUnixSecs: number;
|
|
193
|
+
marketingConsent: string;
|
|
194
|
+
}
|
|
195
|
+
//# sourceMappingURL=wire.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../../../src/types/wire.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,gFAAgF;AAChF,MAAM,WAAW,YAAY;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,cAAc;AACd,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;AAEhE,4CAA4C;AAC5C,MAAM,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