@gardenfi/orderbook 2.5.3-beta.3 → 2.5.3-beta.4
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/index7.cjs +1 -1
- package/dist/index7.js +4 -4
- package/package.json +2 -2
package/dist/index7.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@gardenfi/utils"),i=require("./index3.cjs"),p=(t,r,d)=>{const a=t.endpoint(r);return d&&Object.entries(d).forEach(([l,n])=>{n!==void 0&&(Array.isArray(n)?a.searchParams.append(l,n.join(",")):a.searchParams.append(l,n.toString()))}),a},c=t=>e.hasKeys(t,["typed_data","initiate_transaction"])&&typeof t.initiate_transaction=="object"&&t.initiate_transaction&&e.hasKeys(t.initiate_transaction,["to","value","data","gas_limit","chain_id"]),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@gardenfi/utils"),i=require("./index3.cjs"),p=(t,r,d)=>{const a=t.endpoint(r);return d&&Object.entries(d).forEach(([l,n])=>{n!==void 0&&(Array.isArray(n)?a.searchParams.append(l,n.join(",")):a.searchParams.append(l,n.toString()))}),a},c=t=>e.hasKeys(t,["typed_data","initiate_transaction"])&&typeof t.initiate_transaction=="object"&&t.initiate_transaction&&e.hasKeys(t.initiate_transaction,["to","value","data","gas_limit","chain_id"]),s=t=>e.hasKeys(t,["typed_data","initiate_transaction"])&&typeof t.initiate_transaction=="object"&&t.initiate_transaction&&e.hasKeys(t.initiate_transaction,["to","selector","calldata"]),o=t=>e.hasKeys(t,["to","amount"])&&typeof t.to=="string"&&typeof t.amount=="string",y=t=>e.hasKeys(t,["versioned_tx"])&&typeof t.versioned_tx=="string",u=t=>e.hasKeys(t,["ptb_bytes"])&&Array.isArray(t.ptb_bytes)&&t.ptb_bytes.every(r=>typeof r=="number"),f=t=>e.hasKeys(t,["source_swap","destination_swap"])&&typeof t.source_swap=="object"&&typeof t.destination_swap=="object";function h(t){return c(t)?{type:i.BlockchainType.evm,...t}:s(t)?{type:i.BlockchainType.starknet,...t}:o(t)?{type:i.BlockchainType.bitcoin,...t}:y(t)?{type:i.BlockchainType.solana,...t}:u(t)?{type:i.BlockchainType.sui,...t}:null}function _(t){return c(t)?i.BlockchainType.evm:s(t)?i.BlockchainType.starknet:o(t)?i.BlockchainType.bitcoin:y(t)?i.BlockchainType.solana:u(t)?i.BlockchainType.sui:null}exports.ConstructUrl=p;exports.discriminateOrderResponse=h;exports.getOrderResponseType=_;exports.isBitcoinOrderResponse=o;exports.isEvmOrderResponse=c;exports.isOrder=f;exports.isSolanaOrderResponse=y;exports.isStarknetOrderResponse=s;exports.isSuiOrderResponse=u;
|
package/dist/index7.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { hasKeys as r } from "@gardenfi/utils";
|
|
2
2
|
import { BlockchainType as i } from "./index3.js";
|
|
3
|
-
const
|
|
3
|
+
const l = (t, a, o) => {
|
|
4
4
|
const e = t.endpoint(a);
|
|
5
5
|
return o && Object.entries(o).forEach(([c, n]) => {
|
|
6
6
|
n !== void 0 && (Array.isArray(n) ? e.searchParams.append(c, n.join(",")) : e.searchParams.append(c, n.toString()));
|
|
@@ -11,7 +11,7 @@ const m = (t, a, o) => {
|
|
|
11
11
|
"data",
|
|
12
12
|
"gas_limit",
|
|
13
13
|
"chain_id"
|
|
14
|
-
]), f = (t) => r(t, ["typed_data", "initiate_transaction"]) && typeof t.initiate_transaction == "object" && t.initiate_transaction && r(t.initiate_transaction, ["to", "selector", "calldata"]), y = (t) => r(t, ["to", "amount"]) && typeof t.to == "string" && typeof t.amount == "
|
|
14
|
+
]), f = (t) => r(t, ["typed_data", "initiate_transaction"]) && typeof t.initiate_transaction == "object" && t.initiate_transaction && r(t.initiate_transaction, ["to", "selector", "calldata"]), y = (t) => r(t, ["to", "amount"]) && typeof t.to == "string" && typeof t.amount == "string", d = (t) => r(t, ["versioned_tx"]) && typeof t.versioned_tx == "string", _ = (t) => r(t, ["ptb_bytes"]) && Array.isArray(t.ptb_bytes) && t.ptb_bytes.every((a) => typeof a == "number"), m = (t) => r(t, ["source_swap", "destination_swap"]) && typeof t.source_swap == "object" && typeof t.destination_swap == "object";
|
|
15
15
|
function p(t) {
|
|
16
16
|
return u(t) ? {
|
|
17
17
|
type: i.evm,
|
|
@@ -34,12 +34,12 @@ function O(t) {
|
|
|
34
34
|
return u(t) ? i.evm : f(t) ? i.starknet : y(t) ? i.bitcoin : d(t) ? i.solana : _(t) ? i.sui : null;
|
|
35
35
|
}
|
|
36
36
|
export {
|
|
37
|
-
|
|
37
|
+
l as ConstructUrl,
|
|
38
38
|
p as discriminateOrderResponse,
|
|
39
39
|
O as getOrderResponseType,
|
|
40
40
|
y as isBitcoinOrderResponse,
|
|
41
41
|
u as isEvmOrderResponse,
|
|
42
|
-
|
|
42
|
+
m as isOrder,
|
|
43
43
|
d as isSolanaOrderResponse,
|
|
44
44
|
f as isStarknetOrderResponse,
|
|
45
45
|
_ as isSuiOrderResponse
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gardenfi/orderbook",
|
|
3
|
-
"version": "2.5.3-beta.
|
|
3
|
+
"version": "2.5.3-beta.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@coral-xyz/anchor": "^0.31.1",
|
|
31
|
-
"@gardenfi/utils": "2.5.3-beta.
|
|
31
|
+
"@gardenfi/utils": "2.5.3-beta.3",
|
|
32
32
|
"bufferutil": "^4.0.8",
|
|
33
33
|
"siwe": "^2.1.4",
|
|
34
34
|
"utf-8-validate": "^6.0.3",
|