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
33 changes: 33 additions & 0 deletions rippled-spec/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -1156,6 +1156,39 @@
"public": true,
"fields": [
]
},
{
"name": "wallet_propose",
"description": "Use the wallet_propose method to generate a key pair and XRP Ledger address.",
"reference": "https://xrpl.org/wallet_propose.html",
"group": "Admin",
"public": false,
"fields": [
{
"name": "key_type",
"json_type": "String",
"required": true,
"description": "Which signing algorithm to use to derive this key pair. Valid values are ed25519 and secp256k1 (all lower case). The default is secp256k1."
},
{
"name": "passphrase",
"json_type": "String",
"required": false,
"description": "Generate a key pair and address from this seed value. This value can be formatted in hexadecimal , the XRP Ledger's base58 format, RFC-1751 , or as an arbitrary string. Cannot be used with seed or seed_hex."
},
{
"name": "seed",
"json_type": "String",
"required": false,
"description": "Generate the key pair and address from this seed value in the XRP Ledger's base58-encoded format. Cannot be used with passphrase or seed_hex."
},
{
"name": "seed_hex",
"json_type": "String",
"required": false,
"description": "Generate the key pair and address from this seed value in hexadecimal format. Cannot be used with passphrase or seed."
}
]
}
]
}
49 changes: 49 additions & 0 deletions src/Api/Method/WalletPropose.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php declare(strict_types=1);

namespace FOXRP\Rippled\Api\Method;

use FOXRP\Rippled\Api\Field;

/**
* WalletPropose Method Class
*
* Use the wallet_propose method to generate a key pair and XRP Ledger address.
*
* @link https://xrpl.org/wallet_propose.html WalletPropose method documentation.
*/
class WalletPropose extends AbstractMethod
{
/**
* {@inheritDoc}
*
* @throws \FOXRP\Rippled\Exception\FieldException
*/
public function setFields(): void
{
parent::setFields();

// GENERATED CODE FROM bin/generate.php types
// BEGIN GENERATED
$this->addField(new Field([
'name' => 'key_type',
'required' => true
]));

$this->addField(new Field([
'name' => 'passphrase',
'required' => false
]));

$this->addField(new Field([
'name' => 'seed',
'required' => false
]));

$this->addField(new Field([
'name' => 'seed_hex',
'required' => false
]));

// END GENERATED
}
}