@splashprotocol/remote-builder 2.0.0-beta.10 → 2.0.0-beta.44
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/.turbo/turbo-build.log +6 -6
- package/dist/index.cjs +22 -0
- package/dist/index.d.cts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +19 -0
- package/package.json +3 -3
- package/src/builders/SplashRemoteBuilder.ts +18 -1
- package/src/core/errors/InsufficientCollateralError.ts +1 -0
- package/src/core/errors/InsufficientFundsErrorForChange.ts +1 -0
- package/src/core/errors/NoCollateralError.ts +1 -0
- package/src/index.ts +3 -0
package/.turbo/turbo-build.log
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
[34mESM[39m Build start
|
11
11
|
[34mCJS[39m Build start
|
12
12
|
|
13
|
-
[90m[[
|
13
|
+
[90m[[90m6:48:02 PM[90m][39m [43m[30m WARN [39m[49m [33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mThe condition "types" here will never be used as it comes after both "import" and "require"[0m [package.json]
|
14
14
|
|
15
15
|
package.json:16:6:
|
16
16
|
[37m 16 │ [32m"types"[37m: "./dist/index.d.ts"
|
@@ -31,7 +31,7 @@
|
|
31
31
|
|
32
32
|
|
33
33
|
|
34
|
-
[90m[[
|
34
|
+
[90m[[90m6:48:02 PM[90m][39m [43m[30m WARN [39m[49m [33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mThe condition "types" here will never be used as it comes after both "import" and "require"[0m [package.json]
|
35
35
|
|
36
36
|
package.json:16:6:
|
37
37
|
[37m 16 │ [32m"types"[37m: "./dist/index.d.ts"
|
@@ -52,11 +52,11 @@
|
|
52
52
|
|
53
53
|
|
54
54
|
[32mESM[39m [1mdist/index.js [22m[32m1.47 KB[39m
|
55
|
-
[32mESM[39m ⚡️ Build success in
|
55
|
+
[32mESM[39m ⚡️ Build success in 77ms
|
56
56
|
[32mCJS[39m [1mdist/index.cjs [22m[32m2.58 KB[39m
|
57
|
-
[32mCJS[39m ⚡️ Build success in
|
57
|
+
[32mCJS[39m ⚡️ Build success in 77ms
|
58
58
|
[34mDTS[39m Build start
|
59
|
-
[32mDTS[39m ⚡️ Build success in
|
59
|
+
[32mDTS[39m ⚡️ Build success in 775ms
|
60
60
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m1.87 KB[39m
|
61
61
|
[32mDTS[39m [1mdist/index.d.cts [22m[32m1.87 KB[39m
|
62
|
-
[2K[1G✨ Done in 1.
|
62
|
+
[2K[1G✨ Done in 1.42s.
|
package/dist/index.cjs
CHANGED
@@ -20,6 +20,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
20
20
|
// src/index.ts
|
21
21
|
var src_exports = {};
|
22
22
|
__export(src_exports, {
|
23
|
+
InsufficientCollateralError: () => InsufficientCollateralError,
|
24
|
+
InsufficientFundsErrorForChange: () => InsufficientFundsErrorForChange,
|
25
|
+
NoCollateralError: () => NoCollateralError,
|
23
26
|
RemoteTransaction: () => RemoteTransaction,
|
24
27
|
SignedRemoteTransaction: () => SignedRemoteTransaction,
|
25
28
|
SplashRemoteBuilder: () => SplashRemoteBuilder
|
@@ -66,6 +69,10 @@ var SplashRemoteBuilder = class _SplashRemoteBuilder {
|
|
66
69
|
trade() {
|
67
70
|
return Promise.resolve(RemoteTransaction.new("", this));
|
68
71
|
}
|
72
|
+
cancelOperation(outputReference) {
|
73
|
+
console.log(outputReference);
|
74
|
+
return Promise.resolve(RemoteTransaction.new("", this));
|
75
|
+
}
|
69
76
|
};
|
70
77
|
|
71
78
|
// src/core/models/SignedRemoteTransaction/SignedRemoteTransaction.ts
|
@@ -86,8 +93,23 @@ var SignedRemoteTransaction = class _SignedRemoteTransaction {
|
|
86
93
|
return this.builder.submit(this);
|
87
94
|
}
|
88
95
|
};
|
96
|
+
|
97
|
+
// src/core/errors/InsufficientCollateralError.ts
|
98
|
+
var InsufficientCollateralError = class extends Error {
|
99
|
+
};
|
100
|
+
|
101
|
+
// src/core/errors/NoCollateralError.ts
|
102
|
+
var NoCollateralError = class extends Error {
|
103
|
+
};
|
104
|
+
|
105
|
+
// src/core/errors/InsufficientFundsErrorForChange.ts
|
106
|
+
var InsufficientFundsErrorForChange = class extends Error {
|
107
|
+
};
|
89
108
|
// Annotate the CommonJS export names for ESM import in node:
|
90
109
|
0 && (module.exports = {
|
110
|
+
InsufficientCollateralError,
|
111
|
+
InsufficientFundsErrorForChange,
|
112
|
+
NoCollateralError,
|
91
113
|
RemoteTransaction,
|
92
114
|
SignedRemoteTransaction,
|
93
115
|
SplashRemoteBuilder
|
package/dist/index.d.cts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Api, Backend, SplashBackend } from '@splashprotocol/api';
|
2
|
-
import { TransactionHash, CborHexString } from '@splashprotocol/core';
|
2
|
+
import { TransactionHash, CborHexString, OutputReference, OutputReferenceHash } from '@splashprotocol/core';
|
3
3
|
|
4
4
|
declare class SignedRemoteTransaction<S, RB extends RemoteBuilder<Api<Backend<{}>>, S>> {
|
5
5
|
private builder;
|
@@ -42,6 +42,16 @@ declare class SplashRemoteBuilder implements RemoteBuilder<Api<SplashBackend>, C
|
|
42
42
|
sign(): Promise<SignedRemoteTransaction<CborHexString, RemoteBuilder<Api<SplashBackend>, CborHexString>>>;
|
43
43
|
submit(): Promise<TransactionHash>;
|
44
44
|
trade(): Promise<RemoteTransaction<CborHexString, RemoteBuilder<Api<SplashBackend>, CborHexString>>>;
|
45
|
+
cancelOperation(outputReference: OutputReference | OutputReferenceHash): Promise<RemoteTransaction<CborHexString, RemoteBuilder<Api<SplashBackend>, CborHexString>>>;
|
45
46
|
}
|
46
47
|
|
47
|
-
|
48
|
+
declare class InsufficientCollateralError extends Error {
|
49
|
+
}
|
50
|
+
|
51
|
+
declare class NoCollateralError extends Error {
|
52
|
+
}
|
53
|
+
|
54
|
+
declare class InsufficientFundsErrorForChange extends Error {
|
55
|
+
}
|
56
|
+
|
57
|
+
export { InsufficientCollateralError, InsufficientFundsErrorForChange, NoCollateralError, type RemoteBuilder, RemoteTransaction, SignedRemoteTransaction, SplashRemoteBuilder };
|
package/dist/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Api, Backend, SplashBackend } from '@splashprotocol/api';
|
2
|
-
import { TransactionHash, CborHexString } from '@splashprotocol/core';
|
2
|
+
import { TransactionHash, CborHexString, OutputReference, OutputReferenceHash } from '@splashprotocol/core';
|
3
3
|
|
4
4
|
declare class SignedRemoteTransaction<S, RB extends RemoteBuilder<Api<Backend<{}>>, S>> {
|
5
5
|
private builder;
|
@@ -42,6 +42,16 @@ declare class SplashRemoteBuilder implements RemoteBuilder<Api<SplashBackend>, C
|
|
42
42
|
sign(): Promise<SignedRemoteTransaction<CborHexString, RemoteBuilder<Api<SplashBackend>, CborHexString>>>;
|
43
43
|
submit(): Promise<TransactionHash>;
|
44
44
|
trade(): Promise<RemoteTransaction<CborHexString, RemoteBuilder<Api<SplashBackend>, CborHexString>>>;
|
45
|
+
cancelOperation(outputReference: OutputReference | OutputReferenceHash): Promise<RemoteTransaction<CborHexString, RemoteBuilder<Api<SplashBackend>, CborHexString>>>;
|
45
46
|
}
|
46
47
|
|
47
|
-
|
48
|
+
declare class InsufficientCollateralError extends Error {
|
49
|
+
}
|
50
|
+
|
51
|
+
declare class NoCollateralError extends Error {
|
52
|
+
}
|
53
|
+
|
54
|
+
declare class InsufficientFundsErrorForChange extends Error {
|
55
|
+
}
|
56
|
+
|
57
|
+
export { InsufficientCollateralError, InsufficientFundsErrorForChange, NoCollateralError, type RemoteBuilder, RemoteTransaction, SignedRemoteTransaction, SplashRemoteBuilder };
|
package/dist/index.js
CHANGED
@@ -38,6 +38,10 @@ var SplashRemoteBuilder = class _SplashRemoteBuilder {
|
|
38
38
|
trade() {
|
39
39
|
return Promise.resolve(RemoteTransaction.new("", this));
|
40
40
|
}
|
41
|
+
cancelOperation(outputReference) {
|
42
|
+
console.log(outputReference);
|
43
|
+
return Promise.resolve(RemoteTransaction.new("", this));
|
44
|
+
}
|
41
45
|
};
|
42
46
|
|
43
47
|
// src/core/models/SignedRemoteTransaction/SignedRemoteTransaction.ts
|
@@ -58,7 +62,22 @@ var SignedRemoteTransaction = class _SignedRemoteTransaction {
|
|
58
62
|
return this.builder.submit(this);
|
59
63
|
}
|
60
64
|
};
|
65
|
+
|
66
|
+
// src/core/errors/InsufficientCollateralError.ts
|
67
|
+
var InsufficientCollateralError = class extends Error {
|
68
|
+
};
|
69
|
+
|
70
|
+
// src/core/errors/NoCollateralError.ts
|
71
|
+
var NoCollateralError = class extends Error {
|
72
|
+
};
|
73
|
+
|
74
|
+
// src/core/errors/InsufficientFundsErrorForChange.ts
|
75
|
+
var InsufficientFundsErrorForChange = class extends Error {
|
76
|
+
};
|
61
77
|
export {
|
78
|
+
InsufficientCollateralError,
|
79
|
+
InsufficientFundsErrorForChange,
|
80
|
+
NoCollateralError,
|
62
81
|
RemoteTransaction,
|
63
82
|
SignedRemoteTransaction,
|
64
83
|
SplashRemoteBuilder
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@splashprotocol/remote-builder",
|
3
|
-
"version": "2.0.0-beta.
|
3
|
+
"version": "2.0.0-beta.44",
|
4
4
|
"type": "module",
|
5
5
|
"description": "Api client of splash protocol",
|
6
6
|
"scripts": {
|
@@ -33,7 +33,7 @@
|
|
33
33
|
]
|
34
34
|
},
|
35
35
|
"peerDependencies": {
|
36
|
-
"@splashprotocol/api": "2.0.0-beta.
|
37
|
-
"@splashprotocol/core": "2.0.0-beta.
|
36
|
+
"@splashprotocol/api": "2.0.0-beta.23",
|
37
|
+
"@splashprotocol/core": "2.0.0-beta.13"
|
38
38
|
}
|
39
39
|
}
|
@@ -1,7 +1,12 @@
|
|
1
1
|
import { RemoteBuilder } from '../core/types/RemoteBuilder.ts';
|
2
2
|
import { Api, SplashBackend } from '@splashprotocol/api';
|
3
3
|
import { RemoteTransaction } from '../core/models/RemoteTransaction/RemoteTransaction.ts';
|
4
|
-
import {
|
4
|
+
import {
|
5
|
+
CborHexString,
|
6
|
+
OutputReference,
|
7
|
+
OutputReferenceHash,
|
8
|
+
TransactionHash,
|
9
|
+
} from '@splashprotocol/core';
|
5
10
|
import { SignedRemoteTransaction } from '../core/models/SignedRemoteTransaction/SignedRemoteTransaction.ts';
|
6
11
|
|
7
12
|
export class SplashRemoteBuilder
|
@@ -38,4 +43,16 @@ export class SplashRemoteBuilder
|
|
38
43
|
> {
|
39
44
|
return Promise.resolve(RemoteTransaction.new('', this));
|
40
45
|
}
|
46
|
+
|
47
|
+
cancelOperation(
|
48
|
+
outputReference: OutputReference | OutputReferenceHash,
|
49
|
+
): Promise<
|
50
|
+
RemoteTransaction<
|
51
|
+
CborHexString,
|
52
|
+
RemoteBuilder<Api<SplashBackend>, CborHexString>
|
53
|
+
>
|
54
|
+
> {
|
55
|
+
console.log(outputReference);
|
56
|
+
return Promise.resolve(RemoteTransaction.new('', this));
|
57
|
+
}
|
41
58
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export class InsufficientCollateralError extends Error {}
|
@@ -0,0 +1 @@
|
|
1
|
+
export class InsufficientFundsErrorForChange extends Error {}
|
@@ -0,0 +1 @@
|
|
1
|
+
export class NoCollateralError extends Error {}
|
package/src/index.ts
CHANGED
@@ -2,3 +2,6 @@ export * from './core/types/RemoteBuilder.ts';
|
|
2
2
|
export * from './builders/SplashRemoteBuilder.ts';
|
3
3
|
export * from './core/models/SignedRemoteTransaction/SignedRemoteTransaction.ts';
|
4
4
|
export * from './core/models/RemoteTransaction/RemoteTransaction.ts';
|
5
|
+
export * from './core/errors/InsufficientCollateralError.ts';
|
6
|
+
export * from './core/errors/NoCollateralError.ts';
|
7
|
+
export * from './core/errors/InsufficientFundsErrorForChange.ts';
|