-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip * wip * response encoding * wip * wip * wip * wip * wip * rename * wip * wip * wip * wip * fix one * wip * wip * wip * wip * wip * wip * wip * wip * wip * [ABW-3207] app link parsing (#102) * Radix Connect app link parsing * pr review changes * add missing model files * add parser test for invalid url * update invalid url test input data * update session_id * reafactor link parse method * change interaction_id.rs * add addition dapp_request tests * add util function for parsing url * add test for invalid url parsing * use defined constructors for request objects --------- Co-authored-by: jakub-rdx <[email protected]>
- Loading branch information
1 parent
6a4e34c
commit 9dacad5
Showing
73 changed files
with
3,262 additions
and
13 deletions.
There are no files selected for viewing
155 changes: 155 additions & 0 deletions
155
fixtures/vector/wallet_interactions_dapp_to_wallet.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
[ | ||
{ | ||
"interactionId" : "d59590ea-d50b-4e8d-a5e1-da3a2574ae5c", | ||
"items" : { | ||
"discriminator" : "authorizedRequest", | ||
"auth" : { | ||
"discriminator" : "loginWithChallenge", | ||
"challenge" : "e280cfa39e1499f2862e59759cc2fc990cce28b70a7989324fe91c47814d0630" | ||
}, | ||
"reset" : { | ||
"accounts" : true, | ||
"personaData" : true | ||
}, | ||
"ongoingAccounts" : { | ||
"numberOfAccounts" : { | ||
"quantifier" : "atLeast", | ||
"quantity" : 4 | ||
}, | ||
"challenge" : "e280cfa39e1499f2862e59759cc2fc990cce28b70a7989324fe91c47814d0630" | ||
}, | ||
"ongoingPersonaData" : { | ||
"isRequestingName" : true, | ||
"numberOfRequestedEmailAddresses" : { | ||
"quantifier" : "exactly", | ||
"quantity" : 1 | ||
}, | ||
"numberOfRequestedPhoneNumbers" : { | ||
"quantifier" : "exactly", | ||
"quantity" : 1 | ||
} | ||
} | ||
}, | ||
"metadata" : { | ||
"version" : 2, | ||
"networkId" : 2, | ||
"origin" : "https://dev-sandbox.rdx-works-main.extratools.works/", | ||
"dAppDefinitionAddress" : "account_tdx_2_12xd46c22d6m696lv565t9afn088htudtq275px3qs925ywwty8axze" | ||
} | ||
}, | ||
{ | ||
"interactionId" : "d59590ea-d50b-4e8d-a5e1-da3a2574ae5c", | ||
"items" : { | ||
"discriminator" : "authorizedRequest", | ||
"auth" : { | ||
"discriminator" : "loginWithoutChallenge" | ||
}, | ||
"reset" : { | ||
"accounts" : true, | ||
"personaData" : true | ||
}, | ||
"ongoingAccounts" : { | ||
"numberOfAccounts" : { | ||
"quantifier" : "exactly", | ||
"quantity" : 4 | ||
}, | ||
"challenge" : "e280cfa39e1499f2862e59759cc2fc990cce28b70a7989324fe91c47814d0630" | ||
}, | ||
"ongoingPersonaData" : { | ||
"isRequestingName" : true, | ||
"numberOfRequestedEmailAddresses" : { | ||
"quantifier" : "atLeast", | ||
"quantity" : 1 | ||
}, | ||
"numberOfRequestedPhoneNumbers" : { | ||
"quantifier" : "atLeast", | ||
"quantity" : 1 | ||
} | ||
} | ||
}, | ||
"metadata" : { | ||
"version" : 2, | ||
"networkId" : 2, | ||
"origin" : "https://dev-sandbox.rdx-works-main.extratools.works/", | ||
"dAppDefinitionAddress" : "account_tdx_2_12xd46c22d6m696lv565t9afn088htudtq275px3qs925ywwty8axze" | ||
} | ||
}, | ||
{ | ||
"interactionId" : "4051ff20-03b0-4a48-8205-0e8e8c673289", | ||
"items" : { | ||
"discriminator" : "transaction", | ||
"send" : { | ||
"version" : 1, | ||
"message" : "test message", | ||
"blobs": ["0061736d0100000001c8011c60037f7f7f0060027f7f0060027f7f017f60017f0060037f7f7f017f60017f017f60047f7f7f7f0060017f017e60037f7f7f017e60057f7f7f7f7f0060057f7f7f7f7f017f60027f7e017f60037f7f7e0"], | ||
"transactionManifest" : "CALL_FUNCTION Address(\"package_tdx_2_1pkgxxxxxxxxxplxxxxxxxxxxxxx020379220524xxxxxxxxxe4r780\") \n \"OneResourcePool\"\n \"instantiate\"\n Enum<OwnerRole::Fixed>(Enum<AccessRule::AllowAll>())\n Enum<AccessRule::AllowAll>() \n Address(\"resource_tdx_2_1tknxxxxxxxxxradxrdxxxxxxxxx009923554798xxxxxxxxxtfd2jc\")\n None;" | ||
} | ||
}, | ||
"metadata" : { | ||
"version" : 2, | ||
"networkId" : 2, | ||
"origin" : "https://dev-sandbox.rdx-works-main.extratools.works/", | ||
"dAppDefinitionAddress" : "account_tdx_2_12xd46c22d6m696lv565t9afn088htudtq275px3qs925ywwty8axze" | ||
} | ||
}, | ||
{ | ||
"interactionId" : "51a720a5-9f80-4d0f-8264-704d1645f0af", | ||
"items" : { | ||
"discriminator" : "unauthorizedRequest", | ||
"oneTimeAccounts" : { | ||
"numberOfAccounts" : { | ||
"quantifier" : "atLeast", | ||
"quantity" : 1 | ||
}, | ||
"challenge" : "84a5234f14a50dee062dc7a6a51f4bdab7cab5faadea05542af2040688d8fb6c" | ||
}, | ||
"oneTimePersonaData" : { | ||
"isRequestingName" : true, | ||
"numberOfRequestedEmailAddresses" : { | ||
"quantifier" : "exactly", | ||
"quantity" : 1 | ||
}, | ||
"numberOfRequestedPhoneNumbers" : { | ||
"quantifier" : "exactly", | ||
"quantity" : 1 | ||
} | ||
} | ||
}, | ||
"metadata" : { | ||
"version" : 2, | ||
"networkId" : 2, | ||
"origin" : "https://dev-sandbox.rdx-works-main.extratools.works/", | ||
"dAppDefinitionAddress" : "account_tdx_2_12xd46c22d6m696lv565t9afn088htudtq275px3qs925ywwty8axze" | ||
} | ||
}, | ||
{ | ||
"interactionId" : "51a720a5-9f80-4d0f-8264-704d1645f0af", | ||
"items" : { | ||
"discriminator" : "unauthorizedRequest", | ||
"oneTimeAccounts" : { | ||
"numberOfAccounts" : { | ||
"quantifier" : "exactly", | ||
"quantity" : 1 | ||
}, | ||
"challenge" : "84a5234f14a50dee062dc7a6a51f4bdab7cab5faadea05542af2040688d8fb6c" | ||
}, | ||
"oneTimePersonaData" : { | ||
"isRequestingName" : true, | ||
"numberOfRequestedEmailAddresses" : { | ||
"quantifier" : "atLeast", | ||
"quantity" : 1 | ||
}, | ||
"numberOfRequestedPhoneNumbers" : { | ||
"quantifier" : "atLeast", | ||
"quantity" : 1 | ||
} | ||
} | ||
}, | ||
"metadata" : { | ||
"version" : 2, | ||
"networkId" : 2, | ||
"origin" : "https://dev-sandbox.rdx-works-main.extratools.works/", | ||
"dAppDefinitionAddress" : "account_tdx_2_12xd46c22d6m696lv565t9afn088htudtq275px3qs925ywwty8axze" | ||
} | ||
} | ||
] |
115 changes: 115 additions & 0 deletions
115
fixtures/vector/wallet_interactions_wallet_to_dapp.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
[ | ||
{ | ||
"discriminator" : "success", | ||
"interactionId" : "06f00fbc-67ed-4a22-a122-1da719b25b6f", | ||
"items" : { | ||
"discriminator" : "authorizedRequest", | ||
"auth" : { | ||
"discriminator" : "loginWithChallenge", | ||
"persona" : { | ||
"identityAddress" : "identity_tdx_2_12twas58v4sthsmuky5653dup0drez3vcfwsfm6kp40qu9qyt8fgts6", | ||
"label" : "Usdudh" | ||
}, | ||
"challenge" : "069ef236486d4cd5706b5e5b168e19f750ffd1b4876529a0a9de966d50a15ab7", | ||
"proof" : { | ||
"publicKey" : "ff8aee4c625738e35d837edb11e33b8abe0d6f40849ca1451edaba84d04d0699", | ||
"curve" : "curve25519", | ||
"signature" : "10177ac7d486691777133ffe59d46d55529d86cb1c4ce66aa82f432372f33e24d803d8498f42e26fe113c030fce68c526aeacff94334ba5a7f7ef84c2936eb05" | ||
} | ||
}, | ||
"ongoingAccounts" : { | ||
"accounts" : [ | ||
{ | ||
"address" : "account_tdx_2_129qeystv8tufmkmjrry2g6kadhhfh4f7rd0x3t9yagcvfhspt62paz", | ||
"label" : "Dff", | ||
"appearanceId" : 0 | ||
}, | ||
{ | ||
"address" : "account_tdx_2_128928hvf6pjr3rx2xvdw6ulf7pc8g88ya8ma3j8dtjmntckz09fr3n", | ||
"label" : "Ghhvgfvf", | ||
"appearanceId" : 1 | ||
} | ||
], | ||
"challenge" : "069ef236486d4cd5706b5e5b168e19f750ffd1b4876529a0a9de966d50a15ab7", | ||
"proofs" : [ | ||
{ | ||
"proof" : { | ||
"publicKey" : "11b162e3343ce770b6e9ed8a29d125b5580d1272b0dc4e2bd0fcae33320d9566", | ||
"curve" : "curve25519", | ||
"signature" : "e18617b527d4d33607a8adb6a040c26ca97642ec89dd8a6fe7a41fa724473e4cc69b0729c1df57aba77455801f2eef6f28848a5d206e3739de29ca2288957502" | ||
}, | ||
"accountAddress" : "account_tdx_2_129qeystv8tufmkmjrry2g6kadhhfh4f7rd0x3t9yagcvfhspt62paz" | ||
}, | ||
{ | ||
"proof" : { | ||
"publicKey" : "5386353e4cc27e3d27d064d777d811e242a16ba7aefd425062ed46631739619d", | ||
"curve" : "curve25519", | ||
"signature" : "0143fd941d51f531c8265b0f6b24f4cfcdfd24b40aac47dee6fb3386ce0d400563c892e3894a33840d1c7af2dd43ecd0729fd209171003765d109a04d7485605" | ||
}, | ||
"accountAddress" : "account_tdx_2_128928hvf6pjr3rx2xvdw6ulf7pc8g88ya8ma3j8dtjmntckz09fr3n" | ||
} | ||
] | ||
}, | ||
"ongoingPersonaData" : { | ||
"name" : { | ||
"variant" : "western", | ||
"familyName" : "Family", | ||
"givenNames" : "Given", | ||
"nickname" : "Nick" | ||
}, | ||
"emailAddresses" : [ | ||
"[email protected]" | ||
], | ||
"phoneNumbers" : [ | ||
"071234579" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"discriminator" : "success", | ||
"interactionId" : "278608e0-e5ca-416e-8339-f2d2695651c4", | ||
"items" : { | ||
"oneTimeAccounts" : { | ||
"accounts" : [ | ||
{ | ||
"address" : "account_tdx_2_129qeystv8tufmkmjrry2g6kadhhfh4f7rd0x3t9yagcvfhspt62paz", | ||
"label" : "Dff", | ||
"appearanceId" : 0 | ||
} | ||
] | ||
}, | ||
"discriminator" : "unauthorizedRequest", | ||
"oneTimePersonaData" : { | ||
"name" : { | ||
"variant" : "western", | ||
"familyName" : "Family", | ||
"givenNames" : "Given", | ||
"nickname" : "Nick" | ||
}, | ||
"emailAddresses" : [ | ||
"[email protected]" | ||
], | ||
"phoneNumbers" : [ | ||
"071234579" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"discriminator" : "failure", | ||
"interactionId" : "278608e0-e5ca-416e-8339-f2d2695651c4", | ||
"error" : "rejectedByUser", | ||
"message" : "User rejected the request" | ||
}, | ||
{ | ||
"discriminator" : "success", | ||
"interactionId" : "c42f8825-4bbb-4ce2-a646-776b529e2f51", | ||
"items" : { | ||
"send" : { | ||
"transactionIntentHash" : "txid_tdx_2_1mwuvufnewv6qkxdaesx0gcwap7n79knhkn0crsc8dg9g9k7qknjs6vkd3n" | ||
}, | ||
"discriminator" : "transaction" | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
mod account; | ||
mod account_uniffi_fn; | ||
mod appearance_id; | ||
mod appearance_id_uniffi_fn; | ||
mod on_ledger_settings; | ||
|
||
pub use account::*; | ||
pub use account_uniffi_fn::*; | ||
pub use appearance_id::*; | ||
pub use appearance_id_uniffi_fn::*; | ||
pub use on_ledger_settings::*; |
Oops, something went wrong.