Filter
-
Content Type
-
Category
Mobile/Wearable
Visual Display
Digital Appliance
Platform
Recommendations
Filter
tutorials blockchain
blogsdks for blockchain developers at samsung, we understand that one size does not fit all of your development needs. that’s why we offer two different sdks to cover your blockchain development needs: samsung blockchain platform (sbp) sdk and samsung blockchain keystore (sbk) sdk. the sbp sdk aims to be an overall solution for your dapp’s every need, from connecting to supported hardware wallets to uploading transactions in the supported blockchain networks. on the other hand, the sbk sdk allows you to securely access the samsung blockchain keystore cold wallet and supports signing transactions of a wide range of cryptocurrencies. samsung blockchain platform sdk the samsung blockchain platform sdk offers a full set of functions for your decentralized app (dapp) or blockchain app needs. it helps you manage blockchain accounts easily and make a transaction easier by using abstracted transfer apis. additionally, the sbp sdk offers a ui-based cryptocurrency payment solution for even more rapid development. the samsung blockchain platform sdk can easily connect your dapp to different hardware wallets for securely signing transactions. currently, three hardware wallets are supported: samsung blockchain keystore, ledger nano x, and ledger nano s. once successfully connected to a hardware wallet, the sbp sdk offers abstracted apis, so you never have to worry about what hardware wallet to which the user is connected. the sbp sdk also has a blockchain browser solution for your web dapp. with the sbp sdk’s cucumber webview, you can migrate your web-based dapp into the mobile environment with little to no changes in your web app. this can help you drastically reduce development time and resources, and to reach millions of new galaxy devices. with the sbp sdk’s payment sheet ui, developing a native android dapp has never been easier. simply launch the desired payment sheet intent and let the sdk take care of the rest of your dapp’s payment or transfer flows. the sbp sdk currently supports two major blockchain networks: ethereum and tron. with the sbp sdk’s abstracted apis for cryptocurrency and token transfers, you never have to worry about complex details. the sbp automatically estimates transaction fees and handles code for underlying smart contract function abis for token transfer. you can simply plug in your json-rpc endpoint/node to the sbp and develop your dapp faster. you can check out all of the aforementioned apis (and more) in action, on the aero wallet sample application for the sbp sdk. using aero wallet’s source code, you can learn how to easily build a fully functional cryptocurrency wallet application from scratch. to learn more about how the sbp sdk can greatly simplify your dapp development, check out the sdk overview. samsung blockchain keystore sdk the samsung blockchain keystore, powered by the knox security platform, is a built-in secure cold wallet available on a wide range of galaxy devices. the samsung blockchain keystore sdk allows your android apps and dapps to communicate directly with this highly secure cold wallet for fetching address lists and public keys and signing cryptocurrency transactions. with the sbk sdk, your dapp can fetch the user’s blockchain address and link it to the user’s account. using this address, you can query on the blockchain network (using a blockchain explorer or another library such as sbp) to find the user’s account balance and transaction history. furthermore, you can use the sbk sdk to request the keystore app to sign a cryptocurrency transaction. the keystore app then shows the requested transaction to the user inside a trusted user interface (tui), executed within the trusted execution environment (tee). once the user approves the transaction with a pin or a biometric authentication like a fingerprint, the keystore app signs the transaction with the associated private key and returns it to you through the sbk sdk. to learn more about how you can integrate the sbk sdk into your app, check out the sdk overview. choosing the right sdk for your dapp both of the samsung blockchain sdks can help make your dapp more feature-rich and cut down development time and effort. if you are still confused about which sdk is best for your dapp, check out our brief comparison below. api samsung blockchain platform sdk samsung blockchain keystore sdk fetch public address supported supported sign transaction supported supported send transaction supported unsupported send token transaction supported unsupported built-in payment screen ui supported unsupported seamless integration with webapps supported unsupported external hardware wallet supported unsupported blockchain networks supported (at the time of writing) ethereum and tron bitcoin, ethereum, klaytn, stellar and tron services for end-users samsung blockchain apps and services aim to provide you with a secure and convenient experience in the blockchain world. samsung currently offers two applications under its blockchain platform: the samsung blockchain keystore app and the samsung blockchain wallet app. you can find out more about each of these offerings from this article and from the global samsung site. samsung blockchain keystore samsung blockchain keystore offers defense-grade, vault-like security for your crypto assets. the blockchain keystore app runs within the tee of the knox platform. this allows the samsung blockchain keystore to provide security unlike ever before, as the private key and information located in the samsung blockchain keystore are never saved to a samsung or an external cloud, nor is it seen by the devices’ android os. you can easily set up the keystore app by importing your existing account by using a 12-word mnemonic, or create an entirely new one. samsung blockchain wallet the samsung blockchain wallet app allows you to conveniently send and receive major cryptocurrencies such as bitcoin and ether. not only does the samsung blockchain wallet app support the built-in samsung blockchain keystore wallet, it also supports external physical wallets such as ledger nano s and nano x, using usb. beyond sending and receiving crypto assets, you can also explore partner dapps through the blockchain wallet app. partner dapps on the samsung blockchain wallet app unlock the door to a wide range of experiences such as cryptocurrency exchanges, staking pools, and nft marketplaces. furthermore, you can stay on top of the latest trends and ongoing events in the blockchain world with the samsung blockchain wallet’s news section. conclusion blockchain technology has the potential to revolutionize many aspects of our lives. with samsung blockchain sdks and applications, you and your dapp users can always stay at the forefront of this technology. we want to continuously improve your experience in the blockchain world. feel free to share your thoughts with us and with the global blockchain developer community on the samsung blockchain developer forum.
Shuvo Saha
Develop Samsung Wallet
docresources wallet cards & attributes this chapter defines wallet card data fields for the attributes object of each wallet card type the structure for configuring wallet cards follows the defined specification configuring the card data in the specified formatted json structure is required see the details for each card type type value description card object card object required card information card type string 16 required wallet card type card subtype string 16 required wallet card sub type card data[] array of object required wallet card data containerallows up to 6 objects at once data[] refid string 32 required a unique content identifier defined by the content provider data[] createdat long 13 required data creation timestamp epoch timestamp in milliseconds * utc±00 00 data[] updatedat long 13 required data creation timestamp epoch timestamp in milliseconds * utc±00 00 data[] language string 8 required default content language code e g , en, ko data[] attributes object required attributes of card data * refer to the following chapters for each type data[] attributes {fields} attribute fields by card type data[] localization[] array of object optional information for multilingual support localization[] language string 8 required multilingual content language code e g , en, ko localization[] attributes {fields} for displaying a given language, ‘data[] attributes’ can be replaced by localized versions * refer to the following chapters for each type example example card object { "card" { "type" "ticket", "subtype" "movies", "data" [{ "refid" "ref-20230304-001", "createdat" 1612660039000, "language" "en", "attributes" { "title" "samsung wallet", "mainimg" "https // /main png" *refer to the following chapters for each type }, "localization" [{ "language" "ko", "attributes" { "title" "삼성 월렛" } }] }] } } to ensure secure transmission of card data, it must be tokenized in jwt format for this purpose, you will require the certificate obtained using the partner's email account when signing up for the partner portal for detailed information on secure data tokenization, please refer to the security chapter *image resources provided by urls can be cached therefore, in order for the image resource to be replaced immediately, the corresponding url path must be changed boarding pass 'boarding pass' cards support one-off transit types such as airlines, trains, buses, ferries, and etc boarding passes in wallet can remind the user of boarding time and help during check-in depending on the integration level, it can provide status information updates related to flights, and journeys, such as boarding gate changes or cancellations wallet card type wallet card subtype boardingpass airlines, trains, buses, others -airlines -buses -trains type value description attributes {fields} 1 title string 32 required main title e g , 'boarding pass' 2 transittype string 16 optional transit type * this will be deprecated 3 groupingid string 32 optional identifier used to group related cards 4 orderid string 32 optional unique identifier for an order 5 providerlogo string 256 required url of the logo image the file size should not exceed than 256 kb 6 providerlogo darkurl string 256 required url of the logo image in dark mode the file size should not exceed 256 kb 7 providerlogo lighturl string 256 required url of the logo image in light mode the file size should not exceed 256 kb 8 providername string 32 required display name of the boarding pass provider 9 user string 64 conditional passenger name * required if subtype is airlines 10 usertype string 32 optional passenger type i e , classification of passengers, like child, adult 11 transitoperator string 64 optional operator name 12 vehiclenumber string 32 conditional transit or route number i e , flight number on airlines * required if subtype is airlines 13 transitclass string 32 optional transit class i e , premium class for buses 14 transitfare string 32 optional general fare or purchase fare 15 coachnumber string 16 optional identifier assigned to each individual carriage e g , b4 16 seatclass string 32 conditional seat class * required if subtype is airlines 17 seatnumber string 16 required individual number of the passenger seat e g , a-9, free 18 seatfacing string 16 optional direction in which the seat is oriented within a carriage it indicates whether the seat is positioned to face the direction of travel or face the opposite direction e g , forward, backward 19 reservationnumber string 32 required number of the transit reservation 20 boardingpriority string 32 optional information on whether entitles the passenger to board before others i e , if the passengers are pregnant 21 boardingseqno string 32 optional boarding sequence number 22 boardinggroup string 8 optional value of boarding group or zone e g , b 23 boardingtime long 13 optional boarding time epoch timestamp in milliseconds 24 boardingtime utcoffset string 8 conditional utc offset of boarding time at the departure point * required if boardingtime exist 25 gateclosingtime long 13 optional boarding gate closing time epoch timestamp in milliseconds 26 gateclosingtime utcoffset string 8 conditional utc offset of gate closing time at the departure point * required if gateclosingtime exist 27 baggageallowance string 16 optional baggage allowance 28 departname string 32 conditional name of the departure point * required if subtype is airlines 29 departcode string 8 conditional code for the departure point * required if subtype is airlines 30 departterminal string 8 conditional terminal name of the departure point * required if subtype is airlines 31 departgate string 8 optional gate name of the departure point 32 estimatedoractualstartdate long 13 conditional departure time epoch timestamp in milliseconds, i e , the estimated time the aircraft plans to pull from the gate, or the actual time the aircraft already pulled from the gate * required if subtype is airlines 33 estimatedoractualstartdate utcoffset string 8 conditional utc offset of time at the departure point * required if estimatedoractualstartdate exists 34 arrivename string 32 conditional name of the arrival point * required if subtype is airlines 35 arrivecode string 8 conditional code for the arrival point * required if subtype is airlines 36 arriveterminal string 8 optional terminal name of the arrival point 37 arrivegate string 8 optional gate name of the arrival point 38 estimatedoractualenddate long 13 conditional arrival time epoch timestamp in milliseconds, i e , the estimated time the aircraft plans to reach the destination gate not the runway , or the actual time it reached the gate * required if subtype is airlines 39 estimatedoractualenddate utcoffset string 8 conditional utc offset of time at the arrival point * required if estimatedoractualenddate exists 40 locations string 1024 optional list of locations where the card can be used * see location format 41 bgcolor string 8 required color of the card art e g , #00ffff 42 fontcolor string 8 optional color of the font on the card art acceptable values dark, light 43 blinkcolor string 8 optional color of the blinking effect which indicates that a card cannot be captured in the indicator area e g , #00ffff 44 applinklogo string 256 required app link image url the file size should not exceed 256 kb 45 applinkname string 32 required app link name 46 applinkdata string 256 required information about the partner app link 47 extrainfo string 512 optional additional information to be delivered to customers * see additional information format 48 noticedesc string 5000 optional text of the notice * long content is allowed * see additional information format 49 csinfo string 512 optional providers’ customer service informationusing data in json format converted to escape string* allowed items call, email, or website* see below for an example 50 displaytsaprecheckyn string 1 optional flag whether to display the tsa precheck image either ‘y’ or ‘n’ image size 68x20 / 140x20 51 membershipstatuslevel string 256 optional image url for the status level of the airline alliance or own membership i e , airline skyteam, star alliance image size 68x20 / 140x20 52 barcode value string 4096 optional actual data that is delivered when the barcode/qr code is scanned 53 barcode serialtype string 32 optional presentation type e g , serialnumber, barcode, * see barcode format 54 barcode ptformat string 32 optional presentation format e g , barcode, qrcode, serial, *see barcode format 55 barcode ptsubformat string 32 optional presentation sub-format e g , code_128, qr_code, * see barcode format 56 barcode errorcorrectionlevel string 4 optional amount of redundancy or error correction data included in the code there are four error correction levels available in qr codes * code options l/m/q/h example airline boarding pass { "card" { "type" "boardingpass", "subtype" "airlines", "data" [ { "refid" "se16138353212584800001", "createdat" 1612660039000, "updatedat" 1612660039000, "language" "en", "attributes" { "title" "oo air boarding pass", "transittype" "airline", "groupingid" "se867132687321", "providerlogo" "https // /logoimage png", "providerlogo darkurl" "https // /logoimage png", "providername" "oo air", "user" "gil dong hong", "vehiclenumber" "se123", "seatclass" "economy plus", "seatnumber" "a15", "reservationnumber" "a238473-1", "boardingseqno" "32", "boardingtime" 1612660039000, "boardingtime utcoffset" "utc+09 00", "baggageallowance" "15kg", "departname" "seoul/incheon", "departcode" "inc", "departterminal" "c", "departgate" "1", "estimatedoractualstartdate" 1612660039000, "estimatedoractualstartdate utcoffset" "utc+09 00", "arrivename" "san francisco", "arrivecode" "sfo", "arriveterminal" "a", "arrivegate" "11", "estimatedoractualenddate" 1612660039000, "estimatedoractualenddate utcoffset" "utc-08 00", "bgcolor" "#ff00ff", "fontcolor" "dark", "applinklogo" "https // /applinklogo png", "applinkname" "oo airline", "applinkdata" "https //www ooairline com", "csinfo" "{\"call\" \"0000-0000\",\"email\" \"samsungwallet@samsungwallet com\",\"website\" \"https //www samsungwallet com/cs/\"}", "barcode value" "cs16138353212584806754fg1802", "barcode serialtype" "barcode", "barcode ptformat" "qrcodeserial", "barcode ptsubformat" "qr_code" }, "localization" [ { "language" "ko", "attributes" { "title" "oo 항공 탑승권", "providername" "oo 항공", "user" "홍 길동" } } ] } ] } } grouped bus boarding passes { "card" { "type" "boardingpass", "subtype" "buses", "data" [ { "refid" "ref-202211300001", "createdat" 1669782394000, "updatedat" 1669782394000, "language" "en", "attributes" { "title" "samsung bus boarding pass", "transittype" "bus", "groupingid" "grp-20221130001", "providerlogo" "https // /logoimage png", "providerlogo darkurl" "https // /logoimagedark png", "providername" "samsung bus", "user" "galaxy kim", "usertype" "adult", "transitoperator" "samsung transport co ", "seatnumber" "7-a", "reservationnumber" "rsvno-202211300001", "transitclass" "premium", "transitfare" "12,500 won", "boardingtime" 1671926400000, "boardingtime utcoffset" "utc+09 00", "departname" "east-seoul bus terminal", "departgate" "14", "estimatedoractualstartdate" 1671928200000, "estimatedoractualstartdate utcoffset" "utc+09 00", "arrivename" "suwon bus terminal", "bgcolor" "#f1c232", "fontcolor" "dark", "applinklogo" "https // /applinklogo png", "applinkname" "samsung bus", "applinkdata" "https //www samsung-bus com", "csinfo" "{\"call\" \"0000-0000\",\"email\" \"samsungwallet@samsungwallet com\",\"website\" \"https //www samsungwallet com/cs/\"}", "barcode value" "161383532125848067541802", "barcode serialtype" "barcode", "barcode ptformat" "qrcodeserial", "barcode ptsubformat" "qr_code" }, "localization" [ { "language" "ko", "attributes" { "title" "삼성버스 탑승권", "providername" "삼성버스", "user" "김 은하", "transitfare" "12,500 원" } } ] }, { "refid" "ref-202211300002", "createdat" 1669782394000, "updatedat" 1669782394000, "language" "en", "attributes" { "title" "samsung bus boarding pass", "transittype" "bus", "groupingid" "grp-20221130001", "providerlogo" "https // /logoimage png", "providerlogo darkurl" "https // /logoimagedark png", "providername" "samsung bus", "user" "samsung sam", "usertype" "child", "transitoperator" "samsung transport co ", "seatnumber" "7-b", "reservationnumber" "rsvno-202211300002", "transitclass" "preminum", "transitfare" "9,000 won", "boardingtime" 1671926400000, "boardingtime utcoffset" "utc+09 00", "departname" "east-seoul bus terminal", "departgate" "14", "estimatedoractualstartdate" 1671928200000, "estimatedoractualstartdate utcoffset" "utc+09 00", "arrivename" "suwon bus terminal", "bgcolor" "#f1c232", "fontcolor" "#000000", "applinklogo" "https // /applinklogo png", "applinkname" "samsung bus", "applinkdata" "https //www samsung-bus com", "csinfo" "{\"call\" \"0000-0000\",\"email\" \"samsungwallet@samsungwallet com\",\"website\" \"https //www samsungwallet com/cs/\"}", "barcode value" "161383532125848067541802", "barcode serialtype" "barcode", "barcode ptformat" "qrcodeserial", "barcode ptsubformat" "qr_code" }, "localization" [ { "language" "ko", "attributes" { "title" "삼성버스 탑승권", "providername" "삼성버스", "user" "사만다 삼성", "transitfare" "9,000 원" } } ] } ] } } event ticket 'event ticket' cards support event commodities for performances, sports, movies, entrances, and etc event tickets in wallet can provide additional information about the event and an alarm before the event time and expiration ticket cards support event commodities for performances, sports, movies, and entrance wallet card type wallet card subtype ticket performances, sports, movies, entrances, others -performances -movies -sports -entrances type value description attributes {fields} 1 title string 32 required main title e g , mlb ticket 2 category string 16 optional ticket category * this will be deprecated 3 eventid string 32 optional if full cancelation of the event occurs, find and process all tickets with this id 4 groupingid string 32 optional identifier used to group related cards 5 orderid string 32 optional a unique identifier for an order 6 mainimg string 256 required url for main ticket image the file size should not exceed 512 kb 7 subtitle1 string 32 optional the auxiliary field which displays supporting information 8 logoimage string 256 required logo image url to be displayed in the card item the file size should not exceed 256 kb 9 logoimage darkurl string 256 required logo image url in dark mode the file size should not exceed 256 kb 10 logoimage lighturl string 256 required logo image url in light mode the file size should not exceed 256 kb 11 wideimage string 256 optional wide horizontal image url displayed on the card information screen the file size should not exceed 256 kb 12 providername string 32 required ticket provider name 13 providerviewlink string 512 optional link to additional information from the provider* see links format 14 classification string 16 optional classification of tickets use onetime, regular, or annual * default onetime 15 holdername string 64 optional name of card holders 16 idphoto string 20k optional holder’s photo image data encoded base64 17 idphoto format string 32 optional image file formate g , jpeg, png * unsupported image formats may exist 18 idphoto status string 16 optional status of the dataallowed value unchanged 19 grade string 32 optional ticket grade 20 seatclass string 32 optional seat class 21 entrance string 64 optional entrance gate 22 seatnumber string 256 optional seat location 23 seatlayoutimage string 256 optional url of the seat layout image the file size should not exceed 512 kb 24 issuedate long 13 required issue date epoch timestamp in milliseconds 25 reservationnumber string 32 required reservation number 26 user string 64 optional name of person who made the reservation 27 certification string 16 optional ticket certification e g ,r, as a film rating 28 reactivatableyn string 1 optional flag whether the card is able to activate an expired ticket temporarily either 'y' or 'n' * default 'n' 29 preventcaptureyn string 1 optional flag whether this wallet card view prevents screen capture either 'y' or 'n'* default 'n' 30 nonetworksupportyn string 1 optional set whether to support to open the wallet card under 'no network' status either 'y' or 'n' * default 'n' 31 startdate long 13 required start date displayed start date epoch timestamp in milliseconds 32 startdate utcoffset string 8 optional utc offset of start date time at the event location 33 enddate long 13 optional end date displayed end date epoch timestamp in milliseconds * if null, the card will expire in 10 hours from startdate 34 enddate utcoffset string 8 optional utc offset of start date time at the event location 35 person1 string 512 optional number of persons by category * see classification format 36 locations string 1024 optional list of locations where the card can be used * see location format 37 noticedesc string 5000 required text of the notice * long content is allowed * see additional information format 38 groupinfo1 string 64 optional the first common information with the same groupingid 39 groupinfo2 string 64 optional the second common information with the same groupingid *it is recommended to set groupinfo1 first 40 groupinfo3 string 64 optional the third common information with the same 'groupingid' *it is recommended to set groupinfo1, groupinfo2 first 41 csinfo string 512 optional providers’ customer service informationusing data in json format converted to escape string * allowed items call, email, website, facebook, youtube, or instagram* see the example below 42 privacymodeyn string 1 optional whether or not to require user authentication when using the cardeither ‘y’ or ‘n’* default ‘n’ 43 applinklogo string 256 required app link image url the file size should not exceed 256 kb 44 applinkname string 32 required app link name 45 applinkdata string 256 required information about the partner app link 46 bgcolor string 8 optional color of the card art e g , #00ffff 47 fontcolor string 8 optional color of the font on the card art acceptable values dark, light 48 blinkcolor string 8 optional color of the blinking effect in the indicator areae g , #00ffff 49 barcode value string 4096 optional actual data that is delivered when the barcode/qr code is scanned 50 barcode serialtype string 32 optional presentation type e g , serialnumber, barcode * see barcode format 51 barcode ptformat string 32 optional presentation format e g , barcode, qrcode, serial * see barcode format 52 barcode ptsubformat string 32 optional presentation sub-format e g , code_128, qr_code * see barcode format 53 barcode errorcorrectionlevel string 4 optional amount of redundancy or error correction data included in the code there are four error correction levels available in qr codes * code options l/m/q/h 54 barcode interval string 4 optional update interval if support for dynamic updatesepoch timestamp in milliseconds 55 provision data string 512 optional elements to complete provisioning* see provisioning for details 56 provision interval string 16 optional update interval if support for dynamic updates epoch timestamp in milliseconds 57 relcoupon{i} title string 32 conditional coupon title * required if this ticket has a related couponi 1~3 58 relcoupon{i} subtitle string 32 optional coupon subtitlei 1~3 59 relcoupon{i} providername string 32 conditional coupon provider name * required if this ticket has a related coupon i 1~3 60 relcoupon{i} imagefilesrc string 256 optional coupon image url the file size should not exceed 256 kb i 1~3 61 relcoupon{i} noticedescription string 1024 optional text of the notice * long content is allowed * see additional information format i 1~3 62 relcoupon{i} notificationtime long 13 optional coupon exposure time epoch timestamp in milliseconds i 1~3 63 relcoupon{i} value string 4096 conditional actual data that is delivered when the barcode/qr code is scanned i 1~3 64 relcoupon{i} serialtype string 32 required presentation typee g , serialnumber, barcode, * see barcode format i 1~3 65 relcoupon{i} ptformat string 32 conditional presentation formate g , barcode, qrcode, serial, * see barcode format i 1~3 66 relcoupon{i} ptsubformat string 32 conditional presentation sub-formate g , code_128, qr_code, * see barcode format i 1~3 67 relcoupon{i} errorcorrectionlevel string 4 optional amount of redundancy or error correction data included in the code there are four error correction levels available in qr codes - code options l/m/q/h i 1~3 example { "card" { "type" "ticket", "subtype" "entrances", "data" [ { "refid" "ent-ticket-0613001", "createdat" 1686657600000, "updatedat" 1686657600000, "language" "en", "attributes" { "title" "galaxy land entrance ticket", "subtitle1" "standard", "classification" "annual", "groupingid" "group-0613001", "orderid" "ent-0613001", "mainimg" "https // /main png", "logoimage" "https // /logo png", "providername" "galaxy entertainment", "logoimage darkurl" "https // /logo-dark png", "issuedate" 1686657600000, "reservationnumber" "glx-0613-001", "startdate" 1686657600000, "enddate" 1718280000000, "holdername" "kim eunha", "idphoto data" "base64-encoded{image-file-data}", "idphoto format" "png", "grade" "family", "person1" "{\"person\" [{\"category\" \"adult\", \"count\" 1 }]}", "locations" "[{\"lat\" 37 256518, \"lng\" 127 053516, \"address\" \"samsung-ro yeongtong-gu, suwon\", \"name\" \"galaxy land central park\"}]", "noticedesc" "{\"count\" 2,\"info\" [{\"title\" \"notice 1\",\"content\" [\"description 1-1\",\"description 1-2\"]},{\"title\" \"notice 2\",\"content\" [\"description 2-1\"]}]}", "groupinfo1" "adult 1", "groupinfo2" "standard", "groupinfo3" "family", "csinfo" "{\"call\" \"0000-0000\",\"email\" \"samsungwallet@samsungwallet com\",\"website\" \"https //www samsungwallet com/cs/\",\"instagram\" \"https //www instagram com/samsungwallet\",\"youtube\" \"https //www youtube com/@samsungwallet\",\"facebook\" \"https //www facebook com/samsungwallet\" }", "applinkname" "galaxy ticket", "applinklogo" "https // /applinklogo png", "applinkdata" "https //www applinkdata com", "bgcolor" "#e86d1f", "fontcolor" "light", "blinkcolor" "#e86d1f", "barcode value" "serial-0613-001", "barcode serialtype" "qrcode", "barcode ptformat" "qrcodeserial", "barcode ptsubformat" "qr_code" }, "localization" [ { "language" "ko", "attributes" { "title" "갤럭시 랜드 입장권", "holdername" "김은하", "person1" "{\"person\" [{\"category\" \"어른\", \"count\" 1 }]}", "locations" "[{\"lat\" 37 256518, \"lng\" 127 053516, \"address\" \"samsung-ro yeongtong-gu, suwon\", \"name\" \"갤럭시 랜드 센트럴 파크\"}]", "noticedesc" "{\"count\" 2,\"info\" [{\"title\" \"공지사항 1\",\"content\" [\"설명 1-1\",\"설명 1-2\"]},{\"title\" \"공지사항 2\",\"content\" [\"설명 2-1\"]}]}", "groupinfo1" "어른 1" } } ] } ] } } coupon 'coupon' cards support digitized redeemable voucher coupons in wallet for various channels can provide alarms before expiration and update usage status wallet card type wallet card subtype coupon others type value description attributes {fields} 1 title string 32 required main title e g , free coupon 2 orderid string 32 optional unique identifier for an order 3 mainimg string 256 required url for the main coupon image the file size should not exceed 512 kb 4 logoimage string 256 optional logo image url to be displayed in the card item the file size should not exceed 256 kb 5 logoimage darkurl string 256 optional logo image url in dark mode the file size should not exceed 256 kb 6 logoimage lighturl string 256 optional logo image url in light mode the file size should not exceed 256 kb 7 brandname string 32 optional brand name 8 expiry long 13 required expiration date in timestamp format issued data is cleaned up after it expires epoch timestamp in milliseconds 9 issuedate long 13 required issue date epoch timestamp in milliseconds 10 redeemdate long 13 optional date when the coupon is used epoch timestamp in milliseconds 11 noticedesc string 5000 optional text of notice * html is supported 12 editableyn string 1 required flag whether the coupon can be modified either 'y' or 'n' 13 deletableyn string 1 required flag whether the coupon can be deleted either 'y' or 'n' 14 displayredeembuttonyn string 1 required flag whether the use completion button is displayed either 'y' or 'n' 15 notificationyn string 1 required flag whether a notification related to the coupon is delivered either 'y' or 'n' 16 applinklogo string 256 required app link image url the file size should not exceed 256 kb 17 applinkname string 32 required app link name 18 applinkdata string 256 required information about the partner app link 19 preventcaptureyn string 1 optional flag whether this wallet card view prevents screen captureeither 'y' or 'n'* default 'n' 20 barcode value string 4096 conditional actual data that is delivered when the barcode/qr code is scanned 21 barcode value2 string 4096 conditional the secondary barcode data * required if ptformat is dualbarcode or dualbarcodeserial 22 barcode serialtype string 32 optional presentation type e g ,serialnumber, barcode * see barcode format 23 barcode ptformat string 32 optional presentation format e g , barcode, qrcode, serial * see barcode format 24 barcode ptsubformat string 32 optional presentation sub-format e g ,code_128, qr_code * see barcode format 25 barcode errorcorrectionlevel string 4 optional amount of redundancy or error correction data included in the code there are four error correction levels available in qr codes * code options l/m/q/h 26 balance string 50 optional initial balance this is going to be shown as received it is recommended to use a one letter currency symbol e g , $1,000, 1,000p 27 summaryurl string 256 optional webpage url that show details, such as balance 28 usermessage string 256 optional message to forward 29 sender string 64 optional name of sender 30 redeemurl string 256 optional link to redeem coupons example { "card" { "type" "coupon", "subtype" "others", "data" [ { "refid" "ref-230712-0001", "createdat" 1612660039000, "updatedat" 1612660039000, "language" "en", "attributes" { "title" "free coupon", "mainimg" "https // /main png", "brandname" "samsung coupon", "expiry" 1637802725000, "issuedate" 1637457125000, "editableyn" "n", "deletableyn" "n", "displayredeembuttonyn" "y", "notificationyn" "y", "applinkname" "oo voucher", "applinklogo" "https // /applinklogo png", "applinkdata" "https //www oocoupon com", "barcode value" "cs16138353212584806754fg1802 ", "barcode serialtype" "barcode", "barcode ptformat" "qrcodeserial", "barcode ptsubformat" "qr_code" } } ] } } gift card 'gift card' cards support enrolling prepaid cards also known as gift certificate, gift voucher or gift token links urls to get balance and transactions history in real time is provided in the partners portal if a partner needs to integrate communication between samsung wallet server and the partner’s server to support the feature, the partner has to set the links in partners portal wallet card type wallet card subtype giftcard others type value description attributes {fields} 1 title string 32 required main title e g , samsung gift card 2 eventid string 36 optional if full cancelation of the event occurs, find and process all gift cards with this id 3 orderid string 36 optional a unique identifier for an order 4 subtitle1 string 32 optional the auxiliary field which displays supporting information 5 logoimage string 256 optional logo image url to be displayed in the card item the file size should not exceed 256 kb 6 logoimage darkurl string 256 optional logo image url in dark mode the file size should not exceed 256 kb 7 logoimage lighturl string 256 optional logo image url in light mode the file size should not exceed 256 kb 8 providername string 32 required gift card provider name 9 user string 64 optional name of person who holds the gift card 10 preventcaptureyn string 1 optional flag whether this wallet card view prevents screen capture either 'y' or 'n', the default value is 'n' 11 startdate long 13 optional start date display start date epoch timestamp in milliseconds 12 enddate long 13 optional end date display end date epoch timestamp in milliseconds 13 locations string 1024 optional list of locations where the gift card can be used * see location format 14 noticedesc string 5000 optional text of the notice * long content is allowed * see additional information format 15 csinfo string 512 optional providers’ customer service informationusing data in json format converted to escape string * allowed items call, email, or website* see the example below 16 applinklogo string 256 required app link image url the file size should not exceed 256 kb 17 applinkname string 32 required app link name 18 applinkdata string 256 required information about the partner app link 19 bgimage string 256 optional url for card art background image the recommended size for image resources is 888 x 555 px 20 mainimg string 256 optional url for gift card image the file size should not exceed 512 kb 21 bgcolor string 8 optional color of the card art e g ,#00ffff 22 fontcolor string 8 optional color of the font on the card art acceptable values dark, light 23 blinkcolor string 8 optional color of the blinking effect which indicates that a card cannot be captured in the indicator area e g , #00ffff 24 barcode value string 4096 optional actual data that is delivered when the barcode/qr code is scanned 25 barcode serialtype string 32 optional presentation type e g , serialnumber, barcode *see barcode format 26 barcode ptformat string 32 optional presentation format e g , barcode, qrcode, serial *see barcode format 27 barcode ptsubformat string 32 optional presentation sub-format e g , code_128, qr_code * see barcode format 28 barcode pin string 16 optional pin to show with a barcode 29 barcode errorcorrectionlevel string 4 optional amount of redundancy or error correction data included in the code there are four error correction levels available in qr codes * code options l/m/q/h 30 merchantid string 36 optional merchant identifier 31 merchantname string 32 optional merchant name to display 32 amount string 32 optional initial balance this is going to be shown as received e g , $1,000 33 balance string 32 optional remaining balance this is going to be shown as received e g , $1,000 34 summaryurl string 256 optional web url that show details, such as balance or transactions history example { "card" { "type" "giftcard", "subtype" "others", "data" [ { "refid" "b3fdc982-28c9-47a3-b02f-d484779698a7", "createdat" 1672574400000, "updatedat" 1672574400000, "language" "en", "attributes" { "title" "samsung gift card", "eventid" "event-001", "logoimage" "https //gpp walletsvc samsung com/mcs/images/contents/wallet_intro_logo png", "logoimage darkurl" "https //gpp walletsvc samsung com/mcs/images/contents/wallet_intro_logo png", "providername" "samsung gift card provider", "user" "ms jane doe", "noticedesc" "<ul><li>gift card test</li></ul>", "csinfo" "{\"call\" \"0000-0000\",\"email\" \"samsungwallet@samsungwallet com\",\"website\" \"https //www samsungwallet com/cs/\" }", "applinklogo" "https //play-lh googleusercontent com/znfa1roz7hpv9j-jiacbjmjudl2x-fnuwte0oyvbbcwvf5vpzoqqikbxgk7d-aptvag=w240-h480-rw", "applinkname" "gift card link", "applinkdata" "https //www samsung com/", "bgcolor" "#0a1a4f", "fontcolor" "light", "blinkcolor" "#00ffff", "barcode value" "cs16138353212584806754fg1802", "barcode serialtype" "qrcode", "barcode ptformat" "qrcodeserial", "barcode ptsubformat" "qr_code" } } ] } } loyalty 'loyalty' cards support enrolling loyalty cards also known as membership links urls to get points in real time can be provided in the partners portal if a partner needs to integrate communication between samsung wallet server and the partner’s server to support the feature, the partner has to set the links in the partners portal wallet card type wallet card subtype loyalty others type value description attributes {fields} 1 title string 32 required main title e g ,samsung loyalty card 2 eventid string 36 optional if full cancelation of the event occurs, find and process all loyalty cards with this id 3 groupingid string 36 optional identifier used to group related cards 4 orderid string 36 optional a unique identifier for an order 5 subtitle1 string 32 optional the auxiliary field which displays supporting information 6 logoimage string 256 optional logo image url to be displayed in the card item the file size should not exceed 256 kb 7 logoimage darkurl string 256 optional logo image url in dark mode the file size should not exceed 256 kb 8 logoimage lighturl string 256 optional logo image url in light mode the file size should not exceed 256 kb 9 providername string 32 required loyalty card provider name 10 startdate long 13 optional start date display start date epoch timestamp in milliseconds 11 enddate long 13 optional end date display end date epoch timestamp in milliseconds 12 locations string 1024 optional list of locations where the card can be used * see location format 13 noticedesc string 5000 optional text of notice *html supported 14 csinfo string 512 optional providers’ customer service information using data in json format converted to escape string * allowed items call, email, website, facebook, pinterest, x, or instagram * see the example below 15 applinklogo string 256 required app link image url the file size should not exceed 256 kb 16 applinkname string 32 required app link name 17 applinkdata string 256 required information about the partner app link 18 bgimage string 256 optional background image for a card art the recommended size for image resources is 888 x 555 px 19 bgcolor string 8 optional color of the card art e g , #00ffff 20 fontcolor string 8 optional color of the font on the card art acceptable values dark, light 21 blinkcolor string 8 optional color of the blinking effect which indicates that a card cannot be captured in the indicator area e g , #00ffff 22 barcode value string 4096 optional actual data that is delivered when the barcode/qr code is scanned 23 barcode serialtype string 32 optional presentation type e g , serialnumber, barcode * see barcode format 24 barcode ptformat string 32 optional presentation format e g , barcode, qrcode, serial * see barcode format 25 barcode ptsubformat string 32 optional presentation sub-format e g , code_128, qr_code *see barcode format 26 barcode errorcorrectionlevel string 4 optional amount of redundancy or error correction data included in the code there are four error correction levels available in qr codes * code options l/m/q/h 27 merchantid string 36 optional merchant identifier 28 merchantname string 32 optional merchant name to display 29 amount string 32 optional total amount of points or initial balance this is going to be shown as received it is recommended to use a one letter currency symbol e g , $ 1,000, 1,000p 30 balance string 32 optional available points or remaining balance this is going to be shown as received it is recommended to use a one letter currency symbol e g , $ 1,000, 1,000p 31 summaryurl string 256 optional webpage url that shows details, such as balance or transactions history example { "card" { "type" "loyalty", "subtype" "others", "data" [ { "refid" "b3fdc982-28c9-47a3-b02f-d484779698a8", "createdat" 1672574400000, "updatedat" 1672574400000, "language" "en", "attributes" { "title" "samsung loyalty card", "eventid" "event-001", "logoimage" "https //gpp walletsvc samsung com/mcs/images/contents/wallet_intro_logo png", "logoimage darkurl" "https //gpp walletsvc samsung com/mcs/images/contents/wallet_intro_logo png", "providername" "samsung loyalty card provider", "noticedesc" "<ul><li>loyalty card test</li></ul>", "csinfo" " {\"call\" \"0000-0000\",\"email\" \"samsungwallet@samsungwallet com\",\"website\" \"https //www samsungwallet com/cs/\",\"instagram\" \"https //www instagram com/samsungwallet\",\"pinterest\" \"https //www pinterest com/samsungwallet\",\"x\" \"https //www twitter com/samsungwallet\",\"facebook\" \"https //www facebook com/samsungwallet\" }", "applinklogo" "https //play-lh googleusercontent com/znfa1roz7hpv9j-jiacbjmjudl2x-fnuwte0oyvbbcwvf5vpzoqqikbxgk7d-aptvag=w240-h480-rw", "applinkname" "loyalty card link", "applinkdata" "https //www samsung com/", "bgcolor" "#0a1a4f", "barcode value" "cs16138353212584806754fg1802", "barcode serialtype" "qrcode", "barcode ptformat" "qrcodeserial", "barcode ptsubformat" "qr_code", "amount" "1,000p", "balance" "500p" } } ] } } digital ids 'digital id' cards are used to present identification for employees, students, drivers, guests, etc wallet card type wallet card subtype idcard employees, nationals, students, drivers, guests, others -employees -nationals -students -drivers type value description attributes {fields} 1 title string 32 required main title of cardse g , commercial access, employee badge 2 holdername string 64 required name of card holders 3 secondholdername string 64 optional second name of card holders 4 organization string 64 optional organization of card holders belongingi e , name of department, division, affiliation, association or team, name of college or school 5 position string 64 optional position of card holderse g , engineer, 5th grade 6 identifier string 64 required unique id valuei e , unique card number assigned to the card holdere g , s 123 456 789 012 x 7 idnumber string 64 optional representative value for an idi e , id number, document number, card/roll number assigned by the institution or collegee g , b19mba115 8 idstatus string 64 optional card holder's statusex full time student, graduate, exchange, post-graduate, under-graduate 9 address string 256 optional address of card holders 10 placeoflocation string 64 optional place of location associated with the cardholder 11 idphoto string 128k optional holder’s photo image data encoded base64the file size should not be greater than 128 kb 12 idphoto format string 32 optional image file formate g , jpeg, png* unsupported image formats may exist 13 idphoto status string 16 optional status of the dataallowed value unchanged 14 document string 1024k optional first document of identity 15 document format string 32 optional document format- allowed value pdf, jpeg, png 16 document status string 16 optional status of the dataallowed value unchanged 17 issuedate long 13 required issue date epoch timestamp in milliseconds 18 birthdate string 16 optional date of birth 19 gender string 16 optional gender of card holders 20 classification string 16 optional classified identity type 21 expiry long 13 optional expiry date in timestamp format issued data is cleaned up after it expires epoch timestamp in milliseconds 22 contacts string 32 optional personal contact information such as phone number 23 logoimage string 256 optional logo image url to be displayed in card item the file size should not exceed 256 kb 24 logoimage darkurl string 256 optional logo image url in dark mode the file size should not exceed 256 kb* if this value does not exist, logoimage will be substituted 25 logoimage lighturl string 256 optional logo image url in light mode the file size should not exceed 256 kb* if this value does not exist, logoimage will be substituted 26 logotext string 16 optional text as an alternative to logoimage 27 providername string 32 required content provider namei e , partnering institute 28 issuername string 32 optional place of issue or issuing authority name 29 extrainfo string 512 optional additional informationi e , bloodgroup, guardianname, govrefid* see additional information format 30 noticedesc string 5000 optional text of the notice * long content is allowed * see additional information format 31 csinfo string 512 required providers’ customer service information using data in json format converted to escape string * allowed items call, email, or website* see the example below 32 privacymodeyn string 1 optional whether or not to require user authentication when using the card either ‘y’ or ‘n’* default ‘n’ 33 applinklogo string 256 optional app link image url the file size should not exceed 256 kb 34 applinkname string 32 optional app link name 35 applinkdata string 256 optional information about the partner app link 36 locations string 1024 optional list of locations where the card can be used* see location format 37 coverimage string 256 optional card cover image urlthe file size should not exceed 512 kb the recommended size for image resources is 888 x 555 px 38 bgimage string 256 optional card background image urlthe file size should not exceed 512 kb the recommended size for image resources is 888 x 555 px 39 bgcolor string 8 optional color of the card art support hex color code e g , #015aaa 40 fontcolor string 8 optional color of the font on the card art allowed value black, white 41 blinkcolor string 8 optional color of the blinking effect in the indicator area support hex color code e g , #015aaa 42 preventcaptureyn string 1 optional flag whether this wallet card view prevents screen capture either 'y' or 'n' * default 'n' 43 barcode value string 4096 optional actual data that is delivered when the barcode/qr code is scanned 44 barcode serialtype string 32 optional presentation type e g , serialnumber, barcode, * see barcode format 45 barcode ptformat string 32 optional presentation format e g , barcode, qrcode, serial, * see barcode format 46 barcode ptsubformat string 32 optional presentation sub-format e g , code_128, qr_code, * see barcode format 47 barcode errorcorrectionlevel string 4 optional amount of redundancy or error correction data included in the code there are four error correction levels available in qr codes - code options l/m/q/h * default l 48 barcode interval string 4 optional update interval if support for dynamic updates epoch timestamp in milliseconds 49 authentication string 64 optional authentication data which meets choose options * see authentication for details 50 provision data string 512 optional elements to complete provisioning* see provisioning for details 51 provision interval string 16 optional update interval if support for dynamic updatesepoch timestamp in milliseconds example { "card" { "type" "idcard", "subtype" "employees", "data" [ { "refid" "identitycard-bpo1r3e5-3313-0991-z404-sq12994414u8", "createdat" 1658385817000, "updatedat" 1658385817000, "language" "en", "attributes" { "title" "employee id card", "holdername" "kim samsung", "secondholdername" " samsung ", "organization" "digital wallet, mx", "position" "professional", "identifier" "2306070003", "idphoto" "{base64 encoded image data}", "idphoto format" "jpeg", "document" "{base64 encoded pdf data}", "document format" "pdf", "issuedate" "1658385817000", "expiry" "1765855665000", "logoimage" "https // /logo png", "providername" "samsung electronics", "extrainfo" "{\"count\" 1,\"info\" [{\"title\" \"shortcode\",\"content\" [\"404457\"]}]}", "noticedesc" "{\"count\" 2,\"info\" [{\"title\" \"notice1\",\"content\" [\"description1\",\"description2\"]},{\"title\" \"notice2\",\"content\" [\"description1\",\"description2\"]}]}", "csinfo" "{\"call\" \"555 123-4567\", \"email\" \"cs@email com\", \"website\" \"https //homepage com/cs\"}", "applinkname" "samsung electronics", "applinklogo" "https // /applinklogo png", "applinkdata" "https //www applinkorweblink com", "coverimage" "https // /card/cover png", "bgimage" "https // /card/background png", "fontcolor" "dark", "barcode value" "5728306720836720763017601", "barcode serialtype" "qrcode", "barcode ptformat" "qrcode", "barcode ptsubformat" "qr_code", "barcode interval" "300000", "authentication" "samsung@samsung com", "provision data" "{\"appkey\" \"abcdefaei;fadaf=\",\"telno\" \"01012345678\",\"provider\" \"sec\",\"id\" \"0000000000000000\",\"authkey\" \"a3b7fgj0ea\"}" }, "localization" [ { "language" "ko", "attributes" { "title" "사원증", "holdername" "김삼성", "secondholdername" "kim samsung", "providername" "삼성전자" } } ] } ] } } pay as you go 'pay as you go' card supports a system that pays just before using the cost for the service wallet card type wallet card subtype payasyougo evcharges, others type value description attributes {fields} 1 title string 32 required main title of cardse g , samsung charge card 2 subtitle1 string 32 optional the auxiliary field which displays supporting information 3 logoimage string 256 optional logo image url to be displayed in the card item the file size must not be greater than 256 kb 4 logoimage darkurl string 256 optional logo image url in dark mode the file size should not exceed 256 kb* if this value does not exist, logoimage will be substituted 5 logoimage lighturl string 256 optional logo image url in light mode the file size must not be greater than 256 kb * if this value does not exist, logoimage will be substituted 6 providername string 32 optional content provider name 7 holdername string 64 optional name of card holders 8 preventcaptureyn string 1 optional flag whether this wallet card view prevents screen capture either ‘y’ or ‘n’, the default value is ‘n’ 9 startdate long 13 optional start date display start date epoch timestamp in milliseconds 10 enddate long 13 optional end date display end date epoch timestamp in milliseconds 11 locations string 1024 optional list of locations where the card can be used * see location format 12 noticedesc string 5000 required text of the benefits using data in json format converted to escape string* see additional information information format 13 csinfo string 512 optional providers’ customer service information using data in json format converted to escape string * allowed items call, email, website, youtube, instagram, privacynotice, or termsandcondition* see the example below 14 applinklogo string 256 required app link image url the file size must not be greater than 256 kb 15 applinkname string 32 required app link name 16 applinkdata string 256 required information about the partner app link 17 bgimage string 256 optional url for card art background image 18 bgcolor string 8 optional color of the card art e g , #00ffff 19 fontcolor string 8 optional color of the font on the card art supported colors are white or black #000000 or #ffffff 20 blinkcolor string 8 optional color of the blinking effect which indicates that a card cannot be captured in the indicator area e g , #00ffff 21 barcode value string 4096 conditional barcode data, serial number * required if serialtype isn’t 'none' 22 barcode serialtype string 32 required presentation type barcode/qr/serial/none * see barcode format 23 barcode ptformat string 32 conditional presentation format * see barcode format* required if serialtype isn’t 'none' 24 barcode ptsubformat string 32 conditional 25 barcode pin string 16 optional pin to show with a barcode 26 identifier string 64 optional unique id value such as a membership number 27 grade string 32 optional grade value 28 authentication string 64 optional authentication data which meets choose options * see authentication for details 29 provision data string 512 optional elements to complete provisioning* see provisioning for details 30 transactions string 4096 optional transaction history * long content is allowed * see transactions format 31 summaryurl string 256 optional webpage url that show details, such as transactions example { "card" { "type" "payasyougo", "subtype" "evcharges", "data" [ { "refid" "b3fdc982-28c9-47a3-b02f-d484779698a7", "createdat" 1672574400000, "updatedat" 1672574400000, "language" "en", "attributes" { "title" "ev charge card", "logoimage" "https //gpp walletsvc samsung com/mcs/images/contents/wallet_intro_logo png", "logoimage darkurl" "https //gpp walletsvc samsung com/mcs/images/contents/wallet_intro_logo png", "providername" "ev-samsung", "holdername" "ms jane doe", "preventcaptureyn" "y", "enddate" 1772574400000, "noticedesc" "{\"count\" 2,\"info\" [{\"title\" \"포인트 적립\",\"content\" [\"결제금액 1000원당 포인트가 적립됩니다 \"]},{\"title\" \"포인트 사용방법\",\"content\" [\"적립하신 포인트의 유효기간은 발생일로부터 5년입니다 \",\"유효기간이 지난 포인트는 소멸됩니다 \"]}]}", "csinfo" " {\"call\" \"0000-0000\",\"website\" \"https //www samsungwallet com/cs/\",\"instagram\" \"https //www instagram com/samsungwallet\",\"youtube\" \"https //www youtube com/@samsungwallet\",\"privacynotice\" \"https //privacy samsungwallet com/\",\"termsandcondition\" \"https //www samsungwallet com/tnc\" }", "applinklogo" "https //play-lh googleusercontent com/znfa1roz7hpv9j-jiacbjmjudl2x-fnuwte0oyvbbcwvf5vpzoqqikbxgk7d-aptvag=w240-h480-rw", "applinkname" "ev charge link", "applinkdata" "https //www samsungev com/", "bgcolor" "#0a1a4f", "fontcolor" "#ffffff", "blinkcolor" "#00ffff", "barcode value" "1234000067890000", "barcode serialtype" "qrcode", "barcode ptformat" "qrcodeserial", "barcode ptsubformat" "qr_code", "barcode pin" "1234", "identifier" "ev-001", "grade" "prime", "authentication" "sdaiwegjhewoghewoihgewo", "provision data" "asd2hfih9gwejdahgi4uaewhgeo6whgo12ewhgoewahg1iawpriuq7hg5wel", "transactions" "{\"transactions\" [{\"date\" \"2023-09-10 12 00 00\",\"description\" \"ev-samsung suwon\"},{\"date\" \"2023-09-20 18 00 00\",\"description\" \"ev-samsung gangnam\"}]}" } } ] } } generic card 'generic card' is defined for registering various forms of cards that aren't defined as other types partners can customize the items on the generic card to display by connecting them with card data wallet card type wallet card subtype generic others type value description attributes {fields} 1 title string 32 required main title 2 subtitle string 32 optional the auxiliary field which displays supporting information 3 providername string 32 required provider name 4 eventid string 32 optional event identifier 5 groupingid string 32 optional identifier used to group related cards 6 startdate long 13 required start date display start date epoch timestamp in milliseconds 7 startdate relativenotitime string 4 optional the relative time from startdate in minutes to provide a notification to the usere g , 5, 10, 15, 30, 60, and up to 2880 8 enddate long 13 optional end date display end date epoch timestamp in milliseconds 9 enddate relativenotitime string 4 optional the relative time from enddate in minutes to provide a notification to the usere g , 5, 10, 15, 30, 60, and up to 2880 10 logoimage string 256 optional logo image url to be displayed in card item the file size should not exceed 256 kb 11 logoimage darkurl string 256 optional logo image url in dark mode the file size should not exceed 256 kb* if this value does not exist, logoimage will be substituted 12 logoimage lighturl string 256 optional logo image url in light modethe file size should not exceed 256 kb* if this value does not exist, logoimage will be substituted 13 bgimage string 256 optional card background image urlthe file size should not exceed 512 kbthe recommended size for image resources is 888 x 555 px 14 text{i} string 64 optional text item i 1~12 15 image1 string 128k optional image itemuse only type 3 16 image1 lighturl string 256 optional image item in light mode 17 image1 darkurl string 256 optional image item in dark mode 18 image1 status string 16 optional image item status 19 serial{i} value string 4096 optional actual data that is delivered when the barcode/qr code is scanned i 1~2 20 serial{i} serialtype string 32 optional presentation typee g , serialnumber, barcode, * see barcode format 21 serial{i} ptformat string 32 optional presentation formate g , barcode, qrcode, serial, * see barcode format 22 serial{i} ptsubformat string 32 optional presentation sub-formate g , code_128, qr_code, * see barcode format 23 serial{i} errorcorrectionlevel string 4 optional amount of redundancy or error correction data included in the code there are four error correction levels available in qr codes - code options l/m/q/h 24 noticedesc string 1024 required notice description * long content is allowed * see additional information format 25 csinfo string 512 optional providers’ customer service information using data in json format converted to escape string* allowed items calls, emails, or websites 26 privacymodeyn string 1 optional whether or not to require user authentication when using the cardeither ‘y’ or ‘n’* default ‘n’ 27 bgcolor string 8 optional color of the card art e g , #00ffff 28 fontcolor string 8 optional color of the font on the card art acceptable values dark, light 29 nonetworksupportyn string 1 optional sets whether to support to open the wallet card under 'no network' status either 'y' or 'n'* default 'n' 30 applinklogo string 256 required app link image url the file size should not exceed 256 kb 31 applinkname string 32 required app link name 32 applinkdata string 256 required information about the partner app link 33 locations string 1024 optional list of locations where the card can be used * see location format example { "card" { "type" "generic", "subtype" "others", "data" [ { "createdat" 1661745824345, "updatedat" 1661745824345, "language" "en", "refid" "refid-012345", "attributes" { "title" "samsung generic card", "subtitle" "personal members", "providername" "samsung", "startdate" 1661751274000, "startdate utcoffset" "utc+9", "enddate" 1761778000000, "enddate utcoffset" "utc+9", "enddate relativenotitime" "1440", "text1" "13047623", "text2" "silver", "text3" "suwon station branch", "text4" "031 000-1235", "image1" "https //www samsung com/images/image1 png", "image1 darkurl" "https //www samsung com/images/dark png", "image1 lighturl" "https //www samsung com/images/light png", "serial1 value" ">1180mm2241b7c 0000000000000298060000000000 0 090870907 ", "serial1 serialtype" "qrcode", "serial1 ptformat" "qrcode", "serial1 ptsubformat" "qr_code", "bgcolor" "#ff5000", "fontcolor" "dark", "noticedesc" "{\"count\" 2,\"info\" [{\"title\" \"notice1\",\"content\" [\"description1\",\"description2\"]},{\"title\" \"notice2\",\"content\" [\"description1\",\"description2\"]}]}", "csinfo" "{\"calls\" [{\"key\" \"emergency\",\"value\" \"82 123-4567\"},{\"key\" \"customer service\",\"value\" \"82 123-9876\"}],\"emails\" [{\"key\" \"cs team\",\"value\" \"cs@atwsample com\"}],\"websites\" [{\"key\" \"faq\",\"value\" \"https //atwhomepage com/faq\"},{\"key\" \"support\",\"value\" \"https //atwhomepage com/support\"}]}", "applinkdata" "https //www samsung com/", "applinklogo" "https //www samsung com/logo png", "applinkname" "samsung" }, "localization" [ { "language" "ko", "attributes" { "title" "삼성 제네릭 카드", "subtitle" "개인 멤버스", "providername" "삼성", "text2" "실버 등급", "text3" "수원역점" } } ] } ] } }
news blockchain
newsan updated version of the samsung blockchain platform sdk has been released. new features in v1.1 include: support tron native tronservice is added for account management and transaction management. trx, trc10, trc20, and smart contract call is supported. new payment ui for tron is added. signing methods for both normal transaction and personal messages are supported. support tron signing with keystore support tron signing with external cold wallet external cold wallet integration is supported. currently it supports nano x, nano s by ledger. update cucumber update web3.js version to 1.2.2. tronweb provider is added.
tutorials blockchain
blogtron is a well-known, blockchain-based, and decentralized platform that aims to create a global decentralized digital content system. by using blockchain technology, tron has established a network between content creators and consumers, which eliminates the need for a middleman between these two parties. because tron is an account-based blockchain system, a transaction in tron is executed by an account and every transaction needs to pass the consensus process, which is known as dpos. in this process, some witnesses are selected according to a vote to verify the transaction. any token holder can vote to select these witnesses. the samsung blockchain platform (sbp) sdk provides an opportunity for android developers to develop applications that can interact with ethereum and tron blockchain platforms. the sbp sdk supports coin transactions as well as smart contracts and tokens like trc-10, trc-20, and so on. this blog describes the process of sending trx (the base coin of the tron platform) using the sbp sdk, with a sample application. for an example of sending ether (the base coin of the ethereum platform), see send ether with samsung blockchain platform sdk. prerequisites for developing a sample application that can perform trx transactions, the following actions must be performed before the transaction takes place. initialize the object connect to a hardware wallet get accounts each of these actions of the application has been implemented with a corresponding button so that the results of each action can be more visible and clearly illustrated. initialize the object to use the apis of the sdk in an android project, an object of the sdk is required. to create the object, follow the steps below. create a new android project and integrate the sbp sdk with the application. all dependencies need to be mentioned in the build.gradle file. to complete this step follow these instructions. after completing the synchronization of build.gradle with the file system, the project is ready for creating an instance of the sblockchain class. relevant source code can be found here. connect to a hardware wallet a hardware wallet is a storage device with the facility of authentication for securely storing the public-private key pair. there are several hardware wallets in the market, and samsung provides a hardware wallet integrated with select samsung mobile devices, known as the samsung blockchain keystore. sbp provides an interface to connect hardware wallets. alongside the samsung blockchain keystore, sbp currently supports ledger nano x and ledger nano s. connect your application with a hardware wallet using the following code. in this article, the samsung blockchain keystore has been used as the hardware wallet. while running the sample application on your device, please ensure you meet the device restrictions of the samsung blockchain keystore. you can also change the hardware wallet type and test the same application with other supported hardware wallets. get accounts an account is an important protocol of tron. it functions as a gateway to interact with the tron blockchain. your trx balance, token balance, bandwidth, energy, and so on are all attached to your account. trx balance can be sent from one account to another. moreover, an account can issue a smart contract. tron accounts also provide the facility to vote for super representatives. to learn more about super representatives and voting, see the tron documentation. every account consists of a private and public key pair. an account remains deactivated until a trx or token transaction is performed. creating an account consumes frozen bandwidth points. if none are available, then the action burns 0.1 trx instead. if you want to know more about the underlying algorithm and the process of creating an account, see the tron account documentation. the sbp sdk allows you to create a new account or restore existing accounts from the tron network. restoring and creating accounts are network operations. for more information, see the account management guide for the sbp sdk. it discusses generating, restoring and fetching accounts using the sdk. if you have no trx in your account, you can get some by purchasing from the sites listed here or get test trx. trx transaction let's send trx from your account to another account. the sbp sdk provides an api called sendtransaction to perform a transaction between two accounts. this api needs four parameters. wallet: a connected hardware wallet. fromaccount: the sender’s tron account. toaddress: where you want to transfer your trx to, taking the address as a string. value: how much trx you want to transfer. input unit is sun (1 trx= 10^6 sun). the coinservice class called tronservice provides the sendtransaction api for transactions on the tron platform. in addition, a remote procedure call (rpc) is required to communicate with the tron node. we are going to use trongrid for this purpose, which allows developers to access a tron client that is running on the cloud instead of creating one. you can learn more about the trongrid here. before completing the example transaction, some terminology related to transactions, like bandwidth and energy, are discussed. networktype networktype = tronnetworktype.shasta; cointype cointype = cointype.trx; //shasta rpc string rpc = "https://api.shasta.trongrid.io"; // creating coinnetworkinfo coinnetworkinfo mcoinnetworkinfo = new coinnetworkinfo(cointype, networktype, rpc); //creating coinservice coinservice mcoinservice = coinservicefactory.getcoinservice(getapplicationcontext(), mcoinnetworkinfo); //creating tronservice tronservice tronservice = (tronservice) mcoinservice; fetch trx balance trx is the primary currency of tron. it can be used to obtain bandwidth, energy, or power. the sbp sdk provides the getbalance api for fetching the balance of an account. public void onclickgetbalance(view view) { mcoinservice = coinservicefactory.getcoinservice(getapplicationcontext(), mcoinnetworkinfo); textview trxamounttextview = findviewbyid(r.id.amount_tron); mcoinservice.getbalance(mfirstaccount).setcallback(new listenablefuturetask.callback<biginteger>() { @override public void onsuccess(biginteger biginteger) { convertedamount = tronutils.convertsuntotrx(biginteger); log.i(log_tag, "balance has fetched successfully."); log.i(log_tag, "balance is:" + convertedamount.tostring()); runonuithread(() -> { accountinfobutton.setenabled(true); trxamounttextview.settext(convertedamount.tostring()); } ); } @override public void onfailure(@notnull executionexception e) { log.e(log_tag, "fetching balance is failed."); log.e(log_tag, "" + e.getmessage()); } @override public void oncancelled(@notnull interruptedexception e) { log.e(log_tag, "fetching balance is canceled."); } }); } fetch bandwidth and energy tron implements some new and interesting features named freeze, bandwidth, and energy. you can freeze some of your trx balance to gain bandwidth and energy. for every frozen trx, the user receives 1 tron power which is needed to cast a vote on super representatives. after freezing some of your trx, it is not possible to use these trx until they are unfrozen. bandwidth is used as a fee for trx transactions. energy is needed to execute smart contracts. the sbp sdk only provides an api to get a frozen balance amount. you can freeze trx and gain bandwidth and energy using tronscan. tronscan is a blockchain explorer, which allows anyone to explore addresses, transactions, and tokens in the tron blockchain. the sbp sdk provides the getaccountinfo api for fetching bandwidth, energy and power (frozen balance) information. the input parameter is the account address of the sender. in the sample application, after pressing the account info button, the asynchronous task returns this information, which is set on a text view in the ui. public void onclickaccountinfo(view view) { tronservice = (tronservice) mcoinservice; try { tronservice.getaccountinfo(mfirstaccount.getaddress()).setcallback(new listenablefuturetask.callback<tronaccountinfo>() { @override public void onsuccess(tronaccountinfo tronaccountinfo) { log.i(log_tag, "account info is fetched successfully."); log.i(log_tag, "bandwidth is:" + tronaccountinfo.getbandwidth()); log.i(log_tag, "power is:" + tronaccountinfo.getfrozenbalance()); runonuithread(() -> { sendbutton.setenabled(true); bandwidthtextview.settext(tronaccountinfo.getbandwidth().tostring()); powertextview.settext(tronaccountinfo.getfrozenbalance().tostring()); } ); } @override public void onfailure(@notnull executionexception e) { log.e(log_tag, "fetching account info is failed."); log.e(log_tag, "" + e.getmessage()); } @override public void oncancelled(@notnull interruptedexception e) { log.e(log_tag, "fetching account info is canceled."); } }); } catch (exception e) { log.e(log_tag, "error in fetching account info: " + e); } } after fetching bandwidth and energy, we can check them on the sample application ui. transfer trx now we have all the parameters needed for sending trx. the sendtransaction api is used to transfer trx to the recipient. if the transaction is successful, the onsuccess() callback returns the transaction hash. every transaction in the tron blockchain can be found in tronscan. public void onclicksend(view view) { if (toaddress.isempty() || amount.isempty()) { toast.maketext(getapplicationcontext(), "fill toaddress and amount field", toast.length_short).show(); } else if(!tronservice.isvalidaddress(toaddress)){ toast.maketext(getapplicationcontext(), "invalid address.", toast.length_short).show(); } else { bigdecimal sendamount = new bigdecimal(amount); biginteger convertedsendamount = tronutils.converttrxtosun(sendamount); try { tronservice.sendtransaction(mhardwarewallet, (tronaccount) mfirstaccount, toaddress, convertedsendamount).setcallback(new listenablefuturetask.callback<transactionresult>() { @override public void onsuccess(transactionresult transactionresult) { log.d(log_tag, "transaction hash: " + transactionresult.gethash()); runonuithread(() -> toast.maketext(getapplicationcontext(), "transaction hash: " + transactionresult.gethash(), toast.length_short).show() ); } @override public void onfailure(@notnull executionexception e) { log.e(log_tag, "transaction failed."); log.e(log_tag, "" + e.getmessage()); } @override public void oncancelled(@notnull interruptedexception e) { log.e(log_tag, "transaction canceled."); } }); } catch (availabilityexception e) { log.e(log_tag, "error in sending: " + e); } } } now that you can send trx to another account, you can create your wallet application and implement a transfer function using the sbp sdk. keep an eye on the samsung developers site for updates as the samsung blockchain keeps expanding support for new platforms. additional resources: download the sbp sdk transaction sample app more information on the sbp sdk follow up this site has many resources for developers looking to build for and integrate with samsung devices and services. stay in touch with the latest news by creating a free account or by subscribing to our monthly newsletter. visit the marketing resources page for information on promoting and distributing your apps. finally, our developer forum is an excellent way to stay up-to-date on all things related to the galaxy ecosystem.
M.A. Hasan Molla
Develop Samsung Blockchain
apipackage class tree deprecated index help com.samsung.android.sdk.coldwallet class scwservice java.lang.object com.samsung.android.sdk.coldwallet.scwservice public class scwservice extends java.lang.object class for the proxy to use the samsung blockchain keystore service. the keystore's hd wallet seed is bip-39 compatible see also: https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki nested class summary nested classes modifier and type class and description static class scwservice.scwcheckformandatoryappupdatecallback callback for checkformandatoryappupdate api static class scwservice.scwgetaddresslistcallback callback for getaddresslist api static class scwservice.scwgetextendedpublickeylistcallback callback for getextendedpublickeylist api static class scwservice.scwsignbtctransactioncallback callback for signbtctransaction api static class scwservice.scwsignethpersonalmessagecallback callback for signethpersonalmessage api static class scwservice.scwsignethtransactioncallback callback for signethtransaction api static class scwservice.scwsignklaytransactioncallback callback for signklaytransaction api method summary all methods static methods instance methods concrete methods modifier and type method and description void checkformandatoryappupdate(scwservice.scwcheckformandatoryappupdatecallback callback) checks whether a mandatory update of samsung blockchain keystore is needed or not. void getaddresslist(scwservice.scwgetaddresslistcallback callback, java.util.arraylist<java.lang.string> hdpath) request to get a list of addresses that corresponds to a list of hd paths void getextendedpublickeylist(scwservice.scwgetextendedpublickeylistcallback callback, java.util.arraylist<java.lang.string> hdpath) request to get a list of extended public keys that corresponds to a list of hd paths static scwservice getinstance() return the instance of the keystore proxy object int getkeystoreapilevel() get api level which the keystore in the device supports java.lang.string getseedhash() get the pseudo seed hash which is randomly generated when the hd wallet created whenever the seed for the wallet is changed, this key shall be changed. int[] getsupportedcoins() get coin types supported by samsung blockchain keystore void signbtctransaction(scwservice.scwsignbtctransactioncallback callback, byte[] transaction, java.util.list<java.lang.string> hdpathlist, java.util.list<byte[]> utxotxlist, java.lang.string changehdpath) request to sign bitcoin transaction void signethpersonalmessage(scwservice.scwsignethpersonalmessagecallback callback, byte[] msg, java.lang.string hdpath) request to sign ethereum typed structured data void signethtransaction(scwservice.scwsignethtransactioncallback callback, byte[] transaction, java.lang.string hdpath) request to sign ethereum transaction void signklaytransaction(scwservice.scwsignklaytransactioncallback callback, byte[] transaction, java.lang.string hdpath, int networkid) request to sign klay transaction methods inherited from class java.lang.object equals, getclass, hashcode, notify, notifyall, tostring, wait, wait, wait method detail getinstance public static scwservice getinstance() return the instance of the keystore proxy object returns: the instance, or null if samsung blockchain keystore is not available on the device getkeystoreapilevel public int getkeystoreapilevel() get api level which the keystore in the device supports caution : you should check the api level before invoking any apis. otherwise, it will return scwapilevelexception. if keystore api level is lower than the required level, update the keystore app first via scwdeeplink.galaxy_store returns: api level since: api level 1 getseedhash public java.lang.string getseedhash() get the pseudo seed hash which is randomly generated when the hd wallet created whenever the seed for the wallet is changed, this key shall be changed. returns: null if keystore does not support wallet key, zero-length string if the wallet is not created. otherwise, wallet is created. since: api level 1 getsupportedcoins public int[] getsupportedcoins() get coin types supported by samsung blockchain keystore returns: array of coin types, scwcointype throws: scwapilevelexception - api level exception since: api level 1 see also: https://github.com/satoshilabs/slips/blob/master/slip-0044.md checkformandatoryappupdate public void checkformandatoryappupdate(@nonnull scwservice.scwcheckformandatoryappupdatecallback callback) checks whether a mandatory update of samsung blockchain keystore is needed or not. do not call this method in the background thread. if there is a mandatory update, you need to open the app update link, scwdeeplink.galaxy_store parameters: callback - result callback since: api level 1 getextendedpublickeylist public void getextendedpublickeylist(@nonnull scwservice.scwgetextendedpublickeylistcallback callback, @nonnull java.util.arraylist<java.lang.string> hdpath) request to get a list of extended public keys that corresponds to a list of hd paths parameters: callback - result callback hdpath - the hd path list to bring the public keys. the depth of a path should be between 3 and 6. for example, "m/44'/60'", "m/44'/60'/0'/0/0" since: api level 1 see also: https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki getaddresslist public void getaddresslist(@nonnull scwservice.scwgetaddresslistcallback callback, @nonnull java.util.arraylist<java.lang.string> hdpath) request to get a list of addresses that corresponds to a list of hd paths parameters: callback - result callback hdpath - the hd path list to bring the addresses. the depth of a path should be between 3 and 6. for example, "m/44'/60'", "m/44'/60'/0'/0/0" since: api level 1 see also: https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki signethtransaction public void signethtransaction(@nonnull scwservice.scwsignethtransactioncallback callback, @nonnull byte[] transaction, @nonnull java.lang.string hdpath) request to sign ethereum transaction parameters: callback - result callback transaction - a byte array of a rlp-encoded unsigned ethereum transaction hdpath - hd path that corresponds to public key needed for signing since: api level 1 signethpersonalmessage public void signethpersonalmessage(@nonnull scwservice.scwsignethpersonalmessagecallback callback, @nonnull byte[] msg, @nonnull java.lang.string hdpath) request to sign ethereum typed structured data parameters: callback - result callback msg - a byte array of raw message to be signed. the keystore will add "ethereum signed message:\n" prefix, so it should not be included in msg. hdpath - hd path that corresponds to public key needed for signing since: api level 1 see also: https://github.com/ethereum/eips/blob/master/eips/eip-712.md signklaytransaction public void signklaytransaction(@nonnull scwservice.scwsignklaytransactioncallback callback, @nonnull byte[] transaction, @nonnull java.lang.string hdpath, @nonnull int networkid) request to sign klay transaction parameters: callback - result callback transaction - a byte array of a raw transaction to be signed by samsung blockchain keystore. the transaction is same as the sigrlp value mentioned in klaytn's official document. hdpath - hd path that corresponds to public key needed for signing networkid - the klaytn network id, or the integer to identify the network. "8217" is klaytn cypress mainnet and "1001" is klaytn baobab testnet. since: api level 2 see also: https://docs.klaytn.com/node/en/installation/config signbtctransaction public void signbtctransaction(@nonnull scwservice.scwsignbtctransactioncallback callback, @nonnull byte[] transaction, @nonnull java.util.list<java.lang.string> hdpathlist, @nonnull java.util.list<byte[]> utxotxlist, @nonnull java.lang.string changehdpath) request to sign bitcoin transaction parameters: callback - result callback transaction - a byte array of a serialized unsigned bitcoin transaction to be signed by samsung blockchain keystore hdpathlist - a list of hd paths that corresponds to utxo's public key utxotxlist - a list of byte array of the serialized transaction which contain the utxo used in this transaction changehdpath - hd path that corresponds to the change address since: api level 2 see also: https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki, https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki, https://github.com/bitcoin/bips/blob/master/bip-0084.mediawiki
Develop Samsung Blockchain
websamsung blockchain samsung blockchain sdks bring developers and consumers to the blockchain world. explore sdks explore easy-to-use and extra secure samsung blockchain sdks. checkout technical documents, resources, programming guides and other useful materials for keystore sdk & platform sdk. explore keystore sdk samsung blockchain keystore sdk allows your android app and dapp to communicate directly with samsung blockchain keystore. explore platform sdk samsung blockchain platform sdk provide a full set of functions that the decentralized app (dapp) needs. apply for dapp listing follow the dapp registration request process. learn more samsung blockchain. simple and trust proven. eco / content partners samsung blockchain is continuing to collaborate with industry partners to expand and improve the blockchain ecosystem experience for our consumers. klaytn tron gemini stellar sktelecom initial d.street adappter samsung blockchain also welcomes decentralized apps (dapps). now, you can easily integrate dapps to the samsung blockchain wallet and be part of the growing mobile-based samsung blockchain eco. apply for dapp listing forum looking for a community?meet other developers. ask questions. find answers. go to forum tech support if you have a general support request, please click the link below to submit a request. our team of experts will respond as soon as possible. submit a request featured videos samsung developers youtube [kor] what is blockchain & did? [kor] korea blockchain week 2020 - samsung electronics [kor]2020 jeju blockchain hackathon (business camp) [kor]2020 jeju blockchain hackathon (intro) [kor]2020 founders 3rd hackathon with samsung blockchain [v-log] [kor]2020 founders 3rd hackathon with samsung blockchain [eng]samsung blockchain intro [eng]welcome to the samsung blockchain galaxy (devcon5) [eng]introduction to samsung blockchain platform sdk (sdc19 - platform sdk) [kor]is your blockchain app secure? (techtonic2019 - keystore sdk) [eng]is your blockchain app secure? (sdc19 - keystore sdk) [kor] korea blockchain week 2019 - samsung electronics
tutorials blockchain
blogblockchain, an emerging technology, is a distributed database for storing and managing records of transactions. it has already created a huge impact in the financial sector. the transaction is the main feature in any blockchain-based system. in ethereum, one of the better-known blockchain systems, every transaction is executed by either an account or a smart contract. when an account tries to execute a transaction, it creates one and publishes it in the ethereum blockchain. every transaction needs to pass the consensus process. some nodes in the ethereum blockchain, known as miners, validate and authenticate the transaction. “gas” is an incentive that is paid out for executing transactions. on the ethereum platform, gas is paid to miners for completing the consensus process. the samsung blockchain platform sdk enables android developers to develop applications that interact with the etherum blockchain platform. in addition to transactions, the samsung blockchain platform sdk also supports operations related to smart contracts and tokens. through a sample application, this blog describes how to use the samsung blockchain platform sdk to transfer ether, which is the base coin for the ethereum platform. prerequisites before the application can make a transaction, it must first perform the following actions in order: initialize and create the instance connect to the hardware wallet get the account let’s associate each of these actions with a button in our sample application. 1. initialize and create the instance in the android project, integrate the samsung blockchain platform sdk with the application and mention all the dependencies in build.gradle. next, create an instance of the sblockchain class. 2. connect to the hardware wallet the samsung blockchain platform provides an interface to connect to hardware wallets, which are special devices that securely store private keys. samsung mobile devices have an integrated hardware wallet, the samsung blockchain keystore. besides the samsung blockchain keystore, the samsung blockchain platform also supports usb-connected ledger devices and ble-connected nano x devices. the sample application connects to the samsung blockchain keystore hardware wallet. before you run the sample application on your device, check that the device is supported. you can also modify the sample application and test it with other supported hardware wallets. 3. get the account an account is a gateway for interacting with the ethereum blockchain. each account consists of a private and public key pair, for which the shortened public key is the account address. every initial action in the ethereum blockchain must be initiated by an account. the samsung blockchain platform sdk enables the user to create a new account or to restore their accounts from the ethereum network. account management features in the samsung blockchain platform sdk include generating, restoring and fetching accounts. because they are network operations, the create account and restore accounts operations must perform asynchronously. after creating a new account, the user must utilize the account to receive or send ether before the samsung blockchain platform sdk allows them to create another account. if you do not have any ether to use with the sample application, you can use test ether. performing ether transactions the sendtransaction api of the samsung blockchain platform sdk initiates a transaction between two accounts. it requires the following information in its parameters: wallet: connected hardware wallet fromaccount: sender’s ethereum account address gasprice: price of each gas unit, which defines how quickly someone wants to execute the transaction gaslimit: maximum number of gas units to spend on the transaction toaddress: recipient’s ethereum account address value: amount of ethereum to transfer, in wei (1 eth = 10^18 wei). nonce: transaction counter for the account. the coinservice class named ethereumservice provides methods needed to create transactions on the ethereum platform. for example, the getfeeinfo() and estimategaslimit() methods can retrieve the values for use with the gasprice and gaslimit parameters, respectively. to communicate with the ethereum node, rpc is also needed. in the sample application, the infura node is used to access the ethereum blockchain. learn about integrating the infura api with the json rpc. cointype cointype = cointype.eth; networktype networktype = (networktype) ethereumnetworktype.ropsten; //might use your own rpc string rpc = "https://ropsten.infura.io/v3/71cf9f88c5b54962a394d80890e41d5b"; // creating coinnetworkinfo coinnetworkinfo mcoinnetworkinfo = new coinnetworkinfo(cointype, networktype, rpc); //creating coinservice coinservice mcoinservice = coinservicefactory.getcoinservice (getapplicationcontext(), mcoinnetworkinfo); //creating ethereumservice ethereumservice ethereumservice = (ethereumservice) mcoinservice; //access textview and edittexts on ui private radiogroup transactionspeedgroup = findviewbyid(r.id.transaction_speed_radio_group); private textview gaslimittext = findviewbyid(r.id.gas_limit_text_view); private edittext toaddressedittext = findviewbyid(r.id.to_address); private edittext sendamountedittext = findviewbyid(r.id.send_amount); retrieve the gas price gas price retrieval is an asynchronous task. use the getfeeinfo api to retrieve the gas price. the getfeeinfo api returns three gas prices which depend on the speed of the transaction: fast, normal, and slow. to give full control over the gas price for advanced users, you can also enable numerical price input. in the sample application, when the user selects gas price, an asynchronous task retrieves the three gas prices, and assigns them to radio buttons. the user can select the transaction speed they want based on the gas price. public void onclickgasprice(view view) { ethereumservice = (ethereumservice) mcoinservice; ethereumservice.getfeeinfo().setcallback(new listenablefuturetask.callback<ethereumfeeinfo>() { @override public void onsuccess(ethereumfeeinfo ethereumfeeinfo) { convertedamount = ethereumutils.convertweitogwei(ethereumfeeinfo.getnormal()); log.i(log_tag, "fee info is fetched successfully."); methereumfeeinfo = ethereumfeeinfo; runonuithread(() -> { gaslimitbutton.setenabled(true); toast.maketext(getapplicationcontext(), "fee info is fetched successfully.", toast.length_short).show(); } ); } @override public void onfailure(@notnull executionexception e) { log.e(log_tag, "fetching fee info is failed."); log.e(log_tag, "" + e.getmessage()); } @override public void oncancelled(@notnull interruptedexception e) { log.e(log_tag, "fetching fee info is canceled."); } }); } fetching the gas limit fetching the gas limit is also an asynchronous task. use the estimategaslimit api to calculate the gas limit. the input parameters are the account addresses of the sender and the receiver, the amount of ether (in wei units), and the data to be sent. the sample application sends only ether, so the data field is null. when the user selects gas limit, the gas limit is determined and shown on the screen. public void onclickgaslimit(view view) { string toaddress = toaddressedittext.gettext().tostring(); string amount = sendamountedittext.gettext().tostring(); if (toaddress.isempty() || amount.isempty()) { toast.maketext(getapplicationcontext(), "fill send address and amount field", toast.length_short).show(); } else if(!ethereumservice.isvalidaddress(toaddress)){ toast.maketext(getapplicationcontext(), "invalid address.", toast.length_short).show(); } else { bigdecimal sendamount = new bigdecimal(amount); biginteger convertedsendamount = ethereumutils.convertethtowei(sendamount); ethereumservice.estimategaslimit((ethereumaccount) mfirstaccount, toaddress, convertedsendamount, null).setcallback(new listenablefuturetask.callback<biginteger>() { @override public void onsuccess(biginteger biginteger) { mgaslimit = biginteger; log.i(log_tag, "gas limit is fetched successfully."); log.i(log_tag, "gas limit is:" + biginteger.tostring()); runonuithread(() -> { sendbutton.setenabled(true); gaslimittext.settext(biginteger.tostring()); }); } @override public void onfailure(@notnull executionexception e) { log.e(log_tag, "fetching gas limit is failed."); log.e(log_tag, "" + e.getmessage()); } @override public void oncancelled(@notnull interruptedexception e) { log.e(log_tag, "fetching gas limit is canceled."); } }); } } send the ether all the parameter values needed to send the ether are now known. use the sendtransaction api to initiate the transaction. in the sample application, the value of the nonce parameter has not been set manually. by leaving the value null, the platform handles the nonce value itself. if the transaction is successful, the onsuccess() event handler returns the transaction hash. a record of every ethereum transaction is viewable in etherscan, a blockchain explorer. it allows anyone to explore addresses, transactions, and tokens in the ethereum blockchain. public void onclicksend(view view) { string toaddress = toaddressedittext.gettext().tostring(); bigdecimal sendamount = new bigdecimal(sendamountedittext.gettext().tostring()); biginteger convertedsendamount = ethereumutils.convertethtowei(sendamount); //getting gas price int transactionspeedid = transactionspeedgroup.getcheckedradiobuttonid(); if (transactionspeedid == -1) { toast.maketext(getapplicationcontext(), "select a transaction speed.", toast.length_short).show(); } else { switch (transactionspeedid) { case r.id.transaction_speed_slow: mgasprice = methereumfeeinfo.getslow(); log.d(log_tag, "gasprice: " + mgasprice); break; case r.id.transaction_speed_normal: mgasprice = methereumfeeinfo.getnormal(); log.d(log_tag, "gasprice: " + mgasprice); break; case r.id.transaction_speed_fast: mgasprice = methereumfeeinfo.getfast(); log.d(log_tag, "gasprice: " + mgasprice); break; } } if(transactionspeedid != -1) { try { ethereumservice.sendtransaction(mhardwarewallet, (ethereumaccount) mfirstaccount, mgasprice , mgaslimit, toaddress, convertedsendamount, null).setcallback(new listenablefuturetask.callback<transactionresult>() { @override public void onsuccess(transactionresult transactionresult) { log.d(log_tag, "transaction hash: " + transactionresult.gethash()); runonuithread(() -> toast.maketext(getapplicationcontext(), "transaction hash: " + transactionresult.gethash(), toast.length_short).show() ); } @override public void onfailure(@notnull executionexception e) { log.e(log_tag, "transaction failed."); log.e(log_tag, "" + e.getmessage()); } @override public void oncancelled(@notnull interruptedexception e) { log.e(log_tag, "transaction canceled."); } }); } catch (availabilityexception e) { log.e(log_tag, "error in sending: " + e); } } } conclusion this blog has demonstrated how you can send ether to another account, an example of a feature you can implement in a wallet application using the samsung blockchain platform sdk. check the samsung developers site periodically for updates as samsung blockchain platform sdk keeps expanding support for new platforms. additional resources: samsung blockchain platform sdk transaction sample application samsung blockchain platform sdk documentation
M.A. Hasan Molla
Develop Samsung Blockchain
dockeystore introduction key players in the blockchain industry: user, wallet and node in the blockchain industry, there are a few important key players: user, wallet, and node. the user can use the blockchain technology to send or receive cryptocurrencies. a user can be an active user of blockchain-based applications, also known as dapps (decentralized app) to raise a crypto asset, like a cute character in a game. the user may also post an interesting article on a blockchain-based sns, where the user gets credits for the number of likes or comments from other users. all of these use cases require the user to connect to the blockchain network. wallet or dapps provide the user an interface to connect to the blockchain network, such as bitcoin or ethereum. unlike the traditional wallets, blockchain wallets do not hold any money or an asset of the user, but simply show users a record of all transactions on the ledger that are related to the user’s account. when a user tries to send a certain amount of cryptocurrency to another user, the wallet creates a transaction in a correct format to submit to the blockchain network. one of the key components of a transaction is a user’s signature. a wallet must be able to sign a transaction with the user’s private key. some wallets generate a key pair in the wallet by itself and sign the transaction upon user’s request. some may not generate the key pair itself, but instead, support the use of a separate hardware wallet, which will store the key and complete the signature part of a blockchain transaction. nevertheless, because there is a fee that must be paid in order to write on the ledger of the blockchain network, a user’s signature that implies that the user has checked and approved the fee, cannot be emphasized enough. lastly, when a wallet or a dapp submits the signed transaction to the blockchain network, nodes, similar to server, checks the validity of the transaction and use a consensus protocol to agree whether to include the received transaction in the ledger or not. if it is included, then the transaction is now shared to everyone participating in the network. digital signature in blockchain using a digital signature in the blockchain is one of the fundamentals to understand the technology. the user’s digital signature implies many things. by signing the transaction, the user is confirming that the information in the transaction, such as the recipient address, amount, and fee, are all correct. the signature also guarantees the identity of the user. only the user that actually holds the key can sign the transaction, because there will be a different result if a different key was used to sign the transaction. digital signature provides non-repudiation as well, since it is a combination of the user’s key and the contents, thereby the user cannot deny its existence. because there is no centralized server that controls the network in blockchain, it is impossible to cancel or reverse a transaction that has been submitted to the network. hence, the biggest challenge that the wallets and dapps face is how to sign a transaction safely. to sign a transaction, a user’s private key is needed. in other words, the user’s private key is what must be kept in a safe place. moreover, the execution environment, where the signing is happening, must be also safe. advent of hardware wallets to avoid the security threats of computer viruses and other remote dangers in the web environment, hardware wallet came out into the world. along with a print out, or a paper wallet, hardware wallet is one of the choices of cold wallet, a wallet that is not connected to the internet. a hardware wallet usually has a separate space to create, store and use the private key. in such an isolated environment, hardware wallets are invulnerable to remote attacks. hardware wallets also have a separate secure display to get user’s confirmation of the blockchain transaction. the information shown by the hardware wallet’s screen is independently displayed from the host that it is connected to, such as the computer. yet, there are usability issues when it comes to using a hardware wallet. the user must carry the wallet around and make sure to keep that hardware wallet in a safe place. also, the complexities and inconvenience of plugging the hardware wallet usb and running an online web app on the computer, and using the hardware wallet to sign a transaction still remain as a challenge. samsung blockchain keystore launched with galaxy s10 series at the beginning of the year 2019, samsung blockchain keystore was launched with the galaxy s10 series to store the user’s private key in the secure area of the phone and sign blockchain transactions in a safe environment. as a preloaded feature on selected devices in selected countries, samsung blockchain keystore aims to contribute to the blockchain ecosystem to help users and blockchain apps leverage security features of the device and thus, safely use blockchain technology on the mobile. samsung blockchain keystore can be found by going to the device’s settings > biometric and security. under the security category, you will see “samsung blockchain keystore.” with the samsung blockchain keystore app, users can leverage features including key management, signing a transaction, setting up a pin and a fingerprint as an authentication method, and managing samsung blockchain keystore settings options. more details on each feature are as follows. ① key management the user can create a new key pair (public and private key) or import an existing one that was created from other wallets. more specifically, samsung blockchain keystore supports bip-39 (bitcoin improvement proposal) standard, and is a hd (hierarchical deterministic) wallet. more details will be covered in the key management section. in the set up page, “create a new wallet” means generating a root seed, that can derive both a public key and a private key used to make blockchain-based transactions, payments or contracts in decentralized apps or other wallet services that have integrated with samsung blockchain keystore. because this root seed is about 128 to 256 bits of 0 and 1, and is not friendly to read nor remember, 12 to 24 words of recovery phrase can replace the root seed. anyone who knows the recovery phrase can access and sign the blockchain transactions. so the user will need to write down the 12 words and make sure not to lose it. note that once the process is complete, samsung blockchain keystore will never ask the user to enter all the words again. “import an existing wallet” means the user already has 12 to 24 words of recovery phrase, created in samsung blockchain keystore on a different device, or from other wallets that support bip-39 standard. once the user enters the correct words of recovery phrase, the wallet will be imported and the set up process is complete. likewise, once the process is complete, samsung blockchain keystore will never ask the user to enter all the words again. ② sign a transaction the user can send cryptocurrency or purchase a crypto item in blockchain apps that have been integrated with samsung blockchain keystore. in the midst of proceeding a blockchain transaction, the user can check sensitive information of the transaction, such as the recipient address, sending the amount and the fee on a secure screen, called trusted user interface (tui) executed by samsung blockchain keystore, and confirm the transaction for samsung blockchain keystore to sign it. ③ pin and fingerprint management during the process of setting up a wallet, the user will need to set up a six-digit pin to protect the crypto assets. a pin is a verification method for cryptocurrency transaction, payment and smart contract in samsung blockchain keystore-integrated services. if the user has a fingerprint registered on the device, then the user can also set up a fingerprint as the alternative authentication method. the pin or fingerprint will be asked every time a user wants to sign a blockchain transaction, check confidential information, like the recovery phase, or change pin. ④ manage samsung blockchain keystore once the user has set up the wallet, when the user clicks “samsung blockchain keystore” menu in the device’s settings (biometric and security), the user will land on samsung blockchain keystore’s main page, where the user can manage samsung blockchain keystore-related options. the user can change the pin, enable or disable fingerprint as an authentication method, check recovery phrase and reset samsung blockchain keystore. other things, such as setting alarm notifications or connecting to a channel to send questions or comments to samsung blockchain team can be found here as well. more information, such as how to use, or notices from samsung blockchain team, terms and conditions, and other information related to samsung blockchain keystore are also available. what will be covered? throughout this site, we will look deep into the samsung blockchain keystore. the following items will be discussed. security considerations when building samsung blockchain keystore and bringing the blockchain ecosystem onto the mobile. overall architecture of how samsung blockchain keystore is designed and end-to-end service flow, including the exact role of samsung blockchain keystore sdk that will be integrated into your app. security measures including the execution environment and how keys are generated will be explained in detail. benefits for developers integrating samsung blockchain keystore sdk and what kind of services we welcome.
Develop Samsung Pay
docapi reference this page describes the data structures used in the samsung pay web checkout api integration paymentmethods the paymentmethods object defines the payment methods that the merchant supports key type required description version string required samsung pay api versionthe supported value is 2 serviceid string required merchant id that is assigned after onboarding protocol string required payment protocol typethe supported value is protocol_3ds allowedbrands list<string> required list of supported card brandsthe possible values are visamastercardamexdiscoverelo tbd mada tbd cb tbd isrecurring boolean optional value if payment is recurringthe default value is false iscpfcardrequired boolean optional value if payment must be including cpfthe default value is false merchantchoicebrands object optional data structure containing configuration information for a co-badged card merchantchoicebrands type string required co-badged card display option for the payment sheetthe possible values are mandatory = only the brand defined in merchantchoicebrands brands is enabledpreference = the brand defined in merchantchoicebrands brands is selected by default but the user can change it merchantchoicebrands brands list<string> required list of supported brands for the co-badged cardthe possible values are madacb extrapaymentinfo object optional data structure containing additional supported features extrapaymentinfo id string required feature id for the additional featurethe possible values are combocard = combo carddsrp = digital secure remote payment extrapaymentinfo type string optional feature type, if the value of extrapaymentinfo id is dsrpthe possible values are ucaf = universal cardholder authentication fieldicc = integrated circuit cardthe default value is ucaf table 1 "paymentmethods" data structure elements transactiondetail the transactiondetail object contains the transaction information for the user's purchase key type required description ordernumber string required order number of the transactionthe following characters are allowed [a-z][a-z][0-9,-] merchant object required data structure containing merchant information merchant name string required merchant name merchant url string required merchant domain urlthe maximum length is 100 characters merchant id string optional merchant referencethis is the id value registered with your pg required for gateway token mode the maximum length is 45 characters it should be set in the request parameter for mada token if a merchant request mada token, this field is mandatory as this field should be included in the payload for mada token, there is a 15-character length limit merchant countrycode string required merchant country codeiso-3166-1 alpha-2 amount object required data structure containing the payment amount amount option string required display format for the total amount on the payment sheetthe possible values are format_total_estimated_amount = display "total estimated amount " and total amountformat_total_price_only = display the total amount only amount currency string required currency codethe maximum length is 3 characters amount total string required total payment amount in the currency specified by amount currencythe amount must be an integer for example, 300 or in a format valid for the currency such as 2 decimal places after a separator, for example, 300 50 type string optional transaction typethis value is specifically supported for mada tokens and will not apply to other token types the possible values are purchasepreauthorizationthe default value is purchase table 2 "transactiondetail" data structure elements paymentcredential the paymentcredential object contains the payment credential information generated by the samsung wallet application on the user's mobile device key type required description card_brand string required brand of the payment card card_last4digit object required last 4 digits of the card number 3ds object required data structure containing the generated 3ds data 3ds type string optional 3ds typethe value is s for samsung pay 3ds version string required 3ds versionthe value for the current version is 100 3ds data string required encrypted payment credential data recurring_payment boolean required value if credential is enabled for recurringthe default value is false cpf string optional brazilian cpfthis value is jwe encrypted with registered csr encrypted value included below information { "name" "joao", "number" "12345678900"} table 3 "paymentcredential" data structure elements paymentresult the paymentresult object contains the payment result information during transaction processing, and after the payment is processed with pg network key type required description status string required payment statusthe possible values are charged = payment was charge successfullycanceled = payment was canceled by either user, merchant, or acquirerrejected = payment was rejected by acquirererred = an error occurred during the payment process provider string optional payment provider pg name table 4 "paymentresult data structure elements
Develop Samsung Blockchain
docglossary term definition address in the blockchain network, the address can be used like a user’s account as the balance and the transaction history can be checked using the address. create a wallet samsung blockchain keystore creates a master seed when a user creates a wallet in samsung blockchain keystore, and stores master seed safely in the secure file system. extended public key an extended public key that corresponds to a hd path can be derived from the master seed in samsung blockchain keystore. this public key can be used to derive the address to link the user’s account to your android app and view current balance and history details. hd path hierarchical deterministic wallet is a standard tree structure, represented by derivation paths. master seed samsung blockchain keystore generates and stores the master seed of the hd wallet safely in the secure file system. this is used to derive hd paths and corresponding key pairs when making transactions. mnemonic codes mnemonic codes compatible to bip-39 standard. refer to the following for more info: https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki reset a wallet master seed is removed from the user’s device when user resets a wallet via samsung blockchain keystore settings page. restore/import a wallet restore the master seed from a different wallet by entering mnemonic words. rlp encoding recursive length prefix is the main encoding method used in ethereum to serialize objects. transactions signed by samsung blockchain keystore will be returned in a rlp-encoded format. seed hash a pseudo seed hash that is generated randomly when the hd wallet is created. if the master seed of a wallet is changed, the seed hash will be changed as well. send a transaction sending a transaction is not in the scope of samsung blockchain keystore. to connect to the public blockchain network, developers can set up their own nodes or use other public nodes. sign a transaction user’s signature is an important step when making a cryptocurrency transaction. samsung blockchain keystore provides a feature to sign a transaction with a private key, derived from the master seed. tee trusted execution environment. tui trusted user interface.
We use cookies to improve your experience on our website and to show you relevant advertising. Manage you settings for our cookies below.
These cookies are essential as they enable you to move around the website. This category cannot be disabled.
These cookies collect information about how you use our website. for example which pages you visit most often. All information these cookies collect is used to improve how the website works.
These cookies allow our website to remember choices you make (such as your user name, language or the region your are in) and tailor the website to provide enhanced features and content for you.
These cookies gather information about your browser habits. They remember that you've visited our website and share this information with other organizations such as advertisers.
You have successfully updated your cookie preferences.