@@ -65,7 +65,7 @@ const requestResponse = async <T>(
65
65
* @param { FluenceClient } client - The Fluence Client instance.
66
66
* @returns { Array<string> } - list of available modules on the connected relay
67
67
*/
68
- export const getModules = async ( client : FluenceClient ) : Promise < string [ ] > => {
68
+ export const getModules = async ( client : FluenceClient , ttl ?: number ) : Promise < string [ ] > => {
69
69
let callbackFn = "getModules"
70
70
const particle = new Particle (
71
71
`
@@ -78,6 +78,7 @@ export const getModules = async (client: FluenceClient): Promise<string[]> => {
78
78
__relay : client . relayPeerId ,
79
79
myPeerId : client . selfPeerId ,
80
80
} ,
81
+ ttl
81
82
) ;
82
83
83
84
return sendParticleAsFetch ( client , particle , callbackFn ) ;
@@ -88,7 +89,7 @@ export const getModules = async (client: FluenceClient): Promise<string[]> => {
88
89
* @param { FluenceClient } client - The Fluence Client instance.
89
90
* @returns { Array<string> } - list of available modules on the connected relay
90
91
*/
91
- export const getInterfaces = async ( client : FluenceClient ) : Promise < string [ ] > => {
92
+ export const getInterfaces = async ( client : FluenceClient , ttl ?: number ) : Promise < string [ ] > => {
92
93
let callbackFn = "getInterfaces"
93
94
const particle = new Particle (
94
95
`
@@ -101,6 +102,7 @@ export const getInterfaces = async (client: FluenceClient): Promise<string[]> =>
101
102
__relay : client . relayPeerId ,
102
103
myPeerId : client . selfPeerId ,
103
104
} ,
105
+ ttl
104
106
) ;
105
107
106
108
return sendParticleAsFetch ( client , particle , callbackFn ) ;
@@ -118,6 +120,7 @@ export const uploadModule = async (
118
120
name : string ,
119
121
moduleBase64 : string ,
120
122
config ?: ModuleConfig ,
123
+ ttl ?: number ,
121
124
) : Promise < void > => {
122
125
if ( ! config ) {
123
126
config = {
@@ -146,7 +149,7 @@ export const uploadModule = async (
146
149
)
147
150
` ;
148
151
149
- return sendParticleAsFetch ( client , new Particle ( script , data ) , 'getModules' , "_callback" ) ;
152
+ return sendParticleAsFetch ( client , new Particle ( script , data , ttl ) , 'getModules' , "_callback" ) ;
150
153
} ;
151
154
152
155
/**
0 commit comments