New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dflow-protocol/dflow-swap-client

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dflow-protocol/dflow-swap-client - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

dist/markets/client.d.ts

1

dist/api-path.d.ts

@@ -0,1 +1,2 @@

export declare const marketsPath = "/markets";
export declare const solanaBasePath = "/solana";

@@ -2,0 +3,0 @@ export declare const evmBasePath = "/evm";

3

dist/api-path.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.flowApiPaths = exports.evmBasePath = exports.solanaBasePath = void 0;
exports.flowApiPaths = exports.evmBasePath = exports.solanaBasePath = exports.marketsPath = void 0;
exports.marketsPath = "/markets";
exports.solanaBasePath = "/solana";

@@ -5,0 +6,0 @@ exports.evmBasePath = "/evm";

@@ -24,6 +24,6 @@ "use strict";

if (error) {
return Object.assign({ ok: false }, error);
return { ok: false, error };
}
const response = yield responseObj.json();
return Object.assign({ ok: true }, response);
return { ok: true, data: response };
});

@@ -37,5 +37,5 @@ }

if (!result.ok) {
throw new Error(result.msg);
throw new Error(result.error.msg);
}
return result;
return result.data;
});

@@ -52,6 +52,6 @@ }

if (error) {
return Object.assign({ ok: false }, error);
return { ok: false, error };
}
const response = yield responseObj.json();
return Object.assign({ ok: true }, response);
return { ok: true, data: response };
});

@@ -65,5 +65,5 @@ }

if (!result.ok) {
throw new Error(result.msg);
throw new Error(result.error.msg);
}
return result;
return result.data;
});

@@ -81,6 +81,6 @@ }

if (error) {
return Object.assign({ ok: false }, error);
return { ok: false, error };
}
const response = yield responseObj.json();
return Object.assign({ ok: true }, response);
return { ok: true, data: response };
});

@@ -95,5 +95,5 @@ }

if (!result.ok) {
throw new Error(result.msg);
throw new Error(result.error.msg);
}
return result;
return result.data;
});

@@ -100,0 +100,0 @@ }

@@ -27,21 +27,82 @@ import * as signatoryClient from "@dflow-protocol/signatory-client-lib/evm/legacy";

export type IndicativeQuoteResponse = z.infer<typeof schemaIndicativeQuoteResponse>;
export declare const schemaIndicativeQuoteResponse: z.ZodObject<{
fillPrice: z.ZodString;
effectivePlatformFeeBps: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
export declare const schemaIndicativeQuoteResponse: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
type: z.ZodLiteral<signatoryClient.IndicativeQuoteResponseType.Ok>;
data: z.ZodObject<{
fillPrice: z.ZodString;
effectivePlatformFeeBps: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
auctionId: number;
auctionEpoch: number;
fillPrice: string;
effectivePlatformFeeBps: number;
}, {
auctionId: number;
auctionEpoch: number;
fillPrice: string;
effectivePlatformFeeBps: number;
}>;
}, "strip", z.ZodTypeAny, {
auctionId: number;
auctionEpoch: number;
fillPrice: string;
effectivePlatformFeeBps: number;
type: signatoryClient.IndicativeQuoteResponseType.Ok;
data: {
auctionId: number;
auctionEpoch: number;
fillPrice: string;
effectivePlatformFeeBps: number;
};
}, {
auctionId: number;
auctionEpoch: number;
fillPrice: string;
effectivePlatformFeeBps: number;
}>;
export declare enum FirmQuoteResponseCode {
type: signatoryClient.IndicativeQuoteResponseType.Ok;
data: {
auctionId: number;
auctionEpoch: number;
fillPrice: string;
effectivePlatformFeeBps: number;
};
}>, z.ZodObject<{
type: z.ZodLiteral<signatoryClient.IndicativeQuoteResponseType.Unavailable>;
data: z.ZodObject<{
reason: z.ZodObject<{
code: z.ZodNumber;
msg: z.ZodString;
}, "strip", z.ZodTypeAny, {
code: number;
msg: string;
}, {
code: number;
msg: string;
}>;
}, "strip", z.ZodTypeAny, {
reason: {
code: number;
msg: string;
};
}, {
reason: {
code: number;
msg: string;
};
}>;
}, "strip", z.ZodTypeAny, {
type: signatoryClient.IndicativeQuoteResponseType.Unavailable;
data: {
reason: {
code: number;
msg: string;
};
};
}, {
type: signatoryClient.IndicativeQuoteResponseType.Unavailable;
data: {
reason: {
code: number;
msg: string;
};
};
}>]>;
export declare enum FirmQuoteResponseType {
/** Transaction must be sent directly to the settlement network */
MarketMakerOk = 0
Ok = "Ok",
/** Liquidity is unavailable, and payment in lieu is not offered */
Unavailable = "Unavailable"
}

