@keetanetwork/anchor 0.0.49 → 0.0.51
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/lib/resolver.d.ts +1 -0
- package/lib/resolver.d.ts.map +1 -1
- package/lib/resolver.js +52 -37
- package/lib/resolver.js.map +1 -1
- package/npm-shrinkwrap.json +8 -8
- package/package.json +2 -2
- package/services/asset-movement/client.d.ts.map +1 -1
- package/services/asset-movement/client.js +8 -6
- package/services/asset-movement/client.js.map +1 -1
- package/services/asset-movement/common.d.ts +9 -5
- package/services/asset-movement/common.d.ts.map +1 -1
- package/services/asset-movement/common.js +18113 -9853
- package/services/asset-movement/common.js.map +1 -1
- package/services/asset-movement/lib/data/addresses/bank-account/bcr-pay.d.ts +4 -0
- package/services/asset-movement/lib/data/addresses/bank-account/bcr-pay.d.ts.map +1 -0
- package/services/asset-movement/lib/data/addresses/bank-account/bcr-pay.js +36 -0
- package/services/asset-movement/lib/data/addresses/bank-account/bcr-pay.js.map +1 -0
- package/services/asset-movement/lib/data/addresses/bank-account/duit-now.d.ts +4 -0
- package/services/asset-movement/lib/data/addresses/bank-account/duit-now.d.ts.map +1 -0
- package/services/asset-movement/lib/data/addresses/bank-account/duit-now.js +35 -0
- package/services/asset-movement/lib/data/addresses/bank-account/duit-now.js.map +1 -0
- package/services/asset-movement/lib/data/addresses/bank-account/hk-fps.d.ts +4 -0
- package/services/asset-movement/lib/data/addresses/bank-account/hk-fps.d.ts.map +1 -0
- package/services/asset-movement/lib/data/addresses/bank-account/hk-fps.js +36 -0
- package/services/asset-movement/lib/data/addresses/bank-account/hk-fps.js.map +1 -0
- package/services/asset-movement/lib/data/addresses/bank-account/index.generated.d.ts +10 -0
- package/services/asset-movement/lib/data/addresses/bank-account/index.generated.d.ts.map +1 -1
- package/services/asset-movement/lib/data/addresses/bank-account/index.generated.js +10 -0
- package/services/asset-movement/lib/data/addresses/bank-account/index.generated.js.map +1 -1
- package/services/asset-movement/lib/data/addresses/bank-account/pay-now.d.ts +4 -0
- package/services/asset-movement/lib/data/addresses/bank-account/pay-now.d.ts.map +1 -0
- package/services/asset-movement/lib/data/addresses/bank-account/pay-now.js +36 -0
- package/services/asset-movement/lib/data/addresses/bank-account/pay-now.js.map +1 -0
- package/services/asset-movement/lib/data/addresses/bank-account/pix.d.ts.map +1 -1
- package/services/asset-movement/lib/data/addresses/bank-account/pix.js +1 -0
- package/services/asset-movement/lib/data/addresses/bank-account/pix.js.map +1 -1
- package/services/asset-movement/lib/data/addresses/bank-account/upi.d.ts +4 -0
- package/services/asset-movement/lib/data/addresses/bank-account/upi.d.ts.map +1 -0
- package/services/asset-movement/lib/data/addresses/bank-account/upi.js +37 -0
- package/services/asset-movement/lib/data/addresses/bank-account/upi.js.map +1 -0
- package/services/asset-movement/lib/data/addresses/types.generated.d.ts +458 -2
- package/services/asset-movement/lib/data/addresses/types.generated.d.ts.map +1 -1
- package/services/asset-movement/lib/data/addresses/types.generated.js +508 -0
- package/services/asset-movement/lib/data/addresses/types.generated.js.map +1 -1
- package/services/asset-movement/lib/location.generated.js +3 -3
- package/services/fx/common.d.ts +1 -1
- package/services/fx/common.d.ts.map +1 -1
- package/services/fx/common.js +16 -16
- package/services/fx/common.js.map +1 -1
- package/services/fx/server.d.ts.map +1 -1
- package/services/fx/server.js +13 -17
- package/services/fx/server.js.map +1 -1
- package/services/notification/common.generated.js +34 -34
- package/services/storage/client.d.ts +38 -0
- package/services/storage/client.d.ts.map +1 -1
- package/services/storage/client.js +87 -13
- package/services/storage/client.js.map +1 -1
- package/services/storage/clients/contacts.d.ts +2 -2
- package/services/storage/clients/contacts.d.ts.map +1 -1
- package/services/storage/clients/contacts.generated.js +1216 -406
- package/services/storage/clients/contacts.generated.js.map +1 -1
- package/services/storage/clients/contacts.js +27 -9
- package/services/storage/clients/contacts.js.map +1 -1
- package/services/storage/clients/icon.d.ts +2 -2
- package/services/storage/clients/icon.d.ts.map +1 -1
- package/services/storage/clients/icon.js +11 -2
- package/services/storage/clients/icon.js.map +1 -1
- package/services/storage/common.d.ts +38 -1
- package/services/storage/common.d.ts.map +1 -1
- package/services/storage/common.generated.d.ts +2 -1
- package/services/storage/common.generated.d.ts.map +1 -1
- package/services/storage/common.generated.js +67 -0
- package/services/storage/common.generated.js.map +1 -1
- package/services/storage/common.js +8 -0
- package/services/storage/common.js.map +1 -1
- package/services/storage/server.d.ts.map +1 -1
- package/services/storage/server.js +70 -27
- package/services/storage/server.js.map +1 -1
- package/services/storage/test-utils.d.ts +1 -0
- package/services/storage/test-utils.d.ts.map +1 -1
- package/services/storage/test-utils.js +15 -0
- package/services/storage/test-utils.js.map +1 -1
- package/services/username/common.generated.js +23 -23
|
@@ -23,12 +23,12 @@ export const assertKeetaNotificationAnchorListTargetsRequestJSON = (() => { cons
|
|
|
23
23
|
}, _errorFactory)) && (("object" === typeof input.signed && null !== input.signed || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
24
24
|
method: "createAssertEquals",
|
|
25
25
|
path: _path + ".signed",
|
|
26
|
-
expected: "
|
|
26
|
+
expected: "{ nonce: string; timestamp: string; signature: string; } & {}",
|
|
27
27
|
value: input.signed
|
|
28
28
|
}, _errorFactory)) && _ao1(input.signed, _path + ".signed", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
29
29
|
method: "createAssertEquals",
|
|
30
30
|
path: _path + ".signed",
|
|
31
|
-
expected: "
|
|
31
|
+
expected: "{ nonce: string; timestamp: string; signature: string; } & {}",
|
|
32
32
|
value: input.signed
|
|
33
33
|
}, _errorFactory)) && (2 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).every(key => {
|
|
34
34
|
if (["account", "signed"].some(prop => key === prop))
|
|
@@ -75,12 +75,12 @@ export const assertKeetaNotificationAnchorListTargetsRequestJSON = (() => { cons
|
|
|
75
75
|
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || __typia_transform__assertGuard._assertGuard(true, {
|
|
76
76
|
method: "createAssertEquals",
|
|
77
77
|
path: _path + "",
|
|
78
|
-
expected: "
|
|
78
|
+
expected: "{ account: Secp256K1PublicKeyString | ED25519PublicKeyString | Secp256R1PublicKeyString; signed: { ...; } & {}; } & {}",
|
|
79
79
|
value: input
|
|
80
80
|
}, _errorFactory)) && _ao0(input, _path + "", true) || __typia_transform__assertGuard._assertGuard(true, {
|
|
81
81
|
method: "createAssertEquals",
|
|
82
82
|
path: _path + "",
|
|
83
|
-
expected: "
|
|
83
|
+
expected: "{ account: Secp256K1PublicKeyString | ED25519PublicKeyString | Secp256R1PublicKeyString; signed: { ...; } & {}; } & {}",
|
|
84
84
|
value: input
|
|
85
85
|
}, _errorFactory))(input, "$input", true);
|
|
86
86
|
}
|
|
@@ -115,22 +115,22 @@ export const assertKeetaNotificationAnchorRegisterTargetRequestJSON = (() => { c
|
|
|
115
115
|
}, _errorFactory)) && (("object" === typeof input.signed && null !== input.signed || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
116
116
|
method: "createAssertEquals",
|
|
117
117
|
path: _path + ".signed",
|
|
118
|
-
expected: "
|
|
118
|
+
expected: "{ nonce: string; timestamp: string; signature: string; } & {}",
|
|
119
119
|
value: input.signed
|
|
120
120
|
}, _errorFactory)) && _ao1(input.signed, _path + ".signed", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
121
121
|
method: "createAssertEquals",
|
|
122
122
|
path: _path + ".signed",
|
|
123
|
-
expected: "
|
|
123
|
+
expected: "{ nonce: string; timestamp: string; signature: string; } & {}",
|
|
124
124
|
value: input.signed
|
|
125
125
|
}, _errorFactory)) && (("object" === typeof input.channel && null !== input.channel || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
126
126
|
method: "createAssertEquals",
|
|
127
127
|
path: _path + ".channel",
|
|
128
|
-
expected: "
|
|
128
|
+
expected: "{ appId: string; fcmToken: string; type: \"FCM\"; } & {}",
|
|
129
129
|
value: input.channel
|
|
130
130
|
}, _errorFactory)) && _ao2(input.channel, _path + ".channel", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
131
131
|
method: "createAssertEquals",
|
|
132
132
|
path: _path + ".channel",
|
|
133
|
-
expected: "
|
|
133
|
+
expected: "{ appId: string; fcmToken: string; type: \"FCM\"; } & {}",
|
|
134
134
|
value: input.channel
|
|
135
135
|
}, _errorFactory)) && (3 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).every(key => {
|
|
136
136
|
if (["account", "signed", "channel"].some(prop => key === prop))
|
|
@@ -204,12 +204,12 @@ export const assertKeetaNotificationAnchorRegisterTargetRequestJSON = (() => { c
|
|
|
204
204
|
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || __typia_transform__assertGuard._assertGuard(true, {
|
|
205
205
|
method: "createAssertEquals",
|
|
206
206
|
path: _path + "",
|
|
207
|
-
expected: "
|
|
207
|
+
expected: "{ account: Secp256K1PublicKeyString | ED25519PublicKeyString | Secp256R1PublicKeyString; signed: { ...; } & {}; channel: { ...; } & {}; } & {}",
|
|
208
208
|
value: input
|
|
209
209
|
}, _errorFactory)) && _ao0(input, _path + "", true) || __typia_transform__assertGuard._assertGuard(true, {
|
|
210
210
|
method: "createAssertEquals",
|
|
211
211
|
path: _path + "",
|
|
212
|
-
expected: "
|
|
212
|
+
expected: "{ account: Secp256K1PublicKeyString | ED25519PublicKeyString | Secp256R1PublicKeyString; signed: { ...; } & {}; channel: { ...; } & {}; } & {}",
|
|
213
213
|
value: input
|
|
214
214
|
}, _errorFactory))(input, "$input", true);
|
|
215
215
|
}
|
|
@@ -237,12 +237,12 @@ export const assertKeetaNotificationAnchorDeleteTargetRequestJSON = (() => { con
|
|
|
237
237
|
}, _errorFactory)) && (("object" === typeof input.signed && null !== input.signed || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
238
238
|
method: "createAssertEquals",
|
|
239
239
|
path: _path + ".signed",
|
|
240
|
-
expected: "
|
|
240
|
+
expected: "{ nonce: string; timestamp: string; signature: string; } & {}",
|
|
241
241
|
value: input.signed
|
|
242
242
|
}, _errorFactory)) && _ao1(input.signed, _path + ".signed", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
243
243
|
method: "createAssertEquals",
|
|
244
244
|
path: _path + ".signed",
|
|
245
|
-
expected: "
|
|
245
|
+
expected: "{ nonce: string; timestamp: string; signature: string; } & {}",
|
|
246
246
|
value: input.signed
|
|
247
247
|
}, _errorFactory)) && ("string" === typeof input.id || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
248
248
|
method: "createAssertEquals",
|
|
@@ -294,12 +294,12 @@ export const assertKeetaNotificationAnchorDeleteTargetRequestJSON = (() => { con
|
|
|
294
294
|
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || __typia_transform__assertGuard._assertGuard(true, {
|
|
295
295
|
method: "createAssertEquals",
|
|
296
296
|
path: _path + "",
|
|
297
|
-
expected: "
|
|
297
|
+
expected: "{ account: Secp256K1PublicKeyString | ED25519PublicKeyString | Secp256R1PublicKeyString; signed: { ...; } & {}; id: string; } & {}",
|
|
298
298
|
value: input
|
|
299
299
|
}, _errorFactory)) && _ao0(input, _path + "", true) || __typia_transform__assertGuard._assertGuard(true, {
|
|
300
300
|
method: "createAssertEquals",
|
|
301
301
|
path: _path + "",
|
|
302
|
-
expected: "
|
|
302
|
+
expected: "{ account: Secp256K1PublicKeyString | ED25519PublicKeyString | Secp256R1PublicKeyString; signed: { ...; } & {}; id: string; } & {}",
|
|
303
303
|
value: input
|
|
304
304
|
}, _errorFactory))(input, "$input", true);
|
|
305
305
|
}
|
|
@@ -343,8 +343,8 @@ export const assertKeetaNotificationAnchorCreateSubscriptionRequestJSON = (() =>
|
|
|
343
343
|
if (undefined === value)
|
|
344
344
|
return true;
|
|
345
345
|
return false;
|
|
346
|
-
})); const _io2 = (input, _exceptionable = true) =>
|
|
347
|
-
if (["
|
|
346
|
+
})); const _io2 = (input, _exceptionable = true) => Array.isArray(input.ids) && input.ids.every((elem, _index1) => "string" === typeof elem) && (undefined === input.provider || "string" === typeof input.provider) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
347
|
+
if (["ids", "provider"].some(prop => key === prop))
|
|
348
348
|
return true;
|
|
349
349
|
const value = input[key];
|
|
350
350
|
if (undefined === value)
|
|
@@ -402,12 +402,12 @@ export const assertKeetaNotificationAnchorCreateSubscriptionRequestJSON = (() =>
|
|
|
402
402
|
}, _errorFactory)) && (("object" === typeof input.target && null !== input.target || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
403
403
|
method: "createAssertEquals",
|
|
404
404
|
path: _path + ".target",
|
|
405
|
-
expected: "
|
|
405
|
+
expected: "{ ids: string[]; } & { provider?: string; }",
|
|
406
406
|
value: input.target
|
|
407
407
|
}, _errorFactory)) && _ao2(input.target, _path + ".target", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
408
408
|
method: "createAssertEquals",
|
|
409
409
|
path: _path + ".target",
|
|
410
|
-
expected: "
|
|
410
|
+
expected: "{ ids: string[]; } & { provider?: string; }",
|
|
411
411
|
value: input.target
|
|
412
412
|
}, _errorFactory)) && (undefined === input.toAddress || "string" === typeof input.toAddress && (RegExp(/^keeta_am(.*)/).test(input.toAddress) || RegExp(/^keeta_an(.*)/).test(input.toAddress) || RegExp(/^keeta_ao(.*)/).test(input.toAddress) || RegExp(/^keeta_ap(.*)/).test(input.toAddress) || RegExp(/^tyblocks_am(.*)/).test(input.toAddress) || RegExp(/^tyblocks_an(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ao(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ap(.*)/).test(input.toAddress) || RegExp(/^keeta_aa(.*)/).test(input.toAddress) || RegExp(/^keeta_ab(.*)/).test(input.toAddress) || RegExp(/^keeta_ac(.*)/).test(input.toAddress) || RegExp(/^keeta_ad(.*)/).test(input.toAddress) || RegExp(/^tyblocks_aa(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ab(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ac(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ad(.*)/).test(input.toAddress) || RegExp(/^keeta_ae(.*)/).test(input.toAddress) || RegExp(/^keeta_af(.*)/).test(input.toAddress) || RegExp(/^keeta_ag(.*)/).test(input.toAddress) || RegExp(/^keeta_ah(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ae(.*)/).test(input.toAddress) || RegExp(/^tyblocks_af(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ag(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ah(.*)/).test(input.toAddress) || RegExp(/^keeta_ai(.*)/).test(input.toAddress) || RegExp(/^keeta_aj(.*)/).test(input.toAddress) || RegExp(/^keeta_ak(.*)/).test(input.toAddress) || RegExp(/^keeta_al(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ai(.*)/).test(input.toAddress) || RegExp(/^tyblocks_aj(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ak(.*)/).test(input.toAddress) || RegExp(/^tyblocks_al(.*)/).test(input.toAddress) || RegExp(/^keeta_at(.*)/).test(input.toAddress) || RegExp(/^keeta_aq(.*)/).test(input.toAddress) || RegExp(/^keeta_ar(.*)/).test(input.toAddress) || RegExp(/^keeta_as(.*)/).test(input.toAddress) || RegExp(/^tyblocks_at(.*)/).test(input.toAddress) || RegExp(/^tyblocks_aq(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ar(.*)/).test(input.toAddress) || RegExp(/^tyblocks_as(.*)/).test(input.toAddress) || RegExp(/^keeta_ay(.*)/).test(input.toAddress) || RegExp(/^keeta_az(.*)/).test(input.toAddress) || RegExp(/^keeta_a2(.*)/).test(input.toAddress) || RegExp(/^keeta_a3(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ay(.*)/).test(input.toAddress) || RegExp(/^tyblocks_az(.*)/).test(input.toAddress) || RegExp(/^tyblocks_a2(.*)/).test(input.toAddress) || RegExp(/^tyblocks_a3(.*)/).test(input.toAddress) || RegExp(/^keeta_a4(.*)/).test(input.toAddress) || RegExp(/^keeta_a5(.*)/).test(input.toAddress) || RegExp(/^keeta_a6(.*)/).test(input.toAddress) || RegExp(/^keeta_a7(.*)/).test(input.toAddress) || RegExp(/^tyblocks_a4(.*)/).test(input.toAddress) || RegExp(/^tyblocks_a5(.*)/).test(input.toAddress) || RegExp(/^tyblocks_a6(.*)/).test(input.toAddress) || RegExp(/^tyblocks_a7(.*)/).test(input.toAddress)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
413
413
|
method: "createAssertEquals",
|
|
@@ -431,12 +431,7 @@ export const assertKeetaNotificationAnchorCreateSubscriptionRequestJSON = (() =>
|
|
|
431
431
|
expected: "undefined",
|
|
432
432
|
value: value
|
|
433
433
|
}, _errorFactory);
|
|
434
|
-
}))); const _ao2 = (input, _path, _exceptionable = true) => (
|
|
435
|
-
method: "createAssertEquals",
|
|
436
|
-
path: _path + ".provider",
|
|
437
|
-
expected: "(string | undefined)",
|
|
438
|
-
value: input.provider
|
|
439
|
-
}, _errorFactory)) && ((Array.isArray(input.ids) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
434
|
+
}))); const _ao2 = (input, _path, _exceptionable = true) => ((Array.isArray(input.ids) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
440
435
|
method: "createAssertEquals",
|
|
441
436
|
path: _path + ".ids",
|
|
442
437
|
expected: "Array<string>",
|
|
@@ -451,8 +446,13 @@ export const assertKeetaNotificationAnchorCreateSubscriptionRequestJSON = (() =>
|
|
|
451
446
|
path: _path + ".ids",
|
|
452
447
|
expected: "Array<string>",
|
|
453
448
|
value: input.ids
|
|
449
|
+
}, _errorFactory)) && (undefined === input.provider || "string" === typeof input.provider || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
450
|
+
method: "createAssertEquals",
|
|
451
|
+
path: _path + ".provider",
|
|
452
|
+
expected: "(string | undefined)",
|
|
453
|
+
value: input.provider
|
|
454
454
|
}, _errorFactory)) && (1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).every(key => {
|
|
455
|
-
if (["
|
|
455
|
+
if (["ids", "provider"].some(prop => key === prop))
|
|
456
456
|
return true;
|
|
457
457
|
const value = input[key];
|
|
458
458
|
if (undefined === value)
|
|
@@ -529,12 +529,12 @@ export const assertKeetaNotificationAnchorDeleteSubscriptionRequestJSON = (() =>
|
|
|
529
529
|
}, _errorFactory)) && (("object" === typeof input.signed && null !== input.signed || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
530
530
|
method: "createAssertEquals",
|
|
531
531
|
path: _path + ".signed",
|
|
532
|
-
expected: "
|
|
532
|
+
expected: "{ nonce: string; timestamp: string; signature: string; } & {}",
|
|
533
533
|
value: input.signed
|
|
534
534
|
}, _errorFactory)) && _ao1(input.signed, _path + ".signed", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
535
535
|
method: "createAssertEquals",
|
|
536
536
|
path: _path + ".signed",
|
|
537
|
-
expected: "
|
|
537
|
+
expected: "{ nonce: string; timestamp: string; signature: string; } & {}",
|
|
538
538
|
value: input.signed
|
|
539
539
|
}, _errorFactory)) && ("string" === typeof input.id || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
540
540
|
method: "createAssertEquals",
|
|
@@ -586,12 +586,12 @@ export const assertKeetaNotificationAnchorDeleteSubscriptionRequestJSON = (() =>
|
|
|
586
586
|
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || __typia_transform__assertGuard._assertGuard(true, {
|
|
587
587
|
method: "createAssertEquals",
|
|
588
588
|
path: _path + "",
|
|
589
|
-
expected: "
|
|
589
|
+
expected: "{ account: Secp256K1PublicKeyString | ED25519PublicKeyString | Secp256R1PublicKeyString; signed: { ...; } & {}; id: string; } & {}",
|
|
590
590
|
value: input
|
|
591
591
|
}, _errorFactory)) && _ao0(input, _path + "", true) || __typia_transform__assertGuard._assertGuard(true, {
|
|
592
592
|
method: "createAssertEquals",
|
|
593
593
|
path: _path + "",
|
|
594
|
-
expected: "
|
|
594
|
+
expected: "{ account: Secp256K1PublicKeyString | ED25519PublicKeyString | Secp256R1PublicKeyString; signed: { ...; } & {}; id: string; } & {}",
|
|
595
595
|
value: input
|
|
596
596
|
}, _errorFactory))(input, "$input", true);
|
|
597
597
|
}
|
|
@@ -619,12 +619,12 @@ export const assertKeetaNotificationAnchorListSubscriptionsRequestJSON = (() =>
|
|
|
619
619
|
}, _errorFactory)) && (("object" === typeof input.signed && null !== input.signed || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
620
620
|
method: "createAssertEquals",
|
|
621
621
|
path: _path + ".signed",
|
|
622
|
-
expected: "
|
|
622
|
+
expected: "{ nonce: string; timestamp: string; signature: string; } & {}",
|
|
623
623
|
value: input.signed
|
|
624
624
|
}, _errorFactory)) && _ao1(input.signed, _path + ".signed", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
625
625
|
method: "createAssertEquals",
|
|
626
626
|
path: _path + ".signed",
|
|
627
|
-
expected: "
|
|
627
|
+
expected: "{ nonce: string; timestamp: string; signature: string; } & {}",
|
|
628
628
|
value: input.signed
|
|
629
629
|
}, _errorFactory)) && (2 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).every(key => {
|
|
630
630
|
if (["account", "signed"].some(prop => key === prop))
|
|
@@ -671,12 +671,12 @@ export const assertKeetaNotificationAnchorListSubscriptionsRequestJSON = (() =>
|
|
|
671
671
|
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || __typia_transform__assertGuard._assertGuard(true, {
|
|
672
672
|
method: "createAssertEquals",
|
|
673
673
|
path: _path + "",
|
|
674
|
-
expected: "
|
|
674
|
+
expected: "{ account: Secp256K1PublicKeyString | ED25519PublicKeyString | Secp256R1PublicKeyString; signed: { ...; } & {}; } & {}",
|
|
675
675
|
value: input
|
|
676
676
|
}, _errorFactory)) && _ao0(input, _path + "", true) || __typia_transform__assertGuard._assertGuard(true, {
|
|
677
677
|
method: "createAssertEquals",
|
|
678
678
|
path: _path + "",
|
|
679
|
-
expected: "
|
|
679
|
+
expected: "{ account: Secp256K1PublicKeyString | ED25519PublicKeyString | Secp256R1PublicKeyString; signed: { ...; } & {}; } & {}",
|
|
680
680
|
value: input
|
|
681
681
|
}, _errorFactory))(input, "$input", true);
|
|
682
682
|
}
|
|
@@ -698,7 +698,7 @@ export const isKeetaNotificationAnchorDeleteSubscriptionResponseJSON = (() => {
|
|
|
698
698
|
else
|
|
699
699
|
return false;
|
|
700
700
|
})(); return input => "object" === typeof input && null !== input && _iu0(input); })();
|
|
701
|
-
export const isKeetaNotificationAnchorListSubscriptionsResponseJSON = (() => { const _io0 = input => false === input.ok && "string" === typeof input.error; const _io1 = input => true === input.ok && (Array.isArray(input.subscriptions) && input.subscriptions.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io2 = input => "string" === typeof input.id && ("object" === typeof input.subscription && null !== input.subscription && _io3(input.subscription)); const _io3 = input => "RECEIVE_FUNDS" === input.type && ("object" === typeof input.target && null !== input.target && _io4(input.target)) && (undefined === input.toAddress || "string" === typeof input.toAddress && (RegExp(/^keeta_am(.*)/).test(input.toAddress) || RegExp(/^keeta_an(.*)/).test(input.toAddress) || RegExp(/^keeta_ao(.*)/).test(input.toAddress) || RegExp(/^keeta_ap(.*)/).test(input.toAddress) || RegExp(/^tyblocks_am(.*)/).test(input.toAddress) || RegExp(/^tyblocks_an(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ao(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ap(.*)/).test(input.toAddress) || RegExp(/^keeta_aa(.*)/).test(input.toAddress) || RegExp(/^keeta_ab(.*)/).test(input.toAddress) || RegExp(/^keeta_ac(.*)/).test(input.toAddress) || RegExp(/^keeta_ad(.*)/).test(input.toAddress) || RegExp(/^tyblocks_aa(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ab(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ac(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ad(.*)/).test(input.toAddress) || RegExp(/^keeta_ae(.*)/).test(input.toAddress) || RegExp(/^keeta_af(.*)/).test(input.toAddress) || RegExp(/^keeta_ag(.*)/).test(input.toAddress) || RegExp(/^keeta_ah(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ae(.*)/).test(input.toAddress) || RegExp(/^tyblocks_af(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ag(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ah(.*)/).test(input.toAddress) || RegExp(/^keeta_ai(.*)/).test(input.toAddress) || RegExp(/^keeta_aj(.*)/).test(input.toAddress) || RegExp(/^keeta_ak(.*)/).test(input.toAddress) || RegExp(/^keeta_al(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ai(.*)/).test(input.toAddress) || RegExp(/^tyblocks_aj(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ak(.*)/).test(input.toAddress) || RegExp(/^tyblocks_al(.*)/).test(input.toAddress) || RegExp(/^keeta_at(.*)/).test(input.toAddress) || RegExp(/^keeta_aq(.*)/).test(input.toAddress) || RegExp(/^keeta_ar(.*)/).test(input.toAddress) || RegExp(/^keeta_as(.*)/).test(input.toAddress) || RegExp(/^tyblocks_at(.*)/).test(input.toAddress) || RegExp(/^tyblocks_aq(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ar(.*)/).test(input.toAddress) || RegExp(/^tyblocks_as(.*)/).test(input.toAddress) || RegExp(/^keeta_ay(.*)/).test(input.toAddress) || RegExp(/^keeta_az(.*)/).test(input.toAddress) || RegExp(/^keeta_a2(.*)/).test(input.toAddress) || RegExp(/^keeta_a3(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ay(.*)/).test(input.toAddress) || RegExp(/^tyblocks_az(.*)/).test(input.toAddress) || RegExp(/^tyblocks_a2(.*)/).test(input.toAddress) || RegExp(/^tyblocks_a3(.*)/).test(input.toAddress) || RegExp(/^keeta_a4(.*)/).test(input.toAddress) || RegExp(/^keeta_a5(.*)/).test(input.toAddress) || RegExp(/^keeta_a6(.*)/).test(input.toAddress) || RegExp(/^keeta_a7(.*)/).test(input.toAddress) || RegExp(/^tyblocks_a4(.*)/).test(input.toAddress) || RegExp(/^tyblocks_a5(.*)/).test(input.toAddress) || RegExp(/^tyblocks_a6(.*)/).test(input.toAddress) || RegExp(/^tyblocks_a7(.*)/).test(input.toAddress))) && (undefined === input.locale || "string" === typeof input.locale); const _io4 = input => (
|
|
701
|
+
export const isKeetaNotificationAnchorListSubscriptionsResponseJSON = (() => { const _io0 = input => false === input.ok && "string" === typeof input.error; const _io1 = input => true === input.ok && (Array.isArray(input.subscriptions) && input.subscriptions.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io2 = input => "string" === typeof input.id && ("object" === typeof input.subscription && null !== input.subscription && _io3(input.subscription)); const _io3 = input => "RECEIVE_FUNDS" === input.type && ("object" === typeof input.target && null !== input.target && _io4(input.target)) && (undefined === input.toAddress || "string" === typeof input.toAddress && (RegExp(/^keeta_am(.*)/).test(input.toAddress) || RegExp(/^keeta_an(.*)/).test(input.toAddress) || RegExp(/^keeta_ao(.*)/).test(input.toAddress) || RegExp(/^keeta_ap(.*)/).test(input.toAddress) || RegExp(/^tyblocks_am(.*)/).test(input.toAddress) || RegExp(/^tyblocks_an(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ao(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ap(.*)/).test(input.toAddress) || RegExp(/^keeta_aa(.*)/).test(input.toAddress) || RegExp(/^keeta_ab(.*)/).test(input.toAddress) || RegExp(/^keeta_ac(.*)/).test(input.toAddress) || RegExp(/^keeta_ad(.*)/).test(input.toAddress) || RegExp(/^tyblocks_aa(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ab(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ac(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ad(.*)/).test(input.toAddress) || RegExp(/^keeta_ae(.*)/).test(input.toAddress) || RegExp(/^keeta_af(.*)/).test(input.toAddress) || RegExp(/^keeta_ag(.*)/).test(input.toAddress) || RegExp(/^keeta_ah(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ae(.*)/).test(input.toAddress) || RegExp(/^tyblocks_af(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ag(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ah(.*)/).test(input.toAddress) || RegExp(/^keeta_ai(.*)/).test(input.toAddress) || RegExp(/^keeta_aj(.*)/).test(input.toAddress) || RegExp(/^keeta_ak(.*)/).test(input.toAddress) || RegExp(/^keeta_al(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ai(.*)/).test(input.toAddress) || RegExp(/^tyblocks_aj(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ak(.*)/).test(input.toAddress) || RegExp(/^tyblocks_al(.*)/).test(input.toAddress) || RegExp(/^keeta_at(.*)/).test(input.toAddress) || RegExp(/^keeta_aq(.*)/).test(input.toAddress) || RegExp(/^keeta_ar(.*)/).test(input.toAddress) || RegExp(/^keeta_as(.*)/).test(input.toAddress) || RegExp(/^tyblocks_at(.*)/).test(input.toAddress) || RegExp(/^tyblocks_aq(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ar(.*)/).test(input.toAddress) || RegExp(/^tyblocks_as(.*)/).test(input.toAddress) || RegExp(/^keeta_ay(.*)/).test(input.toAddress) || RegExp(/^keeta_az(.*)/).test(input.toAddress) || RegExp(/^keeta_a2(.*)/).test(input.toAddress) || RegExp(/^keeta_a3(.*)/).test(input.toAddress) || RegExp(/^tyblocks_ay(.*)/).test(input.toAddress) || RegExp(/^tyblocks_az(.*)/).test(input.toAddress) || RegExp(/^tyblocks_a2(.*)/).test(input.toAddress) || RegExp(/^tyblocks_a3(.*)/).test(input.toAddress) || RegExp(/^keeta_a4(.*)/).test(input.toAddress) || RegExp(/^keeta_a5(.*)/).test(input.toAddress) || RegExp(/^keeta_a6(.*)/).test(input.toAddress) || RegExp(/^keeta_a7(.*)/).test(input.toAddress) || RegExp(/^tyblocks_a4(.*)/).test(input.toAddress) || RegExp(/^tyblocks_a5(.*)/).test(input.toAddress) || RegExp(/^tyblocks_a6(.*)/).test(input.toAddress) || RegExp(/^tyblocks_a7(.*)/).test(input.toAddress))) && (undefined === input.locale || "string" === typeof input.locale); const _io4 = input => Array.isArray(input.ids) && input.ids.every(elem => "string" === typeof elem) && (undefined === input.provider || "string" === typeof input.provider); const _iu0 = input => (() => {
|
|
702
702
|
if (false === input.ok)
|
|
703
703
|
return _io0(input);
|
|
704
704
|
else if (true === input.ok)
|
|
@@ -57,6 +57,13 @@ export type SessionConfig = {
|
|
|
57
57
|
*/
|
|
58
58
|
defaultVisibility?: StorageObjectVisibility;
|
|
59
59
|
};
|
|
60
|
+
/**
|
|
61
|
+
* Configuration for storage sub-clients.
|
|
62
|
+
*/
|
|
63
|
+
export interface StorageSubClientConfig {
|
|
64
|
+
session: KeetaStorageAnchorSession;
|
|
65
|
+
logger?: Logger | undefined;
|
|
66
|
+
}
|
|
60
67
|
/**
|
|
61
68
|
* An opaque type that represents a provider ID.
|
|
62
69
|
*/
|
|
@@ -141,6 +148,19 @@ export declare class KeetaStorageAnchorSession {
|
|
|
141
148
|
* @returns The object metadata, or null if not found
|
|
142
149
|
*/
|
|
143
150
|
getMetadata(relativePath: string): Promise<StorageObjectMetadata | null>;
|
|
151
|
+
/**
|
|
152
|
+
* Update metadata for an object at a relative path.
|
|
153
|
+
*
|
|
154
|
+
* @param relativePath - The relative path
|
|
155
|
+
* @param options.tags - New tags for the object
|
|
156
|
+
* @param options.visibility - New visibility setting
|
|
157
|
+
*
|
|
158
|
+
* @returns The updated object metadata, or null if not found
|
|
159
|
+
*/
|
|
160
|
+
updateMetadata(relativePath: string, options: {
|
|
161
|
+
tags: string[];
|
|
162
|
+
visibility?: StorageObjectVisibility;
|
|
163
|
+
}): Promise<StorageObjectMetadata | null>;
|
|
144
164
|
/**
|
|
145
165
|
* Delete data at a relative path.
|
|
146
166
|
*
|
|
@@ -234,6 +254,24 @@ export declare class KeetaStorageAnchorProvider extends KeetaStorageAnchorBase {
|
|
|
234
254
|
path: string;
|
|
235
255
|
account?: KeetaNetAccount;
|
|
236
256
|
}): Promise<StorageObjectMetadata | null>;
|
|
257
|
+
/**
|
|
258
|
+
* Update metadata for an existing object without re-uploading data.
|
|
259
|
+
*
|
|
260
|
+
* @param options.path - The storage path
|
|
261
|
+
* @param options.tags - New tags for the object
|
|
262
|
+
* @param options.visibility - New visibility setting
|
|
263
|
+
* @param options.account - Optional account for signing (falls back to client account)
|
|
264
|
+
*
|
|
265
|
+
* @returns The updated object metadata, or null if not found
|
|
266
|
+
*
|
|
267
|
+
* @throws PrivateKeyRequired if no account with private key is available
|
|
268
|
+
*/
|
|
269
|
+
updateMetadata(options: {
|
|
270
|
+
path: string;
|
|
271
|
+
tags: string[];
|
|
272
|
+
visibility: StorageObjectVisibility;
|
|
273
|
+
account?: KeetaNetAccount;
|
|
274
|
+
}): Promise<StorageObjectMetadata | null>;
|
|
237
275
|
/**
|
|
238
276
|
* Put (create/update) an object.
|
|
239
277
|
* Data is automatically wrapped in an EncryptedContainer.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/services/storage/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,IAAI,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACtF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAErD,OAAO,KAAK,EAAE,eAAe,EAAE,iCAAiC,EAA2B,MAAM,uBAAuB,CAAC;AAEzH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,KAAK,EACX,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,uBAAuB,EACvB,qCAAqC,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/services/storage/client.ts"],"names":[],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AQ,CAAC,EAAE,EAAE,MAAM,CAAC;gBAIR,MAAM,EAAE,kBAAkB,EAAE,MAAM,GAAE,8BAAmC;IAqCnF;;OAEG;IACG,YAAY,IAAI,OAAO,CAAC,0BAA0B,EAAE,GAAG,IAAI,CAAC;IAIlE;;OAEG;IACG,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAAC;IAsBrF;;;OAGG;IACG,iBAAiB,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC;IAI5F;;;OAGG;IACG,cAAc,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;CAkBnF;AAED,eAAe,wBAAwB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js";
|
|
2
2
|
import * as __typia_transform__accessExpressionAsString from "typia/lib/internal/_accessExpressionAsString.js";
|
|
3
3
|
import { isKeetaStorageAnchorDeleteResponse, isKeetaStorageAnchorPutResponse, isKeetaStorageAnchorSearchResponse, isKeetaStorageAnchorQuotaResponse } from './common.generated.js';
|
|
4
|
-
import { getKeetaStorageAnchorDeleteRequestSigningData, getKeetaStorageAnchorPutRequestSigningData, getKeetaStorageAnchorGetRequestSigningData, getKeetaStorageAnchorSearchRequestSigningData, getKeetaStorageAnchorQuotaRequestSigningData, parseContainerPayload, Errors, CONTENT_TYPE_JSON, CONTENT_TYPE_OCTET_STREAM, DEFAULT_SIGNED_URL_TTL_SECONDS } from './common.js';
|
|
4
|
+
import { getKeetaStorageAnchorDeleteRequestSigningData, getKeetaStorageAnchorPutRequestSigningData, getKeetaStorageAnchorGetRequestSigningData, getKeetaStorageAnchorSearchRequestSigningData, getKeetaStorageAnchorQuotaRequestSigningData, getKeetaStorageAnchorUpdateMetadataRequestSigningData, parseContainerPayload, Errors, CONTENT_TYPE_JSON, CONTENT_TYPE_OCTET_STREAM, DEFAULT_SIGNED_URL_TTL_SECONDS } from './common.js';
|
|
5
5
|
import { KeetaNet } from '../../client/index.js';
|
|
6
6
|
import { getDefaultResolver } from '../../config.js';
|
|
7
7
|
import { EncryptedContainer } from '../../lib/encrypted-container.js';
|
|
@@ -303,6 +303,25 @@ export class KeetaStorageAnchorSession {
|
|
|
303
303
|
const fullPath = this.#resolvePath(relativePath);
|
|
304
304
|
return (await this.provider.getMetadata({ path: fullPath, account: this.account }));
|
|
305
305
|
}
|
|
306
|
+
/**
|
|
307
|
+
* Update metadata for an object at a relative path.
|
|
308
|
+
*
|
|
309
|
+
* @param relativePath - The relative path
|
|
310
|
+
* @param options.tags - New tags for the object
|
|
311
|
+
* @param options.visibility - New visibility setting
|
|
312
|
+
*
|
|
313
|
+
* @returns The updated object metadata, or null if not found
|
|
314
|
+
*/
|
|
315
|
+
async updateMetadata(relativePath, options) {
|
|
316
|
+
const fullPath = this.#resolvePath(relativePath);
|
|
317
|
+
const visibility = options.visibility ?? this.#defaultVisibility;
|
|
318
|
+
return (await this.provider.updateMetadata({
|
|
319
|
+
path: fullPath,
|
|
320
|
+
tags: options.tags,
|
|
321
|
+
visibility,
|
|
322
|
+
account: this.account
|
|
323
|
+
}));
|
|
324
|
+
}
|
|
306
325
|
/**
|
|
307
326
|
* Delete data at a relative path.
|
|
308
327
|
*
|
|
@@ -390,6 +409,20 @@ export class KeetaStorageAnchorProvider extends KeetaStorageAnchorBase {
|
|
|
390
409
|
this.anchorAccount = null;
|
|
391
410
|
}
|
|
392
411
|
}
|
|
412
|
+
/**
|
|
413
|
+
* Validate tags for client-side constraints before sending to server.
|
|
414
|
+
* @throws Errors.InvalidTag if any tag is empty or contains commas
|
|
415
|
+
*/
|
|
416
|
+
#validateTags(tags) {
|
|
417
|
+
for (const tag of tags) {
|
|
418
|
+
if (!tag || tag.trim().length === 0) {
|
|
419
|
+
throw (new Errors.InvalidTag('Tags cannot be empty'));
|
|
420
|
+
}
|
|
421
|
+
if (tag.includes(',')) {
|
|
422
|
+
throw (new Errors.InvalidTag('Tags cannot contain commas'));
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}
|
|
393
426
|
/**
|
|
394
427
|
* Get operation endpoint data for a given operation.
|
|
395
428
|
*
|
|
@@ -631,16 +664,7 @@ export class KeetaStorageAnchorProvider extends KeetaStorageAnchorBase {
|
|
|
631
664
|
throw (new Errors.AccountRequired());
|
|
632
665
|
}
|
|
633
666
|
const tags = input.tags ?? [];
|
|
634
|
-
|
|
635
|
-
// Validate tags are not empty
|
|
636
|
-
if (!tag || tag.trim().length === 0) {
|
|
637
|
-
throw (new Errors.InvalidTag('Tags cannot be empty'));
|
|
638
|
-
}
|
|
639
|
-
// Validate tags don't contain commas (used as delimiter in query params)
|
|
640
|
-
if (tag.includes(',')) {
|
|
641
|
-
throw (new Errors.InvalidTag('Tags cannot contain commas'));
|
|
642
|
-
}
|
|
643
|
-
}
|
|
667
|
+
this.#validateTags(tags);
|
|
644
668
|
const signable = getKeetaStorageAnchorPutRequestSigningData({ path: input.path, visibility, tags });
|
|
645
669
|
const signed = await SignData(input.account.assertAccount(), signable);
|
|
646
670
|
// Add auth to query params using helper
|
|
@@ -823,6 +847,56 @@ export class KeetaStorageAnchorProvider extends KeetaStorageAnchorBase {
|
|
|
823
847
|
throw (e);
|
|
824
848
|
}
|
|
825
849
|
}
|
|
850
|
+
/**
|
|
851
|
+
* Update metadata for an existing object without re-uploading data.
|
|
852
|
+
*
|
|
853
|
+
* @param options.path - The storage path
|
|
854
|
+
* @param options.tags - New tags for the object
|
|
855
|
+
* @param options.visibility - New visibility setting
|
|
856
|
+
* @param options.account - Optional account for signing (falls back to client account)
|
|
857
|
+
*
|
|
858
|
+
* @returns The updated object metadata, or null if not found
|
|
859
|
+
*
|
|
860
|
+
* @throws PrivateKeyRequired if no account with private key is available
|
|
861
|
+
*/
|
|
862
|
+
async updateMetadata(options) {
|
|
863
|
+
const { path, tags, visibility } = options;
|
|
864
|
+
this.logger?.debug(`Updating metadata at path: ${path}, visibility: ${visibility}, tags: [${tags.join(', ')}]`);
|
|
865
|
+
this.#validateTags(tags);
|
|
866
|
+
const signerAccount = this.#resolveSignerAccount(options.account);
|
|
867
|
+
try {
|
|
868
|
+
const response = await this.#makeRequest({
|
|
869
|
+
method: 'PUT',
|
|
870
|
+
endpoint: 'updateMetadata',
|
|
871
|
+
account: signerAccount,
|
|
872
|
+
pathSuffix: path,
|
|
873
|
+
serializeRequest(body) {
|
|
874
|
+
return ({
|
|
875
|
+
tags: body.tags,
|
|
876
|
+
visibility: body.visibility,
|
|
877
|
+
...(body.account ? { account: body.account.publicKeyString.get() } : {})
|
|
878
|
+
});
|
|
879
|
+
},
|
|
880
|
+
body: { tags, visibility, account: signerAccount },
|
|
881
|
+
getSignedData: function () {
|
|
882
|
+
return (getKeetaStorageAnchorUpdateMetadataRequestSigningData({
|
|
883
|
+
path,
|
|
884
|
+
visibility,
|
|
885
|
+
tags
|
|
886
|
+
}));
|
|
887
|
+
},
|
|
888
|
+
isResponse: isKeetaStorageAnchorPutResponse
|
|
889
|
+
});
|
|
890
|
+
this.logger?.debug(`Update metadata successful for path: ${path}`);
|
|
891
|
+
return (response.object);
|
|
892
|
+
}
|
|
893
|
+
catch (e) {
|
|
894
|
+
if (Errors.DocumentNotFound.isInstance(e)) {
|
|
895
|
+
return (null);
|
|
896
|
+
}
|
|
897
|
+
throw (e);
|
|
898
|
+
}
|
|
899
|
+
}
|
|
826
900
|
/**
|
|
827
901
|
* Put (create/update) an object.
|
|
828
902
|
* Data is automatically wrapped in an EncryptedContainer.
|
|
@@ -997,7 +1071,7 @@ export class KeetaStorageAnchorProvider extends KeetaStorageAnchorBase {
|
|
|
997
1071
|
*/
|
|
998
1072
|
getContactsClient(config) {
|
|
999
1073
|
const session = this.beginSession({ account: config.account, workingDirectory: config.basePath });
|
|
1000
|
-
return (new StorageContactsClient(session));
|
|
1074
|
+
return (new StorageContactsClient({ session, logger: this.logger }));
|
|
1001
1075
|
}
|
|
1002
1076
|
/**
|
|
1003
1077
|
* Get an icons client bound to the given account.
|
|
@@ -1008,7 +1082,7 @@ export class KeetaStorageAnchorProvider extends KeetaStorageAnchorBase {
|
|
|
1008
1082
|
workingDirectory: config.basePath,
|
|
1009
1083
|
defaultVisibility: 'public'
|
|
1010
1084
|
});
|
|
1011
|
-
return (new StorageIconsClient(session));
|
|
1085
|
+
return (new StorageIconsClient({ session, logger: this.logger }));
|
|
1012
1086
|
}
|
|
1013
1087
|
}
|
|
1014
1088
|
class KeetaStorageAnchorClient extends KeetaStorageAnchorBase {
|