Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 41 additions & 38 deletions include/sovrin_mod.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,119 +4,122 @@
typedef enum
{
Success = 0,

// Common errors

// Caller passed invalid value as param 1 (null, invalid json and etc..)
CommonInvalidParam1 = 100,

// Caller passed invalid value as param 2 (null, invalid json and etc..)
CommonInvalidParam2,

// Caller passed invalid value as param 3 (null, invalid json and etc..)
CommonInvalidParam3,

// Caller passed invalid value as param 4 (null, invalid json and etc..)
CommonInvalidParam4,

// Caller passed invalid value as param 5 (null, invalid json and etc..)
CommonInvalidParam5,

// Caller passed invalid value as param 6 (null, invalid json and etc..)
CommonInvalidParam6,

// Caller passed invalid value as param 7 (null, invalid json and etc..)
CommonInvalidParam7,

// Caller passed invalid value as param 8 (null, invalid json and etc..)
CommonInvalidParam8,

// Caller passed invalid value as param 9 (null, invalid json and etc..)
CommonInvalidParam9,

// Invalid library state was detected in runtime. It signals library bug
CommonInvalidState,


CommonInvalidStructure,

// Wallet errors
// Caller passed invalid wallet handle
WalletInvalidHandle = 200,

// Unknown type of wallet was passed on create_wallet
WalletUnknownTypeError,

// Attempt to register already existing wallet type
WalletTypeAlreadyRegisteredError,

// Attempt to create wallet with name used for another exists wallet
WalletAlreadyExistsError,

// Requested entity id isn't present in wallet
WalletNotFoundError,

// Wallet files referenced in open_wallet have invalid data format
WalletInvalidDataFormat,

// IO error during access wallet backend
WalletIOError,

// Trying to use wallet with pool that has different name
WalletIncompatiblePoolError,

// Trying to open wallet with invalid configuration
WalletInvalidConfiguration,

// Error in wallet backend
WalletBackendError,

// Ledger errors
// Trying to open pool ledger that wasn't created before
PoolLedgerNotCreatedError = 300,

// Invalid pool ledger configuration was passed to open_pool_ledger or create_pool_ledger
PoolLedgerInvalidConfiguration,

// Pool ledger files referenced in open_pool_ledger have invalid data format
PoolLedgerInvalidDataFormat,

// Caller passed invalid pool ledger handle
PoolLedgerInvalidPoolHandle,

// IO error during access pool ledger files
PoolLedgerIOError,

// No concensus during ledger operation
LedgerNoConsensusError,

// Attempt to send unknown or incomplete transaction message
LedgerInvalidTransaction,

// Attempt to send transaction without the necessary privileges
LedgerSecurityError,

// IO error during sending of ledger transactions or catchup process
LedgerIOError,

// Crypto errors
// Invalid structure of any crypto promitives (keys, signatures, seeds and etc...)
CryptoInvalidStructure = 400,

// Unknown crypto type was requested for signing/verifiyng or encoding/decoding
CryptoUnknownTypeError,

// Revocation registry is full and creation of new registry is necessary
CryptoRevocationRegistryFullError,

CryptoInvalidUserRevocIndex,

// Error in crypto backend
CryptoBackendError,

AnoncredsNotIssuedError,

// Attempt to generate master secret with dupplicated name
AnoncredsMasterSecretDuplicateNameError,

ProofRejected

} sovrin_error_t;

