@clober/v2-sdk 0.0.9 → 0.0.10

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.
Files changed (34) hide show
  1. package/dist/cjs/abis/core/controller-abi.js +28 -18
  2. package/dist/cjs/abis/core/controller-abi.js.map +1 -1
  3. package/dist/cjs/approval.js.map +1 -1
  4. package/dist/cjs/call.js +159 -73
  5. package/dist/cjs/call.js.map +1 -1
  6. package/dist/cjs/signature.js.map +1 -1
  7. package/dist/cjs/type.js.map +1 -1
  8. package/dist/cjs/utils/build-transaction.js +8 -7
  9. package/dist/cjs/utils/build-transaction.js.map +1 -1
  10. package/dist/esm/abis/core/controller-abi.js +28 -18
  11. package/dist/esm/abis/core/controller-abi.js.map +1 -1
  12. package/dist/esm/approval.js +3 -12
  13. package/dist/esm/approval.js.map +1 -1
  14. package/dist/esm/call.js +173 -92
  15. package/dist/esm/call.js.map +1 -1
  16. package/dist/esm/signature.js +0 -12
  17. package/dist/esm/signature.js.map +1 -1
  18. package/dist/esm/type.js.map +1 -1
  19. package/dist/esm/utils/build-transaction.js +8 -7
  20. package/dist/esm/utils/build-transaction.js.map +1 -1
  21. package/dist/tsconfig.build.tsbuildinfo +1 -1
  22. package/dist/types/abis/core/controller-abi.d.ts +22 -14
  23. package/dist/types/abis/core/controller-abi.d.ts.map +1 -1
  24. package/dist/types/approval.d.ts +3 -12
  25. package/dist/types/approval.d.ts.map +1 -1
  26. package/dist/types/call.d.ts +21 -20
  27. package/dist/types/call.d.ts.map +1 -1
  28. package/dist/types/signature.d.ts +0 -12
  29. package/dist/types/signature.d.ts.map +1 -1
  30. package/dist/types/type.d.ts +1 -0
  31. package/dist/types/type.d.ts.map +1 -1
  32. package/dist/types/utils/build-transaction.d.ts +1 -1
  33. package/dist/types/utils/build-transaction.d.ts.map +1 -1
  34. package/package.json +1 -1
@@ -14,14 +14,6 @@ export declare const CONTROLLER_ABI: readonly [{
14
14
  }];
15
15
  readonly name: "AddressEmptyCode";
16
16
  readonly type: "error";