@@ -111,4 +172,4 @@ export type FirmQuoteRequest = z.infer<typeof schemaFirmQuoteRequest>;

}, "strip", z.ZodTypeAny, {
value: string;
data: string;
value: string;
chainId: number;

@@ -118,4 +179,4 @@ from: string;

}, {
value: string;
data: string;
value: string;
chainId: number;

@@ -161,4 +222,4 @@ from: string;

}, "strip", z.ZodTypeAny, {
value: string;
data: string;
value: string;
chainId: number;

@@ -168,4 +229,4 @@ from: string;

}, {
value: string;
data: string;
value: string;
chainId: number;

@@ -211,4 +272,4 @@ from: string;

}, "strip", z.ZodTypeAny, {
value: string;
data: string;
value: string;
chainId: number;

@@ -218,4 +279,4 @@ from: string;

}, {
value: string;
data: string;
value: string;
chainId: number;

@@ -226,79 +287,6 @@ from: string;

}, z.ZodTypeAny, "passthrough">>;
export type FirmQuoteMarketMakerResponse = z.infer<typeof schemaFirmQuoteMarketMakerResponse>;
export declare const schemaFirmQuoteMarketMakerResponse: z.ZodObject<{
code: z.ZodLiteral<signatoryClient.FirmQuoteResponseCode.MarketMakerOk>;
tx: z.ZodObject<{
chainId: z.ZodNumber;
from: z.ZodString;
to: z.ZodString;
data: z.ZodString;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
data: string;
value: string;
chainId: number;
from: string;
to: string;
}, {
data: string;
value: string;
chainId: number;
from: string;
to: string;
}>;
allowanceTarget: z.ZodNullable<z.ZodString>;
lastValidBlockTimestamp: z.ZodNumber;
sendQty: z.ZodString;
receiveQty: z.ZodString;
minFillQty: z.ZodString;
platformFee: z.ZodOptional<z.ZodObject<{
receiver: z.ZodString;
qty: z.ZodString;
bps: z.ZodNumber;
token: z.ZodString;
}, "strip", z.ZodTypeAny, {
token: string;
receiver: string;
qty: string;
bps: number;
}, {
token: string;
receiver: string;
qty: string;
bps: number;
}>>;
dbboTime: z.ZodNumber;
dbboData: z.ZodAny;
sendNotional: z.ZodOptional<z.ZodNumber>;
receiveNotional: z.ZodOptional<z.ZodNumber>;
fillNotional: z.ZodOptional<z.ZodNumber>;
requestId: z.ZodObject<{
signature: z.ZodString;
id: z.ZodString;
retailTrader: z.ZodString;
sendToken: z.ZodString;
sendQty: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
endorsement: z.ZodObject<{
endorser: z.ZodString;
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
lastValidBlockTimestamp: z.ZodNumber;
export type FirmQuoteOkResponse = z.infer<typeof schemaFirmQuoteOkResponse>;
export declare const schemaFirmQuoteOkResponse: z.ZodObject<{
type: z.ZodLiteral<signatoryClient.FirmQuoteResponseType.Ok>;
data: z.ZodObject<{
tx: z.ZodObject<{

@@ -311,4 +299,4 @@ chainId: z.ZodNumber;

}, "strip", z.ZodTypeAny, {
value: string;
data: string;
value: string;
chainId: number;

@@ -318,4 +306,4 @@ from: string;

}, {
value: string;
data: string;
value: string;
chainId: number;

@@ -325,134 +313,284 @@ from: string;

}>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
signature: z.ZodString;
id: z.ZodString;
retailTrader: z.ZodString;
sendToken: z.ZodString;
allowanceTarget: z.ZodNullable<z.ZodString>;
lastValidBlockTimestamp: z.ZodNumber;
sendQty: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
endorsement: z.ZodObject<{
endorser: z.ZodString;
receiveQty: z.ZodString;
minFillQty: z.ZodString;
platformFee: z.ZodOptional<z.ZodObject<{
receiver: z.ZodString;
qty: z.ZodString;
bps: z.ZodNumber;
token: z.ZodString;
}, "strip", z.ZodTypeAny, {
token: string;
receiver: string;
qty: string;
bps: number;
}, {
token: string;
receiver: string;
qty: string;
bps: number;
}>>;
dbboTime: z.ZodNumber;
dbboData: z.ZodAny;
sendNotional: z.ZodOptional<z.ZodNumber>;
receiveNotional: z.ZodOptional<z.ZodNumber>;
fillNotional: z.ZodOptional<z.ZodNumber>;
requestId: z.ZodObject<{
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
lastValidBlockTimestamp: z.ZodNumber;
tx: z.ZodObject<{
chainId: z.ZodNumber;
from: z.ZodString;
to: z.ZodString;
data: z.ZodString;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
data: string;
retailTrader: z.ZodString;
sendToken: z.ZodString;
sendQty: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
endorsement: z.ZodObject<{
endorser: z.ZodString;
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
lastValidBlockTimestamp: z.ZodNumber;
tx: z.ZodObject<{
chainId: z.ZodNumber;
from: z.ZodString;
to: z.ZodString;
data: z.ZodString;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
data: string;
chainId: number;
from: string;
to: string;
}, {
value: string;
data: string;
chainId: number;
from: string;
to: string;
}>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
signature: z.ZodString;
id: z.ZodString;
retailTrader: z.ZodString;
sendToken: z.ZodString;
sendQty: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
endorsement: z.ZodObject<{
endorser: z.ZodString;
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
lastValidBlockTimestamp: z.ZodNumber;
tx: z.ZodObject<{
chainId: z.ZodNumber;
from: z.ZodString;
to: z.ZodString;
data: z.ZodString;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
data: string;
chainId: number;
from: string;
to: string;
}, {
value: string;
data: string;
chainId: number;
from: string;
to: string;
}>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
signature: z.ZodString;
id: z.ZodString;
retailTrader: z.ZodString;
sendToken: z.ZodString;
sendQty: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
endorsement: z.ZodObject<{
endorser: z.ZodString;
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
lastValidBlockTimestamp: z.ZodNumber;
tx: z.ZodObject<{
chainId: z.ZodNumber;
from: z.ZodString;
to: z.ZodString;
data: z.ZodString;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
data: string;
chainId: number;
from: string;
to: string;
}, {
value: string;
data: string;
chainId: number;
from: string;
to: string;
}>;
}, z.ZodTypeAny, "passthrough">>;
}, "strip", z.ZodTypeAny, {
sendQty: string;
lastValidBlockTimestamp: number;
tx: {
value: string;
chainId: number;
from: string;
to: string;
}, {
data: string;
value: string;
chainId: number;
from: string;
to: string;
}>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
signature: z.ZodString;
id: z.ZodString;
retailTrader: z.ZodString;
sendToken: z.ZodString;
sendQty: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
endorsement: z.ZodObject<{
endorser: z.ZodString;
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
};
allowanceTarget: string | null;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
lastValidBlockTimestamp: z.ZodNumber;
tx: z.ZodObject<{
chainId: z.ZodNumber;
from: z.ZodString;
to: z.ZodString;
data: z.ZodString;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
data: string;
retailTrader: string;
sendToken: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
};
sendQty: string;
lastValidBlockTimestamp: number;
tx: {
value: string;
data: string;
chainId: number;
from: string;
to: string;
};
} & {
[k: string]: unknown;
};
platformFee?: {
token: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
}, {
sendQty: string;
lastValidBlockTimestamp: number;
tx: {
value: string;
chainId: number;
from: string;
to: string;
}, {
data: string;
value: string;
chainId: number;
from: string;
to: string;
}>;
}, z.ZodTypeAny, "passthrough">>;
}, "strip", z.ZodTypeAny, {
code: signatoryClient.FirmQuoteResponseCode.MarketMakerOk;
sendQty: string;
lastValidBlockTimestamp: number;
tx: {
data: string;
value: string;
chainId: number;
from: string;
to: string;
};
allowanceTarget: string | null;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
retailTrader: string;
sendToken: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
};
allowanceTarget: string | null;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
retailTrader: string;
sendToken: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
};
sendQty: string;
lastValidBlockTimestamp: number;
tx: {
value: string;
data: string;
chainId: number;
from: string;
to: string;
};
} & {
[k: string]: unknown;
};
platformFee?: {
token: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
}>;
}, "strip", z.ZodTypeAny, {
type: signatoryClient.FirmQuoteResponseType.Ok;
data: {
sendQty: string;
lastValidBlockTimestamp: number;
tx: {
value: string;
data: string;
value: string;
chainId: number;

@@ -462,50 +600,52 @@ from: string;

};
} & {
[k: string]: unknown;
};
platformFee?: {
token: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
}, {
code: signatoryClient.FirmQuoteResponseCode.MarketMakerOk;
sendQty: string;
lastValidBlockTimestamp: number;
tx: {
data: string;
value: string;
chainId: number;
from: string;
to: string;
};
allowanceTarget: string | null;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
retailTrader: string;
sendToken: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
allowanceTarget: string | null;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
retailTrader: string;
sendToken: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
};
sendQty: string;
lastValidBlockTimestamp: number;
tx: {
value: string;
data: string;
chainId: number;
from: string;
to: string;
};
} & {
[k: string]: unknown;
};
platformFee?: {
token: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
};
}, {
type: signatoryClient.FirmQuoteResponseType.Ok;
data: {
sendQty: string;
lastValidBlockTimestamp: number;
tx: {
value: string;
data: string;
value: string;
chainId: number;

@@ -515,93 +655,91 @@ from: string;

};
} & {
[k: string]: unknown;
allowanceTarget: string | null;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
retailTrader: string;
sendToken: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
};
sendQty: string;
lastValidBlockTimestamp: number;
tx: {
value: string;
data: string;
chainId: number;
from: string;
to: string;
};
} & {
[k: string]: unknown;
};
platformFee?: {
token: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
};
platformFee?: {
token: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
}>;
export type FirmQuoteResponse = z.infer<typeof schemaFirmQuoteResponse>;
export declare const schemaFirmQuoteResponse: z.ZodDiscriminatedUnion<"code", [z.ZodObject<{
code: z.ZodLiteral<signatoryClient.FirmQuoteResponseCode.MarketMakerOk>;
tx: z.ZodObject<{
chainId: z.ZodNumber;
from: z.ZodString;
to: z.ZodString;
data: z.ZodString;
value: z.ZodString;
export type FirmQuoteUnavailableResponse = z.infer<typeof schemaFirmQuoteUnavailableResponse>;
export declare const schemaFirmQuoteUnavailableResponse: z.ZodObject<{
type: z.ZodLiteral<signatoryClient.FirmQuoteResponseType.Unavailable>;
data: z.ZodObject<{
reason: z.ZodObject<{
code: z.ZodNumber;
msg: z.ZodString;
}, "strip", z.ZodTypeAny, {
code: number;
msg: string;
}, {
code: number;
msg: string;
}>;
}, "strip", z.ZodTypeAny, {
data: string;
value: string;
chainId: number;
from: string;
to: string;
reason: {
code: number;
msg: string;
};
}, {
data: string;
value: string;
chainId: number;
from: string;
to: string;
reason: {
code: number;
msg: string;
};
}>;
allowanceTarget: z.ZodNullable<z.ZodString>;
lastValidBlockTimestamp: z.ZodNumber;
sendQty: z.ZodString;
receiveQty: z.ZodString;
minFillQty: z.ZodString;
platformFee: z.ZodOptional<z.ZodObject<{
receiver: z.ZodString;
qty: z.ZodString;
bps: z.ZodNumber;
token: z.ZodString;
}, "strip", z.ZodTypeAny, {
token: string;
receiver: string;
qty: string;
bps: number;
}, {
token: string;
receiver: string;
qty: string;
bps: number;
}>>;
dbboTime: z.ZodNumber;
dbboData: z.ZodAny;
sendNotional: z.ZodOptional<z.ZodNumber>;
receiveNotional: z.ZodOptional<z.ZodNumber>;
fillNotional: z.ZodOptional<z.ZodNumber>;
requestId: z.ZodObject<{
signature: z.ZodString;
id: z.ZodString;
retailTrader: z.ZodString;
sendToken: z.ZodString;
sendQty: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
endorsement: z.ZodObject<{
endorser: z.ZodString;
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
lastValidBlockTimestamp: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
type: signatoryClient.FirmQuoteResponseType.Unavailable;
data: {
reason: {
code: number;
msg: string;
};
};
}, {
type: signatoryClient.FirmQuoteResponseType.Unavailable;
data: {
reason: {
code: number;
msg: string;
};
};
}>;
export type FirmQuoteResponse = z.infer<typeof schemaFirmQuoteResponse>;
export declare const schemaFirmQuoteResponse: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
type: z.ZodLiteral<signatoryClient.FirmQuoteResponseType.Ok>;
data: z.ZodObject<{
tx: z.ZodObject<{

@@ -614,4 +752,4 @@ chainId: z.ZodNumber;

}, "strip", z.ZodTypeAny, {
value: string;
data: string;
value: string;
chainId: number;

@@ -621,4 +759,4 @@ from: string;

}, {
value: string;
data: string;
value: string;
chainId: number;

@@ -628,134 +766,284 @@ from: string;

}>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
signature: z.ZodString;
id: z.ZodString;
retailTrader: z.ZodString;
sendToken: z.ZodString;
allowanceTarget: z.ZodNullable<z.ZodString>;
lastValidBlockTimestamp: z.ZodNumber;
sendQty: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
endorsement: z.ZodObject<{
endorser: z.ZodString;
receiveQty: z.ZodString;
minFillQty: z.ZodString;
platformFee: z.ZodOptional<z.ZodObject<{
receiver: z.ZodString;
qty: z.ZodString;
bps: z.ZodNumber;
token: z.ZodString;
}, "strip", z.ZodTypeAny, {
token: string;
receiver: string;
qty: string;
bps: number;
}, {
token: string;
receiver: string;
qty: string;
bps: number;
}>>;
dbboTime: z.ZodNumber;
dbboData: z.ZodAny;
sendNotional: z.ZodOptional<z.ZodNumber>;
receiveNotional: z.ZodOptional<z.ZodNumber>;
fillNotional: z.ZodOptional<z.ZodNumber>;
requestId: z.ZodObject<{
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
lastValidBlockTimestamp: z.ZodNumber;
tx: z.ZodObject<{
chainId: z.ZodNumber;
from: z.ZodString;
to: z.ZodString;
data: z.ZodString;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
data: string;
retailTrader: z.ZodString;
sendToken: z.ZodString;
sendQty: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
endorsement: z.ZodObject<{
endorser: z.ZodString;
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
lastValidBlockTimestamp: z.ZodNumber;
tx: z.ZodObject<{
chainId: z.ZodNumber;
from: z.ZodString;
to: z.ZodString;
data: z.ZodString;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
data: string;
chainId: number;
from: string;
to: string;
}, {
value: string;
data: string;
chainId: number;
from: string;
to: string;
}>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
signature: z.ZodString;
id: z.ZodString;
retailTrader: z.ZodString;
sendToken: z.ZodString;
sendQty: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
endorsement: z.ZodObject<{
endorser: z.ZodString;
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
lastValidBlockTimestamp: z.ZodNumber;
tx: z.ZodObject<{
chainId: z.ZodNumber;
from: z.ZodString;
to: z.ZodString;
data: z.ZodString;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
data: string;
chainId: number;
from: string;
to: string;
}, {
value: string;
data: string;
chainId: number;
from: string;
to: string;
}>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
signature: z.ZodString;
id: z.ZodString;
retailTrader: z.ZodString;
sendToken: z.ZodString;
sendQty: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
endorsement: z.ZodObject<{
endorser: z.ZodString;
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
lastValidBlockTimestamp: z.ZodNumber;
tx: z.ZodObject<{
chainId: z.ZodNumber;
from: z.ZodString;
to: z.ZodString;
data: z.ZodString;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
data: string;
chainId: number;
from: string;
to: string;
}, {
value: string;
data: string;
chainId: number;
from: string;
to: string;
}>;
}, z.ZodTypeAny, "passthrough">>;
}, "strip", z.ZodTypeAny, {
sendQty: string;
lastValidBlockTimestamp: number;
tx: {
value: string;
chainId: number;
from: string;
to: string;
}, {
data: string;
value: string;
chainId: number;
from: string;
to: string;
}>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
signature: z.ZodString;
id: z.ZodString;
retailTrader: z.ZodString;
sendToken: z.ZodString;
sendQty: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
endorsement: z.ZodObject<{
endorser: z.ZodString;
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
};
allowanceTarget: string | null;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
lastValidBlockTimestamp: z.ZodNumber;
tx: z.ZodObject<{
chainId: z.ZodNumber;
from: z.ZodString;
to: z.ZodString;
data: z.ZodString;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
data: string;
retailTrader: string;
sendToken: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
};
sendQty: string;
lastValidBlockTimestamp: number;
tx: {
value: string;
data: string;
chainId: number;
from: string;
to: string;
};
} & {
[k: string]: unknown;
};
platformFee?: {
token: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
}, {
sendQty: string;
lastValidBlockTimestamp: number;
tx: {
value: string;
chainId: number;
from: string;
to: string;
}, {
data: string;
value: string;
chainId: number;
from: string;
to: string;
}>;
}, z.ZodTypeAny, "passthrough">>;
}, "strip", z.ZodTypeAny, {
code: signatoryClient.FirmQuoteResponseCode.MarketMakerOk;
sendQty: string;
lastValidBlockTimestamp: number;
tx: {
data: string;
value: string;
chainId: number;
from: string;
to: string;
};
allowanceTarget: string | null;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
retailTrader: string;
sendToken: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
};
allowanceTarget: string | null;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
retailTrader: string;
sendToken: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
};
sendQty: string;
lastValidBlockTimestamp: number;
tx: {
value: string;
data: string;
chainId: number;
from: string;
to: string;
};
} & {
[k: string]: unknown;
};
platformFee?: {
token: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
}>;
}, "strip", z.ZodTypeAny, {
type: signatoryClient.FirmQuoteResponseType.Ok;
data: {
sendQty: string;
lastValidBlockTimestamp: number;
tx: {
value: string;
data: string;
value: string;
chainId: number;

@@ -765,50 +1053,52 @@ from: string;

};
} & {
[k: string]: unknown;
};
platformFee?: {
token: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
}, {
code: signatoryClient.FirmQuoteResponseCode.MarketMakerOk;
sendQty: string;
lastValidBlockTimestamp: number;
tx: {
data: string;
value: string;
chainId: number;
from: string;
to: string;
};
allowanceTarget: string | null;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
retailTrader: string;
sendToken: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
allowanceTarget: string | null;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
retailTrader: string;
sendToken: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
};
sendQty: string;
lastValidBlockTimestamp: number;
tx: {
value: string;
data: string;
chainId: number;
from: string;
to: string;
};
} & {
[k: string]: unknown;
};
platformFee?: {
token: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
};
}, {
type: signatoryClient.FirmQuoteResponseType.Ok;
data: {
sendQty: string;
lastValidBlockTimestamp: number;
tx: {
value: string;
data: string;
value: string;
chainId: number;

@@ -818,18 +1108,86 @@ from: string;

};
} & {
[k: string]: unknown;
allowanceTarget: string | null;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
retailTrader: string;
sendToken: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
};
sendQty: string;
lastValidBlockTimestamp: number;
tx: {
value: string;
data: string;
chainId: number;
from: string;
to: string;
};
} & {
[k: string]: unknown;
};
platformFee?: {
token: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
};
platformFee?: {
token: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<signatoryClient.FirmQuoteResponseType.Unavailable>;
data: z.ZodObject<{
reason: z.ZodObject<{
code: z.ZodNumber;
msg: z.ZodString;
}, "strip", z.ZodTypeAny, {
code: number;
msg: string;
}, {
code: number;
msg: string;
}>;
}, "strip", z.ZodTypeAny, {
reason: {
code: number;
msg: string;
};
}, {
reason: {
code: number;
msg: string;
};
}>;
}, "strip", z.ZodTypeAny, {
type: signatoryClient.FirmQuoteResponseType.Unavailable;
data: {
reason: {
code: number;
msg: string;
};
};
}, {
type: signatoryClient.FirmQuoteResponseType.Unavailable;
data: {
reason: {
code: number;
msg: string;
};
};
}>]>;
import { ReportTransactionRequest, ReportTransactionResponse, ReportTransactionResponseCode, ReportTransactionResponseNotPaid, ReportTransactionResponsePaid, schemaReportTransactionRequest, schemaReportTransactionResponse, schemaReportTransactionResponseNotPaid, schemaReportTransactionResponsePaid } from "@dflow-protocol/signatory-client-lib/evm/legacy";
export { ReportTransactionRequest, ReportTransactionResponse, ReportTransactionResponseCode, ReportTransactionResponseNotPaid, ReportTransactionResponsePaid, schemaReportTransactionRequest, schemaReportTransactionResponse, schemaReportTransactionResponseNotPaid, schemaReportTransactionResponsePaid, };
export { ReportTransactionRequest, ReportTransactionResponse, ReportTransactionResponseType, ReportTransactionResponseNotPaid, ReportTransactionResponsePaid, schemaReportTransactionRequest, schemaReportTransactionResponse, schemaReportTransactionResponseNotPaid, schemaReportTransactionResponsePaid, } from "@dflow-protocol/signatory-client-lib/evm/legacy";
//# sourceMappingURL=type.d.ts.map

@@ -26,3 +26,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.schemaReportTransactionResponsePaid = exports.schemaReportTransactionResponseNotPaid = exports.schemaReportTransactionResponse = exports.schemaReportTransactionRequest = exports.ReportTransactionResponseCode = exports.schemaFirmQuoteResponse = exports.schemaFirmQuoteMarketMakerResponse = exports.schemaSignatoryRequestID = exports.schemaFirmQuoteRequest = exports.FirmQuoteResponseCode = exports.schemaIndicativeQuoteResponse = exports.schemaIndicativeQuoteRequest = void 0;
exports.schemaReportTransactionResponsePaid = exports.schemaReportTransactionResponseNotPaid = exports.schemaReportTransactionResponse = exports.schemaReportTransactionRequest = exports.ReportTransactionResponseType = exports.schemaFirmQuoteResponse = exports.schemaFirmQuoteUnavailableResponse = exports.schemaFirmQuoteOkResponse = exports.schemaSignatoryRequestID = exports.schemaFirmQuoteRequest = exports.FirmQuoteResponseType = exports.schemaIndicativeQuoteResponse = exports.schemaIndicativeQuoteRequest = void 0;
const signatoryClient = __importStar(require("@dflow-protocol/signatory-client-lib/evm/legacy"));

@@ -38,7 +38,9 @@ const common_1 = require("../common");

exports.schemaIndicativeQuoteResponse = signatoryClient.schemaIndicativeQuoteResponse;
var FirmQuoteResponseCode;
(function (FirmQuoteResponseCode) {
var FirmQuoteResponseType;
(function (FirmQuoteResponseType) {
/** Transaction must be sent directly to the settlement network */
FirmQuoteResponseCode[FirmQuoteResponseCode["MarketMakerOk"] = 0] = "MarketMakerOk";
})(FirmQuoteResponseCode = exports.FirmQuoteResponseCode || (exports.FirmQuoteResponseCode = {}));
FirmQuoteResponseType["Ok"] = "Ok";
/** Liquidity is unavailable, and payment in lieu is not offered */
FirmQuoteResponseType["Unavailable"] = "Unavailable";
})(FirmQuoteResponseType = exports.FirmQuoteResponseType || (exports.FirmQuoteResponseType = {}));
exports.schemaFirmQuoteRequest = signatoryClient.schemaFirmQuoteRequest

@@ -54,8 +56,10 @@ .omit({

exports.schemaSignatoryRequestID = signatoryClient.schemaSignatoryRequestID;
exports.schemaFirmQuoteMarketMakerResponse = signatoryClient.schemaFirmQuoteMarketMakerResponse;
exports.schemaFirmQuoteResponse = zod_1.z.discriminatedUnion("code", [
exports.schemaFirmQuoteMarketMakerResponse,
exports.schemaFirmQuoteOkResponse = signatoryClient.schemaFirmQuoteOkResponse;
exports.schemaFirmQuoteUnavailableResponse = signatoryClient.schemaFirmQuoteUnavailableResponse;
exports.schemaFirmQuoteResponse = zod_1.z.discriminatedUnion("type", [
exports.schemaFirmQuoteOkResponse,
exports.schemaFirmQuoteUnavailableResponse,
]);
const legacy_1 = require("@dflow-protocol/signatory-client-lib/evm/legacy");
Object.defineProperty(exports, "ReportTransactionResponseCode", { enumerable: true, get: function () { return legacy_1.ReportTransactionResponseCode; } });
var legacy_1 = require("@dflow-protocol/signatory-client-lib/evm/legacy");
Object.defineProperty(exports, "ReportTransactionResponseType", { enumerable: true, get: function () { return legacy_1.ReportTransactionResponseType; } });
Object.defineProperty(exports, "schemaReportTransactionRequest", { enumerable: true, get: function () { return legacy_1.schemaReportTransactionRequest; } });

@@ -62,0 +66,0 @@ Object.defineProperty(exports, "schemaReportTransactionResponse", { enumerable: true, get: function () { return legacy_1.schemaReportTransactionResponse; } });

@@ -24,6 +24,6 @@ "use strict";

if (error) {
return Object.assign({ ok: false }, error);
return { ok: false, error };
}
const response = yield responseObj.json();
return Object.assign({ ok: true }, response);
return { ok: true, data: response };
});

@@ -37,5 +37,5 @@ }

if (!result.ok) {
throw new Error(result.msg);
throw new Error(result.error.msg);
}
return result;
return result.data;
});

@@ -52,6 +52,6 @@ }

if (error) {
return Object.assign({ ok: false }, error);
return { ok: false, error };
}
const response = yield responseObj.json();
return Object.assign({ ok: true }, response);
return { ok: true, data: response };
});

@@ -65,5 +65,5 @@ }

if (!result.ok) {
throw new Error(result.msg);
throw new Error(result.error.msg);
}
return result;
return result.data;
});

@@ -81,6 +81,6 @@ }

