@frak-labs/nexus-sdk 0.0.10 → 0.0.12
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/chunk-5CFD5FM2.js +86 -0
- package/dist/chunk-BJ3CCN5P.cjs +424 -0
- package/dist/{chunk-72IEHEQX.js → chunk-GUDT2W6I.js} +32 -10
- package/dist/chunk-HXVDI2IY.js +424 -0
- package/dist/{chunk-NIFJZD3M.cjs → chunk-IQQTTKJL.cjs} +30 -8
- package/dist/chunk-S5FVCA2E.cjs +86 -0
- package/dist/client-B6_BIGc3.d.ts +357 -0
- package/dist/client-Oily5ph8.d.cts +357 -0
- package/dist/core/actions/index.cjs +2 -7
- package/dist/core/actions/index.d.cts +16 -35
- package/dist/core/actions/index.d.ts +16 -35
- package/dist/core/actions/index.js +5 -10
- package/dist/core/index.cjs +2 -4
- package/dist/core/index.d.cts +19 -19
- package/dist/core/index.d.ts +19 -19
- package/dist/core/index.js +2 -4
- package/dist/core/interactions/index.cjs +6 -2
- package/dist/core/interactions/index.d.cts +20 -6
- package/dist/core/interactions/index.d.ts +20 -6
- package/dist/core/interactions/index.js +7 -3
- package/dist/{interaction-D_CzyqRE.d.cts → interaction-D3-M3nBh.d.cts} +2 -2
- package/dist/{interaction-D_CzyqRE.d.ts → interaction-D3-M3nBh.d.ts} +2 -2
- package/dist/react/index.cjs +156 -158
- package/dist/react/index.d.cts +44 -51
- package/dist/react/index.d.ts +44 -51
- package/dist/react/index.js +162 -164
- package/dist/sendTransaction-BHqCq_9X.d.ts +30 -0
- package/dist/sendTransaction-BKKYEt8p.d.cts +30 -0
- package/package.json +8 -5
- package/dist/chunk-3T2FNW6E.cjs +0 -100
- package/dist/chunk-BPFJZRJ6.cjs +0 -152
- package/dist/chunk-HOX3RRO6.js +0 -199
- package/dist/chunk-SGLR6RFA.cjs +0 -199
- package/dist/chunk-T54VMWHQ.js +0 -100
- package/dist/chunk-TPC5PMRC.js +0 -152
- package/dist/client--U_6SK0l.d.cts +0 -339
- package/dist/client-6_BJp7Ub.d.ts +0 -339
- package/dist/watchUnlockStatus-CxnibdQx.d.cts +0 -43
- package/dist/watchUnlockStatus-g8wIxpeM.d.ts +0 -43
|
@@ -5,10 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _chunk3T2FNW6Ecjs = require('../../chunk-3T2FNW6E.cjs');
|
|
11
|
-
require('../../chunk-BPFJZRJ6.cjs');
|
|
8
|
+
var _chunkS5FVCA2Ecjs = require('../../chunk-S5FVCA2E.cjs');
|
|
12
9
|
require('../../chunk-ETV4XYOV.cjs');
|
|
13
10
|
|
|
14
11
|
|
|
@@ -17,6 +14,4 @@ require('../../chunk-ETV4XYOV.cjs');
|
|
|
17
14
|
|
|
18
15
|
|
|
19
16
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
exports.decodeStartUnlockReturn = _chunk3T2FNW6Ecjs.decodeStartUnlockReturn; exports.getArticleUnlockOptions = _chunk3T2FNW6Ecjs.getArticleUnlockOptions; exports.getStartArticleUnlockUrl = _chunk3T2FNW6Ecjs.getStartArticleUnlockUrl; exports.sendInteraction = _chunk3T2FNW6Ecjs.sendInteraction; exports.sendTransaction = _chunk3T2FNW6Ecjs.sendTransaction; exports.siweAuthenticate = _chunk3T2FNW6Ecjs.siweAuthenticate; exports.watchUnlockStatus = _chunk3T2FNW6Ecjs.watchUnlockStatus; exports.watchWalletStatus = _chunk3T2FNW6Ecjs.watchWalletStatus;
|
|
17
|
+
exports.displayModal = _chunkS5FVCA2Ecjs.displayModal; exports.openSso = _chunkS5FVCA2Ecjs.openSso; exports.sendInteraction = _chunkS5FVCA2Ecjs.sendInteraction; exports.sendTransaction = _chunkS5FVCA2Ecjs.sendTransaction; exports.siweAuthenticate = _chunkS5FVCA2Ecjs.siweAuthenticate; exports.watchWalletStatus = _chunkS5FVCA2Ecjs.watchWalletStatus;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { N as NexusClient, W as WalletStatusReturnType, d as ModalStepTypes, D as DisplayModalParamsType, e as ModalRpcStepsResultType, O as OpenSsoParamsType } from '../../client-Oily5ph8.cjs';
|
|
2
|
+
import { S as SendInteractionParamsType, a as SendInteractionReturnType } from '../../interaction-D3-M3nBh.cjs';
|
|
3
|
+
export { b as SendTransactionParams, S as SiweAuthenticateModalParams, a as sendTransaction, s as siweAuthenticate } from '../../sendTransaction-BKKYEt8p.cjs';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import 'viem/chains';
|
|
6
6
|
import 'viem/siwe';
|
|
@@ -12,47 +12,28 @@ import 'viem/siwe';
|
|
|
12
12
|
*/
|
|
13
13
|
declare function watchWalletStatus(client: NexusClient, callback: (status: WalletStatusReturnType) => void): Promise<void>;
|
|
14
14
|
|
|
15
|
-
type GetStartUnlockUrlParams = StartArticleUnlockParams;
|
|
16
15
|
/**
|
|
17
|
-
* Function used to
|
|
18
|
-
* @param config
|
|
19
|
-
* @param params
|
|
20
|
-
*/
|
|
21
|
-
declare function getStartArticleUnlockUrl(config: NexusWalletSdkConfig, params: GetStartUnlockUrlParams): Promise<string>;
|
|
22
|
-
/**
|
|
23
|
-
* Function used to decode the response from the start unlock request (return typed passed as query param)
|
|
24
|
-
*/
|
|
25
|
-
declare function decodeStartUnlockReturn({ result, hash, }: {
|
|
26
|
-
result: string;
|
|
27
|
-
hash: string;
|
|
28
|
-
}): Promise<Readonly<StartArticleUnlockReturnType & {
|
|
29
|
-
validationHash: string;
|
|
30
|
-
}>>;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Function used to send a user transaction
|
|
16
|
+
* Function used to send an interaction
|
|
34
17
|
* @param client
|
|
35
|
-
* @param
|
|
36
|
-
* @param
|
|
37
|
-
* @param
|
|
18
|
+
* @param contentId
|
|
19
|
+
* @param request
|
|
20
|
+
* @param validation
|
|
38
21
|
*/
|
|
39
|
-
declare function
|
|
22
|
+
declare function sendInteraction(client: NexusClient, { contentId, interaction, validation }: SendInteractionParamsType): Promise<SendInteractionReturnType>;
|
|
40
23
|
|
|
41
24
|
/**
|
|
42
|
-
* Function used to
|
|
25
|
+
* Function used to display a modal
|
|
43
26
|
* @param client
|
|
44
|
-
* @param
|
|
45
|
-
* @param context
|
|
27
|
+
* @param contentId
|
|
46
28
|
*/
|
|
47
|
-
declare function
|
|
29
|
+
declare function displayModal<T extends ModalStepTypes[] = ModalStepTypes[]>(client: NexusClient, { steps, metadata }: DisplayModalParamsType<T>): Promise<ModalRpcStepsResultType<T>>;
|
|
48
30
|
|
|
49
31
|
/**
|
|
50
|
-
* Function used to
|
|
32
|
+
* Function used to open the SSO
|
|
33
|
+
* todo: We are using the iframe here, since we need to send potentially load of datas, and it couldn't fit inside the query params of an url
|
|
51
34
|
* @param client
|
|
52
|
-
* @param
|
|
53
|
-
* @param request
|
|
54
|
-
* @param validation
|
|
35
|
+
* @param args
|
|
55
36
|
*/
|
|
56
|
-
declare function
|
|
37
|
+
declare function openSso(client: NexusClient, args: OpenSsoParamsType): Promise<void>;
|
|
57
38
|
|
|
58
|
-
export {
|
|
39
|
+
export { displayModal, openSso, sendInteraction, watchWalletStatus };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { N as NexusClient, W as WalletStatusReturnType, d as ModalStepTypes, D as DisplayModalParamsType, e as ModalRpcStepsResultType, O as OpenSsoParamsType } from '../../client-B6_BIGc3.js';
|
|
2
|
+
import { S as SendInteractionParamsType, a as SendInteractionReturnType } from '../../interaction-D3-M3nBh.js';
|
|
3
|
+
export { b as SendTransactionParams, S as SiweAuthenticateModalParams, a as sendTransaction, s as siweAuthenticate } from '../../sendTransaction-BHqCq_9X.js';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import 'viem/chains';
|
|
6
6
|
import 'viem/siwe';
|
|
@@ -12,47 +12,28 @@ import 'viem/siwe';
|
|
|
12
12
|
*/
|
|
13
13
|
declare function watchWalletStatus(client: NexusClient, callback: (status: WalletStatusReturnType) => void): Promise<void>;
|
|
14
14
|
|
|
15
|
-
type GetStartUnlockUrlParams = StartArticleUnlockParams;
|
|
16
15
|
/**
|
|
17
|
-
* Function used to
|
|
18
|
-
* @param config
|
|
19
|
-
* @param params
|
|
20
|
-
*/
|
|
21
|
-
declare function getStartArticleUnlockUrl(config: NexusWalletSdkConfig, params: GetStartUnlockUrlParams): Promise<string>;
|
|
22
|
-
/**
|
|
23
|
-
* Function used to decode the response from the start unlock request (return typed passed as query param)
|
|
24
|
-
*/
|
|
25
|
-
declare function decodeStartUnlockReturn({ result, hash, }: {
|
|
26
|
-
result: string;
|
|
27
|
-
hash: string;
|
|
28
|
-
}): Promise<Readonly<StartArticleUnlockReturnType & {
|
|
29
|
-
validationHash: string;
|
|
30
|
-
}>>;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Function used to send a user transaction
|
|
16
|
+
* Function used to send an interaction
|
|
34
17
|
* @param client
|
|
35
|
-
* @param
|
|
36
|
-
* @param
|
|
37
|
-
* @param
|
|
18
|
+
* @param contentId
|
|
19
|
+
* @param request
|
|
20
|
+
* @param validation
|
|
38
21
|
*/
|
|
39
|
-
declare function
|
|
22
|
+
declare function sendInteraction(client: NexusClient, { contentId, interaction, validation }: SendInteractionParamsType): Promise<SendInteractionReturnType>;
|
|
40
23
|
|
|
41
24
|
/**
|
|
42
|
-
* Function used to
|
|
25
|
+
* Function used to display a modal
|
|
43
26
|
* @param client
|
|
44
|
-
* @param
|
|
45
|
-
* @param context
|
|
27
|
+
* @param contentId
|
|
46
28
|
*/
|
|
47
|
-
declare function
|
|
29
|
+
declare function displayModal<T extends ModalStepTypes[] = ModalStepTypes[]>(client: NexusClient, { steps, metadata }: DisplayModalParamsType<T>): Promise<ModalRpcStepsResultType<T>>;
|
|
48
30
|
|
|
49
31
|
/**
|
|
50
|
-
* Function used to
|
|
32
|
+
* Function used to open the SSO
|
|
33
|
+
* todo: We are using the iframe here, since we need to send potentially load of datas, and it couldn't fit inside the query params of an url
|
|
51
34
|
* @param client
|
|
52
|
-
* @param
|
|
53
|
-
* @param request
|
|
54
|
-
* @param validation
|
|
35
|
+
* @param args
|
|
55
36
|
*/
|
|
56
|
-
declare function
|
|
37
|
+
declare function openSso(client: NexusClient, args: OpenSsoParamsType): Promise<void>;
|
|
57
38
|
|
|
58
|
-
export {
|
|
39
|
+
export { displayModal, openSso, sendInteraction, watchWalletStatus };
|
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
getStartArticleUnlockUrl,
|
|
2
|
+
displayModal,
|
|
3
|
+
openSso,
|
|
5
4
|
sendInteraction,
|
|
6
5
|
sendTransaction,
|
|
7
6
|
siweAuthenticate,
|
|
8
|
-
watchUnlockStatus,
|
|
9
7
|
watchWalletStatus
|
|
10
|
-
} from "../../chunk-
|
|
11
|
-
import "../../chunk-TPC5PMRC.js";
|
|
8
|
+
} from "../../chunk-5CFD5FM2.js";
|
|
12
9
|
import "../../chunk-PKBMQBKP.js";
|
|
13
10
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
getStartArticleUnlockUrl,
|
|
11
|
+
displayModal,
|
|
12
|
+
openSso,
|
|
17
13
|
sendInteraction,
|
|
18
14
|
sendTransaction,
|
|
19
15
|
siweAuthenticate,
|
|
20
|
-
watchUnlockStatus,
|
|
21
16
|
watchWalletStatus
|
|
22
17
|
};
|
package/dist/core/index.cjs
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var _chunkSGLR6RFAcjs = require('../chunk-SGLR6RFA.cjs');
|
|
4
3
|
|
|
5
4
|
|
|
6
5
|
|
|
7
6
|
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
var _chunkBPFJZRJ6cjs = require('../chunk-BPFJZRJ6.cjs');
|
|
8
|
+
var _chunkBJ3CCN5Pcjs = require('../chunk-BJ3CCN5P.cjs');
|
|
11
9
|
require('../chunk-ETV4XYOV.cjs');
|
|
12
10
|
|
|
13
11
|
|
|
@@ -16,4 +14,4 @@ require('../chunk-ETV4XYOV.cjs');
|
|
|
16
14
|
|
|
17
15
|
|
|
18
16
|
|
|
19
|
-
exports.FrakRpcError =
|
|
17
|
+
exports.FrakRpcError = _chunkBJ3CCN5Pcjs.FrakRpcError; exports.RpcErrorCodes = _chunkBJ3CCN5Pcjs.RpcErrorCodes; exports.createIFrameNexusClient = _chunkBJ3CCN5Pcjs.createIFrameNexusClient; exports.createIframe = _chunkBJ3CCN5Pcjs.createIframe; exports.decompressDataAndCheckHash = _chunkBJ3CCN5Pcjs.decompressDataAndCheckHash; exports.hashAndCompressData = _chunkBJ3CCN5Pcjs.hashAndCompressData;
|
package/dist/core/index.d.cts
CHANGED
|
@@ -1,27 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
export { P as PreparedInteraction, S as SendInteractionParamsType, a as SendInteractionReturnType } from '../interaction-
|
|
1
|
+
import { f as NexusWalletSdkConfig, N as NexusClient } from '../client-Oily5ph8.cjs';
|
|
2
|
+
export { C as ClientLifecycleEvent, D as DisplayModalParamsType, E as ExtractedParametersFromRpc, s as ExtractedReturnTypeFromRpc, q as IFrameEvent, r as IFrameLifecycleEvent, p as IFrameRpcEvent, I as IFrameRpcSchema, o as IFrameTransport, L as LoginModalStepType, M as ModalRpcMetadata, i as ModalRpcStepsInput, e as ModalRpcStepsResultType, j as ModalStepMetadata, d as ModalStepTypes, n as OpenInteractionSessionModalStepType, m as OpenInteractionSessionReturnType, O as OpenSsoParamsType, R as RpcResponse, b as SendTransactionModalStepType, c as SendTransactionReturnType, l as SendTransactionTxType, k as SiweAuthenticateModalStepType, a as SiweAuthenticateReturnType, S as SiweAuthenticationParams, h as SsoMetadata, g as SuccessModalStepType, W as WalletStatusReturnType } from '../client-Oily5ph8.cjs';
|
|
3
|
+
export { P as PreparedInteraction, S as SendInteractionParamsType, a as SendInteractionReturnType } from '../interaction-D3-M3nBh.cjs';
|
|
4
4
|
export { F as FrakRpcError, R as RpcErrorCodes } from '../error-C4Zm5nQe.cjs';
|
|
5
5
|
import 'viem';
|
|
6
6
|
import 'viem/chains';
|
|
7
7
|
import 'viem/siwe';
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
* Create a new iframe Nexus client
|
|
11
|
-
*/
|
|
12
|
-
declare function createIFrameNexusClient({ config, iframe, }: {
|
|
13
|
-
config: NexusWalletSdkConfig;
|
|
14
|
-
iframe: HTMLIFrameElement;
|
|
15
|
-
}): NexusClient;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Create the given iframe
|
|
19
|
-
* @param walletBaseUrl
|
|
20
|
-
*/
|
|
21
|
-
declare function createIframe({ walletBaseUrl, }: {
|
|
22
|
-
walletBaseUrl: string;
|
|
23
|
-
}): Promise<HTMLIFrameElement | undefined>;
|
|
24
|
-
|
|
25
9
|
/**
|
|
26
10
|
* The received encoded data from a client
|
|
27
11
|
* -> The encoded should contain a HashProtectedData once decoded
|
|
@@ -41,6 +25,22 @@ type HashProtectedData<DataType> = Readonly<DataType & {
|
|
|
41
25
|
*/
|
|
42
26
|
type KeyProvider<DataType> = (value: DataType) => string[];
|
|
43
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Create a new iframe Nexus client
|
|
30
|
+
*/
|
|
31
|
+
declare function createIFrameNexusClient({ config, iframe, }: {
|
|
32
|
+
config: NexusWalletSdkConfig;
|
|
33
|
+
iframe: HTMLIFrameElement;
|
|
34
|
+
}): NexusClient;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Create the given iframe
|
|
38
|
+
* @param walletBaseUrl
|
|
39
|
+
*/
|
|
40
|
+
declare function createIframe({ walletBaseUrl, }: {
|
|
41
|
+
walletBaseUrl: string;
|
|
42
|
+
}): Promise<HTMLIFrameElement | undefined>;
|
|
43
|
+
|
|
44
44
|
/**
|
|
45
45
|
* Compress the given params, and add hash protection to (rapidly) prevent interception modification
|
|
46
46
|
* @param data The params to encode
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,27 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
export { P as PreparedInteraction, S as SendInteractionParamsType, a as SendInteractionReturnType } from '../interaction-
|
|
1
|
+
import { f as NexusWalletSdkConfig, N as NexusClient } from '../client-B6_BIGc3.js';
|
|
2
|
+
export { C as ClientLifecycleEvent, D as DisplayModalParamsType, E as ExtractedParametersFromRpc, s as ExtractedReturnTypeFromRpc, q as IFrameEvent, r as IFrameLifecycleEvent, p as IFrameRpcEvent, I as IFrameRpcSchema, o as IFrameTransport, L as LoginModalStepType, M as ModalRpcMetadata, i as ModalRpcStepsInput, e as ModalRpcStepsResultType, j as ModalStepMetadata, d as ModalStepTypes, n as OpenInteractionSessionModalStepType, m as OpenInteractionSessionReturnType, O as OpenSsoParamsType, R as RpcResponse, b as SendTransactionModalStepType, c as SendTransactionReturnType, l as SendTransactionTxType, k as SiweAuthenticateModalStepType, a as SiweAuthenticateReturnType, S as SiweAuthenticationParams, h as SsoMetadata, g as SuccessModalStepType, W as WalletStatusReturnType } from '../client-B6_BIGc3.js';
|
|
3
|
+
export { P as PreparedInteraction, S as SendInteractionParamsType, a as SendInteractionReturnType } from '../interaction-D3-M3nBh.js';
|
|
4
4
|
export { F as FrakRpcError, R as RpcErrorCodes } from '../error-C4Zm5nQe.js';
|
|
5
5
|
import 'viem';
|
|
6
6
|
import 'viem/chains';
|
|
7
7
|
import 'viem/siwe';
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
* Create a new iframe Nexus client
|
|
11
|
-
*/
|
|
12
|
-
declare function createIFrameNexusClient({ config, iframe, }: {
|
|
13
|
-
config: NexusWalletSdkConfig;
|
|
14
|
-
iframe: HTMLIFrameElement;
|
|
15
|
-
}): NexusClient;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Create the given iframe
|
|
19
|
-
* @param walletBaseUrl
|
|
20
|
-
*/
|
|
21
|
-
declare function createIframe({ walletBaseUrl, }: {
|
|
22
|
-
walletBaseUrl: string;
|
|
23
|
-
}): Promise<HTMLIFrameElement | undefined>;
|
|
24
|
-
|
|
25
9
|
/**
|
|
26
10
|
* The received encoded data from a client
|
|
27
11
|
* -> The encoded should contain a HashProtectedData once decoded
|
|
@@ -41,6 +25,22 @@ type HashProtectedData<DataType> = Readonly<DataType & {
|
|
|
41
25
|
*/
|
|
42
26
|
type KeyProvider<DataType> = (value: DataType) => string[];
|
|
43
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Create a new iframe Nexus client
|
|
30
|
+
*/
|
|
31
|
+
declare function createIFrameNexusClient({ config, iframe, }: {
|
|
32
|
+
config: NexusWalletSdkConfig;
|
|
33
|
+
iframe: HTMLIFrameElement;
|
|
34
|
+
}): NexusClient;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Create the given iframe
|
|
38
|
+
* @param walletBaseUrl
|
|
39
|
+
*/
|
|
40
|
+
declare function createIframe({ walletBaseUrl, }: {
|
|
41
|
+
walletBaseUrl: string;
|
|
42
|
+
}): Promise<HTMLIFrameElement | undefined>;
|
|
43
|
+
|
|
44
44
|
/**
|
|
45
45
|
* Compress the given params, and add hash protection to (rapidly) prevent interception modification
|
|
46
46
|
* @param data The params to encode
|
package/dist/core/index.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createIFrameNexusClient
|
|
3
|
-
} from "../chunk-HOX3RRO6.js";
|
|
4
1
|
import {
|
|
5
2
|
FrakRpcError,
|
|
6
3
|
RpcErrorCodes,
|
|
4
|
+
createIFrameNexusClient,
|
|
7
5
|
createIframe,
|
|
8
6
|
decompressDataAndCheckHash,
|
|
9
7
|
hashAndCompressData
|
|
10
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-HXVDI2IY.js";
|
|
11
9
|
import "../chunk-PKBMQBKP.js";
|
|
12
10
|
export {
|
|
13
11
|
FrakRpcError,
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkIQQTTKJLcjs = require('../../chunk-IQQTTKJL.cjs');
|
|
5
7
|
require('../../chunk-ETV4XYOV.cjs');
|
|
6
8
|
|
|
7
9
|
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
exports.PressActionsSelector = _chunkIQQTTKJLcjs.PressActionsSelector; exports.PressInteractionEncoder = _chunkIQQTTKJLcjs.PressInteractionEncoder; exports.ReferralActionsSelector = _chunkIQQTTKJLcjs.ReferralActionsSelector; exports.ReferralInteractionEncoder = _chunkIQQTTKJLcjs.ReferralInteractionEncoder;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Hex, Address } from 'viem';
|
|
2
|
-
import { P as PreparedInteraction } from '../../interaction-
|
|
2
|
+
import { P as PreparedInteraction } from '../../interaction-D3-M3nBh.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* All the press interactions actions
|
|
@@ -7,7 +7,6 @@ import { P as PreparedInteraction } from '../../interaction-D_CzyqRE.cjs';
|
|
|
7
7
|
declare const PressActionsSelector: {
|
|
8
8
|
readonly OpenArticle: "0xc0a24ffb";
|
|
9
9
|
readonly ReadArticle: "0xd5bd0fbe";
|
|
10
|
-
readonly Referred: "0x3d1508ad";
|
|
11
10
|
};
|
|
12
11
|
/**
|
|
13
12
|
* Encode an open article interaction
|
|
@@ -23,6 +22,22 @@ declare function openArticle({ articleId }: {
|
|
|
23
22
|
declare function readArticle({ articleId }: {
|
|
24
23
|
articleId: Hex;
|
|
25
24
|
}): PreparedInteraction;
|
|
25
|
+
declare const PressInteractionEncoder: {
|
|
26
|
+
openArticle: typeof openArticle;
|
|
27
|
+
readArticle: typeof readArticle;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* All the referral interactions actions
|
|
32
|
+
*/
|
|
33
|
+
declare const ReferralActionsSelector: {
|
|
34
|
+
readonly CreateLink: "0xb2c0f17c";
|
|
35
|
+
readonly Referred: "0x010cc3b9";
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Encode a create referral link interaction
|
|
39
|
+
*/
|
|
40
|
+
declare function createLink(): PreparedInteraction;
|
|
26
41
|
/**
|
|
27
42
|
* Encode a referred interaction
|
|
28
43
|
* @param referrer
|
|
@@ -30,10 +45,9 @@ declare function readArticle({ articleId }: {
|
|
|
30
45
|
declare function referred({ referrer }: {
|
|
31
46
|
referrer: Address;
|
|
32
47
|
}): PreparedInteraction;
|
|
33
|
-
declare const
|
|
34
|
-
|
|
35
|
-
readArticle: typeof readArticle;
|
|
48
|
+
declare const ReferralInteractionEncoder: {
|
|
49
|
+
createLink: typeof createLink;
|
|
36
50
|
referred: typeof referred;
|
|
37
51
|
};
|
|
38
52
|
|
|
39
|
-
export { PressActionsSelector, PressInteractionEncoder };
|
|
53
|
+
export { PressActionsSelector, PressInteractionEncoder, ReferralActionsSelector, ReferralInteractionEncoder };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Hex, Address } from 'viem';
|
|
2
|
-
import { P as PreparedInteraction } from '../../interaction-
|
|
2
|
+
import { P as PreparedInteraction } from '../../interaction-D3-M3nBh.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* All the press interactions actions
|
|
@@ -7,7 +7,6 @@ import { P as PreparedInteraction } from '../../interaction-D_CzyqRE.js';
|
|
|
7
7
|
declare const PressActionsSelector: {
|
|
8
8
|
readonly OpenArticle: "0xc0a24ffb";
|
|
9
9
|
readonly ReadArticle: "0xd5bd0fbe";
|
|
10
|
-
readonly Referred: "0x3d1508ad";
|
|
11
10
|
};
|
|
12
11
|
/**
|
|
13
12
|
* Encode an open article interaction
|
|
@@ -23,6 +22,22 @@ declare function openArticle({ articleId }: {
|
|
|
23
22
|
declare function readArticle({ articleId }: {
|
|
24
23
|
articleId: Hex;
|
|
25
24
|
}): PreparedInteraction;
|
|
25
|
+
declare const PressInteractionEncoder: {
|
|
26
|
+
openArticle: typeof openArticle;
|
|
27
|
+
readArticle: typeof readArticle;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* All the referral interactions actions
|
|
32
|
+
*/
|
|
33
|
+
declare const ReferralActionsSelector: {
|
|
34
|
+
readonly CreateLink: "0xb2c0f17c";
|
|
35
|
+
readonly Referred: "0x010cc3b9";
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Encode a create referral link interaction
|
|
39
|
+
*/
|
|
40
|
+
declare function createLink(): PreparedInteraction;
|
|
26
41
|
/**
|
|
27
42
|
* Encode a referred interaction
|
|
28
43
|
* @param referrer
|
|
@@ -30,10 +45,9 @@ declare function readArticle({ articleId }: {
|
|
|
30
45
|
declare function referred({ referrer }: {
|
|
31
46
|
referrer: Address;
|
|
32
47
|
}): PreparedInteraction;
|
|
33
|
-
declare const
|
|
34
|
-
|
|
35
|
-
readArticle: typeof readArticle;
|
|
48
|
+
declare const ReferralInteractionEncoder: {
|
|
49
|
+
createLink: typeof createLink;
|
|
36
50
|
referred: typeof referred;
|
|
37
51
|
};
|
|
38
52
|
|
|
39
|
-
export { PressActionsSelector, PressInteractionEncoder };
|
|
53
|
+
export { PressActionsSelector, PressInteractionEncoder, ReferralActionsSelector, ReferralInteractionEncoder };
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PressActionsSelector,
|
|
3
|
-
PressInteractionEncoder
|
|
4
|
-
|
|
3
|
+
PressInteractionEncoder,
|
|
4
|
+
ReferralActionsSelector,
|
|
5
|
+
ReferralInteractionEncoder
|
|
6
|
+
} from "../../chunk-GUDT2W6I.js";
|
|
5
7
|
import "../../chunk-PKBMQBKP.js";
|
|
6
8
|
export {
|
|
7
9
|
PressActionsSelector,
|
|
8
|
-
PressInteractionEncoder
|
|
10
|
+
PressInteractionEncoder,
|
|
11
|
+
ReferralActionsSelector,
|
|
12
|
+
ReferralInteractionEncoder
|
|
9
13
|
};
|
|
@@ -8,7 +8,7 @@ type PreparedInteraction = Readonly<{
|
|
|
8
8
|
* Parameters of an interaction handling request
|
|
9
9
|
*/
|
|
10
10
|
type SendInteractionParamsType = {
|
|
11
|
-
contentId
|
|
11
|
+
contentId?: Hex;
|
|
12
12
|
interaction: PreparedInteraction;
|
|
13
13
|
validation?: Hex;
|
|
14
14
|
};
|
|
@@ -16,7 +16,7 @@ type SendInteractionParamsType = {
|
|
|
16
16
|
* Return type of the send interaction rpc request
|
|
17
17
|
*/
|
|
18
18
|
type SendInteractionReturnType = Readonly<{
|
|
19
|
-
|
|
19
|
+
delegationId: string;
|
|
20
20
|
}>;
|
|
21
21
|
|
|
22
22
|
export type { PreparedInteraction as P, SendInteractionParamsType as S, SendInteractionReturnType as a };
|
|
@@ -8,7 +8,7 @@ type PreparedInteraction = Readonly<{
|
|
|
8
8
|
* Parameters of an interaction handling request
|
|
9
9
|
*/
|
|
10
10
|
type SendInteractionParamsType = {
|
|
11
|
-
contentId
|
|
11
|
+
contentId?: Hex;
|
|
12
12
|
interaction: PreparedInteraction;
|
|
13
13
|
validation?: Hex;
|
|
14
14
|
};
|
|
@@ -16,7 +16,7 @@ type SendInteractionParamsType = {
|
|
|
16
16
|
* Return type of the send interaction rpc request
|
|
17
17
|
*/
|
|
18
18
|
type SendInteractionReturnType = Readonly<{
|
|
19
|
-
|
|
19
|
+
delegationId: string;
|
|
20
20
|
}>;
|
|
21
21
|
|
|
22
22
|
export type { PreparedInteraction as P, SendInteractionParamsType as S, SendInteractionReturnType as a };
|