Skip to content
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

Extra examples #54

Merged
merged 12 commits into from
Dec 23, 2022
Prev Previous commit
Next Next commit
Use correct obj types in examples
grctest committed Sep 21, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 24a1e13a1926120a0a7660f6ec7541306b6a186c
6 changes: 3 additions & 3 deletions examples/bitshares/injections/001_limit_order_create.js
Original file line number Diff line number Diff line change
@@ -12,14 +12,14 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"limit_order_create", // operation name
{
seller: "1.2.",
seller: "1.2.x",
amount_to_sell: {
amount: 1,
asset_id: "1.3."
asset_id: "1.3.x"
},
min_to_receive: {
amount: 1,
asset_id: "1.3."
asset_id: "1.3.x"
},
expiration: currentDate,
fill_or_kill: true,
2 changes: 1 addition & 1 deletion examples/bitshares/injections/002_limit_order_cancel.js
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"limit_order_cancel", // operation name
{
fee_paying_account: "1.2.",
fee_paying_account: "1.2.x",
order: "",
extensions: []
}
6 changes: 3 additions & 3 deletions examples/bitshares/injections/003_call_order_update.js
Original file line number Diff line number Diff line change
@@ -7,14 +7,14 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"call_order_update", // operation name
{
funding_account: "1.2.",
funding_account: "1.2.x",
delta_collateral: {
amount: 1,
asset_id: "1.3."
asset_id: "1.3.x"
},
delta_debt: {
amount: 1,
asset_id: "1.3."
asset_id: "1.3.x"
},
extensions: []
}
6 changes: 3 additions & 3 deletions examples/bitshares/injections/004_fill_order.js
Original file line number Diff line number Diff line change
@@ -8,14 +8,14 @@ let run = async function () {
"fill_order", // operation name
{
order_id: "",
account_id: "1.2.",
account_id: "1.2.x",
pays: {
amount: 1,
asset_id: "1.3."
asset_id: "1.3.x"
},
receives: {
amount: 1,
asset_id: "1.3."
asset_id: "1.3.x"
}
}
);
18 changes: 9 additions & 9 deletions examples/bitshares/injections/005_account_create.js
Original file line number Diff line number Diff line change
@@ -7,25 +7,25 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"account_create", // operation name
{
registrar: "1.2.",
referrer: "1.2.",
registrar: "1.2.x",
referrer: "1.2.x",
referrer_percent: 0,
name: "",
owner: {
weight_threshold: uint32,
account_auths: [{"1.2.": 1}],
key_auths: [{"1.2.": 1}],
address_auths: [{"1.2.": 1}]
account_auths: [{"1.2.x": 1}],
key_auths: [{"1.2.x": 1}],
address_auths: [{"1.2.x": 1}]
},
active: {
weight_threshold: uint32,
account_auths: [{"1.2.": 1}],
key_auths: [{"1.2.": 1}],
address_auths: [{"1.2.": 1}]
account_auths: [{"1.2.x": 1}],
key_auths: [{"1.2.x": 1}],
address_auths: [{"1.2.x": 1}]
},
options: {
memo_key: "",
voting_account: "1.2.",
voting_account: "1.2.x",
num_witness: 0,
num_committee: 0,
votes: [],
2 changes: 1 addition & 1 deletion examples/bitshares/injections/006_account_update.js
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"account_update", // operation name
{
account: "1.2.",
account: "1.2.x",
owner: {},
active: {},
new_options: {},
4 changes: 2 additions & 2 deletions examples/bitshares/injections/007_account_whitelist.js
Original file line number Diff line number Diff line change
@@ -7,8 +7,8 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"account_whitelist", // operation name
{
authorizing_account: "1.2.",
account_to_list: "1.2.",
authorizing_account: "1.2.x",
account_to_list: "1.2.x",
new_listing: 0,
extensions: []
}
2 changes: 1 addition & 1 deletion examples/bitshares/injections/008_account_upgrade.js
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"account_upgrade", // operation name
{
account_to_upgrade: "1.2.",
account_to_upgrade: "1.2.x",
upgrade_to_lifetime_member: true,
extensions: []
}
4 changes: 2 additions & 2 deletions examples/bitshares/injections/009_account_transfer.js
Original file line number Diff line number Diff line change
@@ -7,8 +7,8 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"account_transfer", // operation name
{
account_id: "1.2.",
new_owner: "1.2.",
account_id: "1.2.x",
new_owner: "1.2.x",
extensions: []
}
);
6 changes: 3 additions & 3 deletions examples/bitshares/injections/010_asset_create.js
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"asset_create", // operation name
{
issuer: "1.2.",
issuer: "1.2.x",
symbol: "",
precision: 0,
common_options: {
@@ -19,11 +19,11 @@ let run = async function () {
core_exchange_rate: {
base: {
amount: 1,
asset_id: "1.3."
asset_id: "1.3.x"
},
quote: {
amount: 1,
asset_id: "1.3."
asset_id: "1.3.x"
}
},
whitelist_authorities: [],
8 changes: 4 additions & 4 deletions examples/bitshares/injections/011_asset_update .js
Original file line number Diff line number Diff line change
@@ -7,8 +7,8 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"asset_update", // operation name
{
issuer: "1.2.",
asset_to_update: "1.3.",
issuer: "1.2.x",
asset_to_update: "1.3.x",
new_issuer: null,
new_options: {
max_supply: 1,
@@ -19,11 +19,11 @@ let run = async function () {
core_exchange_rate: {
base: {
amount: 1,
asset_id: "1.3."
asset_id: "1.3.x"
},
quote: {
amount: 1,
asset_id: "1.3."
asset_id: "1.3.x"
}
},
whitelist_authorities: [],
6 changes: 3 additions & 3 deletions examples/bitshares/injections/012_asset_update_bitasset.js
Original file line number Diff line number Diff line change
@@ -7,15 +7,15 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"asset_update_bitasset", // operation name
{
issuer: "1.2.",
asset_to_update: "1.3.",
issuer: "1.2.x",
asset_to_update: "1.3.x",
new_options: {
feed_lifetime_sec: 100000,
minimum_feeds: 1,
force_settlement_delay_sec: 60,
force_settlement_offset_percent: 0,
maximum_force_settlement_volume: 5,
short_backing_asset: "1.3.",
short_backing_asset: "1.3.x",
extensions: []
},
extensions: []
6 changes: 3 additions & 3 deletions examples/bitshares/injections/014_asset_issue.js
Original file line number Diff line number Diff line change
@@ -7,13 +7,13 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"asset_issue", // operation name
{
issuer: "1.2.",
issuer: "1.2.x",
asset_to_issue: {
amount: 1,
asset_id: "1.3."
asset_id: "1.3.x"
},
memo: "", //optional
issue_to_account: "1.2.",
issue_to_account: "1.2.x",
extensions: []
}
);
4 changes: 2 additions & 2 deletions examples/bitshares/injections/015_asset_reserve.js
Original file line number Diff line number Diff line change
@@ -7,10 +7,10 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"asset_reserve", // operation name
{
payer: "1.2.",
payer: "1.2.x",
amount_to_reserve: {
amount: 1,
asset_id: "1.3."
asset_id: "1.3.x"
},
extensions: []
}
4 changes: 2 additions & 2 deletions examples/bitshares/injections/016_asset_fund_fee_pool.js
Original file line number Diff line number Diff line change
@@ -7,8 +7,8 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"asset_fund_fee_pool", // operation name
{
from_account: "1.2.",
asset_id: "1.2.",
from_account: "1.2.x",
asset_id: "1.2.x",
amount: 1,
extensions: []
}
4 changes: 2 additions & 2 deletions examples/bitshares/injections/017_asset_settle.js
Original file line number Diff line number Diff line change
@@ -7,10 +7,10 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"asset_settle", // operation name
{
account: "1.2.",
account: "1.2.x",
amount: {
amount: 1,
asset_id: "1.3."
asset_id: "1.3.x"
},
extensions: []
}
8 changes: 4 additions & 4 deletions examples/bitshares/injections/018_asset_global_settle.js
Original file line number Diff line number Diff line change
@@ -7,16 +7,16 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"asset_global_settle", // operation name
{
issuer: "1.2.",
asset_to_settle: "1.3.",
issuer: "1.2.x",
asset_to_settle: "1.3.x",
settle_price: {
base: {
amount: 1,
asset_id: "1.3."
asset_id: "1.3.x"
},
quote: {
amount: 1,
asset_id: "1.3."
asset_id: "1.3.x"
}
},
extensions: []
12 changes: 6 additions & 6 deletions examples/bitshares/injections/019_asset_publish_feed.js
Original file line number Diff line number Diff line change
@@ -7,29 +7,29 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"asset_publish_feed", // operation name
{
publisher: "1.2.",
asset_id: "1.3.",
publisher: "1.2.x",
asset_id: "1.3.x",
feed: {
settlement_price: {
base: {
amount: 1,
asset_id: "1.3."
asset_id: "1.3.x"
},
quote: {
amount: 1,
asset_id: "1.3."
asset_id: "1.3.x"
}
},
maintenance_collateral_ratio: 100,
maximum_short_squeeze_ratio: 100,
core_exchange_rate: {
base: {
amount: 1,
asset_id: "1.3."
asset_id: "1.3.x"
},
quote: {
amount: 1,
asset_id: "1.3."
asset_id: "1.3.x"
}
}
},
2 changes: 1 addition & 1 deletion examples/bitshares/injections/020_witness_create.js
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"witness_create", // operation name
{
witness_account: "1.2.",
witness_account: "1.2.x",
url: "",
block_signing_key: ""
}
4 changes: 2 additions & 2 deletions examples/bitshares/injections/021_witness_update.js
Original file line number Diff line number Diff line change
@@ -7,8 +7,8 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"witness_update", // operation name
{
witness: "1.x.x",
witness_account: "1.2.",
witness: "1.6.x",
witness_account: "1.2.x",
new_url: "",
new_signing_key: ""
}
12 changes: 6 additions & 6 deletions examples/bitshares/injections/023_proposal_update.js
Original file line number Diff line number Diff line change
@@ -7,12 +7,12 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"proposal_update", // operation name
{
fee_paying_account: "1.2.",
proposal: "1.x.x",
active_approvals_to_add: ["1.2."],
active_approvals_to_remove: ["1.2."],
owner_approvals_to_add: ["1.2."],
owner_approvals_to_remove: ["1.2."],
fee_paying_account: "1.2.x",
proposal: "1.10.x",
active_approvals_to_add: ["1.2.x"],
active_approvals_to_remove: ["1.2.x"],
owner_approvals_to_add: ["1.2.x"],
owner_approvals_to_remove: ["1.2.x"],
key_approvals_to_add: [""],
key_approvals_to_remove: [""],
extensions: []
4 changes: 2 additions & 2 deletions examples/bitshares/injections/024_proposal_delete.js
Original file line number Diff line number Diff line change
@@ -7,9 +7,9 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"proposal_delete", // operation name
{
fee_paying_account: "1.2.",
fee_paying_account: "1.2.x",
using_owner_authority: true,
proposal: "1.x.",
proposal: "1.10.x",
extensions: []
}
);
Original file line number Diff line number Diff line change
@@ -7,11 +7,11 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"withdraw_permission_create", // operation name
{
withdraw_from_account: "1.2.",
authorized_account: "1.2.",
withdraw_from_account: "1.2.x",
authorized_account: "1.2.x",
withdrawal_limit: {
amount: 1,
asset_id: "1.3."
asset_id: "1.3.x"
},
withdrawal_period_sec: 60000,
periods_until_expiration: 60000,
Original file line number Diff line number Diff line change
@@ -7,12 +7,12 @@ let run = async function () {
"wss://testnet.xbts.io/ws", // wss url
"withdraw_permission_update", // operation name
{
withdraw_from_account: "1.2.",
authorized_account: "1.2.",
permission_to_update: "1.x.x",
withdraw_from_account: "1.2.x",
authorized_account: "1.2.x",
permission_to_update: "1.12.x",
withdrawal_limit: {
amount: 1,
asset_id: "1.3."
asset_id: "1.3.x"
},
withdrawal_period_sec: uint32,
period_start_time: time_point_sec,
Loading