@nadohq/shared 0.25.0 → 0.26.0
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/dist/eip712/eip712ValueTypes.d.cts +2 -2
- package/dist/eip712/eip712ValueTypes.d.ts +2 -2
- package/dist/eip712/getNadoEIP712PrimaryType.d.cts +1 -1
- package/dist/eip712/getNadoEIP712PrimaryType.d.ts +1 -1
- package/dist/eip712/getNadoEIP712Types.cjs +18 -0
- package/dist/eip712/getNadoEIP712Types.cjs.map +1 -1
- package/dist/eip712/getNadoEIP712Types.d.cts +1 -1
- package/dist/eip712/getNadoEIP712Types.d.ts +1 -1
- package/dist/eip712/getNadoEIP712Types.js +18 -0
- package/dist/eip712/getNadoEIP712Types.js.map +1 -1
- package/dist/eip712/getNadoEIP712Values.cjs +14 -0
- package/dist/eip712/getNadoEIP712Values.cjs.map +1 -1
- package/dist/eip712/getNadoEIP712Values.d.cts +1 -1
- package/dist/eip712/getNadoEIP712Values.d.ts +1 -1
- package/dist/eip712/getNadoEIP712Values.js +14 -0
- package/dist/eip712/getNadoEIP712Values.js.map +1 -1
- package/dist/eip712/getSignedTransactionRequest.d.cts +1 -1
- package/dist/eip712/getSignedTransactionRequest.d.ts +1 -1
- package/dist/eip712/index.d.cts +9 -9
- package/dist/eip712/index.d.ts +9 -9
- package/dist/eip712/orderDigest.d.cts +1 -1
- package/dist/eip712/orderDigest.d.ts +1 -1
- package/dist/eip712/signableRequestType.d.cts +1 -1
- package/dist/eip712/signableRequestType.d.ts +1 -1
- package/dist/eip712/signatureParamTypes.d.cts +2 -2
- package/dist/eip712/signatureParamTypes.d.ts +2 -2
- package/dist/{eip712ValueTypes-BbEkGbjV.d.ts → eip712ValueTypes-CD1TxxFv.d.ts} +5 -3
- package/dist/eip712ValueTypes-CD1TxxFv.d.ts.map +1 -0
- package/dist/{eip712ValueTypes-WrIZ5ICk.d.cts → eip712ValueTypes-CI6wMCCw.d.cts} +5 -3
- package/dist/eip712ValueTypes-CI6wMCCw.d.cts.map +1 -0
- package/dist/encoding/encoding.d.cts +1 -1
- package/dist/encoding/encoding.d.ts +1 -1
- package/dist/encoding/index.d.cts +1 -1
- package/dist/encoding/index.d.ts +1 -1
- package/dist/{encoding-HLKz9Upc.d.cts → encoding-BXqysa4s.d.cts} +2 -2
- package/dist/{encoding-HLKz9Upc.d.cts.map → encoding-BXqysa4s.d.cts.map} +1 -1
- package/dist/{encoding-CJkvIVP6.d.ts → encoding-DaxmoLmF.d.ts} +2 -2
- package/dist/{encoding-CJkvIVP6.d.ts.map → encoding-DaxmoLmF.d.ts.map} +1 -1
- package/dist/{getNadoEIP712PrimaryType-DHPlkKNM.d.ts → getNadoEIP712PrimaryType-CE0fRiTI.d.ts} +2 -2
- package/dist/{getNadoEIP712PrimaryType-DHPlkKNM.d.ts.map → getNadoEIP712PrimaryType-CE0fRiTI.d.ts.map} +1 -1
- package/dist/{getNadoEIP712PrimaryType-BOMG9Lzk.d.cts → getNadoEIP712PrimaryType-Cq8siJx7.d.cts} +2 -2
- package/dist/{getNadoEIP712PrimaryType-BOMG9Lzk.d.cts.map → getNadoEIP712PrimaryType-Cq8siJx7.d.cts.map} +1 -1
- package/dist/{getNadoEIP712Types-yqpQaEMA.d.ts → getNadoEIP712Types-BmB1bTGu.d.ts} +2 -2
- package/dist/{getNadoEIP712Types-yqpQaEMA.d.ts.map → getNadoEIP712Types-BmB1bTGu.d.ts.map} +1 -1
- package/dist/{getNadoEIP712Types-usf5U-za.d.cts → getNadoEIP712Types-D7duS2wH.d.cts} +2 -2
- package/dist/{getNadoEIP712Types-usf5U-za.d.cts.map → getNadoEIP712Types-D7duS2wH.d.cts.map} +1 -1
- package/dist/{getNadoEIP712Values-BmFwH7vp.d.ts → getNadoEIP712Values-0EOMObhX.d.ts} +3 -3
- package/dist/getNadoEIP712Values-0EOMObhX.d.ts.map +1 -0
- package/dist/{getNadoEIP712Values-CP4TLMfi.d.cts → getNadoEIP712Values-DEBZh7-M.d.cts} +3 -3
- package/dist/getNadoEIP712Values-DEBZh7-M.d.cts.map +1 -0
- package/dist/{getSignedTransactionRequest-DjhheDGX.d.cts → getSignedTransactionRequest-DxUMBHLe.d.cts} +2 -2
- package/dist/{getSignedTransactionRequest-DjhheDGX.d.cts.map → getSignedTransactionRequest-DxUMBHLe.d.cts.map} +1 -1
- package/dist/{getSignedTransactionRequest-DokLJF9S.d.ts → getSignedTransactionRequest-Et_1Y1wr.d.ts} +2 -2
- package/dist/{getSignedTransactionRequest-DokLJF9S.d.ts.map → getSignedTransactionRequest-Et_1Y1wr.d.ts.map} +1 -1
- package/dist/index.d.cts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/{orderDigest-CQBiGxV6.d.ts → orderDigest-BlytCeEr.d.ts} +2 -2
- package/dist/{orderDigest-CQBiGxV6.d.ts.map → orderDigest-BlytCeEr.d.ts.map} +1 -1
- package/dist/{orderDigest-4sDa8VTd.d.cts → orderDigest-C9Sr-5TO.d.cts} +2 -2
- package/dist/{orderDigest-4sDa8VTd.d.cts.map → orderDigest-C9Sr-5TO.d.cts.map} +1 -1
- package/dist/{signableRequestType-C-MaCVaC.d.ts → signableRequestType-BV11vCXW.d.cts} +3 -2
- package/dist/signableRequestType-BV11vCXW.d.cts.map +1 -0
- package/dist/{signableRequestType-BFOJH5y6.d.cts → signableRequestType-DWpXrjGE.d.ts} +3 -2
- package/dist/signableRequestType-DWpXrjGE.d.ts.map +1 -0
- package/dist/{signatureParamTypes-DY1dhU2B.d.ts → signatureParamTypes-CDUNzp0c.d.ts} +7 -2
- package/dist/signatureParamTypes-CDUNzp0c.d.ts.map +1 -0
- package/dist/{signatureParamTypes-w4Wms7tY.d.cts → signatureParamTypes-Cjm4X5PA.d.cts} +7 -2
- package/dist/signatureParamTypes-Cjm4X5PA.d.cts.map +1 -0
- package/package.json +2 -2
- package/src/eip712/eip712ValueTypes.ts +5 -0
- package/src/eip712/getNadoEIP712Types.ts +9 -0
- package/src/eip712/getNadoEIP712Values.ts +21 -0
- package/src/eip712/signableRequestType.ts +2 -0
- package/src/eip712/signatureParamTypes.ts +8 -0
- package/dist/eip712ValueTypes-BbEkGbjV.d.ts.map +0 -1
- package/dist/eip712ValueTypes-WrIZ5ICk.d.cts.map +0 -1
- package/dist/getNadoEIP712Values-BmFwH7vp.d.ts.map +0 -1
- package/dist/getNadoEIP712Values-CP4TLMfi.d.cts.map +0 -1
- package/dist/signableRequestType-BFOJH5y6.d.cts.map +0 -1
- package/dist/signableRequestType-C-MaCVaC.d.ts.map +0 -1
- package/dist/signatureParamTypes-DY1dhU2B.d.ts.map +0 -1
- package/dist/signatureParamTypes-w4Wms7tY.d.cts.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as EIP712ListTriggerOrdersValues, c as EIP712OrderValues, d as EIP712TransferQuoteValues, f as
|
|
2
|
-
export { EIP712BurnNlpValues, EIP712LeaderboardAuthenticationValues, EIP712LinkSignerValues, EIP712LiquidateSubaccountValues, EIP712ListTriggerOrdersValues, EIP712MintNlpValues, EIP712OrderCancellationValues, EIP712OrderValues, EIP712ProductOrdersCancellationValues, EIP712SocialAuthenticationValues, EIP712TransferQuoteValues, EIP712WithdrawCollateralV2Values, EIP712WithdrawCollateralValues, SignableRequestTypeToEIP712Values };
|
|
1
|
+
import { a as EIP712ListTriggerOrdersValues, c as EIP712OrderValues, d as EIP712TransferQuoteValues, f as EIP712UpdateDependencyValues, h as SignableRequestTypeToEIP712Values, i as EIP712LiquidateSubaccountValues, l as EIP712ProductOrdersCancellationValues, m as EIP712WithdrawCollateralValues, n as EIP712LeaderboardAuthenticationValues, o as EIP712MintNlpValues, p as EIP712WithdrawCollateralV2Values, r as EIP712LinkSignerValues, s as EIP712OrderCancellationValues, t as EIP712BurnNlpValues, u as EIP712SocialAuthenticationValues } from "../eip712ValueTypes-CI6wMCCw.cjs";
|
|
2
|
+
export { EIP712BurnNlpValues, EIP712LeaderboardAuthenticationValues, EIP712LinkSignerValues, EIP712LiquidateSubaccountValues, EIP712ListTriggerOrdersValues, EIP712MintNlpValues, EIP712OrderCancellationValues, EIP712OrderValues, EIP712ProductOrdersCancellationValues, EIP712SocialAuthenticationValues, EIP712TransferQuoteValues, EIP712UpdateDependencyValues, EIP712WithdrawCollateralV2Values, EIP712WithdrawCollateralValues, SignableRequestTypeToEIP712Values };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as EIP712ListTriggerOrdersValues, c as EIP712OrderValues, d as EIP712TransferQuoteValues, f as
|
|
2
|
-
export { EIP712BurnNlpValues, EIP712LeaderboardAuthenticationValues, EIP712LinkSignerValues, EIP712LiquidateSubaccountValues, EIP712ListTriggerOrdersValues, EIP712MintNlpValues, EIP712OrderCancellationValues, EIP712OrderValues, EIP712ProductOrdersCancellationValues, EIP712SocialAuthenticationValues, EIP712TransferQuoteValues, EIP712WithdrawCollateralV2Values, EIP712WithdrawCollateralValues, SignableRequestTypeToEIP712Values };
|
|
1
|
+
import { a as EIP712ListTriggerOrdersValues, c as EIP712OrderValues, d as EIP712TransferQuoteValues, f as EIP712UpdateDependencyValues, h as SignableRequestTypeToEIP712Values, i as EIP712LiquidateSubaccountValues, l as EIP712ProductOrdersCancellationValues, m as EIP712WithdrawCollateralValues, n as EIP712LeaderboardAuthenticationValues, o as EIP712MintNlpValues, p as EIP712WithdrawCollateralV2Values, r as EIP712LinkSignerValues, s as EIP712OrderCancellationValues, t as EIP712BurnNlpValues, u as EIP712SocialAuthenticationValues } from "../eip712ValueTypes-CD1TxxFv.js";
|
|
2
|
+
export { EIP712BurnNlpValues, EIP712LeaderboardAuthenticationValues, EIP712LinkSignerValues, EIP712LiquidateSubaccountValues, EIP712ListTriggerOrdersValues, EIP712MintNlpValues, EIP712OrderCancellationValues, EIP712OrderValues, EIP712ProductOrdersCancellationValues, EIP712SocialAuthenticationValues, EIP712TransferQuoteValues, EIP712UpdateDependencyValues, EIP712WithdrawCollateralV2Values, EIP712WithdrawCollateralValues, SignableRequestTypeToEIP712Values };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as getNadoEIP712PrimaryType } from "../getNadoEIP712PrimaryType-
|
|
1
|
+
import { t as getNadoEIP712PrimaryType } from "../getNadoEIP712PrimaryType-Cq8siJx7.cjs";
|
|
2
2
|
export { getNadoEIP712PrimaryType };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as getNadoEIP712PrimaryType } from "../getNadoEIP712PrimaryType-
|
|
1
|
+
import { t as getNadoEIP712PrimaryType } from "../getNadoEIP712PrimaryType-CE0fRiTI.js";
|
|
2
2
|
export { getNadoEIP712PrimaryType };
|
|
@@ -84,6 +84,24 @@ function getNadoEIP712Types(requestType) {
|
|
|
84
84
|
name: "recvTime",
|
|
85
85
|
type: "uint64"
|
|
86
86
|
}] };
|
|
87
|
+
case "update_dependency": return { DependencyUpdate: [
|
|
88
|
+
{
|
|
89
|
+
name: "sender",
|
|
90
|
+
type: "bytes32"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: "oldDigest",
|
|
94
|
+
type: "bytes32"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "newDigest",
|
|
98
|
+
type: "bytes32"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: "nonce",
|
|
102
|
+
type: "uint64"
|
|
103
|
+
}
|
|
104
|
+
] };
|
|
87
105
|
case "cancel_orders": return { Cancellation: [
|
|
88
106
|
{
|
|
89
107
|
name: "sender",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNadoEIP712Types.cjs","names":[],"sources":["../../src/eip712/getNadoEIP712Types.ts"],"sourcesContent":["import { SignableRequestType } from './signableRequestType';\n\ninterface TypedDataField {\n name: string;\n type: string;\n}\n\n/**\n * Return the EIP712 types for a given request\n *\n * @param requestType\n */\nexport function getNadoEIP712Types(\n requestType: SignableRequestType,\n): Record<string, Array<TypedDataField>> {\n switch (requestType) {\n case 'withdraw_collateral':\n return {\n WithdrawCollateral: [\n { name: 'sender', type: 'bytes32' },\n { name: 'productId', type: 'uint32' },\n { name: 'amount', type: 'uint128' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'withdraw_collateral_v2':\n return {\n WithdrawCollateralV2: [\n { name: 'sender', type: 'bytes32' },\n { name: 'productId', type: 'uint32' },\n { name: 'amount', type: 'uint128' },\n { name: 'nonce', type: 'uint64' },\n { name: 'sendTo', type: 'address' },\n { name: 'appendix', type: 'uint128' },\n ],\n };\n case 'place_order':\n return {\n Order: [\n { name: 'sender', type: 'bytes32' },\n { name: 'priceX18', type: 'int128' },\n { name: 'amount', type: 'int128' },\n { name: 'expiration', type: 'uint64' },\n { name: 'nonce', type: 'uint64' },\n { name: 'appendix', type: 'uint128' },\n ],\n };\n case 'list_trigger_orders':\n return {\n ListTriggerOrders: [\n { name: 'sender', type: 'bytes32' },\n { name: 'recvTime', type: 'uint64' },\n ],\n };\n case 'cancel_orders':\n return {\n Cancellation: [\n { name: 'sender', type: 'bytes32' },\n { name: 'productIds', type: 'uint32[]' },\n { name: 'digests', type: 'bytes32[]' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'cancel_product_orders':\n return {\n CancellationProducts: [\n { name: 'sender', type: 'bytes32' },\n { name: 'productIds', type: 'uint32[]' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'liquidate_subaccount':\n return {\n LiquidateSubaccount: [\n { name: 'sender', type: 'bytes32' },\n { name: 'liquidatee', type: 'bytes32' },\n { name: 'mode', type: 'uint8' },\n { name: 'healthGroup', type: 'uint32' },\n { name: 'amount', type: 'int128' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'link_signer':\n return {\n LinkSigner: [\n { name: 'sender', type: 'bytes32' },\n { name: 'signer', type: 'bytes32' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'transfer_quote':\n return {\n TransferQuote: [\n { name: 'sender', type: 'bytes32' },\n { name: 'recipient', type: 'bytes32' },\n { name: 'amount', type: 'uint128' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'leaderboard_authentication':\n return {\n LeaderboardAuthentication: [\n { name: 'sender', type: 'bytes32' },\n { name: 'expiration', type: 'uint64' },\n { name: 'contestIds', type: 'uint32[]' },\n ],\n };\n case 'social_authentication':\n return {\n SocialAuthentication: [\n { name: 'sender', type: 'bytes32' },\n { name: 'expiration', type: 'uint64' },\n { name: 'provider', type: 'string' },\n ],\n };\n case 'mint_nlp':\n return {\n MintNlp: [\n { name: 'sender', type: 'bytes32' },\n { name: 'quoteAmount', type: 'uint128' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'burn_nlp':\n return {\n BurnNlp: [\n { name: 'sender', type: 'bytes32' },\n { name: 'nlpAmount', type: 'uint128' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n }\n}\n"],"mappings":";;;;;;;AAYA,SAAgB,mBACd,aACuC;CACvC,QAAQ,aAAR;EACE,KAAK,uBACH,OAAO,EACL,oBAAoB;GAClB;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAa,MAAM;GAAS;GACpC;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAS,MAAM;GAAS;EAClC,EACF;EACF,KAAK,0BACH,OAAO,EACL,sBAAsB;GACpB;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAa,MAAM;GAAS;GACpC;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAS,MAAM;GAAS;GAChC;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAY,MAAM;GAAU;EACtC,EACF;EACF,KAAK,eACH,OAAO,EACL,OAAO;GACL;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAY,MAAM;GAAS;GACnC;IAAE,MAAM;IAAU,MAAM;GAAS;GACjC;IAAE,MAAM;IAAc,MAAM;GAAS;GACrC;IAAE,MAAM;IAAS,MAAM;GAAS;G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E,MAAM;IAAc,MAAM;GAAW;EACzC,EACF;EACF,KAAK,yBACH,OAAO,EACL,sBAAsB;GACpB;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAc,MAAM;GAAS;GACrC;IAAE,MAAM;IAAY,MAAM;GAAS;EACrC,EACF;EACF,KAAK,YACH,OAAO,EACL,SAAS;GACP;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAe,MAAM;GAAU;GACvC;IAAE,MAAM;IAAS,MAAM;GAAS;EAClC,EACF;EACF,KAAK,YACH,OAAO,EACL,SAAS;GACP;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAa,MAAM;GAAU;GACrC;IAAE,MAAM;IAAS,MAAM;GAAS;EAClC,EACF;CACJ;AACF"}
|
|
1
|
+
{"version":3,"file":"getNadoEIP712Types.cjs","names":[],"sources":["../../src/eip712/getNadoEIP712Types.ts"],"sourcesContent":["import { SignableRequestType } from './signableRequestType';\n\ninterface TypedDataField {\n name: string;\n type: string;\n}\n\n/**\n * Return the EIP712 types for a given request\n *\n * @param requestType\n */\nexport function getNadoEIP712Types(\n requestType: SignableRequestType,\n): Record<string, Array<TypedDataField>> {\n switch (requestType) {\n case 'withdraw_collateral':\n return {\n WithdrawCollateral: [\n { name: 'sender', type: 'bytes32' },\n { name: 'productId', type: 'uint32' },\n { name: 'amount', type: 'uint128' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'withdraw_collateral_v2':\n return {\n WithdrawCollateralV2: [\n { name: 'sender', type: 'bytes32' },\n { name: 'productId', type: 'uint32' },\n { name: 'amount', type: 'uint128' },\n { name: 'nonce', type: 'uint64' },\n { name: 'sendTo', type: 'address' },\n { name: 'appendix', type: 'uint128' },\n ],\n };\n case 'place_order':\n return {\n Order: [\n { name: 'sender', type: 'bytes32' },\n { name: 'priceX18', type: 'int128' },\n { name: 'amount', type: 'int128' },\n { name: 'expiration', type: 'uint64' },\n { name: 'nonce', type: 'uint64' },\n { name: 'appendix', type: 'uint128' },\n ],\n };\n case 'list_trigger_orders':\n return {\n ListTriggerOrders: [\n { name: 'sender', type: 'bytes32' },\n { name: 'recvTime', type: 'uint64' },\n ],\n };\n case 'update_dependency':\n return {\n DependencyUpdate: [\n { name: 'sender', type: 'bytes32' },\n { name: 'oldDigest', type: 'bytes32' },\n { name: 'newDigest', type: 'bytes32' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'cancel_orders':\n return {\n Cancellation: [\n { name: 'sender', type: 'bytes32' },\n { name: 'productIds', type: 'uint32[]' },\n { name: 'digests', type: 'bytes32[]' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'cancel_product_orders':\n return {\n CancellationProducts: [\n { name: 'sender', type: 'bytes32' },\n { name: 'productIds', type: 'uint32[]' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'liquidate_subaccount':\n return {\n LiquidateSubaccount: [\n { name: 'sender', type: 'bytes32' },\n { name: 'liquidatee', type: 'bytes32' },\n { name: 'mode', type: 'uint8' },\n { name: 'healthGroup', type: 'uint32' },\n { name: 'amount', type: 'int128' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'link_signer':\n return {\n LinkSigner: [\n { name: 'sender', type: 'bytes32' },\n { name: 'signer', type: 'bytes32' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'transfer_quote':\n return {\n TransferQuote: [\n { name: 'sender', type: 'bytes32' },\n { name: 'recipient', type: 'bytes32' },\n { name: 'amount', type: 'uint128' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'leaderboard_authentication':\n return {\n LeaderboardAuthentication: [\n { name: 'sender', type: 'bytes32' },\n { name: 'expiration', type: 'uint64' },\n { name: 'contestIds', type: 'uint32[]' },\n ],\n };\n case 'social_authentication':\n return {\n SocialAuthentication: [\n { name: 'sender', type: 'bytes32' },\n { name: 'expiration', type: 'uint64' },\n { name: 'provider', type: 'string' },\n ],\n };\n case 'mint_nlp':\n return {\n MintNlp: [\n { name: 'sender', type: 'bytes32' },\n { name: 'quoteAmount', type: 'uint128' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'burn_nlp':\n return {\n BurnNlp: [\n { name: 'sender', type: 'bytes32' },\n { name: 'nlpAmount', type: 'uint128' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n }\n}\n"],"mappings":";;;;;;;AAYA,SAAgB,mBACd,aACuC;CACvC,QAAQ,aAAR;EACE,KAAK,uBACH,OAAO,EACL,oBAAoB;GAClB;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAa,MAAM;GAAS;GACpC;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAS,MAAM;GAAS;EAClC,EACF;EACF,KAAK,0BACH,OAAO,EACL,sBAAsB;GACpB;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAa,MAAM;GAAS;GACpC;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAS,MAAM;GAAS;GAChC;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAY,MAAM;GAAU;EACtC,EACF;EACF,KAAK,eACH,OAAO,EACL,OAAO;GACL;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAY,MAAM;GAAS;GACnC;IAAE,MAAM;IAAU,MAAM;GAAS;GACjC;IAAE,MAAM;IAAc,MAAM;GAAS;GACrC;IAAE,MAAM;IAAS,MAAM;GAAS;GAChC;IAAE,MAAM;IAAY,MAAM;GAAU;EACtC,EACF;EACF,KAAK,uBACH,OAAO,EACL,mBAAmB,CACjB;GAAE,MAAM;GAAU,MAAM;EAAU,GAClC;GAAE,MAAM;GAAY,MAAM;EAAS,CACrC,EACF;EACF,KAAK,qBACH,OAAO,EACL,kBAAkB;GAChB;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAa,MAAM;GAAU;GACrC;I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M;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAc,MAAM;GAAS;GACrC;IAAE,MAAM;IAAY,MAAM;GAAS;EACrC,EACF;EACF,KAAK,YACH,OAAO,EACL,SAAS;GACP;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAe,MAAM;GAAU;GACvC;IAAE,MAAM;IAAS,MAAM;GAAS;EAClC,EACF;EACF,KAAK,YACH,OAAO,EACL,SAAS;GACP;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAa,MAAM;GAAU;GACrC;IAAE,MAAM;IAAS,MAAM;GAAS;EAClC,EACF;CACJ;AACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as getNadoEIP712Types } from "../getNadoEIP712Types-
|
|
1
|
+
import { t as getNadoEIP712Types } from "../getNadoEIP712Types-D7duS2wH.cjs";
|
|
2
2
|
export { getNadoEIP712Types };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as getNadoEIP712Types } from "../getNadoEIP712Types-
|
|
1
|
+
import { t as getNadoEIP712Types } from "../getNadoEIP712Types-BmB1bTGu.js";
|
|
2
2
|
export { getNadoEIP712Types };
|
|
@@ -83,6 +83,24 @@ function getNadoEIP712Types(requestType) {
|
|
|
83
83
|
name: "recvTime",
|
|
84
84
|
type: "uint64"
|
|
85
85
|
}] };
|
|
86
|
+
case "update_dependency": return { DependencyUpdate: [
|
|
87
|
+
{
|
|
88
|
+
name: "sender",
|
|
89
|
+
type: "bytes32"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: "oldDigest",
|
|
93
|
+
type: "bytes32"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "newDigest",
|
|
97
|
+
type: "bytes32"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: "nonce",
|
|
101
|
+
type: "uint64"
|
|
102
|
+
}
|
|
103
|
+
] };
|
|
86
104
|
case "cancel_orders": return { Cancellation: [
|
|
87
105
|
{
|
|
88
106
|
name: "sender",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNadoEIP712Types.js","names":[],"sources":["../../src/eip712/getNadoEIP712Types.ts"],"sourcesContent":["import { SignableRequestType } from './signableRequestType';\n\ninterface TypedDataField {\n name: string;\n type: string;\n}\n\n/**\n * Return the EIP712 types for a given request\n *\n * @param requestType\n */\nexport function getNadoEIP712Types(\n requestType: SignableRequestType,\n): Record<string, Array<TypedDataField>> {\n switch (requestType) {\n case 'withdraw_collateral':\n return {\n WithdrawCollateral: [\n { name: 'sender', type: 'bytes32' },\n { name: 'productId', type: 'uint32' },\n { name: 'amount', type: 'uint128' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'withdraw_collateral_v2':\n return {\n WithdrawCollateralV2: [\n { name: 'sender', type: 'bytes32' },\n { name: 'productId', type: 'uint32' },\n { name: 'amount', type: 'uint128' },\n { name: 'nonce', type: 'uint64' },\n { name: 'sendTo', type: 'address' },\n { name: 'appendix', type: 'uint128' },\n ],\n };\n case 'place_order':\n return {\n Order: [\n { name: 'sender', type: 'bytes32' },\n { name: 'priceX18', type: 'int128' },\n { name: 'amount', type: 'int128' },\n { name: 'expiration', type: 'uint64' },\n { name: 'nonce', type: 'uint64' },\n { name: 'appendix', type: 'uint128' },\n ],\n };\n case 'list_trigger_orders':\n return {\n ListTriggerOrders: [\n { name: 'sender', type: 'bytes32' },\n { name: 'recvTime', type: 'uint64' },\n ],\n };\n case 'cancel_orders':\n return {\n Cancellation: [\n { name: 'sender', type: 'bytes32' },\n { name: 'productIds', type: 'uint32[]' },\n { name: 'digests', type: 'bytes32[]' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'cancel_product_orders':\n return {\n CancellationProducts: [\n { name: 'sender', type: 'bytes32' },\n { name: 'productIds', type: 'uint32[]' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'liquidate_subaccount':\n return {\n LiquidateSubaccount: [\n { name: 'sender', type: 'bytes32' },\n { name: 'liquidatee', type: 'bytes32' },\n { name: 'mode', type: 'uint8' },\n { name: 'healthGroup', type: 'uint32' },\n { name: 'amount', type: 'int128' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'link_signer':\n return {\n LinkSigner: [\n { name: 'sender', type: 'bytes32' },\n { name: 'signer', type: 'bytes32' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'transfer_quote':\n return {\n TransferQuote: [\n { name: 'sender', type: 'bytes32' },\n { name: 'recipient', type: 'bytes32' },\n { name: 'amount', type: 'uint128' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'leaderboard_authentication':\n return {\n LeaderboardAuthentication: [\n { name: 'sender', type: 'bytes32' },\n { name: 'expiration', type: 'uint64' },\n { name: 'contestIds', type: 'uint32[]' },\n ],\n };\n case 'social_authentication':\n return {\n SocialAuthentication: [\n { name: 'sender', type: 'bytes32' },\n { name: 'expiration', type: 'uint64' },\n { name: 'provider', type: 'string' },\n ],\n };\n case 'mint_nlp':\n return {\n MintNlp: [\n { name: 'sender', type: 'bytes32' },\n { name: 'quoteAmount', type: 'uint128' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'burn_nlp':\n return {\n BurnNlp: [\n { name: 'sender', type: 'bytes32' },\n { name: 'nlpAmount', type: 'uint128' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n }\n}\n"],"mappings":";;;;;;AAYA,SAAgB,mBACd,aACuC;CACvC,QAAQ,aAAR;EACE,KAAK,uBACH,OAAO,EACL,oBAAoB;GAClB;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAa,MAAM;GAAS;GACpC;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAS,MAAM;GAAS;EAClC,EACF;EACF,KAAK,0BACH,OAAO,EACL,sBAAsB;GACpB;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAa,MAAM;GAAS;GACpC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AAM;GAAU;GAClC;IAAE,MAAM;IAAS,MAAM;GAAS;EAClC,EACF;EACF,KAAK,kBACH,OAAO,EACL,eAAe;GACb;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAa,MAAM;GAAU;GACrC;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAS,MAAM;GAAS;EAClC,EACF;EACF,KAAK,8BACH,OAAO,EACL,2BAA2B;GACzB;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAc,MAAM;GAAS;GACrC;IAAE,MAAM;IAAc,MAAM;GAAW;EACzC,EACF;EACF,KAAK,yBACH,OAAO,EACL,sBAAsB;GACpB;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAc,MAAM;GAAS;GACrC;IAAE,MAAM;IAAY,MAAM;GAAS;EACrC,EACF;EACF,KAAK,YACH,OAAO,EACL,SAAS;GACP;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAe,MAAM;GAAU;GACvC;IAAE,MAAM;IAAS,MAAM;GAAS;EAClC,EACF;EACF,KAAK,YACH,OAAO,EACL,SAAS;GACP;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAa,MAAM;GAAU;GACrC;IAAE,MAAM;IAAS,MAAM;GAAS;EAClC,EACF;CACJ;AACF"}
|
|
1
|
+
{"version":3,"file":"getNadoEIP712Types.js","names":[],"sources":["../../src/eip712/getNadoEIP712Types.ts"],"sourcesContent":["import { SignableRequestType } from './signableRequestType';\n\ninterface TypedDataField {\n name: string;\n type: string;\n}\n\n/**\n * Return the EIP712 types for a given request\n *\n * @param requestType\n */\nexport function getNadoEIP712Types(\n requestType: SignableRequestType,\n): Record<string, Array<TypedDataField>> {\n switch (requestType) {\n case 'withdraw_collateral':\n return {\n WithdrawCollateral: [\n { name: 'sender', type: 'bytes32' },\n { name: 'productId', type: 'uint32' },\n { name: 'amount', type: 'uint128' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'withdraw_collateral_v2':\n return {\n WithdrawCollateralV2: [\n { name: 'sender', type: 'bytes32' },\n { name: 'productId', type: 'uint32' },\n { name: 'amount', type: 'uint128' },\n { name: 'nonce', type: 'uint64' },\n { name: 'sendTo', type: 'address' },\n { name: 'appendix', type: 'uint128' },\n ],\n };\n case 'place_order':\n return {\n Order: [\n { name: 'sender', type: 'bytes32' },\n { name: 'priceX18', type: 'int128' },\n { name: 'amount', type: 'int128' },\n { name: 'expiration', type: 'uint64' },\n { name: 'nonce', type: 'uint64' },\n { name: 'appendix', type: 'uint128' },\n ],\n };\n case 'list_trigger_orders':\n return {\n ListTriggerOrders: [\n { name: 'sender', type: 'bytes32' },\n { name: 'recvTime', type: 'uint64' },\n ],\n };\n case 'update_dependency':\n return {\n DependencyUpdate: [\n { name: 'sender', type: 'bytes32' },\n { name: 'oldDigest', type: 'bytes32' },\n { name: 'newDigest', type: 'bytes32' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'cancel_orders':\n return {\n Cancellation: [\n { name: 'sender', type: 'bytes32' },\n { name: 'productIds', type: 'uint32[]' },\n { name: 'digests', type: 'bytes32[]' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'cancel_product_orders':\n return {\n CancellationProducts: [\n { name: 'sender', type: 'bytes32' },\n { name: 'productIds', type: 'uint32[]' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'liquidate_subaccount':\n return {\n LiquidateSubaccount: [\n { name: 'sender', type: 'bytes32' },\n { name: 'liquidatee', type: 'bytes32' },\n { name: 'mode', type: 'uint8' },\n { name: 'healthGroup', type: 'uint32' },\n { name: 'amount', type: 'int128' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'link_signer':\n return {\n LinkSigner: [\n { name: 'sender', type: 'bytes32' },\n { name: 'signer', type: 'bytes32' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'transfer_quote':\n return {\n TransferQuote: [\n { name: 'sender', type: 'bytes32' },\n { name: 'recipient', type: 'bytes32' },\n { name: 'amount', type: 'uint128' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'leaderboard_authentication':\n return {\n LeaderboardAuthentication: [\n { name: 'sender', type: 'bytes32' },\n { name: 'expiration', type: 'uint64' },\n { name: 'contestIds', type: 'uint32[]' },\n ],\n };\n case 'social_authentication':\n return {\n SocialAuthentication: [\n { name: 'sender', type: 'bytes32' },\n { name: 'expiration', type: 'uint64' },\n { name: 'provider', type: 'string' },\n ],\n };\n case 'mint_nlp':\n return {\n MintNlp: [\n { name: 'sender', type: 'bytes32' },\n { name: 'quoteAmount', type: 'uint128' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n case 'burn_nlp':\n return {\n BurnNlp: [\n { name: 'sender', type: 'bytes32' },\n { name: 'nlpAmount', type: 'uint128' },\n { name: 'nonce', type: 'uint64' },\n ],\n };\n }\n}\n"],"mappings":";;;;;;AAYA,SAAgB,mBACd,aACuC;CACvC,QAAQ,aAAR;EACE,KAAK,uBACH,OAAO,EACL,oBAAoB;GAClB;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAa,MAAM;GAAS;GACpC;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAS,MAAM;GAAS;EAClC,EACF;EACF,KAAK,0BACH,OAAO,EACL,sBAAsB;GACpB;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAa,MAAM;GAAS;GACpC;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAS,MAAM;GAAS;GAChC;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAY,MAAM;GAAU;EACtC,EACF;EACF,KAAK,eACH,OAAO,EACL,OAAO;GACL;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAY,MAAM;GAAS;GACnC;IAAE,MAAM;IAAU,MAAM;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ACb;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAa,MAAM;GAAU;GACrC;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAS,MAAM;GAAS;EAClC,EACF;EACF,KAAK,8BACH,OAAO,EACL,2BAA2B;GACzB;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAc,MAAM;GAAS;GACrC;IAAE,MAAM;IAAc,MAAM;GAAW;EACzC,EACF;EACF,KAAK,yBACH,OAAO,EACL,sBAAsB;GACpB;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAc,MAAM;GAAS;GACrC;IAAE,MAAM;IAAY,MAAM;GAAS;EACrC,EACF;EACF,KAAK,YACH,OAAO,EACL,SAAS;GACP;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAe,MAAM;GAAU;GACvC;IAAE,MAAM;IAAS,MAAM;GAAS;EAClC,EACF;EACF,KAAK,YACH,OAAO,EACL,SAAS;GACP;IAAE,MAAM;IAAU,MAAM;GAAU;GAClC;IAAE,MAAM;IAAa,MAAM;GAAU;GACrC;IAAE,MAAM;IAAS,MAAM;GAAS;EAClC,EACF;CACJ;AACF"}
|
|
@@ -26,6 +26,9 @@ function getNadoEIP712Values(requestType, params) {
|
|
|
26
26
|
case "list_trigger_orders":
|
|
27
27
|
values = getListTriggerOrdersValues(params);
|
|
28
28
|
break;
|
|
29
|
+
case "update_dependency":
|
|
30
|
+
values = getUpdateDependencyValues(params);
|
|
31
|
+
break;
|
|
29
32
|
case "cancel_orders":
|
|
30
33
|
values = getOrderCancellationValues(params);
|
|
31
34
|
break;
|
|
@@ -103,6 +106,17 @@ function getListTriggerOrdersValues(params) {
|
|
|
103
106
|
})
|
|
104
107
|
};
|
|
105
108
|
}
|
|
109
|
+
function getUpdateDependencyValues(params) {
|
|
110
|
+
return {
|
|
111
|
+
sender: require_utils_bytes32.subaccountToHex({
|
|
112
|
+
subaccountOwner: params.subaccountOwner,
|
|
113
|
+
subaccountName: params.subaccountName
|
|
114
|
+
}),
|
|
115
|
+
oldDigest: params.oldDigest,
|
|
116
|
+
newDigest: params.newDigest,
|
|
117
|
+
nonce: params.nonce
|
|
118
|
+
};
|
|
119
|
+
}
|
|
106
120
|
function getOrderCancellationValues(params) {
|
|
107
121
|
return {
|
|
108
122
|
sender: require_utils_bytes32.subaccountToHex({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNadoEIP712Values.cjs","names":["subaccountToHex","toIntegerString","addDecimals"],"sources":["../../src/eip712/getNadoEIP712Values.ts"],"sourcesContent":["import { subaccountToHex } from '../utils/bytes32';\nimport { addDecimals, toIntegerString } from '../utils/math';\nimport {\n EIP712BurnNlpValues,\n EIP712LeaderboardAuthenticationValues,\n EIP712LinkSignerValues,\n EIP712LiquidateSubaccountValues,\n EIP712ListTriggerOrdersValues,\n EIP712MintNlpValues,\n EIP712OrderCancellationValues,\n EIP712OrderValues,\n EIP712ProductOrdersCancellationValues,\n EIP712SocialAuthenticationValues,\n EIP712TransferQuoteValues,\n EIP712WithdrawCollateralV2Values,\n EIP712WithdrawCollateralValues,\n SignableRequestTypeToEIP712Values,\n} from './eip712ValueTypes';\nimport {\n SignableRequestType,\n SignableRequestTypeToParams,\n} from './signableRequestType';\nimport {\n EIP712BurnNlpParams,\n EIP712CancelOrdersParams,\n EIP712CancelProductOrdersParams,\n EIP712LeaderboardAuthenticationParams,\n EIP712LinkSignerParams,\n EIP712LiquidateSubaccountParams,\n EIP712ListTriggerOrdersParams,\n EIP712MintNlpParams,\n EIP712OrderParams,\n EIP712SocialAuthenticationParams,\n EIP712TransferQuoteParams,\n EIP712WithdrawCollateralParams,\n EIP712WithdrawCollateralV2Params,\n} from './signatureParamTypes';\n\n/**\n * Returns the EIP712 compatible values for signing.\n *\n * Note: We use the string representation of bigint to be compatible with JSON.stringify\n *\n * @param requestType\n * @param params\n */\nexport function getNadoEIP712Values<TReqType extends SignableRequestType>(\n requestType: TReqType,\n params: SignableRequestTypeToParams[TReqType],\n): SignableRequestTypeToEIP712Values[TReqType] {\n // Typescript does not yet support type narrowing + generic lookup types, hence the hacks here\n let values: SignableRequestTypeToEIP712Values[keyof SignableRequestTypeToEIP712Values];\n switch (requestType) {\n case 'withdraw_collateral':\n values = getWithdrawCollateralValues(\n params as EIP712WithdrawCollateralParams,\n );\n break;\n case 'withdraw_collateral_v2':\n values = getWithdrawCollateralV2Values(\n params as EIP712WithdrawCollateralV2Params,\n );\n break;\n case 'place_order':\n values = getOrderValues(params as EIP712OrderParams);\n break;\n case 'list_trigger_orders':\n values = getListTriggerOrdersValues(\n params as EIP712ListTriggerOrdersParams,\n );\n break;\n case 'cancel_orders':\n values = getOrderCancellationValues(params as EIP712CancelOrdersParams);\n break;\n case 'cancel_product_orders':\n values = getProductOrdersCancellationValues(\n params as EIP712CancelProductOrdersParams,\n );\n break;\n case 'liquidate_subaccount':\n values = getLiquidateSubaccountValues(\n params as EIP712LiquidateSubaccountParams,\n );\n break;\n case 'link_signer':\n values = getLinkSignerValues(params as EIP712LinkSignerParams);\n break;\n case 'transfer_quote':\n values = getTransferQuoteValues(params as EIP712TransferQuoteParams);\n break;\n case 'leaderboard_authentication':\n values = getLeaderboardAuthenticationValues(\n params as EIP712LeaderboardAuthenticationParams,\n );\n break;\n case 'social_authentication':\n values = getSocialAuthenticationValues(\n params as EIP712SocialAuthenticationParams,\n );\n break;\n case 'mint_nlp':\n values = getMintNlpValues(params as EIP712MintNlpParams);\n break;\n case 'burn_nlp':\n values = getBurnNlpValues(params as EIP712BurnNlpParams);\n break;\n default:\n throw new Error(`Unsupported request type: ${requestType}`);\n }\n\n return values as SignableRequestTypeToEIP712Values[TReqType];\n}\n\nfunction getWithdrawCollateralValues(\n params: EIP712WithdrawCollateralParams,\n): EIP712WithdrawCollateralValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n productId: params.productId,\n amount: toIntegerString(params.amount),\n nonce: params.nonce,\n };\n}\n\nfunction getWithdrawCollateralV2Values(\n params: EIP712WithdrawCollateralV2Params,\n): EIP712WithdrawCollateralV2Values {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n productId: params.productId,\n amount: toIntegerString(params.amount),\n nonce: params.nonce,\n sendTo: params.sendTo,\n appendix: toIntegerString(params.appendix),\n };\n}\n\nfunction getOrderValues(params: EIP712OrderParams): EIP712OrderValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n priceX18: toIntegerString(addDecimals(params.price)),\n amount: toIntegerString(params.amount),\n expiration: toIntegerString(params.expiration),\n nonce: params.nonce,\n appendix: toIntegerString(params.appendix),\n };\n}\n\nfunction getListTriggerOrdersValues(\n params: EIP712ListTriggerOrdersParams,\n): EIP712ListTriggerOrdersValues {\n return {\n recvTime: toIntegerString(params.recvTime),\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n };\n}\n\nfunction getOrderCancellationValues(\n params: EIP712CancelOrdersParams,\n): EIP712OrderCancellationValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n productIds: params.productIds,\n digests: params.digests,\n nonce: params.nonce,\n };\n}\n\nfunction getProductOrdersCancellationValues(\n params: EIP712CancelProductOrdersParams,\n): EIP712ProductOrdersCancellationValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n productIds: params.productIds,\n nonce: params.nonce,\n };\n}\n\nfunction getLiquidateSubaccountValues(\n params: EIP712LiquidateSubaccountParams,\n): EIP712LiquidateSubaccountValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n liquidatee: subaccountToHex({\n subaccountOwner: params.liquidateeOwner,\n subaccountName: params.liquidateeName,\n }),\n mode: params.mode,\n healthGroup: toIntegerString(params.healthGroup),\n amount: toIntegerString(params.amount),\n nonce: params.nonce,\n };\n}\n\nfunction getLinkSignerValues(\n params: EIP712LinkSignerParams,\n): EIP712LinkSignerValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n signer: params.signer,\n nonce: params.nonce,\n };\n}\n\nfunction getTransferQuoteValues(\n params: EIP712TransferQuoteParams,\n): EIP712TransferQuoteValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n recipient: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.recipientSubaccountName,\n }),\n amount: toIntegerString(params.amount),\n nonce: params.nonce,\n };\n}\n\nfunction getLeaderboardAuthenticationValues(\n params: EIP712LeaderboardAuthenticationParams,\n): EIP712LeaderboardAuthenticationValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n expiration: toIntegerString(params.expiration),\n contestIds: params.contestIds,\n };\n}\n\nfunction getSocialAuthenticationValues(\n params: EIP712SocialAuthenticationParams,\n): EIP712SocialAuthenticationValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n expiration: toIntegerString(params.expiration),\n provider: params.provider,\n };\n}\n\nfunction getMintNlpValues(params: EIP712MintNlpParams): EIP712MintNlpValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n quoteAmount: toIntegerString(params.quoteAmount),\n nonce: params.nonce,\n };\n}\n\nfunction getBurnNlpValues(params: EIP712BurnNlpParams): EIP712BurnNlpValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n nlpAmount: toIntegerString(params.nlpAmount),\n nonce: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zB,CAAC;EACD,QAAQ,OAAO;EACf,OAAO,OAAO;CAChB;AACF;AAEA,SAAS,uBACP,QAC2B;CAC3B,OAAO;EACL,QAAQA,sBAAAA,gBAAgB;GACtB,iBAAiB,OAAO;GACxB,gBAAgB,OAAO;EACzB,CAAC;EACD,WAAWA,sBAAAA,gBAAgB;GACzB,iBAAiB,OAAO;GACxB,gBAAgB,OAAO;EACzB,CAAC;EACD,QAAQC,mCAAAA,gBAAgB,OAAO,MAAM;EACrC,OAAO,OAAO;CAChB;AACF;AAEA,SAAS,mCACP,QACuC;CACvC,OAAO;EACL,QAAQD,sBAAAA,gBAAgB;GACtB,iBAAiB,OAAO;GACxB,gBAAgB,OAAO;EACzB,CAAC;EACD,YAAYC,mCAAAA,gBAAgB,OAAO,UAAU;EAC7C,YAAY,OAAO;CACrB;AACF;AAEA,SAAS,8BACP,QACkC;CAClC,OAAO;EACL,QAAQD,sBAAAA,gBAAgB;GACtB,iBAAiB,OAAO;GACxB,gBAAgB,OAAO;EACzB,CAAC;EACD,YAAYC,mCAAAA,gBAAgB,OAAO,UAAU;EAC7C,UAAU,OAAO;CACnB;AACF;AAEA,SAAS,iBAAiB,QAAkD;CAC1E,OAAO;EACL,QAAQD,sBAAAA,gBAAgB;GACtB,iBAAiB,OAAO;GACxB,gBAAgB,OAAO;EACzB,CAAC;EACD,aAAaC,mCAAAA,gBAAgB,OAAO,WAAW;EAC/C,OAAO,OAAO;CAChB;AACF;AAEA,SAAS,iBAAiB,QAAkD;CAC1E,OAAO;EACL,QAAQD,sBAAAA,gBAAgB;GACtB,iBAAiB,OAAO;GACxB,gBAAgB,OAAO;EACzB,CAAC;EACD,WAAWC,mCAAAA,gBAAgB,OAAO,SAAS;EAC3C,OAAO,OAAO;CAChB;AACF"}
|
|
1
|
+
{"version":3,"file":"getNadoEIP712Values.cjs","names":["subaccountToHex","toIntegerString","addDecimals"],"sources":["../../src/eip712/getNadoEIP712Values.ts"],"sourcesContent":["import { subaccountToHex } from '../utils/bytes32';\nimport { addDecimals, toIntegerString } from '../utils/math';\nimport {\n EIP712BurnNlpValues,\n EIP712LeaderboardAuthenticationValues,\n EIP712LinkSignerValues,\n EIP712LiquidateSubaccountValues,\n EIP712ListTriggerOrdersValues,\n EIP712MintNlpValues,\n EIP712OrderCancellationValues,\n EIP712OrderValues,\n EIP712ProductOrdersCancellationValues,\n EIP712SocialAuthenticationValues,\n EIP712TransferQuoteValues,\n EIP712UpdateDependencyValues,\n EIP712WithdrawCollateralV2Values,\n EIP712WithdrawCollateralValues,\n SignableRequestTypeToEIP712Values,\n} from './eip712ValueTypes';\nimport {\n SignableRequestType,\n SignableRequestTypeToParams,\n} from './signableRequestType';\nimport {\n EIP712BurnNlpParams,\n EIP712CancelOrdersParams,\n EIP712CancelProductOrdersParams,\n EIP712LeaderboardAuthenticationParams,\n EIP712LinkSignerParams,\n EIP712LiquidateSubaccountParams,\n EIP712ListTriggerOrdersParams,\n EIP712MintNlpParams,\n EIP712OrderParams,\n EIP712SocialAuthenticationParams,\n EIP712TransferQuoteParams,\n EIP712UpdateDependencyParams,\n EIP712WithdrawCollateralParams,\n EIP712WithdrawCollateralV2Params,\n} from './signatureParamTypes';\n\n/**\n * Returns the EIP712 compatible values for signing.\n *\n * Note: We use the string representation of bigint to be compatible with JSON.stringify\n *\n * @param requestType\n * @param params\n */\nexport function getNadoEIP712Values<TReqType extends SignableRequestType>(\n requestType: TReqType,\n params: SignableRequestTypeToParams[TReqType],\n): SignableRequestTypeToEIP712Values[TReqType] {\n // Typescript does not yet support type narrowing + generic lookup types, hence the hacks here\n let values: SignableRequestTypeToEIP712Values[keyof SignableRequestTypeToEIP712Values];\n switch (requestType) {\n case 'withdraw_collateral':\n values = getWithdrawCollateralValues(\n params as EIP712WithdrawCollateralParams,\n );\n break;\n case 'withdraw_collateral_v2':\n values = getWithdrawCollateralV2Values(\n params as EIP712WithdrawCollateralV2Params,\n );\n break;\n case 'place_order':\n values = getOrderValues(params as EIP712OrderParams);\n break;\n case 'list_trigger_orders':\n values = getListTriggerOrdersValues(\n params as EIP712ListTriggerOrdersParams,\n );\n break;\n case 'update_dependency':\n values = getUpdateDependencyValues(\n params as EIP712UpdateDependencyParams,\n );\n break;\n case 'cancel_orders':\n values = getOrderCancellationValues(params as EIP712CancelOrdersParams);\n break;\n case 'cancel_product_orders':\n values = getProductOrdersCancellationValues(\n params as EIP712CancelProductOrdersParams,\n );\n break;\n case 'liquidate_subaccount':\n values = getLiquidateSubaccountValues(\n params as EIP712LiquidateSubaccountParams,\n );\n break;\n case 'link_signer':\n values = getLinkSignerValues(params as EIP712LinkSignerParams);\n break;\n case 'transfer_quote':\n values = getTransferQuoteValues(params as EIP712TransferQuoteParams);\n break;\n case 'leaderboard_authentication':\n values = getLeaderboardAuthenticationValues(\n params as EIP712LeaderboardAuthenticationParams,\n );\n break;\n case 'social_authentication':\n values = getSocialAuthenticationValues(\n params as EIP712SocialAuthenticationParams,\n );\n break;\n case 'mint_nlp':\n values = getMintNlpValues(params as EIP712MintNlpParams);\n break;\n case 'burn_nlp':\n values = getBurnNlpValues(params as EIP712BurnNlpParams);\n break;\n default:\n throw new Error(`Unsupported request type: ${requestType}`);\n }\n\n return values as SignableRequestTypeToEIP712Values[TReqType];\n}\n\nfunction getWithdrawCollateralValues(\n params: EIP712WithdrawCollateralParams,\n): EIP712WithdrawCollateralValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n productId: params.productId,\n amount: toIntegerString(params.amount),\n nonce: params.nonce,\n };\n}\n\nfunction getWithdrawCollateralV2Values(\n params: EIP712WithdrawCollateralV2Params,\n): EIP712WithdrawCollateralV2Values {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n productId: params.productId,\n amount: toIntegerString(params.amount),\n nonce: params.nonce,\n sendTo: params.sendTo,\n appendix: toIntegerString(params.appendix),\n };\n}\n\nfunction getOrderValues(params: EIP712OrderParams): EIP712OrderValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n priceX18: toIntegerString(addDecimals(params.price)),\n amount: toIntegerString(params.amount),\n expiration: toIntegerString(params.expiration),\n nonce: params.nonce,\n appendix: toIntegerString(params.appendix),\n };\n}\n\nfunction getListTriggerOrdersValues(\n params: EIP712ListTriggerOrdersParams,\n): EIP712ListTriggerOrdersValues {\n return {\n recvTime: toIntegerString(params.recvTime),\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n };\n}\n\nfunction getUpdateDependencyValues(\n params: EIP712UpdateDependencyParams,\n): EIP712UpdateDependencyValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n oldDigest: params.oldDigest,\n newDigest: params.newDigest,\n nonce: params.nonce,\n };\n}\n\nfunction getOrderCancellationValues(\n params: EIP712CancelOrdersParams,\n): EIP712OrderCancellationValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n productIds: params.productIds,\n digests: params.digests,\n nonce: params.nonce,\n };\n}\n\nfunction getProductOrdersCancellationValues(\n params: EIP712CancelProductOrdersParams,\n): EIP712ProductOrdersCancellationValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n productIds: params.productIds,\n nonce: params.nonce,\n };\n}\n\nfunction getLiquidateSubaccountValues(\n params: EIP712LiquidateSubaccountParams,\n): EIP712LiquidateSubaccountValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n liquidatee: subaccountToHex({\n subaccountOwner: params.liquidateeOwner,\n subaccountName: params.liquidateeName,\n }),\n mode: params.mode,\n healthGroup: toIntegerString(params.healthGroup),\n amount: toIntegerString(params.amount),\n nonce: params.nonce,\n };\n}\n\nfunction getLinkSignerValues(\n params: EIP712LinkSignerParams,\n): EIP712LinkSignerValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n signer: params.signer,\n nonce: params.nonce,\n };\n}\n\nfunction getTransferQuoteValues(\n params: EIP712TransferQuoteParams,\n): EIP712TransferQuoteValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n recipient: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.recipientSubaccountName,\n }),\n amount: toIntegerString(params.amount),\n nonce: params.nonce,\n };\n}\n\nfunction getLeaderboardAuthenticationValues(\n params: EIP712LeaderboardAuthenticationParams,\n): EIP712LeaderboardAuthenticationValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n expiration: toIntegerString(params.expiration),\n contestIds: params.contestIds,\n };\n}\n\nfunction getSocialAuthenticationValues(\n params: EIP712SocialAuthenticationParams,\n): EIP712SocialAuthenticationValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n expiration: toIntegerString(params.expiration),\n provider: params.provider,\n };\n}\n\nfunction getMintNlpValues(params: EIP712MintNlpParams): EIP712MintNlpValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n quoteAmount: toIntegerString(params.quoteAmount),\n nonce: params.nonce,\n };\n}\n\nfunction getBurnNlpValues(params: EIP712BurnNlpParams): EIP712BurnNlpValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n nlpAmount: toIntegerString(params.nlpAmount),\n nonce: params.nonce,\n };\n}\n"],"mappings":";;;;;;;;;;;;;AAgDA,SAAgB,oBACd,aACA,QAC6C;CAE7C,IAAI;CACJ,QAAQ,aAAR;EACE,KAAK;GACH,SAAS,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getNadoEIP712Values } from "../getNadoEIP712Values-
|
|
1
|
+
import { t as getNadoEIP712Values } from "../getNadoEIP712Values-DEBZh7-M.cjs";
|
|
2
2
|
export { getNadoEIP712Values };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as getNadoEIP712Values } from "../getNadoEIP712Values-
|
|
1
|
+
import { t as getNadoEIP712Values } from "../getNadoEIP712Values-0EOMObhX.js";
|
|
2
2
|
export { getNadoEIP712Values };
|
|
@@ -25,6 +25,9 @@ function getNadoEIP712Values(requestType, params) {
|
|
|
25
25
|
case "list_trigger_orders":
|
|
26
26
|
values = getListTriggerOrdersValues(params);
|
|
27
27
|
break;
|
|
28
|
+
case "update_dependency":
|
|
29
|
+
values = getUpdateDependencyValues(params);
|
|
30
|
+
break;
|
|
28
31
|
case "cancel_orders":
|
|
29
32
|
values = getOrderCancellationValues(params);
|
|
30
33
|
break;
|
|
@@ -102,6 +105,17 @@ function getListTriggerOrdersValues(params) {
|
|
|
102
105
|
})
|
|
103
106
|
};
|
|
104
107
|
}
|
|
108
|
+
function getUpdateDependencyValues(params) {
|
|
109
|
+
return {
|
|
110
|
+
sender: subaccountToHex({
|
|
111
|
+
subaccountOwner: params.subaccountOwner,
|
|
112
|
+
subaccountName: params.subaccountName
|
|
113
|
+
}),
|
|
114
|
+
oldDigest: params.oldDigest,
|
|
115
|
+
newDigest: params.newDigest,
|
|
116
|
+
nonce: params.nonce
|
|
117
|
+
};
|
|
118
|
+
}
|
|
105
119
|
function getOrderCancellationValues(params) {
|
|
106
120
|
return {
|
|
107
121
|
sender: subaccountToHex({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNadoEIP712Values.js","names":[],"sources":["../../src/eip712/getNadoEIP712Values.ts"],"sourcesContent":["import { subaccountToHex } from '../utils/bytes32';\nimport { addDecimals, toIntegerString } from '../utils/math';\nimport {\n EIP712BurnNlpValues,\n EIP712LeaderboardAuthenticationValues,\n EIP712LinkSignerValues,\n EIP712LiquidateSubaccountValues,\n EIP712ListTriggerOrdersValues,\n EIP712MintNlpValues,\n EIP712OrderCancellationValues,\n EIP712OrderValues,\n EIP712ProductOrdersCancellationValues,\n EIP712SocialAuthenticationValues,\n EIP712TransferQuoteValues,\n EIP712WithdrawCollateralV2Values,\n EIP712WithdrawCollateralValues,\n SignableRequestTypeToEIP712Values,\n} from './eip712ValueTypes';\nimport {\n SignableRequestType,\n SignableRequestTypeToParams,\n} from './signableRequestType';\nimport {\n EIP712BurnNlpParams,\n EIP712CancelOrdersParams,\n EIP712CancelProductOrdersParams,\n EIP712LeaderboardAuthenticationParams,\n EIP712LinkSignerParams,\n EIP712LiquidateSubaccountParams,\n EIP712ListTriggerOrdersParams,\n EIP712MintNlpParams,\n EIP712OrderParams,\n EIP712SocialAuthenticationParams,\n EIP712TransferQuoteParams,\n EIP712WithdrawCollateralParams,\n EIP712WithdrawCollateralV2Params,\n} from './signatureParamTypes';\n\n/**\n * Returns the EIP712 compatible values for signing.\n *\n * Note: We use the string representation of bigint to be compatible with JSON.stringify\n *\n * @param requestType\n * @param params\n */\nexport function getNadoEIP712Values<TReqType extends SignableRequestType>(\n requestType: TReqType,\n params: SignableRequestTypeToParams[TReqType],\n): SignableRequestTypeToEIP712Values[TReqType] {\n // Typescript does not yet support type narrowing + generic lookup types, hence the hacks here\n let values: SignableRequestTypeToEIP712Values[keyof SignableRequestTypeToEIP712Values];\n switch (requestType) {\n case 'withdraw_collateral':\n values = getWithdrawCollateralValues(\n params as EIP712WithdrawCollateralParams,\n );\n break;\n case 'withdraw_collateral_v2':\n values = getWithdrawCollateralV2Values(\n params as EIP712WithdrawCollateralV2Params,\n );\n break;\n case 'place_order':\n values = getOrderValues(params as EIP712OrderParams);\n break;\n case 'list_trigger_orders':\n values = getListTriggerOrdersValues(\n params as EIP712ListTriggerOrdersParams,\n );\n break;\n case 'cancel_orders':\n values = getOrderCancellationValues(params as EIP712CancelOrdersParams);\n break;\n case 'cancel_product_orders':\n values = getProductOrdersCancellationValues(\n params as EIP712CancelProductOrdersParams,\n );\n break;\n case 'liquidate_subaccount':\n values = getLiquidateSubaccountValues(\n params as EIP712LiquidateSubaccountParams,\n );\n break;\n case 'link_signer':\n values = getLinkSignerValues(params as EIP712LinkSignerParams);\n break;\n case 'transfer_quote':\n values = getTransferQuoteValues(params as EIP712TransferQuoteParams);\n break;\n case 'leaderboard_authentication':\n values = getLeaderboardAuthenticationValues(\n params as EIP712LeaderboardAuthenticationParams,\n );\n break;\n case 'social_authentication':\n values = getSocialAuthenticationValues(\n params as EIP712SocialAuthenticationParams,\n );\n break;\n case 'mint_nlp':\n values = getMintNlpValues(params as EIP712MintNlpParams);\n break;\n case 'burn_nlp':\n values = getBurnNlpValues(params as EIP712BurnNlpParams);\n break;\n default:\n throw new Error(`Unsupported request type: ${requestType}`);\n }\n\n return values as SignableRequestTypeToEIP712Values[TReqType];\n}\n\nfunction getWithdrawCollateralValues(\n params: EIP712WithdrawCollateralParams,\n): EIP712WithdrawCollateralValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n productId: params.productId,\n amount: toIntegerString(params.amount),\n nonce: params.nonce,\n };\n}\n\nfunction getWithdrawCollateralV2Values(\n params: EIP712WithdrawCollateralV2Params,\n): EIP712WithdrawCollateralV2Values {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n productId: params.productId,\n amount: toIntegerString(params.amount),\n nonce: params.nonce,\n sendTo: params.sendTo,\n appendix: toIntegerString(params.appendix),\n };\n}\n\nfunction getOrderValues(params: EIP712OrderParams): EIP712OrderValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n priceX18: toIntegerString(addDecimals(params.price)),\n amount: toIntegerString(params.amount),\n expiration: toIntegerString(params.expiration),\n nonce: params.nonce,\n appendix: toIntegerString(params.appendix),\n };\n}\n\nfunction getListTriggerOrdersValues(\n params: EIP712ListTriggerOrdersParams,\n): EIP712ListTriggerOrdersValues {\n return {\n recvTime: toIntegerString(params.recvTime),\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n };\n}\n\nfunction getOrderCancellationValues(\n params: EIP712CancelOrdersParams,\n): EIP712OrderCancellationValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n productIds: params.productIds,\n digests: params.digests,\n nonce: params.nonce,\n };\n}\n\nfunction getProductOrdersCancellationValues(\n params: EIP712CancelProductOrdersParams,\n): EIP712ProductOrdersCancellationValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n productIds: params.productIds,\n nonce: params.nonce,\n };\n}\n\nfunction getLiquidateSubaccountValues(\n params: EIP712LiquidateSubaccountParams,\n): EIP712LiquidateSubaccountValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n liquidatee: subaccountToHex({\n subaccountOwner: params.liquidateeOwner,\n subaccountName: params.liquidateeName,\n }),\n mode: params.mode,\n healthGroup: toIntegerString(params.healthGroup),\n amount: toIntegerString(params.amount),\n nonce: params.nonce,\n };\n}\n\nfunction getLinkSignerValues(\n params: EIP712LinkSignerParams,\n): EIP712LinkSignerValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n signer: params.signer,\n nonce: params.nonce,\n };\n}\n\nfunction getTransferQuoteValues(\n params: EIP712TransferQuoteParams,\n): EIP712TransferQuoteValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n recipient: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.recipientSubaccountName,\n }),\n amount: toIntegerString(params.amount),\n nonce: params.nonce,\n };\n}\n\nfunction getLeaderboardAuthenticationValues(\n params: EIP712LeaderboardAuthenticationParams,\n): EIP712LeaderboardAuthenticationValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n expiration: toIntegerString(params.expiration),\n contestIds: params.contestIds,\n };\n}\n\nfunction getSocialAuthenticationValues(\n params: EIP712SocialAuthenticationParams,\n): EIP712SocialAuthenticationValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n expiration: toIntegerString(params.expiration),\n provider: params.provider,\n };\n}\n\nfunction getMintNlpValues(params: EIP712MintNlpParams): EIP712MintNlpValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n quoteAmount: toIntegerString(params.quoteAmount),\n nonce: params.nonce,\n };\n}\n\nfunction getBurnNlpValues(params: EIP712BurnNlpParams): EIP712BurnNlpValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n nlpAmount: toIntegerString(params.nlpAmount),\n nonce: params.nonce,\n };\n}\n"],"mappings":";;;;;;;;;;;;AA8CA,SAAgB,oBACd,aACA,QAC6C;CAE7C,IAAI;CACJ,QAAQ,aAAR;EACE,KAAK;GACH,SAAS,4BACP,MACF;GACA;EACF,KAAK;GACH,SAAS,8BACP,MACF;GACA;EACF,KAAK;GACH,SAAS,eAAe,MAA2B;GACnD;EACF,KAAK;GACH,SAAS,2BACP,MACF;GACA;EACF,KAAK;GACH,SAAS,2BAA2B,MAAkC;GACtE;EACF,KAAK;GACH,SAAS,mCACP,MACF;GACA;EACF,KAAK;GACH,SAAS,6BACP,MACF;GACA;EACF,KAAK;GACH,SAAS,oBAAoB,MAAgC;GAC7D;EACF,KAAK;GACH,SAAS,uBAAuB,MAAmC;GACnE;EACF,KAAK;GACH,SAAS,mCACP,MACF;GACA;EACF,KAAK;GACH,SAAS,8BACP,MACF;GACA;EACF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AO;GACxB,gBAAgB,OAAO;EACzB,CAAC;EACD,aAAa,gBAAgB,OAAO,WAAW;EAC/C,OAAO,OAAO;CAChB;AACF;AAEA,SAAS,iBAAiB,QAAkD;CAC1E,OAAO;EACL,QAAQ,gBAAgB;GACtB,iBAAiB,OAAO;GACxB,gBAAgB,OAAO;EACzB,CAAC;EACD,WAAW,gBAAgB,OAAO,SAAS;EAC3C,OAAO,OAAO;CAChB;AACF"}
|
|
1
|
+
{"version":3,"file":"getNadoEIP712Values.js","names":[],"sources":["../../src/eip712/getNadoEIP712Values.ts"],"sourcesContent":["import { subaccountToHex } from '../utils/bytes32';\nimport { addDecimals, toIntegerString } from '../utils/math';\nimport {\n EIP712BurnNlpValues,\n EIP712LeaderboardAuthenticationValues,\n EIP712LinkSignerValues,\n EIP712LiquidateSubaccountValues,\n EIP712ListTriggerOrdersValues,\n EIP712MintNlpValues,\n EIP712OrderCancellationValues,\n EIP712OrderValues,\n EIP712ProductOrdersCancellationValues,\n EIP712SocialAuthenticationValues,\n EIP712TransferQuoteValues,\n EIP712UpdateDependencyValues,\n EIP712WithdrawCollateralV2Values,\n EIP712WithdrawCollateralValues,\n SignableRequestTypeToEIP712Values,\n} from './eip712ValueTypes';\nimport {\n SignableRequestType,\n SignableRequestTypeToParams,\n} from './signableRequestType';\nimport {\n EIP712BurnNlpParams,\n EIP712CancelOrdersParams,\n EIP712CancelProductOrdersParams,\n EIP712LeaderboardAuthenticationParams,\n EIP712LinkSignerParams,\n EIP712LiquidateSubaccountParams,\n EIP712ListTriggerOrdersParams,\n EIP712MintNlpParams,\n EIP712OrderParams,\n EIP712SocialAuthenticationParams,\n EIP712TransferQuoteParams,\n EIP712UpdateDependencyParams,\n EIP712WithdrawCollateralParams,\n EIP712WithdrawCollateralV2Params,\n} from './signatureParamTypes';\n\n/**\n * Returns the EIP712 compatible values for signing.\n *\n * Note: We use the string representation of bigint to be compatible with JSON.stringify\n *\n * @param requestType\n * @param params\n */\nexport function getNadoEIP712Values<TReqType extends SignableRequestType>(\n requestType: TReqType,\n params: SignableRequestTypeToParams[TReqType],\n): SignableRequestTypeToEIP712Values[TReqType] {\n // Typescript does not yet support type narrowing + generic lookup types, hence the hacks here\n let values: SignableRequestTypeToEIP712Values[keyof SignableRequestTypeToEIP712Values];\n switch (requestType) {\n case 'withdraw_collateral':\n values = getWithdrawCollateralValues(\n params as EIP712WithdrawCollateralParams,\n );\n break;\n case 'withdraw_collateral_v2':\n values = getWithdrawCollateralV2Values(\n params as EIP712WithdrawCollateralV2Params,\n );\n break;\n case 'place_order':\n values = getOrderValues(params as EIP712OrderParams);\n break;\n case 'list_trigger_orders':\n values = getListTriggerOrdersValues(\n params as EIP712ListTriggerOrdersParams,\n );\n break;\n case 'update_dependency':\n values = getUpdateDependencyValues(\n params as EIP712UpdateDependencyParams,\n );\n break;\n case 'cancel_orders':\n values = getOrderCancellationValues(params as EIP712CancelOrdersParams);\n break;\n case 'cancel_product_orders':\n values = getProductOrdersCancellationValues(\n params as EIP712CancelProductOrdersParams,\n );\n break;\n case 'liquidate_subaccount':\n values = getLiquidateSubaccountValues(\n params as EIP712LiquidateSubaccountParams,\n );\n break;\n case 'link_signer':\n values = getLinkSignerValues(params as EIP712LinkSignerParams);\n break;\n case 'transfer_quote':\n values = getTransferQuoteValues(params as EIP712TransferQuoteParams);\n break;\n case 'leaderboard_authentication':\n values = getLeaderboardAuthenticationValues(\n params as EIP712LeaderboardAuthenticationParams,\n );\n break;\n case 'social_authentication':\n values = getSocialAuthenticationValues(\n params as EIP712SocialAuthenticationParams,\n );\n break;\n case 'mint_nlp':\n values = getMintNlpValues(params as EIP712MintNlpParams);\n break;\n case 'burn_nlp':\n values = getBurnNlpValues(params as EIP712BurnNlpParams);\n break;\n default:\n throw new Error(`Unsupported request type: ${requestType}`);\n }\n\n return values as SignableRequestTypeToEIP712Values[TReqType];\n}\n\nfunction getWithdrawCollateralValues(\n params: EIP712WithdrawCollateralParams,\n): EIP712WithdrawCollateralValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n productId: params.productId,\n amount: toIntegerString(params.amount),\n nonce: params.nonce,\n };\n}\n\nfunction getWithdrawCollateralV2Values(\n params: EIP712WithdrawCollateralV2Params,\n): EIP712WithdrawCollateralV2Values {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n productId: params.productId,\n amount: toIntegerString(params.amount),\n nonce: params.nonce,\n sendTo: params.sendTo,\n appendix: toIntegerString(params.appendix),\n };\n}\n\nfunction getOrderValues(params: EIP712OrderParams): EIP712OrderValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n priceX18: toIntegerString(addDecimals(params.price)),\n amount: toIntegerString(params.amount),\n expiration: toIntegerString(params.expiration),\n nonce: params.nonce,\n appendix: toIntegerString(params.appendix),\n };\n}\n\nfunction getListTriggerOrdersValues(\n params: EIP712ListTriggerOrdersParams,\n): EIP712ListTriggerOrdersValues {\n return {\n recvTime: toIntegerString(params.recvTime),\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n };\n}\n\nfunction getUpdateDependencyValues(\n params: EIP712UpdateDependencyParams,\n): EIP712UpdateDependencyValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n oldDigest: params.oldDigest,\n newDigest: params.newDigest,\n nonce: params.nonce,\n };\n}\n\nfunction getOrderCancellationValues(\n params: EIP712CancelOrdersParams,\n): EIP712OrderCancellationValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n productIds: params.productIds,\n digests: params.digests,\n nonce: params.nonce,\n };\n}\n\nfunction getProductOrdersCancellationValues(\n params: EIP712CancelProductOrdersParams,\n): EIP712ProductOrdersCancellationValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n productIds: params.productIds,\n nonce: params.nonce,\n };\n}\n\nfunction getLiquidateSubaccountValues(\n params: EIP712LiquidateSubaccountParams,\n): EIP712LiquidateSubaccountValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n liquidatee: subaccountToHex({\n subaccountOwner: params.liquidateeOwner,\n subaccountName: params.liquidateeName,\n }),\n mode: params.mode,\n healthGroup: toIntegerString(params.healthGroup),\n amount: toIntegerString(params.amount),\n nonce: params.nonce,\n };\n}\n\nfunction getLinkSignerValues(\n params: EIP712LinkSignerParams,\n): EIP712LinkSignerValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n signer: params.signer,\n nonce: params.nonce,\n };\n}\n\nfunction getTransferQuoteValues(\n params: EIP712TransferQuoteParams,\n): EIP712TransferQuoteValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n recipient: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.recipientSubaccountName,\n }),\n amount: toIntegerString(params.amount),\n nonce: params.nonce,\n };\n}\n\nfunction getLeaderboardAuthenticationValues(\n params: EIP712LeaderboardAuthenticationParams,\n): EIP712LeaderboardAuthenticationValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n expiration: toIntegerString(params.expiration),\n contestIds: params.contestIds,\n };\n}\n\nfunction getSocialAuthenticationValues(\n params: EIP712SocialAuthenticationParams,\n): EIP712SocialAuthenticationValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n expiration: toIntegerString(params.expiration),\n provider: params.provider,\n };\n}\n\nfunction getMintNlpValues(params: EIP712MintNlpParams): EIP712MintNlpValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n quoteAmount: toIntegerString(params.quoteAmount),\n nonce: params.nonce,\n };\n}\n\nfunction getBurnNlpValues(params: EIP712BurnNlpParams): EIP712BurnNlpValues {\n return {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n nlpAmount: toIntegerString(params.nlpAmount),\n nonce: params.nonce,\n };\n}\n"],"mappings":";;;;;;;;;;;;AAgDA,SAAgB,oBACd,aACA,QAC6C;CAE7C,IAAI;CACJ,QAAQ,aAAR;EACE,KAAK;GACH,SAAS,4BACP,MACF;GACA;EACF,KAAK;GACH,SAAS,8BACP,MACF;GACA;EACF,KAAK;GACH,SAAS,eAAe,MAA2B;GACnD;EACF,KAAK;GACH,SAAS,2BACP,MACF;GACA;EACF,KAAK;GACH,SAAS,0BACP,MACF;GACA;EACF,KAAK;GACH,SAAS,2BAA2B,MAAkC;GACtE;EACF,KAAK;GACH,SAAS,mCACP,MACF;GACA;EACF,KAAK;GACH,SAAS,6BACP,MACF;GACA;EACF,KAAK;GACH,SAAS,oBAAoB,MAAgC;GAC7D;EACF,KAAK;GACH,SAAS,uBAAuB,MAAmC;GACnE;EACF,KAAK;GACH,SAAS,mCACP,MACF;GACA;EACF,KAAK;GACH,SAAS,8BACP,MACF;GACA;EACF,KAAK;GACH,SAAS,iBAAiB,MAA6B;GACvD;EACF,KAAK;GACH,SAAS,iBAAiB,MAA6B;GACvD;EACF,SACE,MAAM,IAAI,MAAM,6BAA6B,aAAa;CAC9D;CAEA,OAAO;AACT;AAEA,SAAS,4BACP,QACgC;CAChC,OAAO;EACL,QAAQ,gBAAgB;GACtB,iBAAiB,OAAO;GACxB,gBAAgB,OAAO;EACzB,CAAC;EACD,WAAW,OAAO;EAClB,QAAQ,gBAAgB,OAAO,MAAM;EACrC,OAAO,OAAO;CAChB;AACF;AAEA,SAAS,8BACP,QACkC;CAClC,OAAO;EACL,QAAQ,gBAAgB;G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W,gBAAgB,OAAO,SAAS;EAC3C,OAAO,OAAO;CAChB;AACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as getSignedTransactionRequest } from "../getSignedTransactionRequest-
|
|
1
|
+
import { t as getSignedTransactionRequest } from "../getSignedTransactionRequest-DxUMBHLe.cjs";
|
|
2
2
|
export { getSignedTransactionRequest };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as getSignedTransactionRequest } from "../getSignedTransactionRequest-
|
|
1
|
+
import { t as getSignedTransactionRequest } from "../getSignedTransactionRequest-Et_1Y1wr.js";
|
|
2
2
|
export { getSignedTransactionRequest };
|
package/dist/eip712/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as EIP712LinkSignerParams, c as EIP712MintNlpParams, d as EIP712TransferQuoteParams, f as
|
|
2
|
-
import { a as EIP712ListTriggerOrdersValues, c as EIP712OrderValues, d as EIP712TransferQuoteValues, f as
|
|
1
|
+
import { a as EIP712LinkSignerParams, c as EIP712MintNlpParams, d as EIP712TransferQuoteParams, f as EIP712UpdateDependencyParams, g as SignedTx, h as SignedEIP712OrderParams, i as EIP712LeaderboardAuthenticationParams, l as EIP712OrderParams, m as EIP712WithdrawCollateralV2Params, n as EIP712CancelOrdersParams, o as EIP712LiquidateSubaccountParams, p as EIP712WithdrawCollateralParams, r as EIP712CancelProductOrdersParams, s as EIP712ListTriggerOrdersParams, t as EIP712BurnNlpParams, u as EIP712SocialAuthenticationParams } from "../signatureParamTypes-Cjm4X5PA.cjs";
|
|
2
|
+
import { a as EIP712ListTriggerOrdersValues, c as EIP712OrderValues, d as EIP712TransferQuoteValues, f as EIP712UpdateDependencyValues, h as SignableRequestTypeToEIP712Values, i as EIP712LiquidateSubaccountValues, l as EIP712ProductOrdersCancellationValues, m as EIP712WithdrawCollateralValues, n as EIP712LeaderboardAuthenticationValues, o as EIP712MintNlpValues, p as EIP712WithdrawCollateralV2Values, r as EIP712LinkSignerValues, s as EIP712OrderCancellationValues, t as EIP712BurnNlpValues, u as EIP712SocialAuthenticationValues } from "../eip712ValueTypes-CI6wMCCw.cjs";
|
|
3
3
|
import { t as getNadoEIP712Domain } from "../getNadoEIP712Domain-iDIuXsMf.cjs";
|
|
4
|
-
import { n as SignableRequestTypeToParams, t as SignableRequestType } from "../signableRequestType-
|
|
5
|
-
import { t as getNadoEIP712PrimaryType } from "../getNadoEIP712PrimaryType-
|
|
6
|
-
import { t as getNadoEIP712Types } from "../getNadoEIP712Types-
|
|
7
|
-
import { t as getNadoEIP712Values } from "../getNadoEIP712Values-
|
|
4
|
+
import { n as SignableRequestTypeToParams, t as SignableRequestType } from "../signableRequestType-BV11vCXW.cjs";
|
|
5
|
+
import { t as getNadoEIP712PrimaryType } from "../getNadoEIP712PrimaryType-Cq8siJx7.cjs";
|
|
6
|
+
import { t as getNadoEIP712Types } from "../getNadoEIP712Types-D7duS2wH.cjs";
|
|
7
|
+
import { t as getNadoEIP712Values } from "../getNadoEIP712Values-DEBZh7-M.cjs";
|
|
8
8
|
import { t as getOrderVerifyingAddress } from "../getOrderVerifyingAddress-CHRCQ8AZ.cjs";
|
|
9
|
-
import { t as getSignedTransactionRequest } from "../getSignedTransactionRequest-
|
|
10
|
-
import { t as getOrderDigest } from "../orderDigest-
|
|
11
|
-
export { EIP712BurnNlpParams, EIP712BurnNlpValues, EIP712CancelOrdersParams, EIP712CancelProductOrdersParams, EIP712LeaderboardAuthenticationParams, EIP712LeaderboardAuthenticationValues, EIP712LinkSignerParams, EIP712LinkSignerValues, EIP712LiquidateSubaccountParams, EIP712LiquidateSubaccountValues, EIP712ListTriggerOrdersParams, EIP712ListTriggerOrdersValues, EIP712MintNlpParams, EIP712MintNlpValues, EIP712OrderCancellationValues, EIP712OrderParams, EIP712OrderValues, EIP712ProductOrdersCancellationValues, EIP712SocialAuthenticationParams, EIP712SocialAuthenticationValues, EIP712TransferQuoteParams, EIP712TransferQuoteValues, EIP712WithdrawCollateralParams, EIP712WithdrawCollateralV2Params, EIP712WithdrawCollateralV2Values, EIP712WithdrawCollateralValues, SignableRequestType, SignableRequestTypeToEIP712Values, SignableRequestTypeToParams, SignedEIP712OrderParams, SignedTx, getNadoEIP712Domain, getNadoEIP712PrimaryType, getNadoEIP712Types, getNadoEIP712Values, getOrderDigest, getOrderVerifyingAddress, getSignedTransactionRequest };
|
|
9
|
+
import { t as getSignedTransactionRequest } from "../getSignedTransactionRequest-DxUMBHLe.cjs";
|
|
10
|
+
import { t as getOrderDigest } from "../orderDigest-C9Sr-5TO.cjs";
|
|
11
|
+
export { EIP712BurnNlpParams, EIP712BurnNlpValues, EIP712CancelOrdersParams, EIP712CancelProductOrdersParams, EIP712LeaderboardAuthenticationParams, EIP712LeaderboardAuthenticationValues, EIP712LinkSignerParams, EIP712LinkSignerValues, EIP712LiquidateSubaccountParams, EIP712LiquidateSubaccountValues, EIP712ListTriggerOrdersParams, EIP712ListTriggerOrdersValues, EIP712MintNlpParams, EIP712MintNlpValues, EIP712OrderCancellationValues, EIP712OrderParams, EIP712OrderValues, EIP712ProductOrdersCancellationValues, EIP712SocialAuthenticationParams, EIP712SocialAuthenticationValues, EIP712TransferQuoteParams, EIP712TransferQuoteValues, EIP712UpdateDependencyParams, EIP712UpdateDependencyValues, EIP712WithdrawCollateralParams, EIP712WithdrawCollateralV2Params, EIP712WithdrawCollateralV2Values, EIP712WithdrawCollateralValues, SignableRequestType, SignableRequestTypeToEIP712Values, SignableRequestTypeToParams, SignedEIP712OrderParams, SignedTx, getNadoEIP712Domain, getNadoEIP712PrimaryType, getNadoEIP712Types, getNadoEIP712Values, getOrderDigest, getOrderVerifyingAddress, getSignedTransactionRequest };
|
package/dist/eip712/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as EIP712LinkSignerParams, c as EIP712MintNlpParams, d as EIP712TransferQuoteParams, f as
|
|
2
|
-
import { a as EIP712ListTriggerOrdersValues, c as EIP712OrderValues, d as EIP712TransferQuoteValues, f as
|
|
1
|
+
import { a as EIP712LinkSignerParams, c as EIP712MintNlpParams, d as EIP712TransferQuoteParams, f as EIP712UpdateDependencyParams, g as SignedTx, h as SignedEIP712OrderParams, i as EIP712LeaderboardAuthenticationParams, l as EIP712OrderParams, m as EIP712WithdrawCollateralV2Params, n as EIP712CancelOrdersParams, o as EIP712LiquidateSubaccountParams, p as EIP712WithdrawCollateralParams, r as EIP712CancelProductOrdersParams, s as EIP712ListTriggerOrdersParams, t as EIP712BurnNlpParams, u as EIP712SocialAuthenticationParams } from "../signatureParamTypes-CDUNzp0c.js";
|
|
2
|
+
import { a as EIP712ListTriggerOrdersValues, c as EIP712OrderValues, d as EIP712TransferQuoteValues, f as EIP712UpdateDependencyValues, h as SignableRequestTypeToEIP712Values, i as EIP712LiquidateSubaccountValues, l as EIP712ProductOrdersCancellationValues, m as EIP712WithdrawCollateralValues, n as EIP712LeaderboardAuthenticationValues, o as EIP712MintNlpValues, p as EIP712WithdrawCollateralV2Values, r as EIP712LinkSignerValues, s as EIP712OrderCancellationValues, t as EIP712BurnNlpValues, u as EIP712SocialAuthenticationValues } from "../eip712ValueTypes-CD1TxxFv.js";
|
|
3
3
|
import { t as getNadoEIP712Domain } from "../getNadoEIP712Domain-CSV6Zxuw.js";
|
|
4
|
-
import { n as SignableRequestTypeToParams, t as SignableRequestType } from "../signableRequestType-
|
|
5
|
-
import { t as getNadoEIP712PrimaryType } from "../getNadoEIP712PrimaryType-
|
|
6
|
-
import { t as getNadoEIP712Types } from "../getNadoEIP712Types-
|
|
7
|
-
import { t as getNadoEIP712Values } from "../getNadoEIP712Values-
|
|
4
|
+
import { n as SignableRequestTypeToParams, t as SignableRequestType } from "../signableRequestType-DWpXrjGE.js";
|
|
5
|
+
import { t as getNadoEIP712PrimaryType } from "../getNadoEIP712PrimaryType-CE0fRiTI.js";
|
|
6
|
+
import { t as getNadoEIP712Types } from "../getNadoEIP712Types-BmB1bTGu.js";
|
|
7
|
+
import { t as getNadoEIP712Values } from "../getNadoEIP712Values-0EOMObhX.js";
|
|
8
8
|
import { t as getOrderVerifyingAddress } from "../getOrderVerifyingAddress-BygcgBA1.js";
|
|
9
|
-
import { t as getSignedTransactionRequest } from "../getSignedTransactionRequest-
|
|
10
|
-
import { t as getOrderDigest } from "../orderDigest-
|
|
11
|
-
export { EIP712BurnNlpParams, EIP712BurnNlpValues, EIP712CancelOrdersParams, EIP712CancelProductOrdersParams, EIP712LeaderboardAuthenticationParams, EIP712LeaderboardAuthenticationValues, EIP712LinkSignerParams, EIP712LinkSignerValues, EIP712LiquidateSubaccountParams, EIP712LiquidateSubaccountValues, EIP712ListTriggerOrdersParams, EIP712ListTriggerOrdersValues, EIP712MintNlpParams, EIP712MintNlpValues, EIP712OrderCancellationValues, EIP712OrderParams, EIP712OrderValues, EIP712ProductOrdersCancellationValues, EIP712SocialAuthenticationParams, EIP712SocialAuthenticationValues, EIP712TransferQuoteParams, EIP712TransferQuoteValues, EIP712WithdrawCollateralParams, EIP712WithdrawCollateralV2Params, EIP712WithdrawCollateralV2Values, EIP712WithdrawCollateralValues, SignableRequestType, SignableRequestTypeToEIP712Values, SignableRequestTypeToParams, SignedEIP712OrderParams, SignedTx, getNadoEIP712Domain, getNadoEIP712PrimaryType, getNadoEIP712Types, getNadoEIP712Values, getOrderDigest, getOrderVerifyingAddress, getSignedTransactionRequest };
|
|
9
|
+
import { t as getSignedTransactionRequest } from "../getSignedTransactionRequest-Et_1Y1wr.js";
|
|
10
|
+
import { t as getOrderDigest } from "../orderDigest-BlytCeEr.js";
|
|
11
|
+
export { EIP712BurnNlpParams, EIP712BurnNlpValues, EIP712CancelOrdersParams, EIP712CancelProductOrdersParams, EIP712LeaderboardAuthenticationParams, EIP712LeaderboardAuthenticationValues, EIP712LinkSignerParams, EIP712LinkSignerValues, EIP712LiquidateSubaccountParams, EIP712LiquidateSubaccountValues, EIP712ListTriggerOrdersParams, EIP712ListTriggerOrdersValues, EIP712MintNlpParams, EIP712MintNlpValues, EIP712OrderCancellationValues, EIP712OrderParams, EIP712OrderValues, EIP712ProductOrdersCancellationValues, EIP712SocialAuthenticationParams, EIP712SocialAuthenticationValues, EIP712TransferQuoteParams, EIP712TransferQuoteValues, EIP712UpdateDependencyParams, EIP712UpdateDependencyValues, EIP712WithdrawCollateralParams, EIP712WithdrawCollateralV2Params, EIP712WithdrawCollateralV2Values, EIP712WithdrawCollateralValues, SignableRequestType, SignableRequestTypeToEIP712Values, SignableRequestTypeToParams, SignedEIP712OrderParams, SignedTx, getNadoEIP712Domain, getNadoEIP712PrimaryType, getNadoEIP712Types, getNadoEIP712Values, getOrderDigest, getOrderVerifyingAddress, getSignedTransactionRequest };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as getOrderDigest } from "../orderDigest-
|
|
1
|
+
import { t as getOrderDigest } from "../orderDigest-C9Sr-5TO.cjs";
|
|
2
2
|
export { getOrderDigest };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as getOrderDigest } from "../orderDigest-
|
|
1
|
+
import { t as getOrderDigest } from "../orderDigest-BlytCeEr.js";
|
|
2
2
|
export { getOrderDigest };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as SignableRequestTypeToParams, t as SignableRequestType } from "../signableRequestType-
|
|
1
|
+
import { n as SignableRequestTypeToParams, t as SignableRequestType } from "../signableRequestType-BV11vCXW.cjs";
|
|
2
2
|
export { SignableRequestType, SignableRequestTypeToParams };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as SignableRequestTypeToParams, t as SignableRequestType } from "../signableRequestType-
|
|
1
|
+
import { n as SignableRequestTypeToParams, t as SignableRequestType } from "../signableRequestType-DWpXrjGE.js";
|
|
2
2
|
export { SignableRequestType, SignableRequestTypeToParams };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as EIP712LinkSignerParams, c as EIP712MintNlpParams, d as EIP712TransferQuoteParams, f as
|
|
2
|
-
export { EIP712BurnNlpParams, EIP712CancelOrdersParams, EIP712CancelProductOrdersParams, EIP712LeaderboardAuthenticationParams, EIP712LinkSignerParams, EIP712LiquidateSubaccountParams, EIP712ListTriggerOrdersParams, EIP712MintNlpParams, EIP712OrderParams, EIP712SocialAuthenticationParams, EIP712TransferQuoteParams, EIP712WithdrawCollateralParams, EIP712WithdrawCollateralV2Params, SignedEIP712OrderParams, SignedTx };
|
|
1
|
+
import { a as EIP712LinkSignerParams, c as EIP712MintNlpParams, d as EIP712TransferQuoteParams, f as EIP712UpdateDependencyParams, g as SignedTx, h as SignedEIP712OrderParams, i as EIP712LeaderboardAuthenticationParams, l as EIP712OrderParams, m as EIP712WithdrawCollateralV2Params, n as EIP712CancelOrdersParams, o as EIP712LiquidateSubaccountParams, p as EIP712WithdrawCollateralParams, r as EIP712CancelProductOrdersParams, s as EIP712ListTriggerOrdersParams, t as EIP712BurnNlpParams, u as EIP712SocialAuthenticationParams } from "../signatureParamTypes-Cjm4X5PA.cjs";
|
|
2
|
+
export { EIP712BurnNlpParams, EIP712CancelOrdersParams, EIP712CancelProductOrdersParams, EIP712LeaderboardAuthenticationParams, EIP712LinkSignerParams, EIP712LiquidateSubaccountParams, EIP712ListTriggerOrdersParams, EIP712MintNlpParams, EIP712OrderParams, EIP712SocialAuthenticationParams, EIP712TransferQuoteParams, EIP712UpdateDependencyParams, EIP712WithdrawCollateralParams, EIP712WithdrawCollateralV2Params, SignedEIP712OrderParams, SignedTx };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as EIP712LinkSignerParams, c as EIP712MintNlpParams, d as EIP712TransferQuoteParams, f as
|
|
2
|
-
export { EIP712BurnNlpParams, EIP712CancelOrdersParams, EIP712CancelProductOrdersParams, EIP712LeaderboardAuthenticationParams, EIP712LinkSignerParams, EIP712LiquidateSubaccountParams, EIP712ListTriggerOrdersParams, EIP712MintNlpParams, EIP712OrderParams, EIP712SocialAuthenticationParams, EIP712TransferQuoteParams, EIP712WithdrawCollateralParams, EIP712WithdrawCollateralV2Params, SignedEIP712OrderParams, SignedTx };
|
|
1
|
+
import { a as EIP712LinkSignerParams, c as EIP712MintNlpParams, d as EIP712TransferQuoteParams, f as EIP712UpdateDependencyParams, g as SignedTx, h as SignedEIP712OrderParams, i as EIP712LeaderboardAuthenticationParams, l as EIP712OrderParams, m as EIP712WithdrawCollateralV2Params, n as EIP712CancelOrdersParams, o as EIP712LiquidateSubaccountParams, p as EIP712WithdrawCollateralParams, r as EIP712CancelProductOrdersParams, s as EIP712ListTriggerOrdersParams, t as EIP712BurnNlpParams, u as EIP712SocialAuthenticationParams } from "../signatureParamTypes-CDUNzp0c.js";
|
|
2
|
+
export { EIP712BurnNlpParams, EIP712CancelOrdersParams, EIP712CancelProductOrdersParams, EIP712LeaderboardAuthenticationParams, EIP712LinkSignerParams, EIP712LiquidateSubaccountParams, EIP712ListTriggerOrdersParams, EIP712MintNlpParams, EIP712OrderParams, EIP712SocialAuthenticationParams, EIP712TransferQuoteParams, EIP712UpdateDependencyParams, EIP712WithdrawCollateralParams, EIP712WithdrawCollateralV2Params, SignedEIP712OrderParams, SignedTx };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as BigNumberish } from "./bigNumber-BLE4n-ku.js";
|
|
2
|
-
import { a as EIP712LinkSignerParams, c as EIP712MintNlpParams, d as EIP712TransferQuoteParams, f as
|
|
2
|
+
import { a as EIP712LinkSignerParams, c as EIP712MintNlpParams, d as EIP712TransferQuoteParams, f as EIP712UpdateDependencyParams, i as EIP712LeaderboardAuthenticationParams, l as EIP712OrderParams, m as EIP712WithdrawCollateralV2Params, n as EIP712CancelOrdersParams, o as EIP712LiquidateSubaccountParams, p as EIP712WithdrawCollateralParams, r as EIP712CancelProductOrdersParams, s as EIP712ListTriggerOrdersParams, t as EIP712BurnNlpParams, u as EIP712SocialAuthenticationParams } from "./signatureParamTypes-CDUNzp0c.js";
|
|
3
3
|
import { Hex } from "viem";
|
|
4
4
|
|
|
5
5
|
//#region src/eip712/eip712ValueTypes.d.ts
|
|
@@ -18,6 +18,7 @@ type EIP712OrderValues = Omit<WithEIP712Sender<EIP712OrderParams>, 'price'> & {
|
|
|
18
18
|
priceX18: BigNumberish;
|
|
19
19
|
};
|
|
20
20
|
type EIP712ListTriggerOrdersValues = WithEIP712Sender<EIP712ListTriggerOrdersParams>;
|
|
21
|
+
type EIP712UpdateDependencyValues = WithEIP712Sender<EIP712UpdateDependencyParams>;
|
|
21
22
|
type EIP712OrderCancellationValues = WithEIP712Sender<EIP712CancelOrdersParams>;
|
|
22
23
|
type EIP712ProductOrdersCancellationValues = WithEIP712Sender<EIP712CancelProductOrdersParams>;
|
|
23
24
|
type EIP712LinkSignerValues = WithEIP712Sender<EIP712LinkSignerParams>;
|
|
@@ -43,9 +44,10 @@ interface SignableRequestTypeToEIP712Values {
|
|
|
43
44
|
place_order: EIP712OrderValues;
|
|
44
45
|
social_authentication: EIP712SocialAuthenticationValues;
|
|
45
46
|
transfer_quote: EIP712TransferQuoteValues;
|
|
47
|
+
update_dependency: EIP712UpdateDependencyValues;
|
|
46
48
|
withdraw_collateral: EIP712WithdrawCollateralValues;
|
|
47
49
|
withdraw_collateral_v2: EIP712WithdrawCollateralV2Values;
|
|
48
50
|
}
|
|
49
51
|
//#endregion
|
|
50
|
-
export { EIP712ListTriggerOrdersValues as a, EIP712OrderValues as c, EIP712TransferQuoteValues as d,
|
|
51
|
-
//# sourceMappingURL=eip712ValueTypes-
|
|
52
|
+
export { EIP712ListTriggerOrdersValues as a, EIP712OrderValues as c, EIP712TransferQuoteValues as d, EIP712UpdateDependencyValues as f, SignableRequestTypeToEIP712Values as h, EIP712LiquidateSubaccountValues as i, EIP712ProductOrdersCancellationValues as l, EIP712WithdrawCollateralValues as m, EIP712LeaderboardAuthenticationValues as n, EIP712MintNlpValues as o, EIP712WithdrawCollateralV2Values as p, EIP712LinkSignerValues as r, EIP712OrderCancellationValues as s, EIP712BurnNlpValues as t, EIP712SocialAuthenticationValues as u };
|
|
53
|
+
//# sourceMappingURL=eip712ValueTypes-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AU,mBAAA;EACV,WAAA,EAAa,iBAAA;EACb,qBAAA,EAAuB,gCAAA;EACvB,cAAA,EAAgB,yBAAA;EAChB,iBAAA,EAAmB,4BAAA;EACnB,mBAAA,EAAqB,8BAAA;EACrB,sBAAA,EAAwB,gCAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as BigNumberish } from "./bigNumber-DX0JX9bQ.cjs";
|
|
2
|
-
import { a as EIP712LinkSignerParams, c as EIP712MintNlpParams, d as EIP712TransferQuoteParams, f as
|
|
2
|
+
import { a as EIP712LinkSignerParams, c as EIP712MintNlpParams, d as EIP712TransferQuoteParams, f as EIP712UpdateDependencyParams, i as EIP712LeaderboardAuthenticationParams, l as EIP712OrderParams, m as EIP712WithdrawCollateralV2Params, n as EIP712CancelOrdersParams, o as EIP712LiquidateSubaccountParams, p as EIP712WithdrawCollateralParams, r as EIP712CancelProductOrdersParams, s as EIP712ListTriggerOrdersParams, t as EIP712BurnNlpParams, u as EIP712SocialAuthenticationParams } from "./signatureParamTypes-Cjm4X5PA.cjs";
|
|
3
3
|
import { Hex } from "viem";
|
|
4
4
|
|
|
5
5
|
//#region src/eip712/eip712ValueTypes.d.ts
|
|
@@ -18,6 +18,7 @@ type EIP712OrderValues = Omit<WithEIP712Sender<EIP712OrderParams>, 'price'> & {
|
|
|
18
18
|
priceX18: BigNumberish;
|
|
19
19
|
};
|
|
20
20
|
type EIP712ListTriggerOrdersValues = WithEIP712Sender<EIP712ListTriggerOrdersParams>;
|
|
21
|
+
type EIP712UpdateDependencyValues = WithEIP712Sender<EIP712UpdateDependencyParams>;
|
|
21
22
|
type EIP712OrderCancellationValues = WithEIP712Sender<EIP712CancelOrdersParams>;
|
|
22
23
|
type EIP712ProductOrdersCancellationValues = WithEIP712Sender<EIP712CancelProductOrdersParams>;
|
|
23
24
|
type EIP712LinkSignerValues = WithEIP712Sender<EIP712LinkSignerParams>;
|
|
@@ -43,9 +44,10 @@ interface SignableRequestTypeToEIP712Values {
|
|
|
43
44
|
place_order: EIP712OrderValues;
|
|
44
45
|
social_authentication: EIP712SocialAuthenticationValues;
|
|
45
46
|
transfer_quote: EIP712TransferQuoteValues;
|
|
47
|
+
update_dependency: EIP712UpdateDependencyValues;
|
|
46
48
|
withdraw_collateral: EIP712WithdrawCollateralValues;
|
|
47
49
|
withdraw_collateral_v2: EIP712WithdrawCollateralV2Values;
|
|
48
50
|
}
|
|
49
51
|
//#endregion
|
|
50
|
-
export { EIP712ListTriggerOrdersValues as a, EIP712OrderValues as c, EIP712TransferQuoteValues as d,
|
|
51
|
-
//# sourceMappingURL=eip712ValueTypes-
|
|
52
|
+
export { EIP712ListTriggerOrdersValues as a, EIP712OrderValues as c, EIP712TransferQuoteValues as d, EIP712UpdateDependencyValues as f, SignableRequestTypeToEIP712Values as h, EIP712LiquidateSubaccountValues as i, EIP712ProductOrdersCancellationValues as l, EIP712WithdrawCollateralValues as m, EIP712LeaderboardAuthenticationValues as n, EIP712MintNlpValues as o, EIP712WithdrawCollateralV2Values as p, EIP712LinkSignerValues as r, EIP712OrderCancellationValues as s, EIP712BurnNlpValues as t, EIP712SocialAuthenticationValues as u };
|
|
53
|
+
//# sourceMappingURL=eip712ValueTypes-CI6wMCCw.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eip712ValueTypes-CI6wMCCw.d.cts","names":[],"sources":["../src/eip712/src/eip712/eip712ValueTypes.ts"],"mappings":";;;;;KAmBK,gBAAA;EACS,eAAA;EAAyB,cAAA;AAAA,KACnC,IAAA,CAAK,CAAA;EAEP,MAAA,EAAQ,GAAA;AAAA;AAAA,KAGE,8BAAA,GACV,gBAAgB,CAAC,8BAAA;AAAA,KAEP,gCAAA,GACV,gBAAgB,CAAC,gCAAA;AAAA,KAEP,+BAAA,GAAkC,IAAA,CAC5C,gBAAA,CAAiB,+BAAA;EAIjB,UAAA;AAAA;AAAA,KAGU,iBAAA,GAAoB,IAAA,CAC9B,gBAAA,CAAiB,iBAAA;EAGjB,QAAA,EAAU,YAAA;AAAA;AAAA,KAGA,6BAAA,GACV,gBAAgB,CAAC,6BAAA;AAAA,KAEP,4BAAA,GACV,gBAAgB,CAAC,4BAAA;AAAA,KAEP,6BAAA,GACV,gBAAgB,CAAC,wBAAA;AAAA,KAEP,qCAAA,GACV,gBAAgB,CAAC,+BAAA;AAAA,KAEP,sBAAA,GAAyB,gBAAgB,CAAC,sBAAA;AAAA,KAE1C,yBAAA,GAA4B,IAAA,CACtC,gBAAA,CAAiB,yBAAA;EAIjB,SAAA;AAAA;AAAA,KAGU,qCAAA,GACV,gBAAgB,CAAC,qCAAA;AAAA,KAEP,gCAAA,GACV,gBAAgB,CAAC,gCAAA;AAAA,KAEP,mBAAA,GAAsB,gBAAgB,CAAC,mBAAA;AAAA,KAEvC,mBAAA,GAAsB,gBAAgB,CAAC,mBAAA;;;;UAKlC,iCAAA;EACf,QAAA,EAAU,mBAAA;EACV,aAAA,EAAe,6BAAA;EACf,qBAAA,EAAuB,qCAAA;EACvB,0BAAA,EAA4B,qCAAA;EAC5B,WAAA,EAAa,sBAAA;EACb,oBAAA,EAAsB,+BAAA;EACtB,mBAAA,EAAqB,6BAAA;EACrB,QAAA,EAAU,mBAAA;EACV,WAAA,EAAa,iBAAA;EACb,qBAAA,EAAuB,gCAAA;EACvB,cAAA,EAAgB,yBAAA;EAChB,iBAAA,EAAmB,4BAAA;EACnB,mBAAA,EAAqB,8BAAA;EACrB,sBAAA,EAAwB,gCAAA;AAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as encodeSignedWithdrawCollateralTx, i as encodeSignedOrder, n as SlowModeTxType, r as encodeClaimBuilderFeeTx, t as ClaimBuilderFeeParams } from "../encoding-
|
|
1
|
+
import { a as encodeSignedWithdrawCollateralTx, i as encodeSignedOrder, n as SlowModeTxType, r as encodeClaimBuilderFeeTx, t as ClaimBuilderFeeParams } from "../encoding-BXqysa4s.cjs";
|
|
2
2
|
export { ClaimBuilderFeeParams, SlowModeTxType, encodeClaimBuilderFeeTx, encodeSignedOrder, encodeSignedWithdrawCollateralTx };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as encodeSignedWithdrawCollateralTx, i as encodeSignedOrder, n as SlowModeTxType, r as encodeClaimBuilderFeeTx, t as ClaimBuilderFeeParams } from "../encoding-
|
|
1
|
+
import { a as encodeSignedWithdrawCollateralTx, i as encodeSignedOrder, n as SlowModeTxType, r as encodeClaimBuilderFeeTx, t as ClaimBuilderFeeParams } from "../encoding-DaxmoLmF.js";
|
|
2
2
|
export { ClaimBuilderFeeParams, SlowModeTxType, encodeClaimBuilderFeeTx, encodeSignedOrder, encodeSignedWithdrawCollateralTx };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as encodeSignedWithdrawCollateralTx, i as encodeSignedOrder, n as SlowModeTxType, r as encodeClaimBuilderFeeTx, t as ClaimBuilderFeeParams } from "../encoding-
|
|
1
|
+
import { a as encodeSignedWithdrawCollateralTx, i as encodeSignedOrder, n as SlowModeTxType, r as encodeClaimBuilderFeeTx, t as ClaimBuilderFeeParams } from "../encoding-BXqysa4s.cjs";
|
|
2
2
|
export { ClaimBuilderFeeParams, SlowModeTxType, encodeClaimBuilderFeeTx, encodeSignedOrder, encodeSignedWithdrawCollateralTx };
|
package/dist/encoding/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as encodeSignedWithdrawCollateralTx, i as encodeSignedOrder, n as SlowModeTxType, r as encodeClaimBuilderFeeTx, t as ClaimBuilderFeeParams } from "../encoding-
|
|
1
|
+
import { a as encodeSignedWithdrawCollateralTx, i as encodeSignedOrder, n as SlowModeTxType, r as encodeClaimBuilderFeeTx, t as ClaimBuilderFeeParams } from "../encoding-DaxmoLmF.js";
|
|
2
2
|
export { ClaimBuilderFeeParams, SlowModeTxType, encodeClaimBuilderFeeTx, encodeSignedOrder, encodeSignedWithdrawCollateralTx };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as SignedTx, h as SignedEIP712OrderParams, p as EIP712WithdrawCollateralParams } from "./signatureParamTypes-Cjm4X5PA.cjs";
|
|
2
2
|
import { Hex } from "viem";
|
|
3
3
|
|
|
4
4
|
//#region src/encoding/encoding.d.ts
|
|
@@ -31,4 +31,4 @@ interface ClaimBuilderFeeParams {
|
|
|
31
31
|
declare function encodeClaimBuilderFeeTx(params: ClaimBuilderFeeParams): Hex;
|
|
32
32
|
//#endregion
|
|
33
33
|
export { encodeSignedWithdrawCollateralTx as a, encodeSignedOrder as i, SlowModeTxType as n, encodeClaimBuilderFeeTx as r, ClaimBuilderFeeParams as t };
|
|
34
|
-
//# sourceMappingURL=encoding-
|
|
34
|
+
//# sourceMappingURL=encoding-BXqysa4s.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encoding-
|
|
1
|
+
{"version":3,"file":"encoding-BXqysa4s.d.cts","names":[],"sources":["../src/encoding/src/encoding/encoding.ts"],"mappings":";;;;;;;aAgBY,cAAA;EACV,iBAAA;EACA,kBAAA;EACA,UAAA;EACA,eAAA;EACA,oBAAA;AAAA;AAAA,iBAGc,gCAAA,CACd,MAAA,EAAQ,QAAQ,CAAC,8BAAA;AAAA,iBAqBH,iBAAA,CAAkB,MAA+B,EAAvB,uBAAuB;AAAA,UAqBhD,qBAAA;EA9CK;EAgDpB,MAAA,EAAQ,GAAG;EA7CmC;EA+C9C,SAAA;AAAA;;;;;AA9CgD;AAqBlD;;;iBAoCgB,uBAAA,CAAwB,MAAA,EAAQ,qBAAA,GAAwB,GAAG"}
|