Class: SilaRuby::Accounts
- Inherits:
-
Object
- Object
- SilaRuby::Accounts
- Includes:
- ApiHelpers
- Defined in:
- lib/sila-ruby/accounts.rb
Overview
ACCOUNTS =====================================
Class Method Summary collapse
-
.check_handle(handle) ⇒ Object
——————————————– CHECK-HANDLE ——————————- ——————————————– Check if a specific handle is taken.
-
.check_kyc(handle, user_key) ⇒ Object
——————————————– CHECK-KYC ———————————- ——————————————– Whether entity attached to user handle is verified, not valid, or pending.
-
.register(handle, params = {}) ⇒ Object
——————————————– REGISTER ———————————– ——————————————– Attaches KYC and blockchain address to user handle.
-
.request_kyc(handle, user_key) ⇒ Object
——————————————– REQUEST-KYC ——————————– ——————————————– Start KYC verification process on a registered user handle.
Methods included from ApiHelpers
Class Method Details
.check_handle(handle) ⇒ Object
CHECK-HANDLE ——————————-
Check if a specific handle is taken
20 21 22 23 24 |
# File 'lib/sila-ruby/accounts.rb', line 20 def self.check_handle(handle) header = { user_handle: handle } = 'header_msg' post_signed('check_handle', header, , nil, nil) end |
.check_kyc(handle, user_key) ⇒ Object
CHECK-KYC ———————————-
Whether entity attached to user handle is verified, not valid, or pending
85 86 87 88 89 |
# File 'lib/sila-ruby/accounts.rb', line 85 def self.check_kyc(handle, user_key) header = { user_handle: handle } = 'header_msg' post_signed('check_kyc', header, , nil, user_key) end |
.register(handle, params = {}) ⇒ Object
REGISTER ———————————–
Attaches KYC and blockchain address to user handle
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/sila-ruby/accounts.rb', line 30 def self.register(handle, params={}) header = { user_handle: handle } = 'entity_msg' # Example of params passed # # params = { # address: { # address_alias: "home", # street_address_1: "1265 Lombardi Ave", # city: "Green Bay", # state: "WI", # country: "US", # postal_code: "54304" # }, # identity: { # identity_alias: "SSN", # identity_value: "123452222" # }, # contact: { # contact_alias: "", # phone: "503-123-4567", # email: "[email protected]" # }, # crypto_entry: { # crypto_alias: "Address 1", # crypto_address: "0x1234567890abcdef1234567890abcdef12345678", # crypto_code: "ETH" # }, # entity: { # birthdate: "1900-01-31", # entity_name: "Example User", # first_name: "Example", # last_name: "User", # relationship: "user" # } # } post_signed('register', header, , params, nil) end |
.request_kyc(handle, user_key) ⇒ Object
REQUEST-KYC ——————————–
Start KYC verification process on a registered user handle
75 76 77 78 79 |
# File 'lib/sila-ruby/accounts.rb', line 75 def self.request_kyc(handle, user_key) header = { user_handle: handle } = 'header_msg' post_signed('request_kyc', header, , nil, user_key) end |