@ckb-ccc/ssri 0.0.0-canary-20250214032000
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/CHANGELOG.md +50 -0
- package/README.md +54 -0
- package/dist/barrel.d.ts +4 -0
- package/dist/barrel.d.ts.map +1 -0
- package/dist/barrel.js +3 -0
- package/dist/executor.d.ts +57 -0
- package/dist/executor.d.ts.map +1 -0
- package/dist/executor.js +135 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/dist/package.json +3 -0
- package/dist/trait.d.ts +37 -0
- package/dist/trait.d.ts.map +1 -0
- package/dist/trait.js +73 -0
- package/dist/utils.d.ts +3 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +4 -0
- package/dist.commonjs/barrel.d.ts +4 -0
- package/dist.commonjs/barrel.d.ts.map +1 -0
- package/dist.commonjs/barrel.js +19 -0
- package/dist.commonjs/executor.d.ts +57 -0
- package/dist.commonjs/executor.d.ts.map +1 -0
- package/dist.commonjs/executor.js +144 -0
- package/dist.commonjs/index.d.ts +2 -0
- package/dist.commonjs/index.d.ts.map +1 -0
- package/dist.commonjs/index.js +37 -0
- package/dist.commonjs/package.json +3 -0
- package/dist.commonjs/trait.d.ts +37 -0
- package/dist.commonjs/trait.d.ts.map +1 -0
- package/dist.commonjs/trait.js +77 -0
- package/dist.commonjs/utils.d.ts +3 -0
- package/dist.commonjs/utils.d.ts.map +1 -0
- package/dist.commonjs/utils.js +7 -0
- package/jest.config.js +5 -0
- package/package.json +53 -0
- package/src/barrel.ts +3 -0
- package/src/executor.ts +203 -0
- package/src/index.ts +1 -0
- package/src/trait.ts +116 -0
- package/src/utils.ts +5 -0
- package/typedoc.json +6 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# @ckb-ccc/ssri
|
|
2
|
+
|
|
3
|
+
## 0.0.0-canary-20250214032000
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`80e605d`](https://github.com/ckb-devrel/ccc/commit/80e605d0645e87b4e8b5be85c63322f7a3926e38), [`def62a0`](https://github.com/ckb-devrel/ccc/commit/def62a08bf908c6a21fe91c8db2c60848a2ada52), [`d584059`](https://github.com/ckb-devrel/ccc/commit/d584059644e8bcd3a0ea8b0314fdcbb68ee66013), [`1e88ad8`](https://github.com/ckb-devrel/ccc/commit/1e88ad8743428b46b28fe790bd559b96df8a6ce4), [`6f10589`](https://github.com/ckb-devrel/ccc/commit/6f1058977e7aa113808fa74793f1ad5d672626d2), [`d7728d9`](https://github.com/ckb-devrel/ccc/commit/d7728d9edb46c9c5a2bfeb342fc68a8b1c0fec5d)]:
|
|
8
|
+
- @ckb-ccc/core@0.0.0-canary-20250214032000
|
|
9
|
+
|
|
10
|
+
## 0.2.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [[`28c211d`](https://github.com/ckb-devrel/ccc/commit/28c211d839a2d2305eca56e82ba7da144aa3df4a)]:
|
|
15
|
+
- @ckb-ccc/core@1.5.0
|
|
16
|
+
|
|
17
|
+
## 0.2.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- [`e4ea183`](https://github.com/ckb-devrel/ccc/commit/e4ea18359675877511550ac0b28f207550f907e4) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat(ssri): Trait.tryRun to handle expected error
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- [`52ef11b`](https://github.com/ckb-devrel/ccc/commit/52ef11baa7bde8a73467683f5c44a863190aa1f1) Thanks [@Hanssen0](https://github.com/Hanssen0)! - fix(ssri): Trait.version() should throw if byteLength mismatch
|
|
26
|
+
|
|
27
|
+
- Updated dependencies [[`3fdb2c4`](https://github.com/ckb-devrel/ccc/commit/3fdb2c477d0b2766b231e436b8f396f047b02634), [`f429087`](https://github.com/ckb-devrel/ccc/commit/f4290874dfab3fe58844e5169673c5d47bda64e3)]:
|
|
28
|
+
- @ckb-ccc/core@1.4.0
|
|
29
|
+
|
|
30
|
+
## 0.1.1
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- [#134](https://github.com/ckb-devrel/ccc/pull/134) [`ecb9059`](https://github.com/ckb-devrel/ccc/commit/ecb9059e54f8a2afacda45e58a961532bf1107a1) Thanks [@Hanssen0](https://github.com/Hanssen0)! - fix(ssri): ssri.Trait class should not be abstract
|
|
35
|
+
|
|
36
|
+
- [`092c0a9`](https://github.com/ckb-devrel/ccc/commit/092c0a9e30ece8a8767fa59d23707833dce015eb) Thanks [@Hanssen0](https://github.com/Hanssen0)! - refactor(ssri): error types
|
|
37
|
+
|
|
38
|
+
- Updated dependencies [[`a48cccf`](https://github.com/ckb-devrel/ccc/commit/a48cccfae3ce6b3456a5eb863f207e7e5a6e568f)]:
|
|
39
|
+
- @ckb-ccc/core@1.3.1
|
|
40
|
+
|
|
41
|
+
## 0.1.0
|
|
42
|
+
|
|
43
|
+
### Minor Changes
|
|
44
|
+
|
|
45
|
+
- [#130](https://github.com/ckb-devrel/ccc/pull/130) [`8c97c85`](https://github.com/ckb-devrel/ccc/commit/8c97c851db4a2d940c7e59116ca7620cfd0afae1) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat: SSRI & UDT SDK
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- Updated dependencies [[`4dbf4fd`](https://github.com/ckb-devrel/ccc/commit/4dbf4fd8021cf14d05282706a7667ea7d108fb09), [`4c76f9e`](https://github.com/ckb-devrel/ccc/commit/4c76f9e2a93a226fcfc4c32a5378bb531bfff08f), [`c2c4c26`](https://github.com/ckb-devrel/ccc/commit/c2c4c264e04461948e4b913b2f22054e6032ddc8), [`b6a73fa`](https://github.com/ckb-devrel/ccc/commit/b6a73fa9628ebdff51cb8f246309654cd53e36f2), [`8c97c85`](https://github.com/ckb-devrel/ccc/commit/8c97c851db4a2d940c7e59116ca7620cfd0afae1)]:
|
|
50
|
+
- @ckb-ccc/core@1.3.0
|
package/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://app.ckbccc.com/">
|
|
3
|
+
<img alt="Logo" src="https://raw.githubusercontent.com/ckb-devrel/ccc/master/assets/logoAndText.svg" style="height: 8rem; max-width: 90%; padding: 0.5rem 0;" />
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<h1 align="center" style="font-size: 48px;">
|
|
8
|
+
CCC's Support for SSRI
|
|
9
|
+
</h1>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://www.npmjs.com/package/@ckb-ccc/ssri"><img
|
|
13
|
+
alt="NPM Version" src="https://img.shields.io/npm/v/%40ckb-ccc%2Fssri"
|
|
14
|
+
/></a>
|
|
15
|
+
<img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/ckb-devrel/ccc" />
|
|
16
|
+
<img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/ckb-devrel/ccc/master" />
|
|
17
|
+
<img alt="GitHub branch check runs" src="https://img.shields.io/github/check-runs/ckb-devrel/ccc/master" />
|
|
18
|
+
<a href="https://live.ckbccc.com/"><img
|
|
19
|
+
alt="Playground" src="https://img.shields.io/website?url=https%3A%2F%2Flive.ckbccc.com%2F&label=Playground"
|
|
20
|
+
/></a>
|
|
21
|
+
<a href="https://app.ckbccc.com/"><img
|
|
22
|
+
alt="App" src="https://img.shields.io/website?url=https%3A%2F%2Fapp.ckbccc.com%2F&label=App"
|
|
23
|
+
/></a>
|
|
24
|
+
<a href="https://docs.ckbccc.com/"><img
|
|
25
|
+
alt="Docs" src="https://img.shields.io/website?url=https%3A%2F%2Fdocs.ckbccc.com%2F&label=Docs"
|
|
26
|
+
/></a>
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
<p align="center">
|
|
30
|
+
CCC - CKBers' Codebase is a one-stop solution for your CKB JS/TS ecosystem development.
|
|
31
|
+
<br />
|
|
32
|
+
Empower yourself with CCC to discover the unlimited potential of CKB.
|
|
33
|
+
<br />
|
|
34
|
+
Interoperate with wallets from different chain ecosystems.
|
|
35
|
+
<br />
|
|
36
|
+
Fully enabling CKB's Turing completeness and cryptographic freedom power.
|
|
37
|
+
</p>
|
|
38
|
+
|
|
39
|
+
### Script-Sourced Rich Information
|
|
40
|
+
|
|
41
|
+
Read more about SSRI on [[EN/CN] Script-Sourced Rich Information - 来源于 Script 的富信息](https://talk.nervos.org/t/en-cn-script-sourced-rich-information-script/8256).
|
|
42
|
+
|
|
43
|
+
NOTE: This is the base package for interaction with SSRI-Compliant scripts.
|
|
44
|
+
|
|
45
|
+
If you are looking for UDT support, please refer directly to [@ckb-ccc/udt](https://www.npmjs.com/package/@ckb-ccc/udt) which supports both SSRI-compliant UDT and falling back to xUDT.
|
|
46
|
+
|
|
47
|
+
### Related Projects
|
|
48
|
+
|
|
49
|
+
- [`ssri-server`](https://github.com/ckb-devrel/ssri-server): Server for calling SSRI methods.
|
|
50
|
+
- [`ckb_ssri_sdk`](https://github.com/ckb-devrel/ckb_ssri_sdk): A toolkit to help developers build SSRI-Compliant scripts on CKB with production level example script `pausable-udt` for reference.
|
|
51
|
+
|
|
52
|
+
<h3 align="center">
|
|
53
|
+
Read more about CCC on <a href="https://docs.ckbccc.com">our website</a> or <a href="https://github.com/ckb-devrel/ccc">GitHub Repo</a>.
|
|
54
|
+
</h3>
|
package/dist/barrel.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"barrel.d.ts","sourceRoot":"","sources":["../src/barrel.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
|
package/dist/barrel.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ccc } from "@ckb-ccc/core";
|
|
2
|
+
export type ContextTransaction = {
|
|
3
|
+
script?: ccc.ScriptLike | null;
|
|
4
|
+
cell?: Omit<ccc.CellLike, "outPoint"> | null;
|
|
5
|
+
tx: ccc.TransactionLike;
|
|
6
|
+
};
|
|
7
|
+
export type ContextCell = {
|
|
8
|
+
script?: ccc.ScriptLike | null;
|
|
9
|
+
cell: Omit<ccc.CellLike, "outPoint">;
|
|
10
|
+
tx?: undefined | null;
|
|
11
|
+
};
|
|
12
|
+
export type ContextScript = {
|
|
13
|
+
script: ccc.ScriptLike;
|
|
14
|
+
cell?: undefined | null;
|
|
15
|
+
tx?: undefined | null;
|
|
16
|
+
};
|
|
17
|
+
export declare class ExecutorErrorUnknown extends Error {
|
|
18
|
+
constructor(msg?: string);
|
|
19
|
+
}
|
|
20
|
+
export declare class ExecutorErrorExecutionFailed extends Error {
|
|
21
|
+
constructor(msg?: string);
|
|
22
|
+
}
|
|
23
|
+
export declare class ExecutorErrorDecode extends Error {
|
|
24
|
+
constructor(msg?: string);
|
|
25
|
+
}
|
|
26
|
+
export type ContextCode = undefined | {
|
|
27
|
+
script?: undefined | null;
|
|
28
|
+
cell?: undefined | null;
|
|
29
|
+
tx?: undefined | null;
|
|
30
|
+
};
|
|
31
|
+
export declare class ExecutorResponse<T> {
|
|
32
|
+
readonly res: T;
|
|
33
|
+
readonly cellDeps: ccc.OutPoint[];
|
|
34
|
+
constructor(res: T, cellDeps: ccc.OutPoint[]);
|
|
35
|
+
static new<T>(res: T, cellDeps?: ccc.OutPointLike[] | null): ExecutorResponse<T>;
|
|
36
|
+
map<U>(fn: (res: T) => U): ExecutorResponse<U>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Represents an SSRI executor.
|
|
40
|
+
*/
|
|
41
|
+
export declare abstract class Executor {
|
|
42
|
+
abstract runScript(codeOutPoint: ccc.OutPointLike, method: string, args: ccc.HexLike[], context?: ContextCode | ContextScript | ContextCell | ContextTransaction): Promise<ExecutorResponse<ccc.Hex>>;
|
|
43
|
+
runScriptTry(codeOutPoint: ccc.OutPointLike, method: string, args: ccc.HexLike[], context?: ContextCode | ContextScript | ContextCell | ContextTransaction): Promise<ExecutorResponse<ccc.Hex> | undefined>;
|
|
44
|
+
}
|
|
45
|
+
export declare class ExecutorJsonRpc extends Executor {
|
|
46
|
+
readonly requestor: ccc.RequestorJsonRpc;
|
|
47
|
+
/**
|
|
48
|
+
* Creates an instance of SSRI executor through Json RPC.
|
|
49
|
+
* @param {string} [url] - The external server URL.
|
|
50
|
+
*/
|
|
51
|
+
constructor(url: string, config?: ccc.RequestorJsonRpcConfig & {
|
|
52
|
+
requestor?: ccc.RequestorJsonRpc;
|
|
53
|
+
});
|
|
54
|
+
get url(): string;
|
|
55
|
+
runScript(codeOutPoint: ccc.OutPointLike, method: string, args: ccc.HexLike[], context?: ContextCode | ContextScript | ContextCell | ContextTransaction): Promise<ExecutorResponse<ccc.Hex>>;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=executor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../src/executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAIpC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,CAAC,EAAE,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC;IAC/B,IAAI,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAC,GAAG,IAAI,CAAC;IAC7C,EAAE,EAAE,GAAG,CAAC,eAAe,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,CAAC,EAAE,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC;IAC/B,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;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B,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,GAAG,WAAW,GAAG,kBAAkB,GACvE,OAAO,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAE/B,YAAY,CAChB,YAAY,EAAE,GAAG,CAAC,YAAY,EAC9B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,GAAG,CAAC,OAAO,EAAE,EACnB,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,GAAG,WAAW,GAAG,kBAAkB,GACvE,OAAO,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;CAUlD;AAED,qBAAa,eAAgB,SAAQ,QAAQ;IAC3C,SAAgB,SAAS,EAAE,GAAG,CAAC,gBAAgB,CAAC;IAEhD;;;OAGG;gBAED,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,GAAG,CAAC,sBAAsB,GAAG;QAAE,SAAS,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAA;KAAE;IA8B5E,IAAI,GAAG,WAEN;IAYK,SAAS,CACb,YAAY,EAAE,GAAG,CAAC,YAAY,EAC9B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,GAAG,CAAC,OAAO,EAAE,EACnB,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,GAAG,WAAW,GAAG,kBAAkB,GACvE,OAAO,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CAiDtC"}
|
package/dist/executor.js
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { ccc } from "@ckb-ccc/core";
|
|
2
|
+
import { cccA } from "@ckb-ccc/core/advanced";
|
|
3
|
+
import { getMethodPath } from "./utils.js";
|
|
4
|
+
export class ExecutorErrorUnknown extends Error {
|
|
5
|
+
constructor(msg) {
|
|
6
|
+
super(msg);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export class ExecutorErrorExecutionFailed extends Error {
|
|
10
|
+
constructor(msg) {
|
|
11
|
+
super(msg);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export class ExecutorErrorDecode extends Error {
|
|
15
|
+
constructor(msg) {
|
|
16
|
+
super(msg);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export class ExecutorResponse {
|
|
20
|
+
constructor(res, cellDeps) {
|
|
21
|
+
this.res = res;
|
|
22
|
+
this.cellDeps = cellDeps;
|
|
23
|
+
}
|
|
24
|
+
static new(res, cellDeps) {
|
|
25
|
+
return new ExecutorResponse(res, cellDeps?.map(ccc.OutPoint.from) ?? []);
|
|
26
|
+
}
|
|
27
|
+
map(fn) {
|
|
28
|
+
try {
|
|
29
|
+
return new ExecutorResponse(fn(this.res), this.cellDeps);
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
throw new ExecutorErrorDecode(JSON.stringify(err));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Represents an SSRI executor.
|
|
38
|
+
*/
|
|
39
|
+
export class Executor {
|
|
40
|
+
async runScriptTry(codeOutPoint, method, args, context) {
|
|
41
|
+
try {
|
|
42
|
+
return await this.runScript(codeOutPoint, method, args, context);
|
|
43
|
+
}
|
|
44
|
+
catch (err) {
|
|
45
|
+
if (err instanceof ExecutorErrorExecutionFailed) {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
throw err;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export class ExecutorJsonRpc extends Executor {
|
|
53
|
+
/**
|
|
54
|
+
* Creates an instance of SSRI executor through Json RPC.
|
|
55
|
+
* @param {string} [url] - The external server URL.
|
|
56
|
+
*/
|
|
57
|
+
constructor(url, config) {
|
|
58
|
+
super();
|
|
59
|
+
this.requestor =
|
|
60
|
+
config?.requestor ??
|
|
61
|
+
new ccc.RequestorJsonRpc(url, config, (errAny) => {
|
|
62
|
+
if (typeof errAny !== "object" ||
|
|
63
|
+
errAny === null ||
|
|
64
|
+
!("code" in errAny) ||
|
|
65
|
+
typeof errAny.code !== "number") {
|
|
66
|
+
throw new ExecutorErrorUnknown(JSON.stringify(errAny));
|
|
67
|
+
}
|
|
68
|
+
if (errAny.code === 1003 || errAny.code === 1004) {
|
|
69
|
+
if ("message" in errAny && typeof errAny.message === "string") {
|
|
70
|
+
throw new ExecutorErrorExecutionFailed(errAny.message);
|
|
71
|
+
}
|
|
72
|
+
throw new ExecutorErrorExecutionFailed();
|
|
73
|
+
}
|
|
74
|
+
if ("message" in errAny && typeof errAny.message === "string") {
|
|
75
|
+
throw new ExecutorErrorUnknown(errAny.message);
|
|
76
|
+
}
|
|
77
|
+
throw new ExecutorErrorUnknown();
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
get url() {
|
|
81
|
+
return this.requestor.url;
|
|
82
|
+
}
|
|
83
|
+
/* Calls a method on the SSRI executor through SSRI Server.
|
|
84
|
+
* @param codeOutPoint - The code OutPoint.
|
|
85
|
+
* @param method - The SSRI method.
|
|
86
|
+
* @param args - The arguments for the method.
|
|
87
|
+
* @param context - The SSRI context for the method.
|
|
88
|
+
* @param context.script - The script level parameters.
|
|
89
|
+
* @param context.cell - The cell level parameters. Take precedence over script.
|
|
90
|
+
* @param context.transaction - The transaction level parameters. Take precedence over cell.
|
|
91
|
+
* @returns The result of the call.
|
|
92
|
+
*/
|
|
93
|
+
async runScript(codeOutPoint, method, args, context) {
|
|
94
|
+
const code = ccc.OutPoint.from(codeOutPoint);
|
|
95
|
+
const [rpcMethod, rpcContext] = (() => {
|
|
96
|
+
if (context?.tx) {
|
|
97
|
+
const tx = ccc.Transaction.from(context.tx);
|
|
98
|
+
return [
|
|
99
|
+
"run_script_level_transaction",
|
|
100
|
+
[
|
|
101
|
+
{
|
|
102
|
+
inner: cccA.JsonRpcTransformers.transactionFrom(tx),
|
|
103
|
+
hash: tx.hash(),
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
];
|
|
107
|
+
}
|
|
108
|
+
if (context?.cell) {
|
|
109
|
+
return [
|
|
110
|
+
"run_script_level_cell",
|
|
111
|
+
[
|
|
112
|
+
{
|
|
113
|
+
cell_output: cccA.JsonRpcTransformers.cellOutputFrom(ccc.CellOutput.from(context.cell.cellOutput)),
|
|
114
|
+
hex_data: ccc.hexFrom(context.cell.outputData),
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
];
|
|
118
|
+
}
|
|
119
|
+
if (context?.script) {
|
|
120
|
+
return [
|
|
121
|
+
"run_script_level_script",
|
|
122
|
+
[cccA.JsonRpcTransformers.scriptFrom(context.script)],
|
|
123
|
+
];
|
|
124
|
+
}
|
|
125
|
+
return ["run_script_level_code", []];
|
|
126
|
+
})();
|
|
127
|
+
const { content, cell_deps } = (await this.requestor.request(rpcMethod, [
|
|
128
|
+
code.txHash,
|
|
129
|
+
Number(code.index),
|
|
130
|
+
[getMethodPath(method), ...args.map(ccc.hexFrom)],
|
|
131
|
+
...rpcContext,
|
|
132
|
+
]));
|
|
133
|
+
return ExecutorResponse.new(content, cell_deps.map(cccA.JsonRpcTransformers.outPointTo));
|
|
134
|
+
}
|
|
135
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as ssri from "./barrel.js";
|
package/dist/trait.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ccc } from "@ckb-ccc/core";
|
|
2
|
+
import { Executor, ExecutorResponse } from "./executor.js";
|
|
3
|
+
/**
|
|
4
|
+
* Class representing an SSRI trait. Should be used as the base of all SSRI traits.
|
|
5
|
+
*/
|
|
6
|
+
export declare class Trait {
|
|
7
|
+
readonly code: ccc.OutPoint;
|
|
8
|
+
readonly executor?: Executor;
|
|
9
|
+
/**
|
|
10
|
+
* Creates an instance of SSRI trait.
|
|
11
|
+
* @param code - The cell dependency.
|
|
12
|
+
* @param executor - The SSRI executor instance.
|
|
13
|
+
*/
|
|
14
|
+
constructor(code: ccc.OutPointLike, executor?: Executor | null);
|
|
15
|
+
static tryRun<T>(call: Promise<ExecutorResponse<T>>): Promise<ExecutorResponse<T | undefined>>;
|
|
16
|
+
tryRun<T>(call: Promise<ExecutorResponse<T>>): Promise<ExecutorResponse<T | undefined>>;
|
|
17
|
+
assertExecutor(): Executor;
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves a list of methods.
|
|
20
|
+
* @param offset - The offset for the methods.
|
|
21
|
+
* @param limit - The limit for the methods.
|
|
22
|
+
* @returns {Promise<Bytes[]>} A promise that resolves to a list of methods.
|
|
23
|
+
*/
|
|
24
|
+
getMethods(offset?: ccc.NumLike, limit?: ccc.NumLike): Promise<ExecutorResponse<ccc.Hex[]>>;
|
|
25
|
+
/**
|
|
26
|
+
* Checks if the specified methods exist.
|
|
27
|
+
* @param methodNames - The methods to check.
|
|
28
|
+
* @returns A promise that resolves to an array of booleans indicating if methods exist.
|
|
29
|
+
*/
|
|
30
|
+
hasMethods(methodNames: string[], extraMethodPaths?: ccc.HexLike[]): Promise<ExecutorResponse<boolean[]>>;
|
|
31
|
+
/**
|
|
32
|
+
* Retrieves the version of the trait.
|
|
33
|
+
* @returns A promise that resolves to the version number.
|
|
34
|
+
*/
|
|
35
|
+
version(): Promise<ExecutorResponse<ccc.Num>>;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=trait.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trait.d.ts","sourceRoot":"","sources":["../src/trait.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EACL,QAAQ,EAGR,gBAAgB,EACjB,MAAM,eAAe,CAAC;AAGvB;;GAEG;AACH,qBAAa,KAAK;IAChB,SAAgB,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC;IACnC,SAAgB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpC;;;;OAIG;gBACS,IAAI,EAAE,GAAG,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI;WAKjD,MAAM,CAAC,CAAC,EACnB,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GACjC,OAAO,CAAC,gBAAgB,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IAcrC,MAAM,CAAC,CAAC,EACZ,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GACjC,OAAO,CAAC,gBAAgB,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IAI3C,cAAc;IAQd;;;;;OAKG;IACG,UAAU,CACd,MAAM,GAAE,GAAG,CAAC,OAAW,EACvB,KAAK,GAAE,GAAG,CAAC,OAAW,GACrB,OAAO,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC;IAUvC;;;;OAIG;IACG,UAAU,CACd,WAAW,EAAE,MAAM,EAAE,EACrB,gBAAgB,CAAC,EAAE,GAAG,CAAC,OAAO,EAAE,GAC/B,OAAO,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAC;IAcvC;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CAcpD"}
|
package/dist/trait.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { ccc } from "@ckb-ccc/core";
|
|
2
|
+
import { ExecutorErrorDecode, ExecutorErrorExecutionFailed, ExecutorResponse, } from "./executor.js";
|
|
3
|
+
import { getMethodPath } from "./utils.js";
|
|
4
|
+
/**
|
|
5
|
+
* Class representing an SSRI trait. Should be used as the base of all SSRI traits.
|
|
6
|
+
*/
|
|
7
|
+
export class Trait {
|
|
8
|
+
/**
|
|
9
|
+
* Creates an instance of SSRI trait.
|
|
10
|
+
* @param code - The cell dependency.
|
|
11
|
+
* @param executor - The SSRI executor instance.
|
|
12
|
+
*/
|
|
13
|
+
constructor(code, executor) {
|
|
14
|
+
this.code = ccc.OutPoint.from(code);
|
|
15
|
+
this.executor = executor ?? undefined;
|
|
16
|
+
}
|
|
17
|
+
static async tryRun(call) {
|
|
18
|
+
try {
|
|
19
|
+
return await call;
|
|
20
|
+
}
|
|
21
|
+
catch (e) {
|
|
22
|
+
if (e instanceof ExecutorErrorExecutionFailed ||
|
|
23
|
+
e instanceof ExecutorErrorDecode) {
|
|
24
|
+
return ExecutorResponse.new(undefined);
|
|
25
|
+
}
|
|
26
|
+
throw e;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
async tryRun(call) {
|
|
30
|
+
return Trait.tryRun(call);
|
|
31
|
+
}
|
|
32
|
+
assertExecutor() {
|
|
33
|
+
if (!this.executor) {
|
|
34
|
+
throw new Error("SSRI executor is not set");
|
|
35
|
+
}
|
|
36
|
+
return this.executor;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Retrieves a list of methods.
|
|
40
|
+
* @param offset - The offset for the methods.
|
|
41
|
+
* @param limit - The limit for the methods.
|
|
42
|
+
* @returns {Promise<Bytes[]>} A promise that resolves to a list of methods.
|
|
43
|
+
*/
|
|
44
|
+
async getMethods(offset = 0, limit = 0) {
|
|
45
|
+
const res = await this.assertExecutor().runScript(this.code, "SSRI.get_methods", [ccc.numToBytes(offset ?? 0, 8), ccc.numToBytes(limit ?? 0, 8)]);
|
|
46
|
+
return res.map((res) => ccc.mol.Byte8Vec.decode(res));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Checks if the specified methods exist.
|
|
50
|
+
* @param methodNames - The methods to check.
|
|
51
|
+
* @returns A promise that resolves to an array of booleans indicating if methods exist.
|
|
52
|
+
*/
|
|
53
|
+
async hasMethods(methodNames, extraMethodPaths) {
|
|
54
|
+
const methodPaths = ccc.mol.Byte8Vec.encode(methodNames
|
|
55
|
+
.map(getMethodPath)
|
|
56
|
+
.concat(extraMethodPaths?.map(ccc.hexFrom) ?? []));
|
|
57
|
+
const res = await this.assertExecutor().runScript(this.code, "SSRI.has_methods", [methodPaths]);
|
|
58
|
+
return res.map((res) => ccc.mol.BoolVec.decode(res));
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Retrieves the version of the trait.
|
|
62
|
+
* @returns A promise that resolves to the version number.
|
|
63
|
+
*/
|
|
64
|
+
async version() {
|
|
65
|
+
const res = await this.assertExecutor().runScript(this.code, "SSRI.version", []);
|
|
66
|
+
return res.map((res) => {
|
|
67
|
+
if (res.length !== 4) {
|
|
68
|
+
throw new Error("Invalid U8");
|
|
69
|
+
}
|
|
70
|
+
return ccc.numFrom(res);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpC,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,CAAC,GAAG,CAErD"}
|
package/dist/utils.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"barrel.d.ts","sourceRoot":"","sources":["../src/barrel.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./executor.js"), exports);
|
|
18
|
+
__exportStar(require("./trait.js"), exports);
|
|
19
|
+
__exportStar(require("./utils.js"), exports);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ccc } from "@ckb-ccc/core";
|
|
2
|
+
export type ContextTransaction = {
|
|
3
|
+
script?: ccc.ScriptLike | null;
|
|
4
|
+
cell?: Omit<ccc.CellLike, "outPoint"> | null;
|
|
5
|
+
tx: ccc.TransactionLike;
|
|
6
|
+
};
|
|
7
|
+
export type ContextCell = {
|
|
8
|
+
script?: ccc.ScriptLike | null;
|
|
9
|
+
cell: Omit<ccc.CellLike, "outPoint">;
|
|
10
|
+
tx?: undefined | null;
|
|
11
|
+
};
|
|
12
|
+
export type ContextScript = {
|
|
13
|
+
script: ccc.ScriptLike;
|
|
14
|
+
cell?: undefined | null;
|
|
15
|
+
tx?: undefined | null;
|
|
16
|
+
};
|
|
17
|
+
export declare class ExecutorErrorUnknown extends Error {
|
|
18
|
+
constructor(msg?: string);
|
|
19
|
+
}
|
|
20
|
+
export declare class ExecutorErrorExecutionFailed extends Error {
|
|
21
|
+
constructor(msg?: string);
|
|
22
|
+
}
|
|
23
|
+
export declare class ExecutorErrorDecode extends Error {
|
|
24
|
+
constructor(msg?: string);
|
|
25
|
+
}
|
|
26
|
+
export type ContextCode = undefined | {
|
|
27
|
+
script?: undefined | null;
|
|
28
|
+
cell?: undefined | null;
|
|
29
|
+
tx?: undefined | null;
|
|
30
|
+
};
|
|
31
|
+
export declare class ExecutorResponse<T> {
|
|
32
|
+
readonly res: T;
|
|
33
|
+
readonly cellDeps: ccc.OutPoint[];
|
|
34
|
+
constructor(res: T, cellDeps: ccc.OutPoint[]);
|
|
35
|
+
static new<T>(res: T, cellDeps?: ccc.OutPointLike[] | null): ExecutorResponse<T>;
|
|
36
|
+
map<U>(fn: (res: T) => U): ExecutorResponse<U>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Represents an SSRI executor.
|
|
40
|
+
*/
|
|
41
|
+
export declare abstract class Executor {
|
|
42
|
+
abstract runScript(codeOutPoint: ccc.OutPointLike, method: string, args: ccc.HexLike[], context?: ContextCode | ContextScript | ContextCell | ContextTransaction): Promise<ExecutorResponse<ccc.Hex>>;
|
|
43
|
+
runScriptTry(codeOutPoint: ccc.OutPointLike, method: string, args: ccc.HexLike[], context?: ContextCode | ContextScript | ContextCell | ContextTransaction): Promise<ExecutorResponse<ccc.Hex> | undefined>;
|
|
44
|
+
}
|
|
45
|
+
export declare class ExecutorJsonRpc extends Executor {
|
|
46
|
+
readonly requestor: ccc.RequestorJsonRpc;
|
|
47
|
+
/**
|
|
48
|
+
* Creates an instance of SSRI executor through Json RPC.
|
|
49
|
+
* @param {string} [url] - The external server URL.
|
|
50
|
+
*/
|
|
51
|
+
constructor(url: string, config?: ccc.RequestorJsonRpcConfig & {
|
|
52
|
+
requestor?: ccc.RequestorJsonRpc;
|
|
53
|
+
});
|
|
54
|
+
get url(): string;
|
|
55
|
+
runScript(codeOutPoint: ccc.OutPointLike, method: string, args: ccc.HexLike[], context?: ContextCode | ContextScript | ContextCell | ContextTransaction): Promise<ExecutorResponse<ccc.Hex>>;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=executor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
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