17
- }, {
18
- readonly inputs: readonly [{
19
- readonly internalType: "address";
20
- readonly name: "account";
21
- readonly type: "address";
22
- }];
23
- readonly name: "AddressInsufficientBalance";
24
- readonly type: "error";
25
17
  }, {
26
18
  readonly inputs: readonly [];
27
19
  readonly name: "ControllerSlippage";
@@ -36,7 +28,19 @@ export declare const CONTROLLER_ABI: readonly [{
36
28
  readonly type: "error";
37
29
  }, {
38
30
  readonly inputs: readonly [];
39
- readonly name: "FailedInnerCall";
31
+ readonly name: "FailedCall";
32
+ readonly type: "error";
33
+ }, {
34
+ readonly inputs: readonly [{
35
+ readonly internalType: "uint256";
36
+ readonly name: "balance";
37
+ readonly type: "uint256";
38
+ }, {
39
+ readonly internalType: "uint256";
40
+ readonly name: "needed";
41
+ readonly type: "uint256";
42
+ }];
43
+ readonly name: "InsufficientBalance";
40
44
  readonly type: "error";
41
45
  }, {
42
46
  readonly inputs: readonly [];
@@ -90,10 +94,6 @@ export declare const CONTROLLER_ABI: readonly [{
90
94
  }];
91
95
  readonly name: "SafeERC20FailedOperation";
92
96
  readonly type: "error";
93
- }, {
94
- readonly inputs: readonly [];
95
- readonly name: "ValueTransferFailed";
96
- readonly type: "error";
97
97
  }, {
98
98
  readonly inputs: readonly [{
99
99
  readonly components: readonly [{
@@ -340,7 +340,7 @@ export declare const CONTROLLER_ABI: readonly [{
340
340
  readonly name: "id";
341
341
  readonly type: "uint192";
342
342
  }];
343
- readonly name: "getLowestPrice";
343
+ readonly name: "getHighestPrice";
344
344
  readonly outputs: readonly [{
345
345
  readonly internalType: "uint256";
346
346
  readonly name: "";
@@ -612,6 +612,10 @@ export declare const CONTROLLER_ABI: readonly [{
612
612
  readonly internalType: "uint256";
613
613
  readonly name: "baseAmount";
614
614
  readonly type: "uint256";
615
+ }, {
616
+ readonly internalType: "uint256";
617
+ readonly name: "minQuoteAmount";
618
+ readonly type: "uint256";
615
619
  }, {
616
620
  readonly internalType: "bytes";
617
621
  readonly name: "hookData";
@@ -681,6 +685,10 @@ export declare const CONTROLLER_ABI: readonly [{
681
685
  readonly internalType: "uint256";
682
686
  readonly name: "quoteAmount";
683
687
  readonly type: "uint256";
688
+ }, {
689
+ readonly internalType: "uint256";
690
+ readonly name: "maxBaseAmount";
691
+ readonly type: "uint256";
684
692
  }, {
685
693
  readonly internalType: "bytes";
686
694
  readonly name: "hookData";
@@ -1 +1 @@
1
- {"version":3,"file":"controller-abi.d.ts","sourceRoot":"","sources":["../../../../src/abis/core/controller-abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAw9BjB,CAAA"}
1
+ {"version":3,"file":"controller-abi.d.ts","sourceRoot":"","sources":["../../../../src/abis/core/controller-abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAk+BjB,CAAA"}
@@ -12,15 +12,6 @@ import type { DefaultOptions } from './type';
12
12
  * @returns {Promise<`0x${string}` | undefined>} Promise resolving to the transaction hash. If the account is already approved for all, the promise resolves to `undefined`.
13
13
  * @example
14
14
  * import { setApprovalOfOpenOrdersForAll } from '@clober/v2-sdk'
15
- * import { privateKeyToAccount } from 'viem/accounts'
16
- *
17
- * const hash = await setApprovalOfOpenOrdersForAll({
18
- * chainId: 421614,
19
- * account: privateKeyToAccount('0x...')
20
- * })
21
- *
22
- * @example
23
- * import { setApprovalOfOpenOrdersForAll } from '@clober/v2-sdk'
24
15
  * import { mnemonicToAccount } from 'viem/accounts'
25
16
  *
26
17
  * const walletClient = createWalletClient({
@@ -29,10 +20,10 @@ import type { DefaultOptions } from './type';
29
20
  * transport: http(),
30
21
  * })
31
22
  *
32
- * const hash = await setApprovalOfOpenOrdersForAll(
33
- * 421614,
23
+ * const hash = await setApprovalOfOpenOrdersForAll({
24
+ * chainId: 421614,
34
25
  * walletClient
35
- * )
26
+ * })
36
27
  */
37
28
  export declare const setApprovalOfOpenOrdersForAll: (args: {
38
29
  chainId: CHAIN_IDS;
@@ -1 +1 @@
1
- {"version":3,"file":"approval.d.ts","sourceRoot":"","sources":["../../src/approval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,EAAE,SAAS,EAAa,MAAM,mBAAmB,CAAA;AAIxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AAuB5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,6BAA6B;aAK7B,SAAS;kBACJ,YAAY;cAChB,cAAc;wCAqB3B,CAAA"}
1
+ {"version":3,"file":"approval.d.ts","sourceRoot":"","sources":["../../src/approval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,EAAE,SAAS,EAAa,MAAM,mBAAmB,CAAA;AAIxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AAuB5C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,6BAA6B;aAK7B,SAAS;kBACJ,YAAY;cAChB,cAAc;wCAqB3B,CAAA"}
@@ -45,7 +45,7 @@ export declare const openMarket: (args: {
45
45
  *
46
46
  * const signature = await signERC20Permit({
47
47
  * chainId: 421614,
48
- * account: privateKeyToAccount('0x...'),
48
+ * walletClient,
49
49
  * token: '0x00bfd44e79fb7f6dd5887a9426c8ef85a0cd23e0',
50
50
  * amount: '100.123'
51
51
  * })
@@ -92,25 +92,29 @@ export declare const limitOrder: (args: {
92
92
  }>;
93
93
  /**
94
94
  * Executes a market order on the specified chain for trading tokens.
95
+ * If only `amountIn` is provided, spend the specified amount of input tokens.
96
+ * If `amountIn` and `amountOut` are provided, take the appropriate amount of output tokens with the specified input amount.
95
97
  *
96
98
  * @param {CHAIN_IDS} chainId The chain ID.
97
99
  * @param {`0x${string}`} userAddress The Ethereum address of the user placing the order.
98
100
  * @param {`0x${string}`} inputToken The address of the token to be used as input.
99
101
  * @param {`0x${string}`} outputToken The address of the token to be received as output.
100
- * @param {string} amount The amount of input tokens for the order.
101
- * @param {Object} [options] Optional parameters for the limit order.
102
+ * @param {string} amountIn The amount of input tokens for the order to spend.
103
+ * @param {string} amountOut The amount of output tokens for the order to take.
104
+ * @param {Object} [options] Optional parameters for the market order.
102
105
  * @param {PermitSignature} [options.signature] The permit signature for token approval.
103
106
  * @param {string} [options.rpcUrl] The RPC URL of the blockchain.
104
- * @param {string} [options.limitPrice] The upper bound price to tolerate for the market bid, or the lower bound price to tolerate for the market ask.
105
- * if the limit price is not provided, unlimited slippage is allowed.
106
- * @returns {Promise<Transaction>} Promise resolving to the transaction object representing the limit order.
107
+ * @param {number} [options.slippage] The maximum slippage percentage allowed for the order.
108
+ * if the slippage is not provided, unlimited slippage is allowed.
109
+ * @returns {Promise<{ transaction: Transaction, result: { spend: CurrencyFlow, take: CurrencyFlow } }>}
110
+ * Promise resolving to the transaction object representing the market order with the result of the order.
107
111
  * @example
108
112
  * import { signERC20Permit, marketOrder } from '@clober/v2-sdk'
109
113
  * import { privateKeyToAccount } from 'viem/accounts'
110
114
  *
111
115
  * const signature = await signERC20Permit({
112
116
  * chainId: 421614,
113
- * account: privateKeyToAccount('0x...'),
117
+ * walletClient,
114
118
  * token: '0x00bfd44e79fb7f6dd5887a9426c8ef85a0cd23e0',
115
119
  * amount: '100.123'
116
120
  * })
@@ -124,28 +128,25 @@ export declare const limitOrder: (args: {
124
128
  * options: { signature }
125
129
  * })
126
130
  *
127
- * @example
128
- * import { marketOrder } from '@clober/v2-sdk'
129
- *
130
- * const transaction = await limitOrder(
131
- * chainId: 421614,
132
- * userAddress: '0xF8c1869Ecd4df136693C45EcE1b67f85B6bDaE69
133
- * inputToken: '0x0000000000000000000000000000000000000000',
134
- * outputToken: '0x00bfd44e79fb7f6dd5887a9426c8ef85a0cd23e0',
135
- * options: '0.13', // 0.13 ETH
136
- * )
137
131
  */
138
132
  export declare const marketOrder: (args: {
139
133
  chainId: CHAIN_IDS;
140
134
  userAddress: `0x${string}`;
141
135
  inputToken: `0x${string}`;
142
136
  outputToken: `0x${string}`;
143
- amount: string;
137
+ amountIn: string;
138
+ amountOut?: string;
144
139
  options?: {
145
140
  signature?: PermitSignature;
146
- limitPrice?: string;
141
+ slippage?: number;
147
142
  } & DefaultOptions;
148
- }) => Promise<Transaction>;
143
+ }) => Promise<{
144
+ transaction: Transaction;
145
+ result: {
146
+ take: CurrencyFlow;
147
+ spend: CurrencyFlow;
148
+ };
149
+ }>;
149
150
  /**
150
151
  * Claims specified open order for settlement.
151
152
  * [IMPORTANT] Set ApprovalForAll before calling this function.
@@ -1 +1 @@
1
- {"version":3,"file":"call.d.ts","sourceRoot":"","sources":["../../src/call.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAa,MAAM,mBAAmB,CAAA;AACxD,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,eAAe,EACf,WAAW,EACZ,MAAM,QAAQ,CAAA;AAkBf;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,UAAU;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B,GAAG,cAAc;;iBAEL,WAAW;YAChB;QACN,IAAI,EAAE,YAAY,CAAA;QAClB,KAAK,EAAE,YAAY,CAAA;KACpB;EAkKJ,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,UAAU;aAOV,SAAS;iBACL,KAAK,MAAM,EAAE;QACtB,MAAM;cACA,cAAc;;iBACC,WAAW;YAAU,YAAY;EAY7D,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,WAAW;aAOX,SAAS;iBACL,KAAK,MAAM,EAAE;SACrB,MAAM,EAAE;cACH,cAAc;;iBACC,WAAW;YAAU,YAAY,EAAE;EA+E/D,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,WAAW;aAOX,SAAS;iBACL,KAAK,MAAM,EAAE;QACtB,MAAM;cACA,cAAc;;iBACC,WAAW;YAAU,YAAY;EAY7D,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,YAAY;aAOZ,SAAS;iBACL,KAAK,MAAM,EAAE;SACrB,MAAM,EAAE;cACH,cAAc;;iBACC,WAAW;YAAU,YAAY,EAAE;EAiF/D,CAAA"}
@@ -14,18 +14,6 @@ import { DefaultOptions, PermitSignature } from './type';
14
14
  * @returns {Promise<PermitSignature>} Promise resolving to the permit signature.
15
15
  * @example
16
16
  * import { signERC20Permit } from '@clober/v2-sdk'
17
- * import { privateKeyToAccount } from 'viem/accounts'
18
- *
19
- * const { deadline, r, s, v } = await signERC20Permit({
20
- * chainId: 421614,
21
- * account: privateKeyToAccount('0x...')
22
- * token: '0x00bfd44e79fb7f6dd5887a9426c8ef85a0cd23e0',
23
- * amount: '1000.123', // spend 1000.123 USDC
24
- * })
25
- *
26
- * @example
27
- * import { signERC20Permit } from '@clober/v2-sdk'
28
- * import { mnemonicToAccount } from 'viem/accounts'
29
17
  *
30
18
  * const walletClient = createWalletClient({
31
19
  * chain: arbitrumSepolia,
@@ -1 +1 @@
1
- {"version":3,"file":"signature.d.ts","sourceRoot":"","sources":["../../src/signature.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAEb,MAAM,MAAM,CAAA;AAEb,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAI7C,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAoDxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,eAAe;aAOf,SAAS;kBACJ,YAAY;WACnB,KAAK,MAAM,EAAE;YACZ,MAAM;cACJ,cAAc;8BA4F3B,CAAA"}
1
+ {"version":3,"file":"signature.d.ts","sourceRoot":"","sources":["../../src/signature.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAEb,MAAM,MAAM,CAAA;AAEb,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAI7C,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAoDxD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,eAAe;aAOf,SAAS;kBACJ,YAAY;WACnB,KAAK,MAAM,EAAE;YACZ,MAAM;cACJ,cAAc;8BA4F3B,CAAA"}
@@ -33,6 +33,7 @@ export type PermitSignature = {
33
33
  };
34
34
  export type DefaultOptions = {
35
35
  rpcUrl?: string;
36
+ gasLimit?: bigint;
36
37
  };
37
38
  export type CurrencyFlow = {
38
39
  currency: Currency;
@@ -1 +1 @@
1
- {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAChD,OA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AO;IACf,MAAM,OAAO;IACb,OAAO,OAAO;CACf"}
@@ -1,4 +1,4 @@
1
1
  import { type SimulateContractParameters, type WriteContractParameters } from 'viem';
2
2
  import { CHAIN_IDS, type Transaction } from '../type';
3
- export declare const buildTransaction: (chainId: CHAIN_IDS, args: WriteContractParameters | SimulateContractParameters) => Promise<Transaction>;
3
+ export declare const buildTransaction: (chainId: CHAIN_IDS, args: WriteContractParameters | SimulateContractParameters, gasLimit?: bigint) => Promise<Transaction>;
4
4
  //# sourceMappingURL=build-transaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"build-transaction.d.ts","sourceRoot":"","sources":["../../../src/utils/build-transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC7B,MAAM,MAAM,CAAA;AAEb,OAAO,EAAE,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;AAGrD,eAAO,MAAM,gBAAgB,YAClB,SAAS,QACZ,uBAAuB,GAAG,0BAA0B,KACzD,QAAQ,WAAW,CAmBrB,CAAA"}
1
+ {"version":3,"file":"build-transaction.d.ts","sourceRoot":"","sources":["../../../src/utils/build-transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC7B,MAAM,MAAM,CAAA;AAEb,OAAO,EAAE,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;AAGrD,eAAO,MAAM,gBAAgB,YAClB,SAAS,QACZ,uBAAuB,GAAG,0BAA0B,aAC/C,MAAM,KAChB,QAAQ,WAAW,CAoBrB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clober/v2-sdk",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "🛠 An SDK for building applications on top of Clober V2",
5
5
  "files": [
6
6
  "dist"