From 9afbfbbbfe6edf1a483459c99ce14471df79f6c4 Mon Sep 17 00:00:00 2001 From: stjet <49297268+stjet@users.noreply.github.com> Date: Fri, 24 Jan 2025 16:13:46 +0000 Subject: [PATCH] refuse transfer to opened accounts in wallet --- README.md | 2 +- docs/classes/DomainAccount.html | 4 ++-- docs/classes/DomainAccountManager.html | 4 ++-- docs/classes/Resolver.html | 4 ++-- docs/classes/TLDAccount.html | 4 ++-- docs/classes/TLDAccountManager.html | 4 ++-- docs/functions/address_to_cid_v0.html | 2 +- docs/functions/base58_to_hex.html | 2 +- docs/functions/bigint_to_uint8array.html | 2 +- docs/functions/bns_seed_format_to_hex.html | 2 +- docs/functions/cid_v0_to_address.html | 2 +- docs/functions/decode_domain_name.html | 2 +- docs/functions/encode_domain_name.html | 2 +- docs/functions/hex_to_base58.html | 2 +- docs/functions/hex_to_bns_seed_format.html | 2 +- docs/functions/is_bns_seed_format.html | 2 +- docs/index.html | 2 +- docs/interfaces/Domain.html | 4 ++-- docs/interfaces/DomainBlock.html | 4 ++-- docs/interfaces/DomainFreeze.html | 4 ++-- docs/interfaces/DomainMetadata.html | 4 ++-- docs/interfaces/DomainReceive.html | 4 ++-- docs/interfaces/DomainResolver.html | 4 ++-- docs/interfaces/DomainTransfer.html | 4 ++-- docs/types/DomainBlocks.html | 2 +- docs/variables/BSF_HEX_CHARS.html | 2 +- docs/variables/FREEZE_PUB_KEY.html | 2 +- docs/variables/FREEZE_REP.html | 2 +- docs/variables/HEX_CHARS.html | 2 +- docs/variables/LOG.html | 2 +- docs/variables/TRANS_MAX.html | 2 +- docs/variables/TRANS_MIN.html | 2 +- docs/wallet/index.html | 15 +++++++++++---- wallet/index.html | 15 +++++++++++---- 34 files changed, 66 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index 51c4a33..f4b4800 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -See the [protocol specification](bns_protocol.md), [docs](https://bns.prussia.dev) or [demo](https://bns.prussia.dev/browser_test) +See the [protocol specification](bns_protocol.md), [docs](https://bns.prussia.dev) or [web wallet / demo](https://bns.prussia.dev/wallet) ## Installing diff --git a/docs/classes/DomainAccount.html b/docs/classes/DomainAccount.html index be906e3..615cf57 100644 --- a/docs/classes/DomainAccount.html +++ b/docs/classes/DomainAccount.html @@ -1,4 +1,4 @@ -DomainAccount | bns

Class DomainAccount

Hierarchy (view full)

Constructors

constructor +DomainAccount | bns

Class DomainAccount

Hierarchy (view full)

Constructors

  • Parameters

    • rpc: RPC
    • address: `ban_${string}` | `nano_${string}`
    • Optional domain: Domain
    • Optional max_rpc_calls: number

    Returns DomainAccount

Properties

address: `ban_${string}` | `nano_${string}`
domain?: Domain
max_rpc_calls?: number
rpc: RPC
rpc_calls: number

Methods

  • Returns Promise<[string, string]>

\ No newline at end of file +

Constructors

  • Parameters

    • rpc: RPC
    • address: `ban_${string}` | `nano_${string}`
    • Optional domain: Domain
    • Optional max_rpc_calls: number

    Returns DomainAccount

Properties

address: `ban_${string}` | `nano_${string}`
domain?: Domain
max_rpc_calls?: number
rpc: RPC
rpc_calls: number

Methods

  • Returns Promise<[string, string]>

\ No newline at end of file diff --git a/docs/classes/DomainAccountManager.html b/docs/classes/DomainAccountManager.html index ccefb3c..85af50e 100644 --- a/docs/classes/DomainAccountManager.html +++ b/docs/classes/DomainAccountManager.html @@ -1,4 +1,4 @@ -DomainAccountManager | bns

Class DomainAccountManager

Hierarchy (view full)

Constructors

constructor +DomainAccountManager | bns

Class DomainAccountManager

Hierarchy (view full)

Constructors

Properties

address: `ban_${string}` | `nano_${string}`
domain?: Domain
max_rpc_calls?: number
rpc: RPC
rpc_calls: number
wallet: Wallet

Methods

  • Parameters

    • metadata_hash: string

    Returns Promise<void>

  • Parameters

    • address: `ban_${string}` | `nano_${string}`

    Returns Promise<void>

  • Returns Promise<void>

  • Parameters

    • receive_hash: string
    • Optional tld: `ban_${string}` | `nano_${string}`
    • Optional allow_burning: boolean

    Returns Promise<void>

  • Parameters

    • domain_name: string
    • to: `ban_${string}` | `nano_${string}`

    Returns Promise<string>

\ No newline at end of file +

Constructors

Properties

address: `ban_${string}` | `nano_${string}`
domain?: Domain
max_rpc_calls?: number
rpc: RPC
rpc_calls: number
wallet: Wallet

Methods

  • Parameters

    • metadata_hash: string

    Returns Promise<void>

  • Parameters

    • address: `ban_${string}` | `nano_${string}`

    Returns Promise<void>

  • Returns Promise<void>

  • Parameters

    • receive_hash: string
    • Optional tld: `ban_${string}` | `nano_${string}`
    • Optional allow_burning: boolean

    Returns Promise<void>

  • Parameters

    • domain_name: string
    • to: `ban_${string}` | `nano_${string}`

    Returns Promise<string>

\ No newline at end of file diff --git a/docs/classes/Resolver.html b/docs/classes/Resolver.html index b3e22cc..f45a6d7 100644 --- a/docs/classes/Resolver.html +++ b/docs/classes/Resolver.html @@ -1,7 +1,7 @@ -Resolver | bns

Class Resolver

Constructors

constructor +Resolver | bns

Class Resolver

Constructors

  • Parameters

    • rpc: RPC
    • tld_mapping: Record<string, `ban_${string}` | `nano_${string}`>
    • Optional max_rpc_calls_after_tld: number

    Returns Resolver

Properties

max_rpc_calls_after_tld?: number
rpc: RPC
tld_mapping: Record<string, `ban_${string}` | `nano_${string}`>

Methods

  • Parameters

    • domain_name: string
    • tld: string
    • crawl_size: number = 500

    Returns Promise<Domain>

  • Parameters

    • domain_account_address: `ban_${string}` | `nano_${string}`
    • tld: string
    • crawl_size: number = 500

    Returns Promise<Domain>

\ No newline at end of file +

Constructors

  • Parameters

    • rpc: RPC
    • tld_mapping: Record<string, `ban_${string}` | `nano_${string}`>
    • Optional max_rpc_calls_after_tld: number

    Returns Resolver

Properties

max_rpc_calls_after_tld?: number
rpc: RPC
tld_mapping: Record<string, `ban_${string}` | `nano_${string}`>

Methods

  • Parameters

    • domain_name: string
    • tld: string
    • crawl_size: number = 500

    Returns Promise<Domain>

  • Parameters

    • domain_account_address: `ban_${string}` | `nano_${string}`
    • tld: string
    • crawl_size: number = 500

    Returns Promise<Domain>

\ No newline at end of file diff --git a/docs/classes/TLDAccount.html b/docs/classes/TLDAccount.html index 2ae53ce..979c7ab 100644 --- a/docs/classes/TLDAccount.html +++ b/docs/classes/TLDAccount.html @@ -1,4 +1,4 @@ -TLDAccount | bns

Class TLDAccount

Hierarchy (view full)

Constructors

constructor +TLDAccount | bns

Class TLDAccount

Hierarchy (view full)

Constructors

Properties

address: `ban_${string}` | `nano_${string}`
all_issued: Domain[]
rpc: RPC

Methods

  • Parameters

    • crawl_size: number = 500

    Returns Promise<Domain[]>

  • Returns Promise<[string, string]>

  • Parameters

    • name: string
    • crawl_size: number = 500

    Returns Promise<Domain>

\ No newline at end of file +

Constructors

Properties

address: `ban_${string}` | `nano_${string}`
all_issued: Domain[]
rpc: RPC

Methods

  • Parameters

    • crawl_size: number = 500

    Returns Promise<Domain[]>

  • Returns Promise<[string, string]>

  • Parameters

    • name: string
    • crawl_size: number = 500

    Returns Promise<Domain>

\ No newline at end of file diff --git a/docs/classes/TLDAccountManager.html b/docs/classes/TLDAccountManager.html index c4e4944..c378828 100644 --- a/docs/classes/TLDAccountManager.html +++ b/docs/classes/TLDAccountManager.html @@ -1,4 +1,4 @@ -TLDAccountManager | bns

Class TLDAccountManager

Hierarchy (view full)

Constructors

constructor +TLDAccountManager | bns

Class TLDAccountManager

Hierarchy (view full)

Constructors

Properties

Constructors

Properties

address: `ban_${string}` | `nano_${string}`
all_issued: Domain[]
rpc: RPC
wallet: Wallet

Methods

  • Returns Promise<void>

  • Parameters

    • domain_name: string
    • to: `ban_${string}` | `nano_${string}`

    Returns Promise<string>

  • Returns Promise<void>

\ No newline at end of file +

Constructors

Properties

address: `ban_${string}` | `nano_${string}`
all_issued: Domain[]
rpc: RPC
wallet: Wallet

Methods

  • Returns Promise<void>

  • Parameters

    • domain_name: string
    • to: `ban_${string}` | `nano_${string}`

    Returns Promise<string>

  • Returns Promise<void>

\ No newline at end of file diff --git a/docs/functions/address_to_cid_v0.html b/docs/functions/address_to_cid_v0.html index c3f1274..652f01e 100644 --- a/docs/functions/address_to_cid_v0.html +++ b/docs/functions/address_to_cid_v0.html @@ -1,2 +1,2 @@ address_to_cid_v0 | bns

Function address_to_cid_v0

  • Banano address to IPFS CID v0

    -

    Parameters

    • address: `ban_${string}` | `nano_${string}`

    Returns string

\ No newline at end of file +

Parameters

Returns string

\ No newline at end of file diff --git a/docs/functions/base58_to_hex.html b/docs/functions/base58_to_hex.html index de3e3b8..d359ac0 100644 --- a/docs/functions/base58_to_hex.html +++ b/docs/functions/base58_to_hex.html @@ -1 +1 @@ -base58_to_hex | bns

Function base58_to_hex

  • Parameters

    • base58: string

    Returns string

\ No newline at end of file +base58_to_hex | bns

Function base58_to_hex

  • Parameters

    • base58: string

    Returns string

\ No newline at end of file diff --git a/docs/functions/bigint_to_uint8array.html b/docs/functions/bigint_to_uint8array.html index 777a4b6..9d06ff2 100644 --- a/docs/functions/bigint_to_uint8array.html +++ b/docs/functions/bigint_to_uint8array.html @@ -1 +1 @@ -bigint_to_uint8array | bns

Function bigint_to_uint8array

  • Parameters

    • bint: bigint
    • len: number

    Returns Uint8Array

\ No newline at end of file +bigint_to_uint8array | bns

Function bigint_to_uint8array

  • Parameters

    • bint: bigint
    • len: number

    Returns Uint8Array

\ No newline at end of file diff --git a/docs/functions/bns_seed_format_to_hex.html b/docs/functions/bns_seed_format_to_hex.html index b571de4..0290d93 100644 --- a/docs/functions/bns_seed_format_to_hex.html +++ b/docs/functions/bns_seed_format_to_hex.html @@ -1 +1 @@ -bns_seed_format_to_hex | bns

Function bns_seed_format_to_hex

  • Parameters

    • bsf_hex: string

    Returns string

\ No newline at end of file +bns_seed_format_to_hex | bns

Function bns_seed_format_to_hex

  • Parameters

    • bsf_hex: string

    Returns string

\ No newline at end of file diff --git a/docs/functions/cid_v0_to_address.html b/docs/functions/cid_v0_to_address.html index 4bde278..1929c0d 100644 --- a/docs/functions/cid_v0_to_address.html +++ b/docs/functions/cid_v0_to_address.html @@ -1,2 +1,2 @@ cid_v0_to_address | bns

Function cid_v0_to_address

  • IPFS CID v0 to Banano address

    -

    Parameters

    • cid_v0: string

    Returns Address

\ No newline at end of file +

Parameters

Returns Address

\ No newline at end of file diff --git a/docs/functions/decode_domain_name.html b/docs/functions/decode_domain_name.html index a57a681..36050e8 100644 --- a/docs/functions/decode_domain_name.html +++ b/docs/functions/decode_domain_name.html @@ -1 +1 @@ -decode_domain_name | bns

Function decode_domain_name

  • Parameters

    • encoded_domain_name: string

    Returns string

\ No newline at end of file +decode_domain_name | bns

Function decode_domain_name

  • Parameters

    • encoded_domain_name: string

    Returns string

\ No newline at end of file diff --git a/docs/functions/encode_domain_name.html b/docs/functions/encode_domain_name.html index 2e2d46b..a4ede45 100644 --- a/docs/functions/encode_domain_name.html +++ b/docs/functions/encode_domain_name.html @@ -1 +1 @@ -encode_domain_name | bns

Function encode_domain_name

  • Parameters

    • domain_name: string

    Returns string

\ No newline at end of file +encode_domain_name | bns

Function encode_domain_name

  • Parameters

    • domain_name: string

    Returns string

\ No newline at end of file diff --git a/docs/functions/hex_to_base58.html b/docs/functions/hex_to_base58.html index 0ff4521..e72461c 100644 --- a/docs/functions/hex_to_base58.html +++ b/docs/functions/hex_to_base58.html @@ -1 +1 @@ -hex_to_base58 | bns

Function hex_to_base58

  • Parameters

    • hex: string

    Returns string

\ No newline at end of file +hex_to_base58 | bns

Function hex_to_base58

  • Parameters

    • hex: string

    Returns string

\ No newline at end of file diff --git a/docs/functions/hex_to_bns_seed_format.html b/docs/functions/hex_to_bns_seed_format.html index ee674fc..1a430ac 100644 --- a/docs/functions/hex_to_bns_seed_format.html +++ b/docs/functions/hex_to_bns_seed_format.html @@ -1 +1 @@ -hex_to_bns_seed_format | bns

Function hex_to_bns_seed_format

  • Parameters

    • hex: string

    Returns string

\ No newline at end of file +hex_to_bns_seed_format | bns

Function hex_to_bns_seed_format

  • Parameters

    • hex: string

    Returns string

\ No newline at end of file diff --git a/docs/functions/is_bns_seed_format.html b/docs/functions/is_bns_seed_format.html index 4da045f..1c46e4c 100644 --- a/docs/functions/is_bns_seed_format.html +++ b/docs/functions/is_bns_seed_format.html @@ -1 +1 @@ -is_bns_seed_format | bns

Function is_bns_seed_format

  • Parameters

    • maybe_bsf_hex: string

    Returns boolean

\ No newline at end of file +is_bns_seed_format | bns

Function is_bns_seed_format

  • Parameters

    • maybe_bsf_hex: string

    Returns boolean

\ No newline at end of file diff --git a/docs/index.html b/docs/index.html index ec85568..19b1a2c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,4 +1,4 @@ -bns

bns

See the protocol specification, docs or demo

+bns

bns

See the protocol specification, docs or web wallet / demo

Installing

NPM

npm i banani-bns
 

Web

Add thebns-browser.js file in this browser to your site. Then, in your <head>, add:

diff --git a/docs/interfaces/Domain.html b/docs/interfaces/Domain.html index de67537..b98e695 100644 --- a/docs/interfaces/Domain.html +++ b/docs/interfaces/Domain.html @@ -1,7 +1,7 @@ -Domain | bns

Interface Domain

interface Domain {
    burned?: boolean;
    history: DomainBlocks[];
    metadata_hash?: string;
    name: string;
    resolved_address?: `ban_${string}` | `nano_${string}`;
    tld: `ban_${string}` | `nano_${string}`;
}

Properties

burned? +Domain | bns

Interface Domain

interface Domain {
    burned?: boolean;
    history: DomainBlocks[];
    metadata_hash?: string;
    name: string;
    resolved_address?: `ban_${string}` | `nano_${string}`;
    tld: `ban_${string}` | `nano_${string}`;
}

Properties

burned?: boolean
history: DomainBlocks[]
metadata_hash?: string
name: string
resolved_address?: `ban_${string}` | `nano_${string}`
tld: `ban_${string}` | `nano_${string}`
\ No newline at end of file +

Properties

burned?: boolean
history: DomainBlocks[]
metadata_hash?: string
name: string
resolved_address?: `ban_${string}` | `nano_${string}`
tld: `ban_${string}` | `nano_${string}`
\ No newline at end of file diff --git a/docs/interfaces/DomainBlock.html b/docs/interfaces/DomainBlock.html index 1612ab2..7e0d0b7 100644 --- a/docs/interfaces/DomainBlock.html +++ b/docs/interfaces/DomainBlock.html @@ -1,3 +1,3 @@ -DomainBlock | bns

Interface DomainBlock

interface DomainBlock {
    block: AccountHistoryRawBlock;
    type: "receive" | "transfer" | "metadata" | "resolver" | "freeze";
}

Hierarchy (view full)

Properties

block +DomainBlock | bns

Interface DomainBlock

interface DomainBlock {
    block: AccountHistoryRawBlock;
    type: "receive" | "transfer" | "metadata" | "resolver" | "freeze";
}

Hierarchy (view full)

Properties

Properties

type: "receive" | "transfer" | "metadata" | "resolver" | "freeze"
\ No newline at end of file +

Properties

type: "receive" | "transfer" | "metadata" | "resolver" | "freeze"
\ No newline at end of file diff --git a/docs/interfaces/DomainFreeze.html b/docs/interfaces/DomainFreeze.html index 6dbceac..c23cf79 100644 --- a/docs/interfaces/DomainFreeze.html +++ b/docs/interfaces/DomainFreeze.html @@ -1,3 +1,3 @@ -DomainFreeze | bns

Interface DomainFreeze

interface DomainFreeze {
    block: AccountHistoryRawBlock;
    type: "freeze";
}

Hierarchy (view full)

Properties

block +DomainFreeze | bns

Interface DomainFreeze

interface DomainFreeze {
    block: AccountHistoryRawBlock;
    type: "freeze";
}

Hierarchy (view full)

Properties

Properties

type: "freeze"
\ No newline at end of file +

Properties

type: "freeze"
\ No newline at end of file diff --git a/docs/interfaces/DomainMetadata.html b/docs/interfaces/DomainMetadata.html index f331756..300d77c 100644 --- a/docs/interfaces/DomainMetadata.html +++ b/docs/interfaces/DomainMetadata.html @@ -1,4 +1,4 @@ -DomainMetadata | bns

Interface DomainMetadata

interface DomainMetadata {
    block: AccountHistoryRawBlock;
    metadata_hash: string;
    type: "metadata";
}

Hierarchy (view full)

Properties

block +DomainMetadata | bns

Interface DomainMetadata

interface DomainMetadata {
    block: AccountHistoryRawBlock;
    metadata_hash: string;
    type: "metadata";
}

Hierarchy (view full)

Properties

metadata_hash: string
type: "metadata"
\ No newline at end of file +

Properties

metadata_hash: string
type: "metadata"
\ No newline at end of file diff --git a/docs/interfaces/DomainReceive.html b/docs/interfaces/DomainReceive.html index 74d0216..1dda7af 100644 --- a/docs/interfaces/DomainReceive.html +++ b/docs/interfaces/DomainReceive.html @@ -1,3 +1,3 @@ -DomainReceive | bns

Interface DomainReceive

interface DomainReceive {
    block: AccountHistoryRawBlock;
    type: "receive";
}

Hierarchy (view full)

Properties

block +DomainReceive | bns

Interface DomainReceive

interface DomainReceive {
    block: AccountHistoryRawBlock;
    type: "receive";
}

Hierarchy (view full)

Properties

Properties

type: "receive"
\ No newline at end of file +

Properties

type: "receive"
\ No newline at end of file diff --git a/docs/interfaces/DomainResolver.html b/docs/interfaces/DomainResolver.html index 3f31459..cc015cd 100644 --- a/docs/interfaces/DomainResolver.html +++ b/docs/interfaces/DomainResolver.html @@ -1,4 +1,4 @@ -DomainResolver | bns

Interface DomainResolver

interface DomainResolver {
    block: AccountHistoryRawBlock;
    resolved_address: `ban_${string}` | `nano_${string}`;
    type: "resolver";
}

Hierarchy (view full)

Properties

block +DomainResolver | bns

Interface DomainResolver

interface DomainResolver {
    block: AccountHistoryRawBlock;
    resolved_address: `ban_${string}` | `nano_${string}`;
    type: "resolver";
}

Hierarchy (view full)

Properties

resolved_address: `ban_${string}` | `nano_${string}`
type: "resolver"
\ No newline at end of file +

Properties

resolved_address: `ban_${string}` | `nano_${string}`
type: "resolver"
\ No newline at end of file diff --git a/docs/interfaces/DomainTransfer.html b/docs/interfaces/DomainTransfer.html index e12cf84..ef4a3e6 100644 --- a/docs/interfaces/DomainTransfer.html +++ b/docs/interfaces/DomainTransfer.html @@ -1,4 +1,4 @@ -DomainTransfer | bns

Interface DomainTransfer

interface DomainTransfer {
    block: AccountHistoryRawBlock;
    to: `ban_${string}` | `nano_${string}`;
    type: "transfer";
}

Hierarchy (view full)

Properties

block +DomainTransfer | bns

Interface DomainTransfer

interface DomainTransfer {
    block: AccountHistoryRawBlock;
    to: `ban_${string}` | `nano_${string}`;
    type: "transfer";
}

Hierarchy (view full)

Properties

Properties

to: `ban_${string}` | `nano_${string}`
type: "transfer"
\ No newline at end of file +

Properties

to: `ban_${string}` | `nano_${string}`
type: "transfer"
\ No newline at end of file diff --git a/docs/types/DomainBlocks.html b/docs/types/DomainBlocks.html index 8baa59a..2e05e5c 100644 --- a/docs/types/DomainBlocks.html +++ b/docs/types/DomainBlocks.html @@ -1 +1 @@ -DomainBlocks | bns
\ No newline at end of file +DomainBlocks | bns
\ No newline at end of file diff --git a/docs/variables/BSF_HEX_CHARS.html b/docs/variables/BSF_HEX_CHARS.html index f494d7a..37b6057 100644 --- a/docs/variables/BSF_HEX_CHARS.html +++ b/docs/variables/BSF_HEX_CHARS.html @@ -1 +1 @@ -BSF_HEX_CHARS | bns

Variable BSF_HEX_CHARSConst

BSF_HEX_CHARS: "ghijklmnopqrstuv" = "ghijklmnopqrstuv"
\ No newline at end of file +BSF_HEX_CHARS | bns

Variable BSF_HEX_CHARSConst

BSF_HEX_CHARS: "ghijklmnopqrstuv" = "ghijklmnopqrstuv"
\ No newline at end of file diff --git a/docs/variables/FREEZE_PUB_KEY.html b/docs/variables/FREEZE_PUB_KEY.html index 6733d72..332e7ca 100644 --- a/docs/variables/FREEZE_PUB_KEY.html +++ b/docs/variables/FREEZE_PUB_KEY.html @@ -1 +1 @@ -FREEZE_PUB_KEY | bns

Variable FREEZE_PUB_KEYConst

FREEZE_PUB_KEY: string = ...
\ No newline at end of file +FREEZE_PUB_KEY | bns

Variable FREEZE_PUB_KEYConst

FREEZE_PUB_KEY: string = ...
\ No newline at end of file diff --git a/docs/variables/FREEZE_REP.html b/docs/variables/FREEZE_REP.html index 19123ad..d080d6a 100644 --- a/docs/variables/FREEZE_REP.html +++ b/docs/variables/FREEZE_REP.html @@ -1 +1 @@ -FREEZE_REP | bns

Variable FREEZE_REPConst

FREEZE_REP: `ban_${string}` | `nano_${string}` = ...
\ No newline at end of file +FREEZE_REP | bns

Variable FREEZE_REPConst

FREEZE_REP: `ban_${string}` | `nano_${string}` = ...
\ No newline at end of file diff --git a/docs/variables/HEX_CHARS.html b/docs/variables/HEX_CHARS.html index 39c1f16..f9142b5 100644 --- a/docs/variables/HEX_CHARS.html +++ b/docs/variables/HEX_CHARS.html @@ -1 +1 @@ -HEX_CHARS | bns

Variable HEX_CHARSConst

HEX_CHARS: "0123456789ABCDEF" = "0123456789ABCDEF"
\ No newline at end of file +HEX_CHARS | bns

Variable HEX_CHARSConst

HEX_CHARS: "0123456789ABCDEF" = "0123456789ABCDEF"
\ No newline at end of file diff --git a/docs/variables/LOG.html b/docs/variables/LOG.html index 35d38f3..9d64fa8 100644 --- a/docs/variables/LOG.html +++ b/docs/variables/LOG.html @@ -1 +1 @@ -LOG | bns

Variable LOGConst

LOG: boolean = true
\ No newline at end of file +LOG | bns

Variable LOGConst

LOG: boolean = true
\ No newline at end of file diff --git a/docs/variables/TRANS_MAX.html b/docs/variables/TRANS_MAX.html index 3cb4629..4777195 100644 --- a/docs/variables/TRANS_MAX.html +++ b/docs/variables/TRANS_MAX.html @@ -1 +1 @@ -TRANS_MAX | bns

Variable TRANS_MAXConst

TRANS_MAX: bigint = ...
\ No newline at end of file +TRANS_MAX | bns

Variable TRANS_MAXConst

TRANS_MAX: bigint = ...
\ No newline at end of file diff --git a/docs/variables/TRANS_MIN.html b/docs/variables/TRANS_MIN.html index ccd695e..82669c2 100644 --- a/docs/variables/TRANS_MIN.html +++ b/docs/variables/TRANS_MIN.html @@ -1 +1 @@ -TRANS_MIN | bns

Variable TRANS_MINConst

TRANS_MIN: bigint = ...
\ No newline at end of file +TRANS_MIN | bns

Variable TRANS_MINConst

TRANS_MIN: bigint = ...
\ No newline at end of file diff --git a/docs/wallet/index.html b/docs/wallet/index.html index 49729ef..2a0c8ca 100644 --- a/docs/wallet/index.html +++ b/docs/wallet/index.html @@ -320,10 +320,17 @@ async function transfer() { if (!domain_account_domain) return; - console.log(domain_account_domain.name, d.g("transfer-to").value.trim()) - const transfer_hash = await domain_account.transfer_domain(domain_account_domain.name, d.g("transfer-to").value.trim()); - d.g("transfer-link").textContent = "Transferred! See explorer."; - d.g("transfer-link").href = `https://creeper.banano.cc/hash/${transfer_hash}`; + const transfer_to = d.g("transfer-to").value.trim(); + console.log(domain_account_domain.name, transfer_to); + try { + await rpc.get_account_info(transfer_to); + alert("If you transfer to an already opened account the domain will be burned, so this wallet will not let you do that. Burn the account normally, man."); + } catch (_) { + //probably unopened account + const transfer_hash = await domain_account.transfer_domain(domain_account_domain.name, transfer_to); + d.g("transfer-link").textContent = "Transferred! See explorer."; + d.g("transfer-link").href = `https://creeper.banano.cc/hash/${transfer_hash}`; + } } async function freeze(is_tld) { diff --git a/wallet/index.html b/wallet/index.html index 49729ef..2a0c8ca 100644 --- a/wallet/index.html +++ b/wallet/index.html @@ -320,10 +320,17 @@ async function transfer() { if (!domain_account_domain) return; - console.log(domain_account_domain.name, d.g("transfer-to").value.trim()) - const transfer_hash = await domain_account.transfer_domain(domain_account_domain.name, d.g("transfer-to").value.trim()); - d.g("transfer-link").textContent = "Transferred! See explorer."; - d.g("transfer-link").href = `https://creeper.banano.cc/hash/${transfer_hash}`; + const transfer_to = d.g("transfer-to").value.trim(); + console.log(domain_account_domain.name, transfer_to); + try { + await rpc.get_account_info(transfer_to); + alert("If you transfer to an already opened account the domain will be burned, so this wallet will not let you do that. Burn the account normally, man."); + } catch (_) { + //probably unopened account + const transfer_hash = await domain_account.transfer_domain(domain_account_domain.name, transfer_to); + d.g("transfer-link").textContent = "Transferred! See explorer."; + d.g("transfer-link").href = `https://creeper.banano.cc/hash/${transfer_hash}`; + } } async function freeze(is_tld) {