Skip to content

[DO NOT MERGE] Smart Escrows #2928

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from
Draft
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
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/ripple-binary-codec/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ripple-binary-codec",
"version": "2.3.0",
"version": "2.4.0-smartescrow.2",
"description": "XRP Ledger binary codec",
"files": [
"dist/*",
Expand Down
196 changes: 196 additions & 0 deletions packages/ripple-binary-codec/src/enums/definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,56 @@
"type": "UInt32"
}
],
[
"ExtensionComputeLimit",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 53,
"type": "UInt32"
}
],
[
"ExtensionSizeLimit",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 54,
"type": "UInt32"
}
],
[
"GasPrice",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 55,
"type": "UInt32"
}
],
[
"ComputationAllowance",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 56,
"type": "UInt32"
}
],
[
"GasUsed",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 57,
"type": "UInt32"
}
],
[
"IndexNext",
{
Expand Down Expand Up @@ -1270,6 +1320,26 @@
"type": "Hash256"
}
],
[
"VaultID",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 35,
"type": "Hash256"
}
],
[
"ParentBatchID",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 36,
"type": "Hash256"
}
],
[
"hash",
{
Expand Down Expand Up @@ -1860,6 +1930,16 @@
"type": "Blob"
}
],
[
"FinishFunction",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": true,
"nth": 32,
"type": "Blob"
}
],
[
"Account",
{
Expand Down Expand Up @@ -2060,6 +2140,46 @@
"type": "Number"
}
],
[
"AssetsAvailable",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 2,
"type": "Number"
}
],
[
"AssetsMaximum",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 3,
"type": "Number"
}
],
[
"AssetsTotal",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 4,
"type": "Number"
}
],
[
"LossUnrealized",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 5,
"type": "Number"
}
],
[
"TransactionMetaData",
{
Expand Down Expand Up @@ -2370,6 +2490,26 @@
"type": "STObject"
}
],
[
"RawTransaction",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 34,
"type": "STObject"
}
],
[
"BatchSigner",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 35,
"type": "STObject"
}
],
[
"Signers",
{
Expand Down Expand Up @@ -2600,6 +2740,26 @@
"type": "STArray"
}
],
[
"RawTransactions",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 30,
"type": "STArray"
}
],
[
"BatchSigners",
{
"isSerialized": true,
"isSigningField": false,
"isVLEncoded": false,
"nth": 31,
"type": "STArray"
}
],
[
"CloseResolution",
{
Expand Down Expand Up @@ -2690,6 +2850,16 @@
"type": "UInt8"
}
],
[
"WithdrawalPolicy",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 20,
"type": "UInt8"
}
],
[
"TakerPaysCurrency",
{
Expand Down Expand Up @@ -2800,6 +2970,16 @@
"type": "Hash192"
}
],
[
"ShareMPTID",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 2,
"type": "Hash192"
}
],
[
"LockingChainIssue",
{
Expand Down Expand Up @@ -2938,6 +3118,7 @@
"RippleState": 114,
"SignerList": 83,
"Ticket": 84,
"Vault": 132,
"XChainOwnedClaimID": 113,
"XChainOwnedCreateAccountClaimID": 116
},
Expand Down Expand Up @@ -2974,6 +3155,7 @@
"tecINVALID_UPDATE_TIME": 188,
"tecINVARIANT_FAILED": 147,
"tecKILLED": 150,
"tecLIMIT_EXCEEDED": 195,
"tecLOCKED": 192,
"tecMAX_SEQUENCE_REACHED": 154,
"tecNEED_MASTER_KEY": 142,
Expand All @@ -2997,13 +3179,16 @@
"tecOWNERS": 132,
"tecPATH_DRY": 128,
"tecPATH_PARTIAL": 101,
"tecPSEUDO_ACCOUNT": 196,
"tecTOKEN_PAIR_NOT_FOUND": 189,
"tecTOO_SOON": 152,
"tecUNFUNDED": 129,
"tecUNFUNDED_ADD": 102,
"tecUNFUNDED_AMM": 162,
"tecUNFUNDED_OFFER": 103,
"tecUNFUNDED_PAYMENT": 104,
"tecWASM_REJECTED": 197,
"tecWRONG_ASSET": 194,
"tecXCHAIN_ACCOUNT_CREATE_PAST": 181,
"tecXCHAIN_ACCOUNT_CREATE_TOO_MANY": 182,
"tecXCHAIN_BAD_CLAIM_ID": 172,
Expand Down Expand Up @@ -3041,8 +3226,10 @@
"tefNOT_MULTI_SIGNING": -184,
"tefNO_AUTH_REQUIRED": -191,
"tefNO_TICKET": -180,
"tefNO_WASM": -177,
"tefPAST_SEQ": -190,
"tefTOO_BIG": -181,
"tefWASM_FIELD_NOT_INCLUDED": -176,
"tefWRONG_PRIOR": -189,

"telBAD_DOMAIN": -398,
Expand Down Expand Up @@ -3100,6 +3287,7 @@
"temINVALID_ACCOUNT_ID": -268,
"temINVALID_COUNT": -266,
"temINVALID_FLAG": -276,
"temINVALID_INNER_BATCH": -250,
"temMALFORMED": -299,
"temREDUNDANT": -275,
"temRIPPLE_EMPTY": -274,
Expand All @@ -3113,6 +3301,7 @@
"temXCHAIN_BRIDGE_NONDOOR_OWNER": -257,
"temXCHAIN_EQUAL_DOOR_ACCOUNTS": -260,

"terADDRESS_COLLISION": -86,
"terFUNDS_SPENT": -98,
"terINSUF_FEE_B": -97,
"terLAST": -91,
Expand All @@ -3139,6 +3328,7 @@
"AMMWithdraw": 37,
"AccountDelete": 21,
"AccountSet": 3,
"Batch": 71,
"CheckCancel": 18,
"CheckCash": 17,
"CheckCreate": 16,
Expand Down Expand Up @@ -3182,6 +3372,12 @@
"TicketCreate": 10,
"TrustSet": 20,
"UNLModify": 102,
"VaultClawback": 70,
"VaultCreate": 65,
"VaultDelete": 67,
"VaultDeposit": 68,
"VaultSet": 66,
"VaultWithdraw": 69,
"XChainAccountCreateCommit": 44,
"XChainAddAccountCreateAttestation": 46,
"XChainAddClaimAttestation": 45,
Expand Down
4 changes: 2 additions & 2 deletions packages/xrpl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xrpl",
"version": "4.2.5",
"version": "4.3.0-smartescrow.3",
"license": "ISC",
"description": "A TypeScript/JavaScript API for interacting with the XRP Ledger in Node.js and the browser",
"files": [
Expand Down Expand Up @@ -29,7 +29,7 @@
"bignumber.js": "^9.0.0",
"eventemitter3": "^5.0.1",
"ripple-address-codec": "^5.0.0",
"ripple-binary-codec": "^2.3.0",
"ripple-binary-codec": "^2.4.0-smartescrow.2",
"ripple-keypairs": "^2.0.0"
},
"devDependencies": {
Expand Down
6 changes: 6 additions & 0 deletions packages/xrpl/src/Wallet/defaultFaucets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ export interface FaucetWallet {
export enum FaucetNetwork {
Testnet = 'faucet.altnet.rippletest.net',
Devnet = 'faucet.devnet.rippletest.net',
WasmDevnet = 'wasmfaucet.devnet.rippletest.net',
}

export const FaucetNetworkPaths: Record<string, string> = {
[FaucetNetwork.Testnet]: '/accounts',
[FaucetNetwork.Devnet]: '/accounts',
[FaucetNetwork.WasmDevnet]: '/accounts',
}

/**
Expand All @@ -42,6 +44,10 @@ export function getFaucetHost(client: Client): FaucetNetwork | undefined {
)
}

if (connectionUrl.includes('wasm')) {
return FaucetNetwork.WasmDevnet
}

if (connectionUrl.includes('devnet')) {
return FaucetNetwork.Devnet
}
Expand Down
Loading
Loading