#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
3E2A7F951EC36186006194EC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3E2A7F941EC36186006194EC /* Assets.xcassets */; };
3E2A7F981EC36187006194EC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3E2A7F961EC36187006194EC /* LaunchScreen.storyboard */; };
3E2A7FA31EC36187006194EC /* AnoncredsDemo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3E2A7FA21EC36187006194EC /* AnoncredsDemo.mm */; };
3E2FFA3F1ED5C06E00536EAD /* Anoncreds.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E2FFA3E1ED5C06E00536EAD /* Anoncreds.m */; };
3E2FFA441ED5C37100536EAD /* WalletUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E2FFA431ED5C37100536EAD /* WalletUtils.m */; };
3E2FFA471ED5CC5E00536EAD /* AnoncredsUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E2FFA461ED5CC5E00536EAD /* AnoncredsUtils.m */; };
3E9CDB9A1ECC841700B1980D /* SignusDemo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3E9CDB991ECC841700B1980D /* SignusDemo.mm */; };
3ED5BE4C1EC4967C00881380 /* libsovrin.framework in Resources */ = {isa = PBXBuildFile; fileRef = 3EF020DC1EC45A9B00CF985C /* libsovrin.framework */; };
3ED5BE4F1EC4984900881380 /* libsovrin.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3EF020DC1EC45A9B00CF985C /* libsovrin.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
Expand Down Expand Up @@ -77,6 +80,11 @@
3E2A7F9E1EC36187006194EC /* libsovrin-demoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "libsovrin-demoTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
3E2A7FA21EC36187006194EC /* AnoncredsDemo.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = AnoncredsDemo.mm; sourceTree = "<group>"; };
3E2A7FA41EC36187006194EC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3E2FFA3E1ED5C06E00536EAD /* Anoncreds.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Anoncreds.m; sourceTree = "<group>"; };
3E2FFA421ED5C37100536EAD /* WalletUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WalletUtils.h; sourceTree = "<group>"; };
3E2FFA431ED5C37100536EAD /* WalletUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WalletUtils.m; sourceTree = "<group>"; };
3E2FFA451ED5CC5E00536EAD /* AnoncredsUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnoncredsUtils.h; sourceTree = "<group>"; };
3E2FFA461ED5CC5E00536EAD /* AnoncredsUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AnoncredsUtils.m; sourceTree = "<group>"; };
3E9CDB991ECC841700B1980D /* SignusDemo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SignusDemo.mm; sourceTree = "<group>"; };
3ED5BE531EC9D8F200881380 /* LedgerDemo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LedgerDemo.mm; sourceTree = "<group>"; };
3ED5BE551EC9DA9700881380 /* PoolUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PoolUtils.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -159,6 +167,7 @@
3E2A7FA21EC36187006194EC /* AnoncredsDemo.mm */,
3E9CDB991ECC841700B1980D /* SignusDemo.mm */,
3ED5BE531EC9D8F200881380 /* LedgerDemo.mm */,
3E2FFA3E1ED5C06E00536EAD /* Anoncreds.m */,
3E2A7FA41EC36187006194EC /* Info.plist */,
);
path = "libsovrin-demoTests";
Expand All @@ -185,6 +194,10 @@
3EF020DA1EC4595500CF985C /* Environment.m */,
3ED5BE551EC9DA9700881380 /* PoolUtils.h */,
3ED5BE561EC9DA9700881380 /* PoolUtils.m */,
3E2FFA421ED5C37100536EAD /* WalletUtils.h */,
3E2FFA431ED5C37100536EAD /* WalletUtils.m */,
3E2FFA451ED5CC5E00536EAD /* AnoncredsUtils.h */,
3E2FFA461ED5CC5E00536EAD /* AnoncredsUtils.m */,
);
name = TestUtils;
sourceTree = "<group>";
Expand Down Expand Up @@ -378,10 +391,13 @@
files = (
3E2A7FA31EC36187006194EC /* AnoncredsDemo.mm in Sources */,
3EF020DB1EC4595500CF985C /* Environment.m in Sources */,
3E2FFA441ED5C37100536EAD /* WalletUtils.m in Sources */,
3ED5BE571EC9DA9700881380 /* PoolUtils.m in Sources */,
3E9CDB9A1ECC841700B1980D /* SignusDemo.mm in Sources */,
3E2FFA471ED5CC5E00536EAD /* AnoncredsUtils.m in Sources */,
3EF020D81EC4593900CF985C /* TestUtils.m in Sources */,
3ED5BE541EC9D8F200881380 /* LedgerDemo.mm in Sources */,
3E2FFA3F1ED5C06E00536EAD /* Anoncreds.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Loading