@alien_org/contract 1.3.0-alpha → 1.3.1
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/README.md +0 -1
- package/dist/index.cjs +2 -7
- package/dist/index.d.cts +20 -48
- package/dist/index.d.mts +20 -48
- package/dist/index.mjs +1 -6
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -95,7 +95,6 @@ getReleaseVersion('app:ready'); // '0.0.9'
|
|
|
95
95
|
|
|
96
96
|
| Event | Since | Description |
|
|
97
97
|
|-------|-------|-------------|
|
|
98
|
-
| `miniapp:close` | 0.0.14 | Host is closing miniapp |
|
|
99
98
|
| `host.back.button:clicked` | 1.0.0 | Back button was clicked |
|
|
100
99
|
| `payment:response` | 0.1.1 | Payment result |
|
|
101
100
|
| `clipboard:response` | 0.1.1 | Clipboard read result |
|
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
//#region src/launch-params.ts
|
|
3
3
|
/**
|
|
4
4
|
* Supported platforms for miniapps.
|
|
@@ -26,7 +26,6 @@ const DISPLAY_MODES = [
|
|
|
26
26
|
"fullscreen",
|
|
27
27
|
"immersive"
|
|
28
28
|
];
|
|
29
|
-
|
|
30
29
|
//#endregion
|
|
31
30
|
//#region src/methods/versions/releases.ts
|
|
32
31
|
const releases = {
|
|
@@ -52,7 +51,6 @@ const releases = {
|
|
|
52
51
|
"host.back.button:toggle"
|
|
53
52
|
]
|
|
54
53
|
};
|
|
55
|
-
|
|
56
54
|
//#endregion
|
|
57
55
|
//#region src/methods/versions/get-release-version.ts
|
|
58
56
|
function getReleaseVersion(method, payload) {
|
|
@@ -65,7 +63,6 @@ function getReleaseVersion(method, payload) {
|
|
|
65
63
|
});
|
|
66
64
|
}) || null;
|
|
67
65
|
}
|
|
68
|
-
|
|
69
66
|
//#endregion
|
|
70
67
|
//#region src/methods/versions/index.ts
|
|
71
68
|
/**
|
|
@@ -112,7 +109,6 @@ function getMethodMinVersion(method) {
|
|
|
112
109
|
if (methods.some((m) => typeof m === "string" ? m === method : m.method === method)) return version;
|
|
113
110
|
}
|
|
114
111
|
}
|
|
115
|
-
|
|
116
112
|
//#endregion
|
|
117
113
|
//#region src/utils.ts
|
|
118
114
|
/**
|
|
@@ -135,7 +131,6 @@ const WALLET_ERROR = {
|
|
|
135
131
|
INTERNAL_ERROR: -32603,
|
|
136
132
|
REQUEST_EXPIRED: 8e3
|
|
137
133
|
};
|
|
138
|
-
|
|
139
134
|
//#endregion
|
|
140
135
|
exports.DISPLAY_MODES = DISPLAY_MODES;
|
|
141
136
|
exports.PLATFORMS = PLATFORMS;
|
|
@@ -143,4 +138,4 @@ exports.WALLET_ERROR = WALLET_ERROR;
|
|
|
143
138
|
exports.getMethodMinVersion = getMethodMinVersion;
|
|
144
139
|
exports.getReleaseVersion = getReleaseVersion;
|
|
145
140
|
exports.isMethodSupported = isMethodSupported;
|
|
146
|
-
exports.releases = releases;
|
|
141
|
+
exports.releases = releases;
|
package/dist/index.d.cts
CHANGED
|
@@ -135,13 +135,9 @@ type WalletSolanaErrorCode = 5000 | -32602 | -32603 | 8000;
|
|
|
135
135
|
* @since 1.0.0
|
|
136
136
|
*/
|
|
137
137
|
declare const WALLET_ERROR: {
|
|
138
|
-
/** User rejected the request (cancelled approval screen). */
|
|
139
|
-
readonly
|
|
140
|
-
|
|
141
|
-
readonly INVALID_PARAMS: -32602;
|
|
142
|
-
/** Internal error — transaction broadcast failed, unexpected error. */
|
|
143
|
-
readonly INTERNAL_ERROR: -32603;
|
|
144
|
-
/** Request expired before the user responded. */
|
|
138
|
+
/** User rejected the request (cancelled approval screen). */readonly USER_REJECTED: 5000; /** Invalid params — transaction deserialization failed, malformed input. */
|
|
139
|
+
readonly INVALID_PARAMS: -32602; /** Internal error — transaction broadcast failed, unexpected error. */
|
|
140
|
+
readonly INTERNAL_ERROR: -32603; /** Request expired before the user responded. */
|
|
145
141
|
readonly REQUEST_EXPIRED: 8000;
|
|
146
142
|
};
|
|
147
143
|
/**
|
|
@@ -174,12 +170,6 @@ interface CreateEventPayload<Payload = never> {
|
|
|
174
170
|
* @schema
|
|
175
171
|
*/
|
|
176
172
|
interface Events {
|
|
177
|
-
/**
|
|
178
|
-
* Miniapp close event, fired by the host app just before the miniapp is closed.
|
|
179
|
-
* @since 0.0.14
|
|
180
|
-
* @schema
|
|
181
|
-
*/
|
|
182
|
-
'miniapp:close': CreateEventPayload<Empty>;
|
|
183
173
|
/**
|
|
184
174
|
* Host app's back button clicked event.
|
|
185
175
|
* @since 1.0.0
|
|
@@ -257,11 +247,8 @@ interface Events {
|
|
|
257
247
|
* @schema
|
|
258
248
|
*/
|
|
259
249
|
'wallet.solana:connect.response': CreateEventPayload<WithReqId<{
|
|
260
|
-
/** Base58-encoded public key of the connected wallet */
|
|
261
|
-
|
|
262
|
-
/** Numeric error code (WalletConnect-compatible). See {@link WalletSolanaErrorCode}. */
|
|
263
|
-
errorCode?: WalletSolanaErrorCode;
|
|
264
|
-
/** Human-readable error description */
|
|
250
|
+
/** Base58-encoded public key of the connected wallet */publicKey?: string; /** Numeric error code (WalletConnect-compatible). See {@link WalletSolanaErrorCode}. */
|
|
251
|
+
errorCode?: WalletSolanaErrorCode; /** Human-readable error description */
|
|
265
252
|
errorMessage?: string;
|
|
266
253
|
}>>;
|
|
267
254
|
/**
|
|
@@ -270,11 +257,8 @@ interface Events {
|
|
|
270
257
|
* @schema
|
|
271
258
|
*/
|
|
272
259
|
'wallet.solana:sign.transaction.response': CreateEventPayload<WithReqId<{
|
|
273
|
-
/** Base64-encoded signed transaction */
|
|
274
|
-
|
|
275
|
-
/** Numeric error code (WalletConnect-compatible). See {@link WalletSolanaErrorCode}. */
|
|
276
|
-
errorCode?: WalletSolanaErrorCode;
|
|
277
|
-
/** Human-readable error description */
|
|
260
|
+
/** Base64-encoded signed transaction */signedTransaction?: string; /** Numeric error code (WalletConnect-compatible). See {@link WalletSolanaErrorCode}. */
|
|
261
|
+
errorCode?: WalletSolanaErrorCode; /** Human-readable error description */
|
|
278
262
|
errorMessage?: string;
|
|
279
263
|
}>>;
|
|
280
264
|
/**
|
|
@@ -283,13 +267,9 @@ interface Events {
|
|
|
283
267
|
* @schema
|
|
284
268
|
*/
|
|
285
269
|
'wallet.solana:sign.message.response': CreateEventPayload<WithReqId<{
|
|
286
|
-
/** Base58-encoded Ed25519 signature (64 bytes) */
|
|
287
|
-
|
|
288
|
-
/**
|
|
289
|
-
publicKey?: string;
|
|
290
|
-
/** Numeric error code (WalletConnect-compatible). See {@link WalletSolanaErrorCode}. */
|
|
291
|
-
errorCode?: WalletSolanaErrorCode;
|
|
292
|
-
/** Human-readable error description */
|
|
270
|
+
/** Base58-encoded Ed25519 signature (64 bytes) */signature?: string; /** Base58-encoded public key that signed the message */
|
|
271
|
+
publicKey?: string; /** Numeric error code (WalletConnect-compatible). See {@link WalletSolanaErrorCode}. */
|
|
272
|
+
errorCode?: WalletSolanaErrorCode; /** Human-readable error description */
|
|
293
273
|
errorMessage?: string;
|
|
294
274
|
}>>;
|
|
295
275
|
/**
|
|
@@ -298,11 +278,8 @@ interface Events {
|
|
|
298
278
|
* @schema
|
|
299
279
|
*/
|
|
300
280
|
'wallet.solana:sign.send.response': CreateEventPayload<WithReqId<{
|
|
301
|
-
/** Base58-encoded transaction signature */
|
|
302
|
-
|
|
303
|
-
/** Numeric error code (WalletConnect-compatible). See {@link WalletSolanaErrorCode}. */
|
|
304
|
-
errorCode?: WalletSolanaErrorCode;
|
|
305
|
-
/** Human-readable error description */
|
|
281
|
+
/** Base58-encoded transaction signature */signature?: string; /** Numeric error code (WalletConnect-compatible). See {@link WalletSolanaErrorCode}. */
|
|
282
|
+
errorCode?: WalletSolanaErrorCode; /** Human-readable error description */
|
|
306
283
|
errorMessage?: string;
|
|
307
284
|
}>>;
|
|
308
285
|
}
|
|
@@ -640,8 +617,7 @@ interface Methods {
|
|
|
640
617
|
* @schema
|
|
641
618
|
*/
|
|
642
619
|
'wallet.solana:sign.transaction': CreateMethodPayload<WithReqId<{
|
|
643
|
-
/** Base64-encoded serialized transaction (legacy or versioned) */
|
|
644
|
-
transaction: string;
|
|
620
|
+
/** Base64-encoded serialized transaction (legacy or versioned) */transaction: string;
|
|
645
621
|
}>>;
|
|
646
622
|
/**
|
|
647
623
|
* Request Solana message signing.
|
|
@@ -650,8 +626,7 @@ interface Methods {
|
|
|
650
626
|
* @schema
|
|
651
627
|
*/
|
|
652
628
|
'wallet.solana:sign.message': CreateMethodPayload<WithReqId<{
|
|
653
|
-
/** Base58-encoded message bytes */
|
|
654
|
-
message: string;
|
|
629
|
+
/** Base58-encoded message bytes */message: string;
|
|
655
630
|
}>>;
|
|
656
631
|
/**
|
|
657
632
|
* Request Solana transaction signing and sending.
|
|
@@ -661,8 +636,7 @@ interface Methods {
|
|
|
661
636
|
* @schema
|
|
662
637
|
*/
|
|
663
638
|
'wallet.solana:sign.send': CreateMethodPayload<WithReqId<{
|
|
664
|
-
/** Base64-encoded serialized transaction (legacy or versioned) */
|
|
665
|
-
transaction: string;
|
|
639
|
+
/** Base64-encoded serialized transaction (legacy or versioned) */transaction: string;
|
|
666
640
|
/**
|
|
667
641
|
* Target Solana cluster for broadcasting.
|
|
668
642
|
* In bridge mode the host app can infer this from miniapp config,
|
|
@@ -671,12 +645,10 @@ interface Methods {
|
|
|
671
645
|
* @since 1.0.0
|
|
672
646
|
* @schema
|
|
673
647
|
*/
|
|
674
|
-
chain?: SolanaChain;
|
|
675
|
-
/** Optional send options */
|
|
648
|
+
chain?: SolanaChain; /** Optional send options */
|
|
676
649
|
options?: {
|
|
677
650
|
skipPreflight?: boolean;
|
|
678
|
-
preflightCommitment?: SolanaCommitment;
|
|
679
|
-
/** Desired commitment level for transaction confirmation. */
|
|
651
|
+
preflightCommitment?: SolanaCommitment; /** Desired commitment level for transaction confirmation. */
|
|
680
652
|
commitment?: SolanaCommitment;
|
|
681
653
|
/**
|
|
682
654
|
* The minimum slot that the request can be evaluated at.
|
|
@@ -690,7 +662,7 @@ interface Methods {
|
|
|
690
662
|
//#endregion
|
|
691
663
|
//#region src/methods/types/method-types.d.ts
|
|
692
664
|
type MethodName = keyof Methods;
|
|
693
|
-
type MethodPayload<M
|
|
665
|
+
type MethodPayload<M extends MethodName> = Methods[M]['payload'];
|
|
694
666
|
/**
|
|
695
667
|
* Method names which have versioned payload.
|
|
696
668
|
*/
|
|
@@ -698,7 +670,7 @@ type MethodNameWithVersionedPayload = { [M in MethodName]: If<IsNever<Methods[M]
|
|
|
698
670
|
/**
|
|
699
671
|
* Method payload which appear only in the specific version.
|
|
700
672
|
*/
|
|
701
|
-
type MethodVersionedPayload<M
|
|
673
|
+
type MethodVersionedPayload<M extends MethodNameWithVersionedPayload> = Methods[M]['versionedPayload'];
|
|
702
674
|
//#endregion
|
|
703
675
|
//#region src/methods/versions/get-release-version.d.ts
|
|
704
676
|
/**
|
|
@@ -707,7 +679,7 @@ type MethodVersionedPayload<M$1 extends MethodNameWithVersionedPayload> = Method
|
|
|
707
679
|
* @param method - method name
|
|
708
680
|
* @param param - method parameter
|
|
709
681
|
*/
|
|
710
|
-
declare function getReleaseVersion<M
|
|
682
|
+
declare function getReleaseVersion<M extends MethodNameWithVersionedPayload>(method: M, payload: MethodVersionedPayload<M>): Version | null;
|
|
711
683
|
declare function getReleaseVersion(method: MethodName): Version | null;
|
|
712
684
|
//#endregion
|
|
713
685
|
//#region src/methods/versions/releases.d.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -135,13 +135,9 @@ type WalletSolanaErrorCode = 5000 | -32602 | -32603 | 8000;
|
|
|
135
135
|
* @since 1.0.0
|
|
136
136
|
*/
|
|
137
137
|
declare const WALLET_ERROR: {
|
|
138
|
-
/** User rejected the request (cancelled approval screen). */
|
|
139
|
-
readonly
|
|
140
|
-
|
|
141
|
-
readonly INVALID_PARAMS: -32602;
|
|
142
|
-
/** Internal error — transaction broadcast failed, unexpected error. */
|
|
143
|
-
readonly INTERNAL_ERROR: -32603;
|
|
144
|
-
/** Request expired before the user responded. */
|
|
138
|
+
/** User rejected the request (cancelled approval screen). */readonly USER_REJECTED: 5000; /** Invalid params — transaction deserialization failed, malformed input. */
|
|
139
|
+
readonly INVALID_PARAMS: -32602; /** Internal error — transaction broadcast failed, unexpected error. */
|
|
140
|
+
readonly INTERNAL_ERROR: -32603; /** Request expired before the user responded. */
|
|
145
141
|
readonly REQUEST_EXPIRED: 8000;
|
|
146
142
|
};
|
|
147
143
|
/**
|
|
@@ -174,12 +170,6 @@ interface CreateEventPayload<Payload = never> {
|
|
|
174
170
|
* @schema
|
|
175
171
|
*/
|
|
176
172
|
interface Events {
|
|
177
|
-
/**
|
|
178
|
-
* Miniapp close event, fired by the host app just before the miniapp is closed.
|
|
179
|
-
* @since 0.0.14
|
|
180
|
-
* @schema
|
|
181
|
-
*/
|
|
182
|
-
'miniapp:close': CreateEventPayload<Empty>;
|
|
183
173
|
/**
|
|
184
174
|
* Host app's back button clicked event.
|
|
185
175
|
* @since 1.0.0
|
|
@@ -257,11 +247,8 @@ interface Events {
|
|
|
257
247
|
* @schema
|
|
258
248
|
*/
|
|
259
249
|
'wallet.solana:connect.response': CreateEventPayload<WithReqId<{
|
|
260
|
-
/** Base58-encoded public key of the connected wallet */
|
|
261
|
-
|
|
262
|
-
/** Numeric error code (WalletConnect-compatible). See {@link WalletSolanaErrorCode}. */
|
|
263
|
-
errorCode?: WalletSolanaErrorCode;
|
|
264
|
-
/** Human-readable error description */
|
|
250
|
+
/** Base58-encoded public key of the connected wallet */publicKey?: string; /** Numeric error code (WalletConnect-compatible). See {@link WalletSolanaErrorCode}. */
|
|
251
|
+
errorCode?: WalletSolanaErrorCode; /** Human-readable error description */
|
|
265
252
|
errorMessage?: string;
|
|
266
253
|
}>>;
|
|
267
254
|
/**
|
|
@@ -270,11 +257,8 @@ interface Events {
|
|
|
270
257
|
* @schema
|
|
271
258
|
*/
|
|
272
259
|
'wallet.solana:sign.transaction.response': CreateEventPayload<WithReqId<{
|
|
273
|
-
/** Base64-encoded signed transaction */
|
|
274
|
-
|
|
275
|
-
/** Numeric error code (WalletConnect-compatible). See {@link WalletSolanaErrorCode}. */
|
|
276
|
-
errorCode?: WalletSolanaErrorCode;
|
|
277
|
-
/** Human-readable error description */
|
|
260
|
+
/** Base64-encoded signed transaction */signedTransaction?: string; /** Numeric error code (WalletConnect-compatible). See {@link WalletSolanaErrorCode}. */
|
|
261
|
+
errorCode?: WalletSolanaErrorCode; /** Human-readable error description */
|
|
278
262
|
errorMessage?: string;
|
|
279
263
|
}>>;
|
|
280
264
|
/**
|
|
@@ -283,13 +267,9 @@ interface Events {
|
|
|
283
267
|
* @schema
|
|
284
268
|
*/
|
|
285
269
|
'wallet.solana:sign.message.response': CreateEventPayload<WithReqId<{
|
|
286
|
-
/** Base58-encoded Ed25519 signature (64 bytes) */
|
|
287
|
-
|
|
288
|
-
/**
|
|
289
|
-
publicKey?: string;
|
|
290
|
-
/** Numeric error code (WalletConnect-compatible). See {@link WalletSolanaErrorCode}. */
|
|
291
|
-
errorCode?: WalletSolanaErrorCode;
|
|
292
|
-
/** Human-readable error description */
|
|
270
|
+
/** Base58-encoded Ed25519 signature (64 bytes) */signature?: string; /** Base58-encoded public key that signed the message */
|
|
271
|
+
publicKey?: string; /** Numeric error code (WalletConnect-compatible). See {@link WalletSolanaErrorCode}. */
|
|
272
|
+
errorCode?: WalletSolanaErrorCode; /** Human-readable error description */
|
|
293
273
|
errorMessage?: string;
|
|
294
274
|
}>>;
|
|
295
275
|
/**
|
|
@@ -298,11 +278,8 @@ interface Events {
|
|
|
298
278
|
* @schema
|
|
299
279
|
*/
|
|
300
280
|
'wallet.solana:sign.send.response': CreateEventPayload<WithReqId<{
|
|
301
|
-
/** Base58-encoded transaction signature */
|
|
302
|
-
|
|
303
|
-
/** Numeric error code (WalletConnect-compatible). See {@link WalletSolanaErrorCode}. */
|
|
304
|
-
errorCode?: WalletSolanaErrorCode;
|
|
305
|
-
/** Human-readable error description */
|
|
281
|
+
/** Base58-encoded transaction signature */signature?: string; /** Numeric error code (WalletConnect-compatible). See {@link WalletSolanaErrorCode}. */
|
|
282
|
+
errorCode?: WalletSolanaErrorCode; /** Human-readable error description */
|
|
306
283
|
errorMessage?: string;
|
|
307
284
|
}>>;
|
|
308
285
|
}
|
|
@@ -640,8 +617,7 @@ interface Methods {
|
|
|
640
617
|
* @schema
|
|
641
618
|
*/
|
|
642
619
|
'wallet.solana:sign.transaction': CreateMethodPayload<WithReqId<{
|
|
643
|
-
/** Base64-encoded serialized transaction (legacy or versioned) */
|
|
644
|
-
transaction: string;
|
|
620
|
+
/** Base64-encoded serialized transaction (legacy or versioned) */transaction: string;
|
|
645
621
|
}>>;
|
|
646
622
|
/**
|
|
647
623
|
* Request Solana message signing.
|
|
@@ -650,8 +626,7 @@ interface Methods {
|
|
|
650
626
|
* @schema
|
|
651
627
|
*/
|
|
652
628
|
'wallet.solana:sign.message': CreateMethodPayload<WithReqId<{
|
|
653
|
-
/** Base58-encoded message bytes */
|
|
654
|
-
message: string;
|
|
629
|
+
/** Base58-encoded message bytes */message: string;
|
|
655
630
|
}>>;
|
|
656
631
|
/**
|
|
657
632
|
* Request Solana transaction signing and sending.
|
|
@@ -661,8 +636,7 @@ interface Methods {
|
|
|
661
636
|
* @schema
|
|
662
637
|
*/
|
|
663
638
|
'wallet.solana:sign.send': CreateMethodPayload<WithReqId<{
|
|
664
|
-
/** Base64-encoded serialized transaction (legacy or versioned) */
|
|
665
|
-
transaction: string;
|
|
639
|
+
/** Base64-encoded serialized transaction (legacy or versioned) */transaction: string;
|
|
666
640
|
/**
|
|
667
641
|
* Target Solana cluster for broadcasting.
|
|
668
642
|
* In bridge mode the host app can infer this from miniapp config,
|
|
@@ -671,12 +645,10 @@ interface Methods {
|
|
|
671
645
|
* @since 1.0.0
|
|
672
646
|
* @schema
|
|
673
647
|
*/
|
|
674
|
-
chain?: SolanaChain;
|
|
675
|
-
/** Optional send options */
|
|
648
|
+
chain?: SolanaChain; /** Optional send options */
|
|
676
649
|
options?: {
|
|
677
650
|
skipPreflight?: boolean;
|
|
678
|
-
preflightCommitment?: SolanaCommitment;
|
|
679
|
-
/** Desired commitment level for transaction confirmation. */
|
|
651
|
+
preflightCommitment?: SolanaCommitment; /** Desired commitment level for transaction confirmation. */
|
|
680
652
|
commitment?: SolanaCommitment;
|
|
681
653
|
/**
|
|
682
654
|
* The minimum slot that the request can be evaluated at.
|
|
@@ -690,7 +662,7 @@ interface Methods {
|
|
|
690
662
|
//#endregion
|
|
691
663
|
//#region src/methods/types/method-types.d.ts
|
|
692
664
|
type MethodName = keyof Methods;
|
|
693
|
-
type MethodPayload<M
|
|
665
|
+
type MethodPayload<M extends MethodName> = Methods[M]['payload'];
|
|
694
666
|
/**
|
|
695
667
|
* Method names which have versioned payload.
|
|
696
668
|
*/
|
|
@@ -698,7 +670,7 @@ type MethodNameWithVersionedPayload = { [M in MethodName]: If<IsNever<Methods[M]
|
|
|
698
670
|
/**
|
|
699
671
|
* Method payload which appear only in the specific version.
|
|
700
672
|
*/
|
|
701
|
-
type MethodVersionedPayload<M
|
|
673
|
+
type MethodVersionedPayload<M extends MethodNameWithVersionedPayload> = Methods[M]['versionedPayload'];
|
|
702
674
|
//#endregion
|
|
703
675
|
//#region src/methods/versions/get-release-version.d.ts
|
|
704
676
|
/**
|
|
@@ -707,7 +679,7 @@ type MethodVersionedPayload<M$1 extends MethodNameWithVersionedPayload> = Method
|
|
|
707
679
|
* @param method - method name
|
|
708
680
|
* @param param - method parameter
|
|
709
681
|
*/
|
|
710
|
-
declare function getReleaseVersion<M
|
|
682
|
+
declare function getReleaseVersion<M extends MethodNameWithVersionedPayload>(method: M, payload: MethodVersionedPayload<M>): Version | null;
|
|
711
683
|
declare function getReleaseVersion(method: MethodName): Version | null;
|
|
712
684
|
//#endregion
|
|
713
685
|
//#region src/methods/versions/releases.d.ts
|
package/dist/index.mjs
CHANGED
|
@@ -25,7 +25,6 @@ const DISPLAY_MODES = [
|
|
|
25
25
|
"fullscreen",
|
|
26
26
|
"immersive"
|
|
27
27
|
];
|
|
28
|
-
|
|
29
28
|
//#endregion
|
|
30
29
|
//#region src/methods/versions/releases.ts
|
|
31
30
|
const releases = {
|
|
@@ -51,7 +50,6 @@ const releases = {
|
|
|
51
50
|
"host.back.button:toggle"
|
|
52
51
|
]
|
|
53
52
|
};
|
|
54
|
-
|
|
55
53
|
//#endregion
|
|
56
54
|
//#region src/methods/versions/get-release-version.ts
|
|
57
55
|
function getReleaseVersion(method, payload) {
|
|
@@ -64,7 +62,6 @@ function getReleaseVersion(method, payload) {
|
|
|
64
62
|
});
|
|
65
63
|
}) || null;
|
|
66
64
|
}
|
|
67
|
-
|
|
68
65
|
//#endregion
|
|
69
66
|
//#region src/methods/versions/index.ts
|
|
70
67
|
/**
|
|
@@ -111,7 +108,6 @@ function getMethodMinVersion(method) {
|
|
|
111
108
|
if (methods.some((m) => typeof m === "string" ? m === method : m.method === method)) return version;
|
|
112
109
|
}
|
|
113
110
|
}
|
|
114
|
-
|
|
115
111
|
//#endregion
|
|
116
112
|
//#region src/utils.ts
|
|
117
113
|
/**
|
|
@@ -134,6 +130,5 @@ const WALLET_ERROR = {
|
|
|
134
130
|
INTERNAL_ERROR: -32603,
|
|
135
131
|
REQUEST_EXPIRED: 8e3
|
|
136
132
|
};
|
|
137
|
-
|
|
138
133
|
//#endregion
|
|
139
|
-
export { DISPLAY_MODES, PLATFORMS, WALLET_ERROR, getMethodMinVersion, getReleaseVersion, isMethodSupported, releases };
|
|
134
|
+
export { DISPLAY_MODES, PLATFORMS, WALLET_ERROR, getMethodMinVersion, getReleaseVersion, isMethodSupported, releases };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alien_org/contract",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"generate-schemas": "bun run scripts/generate-schemas.ts"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@types/bun": "^1.3.
|
|
40
|
-
"@types/node": "^25.
|
|
41
|
-
"tsdown": "^0.
|
|
39
|
+
"@types/bun": "^1.3.10",
|
|
40
|
+
"@types/node": "^25.3.5",
|
|
41
|
+
"tsdown": "^0.21.0",
|
|
42
42
|
"typescript-json-schema": "^0.67.1"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|