if (error) {
return Object.assign({ ok: false }, error);
return { ok: false, error };
}
const response = yield responseObj.json();
return Object.assign({ ok: true }, response);
return { ok: true, data: response };
});

@@ -94,5 +94,5 @@ }

if (!result.ok) {
throw new Error(result.msg);
throw new Error(result.error.msg);
}
return result;
return result.data;
});

@@ -99,0 +99,0 @@ }

@@ -8,2 +8,3 @@ import * as signatoryClient from "@dflow-protocol/signatory-client-lib/solana";

receiveMint: z.ZodString;
feePayer: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"retailTrader">, z.ZodLiteral<"marketMaker">]>>;
platformFeeBps: z.ZodOptional<z.ZodString>;

@@ -15,2 +16,3 @@ platformFeeReceiver: z.ZodOptional<z.ZodString>;

receiveMint: string;
feePayer?: "retailTrader" | "marketMaker" | undefined;
platformFeeBps?: string | undefined;

@@ -22,2 +24,3 @@ platformFeeReceiver?: string | undefined;

receiveMint: string;
feePayer?: "retailTrader" | "marketMaker" | undefined;
platformFeeBps?: string | undefined;

@@ -27,21 +30,82 @@ platformFeeReceiver?: string | undefined;

export type IndicativeQuoteResponse = z.infer<typeof schemaIndicativeQuoteResponse>;
export declare const schemaIndicativeQuoteResponse: z.ZodObject<{
fillPrice: z.ZodString;
effectivePlatformFeeBps: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
export declare const schemaIndicativeQuoteResponse: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
type: z.ZodLiteral<signatoryClient.IndicativeQuoteResponseType.Ok>;
data: z.ZodObject<{
fillPrice: z.ZodString;
effectivePlatformFeeBps: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
auctionId: number;
auctionEpoch: number;
fillPrice: string;
effectivePlatformFeeBps: number;
}, {
auctionId: number;
auctionEpoch: number;
fillPrice: string;
effectivePlatformFeeBps: number;
}>;
}, "strip", z.ZodTypeAny, {
auctionId: number;
auctionEpoch: number;
fillPrice: string;
effectivePlatformFeeBps: number;
type: signatoryClient.IndicativeQuoteResponseType.Ok;
data: {
auctionId: number;
auctionEpoch: number;
fillPrice: string;
effectivePlatformFeeBps: number;
};
}, {
auctionId: number;
auctionEpoch: number;
fillPrice: string;
effectivePlatformFeeBps: number;
}>;
export declare enum FirmQuoteResponseCode {
type: signatoryClient.IndicativeQuoteResponseType.Ok;
data: {
auctionId: number;
auctionEpoch: number;
fillPrice: string;
effectivePlatformFeeBps: number;
};
}>, z.ZodObject<{
type: z.ZodLiteral<signatoryClient.IndicativeQuoteResponseType.Unavailable>;
data: z.ZodObject<{
reason: z.ZodObject<{
code: z.ZodNumber;
msg: z.ZodString;
}, "strip", z.ZodTypeAny, {
code: number;
msg: string;
}, {
code: number;
msg: string;
}>;
}, "strip", z.ZodTypeAny, {
reason: {
code: number;
msg: string;
};
}, {
reason: {
code: number;
msg: string;
};
}>;
}, "strip", z.ZodTypeAny, {
type: signatoryClient.IndicativeQuoteResponseType.Unavailable;
data: {
reason: {
code: number;
msg: string;
};
};
}, {
type: signatoryClient.IndicativeQuoteResponseType.Unavailable;
data: {
reason: {
code: number;
msg: string;
};
};
}>]>;
export declare enum FirmQuoteResponseType {
/** Transaction must be sent via signatory server sendTransaction endpoint */
MarketMakerViaSignatoryServer = 0
Ok = "Ok",
/** Liquidity is unavailable, and payment in lieu is not offered */
Unavailable = "Unavailable"
}

