@ickb/sdk 1000.0.71 → 1000.0.82
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/codec.d.ts +3 -0
- package/dist/codec.d.ts.map +1 -0
- package/dist/codec.js +58 -0
- package/dist/codec.js.map +1 -0
- package/dist/constants.d.ts +23 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +95 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/sdk.d.ts +51 -0
- package/dist/sdk.d.ts.map +1 -0
- package/dist/sdk.js +242 -0
- package/dist/sdk.js.map +1 -0
- package/package.json +35 -20
- package/src/constants.ts +50 -45
- package/src/sdk.ts +2 -2
- package/dist/cjs/codec.d.ts +0 -14
- package/dist/cjs/codec.d.ts.map +0 -1
- package/dist/cjs/codec.js +0 -125
- package/dist/cjs/codec.js.map +0 -1
- package/dist/cjs/constants.d.ts +0 -49
- package/dist/cjs/constants.d.ts.map +0 -1
- package/dist/cjs/constants.js +0 -156
- package/dist/cjs/constants.js.map +0 -1
- package/dist/cjs/index.d.ts.map +0 -1
- package/dist/cjs/index.js +0 -20
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/sdk.d.ts +0 -178
- package/dist/cjs/sdk.d.ts.map +0 -1
- package/dist/cjs/sdk.js +0 -362
- package/dist/cjs/sdk.js.map +0 -1
- package/dist/esm/codec.d.ts +0 -14
- package/dist/esm/codec.d.ts.map +0 -1
- package/dist/esm/codec.js +0 -122
- package/dist/esm/codec.js.map +0 -1
- package/dist/esm/constants.d.ts +0 -49
- package/dist/esm/constants.d.ts.map +0 -1
- package/dist/esm/constants.js +0 -152
- package/dist/esm/constants.js.map +0 -1
- package/dist/esm/index.d.ts +0 -4
- package/dist/esm/index.d.ts.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/sdk.d.ts +0 -178
- package/dist/esm/sdk.d.ts.map +0 -1
- package/dist/esm/sdk.js +0 -358
- package/dist/esm/sdk.js.map +0 -1
- /package/dist/{cjs/index.d.ts → index.d.ts} +0 -0
- /package/dist/{esm/index.js → index.js} +0 -0
package/dist/esm/codec.js
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { ccc, mol } from "@ckb-ccc/core";
|
|
2
|
-
import { max } from "@ickb/utils";
|
|
3
|
-
const N = 1024;
|
|
4
|
-
/**
|
|
5
|
-
* Codec for encoding and decoding a pool snapshot.
|
|
6
|
-
*
|
|
7
|
-
* The PoolSnapshotCodec encodes an array of 1024 numbers representing event counts for bins,
|
|
8
|
-
* where the number of bits used per bin is dynamically computed as the ceiling of log2(max + 1)
|
|
9
|
-
* across all bins. The codec provides methods to encode the array into a Uint8Array and decode
|
|
10
|
-
* a Uint8Array back to the original array of numbers.
|
|
11
|
-
*
|
|
12
|
-
* @remarks The total number of bits for encoding all the bins is computed as bitsPerBin * 1024. The codec
|
|
13
|
-
* does not have a fixed byteLength since it depends on the data.
|
|
14
|
-
*/
|
|
15
|
-
export const PoolSnapshot = mol.Codec.from({
|
|
16
|
-
/**
|
|
17
|
-
* Encodes an array of 1024 bin counts into a Uint8Array.
|
|
18
|
-
*
|
|
19
|
-
* @param bins - An array of 1024 numbers. Each number represents the event count for a bin.
|
|
20
|
-
* @returns A Uint8Array containing the packed bit representation of the bin counts.
|
|
21
|
-
* @throws Error if the input array does not contain exactly 1024 elements.
|
|
22
|
-
*/
|
|
23
|
-
encode: (bins) => {
|
|
24
|
-
if (bins.length !== N) {
|
|
25
|
-
throw new Error("Expected 1024 bins");
|
|
26
|
-
}
|
|
27
|
-
const bitsPerBin = computeBits(bins);
|
|
28
|
-
const buffer = new Uint8Array((bitsPerBin * N) >> 3);
|
|
29
|
-
let bitOffset = 0;
|
|
30
|
-
for (const count of bins) {
|
|
31
|
-
packBits(buffer, bitOffset, bitsPerBin, count);
|
|
32
|
-
bitOffset += bitsPerBin;
|
|
33
|
-
}
|
|
34
|
-
return buffer;
|
|
35
|
-
},
|
|
36
|
-
/**
|
|
37
|
-
* Decodes a buffer into an array of 1024 bin counts.
|
|
38
|
-
*
|
|
39
|
-
* The function automatically computes the number of bits per bin from the buffer length,
|
|
40
|
-
* expecting that the total number of bits in the buffer is a multiple of 1024.
|
|
41
|
-
*
|
|
42
|
-
* @param bufferLike - The input that can be converted into a Uint8Array.
|
|
43
|
-
* @returns An array of 1024 numbers representing the decoded bin counts.
|
|
44
|
-
* @throws Error if the buffer length is invalid (i.e., its total bit count is not divisible by 1024).
|
|
45
|
-
*/
|
|
46
|
-
decode: (bufferLike) => {
|
|
47
|
-
const buffer = ccc.bytesFrom(bufferLike);
|
|
48
|
-
// Determine bitsPerBin from the fixed structure (totalBits divided by N).
|
|
49
|
-
const bitsPerBin = (buffer.byteLength * 8) / N;
|
|
50
|
-
if (!Number.isInteger(bitsPerBin)) {
|
|
51
|
-
throw new Error("Invalid buffer length for 1024 bins");
|
|
52
|
-
}
|
|
53
|
-
const bins = new Array(N);
|
|
54
|
-
let bitOffset = 0;
|
|
55
|
-
for (let i = 0; i < N; i++) {
|
|
56
|
-
bins[i] = unpackBits(buffer, bitOffset, bitsPerBin);
|
|
57
|
-
bitOffset += bitsPerBin;
|
|
58
|
-
}
|
|
59
|
-
return bins;
|
|
60
|
-
},
|
|
61
|
-
// Note: The byteLength is not fixed as it depends on the data (i.e., the maximum bin count).
|
|
62
|
-
});
|
|
63
|
-
/**
|
|
64
|
-
* Computes the minimal number of bits required to represent the maximum number in the bins.
|
|
65
|
-
*
|
|
66
|
-
* Given an array of numbers that represent counts for each bin, this function calculates
|
|
67
|
-
* the number of bits required to represent the maximum bin count. A minimum of 1 bit is
|
|
68
|
-
* always returned.
|
|
69
|
-
*
|
|
70
|
-
* @param bins - An array of numbers, each representing a bin's value.
|
|
71
|
-
* @returns The minimal number of bits required to represent the highest value among the bins.
|
|
72
|
-
*/
|
|
73
|
-
function computeBits(bins) {
|
|
74
|
-
return Math.ceil(Math.log2(1 + max(1, ...bins)));
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Packs a given numeric value into a Uint8Array (bit array) at the specified bit offset and width.
|
|
78
|
-
*
|
|
79
|
-
* The function encodes the given number into the provided buffer, using the specified number of bits (width)
|
|
80
|
-
* starting from the specified bit offset. Each bit of the value is written into the buffer.
|
|
81
|
-
*
|
|
82
|
-
* @param buffer - The Uint8Array into which the value will be packed.
|
|
83
|
-
* @param bitOffset - The starting bit index in the array where the value should be packed.
|
|
84
|
-
* @param width - The number of bits to use for packing the value.
|
|
85
|
-
* @param value - The numeric value to pack.
|
|
86
|
-
*/
|
|
87
|
-
function packBits(buffer, bitOffset, width, value) {
|
|
88
|
-
let offset = bitOffset;
|
|
89
|
-
for (let i = 0; i < width; i++) {
|
|
90
|
-
const byteIndex = offset >> 3;
|
|
91
|
-
const bitInByte = offset % 8;
|
|
92
|
-
const bit = (value >> i) & 1;
|
|
93
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
94
|
-
buffer[byteIndex] |= bit << bitInByte;
|
|
95
|
-
offset++;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Unpacks a numeric value from a Uint8Array (bit array) starting at a given bit offset with a specified width.
|
|
100
|
-
*
|
|
101
|
-
* The function reads bits from the buffer starting at the bit offset and reconstructs a numeric value
|
|
102
|
-
* using the specified number of bits (width).
|
|
103
|
-
*
|
|
104
|
-
* @param buffer - The Uint8Array from which the value will be unpacked.
|
|
105
|
-
* @param bitOffset - The starting bit index in the buffer.
|
|
106
|
-
* @param width - The number of bits to read for unpacking the value.
|
|
107
|
-
* @returns The numeric value resulting from decoding the specified bits.
|
|
108
|
-
*/
|
|
109
|
-
function unpackBits(buffer, bitOffset, width) {
|
|
110
|
-
let value = 0;
|
|
111
|
-
let offset = bitOffset;
|
|
112
|
-
for (let i = 0; i < width; i++) {
|
|
113
|
-
const byteIndex = offset >> 3;
|
|
114
|
-
const bitInByte = offset % 8;
|
|
115
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
116
|
-
const bit = (buffer[byteIndex] >> bitInByte) & 1;
|
|
117
|
-
value |= bit << i;
|
|
118
|
-
offset++;
|
|
119
|
-
}
|
|
120
|
-
return value;
|
|
121
|
-
}
|
|
122
|
-
//# sourceMappingURL=codec.js.map
|
package/dist/esm/codec.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codec.js","sourceRoot":"","sources":["../../src/codec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,MAAM,CAAC,GAAG,IAAI,CAAC;AAEf;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAW;IACnD;;;;;;OAMG;IACH,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;QACf,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;QACxC,CAAC;QAED,MAAM,UAAU,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;QACrC,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAErD,IAAI,SAAS,GAAG,CAAC,CAAC;QAClB,KAAK,MAAM,KAAK,IAAI,IAAI,EAAE,CAAC;YACzB,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;YAC/C,SAAS,IAAI,UAAU,CAAC;QAC1B,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,EAAE,CAAC,UAAU,EAAE,EAAE;QACrB,MAAM,MAAM,GAAG,GAAG,CAAC,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,oEAAoE;QACpE,MAAM,CAAC,SAAS,CAAE,IAAI,GAAG,IAAI,SAAS,CAAC;QACvC,MAAM,EAAE,CAAC;IACX,CAAC;AACH,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAS,UAAU,CACjB,MAAkB,EAClB,SAAiB,EACjB,KAAa;IAEb,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,MAAM,GAAG,SAAS,CAAC;IACvB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;QAC/B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,CAAC;QAC9B,MAAM,SAAS,GAAG,MAAM,GAAG,CAAC,CAAC;QAC7B,oEAAoE;QACpE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAE,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC;QAClD,KAAK,IAAI,GAAG,IAAI,CAAC,CAAC;QAClB,MAAM,EAAE,CAAC;IACX,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/dist/esm/constants.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { ccc } from "@ckb-ccc/core";
|
|
2
|
-
import { IckbUdtManager, LogicManager, OwnedOwnerManager } from "@ickb/core";
|
|
3
|
-
import { DaoManager } from "@ickb/dao";
|
|
4
|
-
import { OrderManager } from "@ickb/order";
|
|
5
|
-
import { CapacityManager, type ScriptDeps } from "@ickb/utils";
|
|
6
|
-
/**
|
|
7
|
-
* The iCKB UDT name.
|
|
8
|
-
*/
|
|
9
|
-
export declare const UDT_NAME = "iCKB";
|
|
10
|
-
/**
|
|
11
|
-
* The iCKB UDT symbol.
|
|
12
|
-
*/
|
|
13
|
-
export declare const UDT_SYMBOL = "iCKB";
|
|
14
|
-
/**
|
|
15
|
-
* The iCKB UDT number of decimals.
|
|
16
|
-
*/
|
|
17
|
-
export declare const UDT_DECIMALS = 8;
|
|
18
|
-
/**
|
|
19
|
-
* Retrieves the configuration for the given deployment environment.
|
|
20
|
-
*
|
|
21
|
-
* Accepts either a string identifier ("mainnet" or "testnet") or a custom configuration
|
|
22
|
-
* object containing script dependencies for a devnet.
|
|
23
|
-
*
|
|
24
|
-
* It sets up various managers (UDT, Logic, OwnedOwner, Order, Dao, Capacity) and also
|
|
25
|
-
* aggregates a unique list of known bot scripts.
|
|
26
|
-
*
|
|
27
|
-
* @param deps - Either a network identifier ("mainnet"/"testnet") or an object containing
|
|
28
|
-
* explicit script dependencies for devnet.
|
|
29
|
-
* @param bots - An optional array of bot script-like objects to augment the list of known bots.
|
|
30
|
-
* @returns An object containing the instantiated managers and bots.
|
|
31
|
-
*/
|
|
32
|
-
export declare function getConfig(deps: "mainnet" | "testnet" | {
|
|
33
|
-
udt: ScriptDeps;
|
|
34
|
-
ickbLogic: ScriptDeps;
|
|
35
|
-
ownedOwner: ScriptDeps;
|
|
36
|
-
order: ScriptDeps;
|
|
37
|
-
dao: ScriptDeps;
|
|
38
|
-
}, bots?: ccc.ScriptLike[]): {
|
|
39
|
-
managers: {
|
|
40
|
-
udt: IckbUdtManager;
|
|
41
|
-
ickbLogic: LogicManager;
|
|
42
|
-
ownedOwner: OwnedOwnerManager;
|
|
43
|
-
order: OrderManager;
|
|
44
|
-
dao: DaoManager;
|
|
45
|
-
capacity: CapacityManager;
|
|
46
|
-
};
|
|
47
|
-
bots: ccc.Script[];
|
|
48
|
-
};
|
|
49
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAU,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAEvE;;GAEG;AACH,eAAO,MAAM,QAAQ,SAAS,CAAC;AAE/B;;GAEG;AACH,eAAO,MAAM,UAAU,SAAS,CAAC;AAEjC;;GAEG;AACH,eAAO,MAAM,YAAY,IAAI,CAAC;AAE9B;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CACvB,IAAI,EACA,SAAS,GACT,SAAS,GACT;IAEE,GAAG,EAAE,UAAU,CAAC;IAChB,SAAS,EAAE,UAAU,CAAC;IACtB,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,UAAU,CAAC;IAClB,GAAG,EAAE,UAAU,CAAC;CACjB,EACL,IAAI,GAAE,GAAG,CAAC,UAAU,EAAO,GAC1B;IACD,QAAQ,EAAE;QACR,GAAG,EAAE,cAAc,CAAC;QACpB,SAAS,EAAE,YAAY,CAAC;QACxB,UAAU,EAAE,iBAAiB,CAAC;QAC9B,KAAK,EAAE,YAAY,CAAC;QACpB,GAAG,EAAE,UAAU,CAAC;QAChB,QAAQ,EAAE,eAAe,CAAC;KAC3B,CAAC;IACF,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC;CACpB,CA6BA"}
|
package/dist/esm/constants.js
DELETED
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { ccc } from "@ckb-ccc/core";
|
|
2
|
-
import { IckbUdtManager, LogicManager, OwnedOwnerManager } from "@ickb/core";
|
|
3
|
-
import { DaoManager } from "@ickb/dao";
|
|
4
|
-
import { OrderManager } from "@ickb/order";
|
|
5
|
-
import { CapacityManager, unique } from "@ickb/utils";
|
|
6
|
-
/**
|
|
7
|
-
* The iCKB UDT name.
|
|
8
|
-
*/
|
|
9
|
-
export const UDT_NAME = "iCKB";
|
|
10
|
-
/**
|
|
11
|
-
* The iCKB UDT symbol.
|
|
12
|
-
*/
|
|
13
|
-
export const UDT_SYMBOL = "iCKB";
|
|
14
|
-
/**
|
|
15
|
-
* The iCKB UDT number of decimals.
|
|
16
|
-
*/
|
|
17
|
-
export const UDT_DECIMALS = 8;
|
|
18
|
-
/**
|
|
19
|
-
* Retrieves the configuration for the given deployment environment.
|
|
20
|
-
*
|
|
21
|
-
* Accepts either a string identifier ("mainnet" or "testnet") or a custom configuration
|
|
22
|
-
* object containing script dependencies for a devnet.
|
|
23
|
-
*
|
|
24
|
-
* It sets up various managers (UDT, Logic, OwnedOwner, Order, Dao, Capacity) and also
|
|
25
|
-
* aggregates a unique list of known bot scripts.
|
|
26
|
-
*
|
|
27
|
-
* @param deps - Either a network identifier ("mainnet"/"testnet") or an object containing
|
|
28
|
-
* explicit script dependencies for devnet.
|
|
29
|
-
* @param bots - An optional array of bot script-like objects to augment the list of known bots.
|
|
30
|
-
* @returns An object containing the instantiated managers and bots.
|
|
31
|
-
*/
|
|
32
|
-
export function getConfig(deps, bots = []) {
|
|
33
|
-
// If deps is provided as a network string, use the pre-defined constants.
|
|
34
|
-
if (deps === "mainnet" || deps === "testnet") {
|
|
35
|
-
bots = bots.concat(deps === "mainnet" ? MAINNET_KNOWN_BOTS : TESTNET_KNOWN_BOTS);
|
|
36
|
-
const depGroup = deps === "mainnet" ? MAINNET_DEP_GROUP : TESTNET_DEP_GROUP;
|
|
37
|
-
deps = {
|
|
38
|
-
udt: from(UDT, depGroup),
|
|
39
|
-
ickbLogic: from(ICKB_LOGIC, depGroup),
|
|
40
|
-
ownedOwner: from(OWNED_OWNER, depGroup),
|
|
41
|
-
order: from(ORDER, depGroup),
|
|
42
|
-
dao: from(DAO, depGroup),
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
const daoManager = DaoManager.fromDeps(deps);
|
|
46
|
-
const ickbUdtManager = IckbUdtManager.fromDeps(deps, daoManager);
|
|
47
|
-
return {
|
|
48
|
-
managers: {
|
|
49
|
-
udt: ickbUdtManager,
|
|
50
|
-
ickbLogic: LogicManager.fromDeps(deps, daoManager, ickbUdtManager),
|
|
51
|
-
ownedOwner: OwnedOwnerManager.fromDeps(deps, daoManager, ickbUdtManager),
|
|
52
|
-
order: OrderManager.fromDeps(deps, ickbUdtManager),
|
|
53
|
-
dao: daoManager,
|
|
54
|
-
capacity: CapacityManager.withAnyData(),
|
|
55
|
-
},
|
|
56
|
-
bots: [...unique(bots.map((b) => ccc.Script.from(b)))],
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Wraps a script-like object into a ScriptDeps structure.
|
|
61
|
-
*
|
|
62
|
-
* @param script - The script or script-like object.
|
|
63
|
-
* @param cellDeps - Additional cell dependencies that the script may require.
|
|
64
|
-
* @returns An object containing the script and its associated cell dependencies.
|
|
65
|
-
*/
|
|
66
|
-
function from(script, ...cellDeps) {
|
|
67
|
-
return {
|
|
68
|
-
script: ccc.Script.from(script),
|
|
69
|
-
cellDeps,
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* UDT (User Defined Token) lock script information used for onchain validation.
|
|
74
|
-
*/
|
|
75
|
-
const UDT = {
|
|
76
|
-
codeHash: "0x50bd8d6680b8b9cf98b73f3c08faf8b2a21914311954118ad6609be6e78a1b95",
|
|
77
|
-
hashType: "data1",
|
|
78
|
-
args: "0xb73b6ab39d79390c6de90a09c96b290c331baf1798ed6f97aed02590929734e800000080",
|
|
79
|
-
};
|
|
80
|
-
/**
|
|
81
|
-
* DAO (Decentralized Autonomous Organization) lock script information.
|
|
82
|
-
*/
|
|
83
|
-
const DAO = {
|
|
84
|
-
codeHash: "0x82d76d1b75fe2fd9a27dfbaa65a039221a380d76c926f378d3f81cf3e7e13f2e",
|
|
85
|
-
hashType: "type",
|
|
86
|
-
args: "0x",
|
|
87
|
-
};
|
|
88
|
-
/**
|
|
89
|
-
* Logic script information for the iCKB logic contract.
|
|
90
|
-
*/
|
|
91
|
-
const ICKB_LOGIC = {
|
|
92
|
-
codeHash: "0x2a8100ab5990fa055ab1b50891702e1e895c7bd1df6322cd725c1a6115873bd3",
|
|
93
|
-
hashType: "data1",
|
|
94
|
-
args: "0x",
|
|
95
|
-
};
|
|
96
|
-
/**
|
|
97
|
-
* OwnedOwner lock script information.
|
|
98
|
-
*/
|
|
99
|
-
const OWNED_OWNER = {
|
|
100
|
-
codeHash: "0xacc79e07d107831feef4c70c9e683dac5644d5993b9cb106dca6e74baa381bd0",
|
|
101
|
-
hashType: "data1",
|
|
102
|
-
args: "0x",
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* Order lock script information.
|
|
106
|
-
*/
|
|
107
|
-
const ORDER = {
|
|
108
|
-
codeHash: "0x49dfb6afee5cc8ac4225aeea8cb8928b150caf3cd92fea33750683c74b13254a",
|
|
109
|
-
hashType: "data1",
|
|
110
|
-
args: "0x",
|
|
111
|
-
};
|
|
112
|
-
/**
|
|
113
|
-
* Mainnet dependency group cell dep.
|
|
114
|
-
*/
|
|
115
|
-
const MAINNET_DEP_GROUP = ccc.CellDep.from({
|
|
116
|
-
outPoint: {
|
|
117
|
-
txHash: "0x621a6f38de3b9f453016780edac3b26bfcbfa3e2ecb47c2da275471a5d3ed165",
|
|
118
|
-
index: "0x0",
|
|
119
|
-
},
|
|
120
|
-
depType: "depGroup",
|
|
121
|
-
});
|
|
122
|
-
/**
|
|
123
|
-
* Testnet dependency group cell dep.
|
|
124
|
-
*/
|
|
125
|
-
const TESTNET_DEP_GROUP = ccc.CellDep.from({
|
|
126
|
-
outPoint: {
|
|
127
|
-
txHash: "0xf7ece4fb33d8378344cab11fcd6a4c6f382fd4207ac921cf5821f30712dcd311",
|
|
128
|
-
index: "0x0",
|
|
129
|
-
},
|
|
130
|
-
depType: "depGroup",
|
|
131
|
-
});
|
|
132
|
-
/**
|
|
133
|
-
* Array of known bot scripts on the mainnet.
|
|
134
|
-
*/
|
|
135
|
-
const MAINNET_KNOWN_BOTS = [
|
|
136
|
-
{
|
|
137
|
-
codeHash: "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
|
|
138
|
-
hashType: "type",
|
|
139
|
-
args: "0xd096cb29e2f68a85a46bd6bf6cbee6327959ba64",
|
|
140
|
-
},
|
|
141
|
-
];
|
|
142
|
-
/**
|
|
143
|
-
* Array of known bot scripts on the testnet.
|
|
144
|
-
*/
|
|
145
|
-
const TESTNET_KNOWN_BOTS = [
|
|
146
|
-
{
|
|
147
|
-
codeHash: "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
|
|
148
|
-
hashType: "type",
|
|
149
|
-
args: "0xb4380110f7679ac31cefe4925485645d82bf619f",
|
|
150
|
-
},
|
|
151
|
-
];
|
|
152
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,EAAmB,MAAM,aAAa,CAAC;AAEvE;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC;AAE/B;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC;AAEjC;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC;AAE9B;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,SAAS,CACvB,IAUK,EACL,OAAyB,EAAE;IAY3B,0EAA0E;IAC1E,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QAC7C,IAAI,GAAG,IAAI,C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EAAE,MAAM;QAChB,IAAI,EAAE,4CAA4C;KACnD;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,kBAAkB,GAAG;IACzB;QACE,QAAQ,EACN,oEAAoE;QACtE,QAAQ,EAAE,MAAM;QAChB,IAAI,EAAE,4CAA4C;KACnD;CACF,CAAC"}
|
package/dist/esm/index.d.ts
DELETED
package/dist/esm/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC"}
|
package/dist/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC"}
|
package/dist/esm/sdk.d.ts
DELETED
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import { ccc } from "@ckb-ccc/core";
|
|
2
|
-
import { CapacityManager, SmartTransaction, type ValueComponents } from "@ickb/utils";
|
|
3
|
-
import { type LogicManager, type OwnedOwnerManager } from "@ickb/core";
|
|
4
|
-
import { Info, OrderManager, Ratio, type OrderCell, type OrderGroup } from "@ickb/order";
|
|
5
|
-
import { getConfig } from "./constants.js";
|
|
6
|
-
/**
|
|
7
|
-
* SDK for managing iCKB operations.
|
|
8
|
-
*/
|
|
9
|
-
export declare class IckbSdk {
|
|
10
|
-
private readonly ownedOwner;
|
|
11
|
-
private readonly ickbLogic;
|
|
12
|
-
private readonly order;
|
|
13
|
-
private readonly capacity;
|
|
14
|
-
private readonly bots;
|
|
15
|
-
/**
|
|
16
|
-
* Creates an instance of IckbSdk.
|
|
17
|
-
*
|
|
18
|
-
* @param ownedOwner - The manager for owned owner operations.
|
|
19
|
-
* @param ickbLogic - The manager for iCKB logic operations.
|
|
20
|
-
* @param order - The manager for order operations.
|
|
21
|
-
* @param capacity - The capacity manager instance.
|
|
22
|
-
* @param bots - An array of bot lock scripts.
|
|
23
|
-
*/
|
|
24
|
-
constructor(ownedOwner: OwnedOwnerManager, ickbLogic: LogicManager, order: OrderManager, capacity: CapacityManager, bots: ccc.Script[]);
|
|
25
|
-
/**
|
|
26
|
-
* Creates an instance of IckbSdk from script dependencies.
|
|
27
|
-
*
|
|
28
|
-
* @param args - Parameters matching those of getConfig.
|
|
29
|
-
* @returns A new instance of IckbSdk.
|
|
30
|
-
*/
|
|
31
|
-
static from(...args: Parameters<typeof getConfig>): IckbSdk;
|
|
32
|
-
/**
|
|
33
|
-
* Previews the conversion between CKB and UDT.
|
|
34
|
-
*
|
|
35
|
-
* This method calculates a conversion preview using an exchange ratio midpoint.
|
|
36
|
-
* Optionally, a fee may be applied that influences the effective conversion rate,
|
|
37
|
-
* scaling the converted amount by (feeBase - fee) / feeBase.
|
|
38
|
-
*
|
|
39
|
-
* @param isCkb2Udt - Indicates the conversion direction:
|
|
40
|
-
* - true: Convert CKB to UDT.
|
|
41
|
-
* - false: Convert UDT to CKB.
|
|
42
|
-
* @param amounts - An object containing value components (amounts for CKB and UDT).
|
|
43
|
-
* @param system - The current system state containing exchange ratio, fee rate, tip, and order-related information.
|
|
44
|
-
* @param options - Optional parameters for fee and matching:
|
|
45
|
-
* - fee: The fee to apply in integer terms (defaults to 1n for 0.001% fee).
|
|
46
|
-
* - feeBase: The base used for fee scaling (defaults to 100000n).
|
|
47
|
-
*
|
|
48
|
-
* @returns An object with:
|
|
49
|
-
* - convertedAmount: The estimated converted amount as a FixedPoint.
|
|
50
|
-
* - ckbFee: The fee (or gain) in CKB, as a FixedPoint.
|
|
51
|
-
* - info: Additional conversion metadata.
|
|
52
|
-
* - maturity: Optional maturity information (as ccc.Num) if meets criteria.
|
|
53
|
-
*/
|
|
54
|
-
static estimate(isCkb2Udt: boolean, amounts: ValueComponents, system: SystemState, options?: {
|
|
55
|
-
fee?: ccc.Num;
|
|
56
|
-
feeBase?: ccc.Num;
|
|
57
|
-
}): {
|
|
58
|
-
convertedAmount: ccc.FixedPoint;
|
|
59
|
-
ckbFee: ccc.FixedPoint;
|
|
60
|
-
info: Info;
|
|
61
|
-
maturity: ccc.Num | undefined;
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* Estimates the maturity for an order formatted as a Unix timestamp.
|
|
65
|
-
*
|
|
66
|
-
* Depending on the order type and amount remaining, the method calculates an estimated timestamp
|
|
67
|
-
* when the order (or part thereof) might be fulfilled.
|
|
68
|
-
*
|
|
69
|
-
* @param o - Either an OrderCell or an object containing order Info and value components.
|
|
70
|
-
* @param system - The current system state.
|
|
71
|
-
* @returns The Unix timestamp of estimated maturity as a bigint (in milliseconds) or undefined if not applicable.
|
|
72
|
-
*/
|
|
73
|
-
static maturity(o: OrderCell | {
|
|
74
|
-
info: Info;
|
|
75
|
-
amounts: ValueComponents;
|
|
76
|
-
}, system: SystemState): bigint | undefined;
|
|
77
|
-
/**
|
|
78
|
-
* Mints a new order cell and appends it to the transaction.
|
|
79
|
-
*
|
|
80
|
-
* The method performs the following operations:
|
|
81
|
-
* - Creates order cell data using provided amounts and order information.
|
|
82
|
-
* - Adds required cell dependencies and UDT handlers to the transaction.
|
|
83
|
-
* - Appends the order cell to the transaction outputs.
|
|
84
|
-
*
|
|
85
|
-
* @param tx - The smart transaction to which the order cell is added.
|
|
86
|
-
* @param user - The user, represented either as a Signer or a Script.
|
|
87
|
-
* @param info - The order information meta data (usually computed via OrderManager.convert).
|
|
88
|
-
* @param amounts - The value components for the order, including:
|
|
89
|
-
* - ckbValue: The CKB amount (may include an internal surplus).
|
|
90
|
-
* - udtValue: The UDT amount.
|
|
91
|
-
*
|
|
92
|
-
* @returns A Promise resolving to void.
|
|
93
|
-
*/
|
|
94
|
-
request(tx: SmartTransaction, user: ccc.Signer | ccc.Script, info: Info, amounts: ValueComponents): Promise<void>;
|
|
95
|
-
/**
|
|
96
|
-
* Melts (cancels) the specified order groups.
|
|
97
|
-
*
|
|
98
|
-
* For each order group, if the option is set to process fulfilled orders only,
|
|
99
|
-
* it filters accordingly. Then, for every valid group, the master and order cells are added
|
|
100
|
-
* as inputs to the transaction.
|
|
101
|
-
*
|
|
102
|
-
* @param tx - The smart transaction to which the inputs are added.
|
|
103
|
-
* @param groups - An array of order groups to be melted.
|
|
104
|
-
* @param options - Optional parameters:
|
|
105
|
-
* - isFulfilledOnly: If true, only order groups with fully or partially fulfilled orders are processed.
|
|
106
|
-
*
|
|
107
|
-
* @returns void
|
|
108
|
-
*/
|
|
109
|
-
collect(tx: SmartTransaction, groups: OrderGroup[], options?: {
|
|
110
|
-
isFulfilledOnly?: boolean;
|
|
111
|
-
}): void;
|
|
112
|
-
/**
|
|
113
|
-
* Retrieves the L1 state from the blockchain.
|
|
114
|
-
*
|
|
115
|
-
* The method performs the following:
|
|
116
|
-
* - Obtains the current block tip and calculates the exchange ratio.
|
|
117
|
-
* - Fetches available CKB and the maturing CKB based on bot capacities and deposit snapshots.
|
|
118
|
-
* - Filters orders into user-owned and system orders based on the provided locks.
|
|
119
|
-
* - Estimates user-owned orders maturity.
|
|
120
|
-
*
|
|
121
|
-
* @param client - The blockchain client interface.
|
|
122
|
-
* @param locks - An array of lock scripts used to filter user cells.
|
|
123
|
-
* @returns A promise that resolves to an object containing:
|
|
124
|
-
* - system: The system state (fee rate, tip header, exchange ratio, order pool, etc.).
|
|
125
|
-
* - user: The user's orders grouped as an array of OrderGroup.
|
|
126
|
-
*/
|
|
127
|
-
getL1State(client: ccc.Client, locks: ccc.Script[]): Promise<{
|
|
128
|
-
system: SystemState;
|
|
129
|
-
user: {
|
|
130
|
-
orders: OrderGroup[];
|
|
131
|
-
};
|
|
132
|
-
}>;
|
|
133
|
-
/**
|
|
134
|
-
* Retrieves available CKB and maturing CKB values from the blockchain.
|
|
135
|
-
*
|
|
136
|
-
* This method:
|
|
137
|
-
* - Fetches bot withdrawal requests and deposit snapshots.
|
|
138
|
-
* - Aggregates available CKB balances from bot capacities.
|
|
139
|
-
* - Calculates maturing CKB values (with their expected maturity timestamps)
|
|
140
|
-
* based on deposit pool snapshots or via direct deposit cell lookups.
|
|
141
|
-
* - Sorts and cumulatively sums the maturing values for later lookup.
|
|
142
|
-
*
|
|
143
|
-
* @param client - The blockchain client used for fetching data.
|
|
144
|
-
* @param tip - The current block tip header.
|
|
145
|
-
* @returns A Promise that resolves with:
|
|
146
|
-
* - ckbAvailable: The total available CKB (as a FixedPoint).
|
|
147
|
-
* - ckbMaturing: An array of maturing CKB objects containing the cumulative CKB
|
|
148
|
-
* and the associated maturity timestamp.
|
|
149
|
-
*/
|
|
150
|
-
private getCkb;
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Represents the state of the system.
|
|
154
|
-
*/
|
|
155
|
-
export interface SystemState {
|
|
156
|
-
/** The fee rate for transactions. */
|
|
157
|
-
feeRate: ccc.Num;
|
|
158
|
-
/** The tip for the current block header. */
|
|
159
|
-
tip: ccc.ClientBlockHeader;
|
|
160
|
-
/** The exchange ratio between CKB and UDT. */
|
|
161
|
-
exchangeRatio: Ratio;
|
|
162
|
-
/** The order pool containing order cells matching system criteria. */
|
|
163
|
-
orderPool: OrderCell[];
|
|
164
|
-
/** The total available CKB (as FixedPoint). */
|
|
165
|
-
ckbAvailable: ccc.FixedPoint;
|
|
166
|
-
/** Array of CKB maturing entries with cumulative amounts and maturity timestamps. */
|
|
167
|
-
ckbMaturing: CkbCumulative[];
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Represents a cumulative CKB maturing entry.
|
|
171
|
-
*/
|
|
172
|
-
export interface CkbCumulative {
|
|
173
|
-
/** The cumulative CKB value (as FixedPoint) up to this maturity. */
|
|
174
|
-
ckbCumulative: ccc.FixedPoint;
|
|
175
|
-
/** The maturity timestamp (as ccc.Num). */
|
|
176
|
-
maturity: ccc.Num;
|
|
177
|
-
}
|
|
178
|
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