objects/item.rb
def create(id, key, length: 16)
    pem, keygap = Keygap.new.extract(key.to_s, length)
    @aws.put_item(
      table_name: 'zold-wallets',
      item: {
        'login' => @login,
        'id' => id.to_s,
        'pem' => pem,
        'keygap' => keygap
      }
    )
    @log.info("New user @#{@login} created, wallet ID is #{id}, \
keygap is '#{keygap[0, 2]}#{'.' * (keygap.length - 2)}'")
    keygap
  end
# Creates a record in DynamoDB and generates a unique keygap.
# +id+:: Wallet iD
# +key+:: Private RSA key
# +length+:: Length of keygap to use (don't change it without a necessity)
Creates a record in DynamoDB and generates a unique keygap.
Creates a record in DynamoDB and generates a unique keygap .
def create(id, key, length: 16)
    pem, keygap = Keygap.new.extract(key.to_s, length)
    @aws.put_item(
      table_name: 'zold-wallets',
      item: {
        'login' => @login,
        'id' => id.to_s,
        'pem' => pem,
        'keygap' => keygap
      }
    )
    @log.info("New user @#{@login} created, wallet ID is #{id}, \
keygap is '#{keygap[0, 2]}#{'.' * (keygap.length - 2)}'")
    keygap
  end
def create ( id , key , length : 16 ) pem , keygap = Keygap . new . extract ( key . to_s , length ) @aws . put_item ( table_name : 'zold-wallets' , item : { 'login' => @login , 'id' => id . to_s , 'pem' => pem , 'keygap' => keygap } ) @log . info ( "New user @#{@login} created, wallet ID is #{id}, \
keygap is '#{keygap[0, 2]}#{'.' * (keygap.length - 2)}'" ) keygap end
Creates a record in DynamoDB and generates a unique keygap.
Creates a record in DynamoDB and generates a unique keygap .
id
key
length