@peeramid-labs/sdk 2.0.0 → 2.0.2
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/docs/classes/ApiError.md +44 -0
- package/docs/classes/InstanceBase.md +341 -0
- package/docs/classes/InstancePlayer.md +568 -0
- package/docs/classes/MAODistributorClient.md +307 -0
- package/docs/classes/Multipass.md +276 -0
- package/docs/classes/MultipassBase.md +217 -0
- package/docs/docs/.nojekyll +1 -0
- package/docs/docs/classes/ApiError.md +44 -0
- package/docs/docs/classes/InstanceBase.md +341 -0
- package/docs/docs/classes/InstancePlayer.md +568 -0
- package/docs/docs/classes/MAODistributorClient.md +307 -0
- package/docs/docs/classes/Multipass.md +276 -0
- package/docs/docs/classes/MultipassBase.md +217 -0
- package/docs/docs/enums/SearchCriteria.md +29 -0
- package/docs/docs/enums/gameStatusEnum.md +71 -0
- package/docs/docs/index.md +367 -0
- package/docs/docs/interfaces/ApiErrorOptions.md +30 -0
- package/docs/docs/interfaces/MAOInstanceContracts.md +53 -0
- package/docs/docs/interfaces/MAOInstances.md +53 -0
- package/docs/docs/interfaces/RegisterMessage.md +53 -0
- package/docs/docs/interfaces/SignerIdentity.md +35 -0
- package/docs/enums/SearchCriteria.md +29 -0
- package/docs/enums/gameStatusEnum.md +71 -0
- package/docs/index.md +367 -0
- package/docs/interfaces/ApiErrorOptions.md +30 -0
- package/docs/interfaces/MAOInstanceContracts.md +53 -0
- package/docs/interfaces/MAOInstances.md +53 -0
- package/docs/interfaces/RegisterMessage.md +53 -0
- package/docs/interfaces/SignerIdentity.md +35 -0
- package/package.json +3 -3
- package/docs/assets/highlight.css +0 -64
- package/docs/assets/icons.js +0 -15
- package/docs/assets/icons.svg +0 -1
- package/docs/assets/main.js +0 -59
- package/docs/assets/navigation.js +0 -1
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1412
- package/docs/index.html +0 -62
- package/docs/modules.html +0 -1
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
# Class: MAODistributorClient
|
|
2
|
+
|
|
3
|
+
Client for managing MAO Distribution operations
|
|
4
|
+
Handles creation, management and interaction with MAO instances
|
|
5
|
+
|
|
6
|
+
## Hierarchy
|
|
7
|
+
|
|
8
|
+
- `DistributorClient`
|
|
9
|
+
|
|
10
|
+
↳ **`MAODistributorClient`**
|
|
11
|
+
|
|
12
|
+
## Table of contents
|
|
13
|
+
|
|
14
|
+
### Constructors
|
|
15
|
+
|
|
16
|
+
- [constructor](MAODistributorClient.md#constructor)
|
|
17
|
+
|
|
18
|
+
### Properties
|
|
19
|
+
|
|
20
|
+
- [publicClient](MAODistributorClient.md#publicclient)
|
|
21
|
+
- [address](MAODistributorClient.md#address)
|
|
22
|
+
- [walletClient](MAODistributorClient.md#walletclient)
|
|
23
|
+
- [parseInstantiated](MAODistributorClient.md#parseinstantiated)
|
|
24
|
+
|
|
25
|
+
### Methods
|
|
26
|
+
|
|
27
|
+
- [getDistributions](MAODistributorClient.md#getdistributions)
|
|
28
|
+
- [getInstances](MAODistributorClient.md#getinstances)
|
|
29
|
+
- [getInstance](MAODistributorClient.md#getinstance)
|
|
30
|
+
- [getNamedDistributionInstances](MAODistributorClient.md#getnameddistributioninstances)
|
|
31
|
+
- [getNamedDistributionInstance](MAODistributorClient.md#getnameddistributioninstance)
|
|
32
|
+
- [addressesToContracts](MAODistributorClient.md#addressestocontracts)
|
|
33
|
+
- [getMAOInstances](MAODistributorClient.md#getmaoinstances)
|
|
34
|
+
- [parseToContracts](MAODistributorClient.md#parsetocontracts)
|
|
35
|
+
- [getMAOInstance](MAODistributorClient.md#getmaoinstance)
|
|
36
|
+
- [instantiate](MAODistributorClient.md#instantiate)
|
|
37
|
+
|
|
38
|
+
## Constructors
|
|
39
|
+
|
|
40
|
+
### constructor
|
|
41
|
+
|
|
42
|
+
• **new MAODistributorClient**(`chainId`, `client`): [`MAODistributorClient`](MAODistributorClient.md)
|
|
43
|
+
|
|
44
|
+
Creates a new MAODistributorClient instance
|
|
45
|
+
|
|
46
|
+
#### Parameters
|
|
47
|
+
|
|
48
|
+
| Name | Type | Description |
|
|
49
|
+
| :------ | :------ | :------ |
|
|
50
|
+
| `chainId` | `number` | ID of the blockchain network |
|
|
51
|
+
| `client` | `Object` | Object containing public and wallet clients |
|
|
52
|
+
| `client.publicClient` | `Object` | - |
|
|
53
|
+
| `client.walletClient?` | `Object` | - |
|
|
54
|
+
|
|
55
|
+
#### Returns
|
|
56
|
+
|
|
57
|
+
[`MAODistributorClient`](MAODistributorClient.md)
|
|
58
|
+
|
|
59
|
+
#### Overrides
|
|
60
|
+
|
|
61
|
+
DistributorClient.constructor
|
|
62
|
+
|
|
63
|
+
## Properties
|
|
64
|
+
|
|
65
|
+
### publicClient
|
|
66
|
+
|
|
67
|
+
• **publicClient**: `Object`
|
|
68
|
+
|
|
69
|
+
#### Inherited from
|
|
70
|
+
|
|
71
|
+
DistributorClient.publicClient
|
|
72
|
+
|
|
73
|
+
___
|
|
74
|
+
|
|
75
|
+
### address
|
|
76
|
+
|
|
77
|
+
• **address**: \`0x$\{string}\`
|
|
78
|
+
|
|
79
|
+
#### Inherited from
|
|
80
|
+
|
|
81
|
+
DistributorClient.address
|
|
82
|
+
|
|
83
|
+
___
|
|
84
|
+
|
|
85
|
+
### walletClient
|
|
86
|
+
|
|
87
|
+
• `Optional` **walletClient**: `Object`
|
|
88
|
+
|
|
89
|
+
___
|
|
90
|
+
|
|
91
|
+
### parseInstantiated
|
|
92
|
+
|
|
93
|
+
• **parseInstantiated**: (`instances`: `string`[]) => [`MAOInstances`](../interfaces/MAOInstances.md) = `parseInstantiated`
|
|
94
|
+
|
|
95
|
+
#### Type declaration
|
|
96
|
+
|
|
97
|
+
▸ (`instances`): [`MAOInstances`](../interfaces/MAOInstances.md)
|
|
98
|
+
|
|
99
|
+
Parse an array of contract addresses into a MAOInstances object
|
|
100
|
+
|
|
101
|
+
##### Parameters
|
|
102
|
+
|
|
103
|
+
| Name | Type | Description |
|
|
104
|
+
| :------ | :------ | :------ |
|
|
105
|
+
| `instances` | `string`[] | Array of contract addresses in the order they were deployed |
|
|
106
|
+
|
|
107
|
+
##### Returns
|
|
108
|
+
|
|
109
|
+
[`MAOInstances`](../interfaces/MAOInstances.md)
|
|
110
|
+
|
|
111
|
+
MAOInstances object with named contract addresses
|
|
112
|
+
|
|
113
|
+
## Methods
|
|
114
|
+
|
|
115
|
+
### getDistributions
|
|
116
|
+
|
|
117
|
+
▸ **getDistributions**(): `Promise`\<readonly \`0x$\{string}\`[]\>
|
|
118
|
+
|
|
119
|
+
#### Returns
|
|
120
|
+
|
|
121
|
+
`Promise`\<readonly \`0x$\{string}\`[]\>
|
|
122
|
+
|
|
123
|
+
#### Inherited from
|
|
124
|
+
|
|
125
|
+
DistributorClient.getDistributions
|
|
126
|
+
|
|
127
|
+
___
|
|
128
|
+
|
|
129
|
+
### getInstances
|
|
130
|
+
|
|
131
|
+
▸ **getInstances**(`distributorsId`): `Promise`\<\`0x$\{string}\`[][]\>
|
|
132
|
+
|
|
133
|
+
#### Parameters
|
|
134
|
+
|
|
135
|
+
| Name | Type |
|
|
136
|
+
| :------ | :------ |
|
|
137
|
+
| `distributorsId` | \`0x$\{string}\` |
|
|
138
|
+
|
|
139
|
+
#### Returns
|
|
140
|
+
|
|
141
|
+
`Promise`\<\`0x$\{string}\`[][]\>
|
|
142
|
+
|
|
143
|
+
#### Inherited from
|
|
144
|
+
|
|
145
|
+
DistributorClient.getInstances
|
|
146
|
+
|
|
147
|
+
___
|
|
148
|
+
|
|
149
|
+
### getInstance
|
|
150
|
+
|
|
151
|
+
▸ **getInstance**(`distributorsId`, `instanceId`): `Promise`\<\`0x$\{string}\`[]\>
|
|
152
|
+
|
|
153
|
+
#### Parameters
|
|
154
|
+
|
|
155
|
+
| Name | Type |
|
|
156
|
+
| :------ | :------ |
|
|
157
|
+
| `distributorsId` | \`0x$\{string}\` |
|
|
158
|
+
| `instanceId` | `bigint` |
|
|
159
|
+
|
|
160
|
+
#### Returns
|
|
161
|
+
|
|
162
|
+
`Promise`\<\`0x$\{string}\`[]\>
|
|
163
|
+
|
|
164
|
+
#### Inherited from
|
|
165
|
+
|
|
166
|
+
DistributorClient.getInstance
|
|
167
|
+
|
|
168
|
+
___
|
|
169
|
+
|
|
170
|
+
### getNamedDistributionInstances
|
|
171
|
+
|
|
172
|
+
▸ **getNamedDistributionInstances**(`«destructured»`): `Promise`\<\`0x$\{string}\`[][]\>
|
|
173
|
+
|
|
174
|
+
#### Parameters
|
|
175
|
+
|
|
176
|
+
| Name | Type |
|
|
177
|
+
| :------ | :------ |
|
|
178
|
+
| `«destructured»` | `Object` |
|
|
179
|
+
| › `namedDistribution` | `string` |
|
|
180
|
+
|
|
181
|
+
#### Returns
|
|
182
|
+
|
|
183
|
+
`Promise`\<\`0x$\{string}\`[][]\>
|
|
184
|
+
|
|
185
|
+
#### Inherited from
|
|
186
|
+
|
|
187
|
+
DistributorClient.getNamedDistributionInstances
|
|
188
|
+
|
|
189
|
+
___
|
|
190
|
+
|
|
191
|
+
### getNamedDistributionInstance
|
|
192
|
+
|
|
193
|
+
▸ **getNamedDistributionInstance**(`namedDistribution`, `instanceId`): `Promise`\<\`0x$\{string}\`[]\>
|
|
194
|
+
|
|
195
|
+
#### Parameters
|
|
196
|
+
|
|
197
|
+
| Name | Type |
|
|
198
|
+
| :------ | :------ |
|
|
199
|
+
| `namedDistribution` | `string` |
|
|
200
|
+
| `instanceId` | `bigint` |
|
|
201
|
+
|
|
202
|
+
#### Returns
|
|
203
|
+
|
|
204
|
+
`Promise`\<\`0x$\{string}\`[]\>
|
|
205
|
+
|
|
206
|
+
#### Inherited from
|
|
207
|
+
|
|
208
|
+
DistributorClient.getNamedDistributionInstance
|
|
209
|
+
|
|
210
|
+
___
|
|
211
|
+
|
|
212
|
+
### addressesToContracts
|
|
213
|
+
|
|
214
|
+
▸ **addressesToContracts**(`addresses`): [`MAOInstanceContracts`](../interfaces/MAOInstanceContracts.md)
|
|
215
|
+
|
|
216
|
+
Converts MAOInstances addresses to their respective contract instances
|
|
217
|
+
|
|
218
|
+
#### Parameters
|
|
219
|
+
|
|
220
|
+
| Name | Type | Description |
|
|
221
|
+
| :------ | :------ | :------ |
|
|
222
|
+
| `addresses` | [`MAOInstances`](../interfaces/MAOInstances.md) | Object containing contract addresses for MAO distribution components |
|
|
223
|
+
|
|
224
|
+
#### Returns
|
|
225
|
+
|
|
226
|
+
[`MAOInstanceContracts`](../interfaces/MAOInstanceContracts.md)
|
|
227
|
+
|
|
228
|
+
Object containing initialized contract instances
|
|
229
|
+
|
|
230
|
+
**`Throws`**
|
|
231
|
+
|
|
232
|
+
Error if any of the addresses are invalid
|
|
233
|
+
|
|
234
|
+
___
|
|
235
|
+
|
|
236
|
+
### getMAOInstances
|
|
237
|
+
|
|
238
|
+
▸ **getMAOInstances**(`namedDistribution?`): `Promise`\<[`MAOInstanceContracts`](../interfaces/MAOInstanceContracts.md)[]\>
|
|
239
|
+
|
|
240
|
+
Get MAOInstances instances by distribution name
|
|
241
|
+
|
|
242
|
+
#### Parameters
|
|
243
|
+
|
|
244
|
+
| Name | Type | Default value | Description |
|
|
245
|
+
| :------ | :------ | :------ | :------ |
|
|
246
|
+
| `namedDistribution` | `string` | `MAODistributorClient.DEFAULT_NAME` | Distribution name (defaults to "MAO Distribution") |
|
|
247
|
+
|
|
248
|
+
#### Returns
|
|
249
|
+
|
|
250
|
+
`Promise`\<[`MAOInstanceContracts`](../interfaces/MAOInstanceContracts.md)[]\>
|
|
251
|
+
|
|
252
|
+
Array of MAOInstances contract instances
|
|
253
|
+
|
|
254
|
+
___
|
|
255
|
+
|
|
256
|
+
### parseToContracts
|
|
257
|
+
|
|
258
|
+
▸ **parseToContracts**(`instances`): [`MAOInstanceContracts`](../interfaces/MAOInstanceContracts.md)
|
|
259
|
+
|
|
260
|
+
#### Parameters
|
|
261
|
+
|
|
262
|
+
| Name | Type |
|
|
263
|
+
| :------ | :------ |
|
|
264
|
+
| `instances` | readonly \`0x$\{string}\`[] |
|
|
265
|
+
|
|
266
|
+
#### Returns
|
|
267
|
+
|
|
268
|
+
[`MAOInstanceContracts`](../interfaces/MAOInstanceContracts.md)
|
|
269
|
+
|
|
270
|
+
___
|
|
271
|
+
|
|
272
|
+
### getMAOInstance
|
|
273
|
+
|
|
274
|
+
▸ **getMAOInstance**(`name?`, `instanceId`): `Promise`\<[`MAOInstanceContracts`](../interfaces/MAOInstanceContracts.md)\>
|
|
275
|
+
|
|
276
|
+
#### Parameters
|
|
277
|
+
|
|
278
|
+
| Name | Type | Default value |
|
|
279
|
+
| :------ | :------ | :------ |
|
|
280
|
+
| `name` | `string` | `MAODistributorClient.DEFAULT_NAME` |
|
|
281
|
+
| `instanceId` | `bigint` | `undefined` |
|
|
282
|
+
|
|
283
|
+
#### Returns
|
|
284
|
+
|
|
285
|
+
`Promise`\<[`MAOInstanceContracts`](../interfaces/MAOInstanceContracts.md)\>
|
|
286
|
+
|
|
287
|
+
___
|
|
288
|
+
|
|
289
|
+
### instantiate
|
|
290
|
+
|
|
291
|
+
▸ **instantiate**(`args`, `name?`, `chain`): `Promise`\<[`MAOInstanceContracts`](../interfaces/MAOInstanceContracts.md)\>
|
|
292
|
+
|
|
293
|
+
Create a new MAODistribution instance
|
|
294
|
+
|
|
295
|
+
#### Parameters
|
|
296
|
+
|
|
297
|
+
| Name | Type | Default value | Description |
|
|
298
|
+
| :------ | :------ | :------ | :------ |
|
|
299
|
+
| `args` | `undefined` \| readonly [\{ `tokenSettings`: \{ `tokenName`: `string` ; `tokenSymbol`: `string` } ; `rankifySettings`: \{ `principalCost`: `bigint` ; `principalTimeConstant`: `bigint` ; `metadata`: `string` ; `rankTokenURI`: `string` ; `rankTokenContractURI`: `string` } }] \| readonly [\{ `tokenSettings`: \{ `tokenName`: `string` ; `tokenSymbol`: `string` } ; `rankifySettings`: \{ `principalCost`: `bigint` ; `principalTimeConstant`: `bigint` ; `metadata`: `string` ; `rankTokenURI`: `string` ; `rankTokenContractURI`: `string` } }] | `undefined` | Distribution arguments (encoded as bytes) |
|
|
300
|
+
| `name` | `string` | `MAODistributorClient.DEFAULT_NAME` | - |
|
|
301
|
+
| `chain` | `Chain` | `undefined` | - |
|
|
302
|
+
|
|
303
|
+
#### Returns
|
|
304
|
+
|
|
305
|
+
`Promise`\<[`MAOInstanceContracts`](../interfaces/MAOInstanceContracts.md)\>
|
|
306
|
+
|
|
307
|
+
Array of created contract addresses
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
# Class: Multipass
|
|
2
|
+
|
|
3
|
+
Main Multipass class for handling registrations and queries
|
|
4
|
+
|
|
5
|
+
## Hierarchy
|
|
6
|
+
|
|
7
|
+
- [`MultipassBase`](MultipassBase.md)
|
|
8
|
+
|
|
9
|
+
↳ **`Multipass`**
|
|
10
|
+
|
|
11
|
+
## Table of contents
|
|
12
|
+
|
|
13
|
+
### Constructors
|
|
14
|
+
|
|
15
|
+
- [constructor](Multipass.md#constructor)
|
|
16
|
+
|
|
17
|
+
### Properties
|
|
18
|
+
|
|
19
|
+
- [chainId](Multipass.md#chainid)
|
|
20
|
+
|
|
21
|
+
### Methods
|
|
22
|
+
|
|
23
|
+
- [getRegistrarMessage](Multipass.md#getregistrarmessage)
|
|
24
|
+
- [formQueryByAddress](Multipass.md#formquerybyaddress)
|
|
25
|
+
- [formQueryById](Multipass.md#formquerybyid)
|
|
26
|
+
- [formQueryByUsername](Multipass.md#formquerybyusername)
|
|
27
|
+
- [formQueryByUsernameAndId](Multipass.md#formquerybyusernameandid)
|
|
28
|
+
- [formQueryByFullDetails](Multipass.md#formquerybyfulldetails)
|
|
29
|
+
- [signRegistrarMessage](Multipass.md#signregistrarmessage)
|
|
30
|
+
- [getDappURL](Multipass.md#getdappurl)
|
|
31
|
+
|
|
32
|
+
## Constructors
|
|
33
|
+
|
|
34
|
+
### constructor
|
|
35
|
+
|
|
36
|
+
• **new Multipass**(`params`): [`Multipass`](Multipass.md)
|
|
37
|
+
|
|
38
|
+
Creates a new Multipass instance
|
|
39
|
+
|
|
40
|
+
#### Parameters
|
|
41
|
+
|
|
42
|
+
| Name | Type | Description |
|
|
43
|
+
| :------ | :------ | :------ |
|
|
44
|
+
| `params` | `Object` | Constructor parameters |
|
|
45
|
+
| `params.chainId` | `number` | ID of the blockchain network |
|
|
46
|
+
| `params.walletClient` | `Object` | Wallet client for signing transactions |
|
|
47
|
+
|
|
48
|
+
#### Returns
|
|
49
|
+
|
|
50
|
+
[`Multipass`](Multipass.md)
|
|
51
|
+
|
|
52
|
+
#### Overrides
|
|
53
|
+
|
|
54
|
+
[MultipassBase](MultipassBase.md).[constructor](MultipassBase.md#constructor)
|
|
55
|
+
|
|
56
|
+
## Properties
|
|
57
|
+
|
|
58
|
+
### chainId
|
|
59
|
+
|
|
60
|
+
• **chainId**: `number`
|
|
61
|
+
|
|
62
|
+
Chain ID for the network
|
|
63
|
+
|
|
64
|
+
#### Inherited from
|
|
65
|
+
|
|
66
|
+
[MultipassBase](MultipassBase.md).[chainId](MultipassBase.md#chainid)
|
|
67
|
+
|
|
68
|
+
## Methods
|
|
69
|
+
|
|
70
|
+
### getRegistrarMessage
|
|
71
|
+
|
|
72
|
+
▸ **getRegistrarMessage**(`«destructured»`): [`RegisterMessage`](../interfaces/RegisterMessage.md)
|
|
73
|
+
|
|
74
|
+
#### Parameters
|
|
75
|
+
|
|
76
|
+
| Name | Type |
|
|
77
|
+
| :------ | :------ |
|
|
78
|
+
| `«destructured»` | `Object` |
|
|
79
|
+
| › `username` | `string` |
|
|
80
|
+
| › `id` | `string` |
|
|
81
|
+
| › `domainName` | `string` |
|
|
82
|
+
| › `validUntil` | `number` |
|
|
83
|
+
|
|
84
|
+
#### Returns
|
|
85
|
+
|
|
86
|
+
[`RegisterMessage`](../interfaces/RegisterMessage.md)
|
|
87
|
+
|
|
88
|
+
#### Inherited from
|
|
89
|
+
|
|
90
|
+
[MultipassBase](MultipassBase.md).[getRegistrarMessage](MultipassBase.md#getregistrarmessage)
|
|
91
|
+
|
|
92
|
+
___
|
|
93
|
+
|
|
94
|
+
### formQueryByAddress
|
|
95
|
+
|
|
96
|
+
▸ **formQueryByAddress**(`params`): [`NameQuery`](../index.md#namequery)
|
|
97
|
+
|
|
98
|
+
Creates a name query by address
|
|
99
|
+
|
|
100
|
+
#### Parameters
|
|
101
|
+
|
|
102
|
+
| Name | Type | Description |
|
|
103
|
+
| :------ | :------ | :------ |
|
|
104
|
+
| `params` | `Object` | Parameters for creating the query |
|
|
105
|
+
| `params.address` | `string` | Address to be encoded in the query |
|
|
106
|
+
| `params.domainName` | `string` | Domain name to be encoded in the query |
|
|
107
|
+
| `params.targetDomain?` | `string` | Target domain to be encoded in the query |
|
|
108
|
+
|
|
109
|
+
#### Returns
|
|
110
|
+
|
|
111
|
+
[`NameQuery`](../index.md#namequery)
|
|
112
|
+
|
|
113
|
+
The generated name query
|
|
114
|
+
|
|
115
|
+
#### Inherited from
|
|
116
|
+
|
|
117
|
+
[MultipassBase](MultipassBase.md).[formQueryByAddress](MultipassBase.md#formquerybyaddress)
|
|
118
|
+
|
|
119
|
+
___
|
|
120
|
+
|
|
121
|
+
### formQueryById
|
|
122
|
+
|
|
123
|
+
▸ **formQueryById**(`params`): [`NameQuery`](../index.md#namequery)
|
|
124
|
+
|
|
125
|
+
Creates a name query by ID
|
|
126
|
+
|
|
127
|
+
#### Parameters
|
|
128
|
+
|
|
129
|
+
| Name | Type | Description |
|
|
130
|
+
| :------ | :------ | :------ |
|
|
131
|
+
| `params` | `Object` | Parameters for creating the query |
|
|
132
|
+
| `params.id` | `string` | ID to be encoded in the query |
|
|
133
|
+
| `params.domainName` | `string` | Domain name to be encoded in the query |
|
|
134
|
+
| `params.targetDomain?` | `string` | Target domain to be encoded in the query |
|
|
135
|
+
|
|
136
|
+
#### Returns
|
|
137
|
+
|
|
138
|
+
[`NameQuery`](../index.md#namequery)
|
|
139
|
+
|
|
140
|
+
The generated name query
|
|
141
|
+
|
|
142
|
+
#### Inherited from
|
|
143
|
+
|
|
144
|
+
[MultipassBase](MultipassBase.md).[formQueryById](MultipassBase.md#formquerybyid)
|
|
145
|
+
|
|
146
|
+
___
|
|
147
|
+
|
|
148
|
+
### formQueryByUsername
|
|
149
|
+
|
|
150
|
+
▸ **formQueryByUsername**(`params`): [`NameQuery`](../index.md#namequery)
|
|
151
|
+
|
|
152
|
+
Creates a name query by username
|
|
153
|
+
|
|
154
|
+
#### Parameters
|
|
155
|
+
|
|
156
|
+
| Name | Type | Description |
|
|
157
|
+
| :------ | :------ | :------ |
|
|
158
|
+
| `params` | `Object` | Parameters for creating the query |
|
|
159
|
+
| `params.username` | `string` | Username to be encoded in the query |
|
|
160
|
+
| `params.domainName` | `string` | Domain name to be encoded in the query |
|
|
161
|
+
| `params.targetDomain?` | `string` | Target domain to be encoded in the query |
|
|
162
|
+
|
|
163
|
+
#### Returns
|
|
164
|
+
|
|
165
|
+
[`NameQuery`](../index.md#namequery)
|
|
166
|
+
|
|
167
|
+
The generated name query
|
|
168
|
+
|
|
169
|
+
#### Inherited from
|
|
170
|
+
|
|
171
|
+
[MultipassBase](MultipassBase.md).[formQueryByUsername](MultipassBase.md#formquerybyusername)
|
|
172
|
+
|
|
173
|
+
___
|
|
174
|
+
|
|
175
|
+
### formQueryByUsernameAndId
|
|
176
|
+
|
|
177
|
+
▸ **formQueryByUsernameAndId**(`params`): [`NameQuery`](../index.md#namequery)
|
|
178
|
+
|
|
179
|
+
Creates a name query by username and ID
|
|
180
|
+
|
|
181
|
+
#### Parameters
|
|
182
|
+
|
|
183
|
+
| Name | Type | Description |
|
|
184
|
+
| :------ | :------ | :------ |
|
|
185
|
+
| `params` | `Object` | Parameters for creating the query |
|
|
186
|
+
| `params.username` | `string` | Username to be encoded in the query |
|
|
187
|
+
| `params.id` | `string` | ID to be encoded in the query |
|
|
188
|
+
| `params.domainName` | `string` | Domain name to be encoded in the query |
|
|
189
|
+
| `params.targetDomain?` | `string` | Target domain to be encoded in the query |
|
|
190
|
+
|
|
191
|
+
#### Returns
|
|
192
|
+
|
|
193
|
+
[`NameQuery`](../index.md#namequery)
|
|
194
|
+
|
|
195
|
+
The generated name query
|
|
196
|
+
|
|
197
|
+
#### Inherited from
|
|
198
|
+
|
|
199
|
+
[MultipassBase](MultipassBase.md).[formQueryByUsernameAndId](MultipassBase.md#formquerybyusernameandid)
|
|
200
|
+
|
|
201
|
+
___
|
|
202
|
+
|
|
203
|
+
### formQueryByFullDetails
|
|
204
|
+
|
|
205
|
+
▸ **formQueryByFullDetails**(`params`): [`NameQuery`](../index.md#namequery)
|
|
206
|
+
|
|
207
|
+
Creates a name query with full details
|
|
208
|
+
|
|
209
|
+
#### Parameters
|
|
210
|
+
|
|
211
|
+
| Name | Type | Description |
|
|
212
|
+
| :------ | :------ | :------ |
|
|
213
|
+
| `params` | `Object` | Parameters for creating the query |
|
|
214
|
+
| `params.username` | `string` | Username to be encoded in the query |
|
|
215
|
+
| `params.id` | `string` | ID to be encoded in the query |
|
|
216
|
+
| `params.domainName` | `string` | Domain name to be encoded in the query |
|
|
217
|
+
| `params.targetDomain?` | `string` | Target domain to be encoded in the query |
|
|
218
|
+
| `params.address` | `string` | Address to be encoded in the query |
|
|
219
|
+
|
|
220
|
+
#### Returns
|
|
221
|
+
|
|
222
|
+
[`NameQuery`](../index.md#namequery)
|
|
223
|
+
|
|
224
|
+
The generated name query
|
|
225
|
+
|
|
226
|
+
#### Inherited from
|
|
227
|
+
|
|
228
|
+
[MultipassBase](MultipassBase.md).[formQueryByFullDetails](MultipassBase.md#formquerybyfulldetails)
|
|
229
|
+
|
|
230
|
+
___
|
|
231
|
+
|
|
232
|
+
### signRegistrarMessage
|
|
233
|
+
|
|
234
|
+
▸ **signRegistrarMessage**(`message`, `verifierAddress`): `Promise`\<\`0x$\{string}\`\>
|
|
235
|
+
|
|
236
|
+
Signs a registrar message for registration
|
|
237
|
+
|
|
238
|
+
#### Parameters
|
|
239
|
+
|
|
240
|
+
| Name | Type | Description |
|
|
241
|
+
| :------ | :------ | :------ |
|
|
242
|
+
| `message` | [`RegisterMessage`](../interfaces/RegisterMessage.md) | Message to sign |
|
|
243
|
+
| `verifierAddress` | \`0x$\{string}\` | Address of the verifier contract |
|
|
244
|
+
|
|
245
|
+
#### Returns
|
|
246
|
+
|
|
247
|
+
`Promise`\<\`0x$\{string}\`\>
|
|
248
|
+
|
|
249
|
+
Signed message
|
|
250
|
+
|
|
251
|
+
___
|
|
252
|
+
|
|
253
|
+
### getDappURL
|
|
254
|
+
|
|
255
|
+
▸ **getDappURL**(`message`, `signature`, `basepath`, `contractAddress`): `string`
|
|
256
|
+
|
|
257
|
+
Generates a URL for a dapp
|
|
258
|
+
|
|
259
|
+
#### Parameters
|
|
260
|
+
|
|
261
|
+
| Name | Type | Description |
|
|
262
|
+
| :------ | :------ | :------ |
|
|
263
|
+
| `message` | `object` | Message object to be encoded in the URL |
|
|
264
|
+
| `signature` | `string` | Signature to be encoded in the URL |
|
|
265
|
+
| `basepath` | `string` | Base path of the URL |
|
|
266
|
+
| `contractAddress` | `string` | Address of the contract |
|
|
267
|
+
|
|
268
|
+
#### Returns
|
|
269
|
+
|
|
270
|
+
`string`
|
|
271
|
+
|
|
272
|
+
The generated URL
|
|
273
|
+
|
|
274
|
+
#### Overrides
|
|
275
|
+
|
|
276
|
+
[MultipassBase](MultipassBase.md).[getDappURL](MultipassBase.md#getdappurl)
|