Credentials (#2829)

* create credentials obj, modify depositpreauth

* structrure of transaction models

* initial validation methods and modify transactions affected by deposit auth

* cleanup and add new transactions to list

* binarycodec and add amendments to config

* methods account for credentials

* binary codec update

* add amendments to config

* error validation for credentials actions

* core logic of error validation completed

* type checking in error validation

* init test files and field type validations

* basic tests for crud transactions

* cred delete tests

* cred accept unit tests

* cred create and accept unit tests

* cred delete unit tests

* depositPreauth unit tests

* generic checks for payment, paymentchannelclaim, escrowfinish credential list

* ledger entry update

* lint errors

* cleanup and use helper methods

* fix lint bug

* init integration tests for new transactions

* fix build error, integration test docker update

* unit test fixes -- all pass now

* integration test layout complete

* integration command

* integration tests run

* cicd command edit

* lint and cleanup

* modified history markdown

* deposit preauth integration update

* update docs with new docker command

* fix validation for string id credential arrays

* exports

* add flag

* lint

* fix typo in contributing doc

* docstring typos

* readable string

* fix test'

* review comment fixes

* txn duplicate fix

* Apply suggestions from code review

Co-authored-by: Omar Khan <khancodegt@gmail.com>
Co-authored-by: Mayukha Vadari <mvadari@ripple.com>

* Apply suggestions from code review

Co-authored-by: Omar Khan <khancodegt@gmail.com>

* Apply suggestions from code review

Co-authored-by: Omar Khan <khancodegt@gmail.com>
Co-authored-by: Mayukha Vadari <mvadari@ripple.com>

* typo in auto suggest

* rebase

* readd definitions after rebase

* cleanup list val

* unit tests fixed and running

* lint

* refactor authcred check to work

* Update packages/xrpl/src/models/transactions/payment.ts

Co-authored-by: Omar Khan <khancodegt@gmail.com>

* typo

* Update .ci-config/rippled.cfg

Co-authored-by: Omar Khan <khancodegt@gmail.com>

* update rippled version

* optional field nits

* add to response depositauthorize

* Update packages/xrpl/src/models/transactions/CredentialCreate.ts

Co-authored-by: Omar Khan <khancodegt@gmail.com>

* Update packages/xrpl/src/models/transactions/CredentialDelete.ts

Co-authored-by: Omar Khan <khancodegt@gmail.com>

* Update packages/xrpl/src/models/transactions/accountDelete.ts

Co-authored-by: Omar Khan <khancodegt@gmail.com>

* Apply suggestions from code review

Co-authored-by: Omar Khan <khancodegt@gmail.com>

* cleanups

* unit test fix

* more escrowfinish tests

* clearer error message

* re add statement

* undo autodeleted mandates

* remove extraneous integration tests for now

* lint

* Update .ci-config/rippled.cfg

Co-authored-by: Omar Khan <khancodegt@gmail.com>

* Update packages/xrpl/src/models/transactions/common.ts

Co-authored-by: Omar Khan <khancodegt@gmail.com>

* added tests

* typo

---------

Co-authored-by: Omar Khan <khancodegt@gmail.com>
Co-authored-by: Mayukha Vadari <mvadari@ripple.com>
This commit is contained in:
achowdhry-ripple
2024-12-20 14:03:56 -05:00
committed by GitHub
parent 7bf6fecc71
commit f34d1a7a63
36 changed files with 2056 additions and 88 deletions

View File

@@ -910,6 +910,26 @@
"type": "UInt64"
}
],
[
"IssuerNode",
{
"nth": 27,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "UInt64"
}
],
[
"SubjectNode",
{
"nth": 28,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "UInt64"
}
],
[
"EmailHash",
{
@@ -1810,6 +1830,16 @@
"type": "Blob"
}
],
[
"CredentialType",
{
"nth": 31,
"isVLEncoded": true,
"isSerialized": true,
"isSigningField": true,
"type": "Blob"
}
],
[
"Account",
{
@@ -1980,6 +2010,16 @@
"type": "AccountID"
}
],
[
"Subject",
{
"nth": 24,
"isVLEncoded": true,
"isSerialized": true,
"isSigningField": true,
"type": "AccountID"
}
],
[
"TransactionMetaData",
{
@@ -2270,6 +2310,16 @@
"type": "STObject"
}
],
[
"Credential",
{
"nth": 33,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "STObject"
}
],
[
"Signers",
{
@@ -2460,6 +2510,26 @@
"type": "STArray"
}
],
[
"AuthorizeCredentials",
{
"nth": 26,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "STArray"
}
],
[
"UnauthorizeCredentials",
{
"nth": 27,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "STArray"
}
],
[
"CloseResolution",
{
@@ -2640,6 +2710,16 @@
"type": "Vector256"
}
],
[
"CredentialIDs",
{
"nth": 5,
"isVLEncoded": true,
"isSerialized": true,
"isSigningField": true,
"type": "Vector256"
}
],
[
"MPTokenIssuanceID",
{
@@ -2781,6 +2861,7 @@
"NegativeUNL": 78,
"Offer": 111,
"Oracle": 128,
"Credential": 129,
"PayChannel": 120,
"RippleState": 114,
"SignerList": 83,
@@ -2797,6 +2878,7 @@
"tecAMM_NOT_EMPTY": 167,
"tecARRAY_EMPTY": 190,
"tecARRAY_TOO_LARGE": 191,
"tecBAD_CREDENTIALS": 193,
"tecCANT_ACCEPT_OWN_NFTOKEN_OFFER": 158,
"tecCLAIM": 100,
"tecCRYPTOCONDITION_ERROR": 146,
@@ -2982,6 +3064,9 @@
"CheckCash": 17,
"CheckCreate": 16,
"Clawback": 30,
"CredentialCreate": 58,
"CredentialAccept": 59,
"CredentialDelete": 60,
"DIDDelete": 50,
"DIDSet": 49,
"DepositPreauth": 19,