@gardenfi/orderbook 3.0.4 → 3.0.5

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/index8.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index4.cjs");class o{constructor(t,r){this.chain=t,this.symbol=r,this.blockchainType=e.getBlockchainType(t),this.formatted=`${t.toLowerCase()}:${r.toLowerCase()}`,this.network=e.Config[t].network,this.asset=e.Assets[t][r]}static from(t){return t instanceof o?t:typeof t=="string"?o.fromString(t):o.fromAsset(t)}static fromChainAndSymbol(t,r){return new o(t,r)}static fromString(t){const[r,n]=t.split(":");if(!(r in e.Chains))throw new Error(`Invalid chain in asset string: ${r}`);return new o(r,n)}static fromAsset(t){return new o(t.chain,t.symbol)}toString(){return this.formatted}}exports.ChainAsset=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index4.cjs");class o{constructor(t,r){this.chain=t,this.symbol=r,this.blockchainType=e.getBlockchainType(t),this.formatted=`${t.toLowerCase()}:${r.toLowerCase()}`,this.network=e.Config[t].network,this.asset=e.Assets[t][r]}static from(t){return t instanceof o?t:typeof t=="string"?o.fromString(t):o.fromAsset(t)}static fromChainAndSymbol(t,r){return new o(t,r)}static fromString(t){const[r,n]=t.split(":");if(!(r in e.Chains))throw new Error(`Invalid chain in asset string: ${r}`);return new o(r,n)}static fromAsset(t){return new o(t.chain,t.symbol)}toString(){return this.formatted}toJSON(){return this.formatted}}exports.ChainAsset=o;
package/dist/index8.js CHANGED
@@ -22,6 +22,9 @@ class o {
22
22
  toString() {
23
23
  return this.formatted;
24
24
  }
25
+ toJSON() {
26
+ return this.formatted;
27
+ }
25
28
  }
26
29
  export {
27
30
  o as ChainAsset
@@ -16,4 +16,5 @@ export declare class ChainAsset {
16
16
  static fromString(formatted: ChainAssetString | string): ChainAsset;
17
17
  static fromAsset(asset: Asset): ChainAsset;
18
18
  toString(): string;
19
+ toJSON(): string;
19
20
  }
@@ -101,7 +101,7 @@ export type Order = {
101
101
  destination_swap: Swap;
102
102
  slippage: number;
103
103
  nonce: string;
104
- affiliate_fees: AffiliateFee[];
104
+ affiliate_fees: AffiliateFeeV2[];
105
105
  integrator: string;
106
106
  version: string;
107
107
  };
@@ -139,6 +139,9 @@ export type AffiliateFee = {
139
139
  asset: ChainAsset;
140
140
  fee: number;
141
141
  };
142
+ export type AffiliateFeeV2 = AffiliateFee & {
143
+ asset: string;
144
+ };
142
145
  export type AffiliateFeeWithAmount = AffiliateFee & {
143
146
  amount: string;
144
147
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gardenfi/orderbook",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",