@opendatalabs/vana-sdk 0.1.0-alpha.a7bcbd6 → 0.1.0-alpha.aa3959e
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/browser-DY8XDblx.d.ts +241 -0
- package/dist/browser.d.ts +1 -0
- package/dist/browser.js +309 -0
- package/dist/browser.js.map +1 -0
- package/dist/index.browser.d.ts +691 -1242
- package/dist/index.browser.js +1920 -1024
- package/dist/index.browser.js.map +1 -1
- package/dist/index.node.cjs +1903 -1008
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.d.cts +697 -1244
- package/dist/index.node.d.ts +697 -1244
- package/dist/index.node.js +1936 -1041
- package/dist/index.node.js.map +1 -1
- package/dist/node-D9-F9uEP.d.cts +238 -0
- package/dist/node-D9-F9uEP.d.ts +238 -0
- package/dist/node.cjs +348 -0
- package/dist/node.cjs.map +1 -0
- package/dist/node.d.cts +1 -0
- package/dist/node.d.ts +1 -0
- package/dist/node.js +311 -0
- package/dist/node.js.map +1 -0
- package/dist/platform.browser.d.ts +3 -236
- package/dist/platform.browser.js +31 -8
- package/dist/platform.browser.js.map +1 -1
- package/dist/platform.cjs +72 -62
- package/dist/platform.cjs.map +1 -1
- package/dist/platform.d.cts +2 -1
- package/dist/platform.d.ts +2 -1
- package/dist/platform.js +72 -62
- package/dist/platform.js.map +1 -1
- package/dist/platform.node.cjs +72 -62
- package/dist/platform.node.cjs.map +1 -1
- package/dist/platform.node.d.cts +7 -236
- package/dist/platform.node.d.ts +7 -236
- package/dist/platform.node.js +72 -62
- package/dist/platform.node.js.map +1 -1
- package/package.json +7 -3
package/dist/index.browser.d.ts
CHANGED
|
@@ -157,6 +157,14 @@ declare class StorageError extends Error {
|
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
+
/**
|
|
161
|
+
* Base interface for types that need to be compatible with Record<string, unknown>
|
|
162
|
+
*
|
|
163
|
+
* @category Permissions
|
|
164
|
+
*/
|
|
165
|
+
interface RecordCompatible {
|
|
166
|
+
[key: string]: unknown;
|
|
167
|
+
}
|
|
160
168
|
/**
|
|
161
169
|
* Represents on-chain permission grant data without expensive off-chain resolution.
|
|
162
170
|
*
|
|
@@ -355,7 +363,7 @@ interface PermissionGrantMessage {
|
|
|
355
363
|
*
|
|
356
364
|
* @category Permissions
|
|
357
365
|
*/
|
|
358
|
-
interface PermissionInputMessage {
|
|
366
|
+
interface PermissionInputMessage extends RecordCompatible {
|
|
359
367
|
/** Nonce */
|
|
360
368
|
nonce: bigint;
|
|
361
369
|
/** Grantee ID */
|
|
@@ -370,7 +378,7 @@ interface PermissionInputMessage {
|
|
|
370
378
|
*
|
|
371
379
|
* @category Permissions
|
|
372
380
|
*/
|
|
373
|
-
interface RevokePermissionInput {
|
|
381
|
+
interface RevokePermissionInput extends RecordCompatible {
|
|
374
382
|
/** Nonce */
|
|
375
383
|
nonce: bigint;
|
|
376
384
|
/** Permission ID to revoke */
|
|
@@ -392,8 +400,8 @@ interface PermissionInfo {
|
|
|
392
400
|
granteeId: bigint;
|
|
393
401
|
/** Grant URL */
|
|
394
402
|
grant: string;
|
|
395
|
-
/** Signature bytes */
|
|
396
|
-
signature
|
|
403
|
+
/** Signature bytes (removed in newer contract versions) */
|
|
404
|
+
signature?: `0x${string}`;
|
|
397
405
|
/** Start block */
|
|
398
406
|
startBlock: bigint;
|
|
399
407
|
/** End block */
|
|
@@ -451,9 +459,7 @@ interface GrantFile {
|
|
|
451
459
|
*
|
|
452
460
|
* @category Permissions
|
|
453
461
|
*/
|
|
454
|
-
interface PermissionGrantTypedData {
|
|
455
|
-
/** EIP-712 domain */
|
|
456
|
-
domain: PermissionGrantDomain;
|
|
462
|
+
interface PermissionGrantTypedData extends GenericTypedData {
|
|
457
463
|
/** EIP-712 types */
|
|
458
464
|
types: {
|
|
459
465
|
Permission: Array<{
|
|
@@ -471,7 +477,7 @@ interface PermissionGrantTypedData {
|
|
|
471
477
|
*
|
|
472
478
|
* @category Permissions
|
|
473
479
|
*/
|
|
474
|
-
interface GenericTypedData {
|
|
480
|
+
interface GenericTypedData extends RecordCompatible {
|
|
475
481
|
/** EIP-712 domain */
|
|
476
482
|
domain: PermissionGrantDomain;
|
|
477
483
|
/** EIP-712 types */
|
|
@@ -612,13 +618,28 @@ interface Server {
|
|
|
612
618
|
publicKey: string;
|
|
613
619
|
}
|
|
614
620
|
/**
|
|
615
|
-
*
|
|
621
|
+
* Contract ServerInfo structure returned from the contract
|
|
616
622
|
*
|
|
617
623
|
* @category Permissions
|
|
618
624
|
*/
|
|
619
|
-
interface
|
|
625
|
+
interface ServerInfo {
|
|
626
|
+
/** Server ID */
|
|
627
|
+
id: bigint;
|
|
620
628
|
/** Server owner address */
|
|
621
629
|
owner: Address;
|
|
630
|
+
/** Server address */
|
|
631
|
+
serverAddress: Address;
|
|
632
|
+
/** Server public key */
|
|
633
|
+
publicKey: string;
|
|
634
|
+
/** Server URL */
|
|
635
|
+
url: string;
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* Parameters for adding and trusting a server
|
|
639
|
+
*
|
|
640
|
+
* @category Permissions
|
|
641
|
+
*/
|
|
642
|
+
interface AddAndTrustServerParams {
|
|
622
643
|
/** Server address */
|
|
623
644
|
serverAddress: Address;
|
|
624
645
|
/** Server URL */
|
|
@@ -650,11 +671,9 @@ interface UntrustServerParams {
|
|
|
650
671
|
*
|
|
651
672
|
* @category Permissions
|
|
652
673
|
*/
|
|
653
|
-
interface AddAndTrustServerInput {
|
|
674
|
+
interface AddAndTrustServerInput extends RecordCompatible {
|
|
654
675
|
/** User nonce */
|
|
655
676
|
nonce: bigint;
|
|
656
|
-
/** Server owner address */
|
|
657
|
-
owner: Address;
|
|
658
677
|
/** Server address */
|
|
659
678
|
serverAddress: Address;
|
|
660
679
|
/** Server URL */
|
|
@@ -668,7 +687,7 @@ interface AddAndTrustServerInput {
|
|
|
668
687
|
* @category Permissions
|
|
669
688
|
* @deprecated Use AddAndTrustServerInput instead
|
|
670
689
|
*/
|
|
671
|
-
interface TrustServerInput {
|
|
690
|
+
interface TrustServerInput extends RecordCompatible {
|
|
672
691
|
/** User nonce */
|
|
673
692
|
nonce: bigint;
|
|
674
693
|
/** Server ID (numeric) */
|
|
@@ -679,7 +698,7 @@ interface TrustServerInput {
|
|
|
679
698
|
*
|
|
680
699
|
* @category Permissions
|
|
681
700
|
*/
|
|
682
|
-
interface UntrustServerInput {
|
|
701
|
+
interface UntrustServerInput extends RecordCompatible {
|
|
683
702
|
/** User nonce */
|
|
684
703
|
nonce: bigint;
|
|
685
704
|
/** Server ID (numeric) */
|
|
@@ -690,18 +709,16 @@ interface UntrustServerInput {
|
|
|
690
709
|
*
|
|
691
710
|
* @category Permissions
|
|
692
711
|
*/
|
|
693
|
-
interface AddAndTrustServerTypedData {
|
|
694
|
-
/** EIP-712 domain */
|
|
695
|
-
domain: PermissionGrantDomain;
|
|
712
|
+
interface AddAndTrustServerTypedData extends GenericTypedData {
|
|
696
713
|
/** EIP-712 types */
|
|
697
714
|
types: {
|
|
698
|
-
|
|
715
|
+
AddServer: Array<{
|
|
699
716
|
name: string;
|
|
700
717
|
type: string;
|
|
701
718
|
}>;
|
|
702
719
|
};
|
|
703
720
|
/** Primary type */
|
|
704
|
-
primaryType: "
|
|
721
|
+
primaryType: "AddServer";
|
|
705
722
|
/** Message to sign */
|
|
706
723
|
message: AddAndTrustServerInput;
|
|
707
724
|
}
|
|
@@ -711,9 +728,7 @@ interface AddAndTrustServerTypedData {
|
|
|
711
728
|
* @category Permissions
|
|
712
729
|
* @deprecated Use AddAndTrustServerTypedData instead
|
|
713
730
|
*/
|
|
714
|
-
interface TrustServerTypedData {
|
|
715
|
-
/** EIP-712 domain */
|
|
716
|
-
domain: PermissionGrantDomain;
|
|
731
|
+
interface TrustServerTypedData extends GenericTypedData {
|
|
717
732
|
/** EIP-712 types */
|
|
718
733
|
types: {
|
|
719
734
|
TrustServer: Array<{
|
|
@@ -731,9 +746,7 @@ interface TrustServerTypedData {
|
|
|
731
746
|
*
|
|
732
747
|
* @category Permissions
|
|
733
748
|
*/
|
|
734
|
-
interface UntrustServerTypedData {
|
|
735
|
-
/** EIP-712 domain */
|
|
736
|
-
domain: PermissionGrantDomain;
|
|
749
|
+
interface UntrustServerTypedData extends GenericTypedData {
|
|
737
750
|
/** EIP-712 types */
|
|
738
751
|
types: {
|
|
739
752
|
UntrustServer: Array<{
|
|
@@ -769,20 +782,20 @@ interface PermissionEvent {
|
|
|
769
782
|
* @category Permissions
|
|
770
783
|
*/
|
|
771
784
|
interface TrustedServerInfo {
|
|
772
|
-
/** Server ID
|
|
773
|
-
|
|
785
|
+
/** Server ID */
|
|
786
|
+
id: bigint;
|
|
774
787
|
/** Server owner address */
|
|
775
788
|
owner: Address;
|
|
776
|
-
/** Server URL */
|
|
777
|
-
url: string;
|
|
778
789
|
/** Server address */
|
|
779
790
|
serverAddress: Address;
|
|
780
791
|
/** Server public key */
|
|
781
792
|
publicKey: string;
|
|
782
|
-
/**
|
|
783
|
-
|
|
784
|
-
/**
|
|
785
|
-
|
|
793
|
+
/** Server URL */
|
|
794
|
+
url: string;
|
|
795
|
+
/** Start block when trust relationship began */
|
|
796
|
+
startBlock: bigint;
|
|
797
|
+
/** End block when trust relationship ended (0 if still active) */
|
|
798
|
+
endBlock: bigint;
|
|
786
799
|
}
|
|
787
800
|
/**
|
|
788
801
|
* Paginated result for trusted server queries
|
|
@@ -857,6 +870,21 @@ interface Grantee {
|
|
|
857
870
|
/** Permission IDs associated with this grantee */
|
|
858
871
|
permissionIds: number[];
|
|
859
872
|
}
|
|
873
|
+
/**
|
|
874
|
+
* Contract GranteeInfo structure returned from the contract
|
|
875
|
+
*
|
|
876
|
+
* @category Permissions
|
|
877
|
+
*/
|
|
878
|
+
interface GranteeInfo {
|
|
879
|
+
/** Grantee owner address */
|
|
880
|
+
owner: Address;
|
|
881
|
+
/** Grantee address */
|
|
882
|
+
granteeAddress: Address;
|
|
883
|
+
/** Grantee public key */
|
|
884
|
+
publicKey: string;
|
|
885
|
+
/** Permission IDs associated with this grantee */
|
|
886
|
+
permissionIds: readonly bigint[];
|
|
887
|
+
}
|
|
860
888
|
/**
|
|
861
889
|
* Parameters for registering a grantee
|
|
862
890
|
*
|
|
@@ -875,7 +903,7 @@ interface RegisterGranteeParams {
|
|
|
875
903
|
*
|
|
876
904
|
* @category Permissions
|
|
877
905
|
*/
|
|
878
|
-
interface RegisterGranteeInput extends
|
|
906
|
+
interface RegisterGranteeInput extends RecordCompatible {
|
|
879
907
|
/** User nonce */
|
|
880
908
|
nonce: bigint;
|
|
881
909
|
/** Grantee owner address */
|
|
@@ -890,9 +918,7 @@ interface RegisterGranteeInput extends Record<string, unknown> {
|
|
|
890
918
|
*
|
|
891
919
|
* @category Permissions
|
|
892
920
|
*/
|
|
893
|
-
interface RegisterGranteeTypedData {
|
|
894
|
-
/** EIP-712 domain */
|
|
895
|
-
domain: PermissionGrantDomain;
|
|
921
|
+
interface RegisterGranteeTypedData extends GenericTypedData {
|
|
896
922
|
/** EIP-712 types */
|
|
897
923
|
types: {
|
|
898
924
|
RegisterGrantee: Array<{
|
|
@@ -935,6 +961,64 @@ interface PaginatedGrantees {
|
|
|
935
961
|
/** Whether there are more grantees beyond this page */
|
|
936
962
|
hasMore: boolean;
|
|
937
963
|
}
|
|
964
|
+
/**
|
|
965
|
+
* Contract Permission structure as used in ServerFilesAndPermissionInput
|
|
966
|
+
*
|
|
967
|
+
* @category Permissions
|
|
968
|
+
*/
|
|
969
|
+
interface Permission {
|
|
970
|
+
/** Account address for the permission */
|
|
971
|
+
account: Address;
|
|
972
|
+
/** Permission key */
|
|
973
|
+
key: string;
|
|
974
|
+
}
|
|
975
|
+
/**
|
|
976
|
+
* Parameters for server files and permissions operations
|
|
977
|
+
*
|
|
978
|
+
* @category Permissions
|
|
979
|
+
*/
|
|
980
|
+
interface ServerFilesAndPermissionParams {
|
|
981
|
+
/** Grantee ID */
|
|
982
|
+
granteeId: bigint;
|
|
983
|
+
/** Grant URL or grant data */
|
|
984
|
+
grant: string;
|
|
985
|
+
/** File URLs */
|
|
986
|
+
fileUrls: string[];
|
|
987
|
+
/** Server address */
|
|
988
|
+
serverAddress: Address;
|
|
989
|
+
/** Server URL */
|
|
990
|
+
serverUrl: string;
|
|
991
|
+
/** Server public key */
|
|
992
|
+
serverPublicKey: string;
|
|
993
|
+
/** File permissions array - permissions for each file */
|
|
994
|
+
filePermissions: Permission[][];
|
|
995
|
+
}
|
|
996
|
+
/**
|
|
997
|
+
* EIP-712 typed data for server files and permissions messages
|
|
998
|
+
*
|
|
999
|
+
* @category Permissions
|
|
1000
|
+
*/
|
|
1001
|
+
interface ServerFilesAndPermissionTypedData extends GenericTypedData {
|
|
1002
|
+
/** Message data structure */
|
|
1003
|
+
message: {
|
|
1004
|
+
/** User nonce */
|
|
1005
|
+
nonce: bigint;
|
|
1006
|
+
/** Grantee ID */
|
|
1007
|
+
granteeId: bigint;
|
|
1008
|
+
/** Grant URL */
|
|
1009
|
+
grant: string;
|
|
1010
|
+
/** File URLs */
|
|
1011
|
+
fileUrls: string[];
|
|
1012
|
+
/** Server address */
|
|
1013
|
+
serverAddress: Address;
|
|
1014
|
+
/** Server URL */
|
|
1015
|
+
serverUrl: string;
|
|
1016
|
+
/** Server public key */
|
|
1017
|
+
serverPublicKey: string;
|
|
1018
|
+
/** File permissions array - permissions for each file */
|
|
1019
|
+
filePermissions: Permission[][];
|
|
1020
|
+
};
|
|
1021
|
+
}
|
|
938
1022
|
|
|
939
1023
|
/**
|
|
940
1024
|
* Marker interface to indicate that a Vana instance has storage configured.
|
|
@@ -1053,6 +1137,22 @@ interface RelayerCallbacks {
|
|
|
1053
1137
|
* @returns Promise resolving to the transaction hash
|
|
1054
1138
|
*/
|
|
1055
1139
|
submitAddAndTrustServer?: (typedData: AddAndTrustServerTypedData, signature: Hash) => Promise<Hash>;
|
|
1140
|
+
/**
|
|
1141
|
+
* Submit a signed permission addition transaction for relay
|
|
1142
|
+
*
|
|
1143
|
+
* @param typedData - The EIP-712 typed data that was signed
|
|
1144
|
+
* @param signature - The user's signature
|
|
1145
|
+
* @returns Promise resolving to the transaction hash
|
|
1146
|
+
*/
|
|
1147
|
+
submitAddPermission?: (typedData: GenericTypedData, signature: Hash) => Promise<Hash>;
|
|
1148
|
+
/**
|
|
1149
|
+
* Submit a signed server files and permissions transaction for relay
|
|
1150
|
+
*
|
|
1151
|
+
* @param typedData - The EIP-712 typed data that was signed
|
|
1152
|
+
* @param signature - The user's signature
|
|
1153
|
+
* @returns Promise resolving to the transaction hash
|
|
1154
|
+
*/
|
|
1155
|
+
submitAddServerFilesAndPermissions?: (typedData: ServerFilesAndPermissionTypedData, signature: Hash) => Promise<Hash>;
|
|
1056
1156
|
/**
|
|
1057
1157
|
* Submit a file addition for relay
|
|
1058
1158
|
*
|
|
@@ -1554,7 +1654,7 @@ interface ConfigValidationResult {
|
|
|
1554
1654
|
/**
|
|
1555
1655
|
* Union type of all canonical Vana contract names
|
|
1556
1656
|
*/
|
|
1557
|
-
type VanaContractName = "
|
|
1657
|
+
type VanaContractName = "DataPortabilityPermissions" | "DataPortabilityServers" | "DataPortabilityGrantees" | "DataRegistry" | "TeePool" | "ComputeEngine" | "TeePoolPhala" | "DataRefinerRegistry" | "QueryEngine" | "ComputeInstructionRegistry" | "TeePoolEphemeralStandard" | "TeePoolPersistentStandard" | "TeePoolPersistentGpu" | "TeePoolDedicatedStandard" | "TeePoolDedicatedGpu" | "VanaEpoch" | "DLPRegistry" | "DLPRegistryTreasury" | "DLPPerformance" | "DLPRewardDeployer" | "DLPRewardDeployerTreasury" | "DLPRewardSwap" | "SwapHelper" | "VanaPoolStaking" | "VanaPoolEntity" | "VanaPoolTreasury" | "DAT" | "DATFactory" | "DATPausable" | "DATVotes" | "DataLiquidityPool" | "DLPRoot";
|
|
1558
1658
|
/**
|
|
1559
1659
|
* Contract information with typed address and ABI
|
|
1560
1660
|
*/
|
|
@@ -2250,7 +2350,7 @@ interface GetUserTrustedServersResult {
|
|
|
2250
2350
|
}
|
|
2251
2351
|
|
|
2252
2352
|
declare const contractAbis: {
|
|
2253
|
-
readonly
|
|
2353
|
+
readonly DataPortabilityPermissions: readonly [{
|
|
2254
2354
|
readonly inputs: readonly [];
|
|
2255
2355
|
readonly stateMutability: "nonpayable";
|
|
2256
2356
|
readonly type: "constructor";
|
|
@@ -2354,922 +2454,17 @@ declare const contractAbis: {
|
|
|
2354
2454
|
}];
|
|
2355
2455
|
readonly name: "InvalidNonce";
|
|
2356
2456
|
readonly type: "error";
|
|
2357
|
-
}, {
|
|
2358
|
-
readonly inputs: readonly [];
|
|
2359
|
-
readonly name: "InvalidSignature";
|
|
2360
|
-
readonly type: "error";
|
|
2361
|
-
}, {
|
|
2362
|
-
readonly inputs: readonly [{
|
|
2363
|
-
readonly internalType: "address";
|
|
2364
|
-
readonly name: "fileOwner";
|
|
2365
|
-
readonly type: "address";
|
|
2366
|
-
}, {
|
|
2367
|
-
readonly internalType: "address";
|
|
2368
|
-
readonly name: "requestor";
|
|
2369
|
-
readonly type: "address";
|
|
2370
|
-
}];
|
|
2371
|
-
readonly name: "NotFileOwner";
|
|
2372
|
-
readonly type: "error";
|
|
2373
|
-
}, {
|
|
2374
|
-
readonly inputs: readonly [];
|
|
2375
|
-
readonly name: "NotInitializing";
|
|
2376
|
-
readonly type: "error";
|
|
2377
|
-
}, {
|
|
2378
|
-
readonly inputs: readonly [{
|
|
2379
|
-
readonly internalType: "address";
|
|
2380
|
-
readonly name: "permissionOwner";
|
|
2381
|
-
readonly type: "address";
|
|
2382
|
-
}, {
|
|
2383
|
-
readonly internalType: "address";
|
|
2384
|
-
readonly name: "requestor";
|
|
2385
|
-
readonly type: "address";
|
|
2386
|
-
}];
|
|
2387
|
-
readonly name: "NotPermissionGrantor";
|
|
2388
|
-
readonly type: "error";
|
|
2389
|
-
}, {
|
|
2390
|
-
readonly inputs: readonly [];
|
|
2391
|
-
readonly name: "UUPSUnauthorizedCallContext";
|
|
2392
|
-
readonly type: "error";
|
|
2393
|
-
}, {
|
|
2394
|
-
readonly inputs: readonly [{
|
|
2395
|
-
readonly internalType: "bytes32";
|
|
2396
|
-
readonly name: "slot";
|
|
2397
|
-
readonly type: "bytes32";
|
|
2398
|
-
}];
|
|
2399
|
-
readonly name: "UUPSUnsupportedProxiableUUID";
|
|
2400
|
-
readonly type: "error";
|
|
2401
|
-
}, {
|
|
2402
|
-
readonly inputs: readonly [];
|
|
2403
|
-
readonly name: "ZeroAddress";
|
|
2404
|
-
readonly type: "error";
|
|
2405
|
-
}, {
|
|
2406
|
-
readonly anonymous: false;
|
|
2407
|
-
readonly inputs: readonly [];
|
|
2408
|
-
readonly name: "EIP712DomainChanged";
|
|
2409
|
-
readonly type: "event";
|
|
2410
|
-
}, {
|
|
2411
|
-
readonly anonymous: false;
|
|
2412
|
-
readonly inputs: readonly [{
|
|
2413
|
-
readonly indexed: false;
|
|
2414
|
-
readonly internalType: "uint64";
|
|
2415
|
-
readonly name: "version";
|
|
2416
|
-
readonly type: "uint64";
|
|
2417
|
-
}];
|
|
2418
|
-
readonly name: "Initialized";
|
|
2419
|
-
readonly type: "event";
|
|
2420
|
-
}, {
|
|
2421
|
-
readonly anonymous: false;
|
|
2422
|
-
readonly inputs: readonly [{
|
|
2423
|
-
readonly indexed: false;
|
|
2424
|
-
readonly internalType: "address";
|
|
2425
|
-
readonly name: "account";
|
|
2426
|
-
readonly type: "address";
|
|
2427
|
-
}];
|
|
2428
|
-
readonly name: "Paused";
|
|
2429
|
-
readonly type: "event";
|
|
2430
|
-
}, {
|
|
2431
|
-
readonly anonymous: false;
|
|
2432
|
-
readonly inputs: readonly [{
|
|
2433
|
-
readonly indexed: true;
|
|
2434
|
-
readonly internalType: "uint256";
|
|
2435
|
-
readonly name: "permissionId";
|
|
2436
|
-
readonly type: "uint256";
|
|
2437
|
-
}, {
|
|
2438
|
-
readonly indexed: true;
|
|
2439
|
-
readonly internalType: "address";
|
|
2440
|
-
readonly name: "user";
|
|
2441
|
-
readonly type: "address";
|
|
2442
|
-
}, {
|
|
2443
|
-
readonly indexed: true;
|
|
2444
|
-
readonly internalType: "uint256";
|
|
2445
|
-
readonly name: "granteeId";
|
|
2446
|
-
readonly type: "uint256";
|
|
2447
|
-
}, {
|
|
2448
|
-
readonly indexed: false;
|
|
2449
|
-
readonly internalType: "string";
|
|
2450
|
-
readonly name: "grant";
|
|
2451
|
-
readonly type: "string";
|
|
2452
|
-
}, {
|
|
2453
|
-
readonly indexed: false;
|
|
2454
|
-
readonly internalType: "uint256[]";
|
|
2455
|
-
readonly name: "fileIds";
|
|
2456
|
-
readonly type: "uint256[]";
|
|
2457
|
-
}];
|
|
2458
|
-
readonly name: "PermissionAdded";
|
|
2459
|
-
readonly type: "event";
|
|
2460
|
-
}, {
|
|
2461
|
-
readonly anonymous: false;
|
|
2462
|
-
readonly inputs: readonly [{
|
|
2463
|
-
readonly indexed: true;
|
|
2464
|
-
readonly internalType: "uint256";
|
|
2465
|
-
readonly name: "permissionId";
|
|
2466
|
-
readonly type: "uint256";
|
|
2467
|
-
}];
|
|
2468
|
-
readonly name: "PermissionRevoked";
|
|
2469
|
-
readonly type: "event";
|
|
2470
|
-
}, {
|
|
2471
|
-
readonly anonymous: false;
|
|
2472
|
-
readonly inputs: readonly [{
|
|
2473
|
-
readonly indexed: true;
|
|
2474
|
-
readonly internalType: "bytes32";
|
|
2475
|
-
readonly name: "role";
|
|
2476
|
-
readonly type: "bytes32";
|
|
2477
|
-
}, {
|
|
2478
|
-
readonly indexed: true;
|
|
2479
|
-
readonly internalType: "bytes32";
|
|
2480
|
-
readonly name: "previousAdminRole";
|
|
2481
|
-
readonly type: "bytes32";
|
|
2482
|
-
}, {
|
|
2483
|
-
readonly indexed: true;
|
|
2484
|
-
readonly internalType: "bytes32";
|
|
2485
|
-
readonly name: "newAdminRole";
|
|
2486
|
-
readonly type: "bytes32";
|
|
2487
|
-
}];
|
|
2488
|
-
readonly name: "RoleAdminChanged";
|
|
2489
|
-
readonly type: "event";
|
|
2490
|
-
}, {
|
|
2491
|
-
readonly anonymous: false;
|
|
2492
|
-
readonly inputs: readonly [{
|
|
2493
|
-
readonly indexed: true;
|
|
2494
|
-
readonly internalType: "bytes32";
|
|
2495
|
-
readonly name: "role";
|
|
2496
|
-
readonly type: "bytes32";
|
|
2497
|
-
}, {
|
|
2498
|
-
readonly indexed: true;
|
|
2499
|
-
readonly internalType: "address";
|
|
2500
|
-
readonly name: "account";
|
|
2501
|
-
readonly type: "address";
|
|
2502
|
-
}, {
|
|
2503
|
-
readonly indexed: true;
|
|
2504
|
-
readonly internalType: "address";
|
|
2505
|
-
readonly name: "sender";
|
|
2506
|
-
readonly type: "address";
|
|
2507
|
-
}];
|
|
2508
|
-
readonly name: "RoleGranted";
|
|
2509
|
-
readonly type: "event";
|
|
2510
|
-
}, {
|
|
2511
|
-
readonly anonymous: false;
|
|
2512
|
-
readonly inputs: readonly [{
|
|
2513
|
-
readonly indexed: true;
|
|
2514
|
-
readonly internalType: "bytes32";
|
|
2515
|
-
readonly name: "role";
|
|
2516
|
-
readonly type: "bytes32";
|
|
2517
|
-
}, {
|
|
2518
|
-
readonly indexed: true;
|
|
2519
|
-
readonly internalType: "address";
|
|
2520
|
-
readonly name: "account";
|
|
2521
|
-
readonly type: "address";
|
|
2522
|
-
}, {
|
|
2523
|
-
readonly indexed: true;
|
|
2524
|
-
readonly internalType: "address";
|
|
2525
|
-
readonly name: "sender";
|
|
2526
|
-
readonly type: "address";
|
|
2527
|
-
}];
|
|
2528
|
-
readonly name: "RoleRevoked";
|
|
2529
|
-
readonly type: "event";
|
|
2530
|
-
}, {
|
|
2531
|
-
readonly anonymous: false;
|
|
2532
|
-
readonly inputs: readonly [{
|
|
2533
|
-
readonly indexed: false;
|
|
2534
|
-
readonly internalType: "address";
|
|
2535
|
-
readonly name: "account";
|
|
2536
|
-
readonly type: "address";
|
|
2537
|
-
}];
|
|
2538
|
-
readonly name: "Unpaused";
|
|
2539
|
-
readonly type: "event";
|
|
2540
|
-
}, {
|
|
2541
|
-
readonly anonymous: false;
|
|
2542
|
-
readonly inputs: readonly [{
|
|
2543
|
-
readonly indexed: true;
|
|
2544
|
-
readonly internalType: "address";
|
|
2545
|
-
readonly name: "implementation";
|
|
2546
|
-
readonly type: "address";
|
|
2547
|
-
}];
|
|
2548
|
-
readonly name: "Upgraded";
|
|
2549
|
-
readonly type: "event";
|
|
2550
|
-
}, {
|
|
2551
|
-
readonly inputs: readonly [];
|
|
2552
|
-
readonly name: "DEFAULT_ADMIN_ROLE";
|
|
2553
|
-
readonly outputs: readonly [{
|
|
2554
|
-
readonly internalType: "bytes32";
|
|
2555
|
-
readonly name: "";
|
|
2556
|
-
readonly type: "bytes32";
|
|
2557
|
-
}];
|
|
2558
|
-
readonly stateMutability: "view";
|
|
2559
|
-
readonly type: "function";
|
|
2560
|
-
}, {
|
|
2561
|
-
readonly inputs: readonly [];
|
|
2562
|
-
readonly name: "MAINTAINER_ROLE";
|
|
2563
|
-
readonly outputs: readonly [{
|
|
2564
|
-
readonly internalType: "bytes32";
|
|
2565
|
-
readonly name: "";
|
|
2566
|
-
readonly type: "bytes32";
|
|
2567
|
-
}];
|
|
2568
|
-
readonly stateMutability: "view";
|
|
2569
|
-
readonly type: "function";
|
|
2570
|
-
}, {
|
|
2571
|
-
readonly inputs: readonly [];
|
|
2572
|
-
readonly name: "UPGRADE_INTERFACE_VERSION";
|
|
2573
|
-
readonly outputs: readonly [{
|
|
2574
|
-
readonly internalType: "string";
|
|
2575
|
-
readonly name: "";
|
|
2576
|
-
readonly type: "string";
|
|
2577
|
-
}];
|
|
2578
|
-
readonly stateMutability: "view";
|
|
2579
|
-
readonly type: "function";
|
|
2580
|
-
}, {
|
|
2581
|
-
readonly inputs: readonly [{
|
|
2582
|
-
readonly components: readonly [{
|
|
2583
|
-
readonly internalType: "uint256";
|
|
2584
|
-
readonly name: "nonce";
|
|
2585
|
-
readonly type: "uint256";
|
|
2586
|
-
}, {
|
|
2587
|
-
readonly internalType: "uint256";
|
|
2588
|
-
readonly name: "granteeId";
|
|
2589
|
-
readonly type: "uint256";
|
|
2590
|
-
}, {
|
|
2591
|
-
readonly internalType: "string";
|
|
2592
|
-
readonly name: "grant";
|
|
2593
|
-
readonly type: "string";
|
|
2594
|
-
}, {
|
|
2595
|
-
readonly internalType: "uint256[]";
|
|
2596
|
-
readonly name: "fileIds";
|
|
2597
|
-
readonly type: "uint256[]";
|
|
2598
|
-
}];
|
|
2599
|
-
readonly internalType: "struct IDataPortabilityPermissions.PermissionInput";
|
|
2600
|
-
readonly name: "permissionInput";
|
|
2601
|
-
readonly type: "tuple";
|
|
2602
|
-
}, {
|
|
2603
|
-
readonly internalType: "bytes";
|
|
2604
|
-
readonly name: "signature";
|
|
2605
|
-
readonly type: "bytes";
|
|
2606
|
-
}];
|
|
2607
|
-
readonly name: "addPermission";
|
|
2608
|
-
readonly outputs: readonly [{
|
|
2609
|
-
readonly internalType: "uint256";
|
|
2610
|
-
readonly name: "";
|
|
2611
|
-
readonly type: "uint256";
|
|
2612
|
-
}];
|
|
2613
|
-
readonly stateMutability: "nonpayable";
|
|
2614
|
-
readonly type: "function";
|
|
2615
|
-
}, {
|
|
2616
|
-
readonly inputs: readonly [];
|
|
2617
|
-
readonly name: "dataPortabilityGrantees";
|
|
2618
|
-
readonly outputs: readonly [{
|
|
2619
|
-
readonly internalType: "contract IDataPortabilityGrantees";
|
|
2620
|
-
readonly name: "";
|
|
2621
|
-
readonly type: "address";
|
|
2622
|
-
}];
|
|
2623
|
-
readonly stateMutability: "view";
|
|
2624
|
-
readonly type: "function";
|
|
2625
|
-
}, {
|
|
2626
|
-
readonly inputs: readonly [];
|
|
2627
|
-
readonly name: "dataPortabilityServers";
|
|
2628
|
-
readonly outputs: readonly [{
|
|
2629
|
-
readonly internalType: "contract IDataPortabilityServers";
|
|
2630
|
-
readonly name: "";
|
|
2631
|
-
readonly type: "address";
|
|
2632
|
-
}];
|
|
2633
|
-
readonly stateMutability: "view";
|
|
2634
|
-
readonly type: "function";
|
|
2635
|
-
}, {
|
|
2636
|
-
readonly inputs: readonly [];
|
|
2637
|
-
readonly name: "dataRegistry";
|
|
2638
|
-
readonly outputs: readonly [{
|
|
2639
|
-
readonly internalType: "contract IDataRegistry";
|
|
2640
|
-
readonly name: "";
|
|
2641
|
-
readonly type: "address";
|
|
2642
|
-
}];
|
|
2643
|
-
readonly stateMutability: "view";
|
|
2644
|
-
readonly type: "function";
|
|
2645
|
-
}, {
|
|
2646
|
-
readonly inputs: readonly [];
|
|
2647
|
-
readonly name: "eip712Domain";
|
|
2648
|
-
readonly outputs: readonly [{
|
|
2649
|
-
readonly internalType: "bytes1";
|
|
2650
|
-
readonly name: "fields";
|
|
2651
|
-
readonly type: "bytes1";
|
|
2652
|
-
}, {
|
|
2653
|
-
readonly internalType: "string";
|
|
2654
|
-
readonly name: "name";
|
|
2655
|
-
readonly type: "string";
|
|
2656
|
-
}, {
|
|
2657
|
-
readonly internalType: "string";
|
|
2658
|
-
readonly name: "version";
|
|
2659
|
-
readonly type: "string";
|
|
2660
|
-
}, {
|
|
2661
|
-
readonly internalType: "uint256";
|
|
2662
|
-
readonly name: "chainId";
|
|
2663
|
-
readonly type: "uint256";
|
|
2664
|
-
}, {
|
|
2665
|
-
readonly internalType: "address";
|
|
2666
|
-
readonly name: "verifyingContract";
|
|
2667
|
-
readonly type: "address";
|
|
2668
|
-
}, {
|
|
2669
|
-
readonly internalType: "bytes32";
|
|
2670
|
-
readonly name: "salt";
|
|
2671
|
-
readonly type: "bytes32";
|
|
2672
|
-
}, {
|
|
2673
|
-
readonly internalType: "uint256[]";
|
|
2674
|
-
readonly name: "extensions";
|
|
2675
|
-
readonly type: "uint256[]";
|
|
2676
|
-
}];
|
|
2677
|
-
readonly stateMutability: "view";
|
|
2678
|
-
readonly type: "function";
|
|
2679
|
-
}, {
|
|
2680
|
-
readonly inputs: readonly [{
|
|
2681
|
-
readonly internalType: "uint256";
|
|
2682
|
-
readonly name: "fileId";
|
|
2683
|
-
readonly type: "uint256";
|
|
2684
|
-
}];
|
|
2685
|
-
readonly name: "filePermissionIds";
|
|
2686
|
-
readonly outputs: readonly [{
|
|
2687
|
-
readonly internalType: "uint256[]";
|
|
2688
|
-
readonly name: "";
|
|
2689
|
-
readonly type: "uint256[]";
|
|
2690
|
-
}];
|
|
2691
|
-
readonly stateMutability: "view";
|
|
2692
|
-
readonly type: "function";
|
|
2693
|
-
}, {
|
|
2694
|
-
readonly inputs: readonly [{
|
|
2695
|
-
readonly internalType: "uint256";
|
|
2696
|
-
readonly name: "fileId";
|
|
2697
|
-
readonly type: "uint256";
|
|
2698
|
-
}];
|
|
2699
|
-
readonly name: "filePermissions";
|
|
2700
|
-
readonly outputs: readonly [{
|
|
2701
|
-
readonly internalType: "uint256[]";
|
|
2702
|
-
readonly name: "";
|
|
2703
|
-
readonly type: "uint256[]";
|
|
2704
|
-
}];
|
|
2705
|
-
readonly stateMutability: "view";
|
|
2706
|
-
readonly type: "function";
|
|
2707
|
-
}, {
|
|
2708
|
-
readonly inputs: readonly [{
|
|
2709
|
-
readonly internalType: "bytes32";
|
|
2710
|
-
readonly name: "role";
|
|
2711
|
-
readonly type: "bytes32";
|
|
2712
|
-
}];
|
|
2713
|
-
readonly name: "getRoleAdmin";
|
|
2714
|
-
readonly outputs: readonly [{
|
|
2715
|
-
readonly internalType: "bytes32";
|
|
2716
|
-
readonly name: "";
|
|
2717
|
-
readonly type: "bytes32";
|
|
2718
|
-
}];
|
|
2719
|
-
readonly stateMutability: "view";
|
|
2720
|
-
readonly type: "function";
|
|
2721
|
-
}, {
|
|
2722
|
-
readonly inputs: readonly [{
|
|
2723
|
-
readonly internalType: "bytes32";
|
|
2724
|
-
readonly name: "role";
|
|
2725
|
-
readonly type: "bytes32";
|
|
2726
|
-
}, {
|
|
2727
|
-
readonly internalType: "address";
|
|
2728
|
-
readonly name: "account";
|
|
2729
|
-
readonly type: "address";
|
|
2730
|
-
}];
|
|
2731
|
-
readonly name: "grantRole";
|
|
2732
|
-
readonly outputs: readonly [];
|
|
2733
|
-
readonly stateMutability: "nonpayable";
|
|
2734
|
-
readonly type: "function";
|
|
2735
|
-
}, {
|
|
2736
|
-
readonly inputs: readonly [{
|
|
2737
|
-
readonly internalType: "bytes32";
|
|
2738
|
-
readonly name: "role";
|
|
2739
|
-
readonly type: "bytes32";
|
|
2740
|
-
}, {
|
|
2741
|
-
readonly internalType: "address";
|
|
2742
|
-
readonly name: "account";
|
|
2743
|
-
readonly type: "address";
|
|
2744
|
-
}];
|
|
2745
|
-
readonly name: "hasRole";
|
|
2746
|
-
readonly outputs: readonly [{
|
|
2747
|
-
readonly internalType: "bool";
|
|
2748
|
-
readonly name: "";
|
|
2749
|
-
readonly type: "bool";
|
|
2750
|
-
}];
|
|
2751
|
-
readonly stateMutability: "view";
|
|
2752
|
-
readonly type: "function";
|
|
2753
|
-
}, {
|
|
2754
|
-
readonly inputs: readonly [{
|
|
2755
|
-
readonly internalType: "address";
|
|
2756
|
-
readonly name: "trustedForwarderAddress";
|
|
2757
|
-
readonly type: "address";
|
|
2758
|
-
}, {
|
|
2759
|
-
readonly internalType: "address";
|
|
2760
|
-
readonly name: "ownerAddress";
|
|
2761
|
-
readonly type: "address";
|
|
2762
|
-
}, {
|
|
2763
|
-
readonly internalType: "contract IDataRegistry";
|
|
2764
|
-
readonly name: "dataRegistryAddress";
|
|
2765
|
-
readonly type: "address";
|
|
2766
|
-
}, {
|
|
2767
|
-
readonly internalType: "contract IDataPortabilityServers";
|
|
2768
|
-
readonly name: "serversContractAddr";
|
|
2769
|
-
readonly type: "address";
|
|
2770
|
-
}, {
|
|
2771
|
-
readonly internalType: "contract IDataPortabilityGrantees";
|
|
2772
|
-
readonly name: "granteesContractAddr";
|
|
2773
|
-
readonly type: "address";
|
|
2774
|
-
}];
|
|
2775
|
-
readonly name: "initialize";
|
|
2776
|
-
readonly outputs: readonly [];
|
|
2777
|
-
readonly stateMutability: "nonpayable";
|
|
2778
|
-
readonly type: "function";
|
|
2779
|
-
}, {
|
|
2780
|
-
readonly inputs: readonly [{
|
|
2781
|
-
readonly internalType: "uint256";
|
|
2782
|
-
readonly name: "permissionId";
|
|
2783
|
-
readonly type: "uint256";
|
|
2784
|
-
}];
|
|
2785
|
-
readonly name: "isActivePermission";
|
|
2786
|
-
readonly outputs: readonly [{
|
|
2787
|
-
readonly internalType: "bool";
|
|
2788
|
-
readonly name: "";
|
|
2789
|
-
readonly type: "bool";
|
|
2790
|
-
}];
|
|
2791
|
-
readonly stateMutability: "view";
|
|
2792
|
-
readonly type: "function";
|
|
2793
|
-
}, {
|
|
2794
|
-
readonly inputs: readonly [{
|
|
2795
|
-
readonly internalType: "address";
|
|
2796
|
-
readonly name: "forwarder";
|
|
2797
|
-
readonly type: "address";
|
|
2798
|
-
}];
|
|
2799
|
-
readonly name: "isTrustedForwarder";
|
|
2800
|
-
readonly outputs: readonly [{
|
|
2801
|
-
readonly internalType: "bool";
|
|
2802
|
-
readonly name: "";
|
|
2803
|
-
readonly type: "bool";
|
|
2804
|
-
}];
|
|
2805
|
-
readonly stateMutability: "view";
|
|
2806
|
-
readonly type: "function";
|
|
2807
|
-
}, {
|
|
2808
|
-
readonly inputs: readonly [{
|
|
2809
|
-
readonly internalType: "bytes[]";
|
|
2810
|
-
readonly name: "data";
|
|
2811
|
-
readonly type: "bytes[]";
|
|
2812
|
-
}];
|
|
2813
|
-
readonly name: "multicall";
|
|
2814
|
-
readonly outputs: readonly [{
|
|
2815
|
-
readonly internalType: "bytes[]";
|
|
2816
|
-
readonly name: "results";
|
|
2817
|
-
readonly type: "bytes[]";
|
|
2818
|
-
}];
|
|
2819
|
-
readonly stateMutability: "nonpayable";
|
|
2820
|
-
readonly type: "function";
|
|
2821
|
-
}, {
|
|
2822
|
-
readonly inputs: readonly [];
|
|
2823
|
-
readonly name: "pause";
|
|
2824
|
-
readonly outputs: readonly [];
|
|
2825
|
-
readonly stateMutability: "nonpayable";
|
|
2826
|
-
readonly type: "function";
|
|
2827
|
-
}, {
|
|
2828
|
-
readonly inputs: readonly [];
|
|
2829
|
-
readonly name: "paused";
|
|
2830
|
-
readonly outputs: readonly [{
|
|
2831
|
-
readonly internalType: "bool";
|
|
2832
|
-
readonly name: "";
|
|
2833
|
-
readonly type: "bool";
|
|
2834
|
-
}];
|
|
2835
|
-
readonly stateMutability: "view";
|
|
2836
|
-
readonly type: "function";
|
|
2837
|
-
}, {
|
|
2838
|
-
readonly inputs: readonly [{
|
|
2839
|
-
readonly internalType: "uint256";
|
|
2840
|
-
readonly name: "permissionId";
|
|
2841
|
-
readonly type: "uint256";
|
|
2842
|
-
}];
|
|
2843
|
-
readonly name: "permissionFileIds";
|
|
2844
|
-
readonly outputs: readonly [{
|
|
2845
|
-
readonly internalType: "uint256[]";
|
|
2846
|
-
readonly name: "";
|
|
2847
|
-
readonly type: "uint256[]";
|
|
2848
|
-
}];
|
|
2849
|
-
readonly stateMutability: "view";
|
|
2850
|
-
readonly type: "function";
|
|
2851
|
-
}, {
|
|
2852
|
-
readonly inputs: readonly [{
|
|
2853
|
-
readonly internalType: "uint256";
|
|
2854
|
-
readonly name: "permissionId";
|
|
2855
|
-
readonly type: "uint256";
|
|
2856
|
-
}];
|
|
2857
|
-
readonly name: "permissions";
|
|
2858
|
-
readonly outputs: readonly [{
|
|
2859
|
-
readonly components: readonly [{
|
|
2860
|
-
readonly internalType: "uint256";
|
|
2861
|
-
readonly name: "id";
|
|
2862
|
-
readonly type: "uint256";
|
|
2863
|
-
}, {
|
|
2864
|
-
readonly internalType: "address";
|
|
2865
|
-
readonly name: "grantor";
|
|
2866
|
-
readonly type: "address";
|
|
2867
|
-
}, {
|
|
2868
|
-
readonly internalType: "uint256";
|
|
2869
|
-
readonly name: "nonce";
|
|
2870
|
-
readonly type: "uint256";
|
|
2871
|
-
}, {
|
|
2872
|
-
readonly internalType: "uint256";
|
|
2873
|
-
readonly name: "granteeId";
|
|
2874
|
-
readonly type: "uint256";
|
|
2875
|
-
}, {
|
|
2876
|
-
readonly internalType: "string";
|
|
2877
|
-
readonly name: "grant";
|
|
2878
|
-
readonly type: "string";
|
|
2879
|
-
}, {
|
|
2880
|
-
readonly internalType: "bytes";
|
|
2881
|
-
readonly name: "signature";
|
|
2882
|
-
readonly type: "bytes";
|
|
2883
|
-
}, {
|
|
2884
|
-
readonly internalType: "uint256";
|
|
2885
|
-
readonly name: "startBlock";
|
|
2886
|
-
readonly type: "uint256";
|
|
2887
|
-
}, {
|
|
2888
|
-
readonly internalType: "uint256";
|
|
2889
|
-
readonly name: "endBlock";
|
|
2890
|
-
readonly type: "uint256";
|
|
2891
|
-
}, {
|
|
2892
|
-
readonly internalType: "uint256[]";
|
|
2893
|
-
readonly name: "fileIds";
|
|
2894
|
-
readonly type: "uint256[]";
|
|
2895
|
-
}];
|
|
2896
|
-
readonly internalType: "struct IDataPortabilityPermissions.PermissionInfo";
|
|
2897
|
-
readonly name: "";
|
|
2898
|
-
readonly type: "tuple";
|
|
2899
|
-
}];
|
|
2900
|
-
readonly stateMutability: "view";
|
|
2901
|
-
readonly type: "function";
|
|
2902
|
-
}, {
|
|
2903
|
-
readonly inputs: readonly [];
|
|
2904
|
-
readonly name: "permissionsCount";
|
|
2905
|
-
readonly outputs: readonly [{
|
|
2906
|
-
readonly internalType: "uint256";
|
|
2907
|
-
readonly name: "";
|
|
2908
|
-
readonly type: "uint256";
|
|
2909
|
-
}];
|
|
2910
|
-
readonly stateMutability: "view";
|
|
2911
|
-
readonly type: "function";
|
|
2912
|
-
}, {
|
|
2913
|
-
readonly inputs: readonly [];
|
|
2914
|
-
readonly name: "proxiableUUID";
|
|
2915
|
-
readonly outputs: readonly [{
|
|
2916
|
-
readonly internalType: "bytes32";
|
|
2917
|
-
readonly name: "";
|
|
2918
|
-
readonly type: "bytes32";
|
|
2919
|
-
}];
|
|
2920
|
-
readonly stateMutability: "view";
|
|
2921
|
-
readonly type: "function";
|
|
2922
|
-
}, {
|
|
2923
|
-
readonly inputs: readonly [{
|
|
2924
|
-
readonly internalType: "bytes32";
|
|
2925
|
-
readonly name: "role";
|
|
2926
|
-
readonly type: "bytes32";
|
|
2927
|
-
}, {
|
|
2928
|
-
readonly internalType: "address";
|
|
2929
|
-
readonly name: "callerConfirmation";
|
|
2930
|
-
readonly type: "address";
|
|
2931
|
-
}];
|
|
2932
|
-
readonly name: "renounceRole";
|
|
2933
|
-
readonly outputs: readonly [];
|
|
2934
|
-
readonly stateMutability: "nonpayable";
|
|
2935
|
-
readonly type: "function";
|
|
2936
|
-
}, {
|
|
2937
|
-
readonly inputs: readonly [{
|
|
2938
|
-
readonly internalType: "uint256";
|
|
2939
|
-
readonly name: "permissionId";
|
|
2940
|
-
readonly type: "uint256";
|
|
2941
|
-
}];
|
|
2942
|
-
readonly name: "revokePermission";
|
|
2943
|
-
readonly outputs: readonly [];
|
|
2944
|
-
readonly stateMutability: "nonpayable";
|
|
2945
|
-
readonly type: "function";
|
|
2946
|
-
}, {
|
|
2947
|
-
readonly inputs: readonly [{
|
|
2948
|
-
readonly components: readonly [{
|
|
2949
|
-
readonly internalType: "uint256";
|
|
2950
|
-
readonly name: "nonce";
|
|
2951
|
-
readonly type: "uint256";
|
|
2952
|
-
}, {
|
|
2953
|
-
readonly internalType: "uint256";
|
|
2954
|
-
readonly name: "permissionId";
|
|
2955
|
-
readonly type: "uint256";
|
|
2956
|
-
}];
|
|
2957
|
-
readonly internalType: "struct IDataPortabilityPermissions.RevokePermissionInput";
|
|
2958
|
-
readonly name: "revokePermissionInput";
|
|
2959
|
-
readonly type: "tuple";
|
|
2960
|
-
}, {
|
|
2961
|
-
readonly internalType: "bytes";
|
|
2962
|
-
readonly name: "signature";
|
|
2963
|
-
readonly type: "bytes";
|
|
2964
|
-
}];
|
|
2965
|
-
readonly name: "revokePermissionWithSignature";
|
|
2966
|
-
readonly outputs: readonly [];
|
|
2967
|
-
readonly stateMutability: "nonpayable";
|
|
2968
|
-
readonly type: "function";
|
|
2969
|
-
}, {
|
|
2970
|
-
readonly inputs: readonly [{
|
|
2971
|
-
readonly internalType: "bytes32";
|
|
2972
|
-
readonly name: "role";
|
|
2973
|
-
readonly type: "bytes32";
|
|
2974
|
-
}, {
|
|
2975
|
-
readonly internalType: "address";
|
|
2976
|
-
readonly name: "account";
|
|
2977
|
-
readonly type: "address";
|
|
2978
|
-
}];
|
|
2979
|
-
readonly name: "revokeRole";
|
|
2980
|
-
readonly outputs: readonly [];
|
|
2981
|
-
readonly stateMutability: "nonpayable";
|
|
2982
|
-
readonly type: "function";
|
|
2983
|
-
}, {
|
|
2984
|
-
readonly inputs: readonly [{
|
|
2985
|
-
readonly internalType: "bytes32";
|
|
2986
|
-
readonly name: "role";
|
|
2987
|
-
readonly type: "bytes32";
|
|
2988
|
-
}, {
|
|
2989
|
-
readonly internalType: "bytes32";
|
|
2990
|
-
readonly name: "adminRole";
|
|
2991
|
-
readonly type: "bytes32";
|
|
2992
|
-
}];
|
|
2993
|
-
readonly name: "setRoleAdmin";
|
|
2994
|
-
readonly outputs: readonly [];
|
|
2995
|
-
readonly stateMutability: "nonpayable";
|
|
2996
|
-
readonly type: "function";
|
|
2997
|
-
}, {
|
|
2998
|
-
readonly inputs: readonly [{
|
|
2999
|
-
readonly internalType: "bytes4";
|
|
3000
|
-
readonly name: "interfaceId";
|
|
3001
|
-
readonly type: "bytes4";
|
|
3002
|
-
}];
|
|
3003
|
-
readonly name: "supportsInterface";
|
|
3004
|
-
readonly outputs: readonly [{
|
|
3005
|
-
readonly internalType: "bool";
|
|
3006
|
-
readonly name: "";
|
|
3007
|
-
readonly type: "bool";
|
|
3008
|
-
}];
|
|
3009
|
-
readonly stateMutability: "view";
|
|
3010
|
-
readonly type: "function";
|
|
3011
|
-
}, {
|
|
3012
|
-
readonly inputs: readonly [];
|
|
3013
|
-
readonly name: "trustedForwarder";
|
|
3014
|
-
readonly outputs: readonly [{
|
|
3015
|
-
readonly internalType: "address";
|
|
3016
|
-
readonly name: "";
|
|
3017
|
-
readonly type: "address";
|
|
3018
|
-
}];
|
|
3019
|
-
readonly stateMutability: "view";
|
|
3020
|
-
readonly type: "function";
|
|
3021
|
-
}, {
|
|
3022
|
-
readonly inputs: readonly [];
|
|
3023
|
-
readonly name: "unpause";
|
|
3024
|
-
readonly outputs: readonly [];
|
|
3025
|
-
readonly stateMutability: "nonpayable";
|
|
3026
|
-
readonly type: "function";
|
|
3027
|
-
}, {
|
|
3028
|
-
readonly inputs: readonly [{
|
|
3029
|
-
readonly internalType: "contract IDataRegistry";
|
|
3030
|
-
readonly name: "newDataRegistry";
|
|
3031
|
-
readonly type: "address";
|
|
3032
|
-
}];
|
|
3033
|
-
readonly name: "updateDataRegistry";
|
|
3034
|
-
readonly outputs: readonly [];
|
|
3035
|
-
readonly stateMutability: "nonpayable";
|
|
3036
|
-
readonly type: "function";
|
|
3037
|
-
}, {
|
|
3038
|
-
readonly inputs: readonly [{
|
|
3039
|
-
readonly internalType: "contract IDataPortabilityGrantees";
|
|
3040
|
-
readonly name: "newGranteesContract";
|
|
3041
|
-
readonly type: "address";
|
|
3042
|
-
}];
|
|
3043
|
-
readonly name: "updateGranteesContract";
|
|
3044
|
-
readonly outputs: readonly [];
|
|
3045
|
-
readonly stateMutability: "nonpayable";
|
|
3046
|
-
readonly type: "function";
|
|
3047
|
-
}, {
|
|
3048
|
-
readonly inputs: readonly [{
|
|
3049
|
-
readonly internalType: "contract IDataPortabilityServers";
|
|
3050
|
-
readonly name: "newServersContract";
|
|
3051
|
-
readonly type: "address";
|
|
3052
|
-
}];
|
|
3053
|
-
readonly name: "updateServersContract";
|
|
3054
|
-
readonly outputs: readonly [];
|
|
3055
|
-
readonly stateMutability: "nonpayable";
|
|
3056
|
-
readonly type: "function";
|
|
3057
|
-
}, {
|
|
3058
|
-
readonly inputs: readonly [{
|
|
3059
|
-
readonly internalType: "address";
|
|
3060
|
-
readonly name: "trustedForwarderAddress";
|
|
3061
|
-
readonly type: "address";
|
|
3062
|
-
}];
|
|
3063
|
-
readonly name: "updateTrustedForwarder";
|
|
3064
|
-
readonly outputs: readonly [];
|
|
3065
|
-
readonly stateMutability: "nonpayable";
|
|
3066
|
-
readonly type: "function";
|
|
3067
|
-
}, {
|
|
3068
|
-
readonly inputs: readonly [{
|
|
3069
|
-
readonly internalType: "address";
|
|
3070
|
-
readonly name: "newImplementation";
|
|
3071
|
-
readonly type: "address";
|
|
3072
|
-
}, {
|
|
3073
|
-
readonly internalType: "bytes";
|
|
3074
|
-
readonly name: "data";
|
|
3075
|
-
readonly type: "bytes";
|
|
3076
|
-
}];
|
|
3077
|
-
readonly name: "upgradeToAndCall";
|
|
3078
|
-
readonly outputs: readonly [];
|
|
3079
|
-
readonly stateMutability: "payable";
|
|
3080
|
-
readonly type: "function";
|
|
3081
|
-
}, {
|
|
3082
|
-
readonly inputs: readonly [{
|
|
3083
|
-
readonly internalType: "address";
|
|
3084
|
-
readonly name: "userAddress";
|
|
3085
|
-
readonly type: "address";
|
|
3086
|
-
}];
|
|
3087
|
-
readonly name: "userNonce";
|
|
3088
|
-
readonly outputs: readonly [{
|
|
3089
|
-
readonly internalType: "uint256";
|
|
3090
|
-
readonly name: "";
|
|
3091
|
-
readonly type: "uint256";
|
|
3092
|
-
}];
|
|
3093
|
-
readonly stateMutability: "view";
|
|
3094
|
-
readonly type: "function";
|
|
3095
|
-
}, {
|
|
3096
|
-
readonly inputs: readonly [{
|
|
3097
|
-
readonly internalType: "address";
|
|
3098
|
-
readonly name: "userAddress";
|
|
3099
|
-
readonly type: "address";
|
|
3100
|
-
}, {
|
|
3101
|
-
readonly internalType: "uint256";
|
|
3102
|
-
readonly name: "permissionIndex";
|
|
3103
|
-
readonly type: "uint256";
|
|
3104
|
-
}];
|
|
3105
|
-
readonly name: "userPermissionIdsAt";
|
|
3106
|
-
readonly outputs: readonly [{
|
|
3107
|
-
readonly internalType: "uint256";
|
|
3108
|
-
readonly name: "";
|
|
3109
|
-
readonly type: "uint256";
|
|
3110
|
-
}];
|
|
3111
|
-
readonly stateMutability: "view";
|
|
3112
|
-
readonly type: "function";
|
|
3113
|
-
}, {
|
|
3114
|
-
readonly inputs: readonly [{
|
|
3115
|
-
readonly internalType: "address";
|
|
3116
|
-
readonly name: "userAddress";
|
|
3117
|
-
readonly type: "address";
|
|
3118
|
-
}];
|
|
3119
|
-
readonly name: "userPermissionIdsLength";
|
|
3120
|
-
readonly outputs: readonly [{
|
|
3121
|
-
readonly internalType: "uint256";
|
|
3122
|
-
readonly name: "";
|
|
3123
|
-
readonly type: "uint256";
|
|
3124
|
-
}];
|
|
3125
|
-
readonly stateMutability: "view";
|
|
3126
|
-
readonly type: "function";
|
|
3127
|
-
}, {
|
|
3128
|
-
readonly inputs: readonly [{
|
|
3129
|
-
readonly internalType: "address";
|
|
3130
|
-
readonly name: "userAddress";
|
|
3131
|
-
readonly type: "address";
|
|
3132
|
-
}];
|
|
3133
|
-
readonly name: "userPermissionIdsValues";
|
|
3134
|
-
readonly outputs: readonly [{
|
|
3135
|
-
readonly internalType: "uint256[]";
|
|
3136
|
-
readonly name: "";
|
|
3137
|
-
readonly type: "uint256[]";
|
|
3138
|
-
}];
|
|
3139
|
-
readonly stateMutability: "view";
|
|
3140
|
-
readonly type: "function";
|
|
3141
|
-
}, {
|
|
3142
|
-
readonly inputs: readonly [{
|
|
3143
|
-
readonly internalType: "address";
|
|
3144
|
-
readonly name: "userAddress";
|
|
3145
|
-
readonly type: "address";
|
|
3146
|
-
}];
|
|
3147
|
-
readonly name: "users";
|
|
3148
|
-
readonly outputs: readonly [{
|
|
3149
|
-
readonly internalType: "uint256";
|
|
3150
|
-
readonly name: "nonce";
|
|
3151
|
-
readonly type: "uint256";
|
|
3152
|
-
}, {
|
|
3153
|
-
readonly internalType: "uint256[]";
|
|
3154
|
-
readonly name: "permissionIds";
|
|
3155
|
-
readonly type: "uint256[]";
|
|
3156
|
-
}];
|
|
3157
|
-
readonly stateMutability: "view";
|
|
3158
|
-
readonly type: "function";
|
|
3159
|
-
}, {
|
|
3160
|
-
readonly inputs: readonly [];
|
|
3161
|
-
readonly name: "version";
|
|
3162
|
-
readonly outputs: readonly [{
|
|
3163
|
-
readonly internalType: "uint256";
|
|
3164
|
-
readonly name: "";
|
|
3165
|
-
readonly type: "uint256";
|
|
3166
|
-
}];
|
|
3167
|
-
readonly stateMutability: "pure";
|
|
3168
|
-
readonly type: "function";
|
|
3169
|
-
}];
|
|
3170
|
-
readonly DataPortabilityPermissions: readonly [{
|
|
3171
|
-
readonly inputs: readonly [];
|
|
3172
|
-
readonly stateMutability: "nonpayable";
|
|
3173
|
-
readonly type: "constructor";
|
|
3174
|
-
}, {
|
|
3175
|
-
readonly inputs: readonly [];
|
|
3176
|
-
readonly name: "AccessControlBadConfirmation";
|
|
3177
|
-
readonly type: "error";
|
|
3178
|
-
}, {
|
|
3179
|
-
readonly inputs: readonly [{
|
|
3180
|
-
readonly internalType: "address";
|
|
3181
|
-
readonly name: "account";
|
|
3182
|
-
readonly type: "address";
|
|
3183
|
-
}, {
|
|
3184
|
-
readonly internalType: "bytes32";
|
|
3185
|
-
readonly name: "neededRole";
|
|
3186
|
-
readonly type: "bytes32";
|
|
3187
|
-
}];
|
|
3188
|
-
readonly name: "AccessControlUnauthorizedAccount";
|
|
3189
|
-
readonly type: "error";
|
|
3190
|
-
}, {
|
|
3191
|
-
readonly inputs: readonly [{
|
|
3192
|
-
readonly internalType: "address";
|
|
3193
|
-
readonly name: "target";
|
|
3194
|
-
readonly type: "address";
|
|
3195
|
-
}];
|
|
3196
|
-
readonly name: "AddressEmptyCode";
|
|
3197
|
-
readonly type: "error";
|
|
3198
|
-
}, {
|
|
3199
|
-
readonly inputs: readonly [];
|
|
3200
|
-
readonly name: "ECDSAInvalidSignature";
|
|
3201
|
-
readonly type: "error";
|
|
3202
2457
|
}, {
|
|
3203
2458
|
readonly inputs: readonly [{
|
|
3204
2459
|
readonly internalType: "uint256";
|
|
3205
|
-
readonly name: "
|
|
3206
|
-
readonly type: "uint256";
|
|
3207
|
-
}];
|
|
3208
|
-
readonly name: "ECDSAInvalidSignatureLength";
|
|
3209
|
-
readonly type: "error";
|
|
3210
|
-
}, {
|
|
3211
|
-
readonly inputs: readonly [{
|
|
3212
|
-
readonly internalType: "bytes32";
|
|
3213
|
-
readonly name: "s";
|
|
3214
|
-
readonly type: "bytes32";
|
|
3215
|
-
}];
|
|
3216
|
-
readonly name: "ECDSAInvalidSignatureS";
|
|
3217
|
-
readonly type: "error";
|
|
3218
|
-
}, {
|
|
3219
|
-
readonly inputs: readonly [{
|
|
3220
|
-
readonly internalType: "address";
|
|
3221
|
-
readonly name: "implementation";
|
|
3222
|
-
readonly type: "address";
|
|
3223
|
-
}];
|
|
3224
|
-
readonly name: "ERC1967InvalidImplementation";
|
|
3225
|
-
readonly type: "error";
|
|
3226
|
-
}, {
|
|
3227
|
-
readonly inputs: readonly [];
|
|
3228
|
-
readonly name: "ERC1967NonPayable";
|
|
3229
|
-
readonly type: "error";
|
|
3230
|
-
}, {
|
|
3231
|
-
readonly inputs: readonly [];
|
|
3232
|
-
readonly name: "EmptyGrant";
|
|
3233
|
-
readonly type: "error";
|
|
3234
|
-
}, {
|
|
3235
|
-
readonly inputs: readonly [];
|
|
3236
|
-
readonly name: "EnforcedPause";
|
|
3237
|
-
readonly type: "error";
|
|
3238
|
-
}, {
|
|
3239
|
-
readonly inputs: readonly [];
|
|
3240
|
-
readonly name: "ExpectedPause";
|
|
3241
|
-
readonly type: "error";
|
|
3242
|
-
}, {
|
|
3243
|
-
readonly inputs: readonly [];
|
|
3244
|
-
readonly name: "FailedInnerCall";
|
|
3245
|
-
readonly type: "error";
|
|
3246
|
-
}, {
|
|
3247
|
-
readonly inputs: readonly [];
|
|
3248
|
-
readonly name: "GranteeNotFound";
|
|
3249
|
-
readonly type: "error";
|
|
3250
|
-
}, {
|
|
3251
|
-
readonly inputs: readonly [{
|
|
3252
|
-
readonly internalType: "uint256";
|
|
3253
|
-
readonly name: "permissionId";
|
|
3254
|
-
readonly type: "uint256";
|
|
3255
|
-
}];
|
|
3256
|
-
readonly name: "InactivePermission";
|
|
3257
|
-
readonly type: "error";
|
|
3258
|
-
}, {
|
|
3259
|
-
readonly inputs: readonly [];
|
|
3260
|
-
readonly name: "InvalidInitialization";
|
|
3261
|
-
readonly type: "error";
|
|
3262
|
-
}, {
|
|
3263
|
-
readonly inputs: readonly [{
|
|
3264
|
-
readonly internalType: "uint256";
|
|
3265
|
-
readonly name: "expectedNonce";
|
|
2460
|
+
readonly name: "filesLength";
|
|
3266
2461
|
readonly type: "uint256";
|
|
3267
2462
|
}, {
|
|
3268
2463
|
readonly internalType: "uint256";
|
|
3269
|
-
readonly name: "
|
|
2464
|
+
readonly name: "permissionsLength";
|
|
3270
2465
|
readonly type: "uint256";
|
|
3271
2466
|
}];
|
|
3272
|
-
readonly name: "
|
|
2467
|
+
readonly name: "InvalidPermissionsLength";
|
|
3273
2468
|
readonly type: "error";
|
|
3274
2469
|
}, {
|
|
3275
2470
|
readonly inputs: readonly [];
|
|
@@ -3529,6 +2724,66 @@ declare const contractAbis: {
|
|
|
3529
2724
|
}];
|
|
3530
2725
|
readonly stateMutability: "nonpayable";
|
|
3531
2726
|
readonly type: "function";
|
|
2727
|
+
}, {
|
|
2728
|
+
readonly inputs: readonly [{
|
|
2729
|
+
readonly components: readonly [{
|
|
2730
|
+
readonly internalType: "uint256";
|
|
2731
|
+
readonly name: "nonce";
|
|
2732
|
+
readonly type: "uint256";
|
|
2733
|
+
}, {
|
|
2734
|
+
readonly internalType: "uint256";
|
|
2735
|
+
readonly name: "granteeId";
|
|
2736
|
+
readonly type: "uint256";
|
|
2737
|
+
}, {
|
|
2738
|
+
readonly internalType: "string";
|
|
2739
|
+
readonly name: "grant";
|
|
2740
|
+
readonly type: "string";
|
|
2741
|
+
}, {
|
|
2742
|
+
readonly internalType: "string[]";
|
|
2743
|
+
readonly name: "fileUrls";
|
|
2744
|
+
readonly type: "string[]";
|
|
2745
|
+
}, {
|
|
2746
|
+
readonly internalType: "address";
|
|
2747
|
+
readonly name: "serverAddress";
|
|
2748
|
+
readonly type: "address";
|
|
2749
|
+
}, {
|
|
2750
|
+
readonly internalType: "string";
|
|
2751
|
+
readonly name: "serverUrl";
|
|
2752
|
+
readonly type: "string";
|
|
2753
|
+
}, {
|
|
2754
|
+
readonly internalType: "string";
|
|
2755
|
+
readonly name: "serverPublicKey";
|
|
2756
|
+
readonly type: "string";
|
|
2757
|
+
}, {
|
|
2758
|
+
readonly components: readonly [{
|
|
2759
|
+
readonly internalType: "address";
|
|
2760
|
+
readonly name: "account";
|
|
2761
|
+
readonly type: "address";
|
|
2762
|
+
}, {
|
|
2763
|
+
readonly internalType: "string";
|
|
2764
|
+
readonly name: "key";
|
|
2765
|
+
readonly type: "string";
|
|
2766
|
+
}];
|
|
2767
|
+
readonly internalType: "struct IDataRegistry.Permission[][]";
|
|
2768
|
+
readonly name: "filePermissions";
|
|
2769
|
+
readonly type: "tuple[][]";
|
|
2770
|
+
}];
|
|
2771
|
+
readonly internalType: "struct IDataPortabilityPermissions.ServerFilesAndPermissionInput";
|
|
2772
|
+
readonly name: "serverFilesAndPermissionInput";
|
|
2773
|
+
readonly type: "tuple";
|
|
2774
|
+
}, {
|
|
2775
|
+
readonly internalType: "bytes";
|
|
2776
|
+
readonly name: "signature";
|
|
2777
|
+
readonly type: "bytes";
|
|
2778
|
+
}];
|
|
2779
|
+
readonly name: "addServerFilesAndPermissions";
|
|
2780
|
+
readonly outputs: readonly [{
|
|
2781
|
+
readonly internalType: "uint256";
|
|
2782
|
+
readonly name: "";
|
|
2783
|
+
readonly type: "uint256";
|
|
2784
|
+
}];
|
|
2785
|
+
readonly stateMutability: "nonpayable";
|
|
2786
|
+
readonly type: "function";
|
|
3532
2787
|
}, {
|
|
3533
2788
|
readonly inputs: readonly [];
|
|
3534
2789
|
readonly name: "dataPortabilityGrantees";
|
|
@@ -3693,20 +2948,6 @@ declare const contractAbis: {
|
|
|
3693
2948
|
readonly outputs: readonly [];
|
|
3694
2949
|
readonly stateMutability: "nonpayable";
|
|
3695
2950
|
readonly type: "function";
|
|
3696
|
-
}, {
|
|
3697
|
-
readonly inputs: readonly [{
|
|
3698
|
-
readonly internalType: "uint256";
|
|
3699
|
-
readonly name: "permissionId";
|
|
3700
|
-
readonly type: "uint256";
|
|
3701
|
-
}];
|
|
3702
|
-
readonly name: "isActivePermission";
|
|
3703
|
-
readonly outputs: readonly [{
|
|
3704
|
-
readonly internalType: "bool";
|
|
3705
|
-
readonly name: "";
|
|
3706
|
-
readonly type: "bool";
|
|
3707
|
-
}];
|
|
3708
|
-
readonly stateMutability: "view";
|
|
3709
|
-
readonly type: "function";
|
|
3710
2951
|
}, {
|
|
3711
2952
|
readonly inputs: readonly [{
|
|
3712
2953
|
readonly internalType: "address";
|
|
@@ -3793,10 +3034,6 @@ declare const contractAbis: {
|
|
|
3793
3034
|
readonly internalType: "string";
|
|
3794
3035
|
readonly name: "grant";
|
|
3795
3036
|
readonly type: "string";
|
|
3796
|
-
}, {
|
|
3797
|
-
readonly internalType: "bytes";
|
|
3798
|
-
readonly name: "signature";
|
|
3799
|
-
readonly type: "bytes";
|
|
3800
3037
|
}, {
|
|
3801
3038
|
readonly internalType: "uint256";
|
|
3802
3039
|
readonly name: "startBlock";
|
|
@@ -4348,9 +3585,9 @@ declare const contractAbis: {
|
|
|
4348
3585
|
readonly type: "address";
|
|
4349
3586
|
}, {
|
|
4350
3587
|
readonly indexed: false;
|
|
4351
|
-
readonly internalType: "
|
|
3588
|
+
readonly internalType: "string";
|
|
4352
3589
|
readonly name: "publicKey";
|
|
4353
|
-
readonly type: "
|
|
3590
|
+
readonly type: "string";
|
|
4354
3591
|
}, {
|
|
4355
3592
|
readonly indexed: false;
|
|
4356
3593
|
readonly internalType: "string";
|
|
@@ -4444,6 +3681,16 @@ declare const contractAbis: {
|
|
|
4444
3681
|
}];
|
|
4445
3682
|
readonly stateMutability: "view";
|
|
4446
3683
|
readonly type: "function";
|
|
3684
|
+
}, {
|
|
3685
|
+
readonly inputs: readonly [];
|
|
3686
|
+
readonly name: "PERMISSION_MANAGER_ROLE";
|
|
3687
|
+
readonly outputs: readonly [{
|
|
3688
|
+
readonly internalType: "bytes32";
|
|
3689
|
+
readonly name: "";
|
|
3690
|
+
readonly type: "bytes32";
|
|
3691
|
+
}];
|
|
3692
|
+
readonly stateMutability: "view";
|
|
3693
|
+
readonly type: "function";
|
|
4447
3694
|
}, {
|
|
4448
3695
|
readonly inputs: readonly [];
|
|
4449
3696
|
readonly name: "UPGRADE_INTERFACE_VERSION";
|
|
@@ -4456,28 +3703,28 @@ declare const contractAbis: {
|
|
|
4456
3703
|
readonly type: "function";
|
|
4457
3704
|
}, {
|
|
4458
3705
|
readonly inputs: readonly [{
|
|
3706
|
+
readonly internalType: "address";
|
|
3707
|
+
readonly name: "ownerAddress";
|
|
3708
|
+
readonly type: "address";
|
|
3709
|
+
}, {
|
|
4459
3710
|
readonly components: readonly [{
|
|
4460
|
-
readonly internalType: "address";
|
|
4461
|
-
readonly name: "owner";
|
|
4462
|
-
readonly type: "address";
|
|
4463
|
-
}, {
|
|
4464
3711
|
readonly internalType: "address";
|
|
4465
3712
|
readonly name: "serverAddress";
|
|
4466
3713
|
readonly type: "address";
|
|
4467
3714
|
}, {
|
|
4468
|
-
readonly internalType: "
|
|
3715
|
+
readonly internalType: "string";
|
|
4469
3716
|
readonly name: "publicKey";
|
|
4470
|
-
readonly type: "
|
|
3717
|
+
readonly type: "string";
|
|
4471
3718
|
}, {
|
|
4472
3719
|
readonly internalType: "string";
|
|
4473
3720
|
readonly name: "serverUrl";
|
|
4474
3721
|
readonly type: "string";
|
|
4475
3722
|
}];
|
|
4476
3723
|
readonly internalType: "struct IDataPortabilityServers.AddServerInput";
|
|
4477
|
-
readonly name: "
|
|
3724
|
+
readonly name: "addServerInput";
|
|
4478
3725
|
readonly type: "tuple";
|
|
4479
3726
|
}];
|
|
4480
|
-
readonly name: "
|
|
3727
|
+
readonly name: "addAndTrustServerOnBehalf";
|
|
4481
3728
|
readonly outputs: readonly [];
|
|
4482
3729
|
readonly stateMutability: "nonpayable";
|
|
4483
3730
|
readonly type: "function";
|
|
@@ -4487,25 +3734,21 @@ declare const contractAbis: {
|
|
|
4487
3734
|
readonly internalType: "uint256";
|
|
4488
3735
|
readonly name: "nonce";
|
|
4489
3736
|
readonly type: "uint256";
|
|
4490
|
-
}, {
|
|
4491
|
-
readonly internalType: "address";
|
|
4492
|
-
readonly name: "owner";
|
|
4493
|
-
readonly type: "address";
|
|
4494
3737
|
}, {
|
|
4495
3738
|
readonly internalType: "address";
|
|
4496
3739
|
readonly name: "serverAddress";
|
|
4497
3740
|
readonly type: "address";
|
|
4498
3741
|
}, {
|
|
4499
|
-
readonly internalType: "
|
|
3742
|
+
readonly internalType: "string";
|
|
4500
3743
|
readonly name: "publicKey";
|
|
4501
|
-
readonly type: "
|
|
3744
|
+
readonly type: "string";
|
|
4502
3745
|
}, {
|
|
4503
3746
|
readonly internalType: "string";
|
|
4504
3747
|
readonly name: "serverUrl";
|
|
4505
3748
|
readonly type: "string";
|
|
4506
3749
|
}];
|
|
4507
|
-
readonly internalType: "struct IDataPortabilityServers.
|
|
4508
|
-
readonly name: "
|
|
3750
|
+
readonly internalType: "struct IDataPortabilityServers.AddServerWithSignatureInput";
|
|
3751
|
+
readonly name: "addServerInput";
|
|
4509
3752
|
readonly type: "tuple";
|
|
4510
3753
|
}, {
|
|
4511
3754
|
readonly internalType: "bytes";
|
|
@@ -4519,27 +3762,31 @@ declare const contractAbis: {
|
|
|
4519
3762
|
}, {
|
|
4520
3763
|
readonly inputs: readonly [{
|
|
4521
3764
|
readonly components: readonly [{
|
|
4522
|
-
readonly internalType: "
|
|
4523
|
-
readonly name: "
|
|
4524
|
-
readonly type: "
|
|
3765
|
+
readonly internalType: "uint256";
|
|
3766
|
+
readonly name: "nonce";
|
|
3767
|
+
readonly type: "uint256";
|
|
4525
3768
|
}, {
|
|
4526
3769
|
readonly internalType: "address";
|
|
4527
3770
|
readonly name: "serverAddress";
|
|
4528
3771
|
readonly type: "address";
|
|
4529
3772
|
}, {
|
|
4530
|
-
readonly internalType: "
|
|
3773
|
+
readonly internalType: "string";
|
|
4531
3774
|
readonly name: "publicKey";
|
|
4532
|
-
readonly type: "
|
|
3775
|
+
readonly type: "string";
|
|
4533
3776
|
}, {
|
|
4534
3777
|
readonly internalType: "string";
|
|
4535
3778
|
readonly name: "serverUrl";
|
|
4536
3779
|
readonly type: "string";
|
|
4537
3780
|
}];
|
|
4538
|
-
readonly internalType: "struct IDataPortabilityServers.
|
|
3781
|
+
readonly internalType: "struct IDataPortabilityServers.AddServerWithSignatureInput";
|
|
4539
3782
|
readonly name: "addServerInput";
|
|
4540
3783
|
readonly type: "tuple";
|
|
3784
|
+
}, {
|
|
3785
|
+
readonly internalType: "bytes";
|
|
3786
|
+
readonly name: "signature";
|
|
3787
|
+
readonly type: "bytes";
|
|
4541
3788
|
}];
|
|
4542
|
-
readonly name: "
|
|
3789
|
+
readonly name: "addServerWithSignature";
|
|
4543
3790
|
readonly outputs: readonly [];
|
|
4544
3791
|
readonly stateMutability: "nonpayable";
|
|
4545
3792
|
readonly type: "function";
|
|
@@ -4637,38 +3884,6 @@ declare const contractAbis: {
|
|
|
4637
3884
|
readonly outputs: readonly [];
|
|
4638
3885
|
readonly stateMutability: "nonpayable";
|
|
4639
3886
|
readonly type: "function";
|
|
4640
|
-
}, {
|
|
4641
|
-
readonly inputs: readonly [{
|
|
4642
|
-
readonly internalType: "uint256";
|
|
4643
|
-
readonly name: "serverId";
|
|
4644
|
-
readonly type: "uint256";
|
|
4645
|
-
}];
|
|
4646
|
-
readonly name: "isActiveServer";
|
|
4647
|
-
readonly outputs: readonly [{
|
|
4648
|
-
readonly internalType: "bool";
|
|
4649
|
-
readonly name: "";
|
|
4650
|
-
readonly type: "bool";
|
|
4651
|
-
}];
|
|
4652
|
-
readonly stateMutability: "view";
|
|
4653
|
-
readonly type: "function";
|
|
4654
|
-
}, {
|
|
4655
|
-
readonly inputs: readonly [{
|
|
4656
|
-
readonly internalType: "address";
|
|
4657
|
-
readonly name: "userAddress";
|
|
4658
|
-
readonly type: "address";
|
|
4659
|
-
}, {
|
|
4660
|
-
readonly internalType: "uint256";
|
|
4661
|
-
readonly name: "serverId";
|
|
4662
|
-
readonly type: "uint256";
|
|
4663
|
-
}];
|
|
4664
|
-
readonly name: "isActiveServerForUser";
|
|
4665
|
-
readonly outputs: readonly [{
|
|
4666
|
-
readonly internalType: "bool";
|
|
4667
|
-
readonly name: "";
|
|
4668
|
-
readonly type: "bool";
|
|
4669
|
-
}];
|
|
4670
|
-
readonly stateMutability: "view";
|
|
4671
|
-
readonly type: "function";
|
|
4672
3887
|
}, {
|
|
4673
3888
|
readonly inputs: readonly [{
|
|
4674
3889
|
readonly internalType: "address";
|
|
@@ -4786,9 +4001,9 @@ declare const contractAbis: {
|
|
|
4786
4001
|
readonly name: "serverAddress";
|
|
4787
4002
|
readonly type: "address";
|
|
4788
4003
|
}, {
|
|
4789
|
-
readonly internalType: "
|
|
4004
|
+
readonly internalType: "string";
|
|
4790
4005
|
readonly name: "publicKey";
|
|
4791
|
-
readonly type: "
|
|
4006
|
+
readonly type: "string";
|
|
4792
4007
|
}, {
|
|
4793
4008
|
readonly internalType: "string";
|
|
4794
4009
|
readonly name: "url";
|
|
@@ -4821,9 +4036,9 @@ declare const contractAbis: {
|
|
|
4821
4036
|
readonly name: "serverAddress";
|
|
4822
4037
|
readonly type: "address";
|
|
4823
4038
|
}, {
|
|
4824
|
-
readonly internalType: "
|
|
4039
|
+
readonly internalType: "string";
|
|
4825
4040
|
readonly name: "publicKey";
|
|
4826
|
-
readonly type: "
|
|
4041
|
+
readonly type: "string";
|
|
4827
4042
|
}, {
|
|
4828
4043
|
readonly internalType: "string";
|
|
4829
4044
|
readonly name: "url";
|
|
@@ -5067,6 +4282,96 @@ declare const contractAbis: {
|
|
|
5067
4282
|
}];
|
|
5068
4283
|
readonly stateMutability: "view";
|
|
5069
4284
|
readonly type: "function";
|
|
4285
|
+
}, {
|
|
4286
|
+
readonly inputs: readonly [{
|
|
4287
|
+
readonly internalType: "address";
|
|
4288
|
+
readonly name: "userAddress";
|
|
4289
|
+
readonly type: "address";
|
|
4290
|
+
}];
|
|
4291
|
+
readonly name: "userServerValues";
|
|
4292
|
+
readonly outputs: readonly [{
|
|
4293
|
+
readonly components: readonly [{
|
|
4294
|
+
readonly internalType: "uint256";
|
|
4295
|
+
readonly name: "id";
|
|
4296
|
+
readonly type: "uint256";
|
|
4297
|
+
}, {
|
|
4298
|
+
readonly internalType: "address";
|
|
4299
|
+
readonly name: "owner";
|
|
4300
|
+
readonly type: "address";
|
|
4301
|
+
}, {
|
|
4302
|
+
readonly internalType: "address";
|
|
4303
|
+
readonly name: "serverAddress";
|
|
4304
|
+
readonly type: "address";
|
|
4305
|
+
}, {
|
|
4306
|
+
readonly internalType: "string";
|
|
4307
|
+
readonly name: "publicKey";
|
|
4308
|
+
readonly type: "string";
|
|
4309
|
+
}, {
|
|
4310
|
+
readonly internalType: "string";
|
|
4311
|
+
readonly name: "url";
|
|
4312
|
+
readonly type: "string";
|
|
4313
|
+
}, {
|
|
4314
|
+
readonly internalType: "uint256";
|
|
4315
|
+
readonly name: "startBlock";
|
|
4316
|
+
readonly type: "uint256";
|
|
4317
|
+
}, {
|
|
4318
|
+
readonly internalType: "uint256";
|
|
4319
|
+
readonly name: "endBlock";
|
|
4320
|
+
readonly type: "uint256";
|
|
4321
|
+
}];
|
|
4322
|
+
readonly internalType: "struct IDataPortabilityServers.TrustedServerInfo[]";
|
|
4323
|
+
readonly name: "serversInfo";
|
|
4324
|
+
readonly type: "tuple[]";
|
|
4325
|
+
}];
|
|
4326
|
+
readonly stateMutability: "view";
|
|
4327
|
+
readonly type: "function";
|
|
4328
|
+
}, {
|
|
4329
|
+
readonly inputs: readonly [{
|
|
4330
|
+
readonly internalType: "address";
|
|
4331
|
+
readonly name: "userAddress";
|
|
4332
|
+
readonly type: "address";
|
|
4333
|
+
}, {
|
|
4334
|
+
readonly internalType: "uint256";
|
|
4335
|
+
readonly name: "serverId";
|
|
4336
|
+
readonly type: "uint256";
|
|
4337
|
+
}];
|
|
4338
|
+
readonly name: "userServers";
|
|
4339
|
+
readonly outputs: readonly [{
|
|
4340
|
+
readonly components: readonly [{
|
|
4341
|
+
readonly internalType: "uint256";
|
|
4342
|
+
readonly name: "id";
|
|
4343
|
+
readonly type: "uint256";
|
|
4344
|
+
}, {
|
|
4345
|
+
readonly internalType: "address";
|
|
4346
|
+
readonly name: "owner";
|
|
4347
|
+
readonly type: "address";
|
|
4348
|
+
}, {
|
|
4349
|
+
readonly internalType: "address";
|
|
4350
|
+
readonly name: "serverAddress";
|
|
4351
|
+
readonly type: "address";
|
|
4352
|
+
}, {
|
|
4353
|
+
readonly internalType: "string";
|
|
4354
|
+
readonly name: "publicKey";
|
|
4355
|
+
readonly type: "string";
|
|
4356
|
+
}, {
|
|
4357
|
+
readonly internalType: "string";
|
|
4358
|
+
readonly name: "url";
|
|
4359
|
+
readonly type: "string";
|
|
4360
|
+
}, {
|
|
4361
|
+
readonly internalType: "uint256";
|
|
4362
|
+
readonly name: "startBlock";
|
|
4363
|
+
readonly type: "uint256";
|
|
4364
|
+
}, {
|
|
4365
|
+
readonly internalType: "uint256";
|
|
4366
|
+
readonly name: "endBlock";
|
|
4367
|
+
readonly type: "uint256";
|
|
4368
|
+
}];
|
|
4369
|
+
readonly internalType: "struct IDataPortabilityServers.TrustedServerInfo";
|
|
4370
|
+
readonly name: "";
|
|
4371
|
+
readonly type: "tuple";
|
|
4372
|
+
}];
|
|
4373
|
+
readonly stateMutability: "view";
|
|
4374
|
+
readonly type: "function";
|
|
5070
4375
|
}, {
|
|
5071
4376
|
readonly inputs: readonly [{
|
|
5072
4377
|
readonly internalType: "address";
|
|
@@ -30734,9 +30039,12 @@ declare class PermissionsController {
|
|
|
30734
30039
|
* @throws {RelayerError} When gasless submission fails
|
|
30735
30040
|
* @throws {PermissionError} When revocation fails for any other reason
|
|
30736
30041
|
*/
|
|
30737
|
-
|
|
30042
|
+
submitRevokeWithSignature(params: RevokePermissionParams): Promise<Hash>;
|
|
30738
30043
|
/**
|
|
30044
|
+
* @deprecated Use getPermissionsUserNonce() for permission operations or getServersUserNonce() for server operations
|
|
30045
|
+
*
|
|
30739
30046
|
* Retrieves the user's current nonce from the DataPortabilityServers contract.
|
|
30047
|
+
* This method is deprecated in favor of more specific nonce methods.
|
|
30740
30048
|
*
|
|
30741
30049
|
* The nonce is used to prevent replay attacks in signed transactions and must
|
|
30742
30050
|
* be incremented with each transaction to maintain security.
|
|
@@ -30748,11 +30056,45 @@ declare class PermissionsController {
|
|
|
30748
30056
|
* @private
|
|
30749
30057
|
* @example
|
|
30750
30058
|
* ```typescript
|
|
30059
|
+
* // Deprecated - use specific methods instead
|
|
30751
30060
|
* const nonce = await this.getUserNonce();
|
|
30752
|
-
*
|
|
30061
|
+
*
|
|
30062
|
+
* // Use these instead:
|
|
30063
|
+
* const permissionsNonce = await this.getPermissionsUserNonce();
|
|
30064
|
+
* const serversNonce = await this.getServersUserNonce();
|
|
30753
30065
|
* ```
|
|
30754
30066
|
*/
|
|
30755
30067
|
private getUserNonce;
|
|
30068
|
+
/**
|
|
30069
|
+
* Retrieves the user's current nonce from the DataPortabilityServers contract.
|
|
30070
|
+
* This nonce is used for server-related operations (AddAndTrustServer, TrustServer, UntrustServer).
|
|
30071
|
+
*
|
|
30072
|
+
* @returns Promise resolving to the current servers nonce
|
|
30073
|
+
* @throws {NonceError} When reading nonce from contract fails
|
|
30074
|
+
* @private
|
|
30075
|
+
*
|
|
30076
|
+
* @example
|
|
30077
|
+
* ```typescript
|
|
30078
|
+
* const nonce = await this.getServersUserNonce();
|
|
30079
|
+
* console.log(`Current servers nonce: ${nonce}`);
|
|
30080
|
+
* ```
|
|
30081
|
+
*/
|
|
30082
|
+
private getServersUserNonce;
|
|
30083
|
+
/**
|
|
30084
|
+
* Retrieves the user's current nonce from the DataPortabilityPermissions contract.
|
|
30085
|
+
* This nonce is used for permission-related operations (addPermission, addServerFilesAndPermissions).
|
|
30086
|
+
*
|
|
30087
|
+
* @returns Promise resolving to the current permissions nonce
|
|
30088
|
+
* @throws {NonceError} When reading nonce from contract fails
|
|
30089
|
+
* @private
|
|
30090
|
+
*
|
|
30091
|
+
* @example
|
|
30092
|
+
* ```typescript
|
|
30093
|
+
* const nonce = await this.getPermissionsUserNonce();
|
|
30094
|
+
* console.log(`Current permissions nonce: ${nonce}`);
|
|
30095
|
+
* ```
|
|
30096
|
+
*/
|
|
30097
|
+
private getPermissionsUserNonce;
|
|
30756
30098
|
/**
|
|
30757
30099
|
* Composes the EIP-712 typed data for PermissionGrant (new simplified format).
|
|
30758
30100
|
*
|
|
@@ -30766,6 +30108,21 @@ declare class PermissionsController {
|
|
|
30766
30108
|
* @returns Promise resolving to the typed data structure
|
|
30767
30109
|
*/
|
|
30768
30110
|
private composePermissionGrantMessage;
|
|
30111
|
+
/**
|
|
30112
|
+
* Creates EIP-712 typed data structure for server files and permissions.
|
|
30113
|
+
*
|
|
30114
|
+
* @param params - Parameters for the server files and permissions message
|
|
30115
|
+
* @param params.granteeId - Grantee ID
|
|
30116
|
+
* @param params.grant - Grant URL or grant data
|
|
30117
|
+
* @param params.fileUrls - Array of file URLs
|
|
30118
|
+
* @param params.serverAddress - Server address
|
|
30119
|
+
* @param params.serverUrl - Server URL
|
|
30120
|
+
* @param params.serverPublicKey - Server public key
|
|
30121
|
+
* @param params.filePermissions - File permissions array
|
|
30122
|
+
* @param params.nonce - Unique number to prevent replay attacks
|
|
30123
|
+
* @returns Promise resolving to the typed data structure
|
|
30124
|
+
*/
|
|
30125
|
+
private composeServerFilesAndPermissionMessage;
|
|
30769
30126
|
/**
|
|
30770
30127
|
* Gets the EIP-712 domain for PermissionGrant signatures.
|
|
30771
30128
|
*
|
|
@@ -30821,38 +30178,6 @@ declare class PermissionsController {
|
|
|
30821
30178
|
* ```
|
|
30822
30179
|
*/
|
|
30823
30180
|
getUserPermissionGrantsOnChain(options?: GetUserPermissionsOptions): Promise<OnChainPermissionGrant[]>;
|
|
30824
|
-
/**
|
|
30825
|
-
* Gets all permission IDs for a specific file.
|
|
30826
|
-
*
|
|
30827
|
-
* @param fileId - The file ID to query permissions for
|
|
30828
|
-
* @returns Promise resolving to array of permission IDs
|
|
30829
|
-
* @throws {BlockchainError} When reading from contract fails or chain is unavailable
|
|
30830
|
-
*/
|
|
30831
|
-
getFilePermissionIds(fileId: bigint): Promise<bigint[]>;
|
|
30832
|
-
/**
|
|
30833
|
-
* Gets all file IDs associated with a permission.
|
|
30834
|
-
*
|
|
30835
|
-
* @param permissionId - The permission ID to query files for
|
|
30836
|
-
* @returns Promise resolving to array of file IDs
|
|
30837
|
-
* @throws {BlockchainError} When reading from contract fails or chain is unavailable
|
|
30838
|
-
*/
|
|
30839
|
-
getPermissionFileIds(permissionId: bigint): Promise<bigint[]>;
|
|
30840
|
-
/**
|
|
30841
|
-
* Checks if a permission is active.
|
|
30842
|
-
*
|
|
30843
|
-
* @param permissionId - The permission ID to check
|
|
30844
|
-
* @returns Promise resolving to boolean indicating if permission is active
|
|
30845
|
-
* @throws {BlockchainError} When reading from contract fails or chain is unavailable
|
|
30846
|
-
*/
|
|
30847
|
-
isActivePermission(permissionId: bigint): Promise<boolean>;
|
|
30848
|
-
/**
|
|
30849
|
-
* Gets permission details from the contract.
|
|
30850
|
-
*
|
|
30851
|
-
* @param permissionId - The permission ID to query
|
|
30852
|
-
* @returns Promise resolving to permission info
|
|
30853
|
-
* @throws {BlockchainError} When reading from contract fails or chain is unavailable
|
|
30854
|
-
*/
|
|
30855
|
-
getPermissionInfo(permissionId: bigint): Promise<PermissionInfo>;
|
|
30856
30181
|
/**
|
|
30857
30182
|
* Normalizes grant ID to hex format.
|
|
30858
30183
|
* Handles conversion from permission ID (bigint/number/string) to proper hex hash format.
|
|
@@ -30903,14 +30228,14 @@ declare class PermissionsController {
|
|
|
30903
30228
|
* @returns Promise resolving to transaction hash
|
|
30904
30229
|
* @deprecated Use addAndTrustServer instead
|
|
30905
30230
|
*/
|
|
30906
|
-
|
|
30231
|
+
submitTrustServer(params: TrustServerParams): Promise<Hash>;
|
|
30907
30232
|
/**
|
|
30908
30233
|
* Adds and trusts a server using a signature (gasless transaction).
|
|
30909
30234
|
*
|
|
30910
30235
|
* @param params - Parameters for adding and trusting the server
|
|
30911
30236
|
* @returns Promise resolving to transaction hash
|
|
30912
30237
|
*/
|
|
30913
|
-
|
|
30238
|
+
submitAddAndTrustServerWithSignature(params: AddAndTrustServerParams): Promise<Hash>;
|
|
30914
30239
|
/**
|
|
30915
30240
|
* Trusts a server using a signature (gasless transaction - legacy method).
|
|
30916
30241
|
*
|
|
@@ -30924,7 +30249,7 @@ declare class PermissionsController {
|
|
|
30924
30249
|
* @throws {ServerUrlMismatchError} When server URL doesn't match existing registration
|
|
30925
30250
|
* @throws {BlockchainError} When trust operation fails for any other reason
|
|
30926
30251
|
*/
|
|
30927
|
-
|
|
30252
|
+
submitTrustServerWithSignature(params: TrustServerParams): Promise<Hash>;
|
|
30928
30253
|
/**
|
|
30929
30254
|
* Submits a direct untrust server transaction (without signature).
|
|
30930
30255
|
*
|
|
@@ -30960,7 +30285,7 @@ declare class PermissionsController {
|
|
|
30960
30285
|
* console.log('Still trusting servers:', trustedServers);
|
|
30961
30286
|
* ```
|
|
30962
30287
|
*/
|
|
30963
|
-
|
|
30288
|
+
submitUntrustServer(params: UntrustServerParams): Promise<Hash>;
|
|
30964
30289
|
/**
|
|
30965
30290
|
* Untrusts a server using a signature (gasless transaction).
|
|
30966
30291
|
*
|
|
@@ -30973,7 +30298,7 @@ declare class PermissionsController {
|
|
|
30973
30298
|
* @throws {RelayerError} When gasless submission fails
|
|
30974
30299
|
* @throws {BlockchainError} When untrust transaction fails
|
|
30975
30300
|
*/
|
|
30976
|
-
|
|
30301
|
+
submitUntrustServerWithSignature(params: UntrustServerParams): Promise<Hash>;
|
|
30977
30302
|
/**
|
|
30978
30303
|
* Retrieves all servers trusted by a user from the DataPortabilityServers contract.
|
|
30979
30304
|
*
|
|
@@ -30997,61 +30322,6 @@ declare class PermissionsController {
|
|
|
30997
30322
|
* ```
|
|
30998
30323
|
*/
|
|
30999
30324
|
getTrustedServers(userAddress?: Address): Promise<number[]>;
|
|
31000
|
-
/**
|
|
31001
|
-
* Retrieves detailed information about a specific server from the DataPortabilityServers contract.
|
|
31002
|
-
*
|
|
31003
|
-
* Returns complete server information including owner, address, public key, and URL.
|
|
31004
|
-
* This information is used to establish secure connections and verify server identity.
|
|
31005
|
-
*
|
|
31006
|
-
* @param serverId - The unique numeric ID of the server to query
|
|
31007
|
-
* @returns Promise resolving to complete server information
|
|
31008
|
-
* @throws {BlockchainError} When reading from contract fails or chain is unavailable
|
|
31009
|
-
* @throws {NetworkError} When unable to connect to the blockchain network
|
|
31010
|
-
* @throws {ServerNotFoundError} When the server ID does not exist
|
|
31011
|
-
*
|
|
31012
|
-
* @example
|
|
31013
|
-
* ```typescript
|
|
31014
|
-
* const server = await vana.permissions.getServerInfo(1);
|
|
31015
|
-
*
|
|
31016
|
-
* console.log(`Server ${server.id}:`);
|
|
31017
|
-
* console.log(` Owner: ${server.owner}`);
|
|
31018
|
-
* console.log(` Address: ${server.serverAddress}`);
|
|
31019
|
-
* console.log(` URL: ${server.url}`);
|
|
31020
|
-
* console.log(` Public Key: ${server.publicKey}`);
|
|
31021
|
-
* ```
|
|
31022
|
-
*/
|
|
31023
|
-
getServerInfo(serverId: number): Promise<Server>;
|
|
31024
|
-
/**
|
|
31025
|
-
* Checks if a specific server is active in the DataPortabilityServers contract.
|
|
31026
|
-
*
|
|
31027
|
-
* An active server is one that is properly registered and operational, meaning
|
|
31028
|
-
* it can receive and process data portability requests from users.
|
|
31029
|
-
*
|
|
31030
|
-
* @param serverId - The unique numeric ID of the server to check
|
|
31031
|
-
* @returns Promise resolving to true if server is active, false otherwise
|
|
31032
|
-
* @throws {BlockchainError} When reading from contract fails or chain is unavailable
|
|
31033
|
-
* @throws {NetworkError} When unable to connect to the blockchain network
|
|
31034
|
-
*
|
|
31035
|
-
* @example
|
|
31036
|
-
* ```typescript
|
|
31037
|
-
* const isActive = await vana.permissions.isActiveServer(1);
|
|
31038
|
-
*
|
|
31039
|
-
* if (isActive) {
|
|
31040
|
-
* console.log('Server 1 is active and ready to process requests');
|
|
31041
|
-
* } else {
|
|
31042
|
-
* console.log('Server 1 is inactive or not found');
|
|
31043
|
-
* }
|
|
31044
|
-
* ```
|
|
31045
|
-
*/
|
|
31046
|
-
isActiveServer(serverId: number): Promise<boolean>;
|
|
31047
|
-
/**
|
|
31048
|
-
* Checks if a server is active for a specific user.
|
|
31049
|
-
*
|
|
31050
|
-
* @param serverId - Server ID (numeric)
|
|
31051
|
-
* @param userAddress - Optional user address (defaults to current user)
|
|
31052
|
-
* @returns Promise resolving to boolean indicating if server is active for the user
|
|
31053
|
-
*/
|
|
31054
|
-
isActiveServerForUser(serverId: number, userAddress?: Address): Promise<boolean>;
|
|
31055
30325
|
/**
|
|
31056
30326
|
* Gets the total count of trusted servers for a user.
|
|
31057
30327
|
*
|
|
@@ -31176,7 +30446,7 @@ declare class PermissionsController {
|
|
|
31176
30446
|
* console.log(`Grantee registered in transaction: ${txHash}`);
|
|
31177
30447
|
* ```
|
|
31178
30448
|
*/
|
|
31179
|
-
|
|
30449
|
+
submitRegisterGrantee(params: RegisterGranteeParams): Promise<Hash>;
|
|
31180
30450
|
/**
|
|
31181
30451
|
* Registers a grantee with a signature (gasless transaction)
|
|
31182
30452
|
*
|
|
@@ -31192,7 +30462,7 @@ declare class PermissionsController {
|
|
|
31192
30462
|
* });
|
|
31193
30463
|
* ```
|
|
31194
30464
|
*/
|
|
31195
|
-
|
|
30465
|
+
submitRegisterGranteeWithSignature(params: RegisterGranteeParams): Promise<Hash>;
|
|
31196
30466
|
/**
|
|
31197
30467
|
* Submits a signed register grantee transaction via relayer
|
|
31198
30468
|
*
|
|
@@ -31309,6 +30579,288 @@ declare class PermissionsController {
|
|
|
31309
30579
|
* @private
|
|
31310
30580
|
*/
|
|
31311
30581
|
private submitSignedRegisterGranteeTransaction;
|
|
30582
|
+
/**
|
|
30583
|
+
* Get all trusted server IDs for a user
|
|
30584
|
+
*
|
|
30585
|
+
* @param userAddress - User address to query (defaults to current user)
|
|
30586
|
+
* @returns Promise resolving to array of server IDs
|
|
30587
|
+
*/
|
|
30588
|
+
getUserServerIds(userAddress?: Address): Promise<bigint[]>;
|
|
30589
|
+
/**
|
|
30590
|
+
* Get server ID at specific index for a user
|
|
30591
|
+
*
|
|
30592
|
+
* @param userAddress - User address to query
|
|
30593
|
+
* @param serverIndex - Index in the user's server list
|
|
30594
|
+
* @returns Promise resolving to server ID
|
|
30595
|
+
*/
|
|
30596
|
+
getUserServerIdAt(userAddress: Address, serverIndex: bigint): Promise<bigint>;
|
|
30597
|
+
/**
|
|
30598
|
+
* Get the number of trusted servers for a user
|
|
30599
|
+
*
|
|
30600
|
+
* @param userAddress - User address to query (defaults to current user)
|
|
30601
|
+
* @returns Promise resolving to number of trusted servers
|
|
30602
|
+
*/
|
|
30603
|
+
getUserServerCount(userAddress?: Address): Promise<bigint>;
|
|
30604
|
+
/**
|
|
30605
|
+
* Get detailed information about trusted servers for a user
|
|
30606
|
+
*
|
|
30607
|
+
* @param userAddress - User address to query (defaults to current user)
|
|
30608
|
+
* @returns Promise resolving to array of trusted server info
|
|
30609
|
+
*/
|
|
30610
|
+
getUserTrustedServers(userAddress?: Address): Promise<TrustedServerInfo[]>;
|
|
30611
|
+
/**
|
|
30612
|
+
* Get trusted server info for a specific server ID and user
|
|
30613
|
+
*
|
|
30614
|
+
* @param userAddress - User address to query
|
|
30615
|
+
* @param serverId - Server ID to get info for
|
|
30616
|
+
* @returns Promise resolving to trusted server info
|
|
30617
|
+
*/
|
|
30618
|
+
getUserTrustedServer(userAddress: Address, serverId: bigint): Promise<TrustedServerInfo>;
|
|
30619
|
+
/**
|
|
30620
|
+
* Get server information by server ID
|
|
30621
|
+
*
|
|
30622
|
+
* @param serverId - Server ID to get info for
|
|
30623
|
+
* @returns Promise resolving to server info
|
|
30624
|
+
*/
|
|
30625
|
+
getServerInfo(serverId: bigint): Promise<ServerInfo>;
|
|
30626
|
+
/**
|
|
30627
|
+
* Get server information by server address
|
|
30628
|
+
*
|
|
30629
|
+
* @param serverAddress - Server address to get info for
|
|
30630
|
+
* @returns Promise resolving to server info
|
|
30631
|
+
*/
|
|
30632
|
+
getServerInfoByAddress(serverAddress: Address): Promise<ServerInfo>;
|
|
30633
|
+
/**
|
|
30634
|
+
* Get all permission IDs for a user
|
|
30635
|
+
*
|
|
30636
|
+
* @param userAddress - User address to query (defaults to current user)
|
|
30637
|
+
* @returns Promise resolving to array of permission IDs
|
|
30638
|
+
*/
|
|
30639
|
+
getUserPermissionIds(userAddress?: Address): Promise<bigint[]>;
|
|
30640
|
+
/**
|
|
30641
|
+
* Get permission ID at specific index for a user
|
|
30642
|
+
*
|
|
30643
|
+
* @param userAddress - User address to query
|
|
30644
|
+
* @param permissionIndex - Index in the user's permission list
|
|
30645
|
+
* @returns Promise resolving to permission ID
|
|
30646
|
+
*/
|
|
30647
|
+
getUserPermissionIdAt(userAddress: Address, permissionIndex: bigint): Promise<bigint>;
|
|
30648
|
+
/**
|
|
30649
|
+
* Get the number of permissions for a user
|
|
30650
|
+
*
|
|
30651
|
+
* @param userAddress - User address to query (defaults to current user)
|
|
30652
|
+
* @returns Promise resolving to number of permissions
|
|
30653
|
+
*/
|
|
30654
|
+
getUserPermissionCount(userAddress?: Address): Promise<bigint>;
|
|
30655
|
+
/**
|
|
30656
|
+
* Get detailed permission information by permission ID
|
|
30657
|
+
*
|
|
30658
|
+
* @param permissionId - Permission ID to get info for
|
|
30659
|
+
* @returns Promise resolving to permission info
|
|
30660
|
+
*/
|
|
30661
|
+
getPermissionInfo(permissionId: bigint): Promise<PermissionInfo>;
|
|
30662
|
+
/**
|
|
30663
|
+
* Get all permission IDs for a specific file
|
|
30664
|
+
*
|
|
30665
|
+
* @param fileId - File ID to get permissions for
|
|
30666
|
+
* @returns Promise resolving to array of permission IDs
|
|
30667
|
+
*/
|
|
30668
|
+
getFilePermissionIds(fileId: bigint): Promise<bigint[]>;
|
|
30669
|
+
/**
|
|
30670
|
+
* Get all file IDs for a specific permission
|
|
30671
|
+
*
|
|
30672
|
+
* @param permissionId - Permission ID to get files for
|
|
30673
|
+
* @returns Promise resolving to array of file IDs
|
|
30674
|
+
*/
|
|
30675
|
+
getPermissionFileIds(permissionId: bigint): Promise<bigint[]>;
|
|
30676
|
+
/**
|
|
30677
|
+
* Get all permissions for a specific file (alias for getFilePermissionIds)
|
|
30678
|
+
*
|
|
30679
|
+
* @param fileId - File ID to get permissions for
|
|
30680
|
+
* @returns Promise resolving to array of permission IDs
|
|
30681
|
+
*/
|
|
30682
|
+
getFilePermissions(fileId: bigint): Promise<bigint[]>;
|
|
30683
|
+
/**
|
|
30684
|
+
* Get grantee information by grantee ID
|
|
30685
|
+
*
|
|
30686
|
+
* @param granteeId - Grantee ID to get info for
|
|
30687
|
+
* @returns Promise resolving to grantee info
|
|
30688
|
+
*/
|
|
30689
|
+
getGranteeInfo(granteeId: bigint): Promise<GranteeInfo>;
|
|
30690
|
+
/**
|
|
30691
|
+
* Get grantee information by grantee address
|
|
30692
|
+
*
|
|
30693
|
+
* @param granteeAddress - Grantee address to get info for
|
|
30694
|
+
* @returns Promise resolving to grantee info
|
|
30695
|
+
*/
|
|
30696
|
+
getGranteeInfoByAddress(granteeAddress: Address): Promise<GranteeInfo>;
|
|
30697
|
+
/**
|
|
30698
|
+
* Get all permission IDs for a specific grantee
|
|
30699
|
+
*
|
|
30700
|
+
* @param granteeId - Grantee ID to get permissions for
|
|
30701
|
+
* @returns Promise resolving to array of permission IDs
|
|
30702
|
+
*/
|
|
30703
|
+
getGranteePermissionIds(granteeId: bigint): Promise<bigint[]>;
|
|
30704
|
+
/**
|
|
30705
|
+
* Get all permissions for a specific grantee (alias for getGranteePermissionIds)
|
|
30706
|
+
*
|
|
30707
|
+
* @param granteeId - Grantee ID to get permissions for
|
|
30708
|
+
* @returns Promise resolving to array of permission IDs
|
|
30709
|
+
*/
|
|
30710
|
+
getGranteePermissions(granteeId: bigint): Promise<bigint[]>;
|
|
30711
|
+
/**
|
|
30712
|
+
* Get all server IDs for a user
|
|
30713
|
+
*
|
|
30714
|
+
* @param userAddress - User address to get server IDs for
|
|
30715
|
+
* @returns Promise resolving to array of server IDs
|
|
30716
|
+
*/
|
|
30717
|
+
getUserServerIdsValues(userAddress: Address): Promise<bigint[]>;
|
|
30718
|
+
/**
|
|
30719
|
+
* Get server ID at specific index for a user
|
|
30720
|
+
*
|
|
30721
|
+
* @param userAddress - User address
|
|
30722
|
+
* @param serverIndex - Index of the server ID
|
|
30723
|
+
* @returns Promise resolving to server ID
|
|
30724
|
+
*/
|
|
30725
|
+
getUserServerIdsAt(userAddress: Address, serverIndex: bigint): Promise<bigint>;
|
|
30726
|
+
/**
|
|
30727
|
+
* Get the number of servers a user has
|
|
30728
|
+
*
|
|
30729
|
+
* @param userAddress - User address
|
|
30730
|
+
* @returns Promise resolving to number of servers
|
|
30731
|
+
*/
|
|
30732
|
+
getUserServerIdsLength(userAddress: Address): Promise<bigint>;
|
|
30733
|
+
/**
|
|
30734
|
+
* Get trusted server info for a specific user and server ID
|
|
30735
|
+
*
|
|
30736
|
+
* @param userAddress - User address
|
|
30737
|
+
* @param serverId - Server ID
|
|
30738
|
+
* @returns Promise resolving to trusted server info
|
|
30739
|
+
*/
|
|
30740
|
+
getUserServers(userAddress: Address, serverId: bigint): Promise<TrustedServerInfo>;
|
|
30741
|
+
/**
|
|
30742
|
+
* Get server info by server ID
|
|
30743
|
+
*
|
|
30744
|
+
* @param serverId - Server ID
|
|
30745
|
+
* @returns Promise resolving to server info
|
|
30746
|
+
*/
|
|
30747
|
+
getServers(serverId: bigint): Promise<ServerInfo>;
|
|
30748
|
+
/**
|
|
30749
|
+
* Get user info including nonce and trusted server IDs
|
|
30750
|
+
*
|
|
30751
|
+
* @param userAddress - User address
|
|
30752
|
+
* @returns Promise resolving to user info
|
|
30753
|
+
*/
|
|
30754
|
+
getUsers(userAddress: Address): Promise<{
|
|
30755
|
+
nonce: bigint;
|
|
30756
|
+
trustedServerIds: bigint[];
|
|
30757
|
+
}>;
|
|
30758
|
+
/**
|
|
30759
|
+
* Update server URL
|
|
30760
|
+
*
|
|
30761
|
+
* @param serverId - Server ID to update
|
|
30762
|
+
* @param url - New URL for the server
|
|
30763
|
+
* @returns Promise resolving to transaction hash
|
|
30764
|
+
*/
|
|
30765
|
+
submitUpdateServer(serverId: bigint, url: string): Promise<Hash>;
|
|
30766
|
+
/**
|
|
30767
|
+
* Get all permission IDs for a user
|
|
30768
|
+
*
|
|
30769
|
+
* @param userAddress - User address to get permission IDs for
|
|
30770
|
+
* @returns Promise resolving to array of permission IDs
|
|
30771
|
+
*/
|
|
30772
|
+
getUserPermissionIdsValues(userAddress: Address): Promise<bigint[]>;
|
|
30773
|
+
/**
|
|
30774
|
+
* Get permission ID at specific index for a user
|
|
30775
|
+
*
|
|
30776
|
+
* @param userAddress - User address
|
|
30777
|
+
* @param permissionIndex - Index of the permission ID
|
|
30778
|
+
* @returns Promise resolving to permission ID
|
|
30779
|
+
*/
|
|
30780
|
+
getUserPermissionIdsAt(userAddress: Address, permissionIndex: bigint): Promise<bigint>;
|
|
30781
|
+
/**
|
|
30782
|
+
* Get the number of permissions a user has
|
|
30783
|
+
*
|
|
30784
|
+
* @param userAddress - User address
|
|
30785
|
+
* @returns Promise resolving to number of permissions
|
|
30786
|
+
*/
|
|
30787
|
+
getUserPermissionIdsLength(userAddress: Address): Promise<bigint>;
|
|
30788
|
+
/**
|
|
30789
|
+
* Get permission info by permission ID
|
|
30790
|
+
*
|
|
30791
|
+
* @param permissionId - Permission ID
|
|
30792
|
+
* @returns Promise resolving to permission info
|
|
30793
|
+
*/
|
|
30794
|
+
getPermissions(permissionId: bigint): Promise<PermissionInfo>;
|
|
30795
|
+
/**
|
|
30796
|
+
* Submit permission with signature to the blockchain (supports gasless transactions)
|
|
30797
|
+
*
|
|
30798
|
+
* @param params - Parameters for adding permission
|
|
30799
|
+
* @returns Promise resolving to transaction hash
|
|
30800
|
+
* @throws {RelayerError} When gasless transaction submission fails
|
|
30801
|
+
* @throws {SignatureError} When user rejects the signature request
|
|
30802
|
+
* @throws {BlockchainError} When permission addition fails
|
|
30803
|
+
* @throws {NetworkError} When network communication fails
|
|
30804
|
+
*/
|
|
30805
|
+
submitAddPermission(params: ServerFilesAndPermissionParams): Promise<Hash>;
|
|
30806
|
+
/**
|
|
30807
|
+
* Submits an already-signed add permission transaction to the blockchain.
|
|
30808
|
+
* This method supports both relayer-based gasless transactions and direct transactions.
|
|
30809
|
+
*
|
|
30810
|
+
* @param typedData - The EIP-712 typed data for AddPermission
|
|
30811
|
+
* @param signature - The user's signature
|
|
30812
|
+
* @returns Promise resolving to the transaction hash
|
|
30813
|
+
* @throws {RelayerError} When gasless transaction submission fails
|
|
30814
|
+
* @throws {BlockchainError} When permission addition fails
|
|
30815
|
+
* @throws {NetworkError} When network communication fails
|
|
30816
|
+
*/
|
|
30817
|
+
submitSignedAddPermission(typedData: GenericTypedData, signature: Hash): Promise<Hash>;
|
|
30818
|
+
/**
|
|
30819
|
+
* Submit server files and permissions with signature to the blockchain (supports gasless transactions)
|
|
30820
|
+
*
|
|
30821
|
+
* @param params - Parameters for adding server files and permissions
|
|
30822
|
+
* @returns Promise resolving to transaction hash
|
|
30823
|
+
* @throws {RelayerError} When gasless transaction submission fails
|
|
30824
|
+
* @throws {SignatureError} When user rejects the signature request
|
|
30825
|
+
* @throws {BlockchainError} When server files and permissions addition fails
|
|
30826
|
+
* @throws {NetworkError} When network communication fails
|
|
30827
|
+
*/
|
|
30828
|
+
submitAddServerFilesAndPermissions(params: ServerFilesAndPermissionParams): Promise<Hash>;
|
|
30829
|
+
/**
|
|
30830
|
+
* Submits an already-signed add server files and permissions transaction to the blockchain.
|
|
30831
|
+
* This method supports both relayer-based gasless transactions and direct transactions.
|
|
30832
|
+
*
|
|
30833
|
+
* @param typedData - The EIP-712 typed data for AddServerFilesAndPermissions
|
|
30834
|
+
* @param signature - The user's signature
|
|
30835
|
+
* @returns Promise resolving to the transaction hash
|
|
30836
|
+
* @throws {RelayerError} When gasless transaction submission fails
|
|
30837
|
+
* @throws {BlockchainError} When server files and permissions addition fails
|
|
30838
|
+
* @throws {NetworkError} When network communication fails
|
|
30839
|
+
*/
|
|
30840
|
+
submitSignedAddServerFilesAndPermissions(typedData: ServerFilesAndPermissionTypedData, signature: Hash): Promise<Hash>;
|
|
30841
|
+
/**
|
|
30842
|
+
* Submit permission revocation with signature to the blockchain
|
|
30843
|
+
*
|
|
30844
|
+
* @param permissionId - Permission ID to revoke
|
|
30845
|
+
* @returns Promise resolving to transaction hash
|
|
30846
|
+
*/
|
|
30847
|
+
submitRevokePermission(permissionId: bigint): Promise<Hash>;
|
|
30848
|
+
/**
|
|
30849
|
+
* Submits a signed add permission transaction directly to the blockchain.
|
|
30850
|
+
*
|
|
30851
|
+
* @param typedData - The typed data structure for the permission addition
|
|
30852
|
+
* @param signature - The cryptographic signature authorizing the transaction
|
|
30853
|
+
* @returns Promise resolving to the transaction hash
|
|
30854
|
+
*/
|
|
30855
|
+
private submitDirectAddPermissionTransaction;
|
|
30856
|
+
/**
|
|
30857
|
+
* Submits a signed add server files and permissions transaction directly to the blockchain.
|
|
30858
|
+
*
|
|
30859
|
+
* @param typedData - The typed data structure for the server files and permissions addition
|
|
30860
|
+
* @param signature - The cryptographic signature authorizing the transaction
|
|
30861
|
+
* @returns Promise resolving to the transaction hash
|
|
30862
|
+
*/
|
|
30863
|
+
private submitDirectAddServerFilesAndPermissionsTransaction;
|
|
31312
30864
|
}
|
|
31313
30865
|
|
|
31314
30866
|
/**
|
|
@@ -34260,66 +33812,6 @@ declare class DataController {
|
|
|
34260
33812
|
* for specific files by ID.
|
|
34261
33813
|
*/
|
|
34262
33814
|
getFileById(fileId: number): Promise<UserFile$1>;
|
|
34263
|
-
/**
|
|
34264
|
-
* Uploads an encrypted file to storage and registers it on the blockchain.
|
|
34265
|
-
*
|
|
34266
|
-
* @deprecated Since v2.0.0 - Use vana.data.upload() instead for the high-level API with automatic encryption
|
|
34267
|
-
*
|
|
34268
|
-
* Migration guide:
|
|
34269
|
-
* ```typescript
|
|
34270
|
-
* // Old way (deprecated):
|
|
34271
|
-
* const encrypted = await encryptBlob(data, key);
|
|
34272
|
-
* const result = await vana.data.uploadEncryptedFile(encrypted, filename);
|
|
34273
|
-
*
|
|
34274
|
-
* // New way:
|
|
34275
|
-
* const result = await vana.data.upload({
|
|
34276
|
-
* content: data,
|
|
34277
|
-
* filename: filename,
|
|
34278
|
-
* encrypt: true // Handles encryption automatically
|
|
34279
|
-
* });
|
|
34280
|
-
* ```
|
|
34281
|
-
* @param encryptedFile - The encrypted file blob to upload
|
|
34282
|
-
* @param filename - Optional filename for the upload
|
|
34283
|
-
* @param providerName - Optional storage provider to use
|
|
34284
|
-
* @returns Promise resolving to upload result with file ID and storage URL
|
|
34285
|
-
*
|
|
34286
|
-
* This method handles the complete flow of:
|
|
34287
|
-
* 1. Uploading the encrypted file to the specified storage provider
|
|
34288
|
-
* 2. Registering the file URL on the DataRegistry contract via relayer
|
|
34289
|
-
* 3. Returning the assigned file ID and storage URL
|
|
34290
|
-
*/
|
|
34291
|
-
uploadEncryptedFile(encryptedFile: Blob, filename?: string, providerName?: string): Promise<UploadEncryptedFileResult>;
|
|
34292
|
-
/**
|
|
34293
|
-
* Uploads an encrypted file to storage and registers it on the blockchain with a schema.
|
|
34294
|
-
*
|
|
34295
|
-
* @deprecated Since v2.0.0 - Use vana.data.upload() instead for the high-level API with automatic encryption and schema validation
|
|
34296
|
-
*
|
|
34297
|
-
* Migration guide:
|
|
34298
|
-
* ```typescript
|
|
34299
|
-
* // Old way (deprecated):
|
|
34300
|
-
* const encrypted = await encryptBlob(data, key);
|
|
34301
|
-
* const result = await vana.data.uploadEncryptedFileWithSchema(encrypted, schemaId, filename);
|
|
34302
|
-
*
|
|
34303
|
-
* // New way:
|
|
34304
|
-
* const result = await vana.data.upload({
|
|
34305
|
-
* content: data,
|
|
34306
|
-
* filename: filename,
|
|
34307
|
-
* schemaId: schemaId, // Automatic validation
|
|
34308
|
-
* encrypt: true
|
|
34309
|
-
* });
|
|
34310
|
-
* ```
|
|
34311
|
-
* @param encryptedFile - The encrypted file blob to upload
|
|
34312
|
-
* @param schemaId - The schema ID to associate with the file
|
|
34313
|
-
* @param filename - Optional filename for the upload
|
|
34314
|
-
* @param providerName - Optional storage provider to use
|
|
34315
|
-
* @returns Promise resolving to upload result with file ID and storage URL
|
|
34316
|
-
*
|
|
34317
|
-
* This method handles the complete flow of:
|
|
34318
|
-
* 1. Uploading the encrypted file to the specified storage provider
|
|
34319
|
-
* 2. Registering the file URL on the DataRegistry contract with a schema ID
|
|
34320
|
-
* 3. Returning the assigned file ID and storage URL
|
|
34321
|
-
*/
|
|
34322
|
-
uploadEncryptedFileWithSchema(encryptedFile: Blob, schemaId: number, filename?: string, providerName?: string): Promise<UploadEncryptedFileResult>;
|
|
34323
33815
|
/**
|
|
34324
33816
|
* Registers a file URL directly on the blockchain with a schema ID.
|
|
34325
33817
|
*
|
|
@@ -34385,64 +33877,6 @@ declare class DataController {
|
|
|
34385
33877
|
fileId: number;
|
|
34386
33878
|
transactionHash: string;
|
|
34387
33879
|
}>;
|
|
34388
|
-
/**
|
|
34389
|
-
* Adds a new schema to the DataRefinerRegistry.
|
|
34390
|
-
*
|
|
34391
|
-
* @deprecated Since v2.0.0 - Use vana.schemas.create() instead for the high-level API with automatic IPFS upload
|
|
34392
|
-
*
|
|
34393
|
-
* Migration guide:
|
|
34394
|
-
* ```typescript
|
|
34395
|
-
* // Old way (deprecated):
|
|
34396
|
-
* const result = await vana.data.addSchema({
|
|
34397
|
-
* name: "UserProfile",
|
|
34398
|
-
* type: "JSON",
|
|
34399
|
-
* definitionUrl: "ipfs://..."
|
|
34400
|
-
* });
|
|
34401
|
-
*
|
|
34402
|
-
* // New way:
|
|
34403
|
-
* const result = await vana.schemas.create({
|
|
34404
|
-
* name: "UserProfile",
|
|
34405
|
-
* type: "JSON",
|
|
34406
|
-
* definition: schemaObject // Automatically uploads to IPFS
|
|
34407
|
-
* });
|
|
34408
|
-
* ```
|
|
34409
|
-
* @param params - Schema parameters including name, type, and definition URL
|
|
34410
|
-
* @returns Promise resolving to the new schema ID and transaction hash
|
|
34411
|
-
*/
|
|
34412
|
-
addSchema(params: AddSchemaParams): Promise<AddSchemaResult>;
|
|
34413
|
-
/**
|
|
34414
|
-
* Retrieves a schema by its ID.
|
|
34415
|
-
*
|
|
34416
|
-
* @deprecated Since v2.0.0 - Use vana.schemas.get() instead
|
|
34417
|
-
*
|
|
34418
|
-
* Migration guide:
|
|
34419
|
-
* ```typescript
|
|
34420
|
-
* // Old way (deprecated):
|
|
34421
|
-
* const schema = await vana.data.getSchema(schemaId);
|
|
34422
|
-
*
|
|
34423
|
-
* // New way:
|
|
34424
|
-
* const schema = await vana.schemas.get(schemaId);
|
|
34425
|
-
* ```
|
|
34426
|
-
* @param schemaId - The schema ID to retrieve
|
|
34427
|
-
* @returns Promise resolving to the schema information
|
|
34428
|
-
*/
|
|
34429
|
-
getSchema(schemaId: number): Promise<Schema>;
|
|
34430
|
-
/**
|
|
34431
|
-
* Gets the total number of schemas in the registry.
|
|
34432
|
-
*
|
|
34433
|
-
* @deprecated Since v2.0.0 - Use vana.schemas.count() instead
|
|
34434
|
-
*
|
|
34435
|
-
* Migration guide:
|
|
34436
|
-
* ```typescript
|
|
34437
|
-
* // Old way (deprecated):
|
|
34438
|
-
* const count = await vana.data.getSchemasCount();
|
|
34439
|
-
*
|
|
34440
|
-
* // New way:
|
|
34441
|
-
* const count = await vana.schemas.count();
|
|
34442
|
-
* ```
|
|
34443
|
-
* @returns Promise resolving to the total schema count
|
|
34444
|
-
*/
|
|
34445
|
-
getSchemasCount(): Promise<number>;
|
|
34446
33880
|
/**
|
|
34447
33881
|
* Adds a new refiner to the DataRefinerRegistry.
|
|
34448
33882
|
*
|
|
@@ -34496,6 +33930,17 @@ declare class DataController {
|
|
|
34496
33930
|
account: Address;
|
|
34497
33931
|
publicKey: string;
|
|
34498
33932
|
}>, filename?: string, providerName?: string): Promise<UploadEncryptedFileResult>;
|
|
33933
|
+
/**
|
|
33934
|
+
* Uploads content to storage without registering it on the blockchain.
|
|
33935
|
+
* This method only handles the storage upload and returns the file URL.
|
|
33936
|
+
*
|
|
33937
|
+
* @param content - The content to upload (string, Blob, Buffer, or object - objects will be JSON stringified)
|
|
33938
|
+
* @param filename - Optional filename for the uploaded file (defaults to timestamp-based name)
|
|
33939
|
+
* @param encrypt - Optional flag to encrypt the content before upload
|
|
33940
|
+
* @param providerName - Optional specific storage provider to use
|
|
33941
|
+
* @returns Promise resolving to the storage upload result with url, size, and contentType
|
|
33942
|
+
*/
|
|
33943
|
+
uploadToStorage(content: string | Blob | Buffer | object, filename?: string, encrypt?: boolean, providerName?: string): Promise<StorageUploadResult>;
|
|
34499
33944
|
/**
|
|
34500
33945
|
* Adds a permission for a party to access an existing file.
|
|
34501
33946
|
*
|
|
@@ -36894,6 +36339,10 @@ declare class CircuitBreaker {
|
|
|
36894
36339
|
*
|
|
36895
36340
|
* This implementation uses browser-compatible libraries and configurations
|
|
36896
36341
|
* to provide crypto, PGP, and HTTP functionality without Node.js dependencies.
|
|
36342
|
+
*
|
|
36343
|
+
* WARNING: Dependencies that access globals during init
|
|
36344
|
+
* MUST be dynamically imported to support Turbopack.
|
|
36345
|
+
* See: https://github.com/vercel/next.js/issues/82632
|
|
36897
36346
|
*/
|
|
36898
36347
|
|
|
36899
36348
|
/**
|
|
@@ -37233,4 +36682,4 @@ declare function Vana(config: VanaConfig): VanaBrowserImpl;
|
|
|
37233
36682
|
*/
|
|
37234
36683
|
type VanaInstance = VanaBrowserImpl;
|
|
37235
36684
|
|
|
37236
|
-
export { type $defs, type APIResponse, type AddAndTrustServerInput, type AddAndTrustServerParams, type AddAndTrustServerTypedData, type AddRefinerParams, type AddRefinerResult, type AddSchemaParams, type AddSchemaResult, type AllKeys, ApiClient, type ApiClientConfig, type ApiResponse, AsyncQueue, type AsyncResult, type AuthenticationErrorResponse, type Awaited, type BaseConfig, type BaseConfigWithStorage, BaseController, type BatchServerInfoResult, type BatchUploadParams, type BatchUploadResult, type BlockRange, BlockchainError, type BlockchainErrorResponse, type Brand, BrowserPlatformAdapter, type Cache, type CacheConfig, CallbackStorage, type ChainConfig, type ChainConfigWithStorage, type CheckPermissionParams, CircuitBreaker, type ComputeErrorResponse, type ConditionalOptional, type ConfigValidationOptions, type ConfigValidationResult, type ContractAddresses, type ContractCall, type ContractDeployment, ContractFactory, type ContractInfo, type ContractMethodParams, type ContractMethodReturnType, ContractNotFoundError, type Controller, type ControllerContext, type CreateOperationParams, type CreateOperationRequest, type CreateOperationResponse, type CreateSchemaParams, type CreateSchemaResult, DEFAULT_ENCRYPTION_SEED, DEFAULT_IPFS_GATEWAY, DataController, type DataSchema, type DecryptionErrorResponse, type DeepPartial, type DeepReadonly, type DeleteFileParams, type DeleteFileResult, type DownloadFileParams, type DownloadFileResult, type EncryptedUploadParams, type EncryptionInfo, type ErrorResponse, EventEmitter, type EventFilter, type EventLog, type Factory, type FileAccessErrorResponse, type FileAccessPermissions, type FileMetadata, type FilePermissionParams, type FileSharingConfig, type GasEstimate, type GenericRequest, type GenericResponse, type GenericTypedData, type GetFileParams, type GetOperationResponse, type GetUserFilesParams, type GetUserPermissionsOptions, type GetUserTrustedServersParams, type GetUserTrustedServersResult, GoogleDriveStorage, GrantExpiredError, type GrantFile, type GrantPermissionParams, GrantSchemaError, GrantValidationError, type GrantValidationErrorResponse, type GrantValidationOptions, type GrantValidationResult, type GrantedPermission, type Grantee, GranteeMismatchError, type GranteeQueryOptions, type HttpMethod, IPFS_GATEWAYS, type IdentityResponseModel, type InitPersonalServerParams, type InternalServerErrorResponse, InvalidConfigurationError, IpfsStorage, type LegacyPermissionParams, type MaybeArray, type MaybePromise, MemoryCache, type Middleware, MiddlewarePipeline, NetworkError, type NetworkInfo, type Nominal, type NonNullable, NonceError, type NotFoundErrorResponse, type Observable, type Observer, type OmitByType, type OnChainPermissionGrant, type OperationErrorResponse, OperationNotAllowedError, type OptionalKeys, type PaginatedGrantees, type PaginatedTrustedServers, type PaginationParams, type PaginationResult, type PartialExcept, type PermissionAnalytics, type PermissionCheckResult, PermissionError, type PermissionEvent, type PermissionGrantDomain, type PermissionGrantMessage, type PermissionGrantTypedData, type PermissionInfo, type PermissionInputMessage, type PermissionOperation, type PermissionQueryResult, type PermissionStatus, PermissionsController, PersonalServerError, type PersonalServerIdentity, type PersonalServerModel, type PickByType, type PinataListResponse, type PinataPin, PinataStorage, type PinataUploadResponse, type Plugin, type PostRequestParams, type PromiseResult, ProtocolController, type QueryPermissionsParams, type RateLimitInfo, RateLimiter, type RateLimiterConfig, type Refiner, type RegisterGranteeInput, type RegisterGranteeParams, type RegisterGranteeTypedData, type RelayerCallbacks, type RelayerConfig, RelayerError, type RelayerErrorResponse, type RelayerMetrics, type RelayerQueueInfo, type RelayerRequestOptions, type RelayerStatus, type RelayerStorageResponse, type RelayerStoreParams, type RelayerSubmitParams, type RelayerTransactionResponse, type RelayerTransactionStatus, type RelayerWebhookConfig, type RelayerWebhookPayload, type ReplicateAPIResponse, type ReplicateStatus, type Repository, type RequestOptions, type RequireKeys, type RequiredExcept, type RetryConfig, RetryUtility, type RevokePermissionInput, type RevokePermissionParams, type RuntimeConfig, type Schema, SchemaValidationError, SchemaValidator, SerializationError, type Server, type components as ServerComponents, ServerController, type $defs as ServerDefs, type operations as ServerOperations, type paths as ServerPaths, type ServerTrustStatus, ServerUrlMismatchError, type webhooks as ServerWebhooks, type Service, SignatureCache, SignatureError, type SimplifiedPermissionMessage, type StateMachine, type StatusInfo, type StorageCallbacks, type StorageConfig, type StorageDownloadOptions, StorageError, type StorageFile, type StorageListOptions, type StorageListResult, StorageManager, type StorageProvider, type StorageProviderConfig, type StorageRequiredMarker, type StorageUploadResult, type TimeRange, type TransactionOptions, type TransactionReceipt, type Transformer, type TrustServerInput, type TrustServerParams, type TrustServerTypedData, type TrustedServer, type TrustedServerInfo, type TrustedServerQueryMode, type TrustedServerQueryOptions, type UnencryptedUploadParams, type UntrustServerInput, type UntrustServerParams, type UntrustServerTypedData, type UpdateSchemaIdParams, type UpdateSchemaIdResult, type UploadEncryptedFileResult, type UploadFileParams, type UploadFileResult, type UploadParams, type UploadProgress, type UploadResult, type UserFile, UserRejectedRequestError, type ValidationErrorResponse, type ValidationResult, type Validator, Vana, VanaBrowserImpl, type VanaChain, type VanaChainConfig, type VanaChainId, type VanaConfig, type VanaConfigWithStorage, type VanaContract, type VanaContract as VanaContractAbi, type VanaContractInstance, type VanaContractName, VanaCore, VanaCoreFactory, VanaError, type VanaInstance, type VanaPlatformAdapter, type WalletConfig, type WalletConfigWithStorage, __contractCache, chains, checkGrantAccess, clearContractCache, type components, convertIpfsUrl, convertIpfsUrlWithFallbacks, createAndStoreGrant, createBrowserPlatformAdapter, createGrantFile, createPlatformAdapterSafe, createValidatedGrant, decryptBlobWithSignedKey, decryptWithPrivateKey, decryptWithWalletPrivateKey, Vana as default, detectPlatform, encryptBlobWithSignedKey, encryptFileKey, encryptWithWalletPublicKey, extractIpfsHash, fetchAndValidateSchema, fetchWithFallbacks, formatEth, formatNumber, formatToken, generateEncryptionKey, generateEncryptionKeyPair, generatePGPKeyPair, getAbi, getAllChains, getChainConfig, getContractAddress, getContractController, getContractInfo, getEncryptionParameters, getGatewayUrls, getGrantFileHash, getGrantTimeRemaining, getPlatformCapabilities, hasStorageConfig, isAPIResponse, isChainConfig, isGrantExpired, isIpfsUrl, isPlatformSupported, isReplicateAPIResponse, isVanaChain, isVanaChainId, isWalletConfig, moksha, mokshaTestnet, type operations, parseReplicateOutput, type paths, retrieveAndValidateGrant, retrieveGrantFile, safeParseJSON, schemaValidator, shortenAddress, storeGrantFile, summarizeGrant, validateDataAgainstSchema, validateDataSchema, validateGrant, validateGrantExpiry, validateGrantFile, validateGranteeAccess, validateOperationAccess, vanaMainnet, type webhooks, withSignatureCache };
|
|
36685
|
+
export { type $defs, type APIResponse, type AddAndTrustServerInput, type AddAndTrustServerParams, type AddAndTrustServerTypedData, type AddRefinerParams, type AddRefinerResult, type AddSchemaParams, type AddSchemaResult, type AllKeys, ApiClient, type ApiClientConfig, type ApiResponse, AsyncQueue, type AsyncResult, type AuthenticationErrorResponse, type Awaited, type BaseConfig, type BaseConfigWithStorage, BaseController, type BatchServerInfoResult, type BatchUploadParams, type BatchUploadResult, type BlockRange, BlockchainError, type BlockchainErrorResponse, type Brand, BrowserPlatformAdapter, type Cache, type CacheConfig, CallbackStorage, type ChainConfig, type ChainConfigWithStorage, type CheckPermissionParams, CircuitBreaker, type ComputeErrorResponse, type ConditionalOptional, type ConfigValidationOptions, type ConfigValidationResult, type ContractAddresses, type ContractCall, type ContractDeployment, ContractFactory, type ContractInfo, type ContractMethodParams, type ContractMethodReturnType, ContractNotFoundError, type Controller, type ControllerContext, type CreateOperationParams, type CreateOperationRequest, type CreateOperationResponse, type CreateSchemaParams, type CreateSchemaResult, DEFAULT_ENCRYPTION_SEED, DEFAULT_IPFS_GATEWAY, DataController, type DataSchema, type DecryptionErrorResponse, type DeepPartial, type DeepReadonly, type DeleteFileParams, type DeleteFileResult, type DownloadFileParams, type DownloadFileResult, type EncryptedUploadParams, type EncryptionInfo, type ErrorResponse, EventEmitter, type EventFilter, type EventLog, type Factory, type FileAccessErrorResponse, type FileAccessPermissions, type FileMetadata, type FilePermissionParams, type FileSharingConfig, type GasEstimate, type GenericRequest, type GenericResponse, type GenericTypedData, type GetFileParams, type GetOperationResponse, type GetUserFilesParams, type GetUserPermissionsOptions, type GetUserTrustedServersParams, type GetUserTrustedServersResult, GoogleDriveStorage, GrantExpiredError, type GrantFile, type GrantPermissionParams, GrantSchemaError, GrantValidationError, type GrantValidationErrorResponse, type GrantValidationOptions, type GrantValidationResult, type GrantedPermission, type Grantee, type GranteeInfo, GranteeMismatchError, type GranteeQueryOptions, type HttpMethod, IPFS_GATEWAYS, type IdentityResponseModel, type InitPersonalServerParams, type InternalServerErrorResponse, InvalidConfigurationError, IpfsStorage, type LegacyPermissionParams, type MaybeArray, type MaybePromise, MemoryCache, type Middleware, MiddlewarePipeline, NetworkError, type NetworkInfo, type Nominal, type NonNullable, NonceError, type NotFoundErrorResponse, type Observable, type Observer, type OmitByType, type OnChainPermissionGrant, type OperationErrorResponse, OperationNotAllowedError, type OptionalKeys, type PaginatedGrantees, type PaginatedTrustedServers, type PaginationParams, type PaginationResult, type PartialExcept, type Permission, type PermissionAnalytics, type PermissionCheckResult, PermissionError, type PermissionEvent, type PermissionGrantDomain, type PermissionGrantMessage, type PermissionGrantTypedData, type PermissionInfo, type PermissionInputMessage, type PermissionOperation, type PermissionQueryResult, type PermissionStatus, PermissionsController, PersonalServerError, type PersonalServerIdentity, type PersonalServerModel, type PickByType, type PinataListResponse, type PinataPin, PinataStorage, type PinataUploadResponse, type Plugin, type PostRequestParams, type PromiseResult, ProtocolController, type QueryPermissionsParams, type RateLimitInfo, RateLimiter, type RateLimiterConfig, type Refiner, type RegisterGranteeInput, type RegisterGranteeParams, type RegisterGranteeTypedData, type RelayerCallbacks, type RelayerConfig, RelayerError, type RelayerErrorResponse, type RelayerMetrics, type RelayerQueueInfo, type RelayerRequestOptions, type RelayerStatus, type RelayerStorageResponse, type RelayerStoreParams, type RelayerSubmitParams, type RelayerTransactionResponse, type RelayerTransactionStatus, type RelayerWebhookConfig, type RelayerWebhookPayload, type ReplicateAPIResponse, type ReplicateStatus, type Repository, type RequestOptions, type RequireKeys, type RequiredExcept, type RetryConfig, RetryUtility, type RevokePermissionInput, type RevokePermissionParams, type RuntimeConfig, type Schema, SchemaValidationError, SchemaValidator, SerializationError, type Server, type components as ServerComponents, ServerController, type $defs as ServerDefs, type ServerFilesAndPermissionParams, type ServerFilesAndPermissionTypedData, type ServerInfo, type operations as ServerOperations, type paths as ServerPaths, type ServerTrustStatus, ServerUrlMismatchError, type webhooks as ServerWebhooks, type Service, SignatureCache, SignatureError, type SimplifiedPermissionMessage, type StateMachine, type StatusInfo, type StorageCallbacks, type StorageConfig, type StorageDownloadOptions, StorageError, type StorageFile, type StorageListOptions, type StorageListResult, StorageManager, type StorageProvider, type StorageProviderConfig, type StorageRequiredMarker, type StorageUploadResult, type TimeRange, type TransactionOptions, type TransactionReceipt, type Transformer, type TrustServerInput, type TrustServerParams, type TrustServerTypedData, type TrustedServer, type TrustedServerInfo, type TrustedServerQueryMode, type TrustedServerQueryOptions, type UnencryptedUploadParams, type UntrustServerInput, type UntrustServerParams, type UntrustServerTypedData, type UpdateSchemaIdParams, type UpdateSchemaIdResult, type UploadEncryptedFileResult, type UploadFileParams, type UploadFileResult, type UploadParams, type UploadProgress, type UploadResult, type UserFile, UserRejectedRequestError, type ValidationErrorResponse, type ValidationResult, type Validator, Vana, VanaBrowserImpl, type VanaChain, type VanaChainConfig, type VanaChainId, type VanaConfig, type VanaConfigWithStorage, type VanaContract, type VanaContract as VanaContractAbi, type VanaContractInstance, type VanaContractName, VanaCore, VanaCoreFactory, VanaError, type VanaInstance, type VanaPlatformAdapter, type WalletConfig, type WalletConfigWithStorage, __contractCache, chains, checkGrantAccess, clearContractCache, type components, convertIpfsUrl, convertIpfsUrlWithFallbacks, createAndStoreGrant, createBrowserPlatformAdapter, createGrantFile, createPlatformAdapterSafe, createValidatedGrant, decryptBlobWithSignedKey, decryptWithPrivateKey, decryptWithWalletPrivateKey, Vana as default, detectPlatform, encryptBlobWithSignedKey, encryptFileKey, encryptWithWalletPublicKey, extractIpfsHash, fetchAndValidateSchema, fetchWithFallbacks, formatEth, formatNumber, formatToken, generateEncryptionKey, generateEncryptionKeyPair, generatePGPKeyPair, getAbi, getAllChains, getChainConfig, getContractAddress, getContractController, getContractInfo, getEncryptionParameters, getGatewayUrls, getGrantFileHash, getGrantTimeRemaining, getPlatformCapabilities, hasStorageConfig, isAPIResponse, isChainConfig, isGrantExpired, isIpfsUrl, isPlatformSupported, isReplicateAPIResponse, isVanaChain, isVanaChainId, isWalletConfig, moksha, mokshaTestnet, type operations, parseReplicateOutput, type paths, retrieveAndValidateGrant, retrieveGrantFile, safeParseJSON, schemaValidator, shortenAddress, storeGrantFile, summarizeGrant, validateDataAgainstSchema, validateDataSchema, validateGrant, validateGrantExpiry, validateGrantFile, validateGranteeAccess, validateOperationAccess, vanaMainnet, type webhooks, withSignatureCache };
|