@@ -55,2 +119,3 @@ export type FirmQuoteRequest = z.infer<typeof schemaFirmQuoteRequest>;

receiveMint: z.ZodString;
feePayer: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"retailTrader">, z.ZodLiteral<"marketMaker">]>>;
useNativeSOL: z.ZodOptional<z.ZodBoolean>;

@@ -65,2 +130,3 @@ retailTrader: z.ZodString;

platformFeeReceiver?: string | undefined;
feePayer?: "retailTrader" | "marketMaker" | undefined;
useNativeSOL?: boolean | undefined;

@@ -74,2 +140,3 @@ }, {

platformFeeReceiver?: string | undefined;
feePayer?: "retailTrader" | "marketMaker" | undefined;
useNativeSOL?: boolean | undefined;

@@ -169,432 +236,697 @@ }>;

}, z.ZodTypeAny, "passthrough">>;
export type FirmQuoteMarketMakerResponse = z.infer<typeof schemaFirmQuoteMarketMakerResponse>;
export declare const schemaFirmQuoteMarketMakerResponse: z.ZodObject<{
code: z.ZodLiteral<signatoryClient.FirmQuoteResponseCode.MarketMakerViaSignatoryServer>;
tx: z.ZodString;
txRequiredLamports: z.ZodNumber;
solanaTransactionFee: z.ZodNumber;
tokenAccountRentDeposit: z.ZodNumber;
lastValidBlockHeight: z.ZodNumber;
lastAllowedBlockHeight: z.ZodNumber;
blockHeightQueryCommitment: z.ZodString;
sendQty: z.ZodString;
receiveQty: z.ZodString;
minFillQty: z.ZodString;
platformFee: z.ZodOptional<z.ZodObject<{
receiver: z.ZodString;
qty: z.ZodString;
bps: z.ZodNumber;
mint: z.ZodString;
}, "strip", z.ZodTypeAny, {
mint: string;
receiver: string;
qty: string;
bps: number;
}, {
mint: string;
receiver: string;
qty: string;
bps: number;
}>>;
dbboTime: z.ZodNumber;
dbboData: z.ZodAny;
sendNotional: z.ZodOptional<z.ZodNumber>;
receiveNotional: z.ZodOptional<z.ZodNumber>;
fillNotional: z.ZodOptional<z.ZodNumber>;
requestId: z.ZodObject<{
signature: z.ZodString;
id: z.ZodString;
retailTrader: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
marketMakerURL: z.ZodString;
quoteId: z.ZodString;
endorsement: z.ZodObject<{
endorser: z.ZodString;
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
export type FirmQuoteOkResponse = z.infer<typeof schemaFirmQuoteOkResponse>;
export declare const schemaFirmQuoteOkResponse: z.ZodObject<{
type: z.ZodLiteral<signatoryClient.FirmQuoteResponseType.Ok>;
data: z.ZodObject<{
tx: z.ZodString;
txRequiredLamports: z.ZodNumber;
solanaTransactionFee: z.ZodNumber;
tokenAccountRentDeposit: z.ZodNumber;
lastValidBlockHeight: z.ZodNumber;
lastAllowedBlockHeight: z.ZodNumber;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
signature: z.ZodString;
id: z.ZodString;
retailTrader: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
marketMakerURL: z.ZodString;
quoteId: z.ZodString;
endorsement: z.ZodObject<{
endorser: z.ZodString;
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
blockHeightQueryCommitment: z.ZodString;
sendQty: z.ZodString;
receiveQty: z.ZodString;
minFillQty: z.ZodString;
platformFee: z.ZodOptional<z.ZodObject<{
receiver: z.ZodString;
qty: z.ZodString;
bps: z.ZodNumber;
mint: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
mint: string;
receiver: string;
qty: string;
bps: number;
}, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
lastValidBlockHeight: z.ZodNumber;
lastAllowedBlockHeight: z.ZodNumber;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
signature: z.ZodString;
id: z.ZodString;
retailTrader: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
marketMakerURL: z.ZodString;
quoteId: z.ZodString;
endorsement: z.ZodObject<{
endorser: z.ZodString;
mint: string;
receiver: string;
qty: string;
bps: number;
}>>;
dbboTime: z.ZodNumber;
dbboData: z.ZodAny;
sendNotional: z.ZodOptional<z.ZodNumber>;
receiveNotional: z.ZodOptional<z.ZodNumber>;
fillNotional: z.ZodOptional<z.ZodNumber>;
requestId: z.ZodObject<{
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
retailTrader: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
marketMakerURL: z.ZodString;
quoteId: z.ZodString;
endorsement: z.ZodObject<{
endorser: z.ZodString;
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
lastValidBlockHeight: z.ZodNumber;
lastAllowedBlockHeight: z.ZodNumber;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
signature: z.ZodString;
id: z.ZodString;
retailTrader: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
marketMakerURL: z.ZodString;
quoteId: z.ZodString;
endorsement: z.ZodObject<{
endorser: z.ZodString;
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
lastValidBlockHeight: z.ZodNumber;
lastAllowedBlockHeight: z.ZodNumber;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
signature: z.ZodString;
id: z.ZodString;
retailTrader: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
marketMakerURL: z.ZodString;
quoteId: z.ZodString;
endorsement: z.ZodObject<{
endorser: z.ZodString;
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
lastValidBlockHeight: z.ZodNumber;
lastAllowedBlockHeight: z.ZodNumber;
}, z.ZodTypeAny, "passthrough">>;
}, "strip", z.ZodTypeAny, {
sendQty: string;
tx: string;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}, {
endorser: string;
retailTrader: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
};
marketMakerURL: string;
quoteId: string;
lastValidBlockHeight: number;
lastAllowedBlockHeight: number;
} & {
[k: string]: unknown;
};
lastValidBlockHeight: number;
lastAllowedBlockHeight: number;
txRequiredLamports: number;
solanaTransactionFee: number;
tokenAccountRentDeposit: number;
blockHeightQueryCommitment: string;
platformFee?: {
mint: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
}, {
sendQty: string;
tx: string;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
lastValidBlockHeight: z.ZodNumber;
lastAllowedBlockHeight: z.ZodNumber;
}, z.ZodTypeAny, "passthrough">>;
retailTrader: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
};
marketMakerURL: string;
quoteId: string;
lastValidBlockHeight: number;
lastAllowedBlockHeight: number;
} & {
[k: string]: unknown;
};
lastValidBlockHeight: number;
lastAllowedBlockHeight: number;
txRequiredLamports: number;
solanaTransactionFee: number;
tokenAccountRentDeposit: number;
blockHeightQueryCommitment: string;
platformFee?: {
mint: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
}>;
}, "strip", z.ZodTypeAny, {
code: signatoryClient.FirmQuoteResponseCode.MarketMakerViaSignatoryServer;
sendQty: string;
tx: string;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
retailTrader: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
type: signatoryClient.FirmQuoteResponseType.Ok;
data: {
sendQty: string;
tx: string;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
retailTrader: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
};
marketMakerURL: string;
quoteId: string;
lastValidBlockHeight: number;
lastAllowedBlockHeight: number;
} & {
[k: string]: unknown;
};
marketMakerURL: string;
quoteId: string;
lastValidBlockHeight: number;
lastAllowedBlockHeight: number;
} & {
[k: string]: unknown;
txRequiredLamports: number;
solanaTransactionFee: number;
tokenAccountRentDeposit: number;
blockHeightQueryCommitment: string;
platformFee?: {
mint: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
};
lastValidBlockHeight: number;
lastAllowedBlockHeight: number;
txRequiredLamports: number;
solanaTransactionFee: number;
tokenAccountRentDeposit: number;
blockHeightQueryCommitment: string;
platformFee?: {
mint: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
}, {
code: signatoryClient.FirmQuoteResponseCode.MarketMakerViaSignatoryServer;
sendQty: string;
tx: string;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
retailTrader: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
type: signatoryClient.FirmQuoteResponseType.Ok;
data: {
sendQty: string;
tx: string;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
retailTrader: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
};
marketMakerURL: string;
quoteId: string;
lastValidBlockHeight: number;
lastAllowedBlockHeight: number;
} & {
[k: string]: unknown;
};
marketMakerURL: string;
quoteId: string;
lastValidBlockHeight: number;
lastAllowedBlockHeight: number;
} & {
[k: string]: unknown;
txRequiredLamports: number;
solanaTransactionFee: number;
tokenAccountRentDeposit: number;
blockHeightQueryCommitment: string;
platformFee?: {
mint: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
};
lastValidBlockHeight: number;
lastAllowedBlockHeight: number;
txRequiredLamports: number;
solanaTransactionFee: number;
tokenAccountRentDeposit: number;
blockHeightQueryCommitment: string;
platformFee?: {
mint: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
}>;
export type FirmQuoteResponse = z.infer<typeof schemaFirmQuoteResponse>;
export declare const schemaFirmQuoteResponse: z.ZodDiscriminatedUnion<"code", [z.ZodObject<{
code: z.ZodLiteral<signatoryClient.FirmQuoteResponseCode.MarketMakerViaSignatoryServer>;
tx: z.ZodString;
txRequiredLamports: z.ZodNumber;
solanaTransactionFee: z.ZodNumber;
tokenAccountRentDeposit: z.ZodNumber;
lastValidBlockHeight: z.ZodNumber;
lastAllowedBlockHeight: z.ZodNumber;
blockHeightQueryCommitment: z.ZodString;
sendQty: z.ZodString;
receiveQty: z.ZodString;
minFillQty: z.ZodString;
platformFee: z.ZodOptional<z.ZodObject<{
receiver: z.ZodString;
qty: z.ZodString;
bps: z.ZodNumber;
mint: z.ZodString;
}, "strip", z.ZodTypeAny, {
mint: string;
receiver: string;
qty: string;
bps: number;
}, {
mint: string;
receiver: string;
qty: string;
bps: number;
}>>;
dbboTime: z.ZodNumber;
dbboData: z.ZodAny;
sendNotional: z.ZodOptional<z.ZodNumber>;
receiveNotional: z.ZodOptional<z.ZodNumber>;
fillNotional: z.ZodOptional<z.ZodNumber>;
requestId: z.ZodObject<{
signature: z.ZodString;
id: z.ZodString;
retailTrader: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
marketMakerURL: z.ZodString;
quoteId: z.ZodString;
endorsement: z.ZodObject<{
endorser: z.ZodString;
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
export type FirmQuoteUnavailableResponse = z.infer<typeof schemaFirmQuoteUnavailableResponse>;
export declare const schemaFirmQuoteUnavailableResponse: z.ZodObject<{
type: z.ZodLiteral<signatoryClient.FirmQuoteResponseType.Unavailable>;
data: z.ZodObject<{
reason: z.ZodObject<{
code: z.ZodNumber;
msg: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
code: number;
msg: string;
}, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
code: number;
msg: string;
}>;
}, "strip", z.ZodTypeAny, {
reason: {
code: number;
msg: string;
};
}, {
reason: {
code: number;
msg: string;
};
}>;
}, "strip", z.ZodTypeAny, {
type: signatoryClient.FirmQuoteResponseType.Unavailable;
data: {
reason: {
code: number;
msg: string;
};
};
}, {
type: signatoryClient.FirmQuoteResponseType.Unavailable;
data: {
reason: {
code: number;
msg: string;
};
};
}>;
export type FirmQuoteResponse = z.infer<typeof schemaFirmQuoteResponse>;
export declare const schemaFirmQuoteResponse: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
type: z.ZodLiteral<signatoryClient.FirmQuoteResponseType.Ok>;
data: z.ZodObject<{
tx: z.ZodString;
txRequiredLamports: z.ZodNumber;
solanaTransactionFee: z.ZodNumber;
tokenAccountRentDeposit: z.ZodNumber;
lastValidBlockHeight: z.ZodNumber;
lastAllowedBlockHeight: z.ZodNumber;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
signature: z.ZodString;
id: z.ZodString;
retailTrader: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
marketMakerURL: z.ZodString;
quoteId: z.ZodString;
endorsement: z.ZodObject<{
endorser: z.ZodString;
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
blockHeightQueryCommitment: z.ZodString;
sendQty: z.ZodString;
receiveQty: z.ZodString;
minFillQty: z.ZodString;
platformFee: z.ZodOptional<z.ZodObject<{
receiver: z.ZodString;
qty: z.ZodString;
bps: z.ZodNumber;
mint: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
mint: string;
receiver: string;
qty: string;
bps: number;
}, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
lastValidBlockHeight: z.ZodNumber;
lastAllowedBlockHeight: z.ZodNumber;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
signature: z.ZodString;
id: z.ZodString;
retailTrader: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
marketMakerURL: z.ZodString;
quoteId: z.ZodString;
endorsement: z.ZodObject<{
endorser: z.ZodString;
mint: string;
receiver: string;
qty: string;
bps: number;
}>>;
dbboTime: z.ZodNumber;
dbboData: z.ZodAny;
sendNotional: z.ZodOptional<z.ZodNumber>;
receiveNotional: z.ZodOptional<z.ZodNumber>;
fillNotional: z.ZodOptional<z.ZodNumber>;
requestId: z.ZodObject<{
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
retailTrader: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
marketMakerURL: z.ZodString;
quoteId: z.ZodString;
endorsement: z.ZodObject<{
endorser: z.ZodString;
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
lastValidBlockHeight: z.ZodNumber;
lastAllowedBlockHeight: z.ZodNumber;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
signature: z.ZodString;
id: z.ZodString;
retailTrader: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
marketMakerURL: z.ZodString;
quoteId: z.ZodString;
endorsement: z.ZodObject<{
endorser: z.ZodString;
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
lastValidBlockHeight: z.ZodNumber;
lastAllowedBlockHeight: z.ZodNumber;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
signature: z.ZodString;
id: z.ZodString;
retailTrader: z.ZodString;
notional: z.ZodNumber;
auctionId: z.ZodNumber;
auctionEpoch: z.ZodNumber;
marketMakerURL: z.ZodString;
quoteId: z.ZodString;
endorsement: z.ZodObject<{
endorser: z.ZodString;
signature: z.ZodString;
id: z.ZodString;
expirationTimeUTC: z.ZodNumber;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}, {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
lastValidBlockHeight: z.ZodNumber;
lastAllowedBlockHeight: z.ZodNumber;
}, z.ZodTypeAny, "passthrough">>;
}, "strip", z.ZodTypeAny, {
sendQty: string;
tx: string;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}, {
endorser: string;
retailTrader: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
};
marketMakerURL: string;
quoteId: string;
lastValidBlockHeight: number;
lastAllowedBlockHeight: number;
} & {
[k: string]: unknown;
};
lastValidBlockHeight: number;
lastAllowedBlockHeight: number;
txRequiredLamports: number;
solanaTransactionFee: number;
tokenAccountRentDeposit: number;
blockHeightQueryCommitment: string;
platformFee?: {
mint: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
}, {
sendQty: string;
tx: string;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
}>;
lastValidBlockHeight: z.ZodNumber;
lastAllowedBlockHeight: z.ZodNumber;
}, z.ZodTypeAny, "passthrough">>;
retailTrader: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
};
marketMakerURL: string;
quoteId: string;
lastValidBlockHeight: number;
lastAllowedBlockHeight: number;
} & {
[k: string]: unknown;
};
lastValidBlockHeight: number;
lastAllowedBlockHeight: number;
txRequiredLamports: number;
solanaTransactionFee: number;
tokenAccountRentDeposit: number;
blockHeightQueryCommitment: string;
platformFee?: {
mint: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
}>;
}, "strip", z.ZodTypeAny, {
code: signatoryClient.FirmQuoteResponseCode.MarketMakerViaSignatoryServer;
sendQty: string;
tx: string;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
retailTrader: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
type: signatoryClient.FirmQuoteResponseType.Ok;
data: {
sendQty: string;
tx: string;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
retailTrader: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
};
marketMakerURL: string;
quoteId: string;
lastValidBlockHeight: number;
lastAllowedBlockHeight: number;
} & {
[k: string]: unknown;
};
marketMakerURL: string;
quoteId: string;
lastValidBlockHeight: number;
lastAllowedBlockHeight: number;
} & {
[k: string]: unknown;
txRequiredLamports: number;
solanaTransactionFee: number;
tokenAccountRentDeposit: number;
blockHeightQueryCommitment: string;
platformFee?: {
mint: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
};
lastValidBlockHeight: number;
lastAllowedBlockHeight: number;
txRequiredLamports: number;
solanaTransactionFee: number;
tokenAccountRentDeposit: number;
blockHeightQueryCommitment: string;
platformFee?: {
mint: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
}, {
code: signatoryClient.FirmQuoteResponseCode.MarketMakerViaSignatoryServer;
sendQty: string;
tx: string;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
retailTrader: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
type: signatoryClient.FirmQuoteResponseType.Ok;
data: {
sendQty: string;
tx: string;
receiveQty: string;
minFillQty: string;
dbboTime: number;
requestId: {
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
retailTrader: string;
notional: number;
auctionId: number;
auctionEpoch: number;
endorsement: {
endorser: string;
signature: string;
id: string;
expirationTimeUTC: number;
data: string;
};
marketMakerURL: string;
quoteId: string;
lastValidBlockHeight: number;
lastAllowedBlockHeight: number;
} & {
[k: string]: unknown;
};
marketMakerURL: string;
quoteId: string;
lastValidBlockHeight: number;
lastAllowedBlockHeight: number;
} & {
[k: string]: unknown;
txRequiredLamports: number;
solanaTransactionFee: number;
tokenAccountRentDeposit: number;
blockHeightQueryCommitment: string;
platformFee?: {
mint: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
};
lastValidBlockHeight: number;
lastAllowedBlockHeight: number;
txRequiredLamports: number;
solanaTransactionFee: number;
tokenAccountRentDeposit: number;
blockHeightQueryCommitment: string;
platformFee?: {
mint: string;
receiver: string;
qty: string;
bps: number;
} | undefined;
dbboData?: any;
sendNotional?: number | undefined;
receiveNotional?: number | undefined;
fillNotional?: number | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<signatoryClient.FirmQuoteResponseType.Unavailable>;
data: z.ZodObject<{
reason: z.ZodObject<{
code: z.ZodNumber;
msg: z.ZodString;
}, "strip", z.ZodTypeAny, {
code: number;
msg: string;
}, {
code: number;
msg: string;
}>;
}, "strip", z.ZodTypeAny, {
reason: {
code: number;
msg: string;
};
}, {
reason: {
code: number;
msg: string;
};
}>;
}, "strip", z.ZodTypeAny, {
type: signatoryClient.FirmQuoteResponseType.Unavailable;
data: {
reason: {
code: number;
msg: string;
};
};
}, {
type: signatoryClient.FirmQuoteResponseType.Unavailable;
data: {
reason: {
code: number;
msg: string;
};
};
}>]>;
import { SendTransactionRequest, SendTransactionResponse, SendTransactionResponseCode, SendTransactionResponseNotSent, SendTransactionResponseSent, schemaSendTransactionRequest, schemaSendTransactionResponse, schemaSendTransactionResponseNotSent, schemaSendTransactionResponseSent } from "@dflow-protocol/signatory-client-lib/solana";
export { SendTransactionRequest, SendTransactionResponse, SendTransactionResponseCode, SendTransactionResponseNotSent, SendTransactionResponseSent, schemaSendTransactionRequest, schemaSendTransactionResponse, schemaSendTransactionResponseNotSent, schemaSendTransactionResponseSent, };
export { SendTransactionRequest, SendTransactionResponse, SendTransactionResponseType, SendTransactionResponseNotSent, SendTransactionResponseSent, schemaSendTransactionRequest, schemaSendTransactionResponse, schemaSendTransactionResponseNotSent, schemaSendTransactionResponseSent, } from "@dflow-protocol/signatory-client-lib/solana";
//# sourceMappingURL=type.d.ts.map

@@ -26,3 +26,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.schemaSendTransactionResponseSent = exports.schemaSendTransactionResponseNotSent = exports.schemaSendTransactionResponse = exports.schemaSendTransactionRequest = exports.SendTransactionResponseCode = exports.schemaFirmQuoteResponse = exports.schemaFirmQuoteMarketMakerResponse = exports.schemaSignatoryRequestID = exports.schemaFirmQuoteRequest = exports.FirmQuoteResponseCode = exports.schemaIndicativeQuoteResponse = exports.schemaIndicativeQuoteRequest = void 0;
exports.schemaSendTransactionResponseSent = exports.schemaSendTransactionResponseNotSent = exports.schemaSendTransactionResponse = exports.schemaSendTransactionRequest = exports.SendTransactionResponseType = exports.schemaFirmQuoteResponse = exports.schemaFirmQuoteUnavailableResponse = exports.schemaFirmQuoteOkResponse = exports.schemaSignatoryRequestID = exports.schemaFirmQuoteRequest = exports.FirmQuoteResponseType = exports.schemaIndicativeQuoteResponse = exports.schemaIndicativeQuoteRequest = void 0;
const signatoryClient = __importStar(require("@dflow-protocol/signatory-client-lib/solana"));

@@ -38,7 +38,9 @@ const common_1 = require("../common");

exports.schemaIndicativeQuoteResponse = signatoryClient.schemaIndicativeQuoteResponse;
var FirmQuoteResponseCode;
(function (FirmQuoteResponseCode) {
var FirmQuoteResponseType;
(function (FirmQuoteResponseType) {
/** Transaction must be sent via signatory server sendTransaction endpoint */
FirmQuoteResponseCode[FirmQuoteResponseCode["MarketMakerViaSignatoryServer"] = 0] = "MarketMakerViaSignatoryServer";
})(FirmQuoteResponseCode = exports.FirmQuoteResponseCode || (exports.FirmQuoteResponseCode = {}));
FirmQuoteResponseType["Ok"] = "Ok";
/** Liquidity is unavailable, and payment in lieu is not offered */
FirmQuoteResponseType["Unavailable"] = "Unavailable";
})(FirmQuoteResponseType = exports.FirmQuoteResponseType || (exports.FirmQuoteResponseType = {}));
exports.schemaFirmQuoteRequest = signatoryClient.schemaFirmQuoteRequest

@@ -54,8 +56,10 @@ .omit({

exports.schemaSignatoryRequestID = signatoryClient.schemaSignatoryRequestID;
exports.schemaFirmQuoteMarketMakerResponse = signatoryClient.schemaFirmQuoteMarketMakerResponse;
exports.schemaFirmQuoteResponse = zod_1.z.discriminatedUnion("code", [
exports.schemaFirmQuoteMarketMakerResponse,
exports.schemaFirmQuoteOkResponse = signatoryClient.schemaFirmQuoteOkResponse;
exports.schemaFirmQuoteUnavailableResponse = signatoryClient.schemaFirmQuoteUnavailableResponse;
exports.schemaFirmQuoteResponse = zod_1.z.discriminatedUnion("type", [
exports.schemaFirmQuoteOkResponse,
exports.schemaFirmQuoteUnavailableResponse,
]);
const solana_1 = require("@dflow-protocol/signatory-client-lib/solana");
Object.defineProperty(exports, "SendTransactionResponseCode", { enumerable: true, get: function () { return solana_1.SendTransactionResponseCode; } });
var solana_1 = require("@dflow-protocol/signatory-client-lib/solana");
Object.defineProperty(exports, "SendTransactionResponseType", { enumerable: true, get: function () { return solana_1.SendTransactionResponseType; } });
Object.defineProperty(exports, "schemaSendTransactionRequest", { enumerable: true, get: function () { return solana_1.schemaSendTransactionRequest; } });

@@ -62,0 +66,0 @@ Object.defineProperty(exports, "schemaSendTransactionResponse", { enumerable: true, get: function () { return solana_1.schemaSendTransactionResponse; } });

{
"name": "@dflow-protocol/dflow-swap-client",
"version": "0.3.0",
"version": "0.4.0",
"license": "MIT",

@@ -12,2 +12,5 @@ "exports": {

},
"./markets": {
"default": "./dist/markets/index.js"
},
"./solana": {

@@ -19,10 +22,13 @@ "default": "./dist/solana/index.js"

"*": {
"*": [
"./dist/*.d.ts"
],
"evm": [
"./dist/evm/index.d.ts"
],
"markets": [
"./dist/markets/index.d.ts"
],
"solana": [
"./dist/solana/index.d.ts"
],
"*": [
"./dist/*.d.ts"
]

@@ -42,3 +48,3 @@ }

"dependencies": {
"@dflow-protocol/signatory-client-lib": "^1.0.2",
"@dflow-protocol/signatory-client-lib": "^1.0.4",
"zod": "^3.21.4"

@@ -45,0 +51,0 @@ },

@@ -0,1 +1,3 @@

export const marketsPath = "/markets";
export const solanaBasePath = "/solana";

@@ -2,0 +4,0 @@

@@ -24,6 +24,6 @@ import { ErrorResponse, util } from "@dflow-protocol/signatory-client-lib";

if (error) {
return { ok: false, ...error };
return { ok: false, error };
}
const response: IndicativeQuoteResponse = await responseObj.json();
return { ok: true, ...response };
return { ok: true, data: response };
}

@@ -39,5 +39,5 @@

if (!result.ok) {
throw new Error(result.msg);
throw new Error(result.error.msg);
}
return result;
return result.data;
}

@@ -56,6 +56,6 @@

if (error) {
return { ok: false, ...error };
return { ok: false, error };
}
const response: FirmQuoteResponse = await responseObj.json();
return { ok: true, ...response };
return { ok: true, data: response };
}

@@ -71,5 +71,5 @@

if (!result.ok) {
throw new Error(result.msg);
throw new Error(result.error.msg);
}
return result;
return result.data;
}

@@ -89,6 +89,6 @@

if (error) {
return { ok: false, ...error };
return { ok: false, error };
}
const response: ReportTransactionResponse = await responseObj.json();
return { ok: true, ...response };
return { ok: true, data: response };
}

@@ -105,5 +105,5 @@

if (!result.ok) {
throw new Error(result.msg);
throw new Error(result.error.msg);
}
return result;
return result.data;
}

@@ -110,0 +110,0 @@

@@ -16,5 +16,7 @@ import * as signatoryClient from "@dflow-protocol/signatory-client-lib/evm/legacy";

export enum FirmQuoteResponseCode {
export enum FirmQuoteResponseType {
/** Transaction must be sent directly to the settlement network */
MarketMakerOk = 0,
Ok = signatoryClient.FirmQuoteResponseType.Ok,
/** Liquidity is unavailable, and payment in lieu is not offered */
Unavailable = signatoryClient.FirmQuoteResponseType.Unavailable,
}

@@ -36,15 +38,19 @@

export type FirmQuoteMarketMakerResponse = z.infer<typeof schemaFirmQuoteMarketMakerResponse>;
export const schemaFirmQuoteMarketMakerResponse =
signatoryClient.schemaFirmQuoteMarketMakerResponse;
export type FirmQuoteOkResponse = z.infer<typeof schemaFirmQuoteOkResponse>;
export const schemaFirmQuoteOkResponse = signatoryClient.schemaFirmQuoteOkResponse;
export type FirmQuoteUnavailableResponse = z.infer<typeof schemaFirmQuoteUnavailableResponse>;
export const schemaFirmQuoteUnavailableResponse
= signatoryClient.schemaFirmQuoteUnavailableResponse;
export type FirmQuoteResponse = z.infer<typeof schemaFirmQuoteResponse>;
export const schemaFirmQuoteResponse = z.discriminatedUnion("code", [
schemaFirmQuoteMarketMakerResponse,
export const schemaFirmQuoteResponse = z.discriminatedUnion("type", [
schemaFirmQuoteOkResponse,
schemaFirmQuoteUnavailableResponse,
]);
import {
export {
ReportTransactionRequest,
ReportTransactionResponse,
ReportTransactionResponseCode,
ReportTransactionResponseType,
ReportTransactionResponseNotPaid,

@@ -57,13 +63,1 @@ ReportTransactionResponsePaid,

} from "@dflow-protocol/signatory-client-lib/evm/legacy";
export {
ReportTransactionRequest,
ReportTransactionResponse,
ReportTransactionResponseCode,
ReportTransactionResponseNotPaid,
ReportTransactionResponsePaid,
schemaReportTransactionRequest,
schemaReportTransactionResponse,
schemaReportTransactionResponseNotPaid,
schemaReportTransactionResponsePaid,
};

@@ -24,6 +24,6 @@ import { ErrorResponse, util } from "@dflow-protocol/signatory-client-lib";

if (error) {
return { ok: false, ...error };
return { ok: false, error };
}
const response: IndicativeQuoteResponse = await responseObj.json();
return { ok: true, ...response };
return { ok: true, data: response };
}

@@ -39,5 +39,5 @@

if (!result.ok) {
throw new Error(result.msg);
throw new Error(result.error.msg);
}
return result;
return result.data;
}

@@ -56,6 +56,6 @@

if (error) {
return { ok: false, ...error };
return { ok: false, error };
}
const response: FirmQuoteResponse = await responseObj.json();
return { ok: true, ...response };
return { ok: true, data: response };
}

@@ -71,5 +71,5 @@

if (!result.ok) {
throw new Error(result.msg);
throw new Error(result.error.msg);
}
return result;
return result.data;
}

@@ -89,6 +89,6 @@

if (error) {
return { ok: false, ...error };
return { ok: false, error };
}
const response: SendTransactionResponse = await responseObj.json();
return { ok: true, ...response };
return { ok: true, data: response };
}

@@ -104,5 +104,5 @@

if (!result.ok) {
throw new Error(result.msg);
throw new Error(result.error.msg);
}
return result;
return result.data;
}

@@ -109,0 +109,0 @@

@@ -16,5 +16,7 @@ import * as signatoryClient from "@dflow-protocol/signatory-client-lib/solana";

export enum FirmQuoteResponseCode {
export enum FirmQuoteResponseType {
/** Transaction must be sent via signatory server sendTransaction endpoint */
MarketMakerViaSignatoryServer = 0,
Ok = signatoryClient.FirmQuoteResponseType.Ok,
/** Liquidity is unavailable, and payment in lieu is not offered */
Unavailable = signatoryClient.FirmQuoteResponseType.Unavailable,
}

@@ -36,15 +38,19 @@

export type FirmQuoteMarketMakerResponse = z.infer<typeof schemaFirmQuoteMarketMakerResponse>;
export const schemaFirmQuoteMarketMakerResponse =
signatoryClient.schemaFirmQuoteMarketMakerResponse;
export type FirmQuoteOkResponse = z.infer<typeof schemaFirmQuoteOkResponse>;
export const schemaFirmQuoteOkResponse = signatoryClient.schemaFirmQuoteOkResponse;
export type FirmQuoteUnavailableResponse = z.infer<typeof schemaFirmQuoteUnavailableResponse>;
export const schemaFirmQuoteUnavailableResponse
= signatoryClient.schemaFirmQuoteUnavailableResponse;
export type FirmQuoteResponse = z.infer<typeof schemaFirmQuoteResponse>;
export const schemaFirmQuoteResponse = z.discriminatedUnion("code", [
schemaFirmQuoteMarketMakerResponse,
export const schemaFirmQuoteResponse = z.discriminatedUnion("type", [
schemaFirmQuoteOkResponse,
schemaFirmQuoteUnavailableResponse,
]);
import {
export {
SendTransactionRequest,
SendTransactionResponse,
SendTransactionResponseCode,
SendTransactionResponseType,
SendTransactionResponseNotSent,

@@ -57,13 +63,1 @@ SendTransactionResponseSent,

} from "@dflow-protocol/signatory-client-lib/solana";
export {
SendTransactionRequest,
SendTransactionResponse,
SendTransactionResponseCode,
SendTransactionResponseNotSent,
SendTransactionResponseSent,
schemaSendTransactionRequest,
schemaSendTransactionResponse,
schemaSendTransactionResponseNotSent,
schemaSendTransactionResponseSent,
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc