@gardenfi/orderbook 3.0.6-beta.2 → 3.0.6-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 CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@gardenfi/utils"),e=require("./index3.cjs"),l=(t,n,d)=>{const a=t.endpoint(n);return d&&Object.entries(d).forEach(([f,r])=>{r!==void 0&&(Array.isArray(r)?a.searchParams.append(f,r.join(",")):a.searchParams.append(f,r.toString()))}),a},c=t=>i.hasKeys(t,["typed_data","initiate_transaction"])&&typeof t.initiate_transaction=="object"&&t.initiate_transaction&&i.hasKeys(t.initiate_transaction,["to","value","data","gas_limit","chain_id"]),o=t=>i.hasKeys(t,["typed_data","initiate_transaction"])&&typeof t.initiate_transaction=="object"&&t.initiate_transaction&&i.hasKeys(t.initiate_transaction,["to","selector","calldata"]),s=t=>i.hasKeys(t,["to","amount"])&&typeof t.to=="string"&&typeof t.amount=="string",y=t=>i.hasKeys(t,["versioned_tx"])&&typeof t.versioned_tx=="string",u=t=>i.hasKeys(t,["ptb_bytes"])&&Array.isArray(t.ptb_bytes)&&t.ptb_bytes.every(n=>typeof n=="number"),_=t=>i.hasKeys(t,["order_id","escrow_create_tx"])&&typeof t.escrow_create_tx=="object"&&t.escrow_create_tx&&i.hasKeys(t.escrow_create_tx,["Account","Amount","CancelAfter","Condition","Destination","TransactionType"])&&typeof t.escrow_create_tx.Account=="string"&&typeof t.escrow_create_tx.Amount=="string"&&typeof t.escrow_create_tx.CancelAfter=="number"&&typeof t.escrow_create_tx.Condition=="string"&&typeof t.escrow_create_tx.Destination=="string"&&typeof t.escrow_create_tx.TransactionType=="string",p=t=>i.hasKeys(t,["source_swap","destination_swap"])&&typeof t.source_swap=="object"&&typeof t.destination_swap=="object";function h(t){return c(t)?{type:e.BlockchainType.evm,...t}:o(t)?{type:e.BlockchainType.starknet,...t}:s(t)?{type:e.BlockchainType.bitcoin,...t}:y(t)?{type:e.BlockchainType.solana,...t}:u(t)?{type:e.BlockchainType.sui,...t}:_(t)?{type:e.BlockchainType.xrpl,...t}:null}function O(t){return c(t)?e.BlockchainType.evm:o(t)?e.BlockchainType.starknet:s(t)?e.BlockchainType.bitcoin:y(t)?e.BlockchainType.solana:u(t)?e.BlockchainType.sui:_(t)?e.BlockchainType.xrpl:null}exports.ConstructUrl=l;exports.discriminateOrderResponse=h;exports.getOrderResponseType=O;exports.isBitcoinOrderResponse=s;exports.isEvmOrderResponse=c;exports.isOrder=p;exports.isSolanaOrderResponse=y;exports.isStarknetOrderResponse=o;exports.isSuiOrderResponse=u;exports.isXrplOrderResponse=_;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@gardenfi/utils"),e=require("./index3.cjs"),_=(t,n,l)=>{const a=t.endpoint(n);return l&&Object.entries(l).forEach(([p,r])=>{r!==void 0&&(Array.isArray(r)?a.searchParams.append(p,r.join(",")):a.searchParams.append(p,r.toString()))}),a},c=t=>i.hasKeys(t,["typed_data","initiate_transaction"])&&typeof t.initiate_transaction=="object"&&t.initiate_transaction&&i.hasKeys(t.initiate_transaction,["to","value","data","gas_limit","chain_id"]),o=t=>i.hasKeys(t,["typed_data","initiate_transaction"])&&typeof t.initiate_transaction=="object"&&t.initiate_transaction&&i.hasKeys(t.initiate_transaction,["to","selector","calldata"]),s=t=>i.hasKeys(t,["to","amount"])&&typeof t.to=="string"&&typeof t.amount=="string",y=t=>i.hasKeys(t,["versioned_tx"])&&typeof t.versioned_tx=="string",u=t=>i.hasKeys(t,["ptb_bytes"])&&Array.isArray(t.ptb_bytes)&&t.ptb_bytes.every(n=>typeof n=="number"),d=t=>i.hasKeys(t,["order_id","escrow_create_tx"])&&typeof t.escrow_create_tx=="object"&&t.escrow_create_tx&&i.hasKeys(t.escrow_create_tx,["Account","Amount","CancelAfter","Condition","Destination","TransactionType"]),f=t=>i.hasKeys(t,["source_swap","destination_swap"])&&typeof t.source_swap=="object"&&typeof t.destination_swap=="object";function h(t){return c(t)?{type:e.BlockchainType.evm,...t}:o(t)?{type:e.BlockchainType.starknet,...t}:s(t)?{type:e.BlockchainType.bitcoin,...t}:y(t)?{type:e.BlockchainType.solana,...t}:u(t)?{type:e.BlockchainType.sui,...t}:d(t)?{type:e.BlockchainType.xrpl,...t}:null}function O(t){return c(t)?e.BlockchainType.evm:o(t)?e.BlockchainType.starknet:s(t)?e.BlockchainType.bitcoin:y(t)?e.BlockchainType.solana:u(t)?e.BlockchainType.sui:d(t)?e.BlockchainType.xrpl:null}exports.ConstructUrl=_;exports.discriminateOrderResponse=h;exports.getOrderResponseType=O;exports.isBitcoinOrderResponse=s;exports.isEvmOrderResponse=c;exports.isOrder=f;exports.isSolanaOrderResponse=y;exports.isStarknetOrderResponse=o;exports.isSuiOrderResponse=u;exports.isXrplOrderResponse=d;
package/dist/index7.js CHANGED
@@ -5,34 +5,34 @@ const m = (t, a, c) => {
5
5
  return c && Object.entries(c).forEach(([o, n]) => {
6
6
  n !== void 0 && (Array.isArray(n) ? e.searchParams.append(o, n.join(",")) : e.searchParams.append(o, n.toString()));
7
7
  }), e;
8
- }, _ = (t) => r(t, ["typed_data", "initiate_transaction"]) && typeof t.initiate_transaction == "object" && t.initiate_transaction && r(t.initiate_transaction, [
8
+ }, u = (t) => r(t, ["typed_data", "initiate_transaction"]) && typeof t.initiate_transaction == "object" && t.initiate_transaction && r(t.initiate_transaction, [
9
9
  "to",
10
10
  "value",
11
11
  "data",
12
12
  "gas_limit",
13
13
  "chain_id"
14
- ]), u = (t) => r(t, ["typed_data", "initiate_transaction"]) && typeof t.initiate_transaction == "object" && t.initiate_transaction && r(t.initiate_transaction, ["to", "selector", "calldata"]), f = (t) => r(t, ["to", "amount"]) && typeof t.to == "string" && typeof t.amount == "string", y = (t) => r(t, ["versioned_tx"]) && typeof t.versioned_tx == "string", d = (t) => r(t, ["ptb_bytes"]) && Array.isArray(t.ptb_bytes) && t.ptb_bytes.every((a) => typeof a == "number"), l = (t) => r(t, ["order_id", "escrow_create_tx"]) && typeof t.escrow_create_tx == "object" && t.escrow_create_tx && r(t.escrow_create_tx, [
14
+ ]), f = (t) => r(t, ["typed_data", "initiate_transaction"]) && typeof t.initiate_transaction == "object" && t.initiate_transaction && r(t.initiate_transaction, ["to", "selector", "calldata"]), _ = (t) => r(t, ["to", "amount"]) && typeof t.to == "string" && typeof t.amount == "string", d = (t) => r(t, ["versioned_tx"]) && typeof t.versioned_tx == "string", y = (t) => r(t, ["ptb_bytes"]) && Array.isArray(t.ptb_bytes) && t.ptb_bytes.every((a) => typeof a == "number"), l = (t) => r(t, ["order_id", "escrow_create_tx"]) && typeof t.escrow_create_tx == "object" && t.escrow_create_tx && r(t.escrow_create_tx, [
15
15
  "Account",
16
16
  "Amount",
17
17
  "CancelAfter",
18
18
  "Condition",
19
19
  "Destination",
20
20
  "TransactionType"
21
- ]) && typeof t.escrow_create_tx.Account == "string" && typeof t.escrow_create_tx.Amount == "string" && typeof t.escrow_create_tx.CancelAfter == "number" && typeof t.escrow_create_tx.Condition == "string" && typeof t.escrow_create_tx.Destination == "string" && typeof t.escrow_create_tx.TransactionType == "string", x = (t) => r(t, ["source_swap", "destination_swap"]) && typeof t.source_swap == "object" && typeof t.destination_swap == "object";
22
- function p(t) {
23
- return _(t) ? {
21
+ ]), p = (t) => r(t, ["source_swap", "destination_swap"]) && typeof t.source_swap == "object" && typeof t.destination_swap == "object";
22
+ function O(t) {
23
+ return u(t) ? {
24
24
  type: i.evm,
25
25
  ...t
26
- } : u(t) ? {
26
+ } : f(t) ? {
27
27
  type: i.starknet,
28
28
  ...t
29
- } : f(t) ? {
29
+ } : _(t) ? {
30
30
  type: i.bitcoin,
31
31
  ...t
32
- } : y(t) ? {
32
+ } : d(t) ? {
33
33
  type: i.solana,
34
34
  ...t
35
- } : d(t) ? {
35
+ } : y(t) ? {
36
36
  type: i.sui,
37
37
  ...t
38
38
  } : l(t) ? {
@@ -40,18 +40,18 @@ function p(t) {
40
40
  ...t
41
41
  } : null;
42
42
  }
43
- function w(t) {
44
- return _(t) ? i.evm : u(t) ? i.starknet : f(t) ? i.bitcoin : y(t) ? i.solana : d(t) ? i.sui : l(t) ? i.xrpl : null;
43
+ function x(t) {
44
+ return u(t) ? i.evm : f(t) ? i.starknet : _(t) ? i.bitcoin : d(t) ? i.solana : y(t) ? i.sui : l(t) ? i.xrpl : null;
45
45
  }
46
46
  export {
47
47
  m as ConstructUrl,
48
- p as discriminateOrderResponse,
49
- w as getOrderResponseType,
50
- f as isBitcoinOrderResponse,
51
- _ as isEvmOrderResponse,
52
- x as isOrder,
53
- y as isSolanaOrderResponse,
54
- u as isStarknetOrderResponse,
55
- d as isSuiOrderResponse,
48
+ O as discriminateOrderResponse,
49
+ x as getOrderResponseType,
50
+ _ as isBitcoinOrderResponse,
51
+ u as isEvmOrderResponse,
52
+ p as isOrder,
53
+ d as isSolanaOrderResponse,
54
+ f as isStarknetOrderResponse,
55
+ y as isSuiOrderResponse,
56
56
  l as isXrplOrderResponse
57
57
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gardenfi/orderbook",
3
- "version": "3.0.6-beta.2",
3
+ "version": "3.0.6-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": "3.0.0-beta.4",
31
+ "@gardenfi/utils": "3.0.0-beta.6",
32
32
  "bufferutil": "^4.0.8",
33
33
  "node-cache": "^5.1.2",
34
34
  "siwe": "^2.1.4",